1 2018-12-23 Alan Modra <amodra@gmail.com>
4 * config/rs6000/rs6000.h (ASM_CPU_SPEC): Correct %e message. Handle
5 -mcpu=rs64, not -mcpu=rs64a. Handle -mcpu=powerpc64 and -mcpu=titan.
6 * config/rs6000/driver-rs6000.c (asm_names): Similarly.
7 * config/rs6000/aix71.h (ASM_CPU_SPEC): Delete %e message. Handle
8 -mcpu=rs64, not -mcpu=rs64a.
9 * config/rs6000/aix72.h (ASM_CPU_SPEC): Likewise.
11 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
13 * lto-wrapper.c (tool_cleanup): Don’t report ficticious temp files.
14 (debug_objcopy): Improve temp filenames. Append the early
15 debug objects to the outfiles. Remove the phase prelinking the
16 early debug. Emit the early debug filenames for ld.
18 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
20 * config/i386/darwin.h (TARGET_ASM_OUTPUT_IDENT): New.
22 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
24 * collect2.c (maybe_run_lto_and_relink): Don’t say we have a temp file
25 unless we actually did some LTO.
26 (has_lto_section, is_lto_object_file): New.
27 (maybe_lto_object_file): Remove.
28 (scan_prog_file): Use is_lto_object_file() instead of scanning the
31 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
33 * collect2.c (main): Parse the output file early so we can make nicer
34 temp names. Respond to “-save-temps” in the GCC OPTIONS.
35 (maybe_unlink): Don’t print “[Leaving…”] for files we never created
38 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
40 * collect2.c (main): Combine flags from both the command line and
41 COLLECT_GCC_OPTIONS to determine the set in force
43 2018-12-21 Jan Hubicka <hubicka@ucw.cz>
45 * ipa-utils.c (ipa_merge_profiles): Recompute summaries.
47 2018-12-21 Jakub Jelinek <jakub@redhat.com>
51 * omp-expand.c (extract_omp_for_update_vars): Regimplify the condition
53 (expand_omp_for_generic): Don't clobber t temporary for ordered loops.
55 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
58 * ipa-polymorphic-call.c
59 (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Handle
60 arguments of thunks correctly.
61 (ipa_polymorphic_call_context::get_dynamic_context): Be ready for
63 * lto-cgraph.c (lto_output_node): Always stream thunk info.
65 2018-12-21 Andreas Krebbel <krebbel@linux.ibm.com>
67 * config/s390/vector.md ("floatv2div2df2", "floatunsv2div2df2")
68 ("fix_truncv2dfv2di2", "fixuns_truncv2dfv2di2"): New pattern
71 2018-12-21 Eric Botcazou <ebotcazou@adacore.com>
73 PR rtl-optimization/87727
74 * combine.c (cant_combine_insn_p): On a LEAF_REGISTERS target, combine
75 again moves from leaf hard registers.
77 * final.c (final_scan_insn_1) <NOTE_INSN_INLINE_ENTRY>: Minor tweak.
79 2018-12-21 Jakub Jelinek <jakub@redhat.com>
82 * config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask,
83 *avx512pf_gatherpf<mode>df_mask, *avx512pf_scatterpf<mode>sf_mask,
84 *avx512pf_scatterpf<mode>df_mask): Use %X5 instead of %5 for
86 (gatherq_mode): Remove mode iterator.
87 (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2): Use X instead
89 (*avx512f_gatherdi<mode>): Use X instead of <gatherq_mode>.
90 (*avx512f_gatherdi<mode>_2, *avx512f_scattersi<mode>,
91 *avx512f_scatterdi<mode>): Use %X5 for -masm=intel.
93 PR rtl-optimization/88563
94 * expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Swap innermode
95 and mode arguments to convert_modes. Likewise swap mode and word_mode
96 arguments. Handle both arguments with VOIDmode before convert_modes
97 of one of them. Formatting fixes.
99 2018-12-21 Uros Bizjak <ubizjak@gmail.com>
102 * internal-fn.def (COSH): New.
105 * optabs.def (cosh_optab): New.
108 * config/i386/i386-protos.h (ix86_emit_i387_sinh): New prototype.
109 (ix86_emit_i387_cosh): Ditto.
110 (ix86_emit_i387_tanh): Ditto.
111 * config/i386/i386.c (ix86_emit_i387_sinh): New function.
112 (ix86_emit_i387_cosh): Ditto.
113 (ix86_emit_i387_tanh): Ditto.
114 * config/i386/i386.md (sinhxf2): New expander.
115 (sinh<mode>2): Ditto.
117 (cosh<mode>2): Ditto.
119 (tanh<mode>2): Ditto.
121 2018-12-21 Jakub Jelinek <jakub@redhat.com>
124 * config/i386/i386.c (ix86_expand_int_sse_cmp): Optimize
125 x > y ? 0 : -1 into min (x, y) == x ? -1 : 0.
127 2018-12-21 Jan Beulich <jbeulich@suse.com>
129 * config/i386/sse.md (vaesdec_<mode>, vaesdeclast_<mode>): Allow
132 2018-12-21 Alexandre Oliva <oliva@adacore.com>
134 * config.gcc (tmake_file): Add name to tmake_file for
135 each @name in --with-multilib-list on arm-*-* targets.
136 * doc/install.texi (with-multilib-list): Document it.
138 2018-12-21 Jakub Jelinek <jakub@redhat.com>
140 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Use
141 DR_TARGET_ALIGNMENT on dr_info rather than dr. Spelling fixes.
143 2018-12-20 Joern Rennecke <joern.rennecke@riscy-ip.com>
145 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Don't do
146 versioning for data accesses with misaligned step.
148 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
151 * doc/invoke.texi: Document -Wno-address-of-packed-member.
153 2018-12-20 Vladimir Makarov <vmakarov@redhat.com>
156 * ira-color.c (fast_allocation): Choose the best cost hard reg.
158 2018-12-20 Richard Sandiford <richard.sandiford@arm.com>
160 * config/aarch64/iterators.md (SVE_INT_UNARY, fp_int_op): Add abs.
161 (SVE_FP_UNARY): Sort.
163 2018-12-20 Richard Sandiford <richard.sandiford@arm.com>
165 * config/aarch64/aarch64-sve.md (*cond_<optab><mode>_4): Use
166 sve_fmla_op rather than sve_fmad_op for the movprfx alternative.
168 2018-12-20 Martin Jambor <mjambor@suse.cz>
171 * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Assert that
174 2018-12-20 Richard Biener <rguenther@suse.de>
176 PR tree-optimization/84362
177 * tree-ssa-loop-im.c: Include alias.h, builtins.h and tree-dfa.h.
178 (struct im_mem_ref): add ref_canonical flag.
179 (struct mem_ref_hasher): Use ao_ref as compare_type.
180 (mem_ref_hasher::equal): Adjust and add variant comparing ao_ref
182 (mem_ref_alloc): Take ao_ref parameter, initialize ref_canonical
184 (gather_mem_refs_stmt): Set up ao_ref early and do the lookup
185 using it. If we have non-equal refs canonicalize the one
186 in the hashtable used for insertion.
187 (tree_ssa_lim_initialize): Adjust.
189 2018-12-20 Jakub Jelinek <jakub@redhat.com>
192 * config/i386/i386.c (ix86_expand_sse_movcc): For maskcmp, try to
193 emit vpmovm2? instruction perhaps after knot?. Reorganize code
194 so that it doesn't have to test !maskcmp in almost every conditional.
196 2018-12-20 Alan Modra <amodra@gmail.com>
198 * config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Define.
200 2018-12-19 Andreas Tobler <andreast@gcc.gnu.org>
202 * config.gcc: Enable TARGET_DEFAULT_ASYNC_UNWIND_TABLES on
205 2018-12-19 Uros Bizjak <ubizjak@gmail.com>
207 * config/i386/i386.md (SWI1248_AVX512BWDQ_64): Rename from
208 SWI1248_AVX512BWDQ2_64. Unconditionally enable HImode.
209 (*cmp<mode>_ccz_1): Emit kortest instead of ktest insn.
210 Use SWI1248_AVX512BWDQ_64 mode iterator and enable only for
213 2018-12-19 Thomas Preud'homme <thomas.preudhomme@linaro.org>
215 * config/arm/elf.h: Update comment about condition that need to
216 match with libgcc/config/arm/lib1funcs.S to also include
217 libgcc/config/arm/t-arm.
218 * doc/sourcebuild.texi (output-exists, output-exists-not): Rename
219 subsubsection these directives are in to "Check for output files".
220 Move scan-symbol to that section and add to it new scan-symbol-not
223 2018-12-19 Tom de Vries <tdevries@suse.de>
225 * config/nvptx/nvptx.c (PTX_CTA_SIZE): Define.
227 2018-12-19 Tom de Vries <tdevries@suse.de>
229 * omp-offload.c (oacc_fn_attrib_level): Remove static.
230 * omp-offload.h (oacc_fn_attrib_level): Declare.
232 2018-12-19 Tom de Vries <tdevries@suse.de>
234 * omp-offload.c (oacc_get_default_dim): New function.
235 * omp-offload.h (oacc_get_default_dim): Declare.
237 2018-12-19 David Malcolm <dmalcolm@redhat.com>
240 * gcc-rich-location.c
241 (maybe_range_label_for_tree_type_mismatch::get_text): Move here from
243 (binary_op_rich_location::binary_op_rich_location): New ctor.
244 (binary_op_rich_location::use_operator_loc_p): New function.
245 * gcc-rich-location.h
246 (class maybe_range_label_for_tree_type_mismatch)): Move here from
248 (struct op_location_t): New forward decl.
249 (class binary_op_rich_location): New class.
250 * tree.h (struct op_location_t): New struct.
252 2018-12-19 David Malcolm <dmalcolm@redhat.com>
256 * convert.c: Include "selftest.h".
257 (preserve_any_location_wrapper): New function.
258 (convert_to_pointer_maybe_fold): Update to handle location
260 (convert_to_real_maybe_fold): Likewise.
261 (convert_to_integer_1): Strip expr when using TREE_OVERFLOW.
262 Handle location wrappers when checking for INTEGER_CST.
263 (convert_to_integer_maybe_fold): Update to handle location
265 (convert_to_complex_maybe_fold): Likewise.
266 (selftest::test_convert_to_integer_maybe_fold): New functions.
267 (selftest::convert_c_tests): New function.
268 * convert.h (preserve_any_location_wrapper): New decl.
269 * fold-const.c (size_binop_loc): Strip location wrappers when
271 (operand_equal_p): Strip any location wrappers.
272 (integer_valued_real_p): Strip any location wrapper.
273 * selftest-run-tests.c (selftest::run_tests): Call
274 selftest::convert_c_tests.
275 * selftest.h (selftest::convert_c_tests): New decl.
276 * tree.c (build_complex): Assert that REAL and IMAG are constants.
277 (integer_zerop): Look through location wrappers.
278 (integer_onep): Likewise.
279 (integer_each_onep): Likewise.
280 (integer_all_onesp): Likewise.
281 (integer_minus_onep): Likewise.
282 (integer_pow2p): Likewise.
283 (integer_nonzerop): Likewise.
284 (integer_truep): Likewise.
285 (fixed_zerop): Likewise.
286 (real_zerop): Likewise.
287 (real_onep): Likewise.
288 (real_minus_onep): Likewise.
289 (tree_int_cst_equal): Likewise.
290 (simple_cst_equal): Treat location wrappers with non-equal source
291 locations as being unequal.
292 (uniform_integer_cst_p): Look through location wrappers.
293 (maybe_wrap_with_location): Don't create wrappers if any
294 auto_suppress_location_wrappers are active.
295 (suppress_location_wrappers): New variable.
296 (selftest::test_predicates): New test.
297 (selftest::tree_c_tests): Call it.
298 * tree.h (CONSTANT_CLASS_OR_WRAPPER_P): New macro.
299 (suppress_location_wrappers): New decl.
300 (class auto_suppress_location_wrappers): New class.
302 2018-12-19 Paul A. Clarke <pc@us.ibm.com>
304 * config/rs6000/tmmintrin.h (_mm_hadds_epi16): Vector lanes swapped.
305 (_mm_hsub_epi32): Likewise.
306 (_mm_shuffle_epi8): Fix reversed interpretation of parameters.
307 (_mm_shuffle_pi8): Likewise.
308 (_mm_addubs_pi16): Likewise.
310 2018-12-19 Thomas Preud'homme <thomas.preudhomme@linaro.org>
312 * config/arm/arm.h (TARGET_HARD_FLOAT): Restrict to TARGET_32BIT
314 * config/arm/arm.c (output_return_instruction): Only check
315 TARGET_HARD_FLOAT to decide whether FP instructions are available.
317 2018-12-19 Tom de Vries <tom@codesourcery.com>
319 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
320 dump files): Add offload-rtl.
322 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
325 * config/rs6000/vsx.md (*vsx_extract_<P:mode>_<VSX_D:mode>_load):
326 Require TARGET_POWERPC64.
328 2018-12-19 Richard Biener <rguenther@suse.de>
330 PR tree-optimization/88533
332 2018-04-30 Richard Biener <rguenther@suse.de>
334 PR tree-optimization/28364
335 PR tree-optimization/85275
336 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
337 copying first exit test.
339 * tree-ssa-loop-ch.c: Include tree-phinodes.h and
341 (should_duplicate_loop_header_p): Track whether stmt compute
342 loop invariants or values based on IVs. Apart from the
343 original loop header only duplicate blocks with exit tests
344 that are based on IVs or invariants.
346 2018-12-19 Tom de Vries <tdevries@suse.de>
348 * config/nvptx/nvptx.c (nvptx_gen_shared_bcast, shared_prop_gen)
349 (nvptx_goacc_expand_accel_var): Use MAX and ROUND_UP.
350 (nvptx_assemble_value, nvptx_output_skip): Use MIN.
351 (nvptx_shared_propagate, nvptx_single, nvptx_expand_shared_addr): Use
354 2018-12-19 Tom de Vries <tdevries@suse.de>
356 * config/nvptx/nvptx.c (nvptx_gen_wcast): Rename as
357 nvptx_gen_warp_bcast.
358 (nvptx_gen_wcast): Rename to nvptx_gen_shared_bcast, add bool
359 vector argument, and update call to nvptx_gen_shared_bcast.
360 (propagator_fn): Add bool argument.
361 (nvptx_propagate): New bool argument, pass bool argument to fn.
362 (vprop_gen): Rename to warp_prop_gen, update call to
363 nvptx_gen_warp_bcast.
364 (nvptx_vpropagate): Rename to nvptx_warp_propagate, update call to
366 (wprop_gen): Rename to shared_prop_gen, update call to
367 nvptx_gen_shared_bcast.
368 (nvptx_wpropagate): Rename to nvptx_shared_propagate, update call
370 (nvptx_wsync): Rename to nvptx_cta_sync.
371 (nvptx_single): Update calls to nvptx_gen_warp_bcast,
372 nvptx_gen_shared_bcast and nvptx_cta_sync.
373 (nvptx_process_pars): Likewise.
374 (write_worker_buffer): Rename as write_shared_buffer.
375 (nvptx_file_end): Update calls to write_shared_buffer.
376 (nvptx_expand_worker_addr): Rename as nvptx_expand_shared_addr.
377 (nvptx_expand_builtin): Update call to nvptx_expand_shared_addr.
378 (nvptx_get_worker_red_addr): Rename as nvptx_get_shared_red_addr.
379 (nvptx_goacc_reduction_setup): Update call to
380 nvptx_get_shared_red_addr.
381 (nvptx_goacc_reduction_fini): Likewise.
382 (nvptx_goacc_reduction_teardown): Likewise.
384 2018-12-19 Tom de Vries <tdevries@suse.de>
386 * config/nvptx/nvptx.c (worker_bcast_size): Rename as
388 (worker_bcast_align): Rename as oacc_bcast_align.
389 (worker_bcast_sym): Rename as oacc_bcast_sym.
390 (nvptx_option_override): Update usage of oacc_bcast_*.
391 (struct wcast_data_t): Rename as broadcast_data_t.
392 (nvptx_gen_wcast): Update type of data argument and usage of
394 (wprop_gen): Update type of data_ and usage of oacc_bcast_align.
395 (nvptx_wpropagate): Update type of data and usage of
396 oacc_bcast_{sym,size}.
397 (nvptx_single): Update type of data and usage of oacc_bcast_size.
398 (nvptx_file_end): Update usage of oacc_bcast_{sym,align,size}.
400 2018-12-19 Tom de Vries <tdevries@suse.de>
402 * config/nvptx/nvptx.md (nvptx_barsync): Add and handle operand.
403 * config/nvptx/nvptx.c (nvptx_wsync): Update call to gen_nvptx_barsync.
405 2018-12-19 Tom de Vries <tdevries@suse.de>
407 * config/nvptx/nvptx.c (nvptx_single): Always pass false to
409 (nvptx_process_pars): Likewise.
411 2018-12-19 Tom de Vries <tdevries@suse.de>
413 * config/nvptx/nvptx.c (nvptx_previous_fndecl): Declare.
414 (nvptx_set_current_function): New function.
415 (TARGET_SET_CURRENT_FUNCTION): Define.
417 2018-12-19 Shaokun Zhang <zhangshaokun@hisilicon.com>
419 * config/aarch64/aarch64-cores.def (tsv110): Fix architecture. This
420 part is really Armv8.2 with some permitted Armv8.4 extensions.
422 2018-12-19 Jakub Jelinek <jakub@redhat.com>
425 * config/i386/vpclmulqdqintrin.h (_mm256_clmulepi64_epi128): Enable
426 for -mavx -mvpclmulqdq rather than just for -mavx512vl -mvpclmulqdq.
428 2018-12-19 Alexandre Oliva <aoliva@redhat.com>
433 (vr_values::vrp_evaluate_conditional_warnv_with_ops): Extend
434 simplification of overflow tests to cover cases in which we
435 can determine the result of the comparison.
437 2018-12-19 Bin Cheng <bin.cheng@linux.alibaba.com>
439 * auto-profile.c (afdo_indirect_call): Skip generating histogram
440 value if we can't find cgraph_node for then indirected callee. Save
441 profile_id of the cgraph_node in histogram value's first counter.
442 * value-prof.c (gimple_value_profile_transformations): Don't skip
443 for flag_auto_profile.
445 2018-12-18 Vladimir Makarov <vmakarov@redhat.com>
447 PR rtl-optimization/87759
448 * lra-assigns.c (lra_split_hard_reg_for): Recalculate
451 2018-12-18 Jakub Jelinek <jakub@redhat.com>
454 * config/i386/i386-builtin-types.def
455 (VOID_FTYPE_PDOUBLE_QI_V8SI_V4DF_INT,
456 VOID_FTYPE_PFLOAT_QI_V4DI_V8SF_INT,
457 VOID_FTYPE_PLONGLONG_QI_V8SI_V4DI_INT,
458 VOID_FTYPE_PINT_QI_V4DI_V8SI_INT,
459 VOID_FTYPE_PDOUBLE_QI_V4SI_V2DF_INT,
460 VOID_FTYPE_PFLOAT_QI_V2DI_V4SF_INT,
461 VOID_FTYPE_PLONGLONG_QI_V4SI_V2DI_INT,
462 VOID_FTYPE_PINT_QI_V2DI_V4SI_INT): New builtin types.
463 * config/i386/i386.c (enum ix86_builtins): Add
464 IX86_BUILTIN_SCATTERALTSIV4DF, IX86_BUILTIN_SCATTERALTDIV8SF,
465 IX86_BUILTIN_SCATTERALTSIV4DI, IX86_BUILTIN_SCATTERALTDIV8SI,
466 IX86_BUILTIN_SCATTERALTSIV2DF, IX86_BUILTIN_SCATTERALTDIV4SF,
467 IX86_BUILTIN_SCATTERALTSIV2DI and IX86_BUILTIN_SCATTERALTDIV4SI.
468 (ix86_init_mmx_sse_builtins): Fix up names of IX86_BUILTIN_GATHERALT*,
469 IX86_BUILTIN_GATHER3ALT* and IX86_BUILTIN_SCATTERALT* builtins to
470 match the IX86_BUILTIN codes. Build IX86_BUILTIN_SCATTERALTSIV4DF,
471 IX86_BUILTIN_SCATTERALTDIV8SF, IX86_BUILTIN_SCATTERALTSIV4DI,
472 IX86_BUILTIN_SCATTERALTDIV8SI, IX86_BUILTIN_SCATTERALTSIV2DF,
473 IX86_BUILTIN_SCATTERALTDIV4SF, IX86_BUILTIN_SCATTERALTSIV2DI and
474 IX86_BUILTIN_SCATTERALTDIV4SI decls.
475 (ix86_vectorize_builtin_scatter): Expand those new builtins.
477 2018-12-18 Bill Schmidt <wschmidt@linux.ibm.com>
479 * doc/extend.texi (PowerPC Altivec/VSX Built-in Functions):
480 Describe when a typedef name can be used as the type specifier for
481 a vector type, and when it cannot.
483 2018-12-18 Jozef Lawrynowicz <jozef.l@mittosystems.com>
485 * config/msp430/msp430.h: Define TARGET_VTABLE_ENTRY_ALIGN.
487 2018-12-18 Jakub Jelinek <jakub@redhat.com>
491 * optabs.def (vec_pack_sbool_trunc_optab, vec_unpacks_sbool_hi_optab,
492 vec_unpacks_sbool_lo_optab): New optabs.
493 * optabs.c (expand_widen_pattern_expr): Use vec_unpacks_sbool_*_optab
494 and pass additional argument if both input and target have the same
495 scalar mode of VECTOR_BOOLEAN_TYPE_P vectors.
496 * expr.c (expand_expr_real_2) <case VEC_PACK_TRUNC_EXPR>: Handle
497 VECTOR_BOOLEAN_TYPE_P pack where result has the same scalar mode
498 as the operands using vec_pack_sbool_trunc_optab.
499 * tree-vect-stmts.c (supportable_widening_operation): Use
500 vec_unpacks_sbool_{lo,hi}_optab for VECTOR_BOOLEAN_TYPE_P conversions
501 where both wider_vectype and vectype have the same scalar mode.
502 (supportable_narrowing_operation): Similarly use
503 vec_pack_sbool_trunc_optab if narrow_vectype and vectype have the same
505 * config/i386/i386.c (ix86_get_builtin)
506 <case IX86_BUILTIN_GATHER3ALTDIV8SF>: Check for VECTOR_MODE_P
507 rather than non-VOIDmode.
508 * config/i386/sse.md (vec_pack_trunc_qi, vec_pack_trunc_<mode>):
509 Remove useless ()s around "register_operand", formatting fixes.
510 (vec_pack_sbool_trunc_qi, vec_unpacks_sbool_lo_qi,
511 vec_unpacks_sbool_hi_qi): New expanders.
512 * doc/md.texi (vec_pack_sbool_trunc_M, vec_unpacks_sbool_hi_M,
513 vec_unpacks_sbool_lo_M): Document.
515 2018-12-18 Jozef Lawrynowicz <jozef.l@mittosystems.com>
517 * combine.c (update_rsp_from_reg_equal): Only look for the nonzero bits
518 of src in nonzero_bits_mode if the mode of src is MODE_INT and
520 (reg_nonzero_bits_for_combine): Add clarification to comment.
522 2018-12-18 Wei Xiao <wei3.xiao@intel.com>
524 * config/i386/driver-i386.c (host_detect_local_cpu): Detect cascadelake.
525 * config/i386/i386.c (fold_builtin_cpu): Handle cascadelake.
526 * doc/extend.texi: Add cascadelake.
527 2018-12-17 Peter Bergner <bergner@linux.ibm.com>
530 * config/rs6000/vsx.md (nW): New mode iterator.
531 (vsx_mov<mode>_64bit): Use it. Remove redundant GPR 0/-1 alternative.
532 Update length attribute for (<??r>, <nW>) alternative.
533 (vsx_mov<mode>_32bit): Likewise.
535 2018-12-17 Tom de Vries <tdevries@suse.de>
537 * config/nvptx/nvptx.c (PTX_VECTOR_LENGTH, PTX_WORKER_LENGTH,
538 PTX_DEFAULT_RUNTIME_DIM): Move to the top of the file.
540 2018-12-17 Tom de Vries <tdevries@suse.de>
542 * config/nvptx/nvptx.c (PTX_WARP_SIZE): Define.
543 (nvptx_simt_vf): Return PTX_WARP_SIZE instead of PTX_VECTOR_LENGTH.
545 2018-12-17 Tom de Vries <tdevries@suse.de>
547 * config/nvptx/nvptx.c (nvptx_single): Fix whitespace.
548 (nvptx_neuter_pars): Likewise.
550 2018-12-17 Tom de Vries <tdevries@suse.de>
552 * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Work around Fortran
553 bug PR72741 by overriding dims parameter for routines.
555 2018-12-17 Tom de Vries <tdevries@suse.de>
557 * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Rewrite using
560 2018-12-17 Steve Ellcey <sellcey@cavium.com>
562 * config/aarch64/aarch64-protos.h (aarch64_use_simple_return_insn_p):
564 (aarch64_epilogue_uses): Ditto.
565 * config/aarch64/aarch64.c (aarch64_attribute_table): New array.
566 (aarch64_simd_decl_p): New function.
567 (aarch64_reg_save_mode): New function.
568 (aarch64_function_ok_for_sibcall): Check for simd calls.
569 (aarch64_layout_frame): Check for simd function.
570 (aarch64_gen_storewb_pair): Handle E_TFmode.
571 (aarch64_push_regs): Use aarch64_reg_save_mode to get mode.
572 (aarch64_gen_loadwb_pair): Handle E_TFmode.
573 (aarch64_pop_regs): Use aarch64_reg_save_mode to get mode.
574 (aarch64_gen_store_pair): Handle E_TFmode.
575 (aarch64_gen_load_pair): Ditto.
576 (aarch64_save_callee_saves): Handle different mode sizes.
577 (aarch64_restore_callee_saves): Ditto.
578 (aarch64_components_for_bb): Check for simd function.
579 (aarch64_epilogue_uses): New function.
580 (aarch64_process_components): Check for simd function.
581 (aarch64_expand_prologue): Ditto.
582 (aarch64_expand_epilogue): Ditto.
583 (aarch64_expand_call): Ditto.
584 (aarch64_use_simple_return_insn_p): New function.
585 (TARGET_ATTRIBUTE_TABLE): New define.
586 * config/aarch64/aarch64.h (EPILOGUE_USES): Redefine.
587 (FP_SIMD_SAVED_REGNUM_P): New macro.
588 * config/aarch64/aarch64.md (simple_return): New define_expand.
589 (load_pair_dw_tftf): New instruction.
590 (store_pair_dw_tftf): Ditto.
591 (loadwb_pair<TX:mode>_<P:mode>): Ditto.
592 (storewb_pair<TX:mode>_<P:mode>): Ditto.
594 2018-12-17 Uros Bizjak <ubizjak@gmail.com>
597 * internal-fn.def (ACOSH): New.
600 * optabs.def (acosh_optab): New.
601 (asinh_optab): Ditto.
602 (atanh_optab): Ditto.
603 * config/i386/i386-protos.h (ix86_emit_i387_asinh): New prototype.
604 (ix86_emit_i387_acosh): Ditto.
605 (ix86_emit_i387_atanh): Ditto.
606 * config/i386/i386.c (ix86_emit_i387_asinh): New function.
607 (ix86_emit_i387_acosh): Ditto.
608 (ix86_emit_i387_atanh): Ditto.
609 * config/i386/i386.md (asinhxf2): New expander.
610 (asinh<mode>2): Ditto.
612 (acosh<mode>2): Ditto.
614 (atanh<mode>2): Ditto.
616 2018-12-17 David Edelsohn <dje.gcc@gmail.com>
618 * config.gcc (powerpc-ibm-aix6.*): Delete extra_headers.
619 (powerpc-ibm-aix7.1.*): Same.
620 (powerpc-ibm-aix[789].*): Same.
622 2018-12-17 H.J. Lu <hongjiu.lu@intel.com>
625 * dwarf2out.c (find_AT_string_in_table): Add insert argument
626 defaulting to INSERT and replace INSERT.
627 (find_AT_string): Likewise.
628 (output_macinfo_op): Pass NO_INSERT to find_AT_string.
630 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
632 * coverage.c (struct conts_entry): Add n_counts.
633 (remap_counts_file): Record number of ocunts.
634 (get_coverage_counts): Verify that counts match.
635 * coverage.h (get_coverage_counts): Update prototype.
636 * profile.c (get_exec_counts. compute_value_histograms): Add
639 2018-12-17 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
641 PR rtl-optimization/88253
642 * combine.c (combine_simplify_rtx): Test for side-effects before
643 substituting by zero.
645 2018-12-17 Richard Sandiford <richard.sandiford@arm.com>
647 * doc/invoke.texi (-fversion-loops-for-strides): Document
648 (loop-versioning-group-size, loop-versioning-max-inner-insns)
649 (loop-versioning-max-outer-insns): Document new --params.
650 * Makefile.in (OBJS): Add gimple-loop-versioning.o.
651 * common.opt (fversion-loops-for-strides): New option.
652 * opts.c (default_options_table): Enable fversion-loops-for-strides
654 * params.def (PARAM_LOOP_VERSIONING_GROUP_SIZE)
655 (PARAM_LOOP_VERSIONING_MAX_INNER_INSNS)
656 (PARAM_LOOP_VERSIONING_MAX_OUTER_INSNS): New parameters.
657 * passes.def: Add pass_loop_versioning.
658 * timevar.def (TV_LOOP_VERSIONING): New time variable.
659 * tree-ssa-propagate.h
660 (substitute_and_fold_engine::substitute_and_fold): Add an optional
662 * tree-ssa-propagate.c
663 (substitute_and_fold_engine::substitute_and_fold): Likewise.
664 When passed, only walk blocks dominated by that block.
665 * tree-vrp.h (range_includes_p): Declare.
666 (range_includes_zero_p): Turn into an inline wrapper around
668 * tree-vrp.c (range_includes_p): New function, generalizing...
669 (range_includes_zero_p): ...this.
670 * tree-pass.h (make_pass_loop_versioning): Declare.
671 * gimple-loop-versioning.cc: New file.
673 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
675 * ipa-fnsummary.c (remap_edge_change_prob): Do not ICE when changes
678 2018-12-15 H.J. Lu <hongjiu.lu@intel.com>
681 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Revert
684 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
686 * ipa-fnsummary.c (analyze_function_body): Do not loeak conds and
688 (ipa_fn_summary_generate): Add prevails parameter; do not allocate
689 data when symbol is not prevailing.
690 (inline_read_section): Likewise.
692 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
694 * cgraph.h (cgraph_node): Add predicate prevailing_p.
695 (cgraph_edge): Add predicate possible_call_in_translation_unit_p.
696 * ipa-prop.c (ipa_write_jump_function): Optimize streaming of ADDR_EXPR.
697 (ipa_read_jump_function): Add prevails parameter; optimize streaming.
698 (ipa_read_edge_info): Break out from ...
699 (ipa_read_node_info): ... here; optimize streaming.
700 * cgraph.c (cgraph_edge::possibly_call_in_translation_unit_p): New
703 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
705 * ipa-utils.c (ipa_merge_profiles): Do no merging when source function
708 2018-12-15 Jakub Jelinek <jakub@redhat.com>
710 PR tree-optimization/88464
712 * tree-vect-stmts.c (vect_build_gather_load_calls): For NARROWING
713 and mask with integral masktype, don't try to permute mask vectors,
714 instead emit VEC_UNPACK_{LO,HI}_EXPR. Fix up NOP_EXPR operand.
715 (vectorizable_store): Handle masked scatters with decl and integral
717 (permute_vec_elements): Allow scalar_dest to be NULL.
718 * config/i386/i386.c (ix86_get_builtin)
719 <case IX86_BUILTIN_GATHER3ALTDIV16SF>: Use lowpart_subreg for masks.
720 <case IX86_BUILTIN_GATHER3ALTDIV8SF>: Don't assume mask and src have
723 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
725 * ipa.c (cgraph_build_static_cdtor_1): Add OPTIMIZATION and TARGET
727 (cgraph_build_static_cdtor): Update.
728 (build_cdtor): Use OPTIMIZATION and TARGET of the first real cdtor
731 2018-12-15 Alan Modra <amodra@gmail.com>
733 * config/rs6000/rs6000.c (generate_set_vrsave, rs6000_emit_savres_rtx),
734 (rs6000_emit_prologue, rs6000_call_aix, rs6000_call_sysv),
735 (rs6000_call_darwin_1): Use gen_hard_reg_clobber.
737 2018-12-15 Jakub Jelinek <jakub@redhat.com>
740 * config/i386/sse.md (UNSPEC_SFIXUPIMM): New unspec enumerator.
741 (avx512f_sfixupimm<mode><mask_name><round_saeonly_name>): Use it
742 instead of UNSPEC_FIXUPIMM.
744 PR rtl-optimization/88478
745 * cselib.c (cselib_record_sets): Move sets[i].src_elt tests
746 after REG_P (dest) test.
748 2018-12-14 Martin Sebor <msebor@redhat.com>
750 PR tree-optimization/88372
751 * calls.c (maybe_warn_alloc_args_overflow): Handle function pointers.
752 * tree-object-size.c (alloc_object_size): Same. Simplify.
753 * doc/extend.texi (Object Size Checking): Update.
754 (Other Builtins): Add __builtin_object_size.
755 (Common Type Attributes): Add alloc_size.
756 (Common Variable Attributes): Ditto.
758 2018-12-14 Martin Sebor <msebor@redhat.com>
760 PR rtl-optimization/87096
761 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Avoid
762 folding calls whose bound may exceed INT_MAX. Diagnose bound ranges
763 that exceed the limit.
765 2018-12-14 Martin Sebor <msebor@redhat.com>
768 * doc/extend.texi (attribute const, pure): Clarify.
770 2018-12-14 H.J. Lu <hongjiu.lu@intel.com>
772 * config/i386/i386.c (rest_of_insert_endbranch): Insert ENDBR
773 at the function entry only when -mmanual-endbr isn't used or
774 there is cf_check function attribute.
775 (ix86_attribute_table): Add cf_check.
776 * config/i386/i386.opt: Add -mmanual-endbr.
777 * doc/extend.texi: Document cf_check attribute.
778 * doc/invoke.texi: Document -mmanual-endbr.
780 2018-12-14 Thomas Schwinge <thomas@codesourcery.com>
781 Cesar Philippidis <cesar@codesourcery.com>
783 * omp-offload.c (inform_oacc_loop): New function.
784 (execute_oacc_device_lower): Use it to display loop parallelism.
786 2018-12-14 Jakub Jelinek <jakub@redhat.com>
790 * expr.h (categorize_ctor_elements): Add p_unique_nz_elts argument.
791 * expr.c (categorize_ctor_elements_1): Likewise. Compute it like
792 p_nz_elts, except don't multiply it by mult. Adjust recursive call.
793 Fix up COMPLEX_CST handling.
794 (categorize_ctor_elements): Add p_unique_nz_elts argument, initialize
795 it and pass it through to categorize_ctor_elements_1.
796 (mostly_zeros_p, all_zeros_p): Adjust categorize_ctor_elements callers.
797 * gimplify.c (gimplify_init_constructor): Likewise. Don't force
798 ctor into readonly data section if num_unique_nonzero_elements is
799 smaller or equal to 1/8 of num_nonzero_elements and size is >= 64
802 2018-12-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
804 * config/arm/arm.md (arm_movdi): Split if -mslow-flash-data and
805 source is a constant that would be loaded by literal pool.
806 (movsf expander): Generate a no_literal_pool_sf_immediate insn if
807 -mslow-flash-data is present, targeting hardfloat ABI and source is a
808 float constant that cannot be loaded via vmov.
809 (movdf expander): Likewise but generate a no_literal_pool_df_immediate
811 (arm_movsf_soft_insn): Split if -mslow-flash-data and source is a
812 float constant that would be loaded by literal pool.
813 (softfloat constant movsf splitter): Splitter for the above case.
814 (movdf_soft_insn): Split if -mslow-flash-data and source is a float
815 constant that would be loaded by literal pool.
816 (softfloat constant movdf splitter): Splitter for the above case.
817 * config/arm/constraints.md (Pz): Document existing constraint.
818 (Ha): Define constraint.
820 * config/arm/predicates.md (hard_sf_operand): New predicate.
821 (hard_df_operand): Likewise.
822 * config/arm/thumb2.md (thumb2_movsi_insn): Split if
823 -mslow-flash-data and constant would be loaded by literal pool.
824 * constant/arm/vfp.md (thumb2_movsi_vfp): Likewise and disable constant
825 load in VFP register.
826 (movdi_vfp): Likewise.
827 (thumb2_movsf_vfp): Use hard_sf_operand as predicate for source to
828 prevent match for a constant load if -mslow-flash-data and constant
829 cannot be loaded via vmov. Adapt constraint accordingly by
830 using Ha instead of E for generic floating-point constant load.
831 (thumb2_movdf_vfp): Likewise using hard_df_operand predicate instead.
832 (no_literal_pool_df_immediate): Add a clobber to use as the
833 intermediate general purpose register and also enable it after reload
834 but disable it constant is a valid FP constant. Add constraints and
835 generate a DI intermediate load rather than 2 SI loads.
836 (no_literal_pool_sf_immediate): Add a clobber to use as the
837 intermediate general purpose register and also enable it after
840 2018-12-14 Uros Bizjak <ubizjak@gmail.com>
843 * internal-fn.def (HYPOT): New.
844 * optabs.def (hypot_optab): New.
845 * config/i386/i386.md (hypot<mode>3): New expander.
847 2018-12-14 Jeff Law <law@redhat.com>
849 * target.def (post_cfi_startproc): Fix text.
851 2018-12-14 Sam Tebbs <sam.tebbs@arm.com>
853 * doc/tm.texi (TARGET_ASM_POST_CFI_STARTPROC): Define.
854 * doc/tm.texi.in (TARGET_ASM_POST_CFI_STARTPROC): Define.
855 * dwarf2out.c (dwarf2out_do_cfi_startproc): Trigger the hook.
856 * hooks.c (hook_void_FILEptr_tree): Define.
857 * hooks.h (hook_void_FILEptr_tree): Define.
858 * target.def (post_cfi_startproc): Define.
860 2018-12-14 Tom de Vries <tdevries@suse.de>
862 * lto-cgraph.c (verify_node_partition): New function.
863 (input_overwrite_node, input_varpool_node): Use verify_node_partition.
865 2018-12-14 H.J. Lu <hongjiu.lu@intel.com>
868 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
869 use get_frame_size ().
871 2018-12-14 Andrew Stubbs <ams@codesourcery.com>
873 * gcc/lra-int.h (lra_register_new_scratch_op): Add third parameter.
874 * gcc/lra-remat.c (update_scratch_ops): Pass icode to
875 lra_register_new_scratch_op.
876 * gcc/lra.c (struct sloc): Add icode field.
877 (lra_register_new_scratch_op): Add icode parameter.
878 Use icode to skip insns that have changed beyond recognition.
880 2018-12-14 Eric Botcazou <ebotcazou@adacore.com>
882 * dwarf2out.c (analyze_discr_in_predicate): Simplify.
883 (analyze_variants_discr): Deal with naked boolean discriminants.
885 2018-12-14 Claudiu Zissulescu <claziss@synopsys.com>
887 * config/arc/arc.c (arc_restore_callee_milli) Don't clobber off
890 2018-12-14 Claudiu Zissulescu <claziss@synopsys.com>
892 * config/arc/arc.h (reg_class): Add SIBCALL_REGS.
894 2018-12-14 Richard Biener <rguenther@suse.de>
896 * gimple-ssa-split-paths.c (is_feasible_trace): Remove
897 duplicated code block.
899 2018-12-14 Alan Modra <amodra@gmail.com>
901 PR rtl-optimization/88311
902 * config/rs6000/rs6000.c (rs6000_call_sysv): Do not mask cookie.
903 (rs6000_sibcall_sysv): Likewise.
905 2018-12-14 Segher Boessenkool <segher@kernel.crashing.org>
907 PR rtl-optimization/88001
908 * function.c (match_asm_constraints_1): Don't invalidly share RTL.
910 2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
912 * auto-profile.c (afdo_annotate_cfg): Call update_max_bb_count even
913 if autofdo counts are all zeros.
915 2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
917 * auto-profile.c (afdo_indirect_call): Skip generating histogram
918 value for internal call.
920 2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
922 * auto-profile.c (AFDO_EINFO): New macro.
923 (class edge_info): New class.
924 (is_edge_annotated, set_edge_annotated): Delete.
925 (afdo_propagate_edge, afdo_propagate_circuit, afdo_propagate): Remove
926 parameter. Adjust edge count computation and annotation using class
928 (afdo_calculate_branch_prob, afdo_annotate_cfg): Likewise.
930 2018-12-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
932 * ipa-cp.c (print_all_lattices): Skip cp clones.
934 * ipa-cp.c: Fix various comment typos.
936 2018-12-13 Jakub Jelinek <jakub@redhat.com>
938 PR tree-optimization/88444
939 * tree-inline.c (fold_marked_statements): Iterate up to
940 last_basic_block_for_fn rather than n_basic_blocks_for_fn.
942 PR rtl-optimization/88470
943 * cfgcleanup.c (outgoing_edges_match): If the function is
944 shrink-wrapped and bb1 ends with a JUMP_INSN with a single fake
945 edge to EXIT, return false.
947 2018-12-13 Martin Sebor <msebor@redhat.com>
949 * doc/extend.texi: Consistently use @code for const and volatile
950 qualifiers, the true and false constants, and asm statements.
952 2018-12-13 Vladimir Makarov <vmakarov@redhat.com>
954 PR rtl-optimization/88414
955 * lra-int.h (lra_asm_error_p): New.
956 * lra-assigns.c (lra_assign): Check lra_asm_error_p for checking
957 call crossed pseudo assignment correctness.
958 (lra_split_hard_reg_for): Set up lra_asm_error_p.
959 * lra-constraints.c (curr_insn_transform): Ditto.
960 * lra.c (lra_asm_error_p): New.
961 (lra): Reset lra_asm_error_p.
963 2018-12-13 Jakub Jelinek <jakub@redhat.com>
965 PR rtl-optimization/88416
966 * valtrack.c (cleanup_auto_inc_dec): Handle pre/post-inc/dec/modify
967 even if !AUTO_INC_DEC.
969 2018-12-13 David Edelsohn <dje.gcc@gmail.com>
971 * config/rs6000/rs6000.c (rs6000_function_arg): Ensure type is
973 (rs6000_arg_partial_bytes): Same.
975 2018-12-13 Jason Merrill <jason@redhat.com>
977 * gdbinit.in (pp): New macro.
980 2018-12-13 Jakub Jelinek <jakub@redhat.com>
982 PR tree-optimization/88464
983 * tree-vect-stmts.c (vect_build_gather_load_calls): Handle INTEGER_TYPE
984 masktype if mask is non-NULL.
985 (vectorizable_load): Don't reject masked gather loads if masktype
986 in the decl is INTEGER_TYPE.
988 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
990 * config/s390/s390-builtins.def (s390_vec_double_s64): Map to
991 s390_vec_double_s64 instead of s390_vcdgb.
992 (s390_vec_double_u64): Map to s390_vec_double_u64 instead of
995 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
997 * config/s390/vx-builtins.md ("vec_ctd_s64", "vec_ctd_u64")
998 ("vec_ctsl", "vec_ctul"): Replace 0 with VEC_NOINEXACT.
999 ("vec_double_s64", "vec_double_u64"): Replace 4 with VEC_INEXACT.
1001 2018-12-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1003 * doc/invoke.texi (-msve-vector-bits): Clarify -msve-vector-bits=128
1006 2018-12-13 Wei Xiao <wei3.xiao@intel.com>
1008 * common/config/i386/i386-common.c (processor_names): Add cascadelake.
1009 (processor_alias_table): Add cascadelake.
1010 * config.gcc: Add -march=cascadelake.
1011 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1013 * config/i386/i386.c (Add m_CASCADELAKE): New.
1014 (processor_cost_table): Add cascadelake.
1015 (get_builtin_code_for_version): Handle cascadelake.
1016 * config/i386/i386.h (TARGET_CASCADELAKE, PROCESSOR_CASCADELAKE): New.
1017 (PTA_CASCADELAKE): Ditto.
1018 * doc/invoke.texi: Add -march=cascadelake.
1020 2018-12-13 Jakub Jelinek <jakub@redhat.com>
1023 * config/i386/i386.md (*movdi_internal, *movsi_internal,
1024 *movhi_internal, *movqi_internal): Add alternative(s) to load
1025 0 or -1 into k registers using kxor or kxnoq instructions.
1028 * config/i386/sse.md (VI1248_AVX512VLBW, AVX512ZEXTMASK): New
1030 (<avx512>_testm<mode>3<mask_scalar_merge_name>,
1031 <avx512>_testnm<mode>3<mask_scalar_merge_name>): Merge patterns
1032 with VI12_AVX512VL and VI48_AVX512VL iterators into ones with
1033 VI1248_AVX512VLBW iterator.
1034 (*<avx512>_testm<VI1248_AVX512VLBW:mode>3_zext,
1035 *<avx512>_testm<VI1248_AVX512VLBW:mode>3_zext_mask,
1036 *<avx512>_testnm<VI1248_AVX512VLBW:mode>3_zext,
1037 *<avx512>_testnm<VI1248_AVX512VLBW:mode>3_zext_mask): New
1041 * config/i386/i386.md (*zero_extendsidi2, zero_extend<mode>di2,
1042 *zero_extend<mode>si2, *zero_extendqihi2): Add =*k, *km alternatives.
1044 2018-12-12 Tom de Vries <tdevries@suse.de>
1045 Jakub Jelinek <jakub@redhat.com>
1047 * omp-builtins.def (BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1048 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1049 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1050 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1051 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1052 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME): Fix up
1053 function types - remove one argument.
1055 2018-12-12 Martin Sebor <msebor@redhat.com>
1057 * doc/extend.texi (attribute copy): Fix typos.
1059 2018-12-12 Martin Sebor <msebor@redhat.com>
1061 * doc/extend.texi (Function Attributes): Clarify C++ aspects.
1062 (Variable Attributes): Same.
1063 (Type Attributes): Same.
1065 2018-12-12 Olivier Hainque <hainque@adacore.com>
1067 * config/aarch64/aarch64.c (aarch64_override_options): Once arch,
1068 cpu and tune were validated, insert SUBTARGET_OVERRIDE_OPTIONS if
1071 2018-12-12 Olivier Hainque <hainque@adacore.com>
1073 * config/aarch64/aarch64.c (PROBE_STACK_FIRST_REG) : Redefine as
1074 R9_REGNUM instead of 9.
1075 (PROBE_STACK_SECOND_REG): Redefine as R10_REGNUM instead of 10.
1077 2018-12-12 Eric Botcazou <ebotcazou@adacore.com>
1080 * config/sparc/sparc.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1081 (speculation_barrier): New instruction for V9.
1083 2018-12-12 Segher Boessenkool <segher@kernel.crashing.org>
1084 Iain Sandoe <iain@sandoe.co.uk>
1087 * config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
1088 unless it has been used.
1089 (first_reg_to_save): Remove dead code.
1091 2018-12-12 Iain Sandoe <iain@sandoe.co.uk>
1093 * config/rs6000/rs6000-protos.h (rs6000_call_darwin): New.
1094 (rs6000_sibcall_darwin): New. (macho_call_template): Remove.
1095 * config/rs6000/rs6000.c (get_prev_label): Forward declaration.
1096 (rs6000_call_template_1): Handle Darwin.
1097 (macho_call_template): Remove.
1098 (rs6000_call_sysv): Remove handling for Darwin.
1099 (rs6000_call_darwin_1, rs6000_call_darwin): New
1100 (rs6000_sibcall_darwin): New.
1101 * config/rs6000/rs6000.md (define_expand “call”): Handle Darwin
1102 with its own expander. (define_expand “call_value”): Likewise.
1103 (define_expand “sibcall”): Likewise.
1104 (define_expand “sibcall_value”): Likewise.
1105 (call_nonlocal_sysv): Remove Darwin special-casing.
1106 (call_value_nonlocal_sysv): Likewise.
1108 2018-12-12 Iain Sandoe <iain@sandoe.co.uk>
1110 * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64): Remove.
1111 (call_nonlocal_darwin64): Remove.
1112 (call_value_indirect_nonlocal_darwin64): Remove.
1113 (call_value_nonlocal_darwin64): Remove.
1114 * config/rs6000/rs6000.c (rs6000_call_template_1): Handle Darwin with
1115 the same asm output as AIX/ELFv2. (rs6000_call_sysv): Preserve the
1116 CALL_LONG flag when needed for Darwin.
1117 * config/rs6000/rs6000.md (define expand “call”): Expand Darwin as
1119 (define_expand “call_value”): Likewise.
1120 (define_expand “sibcall”): Likewise.
1121 (define_expand “sibcall_value”): Likewise.
1122 (call_indirect_nonlocal_sysv): Mark the clobber mode P.
1123 (call_nonlocal_sysv): Likewise.
1124 (call_nonlocal_sysv_secure): Likewise.
1125 (call_value_indirect_nonlocal_sysv): Likewise.
1126 (call_value_nonlocal_sysv): Likewise.
1127 (call_value_nonlocal_sysv_secure): Likewise.
1128 (call_local64): Mark the clobber DI.
1129 (call_value_local64): Likewise.
1131 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1133 PR tree-optimization/88444
1134 * tree-vrp.c (register_edge_assert_for_2): Only register assertions
1135 for conversions if rhs1 is a SSA_NAME.
1137 2018-12-11 Dimitar Dimitrov <dimitar@dinux.eu>
1139 * cfgexpand.c (asm_clobber_reg_is_valid): Also produce
1140 error when stack pointer is clobbered.
1141 (expand_asm_stmt): Refactor clobber check in separate function.
1143 2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
1145 * config/rs6000/vxworks.h (RS6000_STARTING_FRAME_OFFSET): Define,
1146 accounting for STACK_BOUNDARY 128.
1147 (STACK_DYNAMIC_OFFSET): Likewise.
1149 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1152 * config/i386/i386.md (*x86_mov<SWI48:mode>cc_0_m1_neg_leu<SWI:mode>):
1153 New define_insn_and_split.
1155 2018-12-11 Richard Biener <rguenther@suse.de>
1159 * gimple.c (gimple_assign_set_rhs_with_ops): Revert previous
1161 * tree-complex.c (update_complex_assignment): Properly transfer
1162 or clean EH info around gimple_assign_set_rhs_with_ops.
1164 2018-12-11 Richard Earnshaw <rearnsha@arm.com>
1167 * config/aarch64/iterators.md (sizem1): Add sizes for SFmode and DFmode.
1168 (Vbtype): Add SFmode mapping.
1169 * config/aarch64/aarch64.md (copysigndf3, copysignsf3): Delete.
1170 (copysign<GPF:mode>3): New expand pattern.
1171 (copysign<GPF:mode>3_insn): New insn pattern.
1173 2018-12-11 Richard Biener <rguenther@suse.de>
1175 * ccmp.c (ccmp_candidate_p): Use GIMPLE API properly.
1177 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1180 * doc/sourcebuild.texi (lto_incremental): Document new effective
1183 2018-12-11 Segher Boessenkool <segher@kernel.crashing.org>
1186 * config/rs6000/rs6000.c (rs6000_expand_zeroop_builtin): Use
1187 rs6000_isa_flags instead of rs6000_isa_flags_explicit to decide
1188 whether soft float is enabled.
1189 (rs6000_expand_mtfsb_builtin): Ditto.
1190 (rs6000_expand_set_fpscr_rn_builtin): Ditto.
1191 (rs6000_expand_set_fpscr_drn_builtin): Ditto.
1193 2018-12-10 Jeff Law <law@redhat.com>
1195 PR tree-optimization/80520
1196 * gimple-ssa-split-paths.c (is_feasible_trace): Recognize half
1197 diamonds that are likely if convertable.
1199 2018-12-10 Martin Sebor <msebor@redhat.com>
1201 PR tree-optimization/86196
1202 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
1203 base size only of arrays.
1205 2018-12-10 Segher Boessenkool <segher@kernel.crashing.org>
1207 * config.gcc (Obsolete configurations): Delete powerpc*-*-*spe*.
1208 (Unsupported targets): Add powerpc*-*-*spe*.
1209 (powerpc*-*-*spe*): Delete.
1210 (powerpc-*-eabispe*): Delete.
1211 (powerpc-*-rtems*spe*): Delete.
1212 (powerpc*-*-linux*spe*): Delete.
1213 (powerpc*-*-linux*): Do not handle the linux*spe* targets.
1214 (powerpc-wrs-vxworks*spe): Delete.
1215 (with_cpu setting code): Delete powerpc*-*-*spe* handling.
1216 * config.host (target powerpc*-*-*spe*): Delete.
1217 * doc/invoke.texi (PowerPC SPE Options): Delete.
1218 (PowerPC SPE Options): Delete.
1219 * config/powerpcspe: Delete.
1221 2018-12-10 Uros Bizjak <ubizjak@gmail.com>
1224 * config/i386/i386.c (ix86_expand_sse_cmp): For vector modes,
1225 check operand 1 with vector_operand predicate.
1226 (ix86_expand_sse_movcc): For vector modes, check op_true with
1227 vector_operand, not nonimmediate_operand.
1229 2018-12-10 Richard Biener <rguenther@suse.de>
1231 * tree-affine.c (tree_to_aff_combination): Remove unreachable
1233 (aff_combination_expand): Cache on SSA names, not possibly
1234 on conversion trees. Avoid expanding cases we do not handle.
1236 2018-12-10 Richard Biener <rguenther@suse.de>
1238 PR tree-optimization/88427
1239 * vr-values.c (vr_values::extract_range_from_phi_node):
1240 Handle symbolic ranges conservatively when trying to drop
1243 2018-12-10 Martin Jambor <mjambor@suse.cz>
1246 * ipa-prop.c (determine_locally_known_aggregate_parts): Make sure
1247 we check pointers against pointers.
1249 2018-12-10 Richard Biener <rguenther@suse.de>
1252 * gimple.c (gimple_assign_set_rhs_with_ops): Transfer EH
1253 info to a newly allocated stmt.
1255 2018-12-10 Jerome Lambourg <lambourg@adacore.com>
1257 * config/vxworksae.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): Define.
1259 2018-12-10 Fredrik Nyström <fredrik@lysator.liu.se>
1262 * config/sol2.h: Only use libgcc-unwind.map if
1263 ENABLE_SHARED_LIBGCC.
1265 2018-12-10 Bin Cheng <bin.cheng@linux.alibaba.com>
1267 * auto-profile.c (afdo_calculate_branch_prob): Convert profile_count
1268 to afdo precision quality.
1269 (afdo_callsite_hot_enough_for_early_inline): Likewise.
1270 (afdo_annotate_cfg): Set profile_count for exit basic block.
1272 2018-12-10 Bin Cheng <bin.cheng@linux.alibaba.com>
1274 * auto-profile.c (string_table::get_index_by_decl)
1275 (function_instance::get_function_instance_by_decl): Avoid infinite
1276 recursion by using DECL_FROM_INLINE.
1278 2018-12-09 John David Anglin <danglin@gcc.gnu.org>
1280 * config.gcc (hppa*-*-linux*): Add pa/t-pa to tmake_file. Define
1282 * config/pa/pa-protos.h (pa_d_target_versions): New prototype.
1283 * config/pa/pa.h (TARGET_D_CPU_VERSIONS): Define.
1284 * config/pa/pa-d.c: New file.
1285 * config/pa/t-pa: New file.
1287 2018-12-08 Bin Cheng <bin.cheng@linux.alibaba.com>
1289 * ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for
1292 2018-12-08 Jakub Jelinek <jakub@redhat.com>
1295 * tree-nested.c (convert_local_reference_stmt): Handle clobbers where
1296 lhs is not a decl normally, don't call use_pointer_in_frame on that
1299 2018-12-08 Eric Botcazou <ebotcazou@adacore.com>
1301 PR rtl-optimization/88390
1302 * dwarf2cfi.c (struct dw_cfi_row): Add window_save field.
1303 (cfi_row_equal_p): Compare it.
1304 (dwarf2out_frame_debug_cfa_window_save): Add FAKE parameter.
1305 If FAKE is false, set window_save of the current row.
1306 (dwarf2out_frame_debug) <REG_CFA_TOGGLE_RA_MANGLE>: Call above
1307 function with FAKE parameter set to true.
1308 <REG_CFA_WINDOW_SAVE>: Likewise but with FAKE parameter set to false.
1309 (change_cfi_row): Emit a DW_CFA_GNU_window_save if necessary.
1311 2018-12-07 Peter Bergner <bergner@linux.ibm.com>
1314 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
1315 -mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
1316 Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
1317 * doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
1318 require -mlong-double-128.
1320 2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1322 * config/aarch64/aarch64.c (aarch64_tuning_override_functions): Add
1324 (aarch64_parse_sve_width_string): Define.
1326 2018-12-07 Jeff Law <law@redhat.com>
1329 * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Add
1330 m_update_global_ranges member. Add corresponding argument to ctor.
1331 * gimple-ssa-evrp-analyze.c
1332 (evrp_range_analyzer::evrp_range_analyzer): Add new argument and
1333 initialize m_update_global_ranges.
1334 (evrp_range_analyzer::set_ssa_range_info): Assert that we are
1335 updating global ranges.
1336 (evrp_range_analyzer::record_ranges_from_incoming_edge): Only
1337 update global ranges if explicitly requested.
1338 (evrp_range_analyzer::record_ranges_from_phis): Similarly.
1339 (evrp_range_analyzer::record_ranges_from_stmt): Similarly.
1340 * gimple-ssa-evrp.c (evrp_dom_walker): Pass new argument to
1341 evrp_range_analyzer ctor.
1342 * gimple-ssa-sprintf.c (sprintf_dom_walker): Similarly.
1343 * tree-ssa-dom.c (dom_opt_dom_walker): Similarly.
1345 2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1347 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum):
1348 Add SVE_NOT_IMPLEMENTED value.
1349 * config/aarch64/aarch64-protos.h (struct tune_params): Add sve_width
1351 * config/aarch64/aarch64.c (generic_tunings,cortexa35_tunings,
1352 cortexa53_tunings, cortexa57_tunings, cortexa72_tunings,
1353 cortexa73_tunings, exynosm1_tunings, thunderx_tunings,
1354 thunderx_tunings, tsv110_tunings, xgene1_tunings, qdf24xx_tunings,
1355 saphira_tunings, thunderx2t99_tunings, emag_tunings):
1357 (aarch64_estimated_poly_value): Define.
1358 (TARGET_ESTIMATED_POLY_VALUE): Define.
1360 2018-12-07 Paul A. Clarke <pc@us.ibm.com>
1363 * config/rs6000/mmintrin.h (_mm_packs_pu16): Correctly use "__vector".
1365 2018-12-07 Vladimir Makarov <vmakarov@redhat.com>
1367 PR rtl-optimization/88349
1368 * ira-costs.c (record_operand_costs): Check bigger reg class on
1371 2018-12-07 Richard Sandiford <richard.sandiford@arm.com>
1373 * config/aarch64/aarch64-sve.md (*mul<mode>3, *v<optab><mode>3):
1374 Split the patterns after reload if we don't need the predicate
1376 (*post_ra_mul<mode>3, *post_ra_v<optab><mode>3): New patterns.
1378 2018-12-07 Richard Sandiford <richard.sandiford@arm.com>
1380 * config/aarch64/iterators.md (SVE_UNPRED_FP_BINARY): New code
1382 (sve_fp_op): Handle minus and mult.
1383 * config/aarch64/aarch64-sve.md (*add<mode>3, *sub<mode>3)
1384 (*mul<mode>3): Split the patterns after reload if we don't
1385 need the predicate operand.
1386 (*post_ra_<sve_fp_op><mode>3): New pattern.
1388 2018-12-07 Bin Cheng <bin.cheng@linux.alibaba.com>
1390 * profile-count.h (profile_count::oeprator>=): Fix typo by inverting
1391 return condition when *this is precise zero.
1393 2018-12-07 Jakub Jelinek <jakub@redhat.com>
1396 * final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
1397 for functions with naked attribute.
1400 * tree-vrp.c (extract_range_from_binary_expr): For POINTER_PLUS_EXPR
1401 with -fno-delete-null-pointer-checks, set_nonnull only if the pointer
1402 is non-NULL and offset is known to have most significant bit clear.
1403 * vr-values.c (vr_values::vrp_stmt_computes_nonzero): For ADDR_EXPR
1404 of MEM_EXPR, return true if the MEM_EXPR has non-zero offset with
1405 most significant bit clear. If offset does have most significant bit
1406 set and -fno-delete-null-pointer-checks, don't return true even if
1407 the base pointer is non-NULL.
1409 2018-12-06 Alexandre Oliva <aoliva@redhat.com>
1411 * cselib.c (cselib_record_sets): Skip strict low part sets
1414 2018-12-06 Paul A. Clarke <pc@us.ibm.com>
1417 * config/rs6000/smmintrin.h: New file.
1418 * config.gcc: Add smmintrin.h to extra_headers for powerpc*-*-*.
1420 2018-12-06 Paul A. Clarke <pc@us.ibm.com>
1423 * config/rs6000/mmintrin.h (_mm_unpackhi_pi8): Fix for big-endian.
1424 (_mm_unpacklo_pi8): Likewise.
1425 (_mm_mulhi_pi16): Likewise.
1426 (_mm_packs_pi16): Fix for big-endian. Use preferred API.
1427 (_mm_packs_pi32): Likewise.
1428 (_mm_packs_pu16): Likewise.
1429 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix for big-endian.
1430 (_mm_cvtss_si64): Likewise.
1431 (_mm_cvtpi32x2_ps): Likewise.
1432 (_mm_shuffle_ps): Likewise.
1433 (_mm_movemask_pi8): Likewise.
1434 (_mm_mulhi_pu16): Likewise.
1435 (_mm_sad_pu8): Likewise.
1436 (_mm_sad_pu8): Likewise.
1437 (_mm_cvtpu16_ps): Fix for big-endian. Use preferred API.
1438 (_mm_cvtpu8_ps): Likewise.
1439 (_mm_movemask_ps): Better #else case for big-endian (no functional
1441 (_mm_shuffle_pi16): Likewise.
1442 * config/rs6000/emmintrin.h (_mm_movemask_pd): Fix for big-endian.
1443 Better #else case for big-endian (no functional change).
1444 (_mm_movemask_epi8): Likewise.
1445 (_mm_shufflehi_epi16): Likewise.
1446 (_mm_shufflelo_epi16): Likewise.
1447 (_mm_shuffle_epi32): Likewise.
1448 (_mm_mul_epu32): Fix for big-endian.
1449 (_mm_bsrli_si128): Likewise.
1450 (_mm_cvtps_pd): Better #else case for big endian.
1451 (_mm_mulhi_epi16): Likewise.
1452 (_mm_mul_epu32): Likewise.
1453 (_mm_slli_si128): Likewise.
1454 (_mm_sll_epi16): Likewise.
1455 (_mm_sll_epi32): Likewise.
1456 (_mm_sra_epi16): Likewise.
1457 (_mm_sra_epi32): Likewise.
1458 (_mm_srl_epi16): Likewise.
1459 (_mm_srl_epi32): Likewise.
1460 (_mm_mulhi_epu16): Likewise.
1461 (_mm_sad_epu8): Likewise.
1462 * config/rs6000/pmmintrin.h (_mm_hadd_ps): Fix for big-endian.
1463 (_mm_sub_ps): Likewise.
1464 * config/rs6000/mmintrin.h (_mm_cmpeq_pi8): Fix for 32-bit mode.
1465 * gcc/config/rs6000/tmmintrin.h (_mm_alignr_epi8): Use ENDIAN
1466 macros consistently (no functional changes).
1467 (_mm_alignr_pi8): Likewise.
1469 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
1472 * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the
1474 * config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New.
1476 2018-12-06 Vladimir Makarov <vmakarov@redhat.com>
1479 * ira.c (ira_init_register_move_cost): Use info from
1480 hard_regno_mode_ok instead of contains_reg_of_mode.
1481 * ira-costs.c (contains_reg_of_mode): Don't use cost from bigger
1482 hard register class for some fixed hard registers.
1484 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1486 * doc/extend.texi (Using Assembly Language with C): Document asm inline.
1487 (Size of an asm): Fix typo. Document asm inline.
1488 * gimple-pretty-print.c (dump_gimple_asm): Handle asm inline.
1489 * gimple.h (enum gf_mask): Add GF_ASM_INLINE.
1490 (gimple_asm_set_volatile): Fix typo.
1491 (gimple_asm_inline_p): New.
1492 (gimple_asm_set_inline): New.
1493 * gimplify.c (gimplify_asm_expr): Propagate the asm inline flag from
1495 * ipa-icf-gimple.c (func_checker::compare_gimple_asm): Compare the
1496 gimple_asm_inline_p flag, too.
1497 * tree-core.h (tree_base): Document that protected_flag is ASM_INLINE_P
1499 * tree-inline.c (estimate_num_insns): If gimple_asm_inline_p return
1500 a minimum size for an asm.
1501 * tree.h (ASM_INLINE_P): New.
1503 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1506 * doc/extend.texi (Basic Asm): Update grammar.
1507 (Extended Asm): Update grammar.
1509 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
1512 * config/i386/darwin.h (STACK_BOUNDARY): Remove macro.
1513 * config/i386/i386.c (ix86_compute_frame_layout): Ensure at least 128b
1514 stack alignment in non-leaf functions.
1516 2018-12-06 Jakub Jelinek <jakub@redhat.com>
1519 * config/aarch64/aarch64.c (aarch64_print_address_internal): Don't
1520 call output_operand_lossage on VOIDmode CONST_INTs. After
1521 output_operand_lossage do return false.
1523 2018-12-06 Richard Biener <rguenther@suse.de>
1525 * df-problems.c (df_rd_local_compute): Use bitmap_release.
1526 (df_live_free): Likewise.
1527 (df_md_local_compute): Likewise.
1528 (df_md_free): Release df_md_scratch bitmap.
1529 * loop-invariant.c (calculate_loop_reg_pressure): Use
1531 * sched-deps.c (true_dependency_cache, output_dependency_cache,
1532 anti_dependency_cache, control_dependency_cache,
1533 spec_dependency_cache): Use bitmap instead of bitmap_head *.
1534 * sched-ebb.c (schedule_ebbs_init): Initialize non-GTY
1535 dont_calc_deps as bitmap allocated from obstack not GC.
1536 (schedule_ebbs_finish): Use bitmap_release.
1537 * sched-rgn.c (schedule_insns): Initialize non-GTY
1538 not_in_df as bitmap allocated from obstack not GC.
1540 * sel-sched.c (_forced_ebb_heads): Remove premature optimization.
1541 (sel_region_init): Allocate forced_ebb_heads.
1542 (sel_region_finish): Free forced_ebb_heads.
1544 2018-12-06 Richard Biener <rguenther@suse.de>
1546 * bitmap.c (bitmap_head::crashme): Define.
1547 * bitmap.h (bitmap_head): Add constexpr default constructor
1548 poisoning the obstack member.
1549 (bitmap_head::crashme): Declare.
1550 (bitmap_release): New function clearing a bitmap and poisoning
1552 * gengtype.c (main): Make it recognize CONSTEXPR.
1553 * lra-constraints.c (lra_inheritance): Use bitmap_release
1554 instead of bitmap_clear.
1555 * ira.c (ira): Work around class-memaccess warning.
1556 * regrename.c (create_new_chain): Likewise.
1558 2018-12-06 Jakub Jelinek <jakub@redhat.com>
1560 PR tree-optimization/85726
1561 * generic-match-head.c (optimize_successive_divisions_p): New function.
1562 * gimple-match-head.c (optimize_successive_divisions_p): Likewise.
1563 * match.pd: Don't combine successive divisions if they aren't exact
1564 and optimize_successive_divisions_p is false.
1567 * tree-nested.c (convert_nonlocal_reference_stmt): Remove clobbers
1568 for non-local automatic decls.
1570 2018-12-05 David Edelsohn <dje.gcc@gmail.com>
1572 * config/rs6000/aix72.h (ASM_DEFAULT_SPEC): Match Power7 processor
1575 2018-12-05 Uros Bizjak <ubizjak@gmail.com>
1577 * dwarf2out.c (field_byte_offset): Remove
1578 #ifdef PCC_BITFIELD_TYPE_MATTERS check.
1580 2018-12-05 Richard Biener <rguenther@suse.de>
1581 Martin Sebor <msebor@redhat.com>
1584 * calls.c (get_attr_nonstring_decl): Avoid setting *REF to
1586 * gcc/gimple-low.c (lower_stmt): Fold builtin calls here.
1587 * gimplify (maybe_fold_stmt): Avoid folding builtin calls.
1589 2018-12-05 Iain Sandoe <iain@sandoe.co.uk>
1591 * configure.ac (gcc_cv_otool): Set.
1592 * configure: Regenerate.
1594 2018-12-05 Uros Bizjak <ubizjak@gmail.com>
1596 * config/i386/cygming.h (PCC_BITFIELD_TYPE_MATTERS): Remove.
1597 (GROUP_BITFIELDS_BY_ALIGN): Ditto.
1599 2018-12-05 Richard Sandiford <richard.sandiford@arm.com>
1601 PR tree-optimization/88064
1602 * tree-vect-patterns.c (vect_convert_input): Convert the result of
1603 an existing cast if it has the right width but the wrong sign.
1604 Do not test the signedness of the required result when
1605 considering whether to split an existing cast; instead split to
1606 a type with the same signedness as the source of the cast, then
1607 convert it to the opposite signedness where necessary.
1608 (vect_recog_over_widening_pattern): Handle sign changes between
1609 the final PLUS_EXPR and the RSHIFT_EXPR.
1610 (vect_recog_average_pattern): Use an unsigned operation when
1611 truncating an addition, subtraction or multiplication. Cast the
1612 result back to the "real" signedness before promoting.
1614 2018-12-05 Richard Biener <rguenther@suse.de>
1616 PR tree-optimization/86637
1617 * tree-vectorizer.c (pass_slp_vectorize::execute): Reset
1618 vect_location at the end.
1620 2018-12-05 Jakub Jelinek <jakub@redhat.com>
1622 PR tree-optimization/87360
1623 * gimple-loop-jam.c (tree_loop_unroll_and_jam): On failure to analyze
1624 data dependencies, don't return false, just continue. Formatting
1626 (merge_loop_tree, bb_prevents_fusion_p, unroll_jam_possible_p,
1627 fuse_loops): Formatting fixes.
1630 * cfgexpand.c (expand_stack_vars): If asan_vec is empty, start with
1631 aligning frame offset to ASAN_RED_ZONE_SIZE bytes.
1633 2018-12-05 Xianmiao Qu <xianmiao_qu@c-sky.com>
1635 * config.gcc (csky-*-linux-gnu*): Force .init_array support.
1637 2018-12-05 Segher Boessenkool <segher@kernel.crashing.org>
1639 * config/rs6000/rs6000.c (rs6000_function_arg): Only do the special
1640 aggregate handling on actual AIX, not on somewhat similar systems.
1641 (rs6000_arg_partial_bytes): Ditto.
1643 2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
1645 PR rtl-optimization/88317
1646 * lra-constraints.c (split_reg): Don't set up check_only_regs if
1647 we are outside the inheritance pass.
1649 2018-12-04 Jan Hubicka <hubicka@ucw.cz>
1651 * ipa-prop.c (jump_function_useful_p): New.
1652 (ipa_read_node_info): Do not allocated useless jump functions.
1654 2018-12-04 David Malcolm <dmalcolm@redhat.com>
1657 * spellcheck.c (selftest::test_suggestions): Add another assertion.
1659 2018-12-04 Martin Sebor <msebor@redhat.com>
1661 * doc/extend.texi (__builtin_has_attribute): Fix typo.
1663 2018-12-04 Jakub Jelinek <jakub@redhat.com>
1666 * config/rs6000/rs6000.c (ccr_bit): Return -1 instead of assertion
1668 (print_operand): Use REG_P instead of GET_CODE == REG.
1669 <case 'D'>: Also check CR_REGNO_P (REGNO (x)).
1670 <case 't'>: Likewise. Remove GET_MODE check.
1671 * config/rs6000/rs6000.md (scc patterns): Assert ccr_bit didn't
1674 2018-12-04 Martin Sebor <msebor@redhat.com>
1676 * doc/extend.texi (attribute aligned): Expand.
1678 2018-12-04 David Edelsohn <dje.gcc@gmail.com>
1681 * config/rs6000/rs6000.c (rs6000_function_arg): Don't pass aggregates
1683 (rs6000_arg_partial_bytes): Same.
1685 2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
1688 * ira-costs.c (exec): Try bigger class to use smaller register
1691 2018-12-04 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1694 * ipa-cp.c (create_specialized_node): Track clone counters by
1695 node assembler names.
1696 (ipcp_driver): Change type of clone_num_suffixes key to const char*.
1698 2018-12-04 Richard Biener <rguenther@suse.de>
1700 * tree-vect-loop.c (vect_transform_loop): Fix epilogue iterations
1701 for epilogue vectorization.
1703 2018-12-04 Richard Biener <rguenther@suse.de>
1705 PR tree-optimization/88301
1706 * tree-vrp.c (register_edge_assert_for_2): Fix sign-conversion
1707 issues in last commit.
1709 2018-12-04 Richard Biener <rguenther@suse.de>
1711 PR tree-optimization/88315
1712 * tree-vect-loop.c (get_initial_defs_for_reduction): Simplify
1713 and fix initialization vector for SAD and DOT_PROD SLP reductions.
1715 2018-12-03 Sandra Loosemore <sandra@codesourcery.com>
1718 * doc/extend.texi (Nonlocal gotos): New section.
1720 2018-12-03 Uros Bizjak <ubizjak@gmail.com>
1722 * config/i386/sse.md (vec_concatv2df): Change (v,xm,C)
1723 alternative to (v,vm,c).
1725 2018-12-03 Segher Boessenkool <segher@kernel.crashing.org>
1727 * gcc/config.gcc (Unsupported targets): Add powerpc*-*-linux*paired*.
1728 (powerpc*-*-linux*): Don't handle it here.
1730 2018-12-03 Jeff Law <law@redhat.com>
1732 * config/h8300/h8300.md (<code>qi3_1): Add gcc_unreachable to keep
1735 * config/h8300/h8300.md (low byte masking peepholes): Only accept
1736 nonimmediate_operand for the to-be-masked operand.
1738 2018-12-03 Richard Biener <rguenther@suse.de>
1740 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1741 allow expected function-pointer cast re-instantiation.
1743 2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
1745 * common/config/s390/s390-common.c (s390_option_init_struct):
1746 Use section anchors by default.
1747 * config/s390/s390.c (s390_check_symref_alignment): Handle
1749 (TARGET_MAX_ANCHOR_OFFSET): Use short displacement.
1750 * output.h (assemble_align): Pass `align' as unsigned int, so
1751 that the value 0x80000000, which corresponds to `aligned(1 <<
1752 28)', would pass the `align > BITS_PER_UNIT' check.
1753 * varasm.c (assemble_align): Likewise.
1755 2018-12-03 Julian Brown <julian@codesourcery.com>
1757 * tree-pretty-print.c (dump_omp_clause): Make default case
1760 2018-12-03 Richard Biener <rguenther@suse.de>
1762 PR tree-optimization/88301
1763 * tree-vrp.c (register_edge_assert_for_2): Handle conversions
1764 that do not change the value by registering the same assert
1767 2018-12-03 Richard Biener <rguenther@suse.de>
1769 * tree-vect-loop.c (vect_transform_loop): Properly compute
1770 upper bound for the epilogue when doing epilogue vectorization.
1772 2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
1775 * cfgcleanup.c (class pass_postreload_jump): New pass.
1776 (pass_postreload_jump::execute): Likewise.
1777 (make_pass_postreload_jump): Likewise.
1778 * passes.def: Add pass_postreload_jump before
1779 pass_postreload_cse.
1780 * tree-pass.h (make_pass_postreload_jump): New pass.
1782 2018-12-02 Uros Bizjak <ubizjak@gmail.com>
1784 * config/i386/i386.c (inline_memory_move_cost): Correctly
1785 compute number of TFmode GPR moves.
1787 2018-12-02 Jakub Jelinek <jakub@redhat.com>
1790 * config/i386/sse.md (*vec_concatv4sf_0, *vec_concatv4si_0): New insns.
1792 2018-12-02 Jeff Law <law@redhat.com>
1794 * config/h8300/h8300.md (call, call_value): Drop mode from
1795 operand containing number of bytes pushed.
1796 (call_insn, call_value_insn): Use mode iterator for number
1797 of bytes pushed operand. Make pattern name vary appropriately.
1799 2018-12-02 Jan Hubicka <jh@suse.cz>
1801 * bb-reorer.c (find_rarely_executed_basic_blocks_and_crossin_edges):
1802 trust precise profiles.
1804 2018-12-02 Jakub Jelinek <jakub@redhat.com>
1806 * tree-nested.c (convert_nonlocal_omp_clauses,
1807 convert_local_omp_clauses): Handle OMP_CLAUSE_IN_REDUCTION,
1808 OMP_CLAUSE_TASK_REDUCTION and OMP_CLAUSE__SIMT_ clauses.
1809 (convert_nonlocal_reference_stmt, convert_local_reference_stmt):
1810 Convert clauses for GIMPLE_OMP_TASKGROUP.
1812 * omp-low.c (check_omp_nesting_restrictions): Allow cancel or
1813 cancellation point with taskgroup clause inside of taskloop. Consider
1814 a taskloop construct without nogroup clause as implicit taskgroup for
1815 diagnostics if cancel/cancellation point with taskgroup clause is
1816 closely nested inside of taskgroup region.
1819 * asan.c (asan_clear_shadow): Move assert that len is multiple of 4
1820 to the start of the function.
1821 (asan_emit_stack_protection): When emitting clearing sequence for
1822 epilogue, align offset down to ASAN_RED_ZONE_SIZE granularity,
1823 add last_size_aligned which is last_size padded to multiples of
1824 ASAN_RED_ZONE_SIZE and emit asan_clear_shadow always on 4 byte
1827 2018-12-01 Jakub Jelinek <jakub@redhat.com>
1830 * asan.c (asan_redzone_buffer::flush_redzone_payload): Fix up
1831 an off-by-one for BYTES_BIG_ENDIAN.
1834 * combine.c (find_split_point): For invalid memory address
1835 nonobj + obj + const, if reg + obj + const is valid addressing
1836 mode, split at nonobj. Use if rather than else if for the
1837 fallback. Comment fixes.
1839 2018-11-30 Indu Bhagat <indu.bhagat@oracle.com>
1841 * coverage.c (get_coverage_counts): Use from_function_decl for precise
1843 * profile-count.c (profile_count::dump): Add handling for precise
1845 * profile.c (compute_branch_probabilities): Rely on exec_counts instead
1846 of profile_info to set profile_status of function.
1847 (branch_prob): Do not set profile_status of function based on
1848 profile_info. Done above based on exec_counts.
1850 2018-11-30 Jakub Jelinek <jakub@redhat.com>
1852 PR tree-optimization/88274
1853 * tree-ssa-reassoc.c (optimize_range_tests_xor,
1854 optimize_range_tests_diff): If type has smaller precision than
1855 corresponding mode or if it has non-standard min/max, compute
1856 everything in a standard type for the precision.
1859 * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param.
1860 * tree-ssa-ifcombine.c (ifcombine_ifandif): If
1861 --param logical-op-non-short-circuit is present, override
1862 LOGICAL_OP_NON_SHORT_CIRCUIT value from the param.
1863 * fold-const.c (fold_range_test, fold_truth_andor): Likewise.
1865 2018-11-30 Jeff Law <law@redhat.com>
1867 * optabs.c (expand_binop): Use "machine_mode" rather than
1868 "enum machine mode" in most recent change.
1870 2018-11-30 Wilco Dijkstra <wdijkstr@arm.com>
1873 * builtins.c (expand_builtin_longjmp): Use a temporary when restoring
1875 (expand_builtin_nonlocal_goto): Likewise.
1877 2018-11-30 David Malcolm <dmalcolm@redhat.com>
1879 * diagnostic-core.h (emit_diagnostic): New decl.
1880 * diagnostic.c (emit_diagnostic): New overload, taking a
1883 2018-11-30 David Malcolm <dmalcolm@redhat.com>
1885 * pretty-print.c (class selftest::test_pretty_printer): New
1886 subclass of pretty_printer.
1887 (selftest::test_prefixes_and_wrapping): New test.
1888 (selftest::pretty_print_c_tests): Call it.
1890 2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1892 Minimize clone counter memory usage in create_virtual_clone.
1893 * cgraph.h (clone_function_name): Add a variant that takes a
1895 * cgraph.h (cgraph_node::create_virtual_clone): Add a new
1896 argument: num_suffix.
1897 * cgraphclones.c (cgraph_node::create_virtual_clone): Pass
1898 num_suffix to clone_function_name.
1899 (clone_function_name): Add a variant that takes a tree decl.
1900 * ipa-cp.c (create_specialized_node): Keep track of clone
1901 counters in clone_num_suffixes hash map.
1902 (ipcp_driver): Free the counter hash map.
1903 * ipa-hsa.c (process_hsa_functions): Creates at most one hsa
1906 2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1907 Make function assembly more independent.
1909 This is achieved by having clone_function_name assign unique clone
1910 numbers for each function independently.
1912 * cgraphclones.c: Replaced clone_fn_id_num with clone_fn_ids;
1914 (clone_function_name_numbered): Use clone_fn_ids.
1916 2018-11-30 Vladimir Makarov <vmakarov@redhat.com>
1918 PR rtl-optimization/88179
1919 * lra-constraints.c (address_eliminator::address_eliminator):
1920 Don't eleminate regs in illegitimate address.
1922 2018-11-30 David Malcolm <dmalcolm@redhat.com>
1924 PR preprocessor/88257
1925 * input.c (get_substring_ranges_for_loc): Fix indentation.
1926 Bulletproof against getting a different files back from
1927 linemap_resolve_location and expand_location_to_spelling_point.
1929 2018-11-30 Alexander Monakov <amonakov@ispras.ru>
1931 PR gcov-profile/88279
1932 * tree-profile.c (init_ic_make_global_vars): Call
1933 decl_default_tls_model for variable and not it's type.
1935 2018-11-30 Sam Tebbs <sam.tebbs@arm.com>
1937 * config/arm/arm.h (TARGET_DOTPROD): Add TARGET_VFP5 constraint.
1939 2018-11-30 Martin Liska <mliska@suse.cz>
1942 * asan.c (asan_shadow_cst): Remove, partially transform
1943 into flush_redzone_payload.
1944 (RZ_BUFFER_SIZE): New.
1945 (struct asan_redzone_buffer): New.
1946 (asan_redzone_buffer::emit_redzone_byte): Likewise.
1947 (asan_redzone_buffer::flush_redzone_payload): Likewise.
1948 (asan_redzone_buffer::flush_if_full): Likewise.
1949 (asan_emit_stack_protection): Use asan_redzone_buffer class
1950 that is responsible for proper aligned stores and flushing
1951 of shadow memory payload.
1952 * asan.h (ASAN_MIN_RED_ZONE_SIZE): New.
1953 (asan_var_and_redzone_size): Likewise.
1954 * cfgexpand.c (expand_stack_vars): Use smaller alignment
1955 (ASAN_MIN_RED_ZONE_SIZE) in order to make shadow memory
1956 for automatic variables more compact.
1958 2018-11-30 Alan Modra <amodra@gmail.com>
1960 * config/rs6000/predicates.md (easy_fp_constant): Avoid long
1961 dependent insn sequences.
1962 * config/rs6000/rs6000.c (num_insns_constant): Support long
1964 * config/rs6000/rs6000.md (mov<mode>_softfloat <FMOVE128>): Adjust
1967 2018-11-30 Alan Modra <amodra@gmail.com>
1969 * config/rs6000/rs6000.c (num_insns_constant_gpr): Renamed from
1970 num_insns_constant_wide. Make static. Revise comment.
1971 (num_insns_constant_multi): New function.
1972 (num_insns_constant): Formatting. Correct CONST_WIDE_INT
1973 calculation. Simplify and extract code common to both
1974 CONST_INT and CONST_DOUBLE. Add gcc_unreachable for unhandled
1976 * config/rs6000/rs6000-protos.h (num_insns_const_wide): Delete.
1978 2018-11-30 Richard Biener <rguenther@suse.de>
1980 PR tree-optimization/88274
1981 * tree-vrp.c (ranges_from_anti_range): Fix handling of
1984 2018-11-29 Andi Kleen <ak@linux.intel.com>
1986 * config/i386/i386.c (current_fentry_section): Add.
1987 (x86_function_profiler): Handle fentry section.
1988 (ix86_attribute_table): Add fentry section.
1989 * config/i386/i386.opt: Add -mfentry-section.
1990 * doc/extend.texi: Document fentry_section attribute.
1991 * doc/invoke.texi: Document -mfentry-section.
1993 2018-11-29 Andi Kleen <ak@linux.intel.com>
1995 * config/i386/i386.c (x86_print_call_or_nop): Handle nop name.
1996 (current_fentry_name): Add.
1997 (x86_function_profiler): Handle fentry_name attribute.
1998 (ix86_handle_fentry_name): Add.
1999 (ix86_attribute_table): Add fentry_name.
2000 * config/i386/i386.opt: Add -mfentry-name
2001 * doc/extend.texi: Document fentry_name.
2002 * doc/invoke.texi: Document minstrument-return.
2004 2018-11-29 Andi Kleen <ak@linux.intel.com>
2006 * config/i386/i386-opts.h (enum instrument_return): Add.
2007 * config/i386/i386.c (output_return_instrumentation): Add.
2008 (ix86_output_function_return): Call output_return_instrumentation.
2009 (ix86_output_call_insn): Call output_return_instrumentation.
2010 * config/i386/i386.opt: Add -minstrument-return=.
2011 * doc/invoke.texi (-minstrument-return): Document.
2013 2018-11-29 Eric Botcazou <ebotcazou@adacore.com>
2016 * config/sparc/sparc-modes.def: Minor tweak.
2017 * config/sparc/sparc.c: Minor reordering.
2018 (sparc_pass_by_reference): Move around.
2019 (traverse_record_type): Change offset from HOST_WIDE_INT to int.
2020 (classify_registers): Likewise for bitpos.
2021 (function_arg_slotno): Remove dead test and tweak comments.
2022 <MODE_RANDOM>: Remove useless assertion and test whether the
2023 parameter is named in order to pass it in FP registers. Return
2024 the regno for floating-point vector types.
2025 (compute_int_layout): Change bitpos from HOST_WIDE_INT to int.
2026 (compute_fp_layout): Likewise.
2027 (count_registers): Likewise.
2028 (assign_int_registers): Likewise.
2029 (assign_fp_registers): Likewise.
2030 (assign_registers): Likewise.
2031 (function_arg_record_value): Change size from HOST_WIDE_INT to int
2032 and use CEIL_NWORDS to compute the number of registers.
2033 (function_arg_union_value): Minor tweaks.
2034 (function_arg_vector_value): Add slotno and named parameters, use
2035 CEIL_NWORDS to compute the number of registers.
2036 (sparc_function_arg_1): Rework handling of vector types. Change
2037 size from HOST_WIDE_INT to int.
2038 (sparc_arg_partial_bytes): Rework handling of 32-bit ABI and deal
2039 with vector types for the 64-bt ABI.
2040 (sparc_function_arg_advance): Likewise.
2041 (sparc_return_in_memory): Add reference to -fpcc-struct-return.
2042 (sparc_struct_value_rtx): Return NULL_RTX instead of 0.
2043 (sparc_function_value_1): Rework handling of vector types. Change
2044 size from HOST_WIDE_INT to int.
2046 2018-11-29 Jakub Jelinek <jakub@redhat.com>
2049 * config/i386/sse.md (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_lt,
2050 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_lt,
2051 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_shift,
2052 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_shift,
2053 *<sse2_avx2>_pmovmskb_lt, *<sse2_avx2>_pmovmskb_zext_lt): New
2054 define_insn_and_split patterns.
2057 * config/i386/sse.md
2058 (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
2059 *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
2060 *<sse4_1_avx2>_pblendvb_lt): Change define_insn into
2061 define_insn_and_split.
2063 2018-11-29 Peter Bergner <bergner@linux.ibm.com>
2066 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
2067 -mabi=ieeelongdouble without both -mpopcntd and -mvsx.
2069 2018-11-29 Uros Bizjak <ubizjak@gmail.com>
2071 * config/i386/i386.c (inline_memory_move_cost):
2072 Check "in" for 2 in MMX_CLASS_P case.
2073 * config/i386/mmx.md (*mov<mode>_internal): Correct
2074 TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC
2075 alternatives in preferred_for_speed attribute calculation.
2077 2018-11-29 Martin Sebor <msebor@redhat.com>
2081 * doc/extend.texi (attribute constructor): Clarify.
2083 2018-11-29 Martin Liska <mliska@suse.cz>
2086 * builtins.c (expand_movstr): Fix thinko introduced
2087 when switching to the new enum.
2089 2018-11-29 qing zhao <qing.zhao@oracle.com>
2091 * cif-code.def (EXTERN_LIVE_ONLY_STATIC): New CIF code.
2092 * common.opt: Add -flive-patching flag.
2093 * doc/invoke.texi: Document -flive-patching.
2094 * flag-types.h (enum live_patching_level): New enum.
2095 * ipa-inline.c (can_inline_edge_p): Disable external functions from
2096 inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC.
2097 * opts.c (control_options_for_live_patching): New function.
2098 (finish_options): Make flag_live_patching incompatible with flag_lto.
2099 Control IPA optimizations based on different levels of
2102 2018-11-29 Giuliano Belinassi <giuliano.belinassi@usp.br>
2104 * match.pd (sinh (atanh (x))): New simplification rules.
2105 (cosh (atanh (x))): Likewise.
2107 2018-11-29 Jakub Jelinek <jakub@redhat.com>
2110 * config/i386/sse.md (ssebytemode): Add V16SI, V8SI and V4SI entries.
2111 (ssefltmodesuffix, ssefltvecmode): New define_mode_attrs.
2112 (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
2113 *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
2114 *<sse4_1_avx2>_pblendvb_lt): New define_insns.
2117 * tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
2118 * tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
2119 * match.pd (define_predicates): Add uniform_integer_cst_p.
2120 (cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
2121 so that it works also for vector comparisons with uniform constants
2122 with INTEGER_CST element.
2125 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
2126 vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
2127 in unsigned_type_for instead of vector integral type where overflow
2130 2018-11-29 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2132 There can be at most one .resolver clone per function
2133 * config/rs6000/rs6000.c (make_resolver_func): Generate
2134 resolver symbol with clone_function_name instead of
2135 clone_function_name_numbered.
2137 2018-11-29 Richard Biener <rguenther@suse.de>
2139 PR tree-optimization/88243
2140 * tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
2141 type of all pattern-sequence stmts to vect_internal_def.
2143 2018-11-29 Andre Vieira <andre.simoesdiasvieira@arm.com>
2146 * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
2147 (cortex-r7, cortex-r8): Update default and add new configuration.
2148 * doc/invoke.texi (armv7-r): Add two new vfp options.
2149 (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
2150 support this option.
2152 2018-11-29 Alan Modra <amodra@gmail.com>
2154 * config/rs6000/rs6000.c (rs6000_emit_move): Disable long
2155 double split for targets other than Darwin.
2157 2018-11-29 Alan Modra <amodra@gmail.com>
2159 * config/rs6000/rs6000.md (movdi_internal64): Correct lengths.
2161 2018-11-29 Alan Modra <amodra@gmail.com>
2163 * config/rs6000/predicates.md (easy_fp_constant): Remove code
2164 dealing with integers in const_double. Assert on unexpected
2165 modes. Delete superfluous ABI_V4 test.
2166 * config/rs6000/rs6000.c (rs6000_emit_move): Comment fixes.
2167 Don't call easy_fp_constant for Pmode.
2168 (rs6000_hash_constant): Remove code dealing with integers in
2170 (rs6000_legitimate_constant_p): Likewise.
2171 (output_toc): Formatting, use CONST_DOUBLE_P.
2173 2018-11-29 Alan Modra <amodra@gmail.com>
2175 * config/rs6000/constraints.md (G, H): Comment on purpose of
2176 constraint. Correct mode comments and "G" mode test.
2177 * config/rs6000/rs6000.md (movdi_internal32): Remove "GH" from
2178 alternative handling "F". Add length attr. Formatting.
2179 (mov<mode>_softfloat <FMOVE128>): Delete "GH" from
2180 alternative, and move "F" to separate alternative. Correct
2183 2018-11-29 Alan Modra <amodra@gmail.com>
2185 * config/rs6000/predicates.md (easy_vector_constant): Don't call
2188 2018-11-29 Alan Modra <amodra@gmail.com>
2190 * config.in (HAVE_AS_PLTSEQ): Add.
2191 * config/rs6000/predicates.md (indirect_call_operand): New.
2192 * config/rs6000/rs6000-protos.h (rs6000_pltseq_template),
2193 (rs6000_sibcall_sysv): Declare.
2194 * config/rs6000/rs6000.c (init_cumulative_args): Set cookie
2195 CALL_LONG for -fno-plt.
2196 (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ.
2197 (rs6000_indirect_call_template_1): Emit .reloc directives for
2198 UNSPEC_PLTSEQ calls.
2199 (rs6000_pltseq_template): New function.
2200 (rs6000_longcall_ref): Add arg parameter. Use PLT16 insns if
2201 relocs supported by assembler. Move SYMBOL_REF test to callers.
2202 (rs6000_call_aix): Adjust rs6000_longcall_ref call. Package
2203 insns in UNSPEC_PLTSEQ, preserving original func_desc.
2204 (rs6000_call_sysv): Likewise.
2205 (rs6000_sibcall_sysv): New function.
2206 * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default.
2207 * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA,
2208 UNSPEC_PLT16_LO): New.
2209 (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New.
2210 (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero
2211 cookie in constraints. Test explicitly for flags in length attr.
2212 Handle unspec operand 1.
2213 (call_value_indirect_nonlocal_sysv): Likewise.
2214 (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1.
2215 (call_indirect_elfv2, call_value_indirect_elfv2): Likewise.
2216 (sibcall, sibcall_value): Use rs6000_sibcall_sysv.
2217 (sibcall_indirect_nonlocal_sysv): New pattern.
2218 (sibcall_value_indirect_nonlocal_sysv): Likewise.
2219 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect
2221 * configure.ac: Check for gas plt sequence marker support.
2222 * configure: Regenerate.
2224 2018-11-29 Alan Modra <amodra@gmail.com>
2226 * config/rs6000/predicates.md (unspec_tls): New.
2227 * config/rs6000/rs6000-protos.h (rs6000_call_template),
2228 (rs6000_sibcall_template): Update prototype.
2229 (rs6000_longcall_ref): Delete.
2230 (rs6000_call_sysv): Declare.
2231 * config/rs6000/rs6000.c (edit_tls_call_insn): New function.
2232 (global_tlsarg): New variable.
2233 (rs6000_legitimize_tls_address): Rewrite __tls_get_addr call
2235 (print_operand): Extract UNSPEC_TLSGD address operand.
2236 (rs6000_call_template, rs6000_sibcall_template): Remove arg
2237 parameter, extract from second call operand instead.
2238 (rs6000_longcall_ref): Make static, localize vars.
2239 (rs6000_call_aix): Rename parameter to reflect new usage. Take
2240 tlsarg from global_tlsarg. Don't create unused rtl or nop insns.
2241 (rs6000_sibcall_aix): Rename parameter to reflect new usage. Take
2242 tlsarg from global_tlsarg.
2243 (rs6000_call_sysv): New function.
2244 * config/rs6000/rs6000.md: Adjust rs6000_call_template and
2245 rs6000_sibcall_template throughout.
2246 (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix, tls_gd_call_sysv): Delete.
2247 (tls_ld_aix, tls_ld_sysv, tls_ld_call_aix, tls_ld_call_sysv): Delete.
2248 (tls_gdld_nomark): New insn.
2249 (tls_gd): Swap operand order. Simplify mode selection.
2250 (tls_gd_high, tls_gd_low): Swap operand order.
2251 (tls_ld): Remove const_int 0 vector element from UNSPEC_TLSLD.
2252 Simplify mode selection.
2253 (tls_ld_high, tls_ld_low): Similarly adjust UNSPEC_TLSLD.
2254 (call, call_value): Don't assert for second call operand.
2255 Use rs6000_call_sysv.
2257 2018-11-29 Alan Modra <amodra@gmail.com>
2259 * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64),
2260 (call_nonlocal_darwin64, call_value_indirect_nonlocal_darwin64),
2261 (call_value_nonlocal_darwin64): Remove constraints from second call
2262 arg, the rounded_stack_size_rtx arg.
2263 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix),
2264 (tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv, tls_ld_call_aix),
2265 (tls_ld_call_sysv, call_local32, call_local64, call_value_local32),
2266 (call_value_local64, call_indirect_nonlocal_sysv),
2267 (call_nonlocal_sysv, call_nonlocal_sysv_secure),
2268 (call_value_indirect_nonlocal_sysv, call_value_nonlocal_sysv),
2269 (call_value_nonlocal_sysv_secure, call_local_aix),
2270 (call_value_local_aix, call_nonlocal_aix, call_value_nonlocal_aix),
2271 (call_indirect_aix, call_value_indirect_aix, call_indirect_elfv2),
2272 (call_value_indirect_elfv2, sibcall_local32, sibcall_local64),
2273 (sibcall_value_local32, sibcall_value_local64, sibcall_aix),
2274 (sibcall_value_aix): Likewise.
2276 2018-11-29 Alan Modra <amodra@gmail.com>
2278 * config/rs6000/rs6000.md (TLSmode): Delete mode iterator. Replace
2279 with P throughout except for call mems which should use SI.
2280 (tls_abi_suffix, tls_sysv_suffix, tls_insn_suffix): Delete mode
2281 attributes. Replace with bits, mode and ptrload respectively.
2283 2018-11-29 Alan Modra <amodra@gmail.com>
2285 * config/rs6000/rs6000-protos.h (rs6000_indirect_call_template),
2286 (rs6000_indirect_sibcall_template): Declare.
2287 * config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
2288 (rs6000_indirect_call_template, rs6000_indirect_sibcall_template):
2290 * config/rs6000/rs6000.md (call_indirect_nonlocal_sysv),
2291 (call_value_indirect_nonlocal_sysv, sibcall_nonlocal_sysv),
2292 (call_indirect_aix, call_value_indirect_aix): Use
2293 rs6000_indirect_call_template and rs6000_indirect_sibcall_template.
2294 call_indirect_elfv2, call_value_indirect_elfv2): Likewise, and
2295 handle both speculation and non-speculation cases.
2296 (call_indirect_aix_nospec, call_value_indirect_aix_nospec): Delete.
2297 (call_indirect_elfv2_nospec, call_value_indirect_elfv2_nospec): Delete.
2299 2018-11-29 Alan Modra <amodra@gmail.com>
2301 * config/rs6000/rs6000-protos.h (rs6000_call_template): Declare.
2302 (rs6000_sibcall_template): Declare.
2303 (macho_call_template): Rename from output_call.
2304 * config/rs6000/rs6000.c (rs6000_call_template_1): New function.
2305 (rs6000_call_template, rs6000_sibcall_template): Likewise.
2306 (macho_call_template): Rename from output_call.
2307 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv),
2308 (tls_gd_call_aix, tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv),
2309 (tls_ld_call_aix, tls_ld_call_sysv, call_nonlocal_sysv),
2310 (call_nonlocal_sysv_secure, call_value_nonlocal_sysv),
2311 (call_value_nonlocal_sysv_secure, call_nonlocal_aix),
2312 (call_value_nonlocal_aix): Use rs6000_call_template and update
2313 occurrences of output_call to macho_call_template.
2314 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_aix),
2315 (sibcall_value_aix): Use rs6000_sibcall_template.
2317 2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
2319 * config/rs6000/rs6000-string.c (expand_block_clear): Change how
2320 we determine if unaligned vsx is ok.
2322 2018-11-28 Jan Hubicka <jh@suse.cz>
2324 * predict.c (determine_unlikely_bbs): Forward declare; also determine
2325 edges that are always known to be taken because it is only likely
2326 edge out of given BB.
2327 (tree_estimate_probability): Call before profile guessing to get bit
2330 2018-11-28 Jan Hubicka <jh@suse.cz>
2332 * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Handle
2333 profile_probability::always better.
2335 2018-11-28 Jan Hubicka <jh@suse.cz>
2337 * profile-count.h (profile_count::split): Give better result when
2338 splitting profile_probability::always.
2340 2018-11-28 Vladimir Makarov <vmakarov@redhat.com>
2343 * ira-costs.c (scan_one_insn): Process subregs when updating costs
2344 for pseudos and allocnos from insn.
2346 2018-11-28 David Edelsohn <dje.gcc@gmail.com>
2348 * config/rs6000/aix72.h: Update to match aix71.h changes.
2350 2018-11-28 Jeff Law <law@redhat.com>
2352 * config/h8300/constraints.md: Add "C" constraint for call insns.
2353 * config/h8300/h8300.md (call, call_value): Turn into a define_expand
2354 and define_insn pair. Move invalid call targets into a register in
2355 the expander and fix constraints in the matching pattern.
2356 * config/h8300/predicates.md (call_expander_operand): Renamed from
2357 call_insn_operand. Reject things we shouldn't be trying to handle.
2358 (call_insn_operand): New predicate for use by the call/call_value
2360 (small_call_insn_operand): Update appropriately.
2362 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
2364 * config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
2365 calls to strtok with strtok_r.
2367 2018-11-28 Richard Biener <rguenther@suse.de>
2369 PR tree-optimization/88223
2370 * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
2371 over a stored-same value may-alias store make sure to consider
2372 partial overlaps which are valid when TBAA reasonings do not
2373 apply and byte-granular overlaps are possible at all.
2375 2018-11-28 Richard Biener <rguenther@suse.de>
2377 PR tree-optimization/88217
2378 * vr-values.c (vr_values::extract_range_from_phi_node): Make
2379 sure to handle results > +INF and < -INF correctly when
2380 trying to drop down to +INF - 1 or -INF + 1.
2382 2018-11-28 Alan Modra <amodra@gmail.com>
2384 * xcoffout.c (do_block): Signed/unsigned warning fix.
2386 2018-11-28 Richard Biener <rguenther@suse.de>
2388 PR tree-optimization/79351
2389 * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
2390 empty CONSTRUCTORs ensure the store is at a constant position.
2392 2018-11-28 Richard Biener <rguenther@suse.de>
2394 PR tree-optimization/88229
2395 * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
2396 is an INTEGER_CST before accessing it so.
2398 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
2400 * doc/invoke.texi (-mtune=): Remove obsolete CPU names.
2402 2018-11-28 Jakub Jelinek <jakub@redhat.com>
2405 * config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
2406 SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1. Formatting fixes.
2407 * config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
2409 2018-11-27 Martin Liska <mliska@suse.cz>
2411 * gcov.c (generate_results): Append current_working_directory
2414 2018-11-27 Mike Gulick <mgulick@mathworks.com>
2416 PR preprocessor/83173
2417 * input.c (dump_location_info): Dump reason and included_from
2418 fields from line_map_ordinary struct. Fix indentation when
2419 location > 5 digits.
2420 * diagnostic-show-locus.c (num_digits, num_digits): Move to
2421 diagnostic.c to allow it to be utilized by input.c.
2422 * diagnostic.c (num_digits, selftest::test_num_digits): Moved
2424 (selftest::diagnostic_c_tests): Run selftest::test_num_digits.
2425 * diagnostic.h (num_digits): Add extern definition.
2427 2018-11-27 Fredrik Noring <noring@nocrew.org>
2429 * config/mips/mips.c (mips_reorg_process_insns)
2430 (mips_option_override): Handle `-mfix-r5900'.
2431 * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
2433 * config/mips/mips.opt (mfix-r5900): New option.
2434 * doc/invoke.texi: Document the `r5900' processor name, and
2435 `-mfix-r5900' and `-mno-fix-r5900' options.
2437 2018-11-27 Jakub Jelinek <jakub@redhat.com>
2440 * config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
2441 output_operand_lossage instead of gcc_assert.
2442 <case 't'>: Likewise.
2443 <case 'z'>: Likewise.
2444 <case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
2446 2018-11-27 Jeff Law <law@redhat.com>
2448 * config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
2449 in call to move_by_pieces.
2451 * config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
2454 * config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
2455 call to move_by_pieces.
2457 * config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
2458 in call to move_by_pieces.
2460 * config/microblaze/microblaze.c (microblaze_block_move_straight): Use
2461 RETURN_BEGIN in call to move_by_pieces.
2462 (microblaze_expand_block_move): Likewise.
2464 2018-11-27 Tamar Christina <tamar.christina@arm.com>
2466 * doc/md.texi (xorsign): Document it.
2468 2018-11-27 Martin Liska <mliska@suse.cz>
2470 * config/gnu-user.h (TARGET_F951_OPTIONS): New.
2471 * gcc.c (find_fortran_preinclude_file): New function
2472 to handle Fortran pre-include.
2474 2018-11-27 Martin Liska <mliska@suse.cz>
2476 * asan.c (asan_emit_stack_protection): Use new enum values
2477 instead of int constants.
2478 * builtins.c (expand_builtin_memory_copy_args): Replace int
2479 type with memop_ret enum type.
2480 (expand_builtin_mempcpy_args): Likewise.
2481 (expand_builtin_memcpy): Use new enum values
2482 instead of int constants. Likewise.
2483 (expand_builtin_mempcpy): Likewise.
2484 (expand_movstr): Likewise.
2485 (expand_builtin_strcpy_args): Likewise.
2486 (expand_builtin_stpcpy_1): Likewise.
2487 (expand_builtin_strncpy): Likewise.
2488 (expand_builtin_memset_args): Likewise.
2489 * expr.c (move_by_pieces_d::finish_endp): Rename to ...
2490 (move_by_pieces_d::finish_retmode): ... this.
2491 (move_by_pieces): Change last argument type to memop_ret.
2492 (store_by_pieces): Use new enum values
2493 instead of int constants.
2494 (emit_block_move_hints): Likewise.
2495 (emit_push_insn): Likewise.
2496 (store_expr): Likewise.
2497 * expr.h (store_by_pieces): Change int to newly added enum
2499 * rtl.h (enum memop_ret): Define.
2500 (move_by_pieces): Use the enum type.
2502 2018-11-27 Alan Modra <amodra@gmail.com>
2504 * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
2506 (ASM_CPU_SPEC): Do so here. Rewrite using if .. else if .. specs
2507 form. Error on missing -mcpu case.
2508 * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
2509 (asm_names <!_AIX>): Add missing cpus. Update NULL case. Apply
2510 PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
2511 * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
2512 else if .. specs form. Error on missing -mcpu case. Don't output
2513 duplicate -maltivec. Apply PR63177 fix for -mcpu=powerpc64le.
2515 2018-11-26 David Malcolm <dmalcolm@redhat.com>
2517 * dump-context.h (dump_context::dump_loc): Convert 1st param from
2518 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
2519 const dump_location_t & to const dump_user_location_t &.
2520 (dump_context::dump_loc_immediate): Convert 2nd param from
2521 const dump_location_t & to const dump_user_location_t &.
2522 (dump_context::dump_gimple_stmt): Convert 1st param from
2523 dump_flags_t to const dump_metadata_t &.
2524 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
2525 2nd param from const dump_location_t & to
2526 const dump_user_location_t &.
2527 (dump_context::dump_gimple_expr): Convert 1st param from
2528 dump_flags_t to const dump_metadata_t &.
2529 (dump_context::dump_gimple_expr_loc): Likewise; convert
2530 2nd param from const dump_location_t & to
2531 const dump_user_location_t &.
2532 (dump_context::dump_generic_expr): Convert 1st param from
2533 dump_flags_t to const dump_metadata_t &.
2534 (dump_context::dump_generic_expr_loc): Likewise; convert
2535 2nd param from const dump_location_t & to
2536 const dump_user_location_t &.
2537 (dump_context::dump_printf_va): Convert 1st param from
2538 dump_flags_t to const dump_metadata_t &.
2539 (dump_context::dump_printf_loc_va): Likewise; convert
2540 2nd param from const dump_location_t & to
2541 const dump_user_location_t &.
2542 (dump_context::dump_dec): Convert 1st param from
2543 dump_flags_t to const dump_metadata_t &.
2544 (dump_context::dump_symtab_node): Likewise.
2545 (dump_context::begin_scope): Split out 2nd param into
2546 user and impl locations.
2547 (dump_context::ensure_pending_optinfo): Add metadata param.
2548 (dump_context::begin_next_optinfo): Replace dump_location_t param
2549 with metadata and user location.
2550 * dumpfile.c (dump_context::dump_loc): Convert 1st param from
2551 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
2552 const dump_location_t & to const dump_user_location_t &.
2553 (dump_context::dump_loc_immediate): Convert 2nd param from
2554 const dump_location_t & to const dump_user_location_t &.
2555 (dump_context::dump_gimple_stmt): Convert 1st param from
2556 dump_flags_t to const dump_metadata_t &.
2557 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
2558 2nd param from const dump_location_t & to
2559 const dump_user_location_t &.
2560 (dump_context::dump_gimple_expr): Convert 1st param from
2561 dump_flags_t to const dump_metadata_t &.
2562 (dump_context::dump_gimple_expr_loc): Likewise; convert
2563 2nd param from const dump_location_t & to
2564 const dump_user_location_t &.
2565 (dump_context::dump_generic_expr): Convert 1st param from
2566 dump_flags_t to const dump_metadata_t &.
2567 (dump_context::dump_generic_expr_loc): Likewise; convert
2568 2nd param from const dump_location_t & to
2569 const dump_user_location_t &.
2570 (dump_context::dump_printf_va): Convert 1st param from
2571 dump_flags_t to const dump_metadata_t &.
2572 (dump_context::dump_printf_loc_va): Likewise; convert
2573 2nd param from const dump_location_t & to
2574 const dump_user_location_t &.
2575 (dump_context::dump_dec): Convert 1st param from
2576 dump_flags_t to const dump_metadata_t &.
2577 (dump_context::dump_symtab_node): Likewise.
2578 (dump_context::begin_scope): Split out 2nd param into
2579 user and impl locations.
2580 (dump_context::ensure_pending_optinfo): Add metadata param.
2581 (dump_context::begin_next_optinfo): Replace dump_location_t param
2582 with metadata and user location.
2583 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
2584 const dump_metadata_t &.
2585 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
2586 const dump_location_t & to const dump_user_location_t &.
2587 (dump_gimple_expr): Convert 1st param from dump_flags_t to
2588 const dump_metadata_t &.
2589 (dump_gimple_expr_loc): Likewise; convert 2nd param from
2590 const dump_location_t & to const dump_user_location_t &.
2591 (dump_generic_expr): Convert 1st param from dump_flags_t to
2592 const dump_metadata_t &.
2593 (dump_generic_expr_loc): Likewise; convert 2nd param from
2594 const dump_location_t & to const dump_user_location_t &.
2595 (dump_printf): Convert 1st param from dump_flags_t to
2596 const dump_metadata_t &.
2597 (dump_printf_loc): Likewise; convert 2nd param from
2598 const dump_location_t & to const dump_user_location_t &.
2599 (dump_dec): Convert 1st param from dump_flags_t to
2600 const dump_metadata_t &.
2601 (dump_symtab_node): Likewise.
2602 (dump_begin_scope): Split out 2nd param into user and impl
2604 (selftest::assert_impl_location_eq): New function.
2605 (ASSERT_IMPL_LOCATION_EQ): New macro.
2606 (selftest::test_impl_location): Update to use
2607 ASSERT_IMPL_LOCATION_EQ.
2608 (selftest::test_capture_of_dump_calls): Convert "loc" to
2609 dump_user_location_t. Add ASSERT_IMPL_LOCATION_EQ throughout,
2610 verifying line numbers of dump emissions.
2611 * dumpfile.h (class dump_metadata_t): New class.
2612 (dump_printf): Convert 1st param from dump_flags_t to
2613 const dump_metadata_t &.
2614 (dump_printf_loc): Likewise; convert 2nd param from
2615 const dump_location_t & to const dump_user_location_t &.
2616 (dump_generic_expr_loc): Likewise.
2617 (dump_generic_expr): Convert 1st param from dump_flags_t to
2618 const dump_metadata_t &.
2619 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
2620 const dump_location_t & to const dump_user_location_t &.
2621 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
2622 const dump_metadata_t &.
2623 (dump_gimple_expr_loc): Likewise; convert 2nd param from
2624 const dump_location_t & to const dump_user_location_t &.
2625 (dump_gimple_expr): Convert 1st param from dump_flags_t to
2626 const dump_metadata_t &.
2627 (dump_symtab_node): Likewise.
2628 (dump_dec): Likewise.
2629 (dump_begin_scope): Split out 2nd param into user and impl
2631 (auto_dump_scope::auto_dump_scope): Split "loc" param into a user
2632 location and impl_location, and capture the impl_location.
2633 (AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
2634 * loop-unroll.c (report_unroll): Update for changes to
2635 dump_printf_loc and dump_printf.
2636 * opt-problem.cc (opt_problem::opt_problem): Update for change to
2638 * optinfo-emit-json.cc
2639 (selftest::test_building_json_from_dump_calls): Convert "loc" from
2640 dump_location_t to dump_user_location_t.
2641 * optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
2643 * profile.c (compute_branch_probabilities): Update for change to
2645 * selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
2646 * tree-vect-slp.c (vect_print_slp_tree): Update for change to
2649 2018-11-27 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2651 * doc/sourcebuild.texi: Document check_effective_target_int_eq_float
2652 and check_effective_target_ptr_eq_long.
2654 2018-11-27 Alan Modra <amodra@gmail.com>
2656 * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
2657 (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
2658 (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
2659 (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
2660 (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
2661 * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
2662 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
2663 (ASM_APP_ON, ASM_APP_OFF): Don't define.
2664 * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
2665 * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
2666 * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
2667 * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
2668 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
2669 * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
2670 * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
2671 (GNU_USER_TARGET_CRTN): Redefine.
2672 (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
2673 (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
2674 (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
2675 (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
2676 (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
2677 (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
2678 (LINK_EH_SPEC): Don't define.
2680 2018-11-26 Martin Sebor <msebor@redhat.com>
2683 * expr.c (string_constant): Handle top-level decls of all character
2684 types and subobjects of narrow character type.
2686 2018-11-27 Alan Modra <amodra@gmail.com>
2688 * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
2689 * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
2690 GNU_USER_TARGET_OS_CPP_BUILTINS.
2691 (RS6000_ABI_NAME): Define.
2692 * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
2693 GNU_USER_TARGET_OS_CPP_BUILTINS.
2694 (MUSL_DYNAMIC_LINKER32): Undef before defining.
2695 (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
2696 (CHOOSE_DYNAMIC_LINKER): Don't define.
2697 (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
2698 * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
2699 (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
2700 not already defined.
2701 (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
2702 TARGET_OS_CPP_BUILTINS.
2704 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2706 * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
2708 2018-11-26 Jakub Jelinek <jakub@redhat.com>
2711 * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
2712 and !TARGET_64BIT, return NULL_TREE.
2715 * dwarf2out.c (secname_for_decl): For functions with
2716 DECL_SECTION_NAME if in_cold_section_p, try to return
2717 current_function_section's name if it is a named section.
2719 2018-11-26 Maya Rashish <coypu@sdf.org>
2722 * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
2723 * config/x-netbsd: New file.
2724 * config/host-netbsd: New file.
2726 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2728 * doc/sourcebuild.texi: Document check_effective_target_size20plus.
2729 Clarify documentation for check_effective_target_size32plus.
2731 2018-11-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2733 * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
2734 and modify expand_strncmp_vec_sequence.
2735 (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
2736 (generate_6432_conversion): New function.
2737 (expand_block_compare): Add support for vsx.
2738 (expand_block_compare_gpr): New function.
2739 * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
2740 default limit to 63 because of more compact vsx code.
2742 2018-11-26 Uros Bizjak <ubizjak@gmail.com>
2745 * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
2746 for registers for which no debug information can be generated.
2747 Use INVALID_REGNUM for non-existent registers.
2748 (dbx64_register_map): Ditto.
2749 (svr4_dbx_register_map): Ditto.
2751 2018-11-26 Sandra Loosemore <sandra@codesourcery.com>
2754 * doc/invoke.texi (Optimize Options): Document that
2755 -freorder-functions also uses "hot" and "cold" attributes.
2757 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2759 * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
2761 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2763 * config/arm/types.md (mul64): Rename to...
2764 (widen_mul64): ... This.
2765 * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
2766 * config/arm/cortex-a15.md: Likewise.
2767 * config/arm/cortex-a5.md: Likewise.
2768 * config/arm/cortex-a53.md: Likewise.
2769 * config/arm/cortex-a57.md: Likewise.
2770 * config/arm/cortex-a7.md: Likewise.
2771 * config/arm/cortex-m4.md: Likewise.
2772 * config/arm/exynos-m1.md: Likewise.
2773 * config/arm/marvell-pj4.md: Likewise.
2774 * config/arm/xgene1.md: Likewise.
2776 2018-11-26 Richard Biener <rguenther@suse.de>
2778 PR tree-optimization/88182
2779 * tree-vect-loop.c (vectorizable_reduction): Pick up single
2780 correct reduc_def_info.
2781 * tree-vect-slp.c (vect_analyze_slp_instance): Set
2782 STMT_VINFO_REDUC_DEF of the first stmt.
2784 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
2786 * doc/invoke.texi: Document z14/arch12 -march option.
2788 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
2791 * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
2792 (Warning Options): Likewise.
2794 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
2797 * doc/extend.texi (Common Function Attributes): Clarify that
2798 functions with "const" attribute can read const global variables.
2800 2018-11-26 Alan Modra <amodra@gmail.com>
2802 * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
2804 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
2807 * doc/extend.texi (Common Variable Attributes): Use preferred
2808 placement of type attributes in examples, plus whitespace fixes.
2809 (Type Attributes): Clarify why placement of attributes
2810 immediately after struct/union/enum keyword is preferred.
2811 (Common Type Attributes): Use preferred placement of type
2812 attributes in examples, plus more whitespace fixes.
2814 2018-11-25 Paul Koning <ni1d@arrl.net>
2816 * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
2818 2018-11-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2820 * doc/sourcebuild.texi (Effective-Target Keywords, Environment
2821 attributes): Document d_runtime.
2823 2018-11-25 Vladimir Makarov <vmakarov@redhat.com>
2826 * ira-costs.c (record_operand_costs): Initiate register move cost
2829 2018-11-23 Jeff Law <law@redhat.com>
2831 PR rtl-optimization/87468
2832 * tree-ssa-threadupdate.c (create_block_for_threading): Clear
2833 EDGE_IGNORE on all outgoing edges of the duplicate block.
2835 2018-11-23 Vladimir Makarov <vmakarov@redhat.com>
2838 * ira-costs.c (record_operand_costs): Use bigger hard reg class if
2839 its mode does not fit to the original class.
2841 2018-11-23 Martin Sebor <msebor@redhat.com>
2843 PR tree-optimization/87756
2844 * expr.c (string_constant): Synthesize a string literal from
2845 the address of a constant character.
2846 * tree.c (build_string_literal): Add an argument.
2847 * tree.h (build_string_literal): Same.
2849 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
2851 * config/aarch64/aarch64-cores.def: Define emag.
2852 * config/aarch64/aarch64-tune.md: Regenerated with emag.
2853 * config/aarch64/aarch64.c (emag_tunings): New struct.
2854 * doc/invoke.texi: Document mtune value.
2856 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
2857 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2859 * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
2861 * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
2863 * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
2865 * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
2868 2018-11-23 Richard Biener <rguenther@suse.de>
2870 PR tree-optimization/88149
2871 * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
2872 the case where there are two different def types for the
2873 same operand at different operand position in the same stmt.
2875 2018-23-11 Mihail Ionescu <mihail.ionescu@arm.com>
2877 * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
2878 gen_atomic_compare_swap_1.
2879 (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
2880 (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
2881 (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
2882 (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
2883 (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
2885 * config/arm/arm.md (neon_vext<mode>),
2886 (neon_vrev64<mode>, neon_vrev32<mode>),
2887 (neon_vrev16<mode>, neon_vtrn<mode>_internal),
2888 (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
2889 before the pattern name.
2890 * config/arm/sync.md:
2891 (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
2892 (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
2894 2018-11-23 Jakub Jelinek <jakub@redhat.com>
2896 PR tree-optimization/86614
2897 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
2898 if TREE_NO_WARNING is set on ref.ref.
2900 2018-11-22 Sandra Loosemore <sandra@codesourcery.com>
2901 Alan Coopersmith <alan.coopersmith@oracle.com>
2904 * doc/extend.texi (Designated Inits): Clarify handling of multiple
2905 initializers for unions.
2907 2018-11-22 Jan Hubicka <jh@suse.cz>
2910 * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
2911 parameters; do not warn here.
2912 (odr_subtypes_equivalent_p): Likewise.
2913 (warn_odr): Fix typo.
2914 (warn_types_mismatch): Do not output confused warnings on integer types.
2915 (odr_types_equivalent_p): Update.
2917 2018-11-22 Jakub Jelinek <jakub@redhat.com>
2919 * config/i386/i386.c (ix86_option_override_internal,
2920 ix86_can_inline_p, classify_argument, construct_container,
2921 ix86_expand_prologue, ix86_expand_split_stack_prologue,
2922 ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
2923 expand_setmem_epilogue_via_loop, promote_duplicated_reg,
2924 ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
2927 * config/i386/i386.c (ix86_option_override_internal): For
2928 stack_protector_guard related options, use opts_set->x_ instead
2929 of global_options_set. and prefix options with opts->x_ . Move
2930 defaults for offset and reg into else block.
2932 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
2934 * config/i386/i386.c (ix86_check_avx_upper_register):
2935 Return true for all SSE registers with mode bitsize > 128.
2937 2018-11-22 Vladimir Makarov <vmakarov@redhat.com>
2939 PR rtl-optimization/87718
2940 * ira-costs.c: Remove trailing white-spaces.
2941 (record_operand_costs): Add a special treatment for moves
2942 involving a hard register.
2944 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
2946 * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
2947 (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
2949 2018-11-22 Martin Liska <mliska@suse.cz>
2951 * common/config/i386/i386-common.c (processor_names): Add
2952 static assert and add missing "znver2".
2953 (ix86_get_valid_option_values): Add checking assert for null
2954 values and add "native" value if feasible.
2955 * config/i386/i386.h: Do not declare size of processor_names.
2956 * common/config/i386/i386-common.c:
2957 * config/i386/i386.c: Add static assert for size
2958 of processor_cost_table.
2960 2018-11-22 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2962 * target-insns.def (stack_protect_combined_set): Define new standard
2964 (stack_protect_combined_test): Likewise.
2965 * cfgexpand.c (stack_protect_prologue): Try new
2966 stack_protect_combined_set pattern first.
2967 * function.c (stack_protect_epilogue): Try new
2968 stack_protect_combined_test pattern first.
2969 * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
2970 parameters to control which register to use as PIC register and force
2971 reloading PIC register respectively. Insert in the stream of insns if
2973 (legitimize_pic_address): Expose above new parameters in prototype and
2974 adapt recursive calls accordingly. Use pic_reg if non null instead of
2976 (arm_load_pic_register): Add pic_reg parameter and use it if non null.
2977 (arm_legitimize_address): Adapt to new legitimize_pic_address
2979 (thumb_legitimize_address): Likewise.
2980 (arm_emit_call_insn): Adapt to require_pic_register prototype change.
2981 (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
2982 (thumb1_expand_prologue): Likewise.
2983 * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
2985 (arm_load_pic_register): Likewise.
2986 * config/arm/predicated.md (guard_addr_operand): New predicate.
2987 (guard_operand): New predicate.
2988 * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
2990 (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
2992 (stack_protect_combined_set): New expander..
2993 (stack_protect_combined_set_insn): New insn_and_split pattern.
2994 (stack_protect_set_insn): New insn pattern.
2995 (stack_protect_combined_test): New expander.
2996 (stack_protect_combined_test_insn): New insn_and_split pattern.
2997 (arm_stack_protect_test_insn): New insn pattern.
2998 * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
2999 * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
3000 (UNSPEC_SP_TEST): Likewise.
3001 * doc/md.texi (stack_protect_combined_set): Document new standard
3003 (stack_protect_set): Clarify that the operand for guard's address is
3005 (stack_protect_combined_test): Document new standard pattern name.
3006 (stack_protect_test): Clarify that the operand for guard's address is
3009 2018-11-22 Richard Biener <rguenther@suse.de>
3011 PR tree-optimization/88148
3012 * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
3013 valueization callback parameter and handle it.
3014 * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
3015 * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
3017 2018-11-22 Richard Biener <rguenther@suse.de>
3021 * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
3022 which can appear in size expressions.
3023 * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
3024 CALL_EXPR_BY_DESCRIPTOR.
3025 (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
3026 * tree-streamer-out.c (pack_ts_base_value_fields): Stream
3027 CALL_EXPR_BY_DESCRIPTOR.
3028 (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
3032 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
3035 2018-11-22 Richard Biener <rguenther@suse.de>
3037 PR tree-optimization/88069
3038 * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
3039 apply to default defs.
3041 2018-11-22 Jakub Jelinek <jakub@redhat.com>
3045 * config/i386/i386.c (ix86_option_override_internal): Default
3046 ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
3048 * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
3049 stack_protect_test, stack_protect_test_<mode>): Use empty condition
3050 instead of TARGET_SSP_TLS_GUARD.
3052 2018-11-22 Martin Liska <mliska@suse.cz>
3055 * config/i386/i386.c (ix86_option_override_internal): Error
3056 about usage -mabi=ms and -fsanitize=thread.
3058 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
3061 2013-10-26 Vladimir Makarov <vmakarov@redhat.com>
3064 2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
3066 * lra-spills.c (lra_final_code_change): Remove useless move insns.
3068 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
3071 * function.c (expand_function_end): Do not emit extra blockage insn.
3073 2018-11-21 Lokesh Janghel <lokeshjanghel91@gmail.com>
3076 * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
3077 of FIRST_SSE_REG for 4 or 8 byte modes.
3079 2018-11-21 Jan Hubicka <jh@suse.cz>
3082 * tree.c (fld_decl_context): Break out from ...
3083 (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
3084 DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
3085 (fld_incomplete_type_of): Build copy of TYP_DECL.
3086 * ipa-devirt.c (free_enum_values): Rename to ...
3087 (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
3088 and TREE_TYPEs of TYPE_DECLs.
3089 (get_odr_type): Initialize odr_vtable_hash if needed.
3091 2018-11-21 Alexandre Oliva <oliva@adacore.com>
3093 * final.c (compute_discriminator): Declare. Renamed from...
3094 (maybe_set_discriminator): ... this. Set and return a local.
3095 (override_discriminator): New.
3096 (final_scan_insn_1): Set it.
3097 (notice_source_line): Adjust. Always set discriminator.
3099 2018-11-21 Jakub Jelinek <jakub@redhat.com>
3102 * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
3103 rIJ constraint for aarch64_plus_operand rather than rn.
3105 2018-11-21 Renlin Li <renlin.li@arm.com>
3108 * explow.h (get_dynamic_stack_size): Declare it as external.
3109 * explow.c (record_new_stack_level): Remove function static attribute.
3110 * function.c (assign_stack_local_1): Dynamically align the stack slot
3111 addr for parameter copy on the stack.
3113 2018-11-21 Richard Biener <rguenther@suse.de>
3116 * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
3117 * Makefile.in (bitmap.o-warn): Remove again.
3119 2018-11-20 Jeff Law <law@redhat.com>
3121 PR tree-optimization/88069
3122 * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
3123 degenerate virtual PHIs.
3125 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
3128 * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
3129 nonimmediate_operand with register_operand.
3130 (avx2_<code>v8qiv8si2<mask_name>): Likewise.
3131 (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
3132 (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
3133 (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
3134 (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
3135 (avx2_<code>v4qiv4di2<mask_name>): Likewise.
3136 (avx2_<code>v4hiv4di2<mask_name>): Likewise.
3137 (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
3138 (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
3139 (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
3140 (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
3141 (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
3142 (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
3143 (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
3144 (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
3145 (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
3146 (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
3147 (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
3148 (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
3149 (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
3150 (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
3151 (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
3152 (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
3153 (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
3154 (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
3155 (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
3156 (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
3158 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
3160 * read-rtl.c (apply_subst_iterator): Handle define_split and
3161 define_insn_and_split.
3163 2018-11-21 Jakub Jelinek <jakub@redhat.com>
3165 PR rtl-optimization/87817
3166 * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
3167 *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
3168 in the pattern to avoid triggering UB when operands[2] is zero.
3169 (tbm_bextri_<mode>): New expander. Renamed the old define_insn to ...
3170 (*tbm_bextri_<mode>): ... this.
3172 2018-11-21 Tom de Vries <tdevries@suse.de>
3175 * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
3178 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com>
3180 * configure.ac: Add check for Binutils to determine whether vector
3181 load/store alignments hints are being supported.
3182 * config.in: Regenerate.
3183 * configure: Regenerate.
3184 * config/s390/s390.c (print_operand): Support new output
3186 * config/s390/s390.md ("movti"): Append alignment hint output
3187 using the new output modifier 'A'.
3188 * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
3189 ("*vec_ti_to_v1ti"): Likewise.
3191 2018-11-20 Martin Sebor <msebor@redhat.com>
3193 * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
3195 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3198 * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
3199 compare ENUM values.
3201 2018-11-20 Jakub Jelinek <jakub@redhat.com>
3203 PR tree-optimization/87895
3204 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
3205 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
3206 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
3207 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
3208 has any preds and always use EDGE_PRED (, 0).
3210 2018-11-20 Uros Bizjak <ubizjak@gmail.com>
3213 * mode-switching.c (create_pre_exit): After reload, always split the
3214 fallthrough edge to the exit block.
3216 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3218 * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
3219 * tree.c (build_array_type_1): Forward declare.
3220 (fld_type_variant_equal_p): Add INNER_TYPE parameter.
3221 (fld_type_variant): Likewise.
3222 (fld_simplified_types): New hash.
3223 (fld_process_array_type): New function.
3224 (fld_incomplete_type_of): Handle array and enumeration types.
3225 (fld_simplified_type): Handle simplification of arrays.
3226 (free_lang_data): Allocate and free simplified types hash.
3228 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3231 * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
3232 when sybtype already violates ODR.
3233 (get_odr_type): Do not ICE when insert is false and type duplicate
3234 is not registered yet.
3235 (register_odr_type): Be sure to register subtypes first.
3237 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
3239 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
3240 DImode parts of the target operand.
3242 2018-11-20 Nathan Sidwell <nathan@acm.org>
3245 * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
3247 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3250 * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
3252 (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
3254 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
3257 * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
3258 * ipa.c (possible_inline_candidate_p): Break out from ..
3259 (process_references): ... here ; drop before_inlining_p;
3260 cleanup handling of alises.
3261 (walk_polymorphic_call_targets): Likewise.
3262 (symbol_table::remove_unreachable_nodes): Likewise.
3263 * passes.c (pass_data_ipa_remove_symbols): New structure.
3264 (pass_ipa_remove_symbols): New pass.
3265 (make_pass_ipa_remove_symbols): New function.
3266 * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
3267 * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
3269 2018-11-20 Richard Biener <rguenther@suse.de>
3271 * tree-vect-stmts.c (vectorizable_condition): Do not get
3272 at else_clause vect def for EXTRACT_LAST_REDUCTION. Remove
3273 pointless vect_is_simple_use calls.
3275 2018-11-20 Richard Biener <rguenther@suse.de>
3277 PR tree-optimization/88074
3278 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
3281 2018-11-20 Richard Biener <rguenther@suse.de>
3283 PR tree-optimization/88069
3284 * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
3285 virtual PHI arguments.
3287 2018-11-20 Ilya Leoshkevich <iii@linux.ibm.com>
3290 * config/s390/s390.md: Skip LT(G) peephole when literal pool is
3292 * rtl.h (contains_constant_pool_address_p): New function.
3293 * rtlanal.c (contains_constant_pool_address_p): Likewise.
3295 2018-11-20 Richard Biener <rguenther@suse.de>
3298 * alias.c (component_uses_parent_alias_set_from): Remove
3299 alias-set zero and TYPE_TYPELESS_STORAGE case both already
3300 handled in other ways.
3302 2018-11-20 Richard Biener <rguenther@suse.de>
3304 PR tree-optimization/88087
3305 * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
3307 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
3310 2018-11-20 Richard Biener <rguenther@suse.de>
3313 * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
3315 2018-11-19 Jan Hubicka <hubicka@ucw.cz>
3318 * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
3320 2018-11-19 Sandra Loosemore <sandra@codesourcery.com>
3323 * doc/invoke.texi (Link Options): Mention shared libraries
3324 in documentation for the -l option. Simplify discussion and
3325 point to the system linker documentation for details.
3327 2018-11-19 Peter Bergner <bergner@linux.ibm.com>
3329 PR rtl-optimization/88033
3330 * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
3331 to itself. Use HARD_REGISTER_NUM_P.
3333 2018-11-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3335 * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
3336 of the loop if vf is non-constant.
3338 2018-11-19 David Malcolm <dmalcolm@redhat.com>
3340 PR tree-optimization/87025
3341 * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
3342 immediately after creating the scope optinfo.
3343 (selftest::test_pr87025): New function.
3344 (selftest::dumpfile_c_tests): Call it.
3345 * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
3346 that we're not popping the top-level records array.
3347 * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
3348 not changing the kind of a "scope" optinfo.
3350 2018-11-19 David Malcolm <dmalcolm@redhat.com>
3352 PR tree-optimization/87025
3353 * dump-context.h: Include "optinfo.h".
3354 (class optrecord_json_writer): New forward decl.
3355 (dump_context::forcibly_enable_optinfo_p): Delete.
3356 (dump_context::optinfo_enabled_p): New member function.
3357 (dump_context::optimization_records_enabled_p): New member
3359 (dump_context::set_json_writer): New member function.
3360 (dump_context::emit_optinfo): New member function.
3361 (dump_context::m_forcibly_enable_optinfo): Delete.
3362 (dump_context::m_json_writer): New member data.
3363 * dumpfile.c (dump_context::set_json_writer): New member function.
3364 (dump_context::finish_any_json_writer): New member function.
3365 (dump_context::end_scope): Replace call to
3366 optimization_records_maybe_pop_dump_scope with call to
3367 m_json_writer->pop_scope.
3368 (dump_context::optinfo_enabled_p): New member function.
3369 (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
3370 to dump_context::emit_optinfo.
3371 (dump_context::emit_optinfo): New member function.
3372 (temp_dump_context::temp_dump_context): Replace
3373 m_forcibly_enable_optinfo with call to set_json_writer.
3374 (temp_dump_context::~temp_dump_context): Clean up any json writer.
3375 * optinfo-emit-json.cc (class optrecord_json_writer): Move to
3377 (the_json_writer): Delete.
3378 (optimization_records_start): Delete.
3379 (optimization_records_finish): Delete.
3380 (optimization_records_enabled_p): Delete, in favor of
3381 dump_context::optimization_records_enabled_p.
3382 (optimization_records_maybe_record_optinfo): Delete.
3383 (optimization_records_maybe_pop_dump_scope): Delete.
3384 * optinfo-emit-json.h: Include "json.h". Delete forward
3386 (optimization_records_start): Delete.
3387 (optimization_records_finish): Delete.
3388 (optimization_records_enabled_p): Delete.
3389 (optimization_records_maybe_record_optinfo): Delete.
3390 (optimization_records_maybe_pop_dump_scope): Delete.
3391 (class optrecord_json_writer): Move here from
3392 optinfo-emit-json.cc.
3393 * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
3394 to optinfo::emit with call to dump_context::emit_optinfo.
3395 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
3396 (optinfo_enabled_p): Delete, in favor of
3397 dump_context::optinfo_enabled_p.
3398 (optinfo_wants_inlining_info_p): Update for conversion o
3399 optimization_records_enabled_p to a member function of
3401 * optinfo.h (optinfo_enabled_p): Delete, in favor of
3402 dump_context::optinfo_enabled_p.
3403 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
3404 * toplev.c: Include "dump-context.h".
3405 (compile_file): Replace call to optimization_records_finish with
3406 dump_context::finish_any_json_writer.
3407 (do_compile): Replace call to optimization_records_start with
3408 conditionally creating a optrecord_json_writer for the
3411 2018-11-19 Jakub Jelinek <jakub@redhat.com>
3413 PR tree-optimization/88071
3414 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
3415 of false as last argument to gsi_remove.
3416 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
3417 false as last argument to gsi_replace.
3420 * omp-expand.c: Don't include debug.h.
3421 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
3422 from innermost outer parallel, task, teams or target that has a
3423 child_fn set, or, if there is no such outer region, use
3424 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
3425 whether a suitable BLOCK is found or not.
3426 (expand_parallel_call, expand_teams_call): Don't call
3427 adjust_context_and_scope here.
3428 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
3429 (expand_omp_taskreg, expand_omp_target): Likewise. Call
3430 adjust_context_and_scope.
3431 * dwarf2out.c (dwarf2out_early_global_decl): For
3432 decl_function_context recurse instead of calling dwarf2out_decl.
3434 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
3436 PR rtl-optimization/85925
3437 * rtl.h (word_register_operation_p): New predicate.
3438 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
3439 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
3440 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
3441 (num_sign_bit_copies1): Likewise.
3443 2018-11-19 Richard Biener <rguenther@suse.de>
3446 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
3449 2018-11-19 Eric Botcazou <ebotcazou@adacore.com>
3451 * compare-elim.c (struct comparison): Add not_in_a field.
3452 (is_not): New static function.
3453 (strip_not): Likewise.
3454 (conforming_compare): Handle a NOT in the first operand.
3455 (can_eliminate_compare): Likewise.
3456 (find_comparison_dom_walker::before_dom_children): Likewise.
3457 (try_eliminate_compare): Likewise.
3458 * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
3459 (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
3461 2018-11-19 Jonathan Wakely <jwakely@redhat.com>
3463 * doc/extend.texi (Common Type Attributes): Fix typos.
3465 2018-11-19 Martin Liska <mliska@suse.cz>
3467 PR gcov-profile/88045
3468 * coverage.c (coverage_begin_function): Add assert.
3470 2018-11-18 Sandra Loosemore <sandra@codesourcery.com>
3473 * doc/extend.texi (Common Function Attributes): Document that
3474 no_instrument_function applies to -p and -pg, too.
3475 * doc/invoke.texi (Instrumentation Options): Add cross-references
3476 to docs for -p, -pg, and -finstrument-functions.
3478 2018-11-18 Alan Modra <amodra@gmail.com>
3480 * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
3481 (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
3482 (GNU_USER_TARGET_CRTN): Define.
3483 (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
3484 (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
3486 2018-11-18 Alan Modra <amodra@gmail.com>
3488 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
3489 !HAVE_LD_PIE variant.
3490 (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
3492 2018-11-17 Nick Clifton <nickc@redhat.com>
3493 Sandra Loosemore <sandra@codesourcery.com>
3496 * doc/invoke.texi (Overall Options): Document that --help and
3497 --help=<value> options cannot be combined.
3499 2018-11-17 Jim Wilson <jimw@sifive.com>
3501 * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
3502 (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
3503 epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
3504 (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset. Set it
3505 to step2 if frame_pointer_needed and step1 is 0.
3507 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
3510 * doc/cpp.texi (System Headers): Add note about implicit
3511 extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
3513 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
3516 * doc/invoke.texi (C++ Dialect Options): Clarify usage of
3517 -fno-implicit-templates.
3519 2018-11-17 Jakub Jelinek <jakub@redhat.com>
3521 PR tree-optimization/87546
3522 * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
3523 min_precision variable, initially set it to orig_precision, only does
3524 something if op_type's precision is <= min_precision and update
3525 min_precision whenever calling set_op.
3527 2018-11-16 Jan Hubicka <hubicka@ucw.cz>
3530 * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
3532 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
3534 * doc/invoke.texi (Option Summary): Fix whitespace and line
3535 breaks in @gccoptlist environments.
3536 (Warning Options): Likewise.
3537 (Optimize Options): Likewise.
3538 (PowerPC SPE Options): Likewise.
3539 (RS/6000 and PowerPC Options): Likewise.
3541 2018-11-16 Jeff Law <law@redhat.com>
3543 * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
3546 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
3549 * doc/invoke.texi (Optimize Options): Update options enabled by
3550 fprofile-generate, -fprofile-use, and -fauto-profile.
3552 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3555 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
3556 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
3557 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
3559 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
3560 * targhooks.c (default_print_patchable_function_entry): Assert
3561 asm_int_op does not return a NULL string.
3562 * varasm.c (integer_asm_op): Return the op for a partial int type
3563 when the requested size does not correspond to an integer type.
3564 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
3565 * doc/tm.texi: Regenerate.
3567 2018-11-12 Jason Merrill <jason@redhat.com>
3569 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
3571 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
3573 * config/rs6000/constraints.md (wF constraint): Remove power9
3574 fusion documentation. Just document wF's use for power8 fusion.
3575 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
3576 (fusion_gpr_addis): Delete power9 fusion support. Change power8
3577 fusion support to require the upper 12 bits to be all 0's or all
3579 (fusion_gpr_mem_load): Add comment.
3580 (fusion_addis_mem_combo_load): Remove power9 fusion support.
3581 (fusion_addis_mem_combo_store): Delete.
3582 (fusion_offsettable_mem_operand): Delete.
3583 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
3585 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
3586 (POWERPC_MASKS): Delete power9 fusion.
3587 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
3588 (fusion_p9_p): Delete.
3589 (expand_fusion_p9_load): Delete.
3590 (expand_fusion_p9_store): Delete.
3591 (emit_fusion_p9_load): Delete.
3592 (emit_fusion_p9_store): Delete.
3593 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
3595 (rs6000_option_override_internal): Set power8 fusion based on
3596 whether we are tuning for power8. Delete power9 fusion support.
3597 (rs6000_opt_masks): Delete -mpower9-fusion switch.
3598 (emit_fusion_load): Rename emit_fusion_load_store to
3599 emit_fusion_load, and drop fusion store support. Update callers.
3600 (emit_fusion_load_store): Likewise.
3601 (emit_fusion_gpr_load): Likewise.
3602 (fusion_p9_p): Delete.
3603 (expand_fusion_p9_load): Delete.
3604 (expand_fusion_p9_store): Delete.
3605 (emit_fusion_p9_load): Delete.
3606 (emit_fusion_p9_store): Delete.
3607 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
3608 (GPR_FUSION): Delete.
3609 (FPR_FUSION): Delete.
3610 (power9 fusion peephole2s): Delete.
3611 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
3612 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
3613 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
3614 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
3615 (fusion_p9_<mode>_constant): Delete.
3616 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
3617 power9 fusion switch.
3618 * doc/md.texi (PowerPC constraints): Update wF constraint
3619 documentation for power8 fusion only.
3621 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3623 PR rtl-optimization/87475
3624 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
3625 CROSSING_JUMP_P insns.
3626 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
3628 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
3631 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
3632 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
3633 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
3635 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3638 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
3639 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
3641 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
3643 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
3644 location_t parameter.
3645 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3646 (switch_decision_tree::do_jump_if_equal): Likewise.
3647 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
3648 of switch statement to emit_case_nodes.
3649 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
3650 set it on the newly built GIMPLE comparison statement.
3651 (switch_decision_tree::do_jump_if_equal): Likewise.
3652 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
3653 in calls to do_jump_if_equal as well as recursive calls.
3655 2018-11-16 Andi Kleen <ak@linux.intel.com>
3657 * config/i386/i386.md: Allow memory operands to ptwrite.
3659 2018-11-16 Michael Matz <matz@suse.de>
3661 * system.h (PRsa): New macro.
3662 (SIZE_AMOUNT): Cast number to uint64_t.
3663 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
3664 (pool_usage::dump_footer): Likewise and also use PRIu64.
3665 * bitmap.h (bitmap_usage::dump): Likewise.
3666 * ggc-common.c (ggc_usage::dump): Likewise.
3667 * ggc-page.c (ggc_print_statistics): Likewise.
3668 * input.c (dump_line_table_statistics): Likewise.
3669 * mem-stats.h (mem_usage::dump): Likewise.
3670 (mem_usage::dump_footer): Likewise.
3671 * rtl.c (dump_rtx_statistics): Likewise.
3672 * tree-cfg.c (dump_cfg_stats): Likewise.
3673 * tree-dfa.c (dump_dfa_stats): Likewise.
3674 * tree-phinodes.c (phinodes_print_statistics): Likewise.
3675 * tree-ssanames (ssanames_print_statistics): Likewise.
3676 * vec.c (vec_usage::dump): Likewise.
3677 (vec_usage::dump_footer): Likewise.
3679 2018-11-16 Richard Biener <rguenther@suse.de>
3681 PR tree-optimization/88011
3682 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
3683 replacing set_value_range_to_undefined and
3684 set_value_range_to_varying with method calls.
3686 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
3688 * config/s390/s390.md
3689 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
3691 (*r<noxa>sbg_<mode>_sll): Likewise.
3692 (*r<noxa>sbg_<mode>_srl): Likewise.
3693 (*r<noxa>sbg_sidi_srl): New pattern.
3695 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
3697 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
3698 Default to TARGET_VXWORKS_RTP.
3699 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
3700 of TARGET_VXWORKS_RTP.
3701 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
3702 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
3704 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
3707 * doc/extend.texi (Common Type Attributes): Make it explicit
3708 that attribute "packed" can apply to C++ classes.
3710 2018-11-15 Martin Sebor <msebor@redhat.com>
3714 * tree.c (type_argument_type): New function.
3715 * tree.h (type_argument_type): Declare it.
3716 * gcc/doc/extend.texi (alloc_align): Update and clarify.
3717 (alloc_size, nonnull, sentinel): Same.
3719 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
3720 Kwok Cheung Yeung <kcy@codesourcery.com>
3722 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
3723 int_mode_for_size fails.
3724 (vectorizable_load): Likewise.
3726 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3728 * doc/ux.texi (Group logically-related diagnostics): Move
3729 discussion of auto_diagnostic_group into this new subsection.
3730 Give an example of where this grouping is used.
3732 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3735 * Makefile.in (OBJS): Move json.o to...
3736 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
3737 * common.opt (fdiagnostics-format=): New option.
3738 (diagnostics_output_format): New enum.
3739 * diagnostic-format-json.cc: New file.
3740 * diagnostic.c (default_diagnostic_final_cb): New function, taken
3741 from start of diagnostic_finish.
3742 (diagnostic_initialize): Initialize final_cb to
3743 default_diagnostic_final_cb.
3744 (diagnostic_finish): Move "being treated as errors" messages to
3745 default_diagnostic_final_cb. Call any final_cb.
3746 (default_diagnostic_finalizer): Add diagnostic_t param.
3747 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
3748 diagnostic_finalizer callback.
3749 * diagnostic.h (enum diagnostics_output_format): New enum.
3750 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
3751 (struct diagnostic_context): Add "final_cb".
3752 (default_diagnostic_finalizer): Add diagnostic_t param.
3753 (diagnostic_output_format_init): New decl.
3754 * doc/invoke.texi (-fdiagnostics-format): New option.
3755 * dwarf2out.c (gen_producer_string): Ignore
3756 OPT_fdiagnostics_format_.
3757 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
3758 * lto-wrapper.c (append_diag_options): Ignore it.
3759 * opts.c (common_handle_option): Handle it.
3761 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3763 PR tree-optimization/88015
3764 * graphite-isl-ast-to-gimple.c
3765 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
3767 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
3769 2018-11-15 Richard Biener <rguenther@suse.de>
3772 * gimple.c (gimple_call_flags): Union flags from decl, type
3774 * trans-mem.c (is_tm_pure_call): Simplify.
3776 2018-11-15 Richard Biener <rguenther@suse.de>
3778 PR tree-optimization/88031
3779 * tree-vect-loop.c (vectorizable_reduction): Move check
3780 for multiple types earlier so we get the expected dump.
3781 Simplify calls to vectorizable_condition.
3782 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
3783 * tree-vect-stmts.c (vectorizable_condition): Instead of
3784 reduc_def and reduc_index take just a flag. Simplify
3785 code-generation now that we can rely on the defs being set up.
3786 (vectorizable_comparison): Remove unused argument.
3788 2018-11-15 Richard Biener <rguenther@suse.de>
3790 PR tree-optimization/88030
3791 * tree-complex.c (need_eh_cleanup): New global.
3792 (update_complex_assignment): Mark blocks that need EH update.
3793 (expand_complex_comparison): Likewise.
3794 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
3795 perform EH cleanup and schedule CFG cleanup if that did anything.
3797 2018-11-15 Jakub Jelinek <jakub@redhat.com>
3799 PR rtl-optimization/88018
3800 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
3801 on the presence of fallthru edge, rather than if it is a USE or not.
3803 2018-11-15 Richard Biener <rguenther@suse.de>
3806 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
3807 analyze_subscript_affine_affine properly.
3809 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
3811 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
3812 (GLIBC_DYNAMIC_LINKER): Define.
3813 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
3815 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
3817 PR tree-optimization/84648
3818 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
3819 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
3820 by calling adjust_cond_for_loop_until_wrap.
3822 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
3825 * doc/extend.texi (Common Function Attributes): Clarify linker
3826 restrictions on "aligned" attribute.
3827 (Common Variable Attributes): Likewise. Mention that linker
3828 restrictions don't apply to stack-allocated variables.
3830 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
3832 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
3835 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
3839 * doc/invoke.texi (Optimize Options): Remove bad example about
3840 interaction between -flto and -O. Replace it with a note that
3841 you need to compile with -O and not just link. Copy-edit -flto
3842 discussion to reduce verbiage and improve flow.
3844 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
3847 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
3848 also suppress many optimizations. Alphabetize option lists for
3849 -O1, -O2, and -Os. Add list of options disabled with -Og, and
3850 correct documentation for those options to say that.
3851 * opts.c (default_options_table): Sort table by level and option
3852 name, to make it easier to correlate to the manual.
3854 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
3856 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
3857 printing of the names of segment registers.
3859 2018-11-14 Nathan Sidwell <nathan@acm.org>
3863 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
3866 2018-11-14 David Malcolm <dmalcolm@redhat.com>
3868 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
3870 2018-11-14 Jakub Jelinek <jakub@redhat.com>
3872 P1236R1 - Signed integers are two's complement
3873 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
3876 * hash-map.h (hash_map::iterator::reference_pair): New class.
3877 (hash_map::iterator::operator*): Return it rather than std::pair.
3879 2018-11-14 Jeff Law <law@redhat.com>
3881 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
3882 iff the operand is a constant.
3884 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
3886 * gimple-ssa-evrp-analyze.c
3887 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
3888 ignore_equivs_equal_p to equal_p.
3889 * ipa-cp.c (meet_with_1): Use equal_p instead of
3890 ignore_equivs_equal_p.
3891 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
3892 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
3893 (value_range::operator==): Remove.
3894 (value_range::operator!=): Remove.
3895 (vrp_prop::visit_stmt): Use equal_p.
3896 * tree-vrp.h (value_range): Remove operator==, operator!=,
3897 ignore_equivs_equal_p.
3898 * vr-values.c (update_value_range): Use equal_p.
3900 2018-11-14 Michael Matz <matz@suse.de>
3903 * gimplify.c (collect_fallthrough_labels): Add new argument,
3904 return location via that, don't modify statements.
3905 (warn_implicit_fallthrough_r): Adjust call, don't use
3906 statement location directly.
3908 2018-11-14 Richard Biener <rguenther@suse.de>
3911 * tree-data-ref.c (split_constant_offset): Add wrapper
3912 allocating a cache hash-map.
3913 (split_constant_offset_1): Cache results of expanding
3914 expressions from SSA def stmts.
3916 2018-11-14 Richard Biener <rguenther@suse.de>
3919 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
3921 (lambda_vector_mult_const): Likewise.
3922 (lambda_matrix_right_hermite): Use lambda_int temporaries.
3924 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
3925 Jackson Woodruff <jackson.woodruff@arm.com>
3927 PR 71026/tree-optimization
3928 * match.pd: Simplify floating point comparisons.
3930 2018-11-14 Jakub Jelinek <jakub@redhat.com>
3932 PR rtl-optimization/87817
3933 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
3934 last argument has low 8 bits clear, fold to 0.
3936 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
3938 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
3939 MAX_OFILE_ALIGNMENT as needed.
3941 2018-11-14 Richard Biener <rguenther@suse.de>
3943 PR tree-optimization/88019
3944 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
3945 COND_EXPR arguments to non-trapping overflow.
3947 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
3949 * config/arc/arc.h (reg_class): Reorder registers classes, remove
3950 unused register classes.
3951 (REG_CLASS_NAMES): Likewise.
3952 (REG_CLASS_CONTENTS): Likewise.
3953 (FIXED_REGISTERS): Make lp_count fixed.
3954 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
3955 (PROGRAM_COUNTER_REGNO): Remove.
3956 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
3957 register classes, use constants for register numbers, remove
3958 reg_class_contents references.
3959 (arc_process_double_reg_moves): Add asserts.
3960 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
3961 lra_in_progress predicate.
3962 (arc_init_reg_tables): Remove unused register classes.
3963 (arc_register_move_cost): Likewise.
3964 (arc_preferred_reload_class): Likewise.
3965 (hwloop_optimize): Update rtx patterns involving lp_count register.
3966 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
3967 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
3968 CHEAP_CORE_REGS. Former one will be used for LRA.
3969 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
3970 one will be used for LRA.
3971 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
3972 one will be used for LRA.
3973 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
3974 Former one will be used for LRA.
3975 ("f"): Delete constraint.
3978 ("l"): Change it from register constraint to constraint.
3979 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
3980 (movhi_insn): Likewise.
3981 (movsi_insn): Update pattern.
3984 (stack_tie): Remove 'b' constraint letter.
3986 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
3987 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
3988 (R57_REG, R59_REG, PCL_REG): Likewise.
3989 (ILINK1_REGNUM): Renamed to ILINK1_REG.
3990 (ILINK2_REGNUM): Renamed to ILINK2_REG.
3992 (SP_REGS): Likewise.
3993 (Rcw): Remove unused reg classes.
3994 * config/arc/predicates.md (dest_reg_operand): Just default on
3995 register_operand predicate.
3996 (mpy_dest_reg_operand): Likewise.
3997 (move_dest_operand): Use macros instead of constants.
3998 * config/arc/arc.opt (mlra): Switch to lra as default.
4000 2018-11-14 Richard Biener <rguenther@suse.de>
4002 PR tree-optimization/87974
4003 * tree-vect-loop.c (vectorizable_reduction): When computing
4004 the vectorized reduction PHI vector type ignore constant
4007 2018-11-14 Jakub Jelinek <jakub@redhat.com>
4009 PR tree-optimization/87977
4010 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
4011 stmt, build a new one and replace the old one with it. Formatting fix.
4012 Call release_ssa_name (x) if !has_other_use and !delete_div.
4013 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
4014 verify lhs of stmt is still def.
4016 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
4018 PR rtl-optimization/87507
4019 * lower-subreg.c (operand_for_swap_move_operator): New function.
4020 (simple_move): Strip simple operators.
4021 (find_pseudo_copy): Likewise.
4022 (resolve_operand_for_swap_move_operator): New function.
4023 (resolve_simple_move): Strip simple operators and swap operands.
4025 2018-11-13 Jakub Jelinek <jakub@redhat.com>
4027 PR tree-optimization/87898
4028 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
4029 (ipa_simd_modify_function_body): Remove debug stmts where the first
4030 argument was changed into a non-decl.
4032 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
4034 PR rtl-optimization/87899
4035 * lra-lives.c (start_living): Update white space in comment.
4036 (enum point_type): New.
4037 (sparseset_contains_pseudos_p): New function.
4038 (update_pseudo_point): Likewise.
4039 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
4040 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
4041 handling. Move early exit after adding conflicts.
4042 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
4043 if regno is already live. Remove all handling of program points.
4044 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
4045 after adding conflicts. Remove all handling of program points and
4046 ignore_reg_for_conflicts.
4047 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
4048 and do not guard call to mark_pseudo_live.
4049 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
4050 and do not guard call to mark_pseudo_dead.
4051 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
4052 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
4053 Use new function update_pseudo_point. Handle register copies by
4054 removing the source register from the live set. Handle INOUT operands.
4055 Update to the next program point using the unused_set, dead_set and
4057 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
4059 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4061 * builtins.c: Replace "source_location" with "location_t".
4062 * diagnostic-show-locus.c: Likewise.
4063 * diagnostic.c: Likewise.
4064 * dumpfile.c: Likewise.
4065 * gcc-rich-location.h: Likewise.
4066 * genmatch.c: Likewise.
4067 * gimple.h: Likewise.
4068 * gimplify.c: Likewise.
4069 * input.c: Likewise.
4070 * input.h: Likewise. Eliminate the typedef.
4071 * omp-expand.c: Likewise.
4072 * selftest.h: Likewise.
4073 * substring-locations.h (get_source_location_for_substring):
4075 (get_location_within_string): ...this.
4076 * tree-cfg.c: Replace "source_location" with "location_t".
4077 * tree-cfgcleanup.c: Likewise.
4078 * tree-diagnostic.c: Likewise.
4079 * tree-into-ssa.c: Likewise.
4080 * tree-outof-ssa.c: Likewise.
4081 * tree-parloops.c: Likewise.
4082 * tree-phinodes.c: Likewise.
4083 * tree-phinodes.h: Likewise.
4084 * tree-ssa-loop-ivopts.c: Likewise.
4085 * tree-ssa-loop-manip.c: Likewise.
4086 * tree-ssa-phiopt.c: Likewise.
4087 * tree-ssa-phiprop.c: Likewise.
4088 * tree-ssa-threadupdate.c: Likewise.
4089 * tree-ssa.c: Likewise.
4090 * tree-ssa.h: Likewise.
4091 * tree-vect-loop-manip.c: Likewise.
4093 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
4095 * doc/extend.texi: Fix typo in the weakref description.
4097 2018-11-13 Richard Biener <rguenther@suse.de>
4099 PR tree-optimization/86991
4100 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
4101 group building until we have successfully detected the SLP
4103 (vect_is_simple_reduction): Remove fixup code here.
4105 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4107 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
4108 (dump_gimple_stmt): Use it.
4109 (dump_gimple_stmt_loc): Likewise.
4110 (dump_gimple_expr): Likewise.
4111 (dump_gimple_expr_loc): Likewise.
4112 (dump_generic_expr): Likewise.
4113 (dump_generic_expr_loc): Likewise.
4114 (dump_printf): Likewise.
4115 (dump_printf_loc): Likewise.
4116 (dump_dec): Likewise.
4117 (dump_dec): Likewise.
4118 (dump_hex): Likewise.
4119 (dump_symtab_node): Likewise.
4120 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
4121 Guard dump call with dump_enabled_p.
4122 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
4123 * graphite-optimize-isl.c (optimize_isl): Likewise.
4124 * graphite.c (graphite_transform_loops): Likewise.
4125 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
4126 * tree-parloops.c (parallelize_loops): Likewise.
4127 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
4128 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
4129 (vect_prune_runtime_alias_test_list): Likewise.
4130 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
4131 (vect_estimate_min_profitable_iters): Likewise.
4132 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
4133 (vect_build_slp_tree_2): Likewise.
4134 (vect_supported_load_permutation_p): Likewise.
4135 (vect_slp_analyze_operations): Likewise.
4136 (vect_slp_analyze_bb_1): Likewise.
4137 (vect_slp_bb): Likewise.
4138 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
4139 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
4140 (pass_slp_vectorize::execute): Likewise.
4141 (increase_alignment): Likewise.
4143 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4146 * ipa-inline.c (report_inline_failed_reason): Guard calls to
4147 cl_target_option_print_diff and cl_optimization_print_diff with
4150 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4152 * doc/invoke.texi (-fsave-optimization-record): Note that the
4153 output is compressed.
4154 * optinfo-emit-json.cc: Include <zlib.h>.
4155 (optrecord_json_writer::write): Compress the output.
4157 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
4159 * tree-vrp.c (value_range_base::dump): Dump type.
4160 Do not use INF nomenclature for 1-bit types.
4161 (dump_value_range): Group all variants to common dumping code.
4162 (debug): New overloaded functions for value_ranges.
4163 (value_range_base::dump): Remove no argument version.
4164 (value_range::dump): Same.
4166 2018-11-13 Richard Biener <rguenther@suse.de>
4168 PR tree-optimization/87931
4169 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
4170 nested cycles we support to latch computations vectorizable_reduction
4173 2018-11-13 Martin Liska <mliska@suse.cz>
4175 PR tree-optimization/87885
4176 * cfghooks.c (account_profile_record): Rename
4178 (profile_record_check_consistency): ... this.
4179 Calculate missing num_mismatched_freq_in.
4180 (profile_record_account_profile): New function
4181 that calculates time and size of a function.
4182 * cfghooks.h (struct profile_record): Remove
4184 (struct cfg_hooks): Remove after_pass flag.
4185 (account_profile_record): Rename to ...
4186 (profile_record_check_consistency): ... this.
4187 (profile_record_account_profile): New.
4188 * cfgrtl.c (rtl_account_profile_record): Remove
4190 * passes.c (check_profile_consistency): Do only
4192 (account_profile): Calculate size and time of
4194 (pass_manager::dump_profile_report): Reformat
4196 (execute_one_ipa_transform_pass): Call
4197 consistency check before clean upand call account_profile
4198 after a clean up is done.
4199 (execute_one_pass): Call check_profile_consistency and
4200 account_profile instead of using after_pass flag..
4201 * tree-cfg.c (gimple_account_profile_record): Likewise.
4203 2018-11-13 Martin Liska <mliska@suse.cz>
4206 * config/i386/i386.c (ix86_option_override_internal): Error
4207 about usage -mabi=ms and -fsanitize={,kernel-}address.
4209 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
4211 * config/aarch64/aarch64.c
4212 (aarch64_vectorize_preferred_vector_alignment): Change return type to
4214 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
4215 alignment being a poly int.
4216 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
4217 return type to poly_uint64.
4218 * target.def (default_preferred_vector_alignment): Likewise.
4219 * targhooks.c (default_preferred_vector_alignment): Likewise.
4220 * targhooks.h (default_preferred_vector_alignment): Likewise.
4221 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
4222 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
4224 (vect_update_misalignment_for_peel): Likewise.
4225 (vect_enhance_data_refs_alignment): Likewise.
4226 (vect_find_same_alignment_drs): Likewise.
4227 (vect_duplicate_ssa_name_ptr_info): Likewise.
4228 (vect_setup_realignment): Likewise.
4229 (vect_can_force_dr_alignment_p): Change alignment parameter type to
4231 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
4232 mask with a compile time variable vector alignment.
4233 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
4235 (vect_do_peeling): Exit early if vector alignment is not constant.
4236 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
4238 (vectorizable_store): Likewise.
4239 (vectorizable_load): Likweise.
4240 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
4242 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
4244 (vect_can_force_dr_alignment_p): Change alignment parameter type to
4247 2018-11-13 Richard Biener <rguenther@suse.de>
4249 PR tree-optimization/87962
4250 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
4251 detect outer reduction for disqualifying in-loop uses.
4253 2018-11-13 Richard Biener <rguenther@suse.de>
4255 PR tree-optimization/87967
4256 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
4257 for constants for the scalar loop.
4259 2018-11-13 Alan Modra <amodra@gmail.com>
4261 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
4262 integer constants when -mcmodel=medium.
4264 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4266 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
4267 * config/arc/elf.h (PROFILE_HOOK): Define.
4268 * config/arc/linux.h (PROFILE_HOOK): Likewise.
4270 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4272 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
4273 jump table data in the text section.
4275 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4277 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
4278 to fit the eh_return pattern.
4279 * config/arc/arc.md (eh_return): Define.
4280 (VUNSPEC_ARC_EH_RETURN): Likewise.
4281 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
4283 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
4286 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4288 * common/config/arc/arc-common.c (arc_option_optimization_table):
4289 Millicode optimization is default on for size optimizations.
4290 * config/arc/arc-protos.h (arc_check_multi): New function.
4291 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
4292 (ENTER_LEAVE_START_REG): Define.
4293 (ENTER_LEAVE_END_REG): Likewise.
4294 (arc_override_options): Disable millicode when long calls option
4296 (arc_frame_info): Change it from int to bool.
4297 (arc_compute_frame_size): Clean up.
4298 (arc_save_restore): Remove.
4299 (frame_save_reg): New function.
4300 (frame_restore_reg): Likewise.
4301 (arc_enter_leave_p): Likewise.
4302 (arc_save_callee_saves): Likewise.
4303 (arc_restore_callee_saves): Likewise.
4304 (arc_save_callee_enter): Likewise.
4305 (arc_restore_callee_leave): Likewise.
4306 (arc_save_callee_milli): Likewise.
4307 (arc_restore_callee_milli): Likewise.
4308 (arc_expand_prologue): Reimplement to emit enter/leave
4310 (arc_expand_epilogue): Likewise.
4311 (arc_check_multi): New function.
4312 * config/arc/arc.md (push_multi_fp): New pattern.
4313 (push_multi_fp_blink): Likewise.
4314 (pop_multi_fp): Likewise.
4315 (pop_multi_fp_blink): Likewise.
4316 (pop_multi_fp_ret): Likewise.
4317 (pop_multi_fp_blink_ret): Likewise.
4318 * config/arc/arc.opt (mmillicode): Update option.
4319 (mcode-density-frame): New option.
4320 * config/arc/predicates.md (push_multi_operand): New predicate.
4321 (pop_multi_operand): Likewise.
4322 * doc/invoke.texi (ARC): Update ARC options information.
4325 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
4327 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
4328 * config/arc/arc.c (operands_ok_ldd_std): New function.
4329 (mem_ok_for_ldd_std): Likewise.
4330 (gen_operands_ldd_std): Likewise.
4331 * config/arc/arc.md: Add peephole2 rules for std/ldd.
4333 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
4335 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
4336 test on stack_usage_file.
4337 (lang_dependent_init): Do not open the .su file if generating LTO.
4339 2018-11-13 Jakub Jelinek <jakub@redhat.com>
4341 PR rtl-optimization/87918
4342 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
4343 simplify_gen_relational rather than simplify_gen_binary.
4345 2018-11-13 Richard Biener <rguenther@suse.de>
4347 * tree-ssanames.h (set_range_info): Use value_range_base.
4348 (get_range_info): Likewise.
4349 * tree-ssanames.c (set_range_info): Likewise.
4350 (get_range_info): Likewise.
4351 * tree-vrp.c (value_range_base::union_helper): Split
4352 out common parts of value_range[_base]::union_.
4353 (value_range_base::union_): Update.
4354 (value_range::union_): Likewise.
4355 (determine_value_range_1): Use value_range_base.
4356 (determine_value_range): Likewise.
4357 * tree-vrp.h (value_range_base::union_helper): Move ...
4358 (value_range::union_helper): ... from here.
4360 2018-11-13 Alan Modra <amodra@gmail.com>
4362 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
4364 (rs6000_secondary_reload_gpr): Don't call find_replacement.
4366 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
4369 * doc/invoke.texi (Optimize Options): Clarify that the
4370 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
4371 apply to data cache size.
4373 2018-11-13 Alan Modra <amodra@gmail.com>
4375 * config/rs6000/predicates.md (logical_const_operand),
4376 (logical_operand): Correct comment.
4377 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
4379 2018-11-13 Alan Modra <amodra@gmail.com>
4381 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
4383 2018-11-13 Alan Modra <amodra@gmail.com>
4385 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
4387 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
4388 covered by alternative.
4389 (movcc_internal1): Ignore h for register preference.
4390 (mov<mode>_hardfloat64): Likewise.
4391 (mov<mode>_softfloat): Ignore c, l, h for register preference.
4393 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
4395 PR preprocessor/47823
4396 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
4399 * doc/extend.texi (Pragmas): Note additional pragmas documented
4402 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
4406 * tree-scalar-evolution.c (expression_expensive_p): Make
4407 BUILTIN POPCOUNT as expensive when backend does not define it.
4409 2018-11-12 Fredrik Noring <noring@nocrew.org>
4411 * config.gcc: Update with-llsc defaults for MIPS r5900.
4413 2018-11-12 Martin Liska <mliska@suse.cz>
4415 PR gcov-profile/87442
4416 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
4418 * doc/invoke.texi: Document them.
4419 * tree-profile.c (parse_profile_filter): New.
4420 (parse_profile_file_filtering): Likewise.
4421 (release_profile_file_filtering): Likewise.
4422 (include_source_file_for_profile): Likewise.
4423 (tree_profiling): Filter source files based on the
4424 newly added options.
4426 2018-11-12 Martin Liska <mliska@suse.cz>
4429 * doc/extend.texi: Add missing values for __builtin_cpu_is and
4430 __builtin_cpu_supports for x86 target.
4432 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
4435 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
4437 (Arithmetic): Likewise for "lo_sum".
4439 2018-11-12 Renlin Li <renlin.li@arm.com>
4442 * dse.c (get_stored_val): Add check for compile-time constantness
4445 2018-11-12 Sudakshina Das <sudi.das@arm.com>
4447 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
4448 (ARMv8_5a): New fgroup.
4449 (armv8.5-a): New arch.
4450 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
4452 * config/arm/arm-tables.opt: Regenerate.
4453 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
4454 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
4455 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
4456 Add matching rules for -march=armv8.5-a and extensions.
4457 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
4458 Add sb and predres to all armv8-a except armv8.5-a.
4460 2018-11-12 Richard Biener <rguenther@suse.de>
4462 * tree-vrp.h (value_range[_base]::set): Make public. Provide
4463 overload for single value.
4464 (value_range[_base]::set_nonnull): New.
4465 (value_range[_base]::set_null): Likewise.
4466 (value_range): Document bitmap copying behavior, mark
4467 copy constructor and assignment operator deleted.
4468 (value_range::move): New.
4469 (value_range::set_and_canonicalize): Default bitmap to zero.
4470 (set_value_range_to_nonnull): Remove.
4471 (set_value_range_to_null): Likewise.
4472 (set_value_range): Likewise.
4473 (set_value_range_to_value): Likewise.
4474 (extract_range_from_unary_expr): Work on value_range_base.
4475 (extract_range_from_binary_expr_1): Likewise. Rename to...
4476 (extract_range_from_binary_expr): ... this.
4477 * tree-vrp.c (value_range::update): Clear equiv bitmap
4479 (value_range::move): New, move equiv bitmap.
4480 (value_range_base::set_undefined): Avoid assignment.
4481 (value_range::set_undefined): Likewise.
4482 (value_range_base::set_varying): Likewise.
4483 (value_range::set_varying): Likewise.
4484 (set_value_range): Remove.
4485 (value_range_base::set): New overload for value.
4486 (value_range::set): Likewise.
4487 (set_value_range_to_nonnull): Remove.
4488 (value_range_base::set_nonnull): New.
4489 (value_range::set_nonnull): Likewise.
4490 (set_value_range_to_null): Remove.
4491 (value_range_base::set_null): New.
4492 (value_range::set_null): Likewise.
4493 (range_is_null): Work on value_range_base.
4494 (range_is_nonnull): Likewise.
4495 (ranges_from_anti_range): Likewise.
4496 (extract_range_into_wide_ints): Likewise.
4497 (extract_range_from_multiplicative_op): Likewise.
4498 (extract_range_from_binary_expr): Likewise. Update for API changes.
4499 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
4501 (value_range::intersect_helper): Avoid copy and assignment.
4502 (value_range::union_helper): Likewise.
4503 (determine_value_range_1): Adjust.
4504 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
4505 Avoid assignment by using move.
4506 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
4507 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4509 * tree-ssanames.c (get_range_info): Likewise.
4510 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
4511 * vr-values.c (vr_values::get_value_range): Adjust.
4512 (vr_values::update_value_range): Likewise.
4513 (symbolic_range_based_on_p): Work on value_range_base.
4514 (vr_values::extract_range_from_binary_expr): Use value_range_base.
4515 (vr_values::extract_range_from_unary_expr): Likewise.
4516 (vr_values::extract_range_from_cond_expr): Avoid assignment.
4517 (vr_values::extract_range_from_comparison): Adjust.
4518 (vr_values::check_for_binary_op_overflow): Use value_range_base.
4519 (vr_values::extract_range_basic): Adjust.
4520 (vr_values::adjust_range_with_scev): Likewise.
4521 (vr_values::vrp_visit_assignment_or_call): Likewise.
4522 (vr_values::get_vr_for_comparison): Change API to avoid
4523 assignment and copy construction.
4524 (vr_values::compare_name_with_value): Adjust accordingly.
4525 (vr_values::compare_names): Likewise.
4526 (vr_values::extract_range_from_phi_node): Avoid assignment and
4527 bogus in-place modify of equiv bitmap.
4528 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
4529 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
4530 for extract_range_from_unary_expr API change.
4531 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
4533 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
4535 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
4537 2018-11-12 Richard Biener <rguenther@suse.de>
4539 * tree-vrp.h (value_range_base::symbolic_p,
4540 value_range_base::constant_p, value_range_base::zero_p,
4541 value_range_base::singleton_p): Move from value_range.
4542 (value_range::dump): Add.
4543 * gimple-ssa-evrp-analyze.c
4544 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
4545 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
4546 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4548 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
4549 (value_range::constant_p): Likewise.
4550 (value_range::singleton_p): Likewise.
4551 (value_range_base::dump): Add.
4552 (set_value_range_to_undefined): Remove.
4553 (set_value_range_to_varying): Likewise.
4554 (range_int_cst_p): Take value_range_base argument.
4555 (range_int_cst_singleton_p): Likewise.
4556 (value_range_constant_singleton): Likewise.
4557 (vrp_set_zero_nonzero_bits): Likewise.
4558 (extract_range_from_multiplicative_op): Use set_varying.
4559 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
4560 (extract_range_from_unary_expr): Likewise.
4561 (dump_value_range_base): Change to overload of dump_value_range.
4562 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
4563 (vrp_prop::visit_stmt): Likewise.
4564 (value_range::intersect_helper): Likewise.
4565 (value_range::union_helper): Likewise.
4566 (determine_value_range_1): Likewise.
4568 2018-11-12 Richard Biener <rguenther@suse.de>
4570 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
4571 (set_value_range_to_null): Likewise.
4572 * vr-values.c (vr_values::extract_range_from_comparison):
4573 Clear equiv for constant singleton ranges.
4575 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
4577 * config/i386/sse.md: Combine VFIXUPIMM* patterns
4578 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4579 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4580 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
4581 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4582 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4583 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
4585 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
4588 * doc/extend.texi (Common Type Attributes): For the align type
4589 attribute, copy language about decreasing alignment from the
4590 corresponding variable attribute.
4592 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
4594 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
4597 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
4600 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
4601 -frtti and -fno-rtti code.
4603 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
4606 * doc/extend.texi (Other Builtins): Document probability associated
4607 with __builtin_expect.
4609 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
4612 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
4613 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
4614 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
4615 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
4617 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
4619 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
4621 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
4623 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
4625 2018-11-11 Richard Biener <rguenther@suse.de>
4627 * tree-vrp.h (class value_range_base): New base class for
4628 value_range containing all but the m_equiv member.
4629 (dump_value_range_base): Add.
4630 (range_includes_zero_p): Work on value_range_base.
4631 * tree-vrp.c (value_range_base::set): Split out base handling
4633 (value_range::set): this.
4634 (value_range::set_equiv): New.
4635 (value_range_base::value_range_base): New constructors.
4636 (value_range_base::check): Split out base handling from...
4637 (value_range::check): this.
4638 (value_range::equal_p): Refactor in terms of
4639 ignore_equivs_equal_p which is now member of the base.
4640 (value_range_base::set_undefined): New.
4641 (value_range_base::set_varying): Likewise.
4642 (value_range_base::dump):Split out base handling from...
4643 (value_range::dump): this.
4644 (value_range_base::set_and_canonicalize): Split out base handling
4646 (value_range::set_and_canonicalize): this.
4647 (value_range_base::union_): New.
4648 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
4650 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
4651 instead of value_range everywhere.
4652 (ipcp_vr_lattice::print): Use dump_value_range_base.
4653 (ipcp_vr_lattice::meet_with): Adjust.
4654 (ipcp_vr_lattice::meet_with_1): Likewise.
4655 (ipa_vr_operation_and_type_effects): Likewise.
4656 (propagate_vr_across_jump_function): Likewise.
4657 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
4658 (ipa_get_value_range): Likewise.
4659 (ipa_set_jfunc_vr): Likewise.
4660 (ipa_compute_jump_functions_for_edge): Likewise.
4662 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
4665 * doc/invoke.texi (Optimize Options): Add @opindex entries
4666 for the positive forms of -fno-xxx and -mno-xxx options
4667 that were lacking them.
4669 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
4671 * combine.c (make_more_copies): Only make an intermediate copy if the
4672 dest of a move is a pseudo.
4674 2018-11-09 Maya Rashish <coypu@sdf.org>
4677 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
4678 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
4680 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
4684 * doc/invoke.texi (Optimize Options): Clarify default behavior
4685 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
4687 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
4689 PR tree-optimization/87940
4690 * expr.c (string_constant): Don't strip NOPS in subexpressions.
4691 Fold PLUS_EXPR correctly.
4693 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
4696 * config/s390/s390.c (s390_safe_relative_long_p): New function.
4697 (annotate_constant_pool_refs): Skip insns which support
4698 relative addressing.
4699 (annotate_constant_pool_refs_1): New helper function.
4700 (find_constant_pool_ref): Skip insns which support relative
4702 (find_constant_pool_ref_1): New helper function.
4703 (replace_constant_pool_ref): Skip insns which support
4704 relative addressing.
4705 (replace_constant_pool_ref_1): New helper function.
4706 (s390_mainpool_start): Adapt to the new signature.
4707 (s390_mainpool_finish): Likewise.
4708 (s390_chunkify_start): Likewise.
4709 (s390_chunkify_finish): Likewise.
4710 (pass_s390_early_mach::execute): Likewise.
4711 (s390_prologue_plus_offset): Likewise.
4712 (s390_emit_prologue): Likewise.
4713 (s390_emit_epilogue): Likewise.
4715 2018-11-09 Jakub Jelinek <jakub@redhat.com>
4717 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
4718 but unsupported lastprivate with conditional modifier.
4720 2018-11-09 Jeff Law <law@redhat.com>
4722 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
4723 unused argument better. Add gcc_unreachable to silence warning.
4725 2018-11-09 Martin Sebor <msebor@redhat.com>
4728 * attribs.c (has_attribute): New helper function.
4729 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
4730 * attribs.h (decls_mismatched_attributes): Declare.
4731 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
4732 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
4733 * common.opt (-Wattribute-alias): Take an argument.
4734 (-Wno-attribute-alias): New option.
4735 * doc/extend.texi (Common Function Attributes): Document copy.
4736 (Common Variable Attributes): Same.
4737 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
4738 (-Wattribute-alias): Document new option argument.
4740 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
4742 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
4743 matching criteria. Remove unused array initializer.
4745 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
4746 Jinsong Ji <jji@us.ibm.com>
4748 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
4749 constraints by introducing a new temporary.
4750 (_mm_cvtss_si64): Likewise.
4752 2018-11-09 Martin Liska <mliska@suse.cz>
4754 * common.opt: Add -fipa-stack-alignment flag.
4755 * doc/invoke.texi: Document it.
4756 * final.c (rest_of_clean_state): Guard stack
4757 shrinking with flag.
4759 2018-11-09 Martin Liska <mliska@suse.cz>
4761 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
4763 (ipa_discover_variable_flags): ... this.
4764 * common.opt: Come up with new flag -fipa-reference-addressable.
4765 * doc/invoke.texi: Document it.
4766 * ipa-reference.c (propagate): Call the renamed fn.
4767 * ipa-visibility.c (whole_program_function_and_variable_visibility):
4769 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
4771 (ipa_discover_variable_flags): ... this. Discover
4772 non-addressable variables only with the newly added flag.
4773 * opts.c: Enable the newly added flag with -O1 and higher
4776 2018-11-09 David Malcolm <dmalcolm@redhat.com>
4778 * json.cc (selftest::test_writing_literals): Fix comment.
4780 2018-11-09 Martin Liska <mliska@suse.cz>
4782 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
4783 string to a stack buffer.
4784 (aarch64_parse_cpu): Likewise.
4785 (aarch64_parse_tune): Likewise.
4787 2018-11-09 Richard Biener <rguenther@suse.de>
4789 PR tree-optimization/87953
4790 * tree-vect-loop.c (vectorizable_reduction): For analysis
4791 always pass ops[0] to vectorizable_condition.
4793 2018-11-09 Stafford Horne <shorne@gmail.com>
4794 Richard Henderson <rth@twiddle.net>
4795 Joel Sherrill <joel@rtems.org>
4797 * common/config/or1k/or1k-common.c: New file.
4798 * config/or1k/*: New.
4799 * config.gcc (or1k*-*-*): New.
4800 * configure.ac (or1k*-*-*): New test for openrisc tls.
4801 * configure: Regenerated.
4802 * doc/install.texi: Document OpenRISC triplets.
4803 * doc/invoke.texi: Document OpenRISC arguments.
4804 * doc/md.texi: Document OpenRISC.
4806 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
4808 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
4809 (arm7tdmi-s): Delete CPU.
4810 (arm710t): Add aliases for arm720t and arm740t.
4811 (arm720t, arm740t): Delete CPUs.
4812 (arm920t): Add aliases for arm920, arm922t and arm940t.
4813 (arm920, arm922t, arm940t): Delete CPUs.
4814 (arm10tdmi): Add alias for arm1020t.
4815 (arm1020t): Delete CPU.
4816 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
4817 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
4818 (arm10e): Add aliases for arm1020e and arm1022e.
4819 (arm1020e, arm1022e): Delete CPU.
4820 * config/arm/arm.md (generic_sched): Remove entries that are now
4822 (generic_vfp): Likewise.
4823 * config/arm/arm1020e.md: Simplify tuning selection based on alias
4825 * config/arm/arm-tune.md: Regenerated.
4826 * config/arm/arm-tables.opt: Regenerated.
4828 2018-11-09 Richard Biener <rguenther@suse.de>
4830 PR tree-optimization/87621
4831 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
4832 op with only phi inputs.
4833 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
4834 (ch_base::copy_headers): Run CSE on copied loop headers.
4835 (pass_ch_vect::process_loop_p): Simplify.
4837 2018-11-09 Alexandre Oliva <oliva@adacore.com>
4839 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
4840 for non-w64 x86_64 biarch.
4842 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
4844 PR rtl-optimization/86438
4845 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
4846 of in_b for the compare if in_b is SET_DEST.
4849 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
4850 non-toplevel UNSPEC.
4852 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4854 * tree-vrp.c (value_range::check): Do not access internals
4856 (value_range::singleton_p): Same.
4857 (value_range::type): Same.
4858 (vrp_finalize): Use value_range API.
4860 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4862 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
4864 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4866 * vr-values.c (vr_values::get_value_range): Use value_range API
4867 instead of piecing together ranges.
4868 (vr_values::update_value_range): Same.
4870 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
4872 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
4873 of performing ad-hoc calculations.
4874 * tree-ssanames.c (set_range_info): New overloaded function
4875 accepting value_range &.
4876 (get_range_info): Same.
4877 * tree-ssanames.h (set_range_info_raw): Remove.
4878 (set_range_info): New prototype.
4879 (get_range_info): Same.
4880 * tree-vrp.h (value_range::null_p): Rename to zero_p.
4881 * tree-vrp.c (value_range::null_p): Same.
4883 2018-11-09 Jan Hubicka <jh@suse.cz>
4885 * tree.c (fld_type_variant_equal_p): Test user align flag.
4886 (flt_type_variant): Copy user align flag.
4887 (fld_incomplete_type_of): Clear it.
4889 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4891 * config/arm/neon.md (div<mode>3): New pattern.
4893 2018-11-08 Andi Kleen <ak@linux.intel.com>
4895 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
4896 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
4897 (ix86_handle_option): Handle OPT_mptwrite.
4898 * config/i386/cpuid.h (bit_PTWRITE): Add.
4899 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
4900 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
4901 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
4902 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
4903 (ix86_option_override_internal): Handle PTA_PTWRITE.
4904 (ix86_valid_target_attribute_inner_p): Define ptwrite.
4905 (def_builtin2): Force UINT64 to be 64bit only.
4906 * config/i386/i386.h (TARGET_PTWRITE): Add.
4907 (TARGET_PTWRITE_P): Add.
4909 * config/i386/i386.md: Define ptwrite.
4910 * config/i386/i386.opt: Add -mptwrite.
4911 * config/i386/immintrin.h (_ptwrite64): Add.
4913 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
4914 * doc/invoke.texi: Document -mptwrite.
4916 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
4918 PR rtl-optimization/87600
4919 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
4920 * lra-constraints.c (process_alt_operands): Skip illegal hard
4921 register usage. Prefer reloading non hard register operands.
4923 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
4926 * doc/invoke.texi (Optimize Options): Clarify default behavior
4927 for -fno-sched-interblock and -fno-sched-spec.
4929 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
4931 * collect2.c (linker_select): Add USE_LLD_LD.
4932 (ld_suffixes): Add ld.lld.
4933 (main): Handle -fuse-ld=lld.
4934 * common.opt (-fuse-ld=lld): New option.
4935 * doc/invoke.texi (-fuse-ld=lld): Document.
4936 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
4938 2018-11-08 Paul Koning <ni1d@arrl.net>
4940 * config/pdp11/constraints.md: Add "Z" series constraints for use
4941 with pre-dec and post-inc addressing.
4942 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
4943 (pdp11_expand_operands): Add int argument (word count).
4944 (pdp11_sp_frame_offset): Delete.
4945 (pdp11_cmp_length): New function.
4946 (pushpop_regeq): New function.
4947 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
4949 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
4951 (pdp11_initial_elimination_offset): Ditto.
4952 (pdp11_expand_operands): Add word count argument. Bugfixes.
4953 (output_move_multiple): Change how pointer adjustment is done.
4954 (pdp11_gen_int_label): Correct format.
4955 (output_ascii): Ditto.
4956 (pdp11_asm_output_var): Add code for DEC assembler case.
4957 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
4959 (legitimate_const_double_p): Ditto.
4960 (pdp11_register_move_cost): Adjust for new register classes.
4961 (pdp11_regno_reg_class): Ditto.
4962 (expand_block_move): Delete.
4963 (pushpop_regeq): New function.
4964 (pdp11_legitimate_address_p): Bugfix in check for constant
4966 (pdp11_sp_frame_offset): Delete.
4967 (pdp11_reg_save_size): New helper function for new frame layout.
4968 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
4969 (pdp11_expand_shift): Bugfix in check for constant shift count.
4970 (pdp11_shift_length): Ditto.
4971 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
4972 (pdp11_cmp_length): New function.
4973 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
4974 some compile options.
4975 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
4976 (CALL_USED_REGISTERS): Ditto.
4977 (ELIMINABLE_REGS): Ditto.
4978 (REGISTER_NAMES): Ditto.
4979 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
4981 (REG_CLASS_NAMES): Ditto.
4982 (REG_CLASS_CONTENTS): Ditto. Also remove
4983 HARD_FRAME_POINTER_REGNUM.
4984 (CPU_REG_CLASS): New macro.
4985 (CLASS_MAX_NREGS): Adjust for new register classes.
4986 (FUNCTION_PROFILER): Make no-op.
4987 (may_call_alloca): Remove unused declaration.
4988 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
4989 (ASM_OUTPUT_SKIP): Fix format.
4990 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
4991 (HARD_FRAME_POINTER_REGNUM): Remove.
4993 (*rts): Rename. Remove epilogue related checks.
4994 (cmpsi, cmpdi): New insn.
4995 (cbranch<mode>4): Change to apply to SI and DI modes as well.
4996 (mov<mode>): Change constraints to enforce that push/pop
4997 destination cannot use the same register as source.
4998 (*mov<mode><cc_cc>): Ditto.
4999 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
5000 at assembly output rather than as RTL expander.
5001 (zero_extendqihi2): Bugfix in check for same registers.
5002 (adddi3_nocc): Bugfix in check for constant operand.
5003 (addsi3_nocc): Ditto.
5004 (subdi3_nocc): Ditto.
5005 (subsi3_nocc): Ditto.
5006 (negdi2_nocc): Copy input to pdp11_expand_operands.
5007 (negsi2_nocc): Ditto.
5008 (bswap2_nocc): Ditto.
5009 * config/pdp11/pdp11.opt (mlra): Fix documentation.
5010 * config/pdp11/t-pdp11: Use -Os.
5012 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
5014 * config/arm/parsecpu.awk (/alias/): New parsing rule.
5015 (/begin cpu/): Check that the cpu name hasn't been previously defined.
5016 (gen_comm_data): Print out CPU alias tables.
5017 (check_cpu): Match aliases when checking the CPU name.
5018 * config/arm/arm-protos.h (cpu_alias): New structure.
5019 (cpu_option): Add entry for aliases.
5020 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
5021 strongarm1100 and strongarm1110.
5022 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
5023 (config/arm/arm-generic.md): Remove redundant references to
5024 strongarm110, strongarm1100 and strongarm1110.
5025 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
5026 Scan aliases for additional hints.
5027 (arm_parse_cpu_option_name): Also match a cpu name against the list
5029 * config/arm/arm-tables.opt: Regenerated.
5030 * config/arm/arm-tune.md: Regenerated.
5032 2018-11-08 Jakub Jelinek <jakub@redhat.com>
5034 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
5035 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
5036 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
5037 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
5038 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
5039 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
5040 * gengtype.c (open_base_files): Add omp-general.h.
5041 * gimple.c (gimple_build_omp_critical):
5042 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
5043 gimple_omp_taskgroup_set_clauses.
5044 (gimple_build_omp_atomic_load): Add mo argument, call
5045 gimple_omp_atomic_set_memory_order.
5046 (gimple_build_omp_atomic_store): Likewise.
5047 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
5048 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
5050 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
5051 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
5052 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
5053 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
5054 different value for GF_OMP_ATOMIC_NEED_VALUE.
5055 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
5057 (struct gimple_statement_omp_single_layout): And remove here.
5058 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
5059 than gimple_statement_omp_single_layout.
5060 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
5062 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
5063 (gimple_omp_subcode): Formatting fix.
5064 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
5065 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
5066 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
5067 gimple_omp_teams_host, gimple_omp_teams_set_host,
5068 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
5069 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
5070 gimple_omp_taskgroup_set_clauses): New inline functions.
5071 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
5072 (gimple_build_omp_atomic_store): Likewise.
5073 (gimple_omp_atomic_seq_cst_p): Remove.
5074 (gimple_omp_atomic_memory_order): New function.
5075 (gimple_omp_atomic_set_seq_cst): Remove.
5076 (gimple_omp_atomic_set_memory_order): New function.
5077 (gimple_build_omp_taskgroup): Add clauses argument.
5078 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
5079 (dump_gimple_omp_task): Print taskwait with depend clauses.
5080 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
5081 dump_omp_atomic_memory_order.
5082 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
5083 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
5084 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
5085 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
5086 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
5087 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
5088 ORT_UNTIED_TASKLOOP enumerators.
5089 (enum gimplify_defaultmap_kind): New.
5090 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
5091 target_map_pointers_as_0len_arrays members, add defaultmap.
5092 (new_omp_context): Initialize defaultmap member.
5093 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
5094 (maybe_fold_stmt): Don't fold even in host teams regions.
5095 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
5096 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
5097 ctx->omp_firstprivatize_variable.
5098 (omp_add_variable): Don't add private/firstprivate for VLAs in
5100 (omp_default_clause): Print "taskloop" rather than "task" if
5102 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
5103 Handle new defaultmap clause kinds.
5104 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
5105 iterator to be lastprivate or private. Fix up diagnostics if linear
5106 is used on collapse>1 simd iterator.
5107 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
5108 (gimplify_omp_depend): New function.
5109 (gimplify_scan_omp_clauses): Add shared clause on parallel for
5110 combined parallel master taskloop{, simd} if taskloop has
5111 firstprivate, lastprivate or reduction clause. Handle
5112 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
5113 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
5114 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
5115 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
5116 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
5118 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
5119 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
5120 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
5121 OMP_CLAUSE_{TASK,IN}_REDUCTION.
5122 (gimplify_omp_task): Handle taskwait with depend clauses.
5123 (gimplify_omp_for): Add shared clause on parallel for combined
5124 parallel master taskloop{, simd} if taskloop has firstprivate,
5125 lastprivate or reduction clause. Use ORT_TASKLOOP or
5126 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
5127 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
5128 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
5129 __for_end and __for_range temporaries on OMP_PARALLEL for
5130 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
5131 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
5132 sandwiched in between two taskloops.
5133 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
5134 instead of ctx->omp_firstprivatize_variable.
5135 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
5136 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
5137 host teams, use gimplify_and_return_first etc. for body like
5138 for target or target data constructs, and at the end call
5139 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
5140 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
5141 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
5142 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
5143 gimple_omp_atomic_set_seq_cst calls.
5144 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
5145 case, handle taskgroup clauses.
5146 * lto-streamer-out.c (hash_tree): Handle
5147 OMP_CLAUSE_{TASK,IN}_REDUCTION.
5148 * Makefile.in (GTFILES): Add omp-general.h.
5149 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
5150 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
5151 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
5152 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
5153 BUILT_IN_GOMP_LOOP_DOACROSS_START,
5154 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
5155 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
5156 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
5157 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
5158 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
5159 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
5160 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
5161 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
5162 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
5163 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
5164 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
5165 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
5166 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
5167 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
5168 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
5169 * omp-expand.c (workshare_safe_to_combine_p): Return false for
5170 non-worksharing loops.
5171 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
5172 (determine_parallel_type): Don't combine parallel with worksharing
5173 which has _reductemp_ clause.
5174 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
5175 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
5176 if there is nonmonotonic modifier or if there is no modifier and no
5177 ordered clause. For dynamic and guided schedule without monotonic
5178 and nonmonotonic modifier, default to nonmonotonic.
5179 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
5180 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
5182 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
5183 there are any reduction clauses.
5184 (expand_taskwait_call): New function.
5185 (expand_teams_call): New function.
5186 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
5187 expand_teams_call for it. Formatting fix. Handle taskwait with
5189 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
5190 of worksharing loops with task reductions.
5191 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
5192 expansion of worksharing loops with task reductions.
5193 (expand_omp_sections): Handle expansion of sections with task
5195 (expand_omp_synch): For host teams call expand_omp_taskreg.
5196 (omp_memory_order_to_memmodel): New function.
5197 (expand_omp_atomic_load, expand_omp_atomic_store,
5198 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
5199 instead of gimple_omp_atomic_seq_cst_p.
5200 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
5201 depend clauses as a standalone directive.
5202 * omp-general.c (enum omp_requires): New variable.
5203 (omp_extract_for_data): Initialize have_reductemp member. Allow
5204 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
5205 GT_EXPR loops depending on incr sign. Formatting fixes.
5206 * omp-general.h (struct omp_for_data): Add have_reductemp member.
5207 (enum omp_requires): New enum.
5208 (omp_requires_mask): Declare.
5209 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
5211 * omp-low.c (struct omp_context): Add task_reductions and
5212 task_reduction_map fields.
5213 (is_host_teams_ctx): New function.
5214 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
5215 (use_pointer_for_field): Use is_global_var instead of
5216 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
5218 (build_outer_var_ref): Ignore taskgroup outer contexts.
5219 (delete_omp_context): Release task_reductions and task_reduction_map.
5220 (scan_sharing_clauses): Don't add any fields for reduction clause on
5221 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
5222 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
5223 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
5224 Handle OMP_CLAUSE_NONTEMPORAL.
5225 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
5227 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
5228 clauses with task modifier.
5229 (scan_omp_task): Handle taskwait with depend clauses.
5230 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
5231 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
5232 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
5233 (scan_omp_for): Fix comment formatting.
5234 (scan_omp_teams): Handle host teams constructs.
5235 (check_omp_nesting_restrictions): Allow teams with no outer
5236 OpenMP context. Adjust diagnostics for teams strictly nested into
5237 some explicit OpenMP construct other than target. Allow OpenMP atomics
5238 inside of simd regions.
5239 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
5240 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
5241 taskreg_nesting_level while scanning host teams construct.
5242 (task_reduction_read): New function.
5243 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
5244 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
5245 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
5246 second argument create_tmp_var if it is NULL. Don't ignore shared
5247 clauses in is_host_teams_ctx contexts. Handle
5248 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
5250 (lower_reduction_clauses): Ignore reduction clauses with task
5251 modifier. Remove second argument create_tmp_var if it is NULL.
5252 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
5253 (lower_send_clauses): Ignore reduction clauses with task modifier.
5254 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
5255 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
5256 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
5257 rely that it is the last stmt in body so far. Ignore outer taskgroup
5259 (omp_task_reductions_find_first, omp_task_reduction_iterate,
5260 lower_omp_task_reductions): New functions.
5261 (lower_omp_sections): Handle reduction clauses with taskgroup
5262 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
5263 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
5264 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
5266 (lower_omp_taskgroup): Handle taskgroup reductions.
5267 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
5268 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
5269 (lower_depend_clauses): If there are any
5270 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
5271 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
5272 seen, assume lowering is done already and return early. Set kind
5273 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
5274 (lower_omp_taskreg): Handle reduction clauses with task modifier on
5275 parallel construct. Handle reduction clause on taskloop construct.
5276 Handle taskwait with depend clauses.
5277 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
5278 for host teams constructs.
5279 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
5280 nontemporal and _reductemp_ clause entries.
5281 (omp_clause_code_name): Likewise.
5282 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
5283 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
5284 * tree-core.h (enum omp_clause_code): Add
5285 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
5286 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
5287 (struct tree_base): Add omp_atomic_memory_order field into union.
5288 Remove OMP_ATOMIC_SEQ_CST comment.
5289 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
5290 and OMP_CLAUSE_DEPEND_DEPOBJ.
5291 (struct tree_omp_clause): Add subcode.defaultmap_kind.
5292 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
5293 OpenMP constructs with body and clauses operands.
5294 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
5295 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
5296 (OMP_TASKGROUP_CLAUSES): Define.
5297 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
5298 OMP_CLAUSE__LOOPTEMP_.
5299 (OMP_ATOMIC_SEQ_CST): Remove.
5300 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
5301 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
5302 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
5303 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
5304 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
5305 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
5306 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
5307 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
5308 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
5309 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
5311 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
5312 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5313 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
5314 (convert_local_omp_clauses): Likewise. Remove useless test.
5315 * tree-parloops.c (create_call_for_reduction_1): Pass
5316 OMP_MEMORY_ORDER_RELAXED as new argument to
5317 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
5318 * tree-pretty-print.c (dump_omp_iterators): New function.
5319 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
5320 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
5321 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
5322 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
5323 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
5324 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
5325 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
5326 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
5327 (dump_omp_atomic_memory_order): New function.
5328 (dump_generic_node): Use it. Print taskgroup clauses. Print
5329 taskwait with depend clauses.
5330 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
5331 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
5332 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
5333 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
5334 write_ts_omp_clause_tree_pointers): Likewise.
5336 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5339 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
5340 "-missed", "-note", and "-all" sub-options.
5341 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
5343 (can_early_inline_edge_p): Likewise.
5344 (want_early_inline_function_p): Likewise.
5345 (want_inline_self_recursive_call_p): Likewise.
5346 (recursive_inlining): Likewise.
5347 (inline_small_functions): Likewise.
5348 (flatten_function): Likewise.
5349 (ipa_inline): Likewise.
5350 (inline_always_inline_functions): Likewise.
5351 (early_inline_small_functions): Likewise.
5352 (early_inliner): Likewise.
5353 * tree-inline.c (expand_call_inline): Likewise.
5355 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5357 * pretty-print.c (pp_format): Handle %f.
5358 (selftest::test_pp_format): Add test of %f.
5359 * pretty-print.h (pp_double): New macro.
5361 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5363 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
5364 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
5365 (dump_pretty_printer::decode_format): Implement "%C" for
5367 (selftest::test_capture_of_dump_calls): Rename "where" to
5368 "stmt_loc". Convert test_decl to a function decl and set its
5369 location. Add a symbol_table_test RAII instance and a
5370 cgraph_node, using it to test "%C" and dump_symtab_node.
5372 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
5375 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
5377 2018-11-08 David Malcolm <dmalcolm@redhat.com>
5379 * cgraph.c: Include "selftest.h".
5380 (saved_symtab): New variable.
5381 (selftest::symbol_table_test::symbol_table_test): New ctor.
5382 (selftest::symbol_table_test::~symbol_table_test): New dtor.
5383 (selftest::test_symbol_table_test): New test.
5384 (selftest::cgraph_c_tests): New.
5385 * cgraph.h (saved_symtab): New decl.
5386 (selftest::symbol_table_test): New class.
5387 * selftest-run-tests.c (selftest::run_tests): Call
5388 selftest::cgraph_c_tests.
5389 * selftest.h (selftest::cgraph_c_tests): New decl.
5391 2018-11-08 Richard Biener <rguenther@suse.de>
5393 * tree-data-ref.h (lambda_int): New typedef.
5394 (lambda_vector_gcd): Adjust.
5395 (lambda_vector_new): Likewise.
5396 (lambda_matrix_new): Likewise.
5397 * tree-data-ref.c (print_lambda_vector): Adjust.
5399 2018-11-08 Richard Biener <rguenther@suse.de>
5401 PR tree-optimization/87929
5402 * tree-complex.c (expand_complex_comparison): Clean EH.
5404 2018-11-08 Martin Liska <mliska@suse.cz>
5406 * doc/extend.texi: Reword.
5407 * predict.c (expr_expected_value_1): Likewise.
5409 2018-11-08 Richard Biener <rguenther@suse.de>
5411 PR tree-optimization/87913
5412 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
5413 of extreme values to ordered comparisons.
5415 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
5418 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
5420 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
5422 * doc/invoke.texi: Remove leading dash from @opindex entries
5423 throughout the file.
5425 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
5428 * doc/invoke.texi (Option Summary): Add -e and --entry.
5429 (Link Options): Likewise.
5431 2018-11-07 Nathan Sidwell <nathan@acm.org>
5434 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
5435 --disable-checking bootstrap.
5437 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
5439 * configure: Regenerated.
5441 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5444 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
5445 to the mode of the widest field iff the widest field has mode class
5446 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
5449 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
5451 * common.opt: Add -Wattribute-warning.
5452 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
5453 * expr.c (expand_expr_real_1): Add new attribute to warning_at
5454 call to allow user configure behavior of "warning" attribute.
5456 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
5458 * target.def: Put @: after every vs., e.g., and i.e. where it is
5459 followed by whitespace.
5460 * doc/extend.texi: Ditto.
5461 * doc/fragments.texi: Ditto.
5462 * doc/gimple.texi: Ditto.
5463 * doc/implement-c.texi: Ditto.
5464 * doc/install.texi: Ditto.
5465 * doc/invoke.texi: Ditto.
5466 * doc/md.texi: Ditto.
5467 * doc/plugins.texi: Ditto.
5468 * doc/rtl.texi: Ditto.
5469 * doc/sourcebuild.texi: Ditto.
5470 * doc/tm.texi.in: Ditto.
5471 * doc/ux.texi: Ditto.
5472 * doc/tm.texi: Regenerate.
5474 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5476 * config/arm/arm-cpus.in (ares): New entry.
5477 * config/arm/arm-tables.opt: Regenerate.
5478 * config/arm/arm-tune.md: Likewise.
5479 * doc/invoke.texi (ARM Options): Document ares.
5481 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5483 * config/aarch64/aarch64-cores.def (ares): Define.
5484 * config/aarch64/aarch64-tune.md: Regenerate.
5485 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
5487 2018-11-07 Jan Hubicka <jh@suse.cz>
5489 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
5490 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
5491 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
5494 2018-11-07 Richard Biener <rguenther@suse.de>
5496 PR tree-optimization/87914
5497 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
5499 (vectorizable_reduction): Handle shifts and rotates by dispatching
5500 to vectorizable_shift.
5501 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
5502 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
5504 (vectorizable_shift): Export and handle being called as
5506 (vect_analyze_stmt): Call vectorizable_shift after
5507 vectorizable_reduction.
5508 * tree-vectorizer.h (vectorizable_shift): Declare.
5510 2018-11-07 Jan Hubicka <jh@suse.cz>
5512 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
5513 than const decls in TREE_VALUE of enum.
5514 (dump_type_inheritance_graph): Improve duplicate dumping.
5515 (free_enum_values): New.
5516 (build_type_inheritance_graph): Use it.
5517 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
5518 which are not main variants or not ODR types.
5519 (verify_type_variant): Expect variants to have no TYPE_VALUES.
5521 2018-11-07 Richard Biener <rguenther@suse.de>
5523 * ipa-inline.c (want_inline_small_function_p): Compute
5524 big_speedup_p lazily and last.
5526 2018-11-07 Jan Hubicka <jh@suse.cz>
5528 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
5529 building incomplete variant of complete type.
5530 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
5531 variant of complete type.
5533 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5535 * config/mips/mips.c: Fix typo in documentation of
5536 mips_loongson_ext2_prefetch_cookie.
5537 (mips_option_override): fix brain twister logical.
5538 * config/mips/mips.h: Fix typo in documentation of
5539 ISA_HAS_CTZ_CTO and define pattern.
5540 * config/mips/mips.md (prefetch): Hoist EXT2 above
5542 (prefetch_indexed): Hoist EXT2 above the EXT block.
5544 2018-11-07 Jan Hubicka <jh@suse.cz>
5546 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
5547 return and parameter types of function and method types.
5548 (free_lang_data_in_cgraph): Update.
5550 2018-11-07 Martin Liska <mliska@suse.cz>
5552 PR rtl-optimization/87868
5553 * postreload-gcse.c (eliminate_partially_redundant_load): Set
5554 threshold to max_count if we would overflow.
5555 * profile-count.h: Make max_count a public constant.
5557 2018-11-07 Martin Liska <mliska@suse.cz>
5559 * mem-stats.h: Fix GNU coding style.
5561 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5563 * config/mips/gs264e.md: New.
5564 * config/mips/mips-cpus.def: Define gs264e.
5565 * config/mips/mips-tables.opt: Regenerate.
5566 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
5568 (mips_issue_rate): Add support for gs264e.
5569 (mips_multipass_dfa_lookahead): Likewise.
5570 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
5571 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
5572 (MIPS_ASE_MSA_SPEC): New.
5573 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
5574 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
5575 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
5576 * config/mips/mips.md: Include gs264e.md.
5577 (processor): Add gs264e.
5578 * config/mips/mips.opt (MSA): Use Mask instead of Var.
5579 * doc/invoke.texi: Add gs264e to supported architectures.
5581 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5583 * config/mips/gs464e.md: New.
5584 * config/mips/mips-cpus.def: Define gs464e.
5585 * config/mips/mips-tables.opt: Regenerate.
5586 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
5588 (mips_issue_rate): Add support for gs464e.
5589 (mips_multipass_dfa_lookahead): Likewise.
5590 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
5591 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
5592 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
5593 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
5594 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
5595 * config/mips/mips.md: Include gs464e.md.
5596 (processor): Add gs464e.
5597 * doc/invoke.texi: Add gs464e to supported architectures.
5599 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5601 * config/mips/loongson3a.md: Rename to ...
5602 * config/mips/gs464.md: ... here.
5603 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
5604 as an alias of gs464 processor.
5605 * config/mips/mips-tables.opt: Regenerate.
5606 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
5607 instead of PROCESSOR_LOONGSON_3A.
5608 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
5610 (mips_option_override): Enable MMI and EXT for gs464.
5611 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
5612 Rename TUNE_LOONGSON_3A to TUNE_GS464.
5613 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
5614 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
5615 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
5617 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
5618 (processor): Add gs464;
5619 * doc/invoke.texi: Add gs464 to supported architectures.
5621 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5623 * config/mips/mips-protos.h
5624 (mips_loongson_ext2_prefetch_cookie): New prototype.
5625 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
5626 (mips_option_override): Enable TARGET_LOONGSON_EXT when
5627 TARGET_LOONGSON_EXT2 is true.
5628 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
5629 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
5630 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
5631 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
5632 TARGET_LOONGSON_EXT2.
5633 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
5634 (define_insn "ctz<mode>2"): New insn pattern.
5635 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
5636 (define_insn "prefetch_indexed_<mode>"): Include
5637 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
5638 * config/mips/mips.opt (-mloongson-ext2): Add option.
5639 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
5641 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5643 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
5644 __mips_loongson_ext.
5645 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
5646 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
5648 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
5649 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
5650 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
5651 instead of TARGET_LOONGSON_3A.
5652 * config/mips/mips.opt (-mloongson-ext): Add option.
5653 * gcc/doc/invoke.texi (-mloongson-ext): Document.
5655 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
5657 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
5658 * config/mips/loongson.md: Move to ...
5659 * config/mips/loongson-mmi.md: here; Adjustment.
5660 * config/mips/loongson.h: Move to ...
5661 State as deprecated. Include loongson-mmiintrin.h for back
5662 compatibility and warning.
5663 * config/mips/loongson-mmiintrin.h: ... here.
5664 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
5665 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
5666 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
5667 (mips_option_override): Make sure MMI use hard float;
5668 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
5669 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
5670 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
5671 TARGET_LOONGSON_VECTORS.
5672 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
5673 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
5674 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
5675 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
5677 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
5678 TARGET_LOONGSON_VECTORS.
5679 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
5680 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
5681 (Loongson MMI patterns): Include loongson-mmi.md instead of
5683 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
5684 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
5686 2018-11-07 Richard Biener <rguenther@suse.de>
5689 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
5690 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
5692 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
5694 PR rtl-optimization/87874
5695 * lra.c (lra_substitute_pseudo): Do not create a subreg for
5698 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
5700 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
5701 if not in indexed or indirect form.
5702 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
5703 (bswap<mode>2_store): Ditto.
5705 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
5707 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
5710 2018-11-06 Richard Biener <rguenther@suse.de>
5712 PR tree-optimization/86850
5713 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
5714 instead of src.m_vec.
5716 2018-11-06 Jan Hubicka <jh@suse.cz>
5718 * tree.c (fld_simplified_type_name): Break out form ...
5719 (free_lang_data_in_type): ... here.
5720 (fld_type_variant_equal_p): Use it.
5722 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5724 * config/default-d.c: Include memmodel.h.
5726 * config/sol2-d.c: New file.
5727 * config/t-sol2 (sol2-d.o): New rule.
5728 * config.gcc <*-*-solaris2*>: Set d_target_objs,
5729 target_has_targetdm.
5731 2018-11-06 Jan Hubicka <jh@suse.cz>
5733 * tree.c (fld_type_variant): Also copy alignment; be sure that
5734 new variant is equal.
5736 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
5739 * config/s390/s390.md: Add relative_long attribute.
5741 2018-11-06 Jan Hubicka <jh@suse.cz>
5743 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
5744 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
5745 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
5746 stream TYPE_NEEDS_CONSTRUCTING.
5747 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
5748 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
5750 2018-11-06 Richard Biener <rguenther@suse.de>
5752 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
5754 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
5756 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5758 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
5759 REG_CLASS_CONTENTS[GEN_REGS].
5760 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
5762 2018-11-06 Jan Hubicka <jh@suse.cz>
5764 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
5766 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5769 * config/sol2.h (ASAN_CC1_SPEC): Define.
5770 (LD_WHOLE_ARCHIVE_OPTION): Define.
5771 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
5772 (ASAN_REJECT_SPEC): Provide default.
5773 (LIBASAN_EARLY_SPEC): Define.
5774 (LIBTSAN_EARLY_SPEC): Define.
5775 (LIBLSAN_EARLY_SPEC): Define.
5776 * config/i386/sol2.h (CC1_SPEC): Redefine.
5777 (ASAN_REJECT_SPEC): Define.
5779 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
5780 (TARGET_ASAN_SHADOW_OFFSET): Define.
5781 (sparc_asan_shadow_offset): New function.
5782 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
5783 (ASAN_REJECT_SPEC): Define.
5785 2018-11-06 Jan Hubicka <jh@suse.cz>
5787 * tree.c (fld_type_variant): Copy canonical type.
5788 (fld_incomplete_type_of): Check that canonical types looks sane;
5789 copy canonical type.
5790 (verify_type): Accept when incomplete type has complete canonical type.
5792 2018-11-06 Jan Hubicka <jh@suse.cz>
5794 * tree.c (free_lang_data): Reset overwite_assembler_name,
5795 print_xnode, print_decl, print_type and print_identifier of
5798 2018-11-06 Richard Biener <rguenther@suse.de>
5800 PR tree-optimization/87889
5801 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
5802 Do nothing if old and new arg are the same
5804 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
5807 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
5808 attributes for operands 3 and 4.
5810 2018-11-06 Richard Biener <rguenther@suse.de>
5813 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
5814 matching bitfield insertion.
5816 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
5818 * auto-inc-dec.c: Include valtrack.h. Improve comments.
5819 (reg_next_debug_use): New.
5820 (attempt_change): Propagate adjusted expression into affected
5822 (merge_in_block): Track uses in debug insns.
5823 (pass_inc_dec::execute): Allocate and release
5826 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
5828 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
5829 (_mm512_fixupimm_round_pd): Update parameters and builtin.
5830 (_mm512_maskz_fixupimm_round_pd): Ditto.
5831 (_mm512_fixupimm_round_ps): Ditto.
5832 (_mm512_maskz_fixupimm_round_ps): Ditto.
5833 (_mm_fixupimm_round_sd): Ditto.
5834 (_mm_maskz_fixupimm_round_sd): Ditto.
5835 (_mm_fixupimm_round_ss): Ditto.
5836 (_mm_maskz_fixupimm_round_ss): Ditto.
5837 (_mm512_fixupimm_pd): Ditto.
5838 (_mm512_maskz_fixupimm_pd): Ditto.
5839 (_mm512_fixupimm_ps): Ditto.
5840 (_mm512_maskz_fixupimm_ps): Ditto.
5841 (_mm_fixupimm_sd): Ditto.
5842 (_mm_maskz_fixupimm_sd): Ditto.
5843 (_mm_fixupimm_ss): Ditto.
5844 (_mm_maskz_fixupimm_ss): Ditto.
5845 (_mm512_mask_fixupimm_round_pd): Update builtin.
5846 (_mm512_mask_fixupimm_round_ps): Ditto.
5847 (_mm_mask_fixupimm_round_sd): Ditto.
5848 (_mm_mask_fixupimm_round_ss): Ditto.
5849 (_mm512_mask_fixupimm_pd): Ditto.
5850 (_mm512_mask_fixupimm_ps): Ditto.
5851 (_mm_mask_fixupimm_sd): Ditto.
5852 (_mm_mask_fixupimm_ss): Ditto.
5853 * config/i386/avx512vlintrin.h:
5854 (_mm256_fixupimm_pd): Update parameters and builtin.
5855 (_mm256_maskz_fixupimm_pd): Ditto.
5856 (_mm256_fixupimm_ps): Ditto.
5857 (_mm256_maskz_fixupimm_ps): Ditto.
5858 (_mm_fixupimm_pd): Ditto.
5859 (_mm_maskz_fixupimm_pd): Ditto.
5860 (_mm_fixupimm_ps): Ditto.
5861 (_mm_maskz_fixupimm_ps): Ditto.
5862 (_mm256_mask_fixupimm_pd): Update builtin.
5863 (_mm256_mask_fixupimm_ps): Ditto.
5864 (_mm_mask_fixupimm_pd): Ditto.
5865 (_mm_mask_fixupimm_ps): Ditto.
5866 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
5867 * config/i386/i386-builtin.def: Update builtin definitions.
5868 * config/i386/i386.c: Handle new builtin types and remove useless ones.
5869 * config/i386/sse.md: Update VFIXUPIMM* patterns.
5870 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
5871 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
5872 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
5873 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
5874 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
5875 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
5876 * config/i386/subst.md:
5877 (round_saeonly_sd_mask_operand4): Add new subst_attr.
5878 (round_saeonly_sd_mask_op4): Ditto.
5879 (round_saeonly_expand_operand5): Ditto.
5880 (round_saeonly_expand): Update.
5882 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
5884 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
5886 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
5888 PR rtl-optimization/87871
5889 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
5891 2018-11-05 Paul Koning <ni1d@arrl.net>
5893 * doc/sourcebuild.texi (target attributes): Document new "inf"
5894 effective target keyword.
5896 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
5898 * config/s390/s390.c (s390_register_move_cost): Increase costs for
5899 moves involving the CC reg.
5901 2018-11-05 Richard Biener <rguenther@suse.de>
5903 PR tree-optimization/87873
5904 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
5906 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
5907 * tree-vect-loop.c (vect_transform_loop): When splitting the
5908 loop exit also create forwarder PHIs for constants.
5909 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
5910 Handle constant to_arg, add extra checking we match up the correct
5913 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
5915 * config/s390/s390.md: QImode and HImode for load on condition.
5917 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
5919 * config/s390/predicates.md: Fix typo.
5920 * config/s390/s390.md: Allow immediates for load on condition.
5922 2018-11-05 Martin Liska <mliska@suse.cz>
5924 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
5925 * bitmap.h (struct bitmap_usage): Likewise.
5926 * ggc-common.c (SCALE): Remove.
5928 (struct ggc_usage): Use SIZE_AMOUNT. And update
5930 * ggc-page.c (SCALE): Remove.
5931 (STAT_LABEL): Remove.
5932 (ggc_print_statistics): Use SIZE_AMOUNT.
5933 * gimple.h (SCALE): Remove.
5935 * input.c (ONE_K): Remove.
5938 (STAT_LABEL): Likewise.
5939 (FORMAT_AMOUNT): Likewise.
5940 (dump_line_table_statistics): Use SIZE_AMOUNT.
5941 * mem-stats.h (struct mem_usage): Likewise.
5942 * rtl.c (dump_rtx_statistics): Likewise.
5943 (rtx_alloc_counts): Change type to size_t.
5944 (rtx_alloc_sizes): Likewise.
5945 (rtx_count_cmp): New.
5946 (dump_rtx_statistics): Sort first based on counts.
5947 * tree.c (tree_nodes_cmp): New.
5948 (tree_codes_cmp): New.
5949 (dump_tree_statistics): Sort first based on counts.
5950 * system.h (ONE_K): New.
5952 (SIZE_SCALE): Likewise.
5953 (SIZE_LABEL): Likewise.
5954 (SIZE_AMOUNT): Likewise.
5955 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
5956 * tree-dfa.c (dump_dfa_stats): Likewise.
5957 * tree-phinodes.c (phinodes_print_statistics): Likewise.
5958 * tree-ssanames.c (ssanames_print_statistics): Likewise.
5959 * tree.c (dump_tree_statistics): Likewise.
5960 * vec.c (struct vec_usage): Likewise.
5961 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
5962 trigger a -Werror=format-overflow with
5963 --enable-gather-detailed-stats.
5965 2018-11-05 Martin Liska <mliska@suse.cz>
5967 * mem-stats.h (mem_alloc_description::release_instance_overhead):
5969 * vec.c (struct vec_usage): Register m_element_size.
5970 (vec_prefix::register_overhead): New arguments: elements and
5972 (vec_prefix::release_overhead): Subtract elements.
5973 * vec.h (struct vec_prefix): Change signature.
5974 (va_heap::reserve): Pass proper arguments.
5975 (va_heap::release): Likewise.
5977 2018-11-05 Martin Liska <mliska@suse.cz>
5979 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
5983 2018-11-05 Richard Biener <rguenther@suse.de>
5985 * tree-scalar-evolution.h (final_value_replacement_loop): Update
5987 * tree-scalar-evolution.c (final_value_replacement_loop): Return
5988 whether anything was done.
5989 (scev_const_prop): Remove constant propagation part, fold
5991 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
5992 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
5995 2018-11-05 Jakub Jelinek <jakub@redhat.com>
5997 PR tree-optimization/87859
5998 * gimple-ssa-store-merging.c (struct merged_store_group): Add
5999 only_constants and first_nonmergeable_order members.
6000 (merged_store_group::merged_store_group): Initialize them.
6001 (merged_store_group::do_merge): Clear only_constants member if
6002 adding something other than INTEGER_CST store.
6003 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
6004 stores with order >= first_nonmergeable_order. Use
6005 merged_store->only_constants instead of always recomputing it.
6006 Set merged_store->first_nonmergeable_order if we've skipped any
6007 stores. Attempt to merge overlapping INTEGER_CST stores that
6008 we would otherwise skip.
6011 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
6013 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
6016 * config/i386/emmintrin.h (__v16qs): New to cope with option
6018 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
6019 (_mm_cmplt_epi8): Likewise.
6020 (_mm_cmpgt_epi8): Likewise.
6022 2018-11-05 Richard Biener <rguenther@suse.de>
6024 PR rtl-optimization/87852
6025 * fwprop.c (use_killed_between): Only consider single-defs of the
6026 use whose definition statement dominates the use.
6028 2018-11-05 Martin Liska <mliska@suse.cz>
6031 * doc/invoke.texi: Remove options that are
6032 not disabled with -Os.
6034 2018-11-05 Martin Liska <mliska@suse.cz>
6037 * doc/extend.texi: Update constrain about the last argument
6038 of __builtin_expect_with_probability.
6040 2018-11-05 Martin Liska <mliska@suse.cz>
6043 * predict.c (expr_expected_value_1): Verify
6044 that last argument is a real constants and emit
6047 2018-11-05 Martin Liska <mliska@suse.cz>
6049 PR gcov-profile/77698
6050 * ipa-profile.c (ipa_profile): Adjust hotness threshold
6053 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
6055 PR tree-optimization/86572
6056 * builtins.c (c_strlen): Handle negative offsets in a safe way.
6058 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
6060 PR tree-optimization/87672
6061 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
6062 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
6064 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
6067 * cfgexpand.c (pass_expand::execute): Move the call to
6068 finish_eh_generation in front of the call to expand_stack_alignment.
6070 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
6072 * common/config/i386/i386-common.c (processor_alias_table): Add
6074 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
6075 (case ${target}): Add znver2.
6076 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
6077 -march=native recognize znver2 processors.
6078 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
6079 * config/i386/i386.c (m_znver2): New definition.
6080 (m_ZNVER): New definition.
6081 (m_AMD_MULTIPLE): Includes m_znver2.
6082 (processor_cost_table): Add znver2 entry.
6083 (processor_target_table): Add znver2 entry.
6084 (get_builtin_code_for_version): Set priority for
6086 (processor_model): Add M_AMDFAM17H_ZNVER2.
6087 (arch_names_table): Ditto.
6088 (ix86_reassociation_width): Include znver2.
6089 * config/i386/i386.h (TARGET_znver2): New definition.
6090 (struct ix86_size_cost): Add TARGET_ZNVER2.
6091 (enum processor_type): Add PROCESSOR_ZNVER2.
6092 * config/i386/i386.md (define_attr "cpu"): Add znver2.
6093 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
6094 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
6095 (ix86_adjust_cost): Add znver2.
6096 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
6097 * gcc/doc/extend.texi: Add details about znver2.
6098 * gcc/doc/invoke.texi: Add details about znver2.
6100 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
6104 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
6107 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
6109 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
6110 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
6112 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
6114 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
6115 shrink-wrapping when -mtrack-speculation.
6117 2018-11-02 Richard Biener <rguenther@suse.de>
6119 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
6120 (pop_cost_one_pair): Do not free pair.
6121 (pop_best_coalesce): Likewise.
6122 (create_coalesce_list): Initialize obstack.
6123 (delete_coalesce_list): Free obstack.
6124 (find_coalesce_pair): Obstack-allocate coalesce pairs.
6125 (add_cost_one_coalesce): Likewise.
6126 (struct live_track): Remove bitmap pointer indirections.
6127 (new_live_track): Adjust.
6128 (delete_live_track): Likewise.
6129 (live_track_remove_partition): Likewise.
6130 (live_track_add_partition): Likewise.
6131 (live_track_live_p): Likewise.
6132 (live_track_process_def): Likewise.
6133 (live_track_clear_base_vars): Likewise.
6135 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6137 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
6138 * configure: Regenerate.
6139 * config.in: Regenerate.
6140 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
6141 HAVE_AS_REGISTER_PSEUDO_OP guard.
6142 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
6143 !HAVE_AS_REGISTER_PSEUDO_OP support.
6144 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
6147 2018-11-02 Richard Biener <rguenther@suse.de>
6149 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
6152 2018-11-02 Richard Biener <rguenther@suse.de>
6154 PR tree-optimization/87776
6155 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
6156 executable when iterating but running into rpo-vn-max-loop-depth
6157 and not eliding the iteration.
6159 2018-11-30 Jan Hubicka <jh@suse.cz>
6161 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
6164 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
6166 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
6168 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
6169 Combine with rs6000_address_for_fpconvert.
6170 (rs6000_address_for_fpconvert): Combine with
6171 rs6000_force_indexed_or_indirect_mem.
6172 (rs6000_expand_vector_init): Change function call from
6173 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
6174 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
6175 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
6176 (floatsi<mode>2_lfiwax_mem): Ditto.
6177 (floatunssi<mode>2_lfiwzx): Ditto.
6178 (floatunssi<mode>2_lfiwzx_mem): Ditto.
6179 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
6180 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
6181 (fix_trunc<mode>si2_stfiwx): Ditto.
6182 (fixuns_trunc<mode>si2_stfiwx): Ditto.
6183 (float_<mode>si2_hw): Ditto.
6184 (floatuns_<mode>si2_hw): Ditto.
6185 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
6186 (vsx_splat_<mode>): Ditto.
6188 2018-11-01 Joseph Myers <joseph@codesourcery.com>
6190 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
6191 at end of assembler input text.
6192 * configure: Regenerate.
6194 2018-11-01 Jakub Jelinek <jakub@redhat.com>
6196 PR tree-optimization/87826
6197 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
6198 negative or larger or equal to type's precision.
6200 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
6202 * opts.c (default_options_table): Do not enable
6203 OPT_fdelayed_branch at -Og.
6204 * doc/invoke.texi (-fdelayed-branch): Document it.
6206 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
6208 * optabs-libfuncs.c (build_libfunc_function_visibility):
6209 New, split out from...
6210 (build_libfunc_function): ... here.
6211 (init_one_libfunc_visibility): New, split out from ...
6212 (init_one_libfunc): ... here.
6214 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
6215 scratch register need not be early-clobber. Document the reason
6216 why we cannot use ST<OP>.
6218 2018-10-31 Joseph Myers <joseph@codesourcery.com>
6221 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
6222 line for second argument of AC_DEFINE_UNQUOTED.
6223 * doc/install.texi (Tools/packages necessary for modifying GCC):
6224 Update to autoconf 2.69 and automake 1.15.1.
6225 * aclocal.m4, config.in, configure: Regenerate.
6227 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
6229 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
6232 2018-10-31 Martin Liska <mliska@suse.cz>
6235 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
6236 Add new argument invalid_extension.
6237 (aarch64_get_all_extension_candidates): New function.
6238 (aarch64_rewrite_selected_cpu): Add NULL to function call.
6239 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
6241 (aarch64_get_all_extension_candidates): New function.
6242 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
6243 argument invalid_extension.
6244 (aarch64_parse_cpu): Likewise.
6245 (aarch64_print_hint_for_extensions): New function.
6246 (aarch64_validate_mcpu): Provide hint about invalid extension.
6247 (aarch64_validate_march): Likewise.
6248 (aarch64_handle_attr_arch): Pass new argument.
6249 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
6250 (aarch64_handle_attr_isa_flags): Likewise.
6252 2018-10-31 Richard Biener <rguenther@suse.de>
6256 * tree-outof-ssa.c (insert_backedge_copies): Restrict
6257 copy generation to useful cases. Place the copy before
6258 the definition of the backedge value when possible.
6260 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6262 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
6263 * config/arc/arc.c (arc_active_insn): New function.
6264 (check_store_cacheline_hazard): Likewise.
6265 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
6266 (arc_override_options): Disable delay slot scheduler for older
6268 (arc_store_addr_hazard_p): New implementation, old one renamed to
6270 (arc_store_addr_hazard_internal_p): Renamed.
6271 (arc_reorg): Don't combine into brcc instructions which are part
6272 of hardware hazard solution.
6273 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
6274 (tune_arc700): Likewise.
6275 * config/arc/arc.opt (arc7xx): New tune value.
6276 * config/arc/arc700.md: Improve A7 scheduler.
6278 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6280 * config/arc/arc.c (arc_override_options): Remove
6281 TARGET_COMPACT_CASESI.
6282 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
6283 (CASE_VECTOR_MODE): Likewise.
6284 (CASE_VECTOR_PC_RELATIVE): Likewise.
6285 (CASE_VECTOR_SHORTEN_MODE): Likewise.
6286 (CASE_VECTOR_SHORTEN_MODE1): Delete.
6287 (ADDR_VEC_ALIGN): Update.
6288 (ASM_OUTPUT_CASE_LABEL): Undefine.
6289 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
6290 (TARGET_BI_BIH): Define.
6291 (DEFAULT_BRANCH_INDEX): Likewise.
6292 * config/arc/arc.md (casesi): Rework to accept BI/BIH
6293 instructions, remove compact_casesi use case.
6294 (casesi_compact_jump): Remove.
6295 (casesi_dispatch): New pattern.
6296 * config/arc/arc.opt: Add mbranch-index option. Deprecate
6297 compact_casesi option.
6298 * doc/invoke.texi: Document mbranch-index option.
6300 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6302 * config/arc/arc.c (arc_get_tp): Remove function.
6303 (arc_emit_call_tls_get_addr): Likewise.
6304 (arc_call_tls_get_addr): New function.
6305 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
6306 * config/arc/arc.md (tls_load_tp_soft): Remove.
6307 (tls_gd_get_addr): Likewise.
6309 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
6311 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
6312 (mulsi3_600_lib): Remove pattern.
6313 (umulsi3_highpart_600_lib_le): Likewise.
6314 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
6315 (umulsidi3): Remove call to umulsidi3_600_lib.
6316 (umulsidi3_600_lib): Remove pattern.
6317 (peephole2): Remove peephole using the above deprecated patterns.
6319 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
6322 * config/arm/arm.c (arm_option_check_internal): Disable the combined
6323 use of -mslow-flash-data and -mword-relocations.
6324 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
6325 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
6327 * doc/invoke.texi (-mword-relocations): Mention conflict with
6329 (-mslow-flash-data): Reciprocally.
6331 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
6333 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
6334 16-byte modes held in GP registers to use an even regno.
6336 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
6337 (aarch64_atomic_ldop_supported_p): Remove.
6338 (aarch64_gen_atomic_ldop): Remove.
6339 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
6340 Fully expand LSE operations here.
6341 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
6342 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
6343 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
6344 and use ATOMIC_LDOP instead; use register_operand for the input;
6345 drop the split and emit insns directly.
6346 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
6347 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
6348 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
6350 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
6351 (aarch64_gen_atomic_ldop): Don't call it.
6352 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
6353 Use aarch64_reg_or_zero.
6354 (aarch64_atomic_exchange<ALLI>): Likewise.
6355 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
6356 operand 0; use aarch64_reg_or_zero for input; merge ...
6357 (@aarch64_atomic_swp<ALLI>): ... this and remove.
6359 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
6360 (aarch64_split_compare_and_swap): Use it.
6361 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
6362 test oldval against the proper predicate.
6363 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
6364 Use nonmemory_operand for expected.
6365 (cas_short_expected_pred): New.
6366 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
6367 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
6368 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
6369 (aarch64_plushi_operand): New.
6371 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
6372 Force oldval into the rval register for TARGET_LSE; emit the compare
6373 during initial expansion so that it may be deleted if unused.
6374 (aarch64_gen_atomic_cas): Remove.
6375 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
6376 Change =&r to +r for operand 0; use match_dup for operand 2;
6377 remove is_weak and mod_f operands as unused. Drop the split
6379 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
6380 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
6381 (@aarch64_atomic_cas<GPI>): Similarly.
6383 2018-10-31 Richard Biener <rguenther@suse.de>
6385 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
6388 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6390 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
6391 * config/aarch64/aarch64.md: Include saphira.md
6392 * config/aarch64/saphira.md: New file for pipeline description.
6394 2018-10-30 Martin Sebor <msebor@redhat.com>
6397 * gimple-ssa-sprintf.c (format_directive): Use %G to include
6399 (sprintf_dom_walker::compute_format_length):
6400 Avoid setting POSUNDER4K here.
6401 (get_destination_size): Handle null argument values.
6402 (get_user_idx_format): New function.
6403 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
6404 functions, including user-defined with attribute format printf.
6405 Use %G to include inlining context.
6406 Set POSUNDER4K here.
6408 2018-10-30 Jan Hubicka <jh@suse.cz>
6410 * params.def (lto-partitions): Bump from 32 to 128.
6412 2018-10-30 Jan Hubicka <jh@suse.cz>
6415 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
6417 (free_lang_data_in_type): Forward declare.
6418 (fld_type_variant_equal_p): New function.
6419 (fld_type_variant): New function
6420 (fld_incomplete_types): New hash.
6421 (fld_incomplete_type_of): New function
6422 (fld_simplfied-type): New function.
6423 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
6424 (free_lang_data): Allocate and free fld_incomplete_type; update call
6425 of free_lang_data_in_decl.
6427 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
6429 * gcov.c (output_lines): Remove duplicate line.
6431 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
6433 * config/rs6000/rs6000.md (bswapdi2): Force address into register
6434 if not in indexed or indirect form.
6435 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
6436 (bswapdi2_store): Ditto.
6437 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
6439 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
6440 Prototype for helper function.
6442 2018-10-30 Martin Sebor <msebor@redhat.com>
6444 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
6445 (target, pragma GCC optimize, pragma GCC target): Ditto.
6447 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
6449 * doc/extend.texi: Fix prototype and description of
6450 __builtin_expect_with_probability.
6452 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
6454 * cgraph.h (clone_function_name_1): Replaced by new
6455 clone_function_name_numbered that takes name as string; for
6456 privatize_symbol_name_1 use only.
6457 (clone_function_name): Renamed to
6458 clone_function_name_numbered to be explicit about numbering.
6459 (clone_function_name): New two-argument function that does
6460 not number its output.
6461 (clone_function_name): New three-argument function that
6462 takes a number to append to its output.
6463 * cgraphclones.c (duplicate_thunk_for_node):
6464 (clone_function_name_1): Renamed.
6465 (clone_function_name_numbered): Two new functions.
6466 (clone_function_name): Improved documentation.
6467 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
6468 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
6469 * final.c (final_scan_insn_1): Use the new clone_function_name
6471 * multiple_target.c (create_dispatcher_calls): Ditto.
6472 (create_target_clone): Ditto.
6473 * omp-expand.c (grid_expand_target_grid_body): Ditto.
6474 * omp-low.c (create_omp_child_function_name): Ditto.
6475 * omp-simd-clone.c (simd_clone_create): Ditto.
6476 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
6477 new clone_function_name without numbering.
6479 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
6481 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
6482 Assert that the allocation size is not zero.
6484 2018-10-30 Richard Biener <rguenther@suse.de>
6486 PR tree-optimization/87800
6487 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
6488 non-induction or reduction PHIs.
6490 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org>
6492 * config/aarch64/falkor-tag-collision-avoidance.c
6493 (execute_tag_collision_avoidance): Call df_note_add_problem.
6495 2018-10-30 Martin Liska <mliska@suse.cz>
6497 * doc/extend.texi: Fix typo in documentation
6498 of __builtin_expect_with_probability.
6500 2018-10-29 David Malcolm <dmalcolm@redhat.com>
6503 * input.c (get_substring_ranges_for_loc): Detect if
6504 linemap_resolve_location gives us a NULL map, and reject
6507 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
6509 * config.gcc (xstormy16-*-elf): Set tm_d_file.
6511 2018-10-29 David Malcolm <dmalcolm@redhat.com>
6512 Martin Sebor <msebor@redhat.com>
6513 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6515 * doc/ux.texi (Quoting): New subsection, adapted from material at
6516 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
6517 MartinSebor and ManuelLopezIbanez.
6518 (Fix-it hints): Note that fix-it hints shouldn't be marked for
6521 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
6524 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
6527 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
6529 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
6531 2018-10-29 Paul Koning <ni1d@arrl.net>
6533 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
6535 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
6537 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
6538 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
6539 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
6540 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
6541 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
6542 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
6543 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
6544 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
6545 Change 'vector' to '__vector'.
6546 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
6547 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
6548 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
6549 _mm_avg_pu16): Likewise. And, whitespace corrections.
6551 2018-10-29 Richard Biener <rguenther@suse.de>
6553 PR tree-optimization/87785
6554 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
6557 2018-10-29 Olivier Hainque <hainque@adacore.com>
6559 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
6561 2018-10-29 Olivier Hainque <hainque@adacore.com>
6563 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
6564 ports configuration macro, defaults to "gnu".
6565 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
6566 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
6568 2018-10-29 Olivier Hainque <hainque@adacore.com>
6570 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
6572 2018-10-29 Richard Biener <rguenther@suse.de>
6574 PR tree-optimization/87790
6575 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
6576 (vect_make_slp_decision): Adjust.
6577 (vect_slp_analyze_bb_1): Likewise.
6578 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
6581 2018-10-29 Richard Biener <rguenther@suse.de>
6583 PR tree-optimization/87785
6584 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
6586 (vect_build_slp_tree): Likewise.
6587 (vect_gather_slp_loads): New function.
6588 (vect_analyze_slp_instance): Gather loads separately from the
6591 2018-10-29 Martin Liska <mliska@suse.cz>
6593 * Makefile.in: Make dependency to json.o.
6594 * doc/gcov.texi: Document new JSON format, remove
6595 old intermediate format documentation.
6596 * gcov.c (struct function_info): Come up with m_name and
6598 (function_info::function_info): Initialize it.
6599 (function_info::~function_info): Release it.
6600 (main): Rename flag_intermediate_format to flag_json_format.
6601 (print_usage): Describe --json-format.
6602 (process_args): Set flag_json_format.
6603 (output_intermediate_line): Remove.
6604 (output_intermediate_json_line): Likewise.
6605 (get_gcov_intermediate_filename): Return new extension
6607 (output_intermediate_file): Implement JSON emission.
6608 (output_json_intermediate_file): Implement JSON emission.
6609 (generate_results): Use ::get_name for function name.
6610 Handle JSON output file.
6611 (read_graph_file): Use ::get_name instead of cplus_demangle.
6612 (read_count_file): Likewise.
6613 (solve_flow_graph): Likewise.
6614 (add_line_counts): Likewise.
6615 (accumulate_line_counts): Use new flag_json_format.
6616 (output_function_details): Use ::get_name instead of cplus_demangle.
6617 (output_lines): Likewise.
6618 * json.cc (test_writing_literals): Add new tests.
6619 * json.h (class literal): Add new boolean constructor.
6621 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
6623 PR rtl-optimization/87701
6624 PR rtl-optimization/87780
6625 * combine.c (make_more_copies): Rewrite.
6627 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
6629 * doc/generic.texi (ABSU_EXPR): Document.
6630 * match.pd (absu(x)*absu(x) -> x*x): Handle.
6631 (absu(absu(X)) -> absu(X)): Likewise.
6632 (absu(-X) -> absu(X)): Likewise.
6633 (absu(X) where X is nonnegative -> X): Likewise.
6635 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
6637 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
6638 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
6639 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
6640 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
6641 (s-tm-texi): Also check timestamp on d-target.def.
6642 (generated_files): Add TM_D_H and d-target-hooks-def.h.
6643 (build/genhooks.o): Also depend on D_TARGET_DEF.
6644 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
6646 * config/aarch64/aarch64-d.c: New file.
6647 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
6649 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
6651 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
6652 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
6653 * config/arm/arm-d.c: New file.
6654 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
6655 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
6656 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
6657 * config/arm/t-arm (arm-d.o): New rule.
6658 * config/default-d.c: New file.
6659 * config/glibc-d.c: New file.
6660 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6661 * config/i386/i386-d.c: New file.
6662 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
6663 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
6664 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
6665 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
6666 * config/i386/t-i386 (i386-d.o): New rule.
6667 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6668 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6669 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
6670 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6671 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
6672 * config/mips/mips-d.c: New file.
6673 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
6674 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
6675 * config/mips/t-mips (mips-d.o): New rule.
6676 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6677 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6678 * config/powerpcspe/powerpcspe-d.c: New file.
6679 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
6681 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
6682 Support GNU D by using 0 as the language type.
6683 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
6684 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
6685 * config/riscv/riscv-d.c: New file.
6686 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
6688 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
6689 * config/riscv/t-riscv (riscv-d.o): New rule.
6690 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6691 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
6692 * config/rs6000/rs6000-d.c: New file.
6693 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
6695 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
6696 Support GNU D by using 0 as the language type.
6697 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
6698 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
6699 * config/s390/s390-d.c: New file.
6700 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
6701 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
6702 * config/s390/t-s390 (s390-d.o): New rule.
6703 * config/sparc/sparc-d.c: New file.
6704 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
6706 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
6707 * config/sparc/t-sparc (sparc-d.o): New rule.
6708 * config/t-glibc (glibc-d.o): New rule.
6709 * configure: Regenerated.
6710 * configure.ac (tm_d_file): New variable.
6711 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
6712 * doc/contrib.texi (Contributors): Add self for the D frontend.
6713 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
6714 * doc/install.texi (Configuration): Mention libphobos as an option for
6715 --enable-shared. Mention d as an option for --enable-languages.
6716 (Testing): Mention check-d as a target.
6717 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
6718 name suffixes. Mention d as a -x option.
6719 * doc/sourcebuild.texi (Top Level): Mention libphobos.
6720 * doc/standards.texi (Standards): Add section on D language.
6721 * doc/tm.texi: Regenerated.
6722 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
6723 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
6724 * dwarf2out.c (is_dlang): New function.
6725 (gen_compile_unit_die): Use DW_LANG_D for D.
6726 (declare_in_namespace): Return module die for D, instead of adding
6727 extra declarations into the namespace.
6728 (gen_namespace_die): Generate DW_TAG_module for D.
6729 (gen_decl_die): Handle CONST_DECLSs for D.
6730 (dwarf2out_decl): Likewise.
6731 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
6732 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
6733 kinds of aggregates.
6734 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
6735 * genhooks.c: Include d/d-target.def.
6737 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
6740 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
6741 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
6742 (STACK_DYNAMIC_OFFSET): Likewise.
6744 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
6747 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
6750 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
6752 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
6753 return type and other typos.
6755 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
6757 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
6758 a shorter sequence with fewer branches.
6759 (emit_final_str_compare_gpr): Ditto.
6761 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
6763 * config/rs6000/tmmintrin.h: New file.
6764 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
6766 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
6768 * config/rs6000/mmintrin.h: Enable 32bit compilation.
6769 * config/rs6000/xmmintrin.h: Likewise.
6771 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
6773 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
6775 2018-10-26 Richard Biener <rguenther@suse.de>
6777 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
6779 (vect_mark_slp_stmts_relevant): Likewise.
6780 (vect_detect_hybrid_slp_stmts): Likewise.
6781 (vect_bb_slp_scalar_cost): Likewise.
6782 (vect_remove_slp_scalar_calls): Likewise.
6784 2018-10-26 Jan Hubicka <jh@suse.cz>
6786 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
6787 (warn_types_mismatch): Fix walk of DECL_NAME.
6788 (odr_types_equivalent_p): Fix overactive assert.
6790 2018-10-26 Richard Biener <rguenther@suse.de>
6792 PR tree-optimization/87105
6793 * tree-vectorizer.h (_slp_tree::refcnt): New member.
6794 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
6796 (vect_create_new_slp_node): Initialize refcnt to one.
6798 (scalar_stmts_set_t, bst_fail): Remove.
6799 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
6800 (vect_build_slp_tree): Add bst_map argument and lookup
6801 already created SLP nodes.
6802 (vect_print_slp_tree): Handle a SLP graph, print SLP node
6804 (vect_slp_rearrange_stmts): Handle a SLP graph.
6805 (vect_analyze_slp_instance): Adjust and free SLP nodes from
6806 the CSE map. Fix indenting.
6807 (vect_schedule_slp_instance): Add short-cut.
6809 2018-10-26 Martin Liska <mliska@suse.cz>
6812 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
6813 addr_expr and not with pointers.
6815 2018-10-26 Jan Hubicka <jh@suse.cz>
6817 * tree.c (free_lang_data_in_type): Only check main variants.
6818 * ipa-devirt.c (warn_odr): Make static.
6819 (types_same_for_odr): Drop strict variant.
6820 (types_odr_comparable): Likewise.
6821 (odr_or_derived_type_p): Look for main variants.
6822 (odr_name_hasher::equal): Cleanup comment.
6823 (odr_subtypes_equivalent): Add warn and warned arguments; check main
6825 (type_variants_equivalent_p): break out from ...
6826 (odr_types_equivalent): ... here; go for main variants where needed.
6827 (warn_odr): ... here; turn static.
6828 (warn_types_mismatch): Compare mangled names of main variants.
6829 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
6830 (type_with_linkage_p): Sanity check that we look at main variant.
6831 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
6832 * tree.h (types_same_for_odr): Drop strict argument.
6834 2018-10-26 Richard Biener <rguenther@suse.de>
6836 PR tree-optimization/87746
6837 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
6838 Simplify and fix WRT strided store groups with size not
6839 equal to step in element count.
6840 (vect_analyze_group_access_1): Dump the whole group.
6842 2018-10-25 Carl Love <cel@us.ibm.com>
6844 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
6845 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
6846 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
6847 precicion entry for each overloaded builtin.
6848 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
6849 VSCEDPUO): Rename overloaded name.
6850 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
6851 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
6852 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
6853 define_expand for xscmpexqp instruction.
6854 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
6856 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
6857 Jinsong Ji <jji@us.ibm.com>
6859 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
6860 function with vec_sl.
6861 (_mm_slli_epi32): Likewise.
6862 (_mm_slli_epi64): Likewise.
6863 (_mm_srai_epi16): Replace deprecated function with vec_sra.
6864 (_mm_srai_epi32): Likewise.
6865 (_mm_srli_epi16): Replace deprecated function with vec_sr.
6866 (_mm_srli_epi32): Likewise.
6867 (_mm_srli_epi64): Likewise.
6868 (_mm_sll_epi16): Replace deprecated function with vec_sl.
6869 (_mm_sll_epi32): Likewise.
6870 (_mm_sll_epi64): Likewise.
6871 (_mm_sra_epi16): Replace deprecated function with vec_sra.
6872 (_mm_sra_epi32): Likewise.
6873 (_mm_srl_epi16): Replace deprecated function with vec_sr.
6874 (_mm_srl_epi32): Likewise.
6875 (_mm_srl_epi64): Likewise.
6877 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
6878 Jinsong Ji <jji@us.ibm.com>
6880 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
6881 comparison operators with vec_cmp* for compatibility due to
6882 unfortunate history; clean up formatting and use types more
6884 (_mm_sll_epi32): Likewise.
6885 (_mm_sll_epi64): Likewise.
6886 (_mm_srl_epi16): Likewise.
6887 (_mm_srl_epi32): Likewise.
6888 (_mm_srl_epi64): Likewise.
6890 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
6891 Jinsong Ji <jji@us.ibm.com>
6893 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
6894 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
6895 __vector __bool int. Use vec_cmpgt in preference to deprecated
6896 function vec_vcmpgtfp.
6897 (_mm_max_ps): Likewise.
6899 2018-10-25 Jeff Law <law@redhat.com>
6901 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
6904 2018-10-25 Martin Sebor <msebor@redhat.com>
6906 * doc/extend.texi (aligned): Expand attribute description.
6907 (Alignment): Rename section. Discuss function arguments.
6909 2018-10-25 Jan Hubicka <jh@suse.cz>
6911 * ipa-devirt.c (main_odr_variant): Remove.
6912 (hash_odr_name, types_same_for_odr, types_odr_comparable,
6913 odr_name_hasher::equal, odr_subtypes_equivalent_p):
6914 Drop use of main_odr_variant.
6915 (add_type_duplicate): Silence confused warnings on integer types.
6916 (get_odr_type): Always look for main variant.
6917 (register_odr_type): Simplify.
6919 2018-10-25 Richard Biener <rguenther@suse.de>
6921 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
6922 Initialize ng to silence error with release checking bootstrap.
6924 2018-10-25 Richard Biener <rguenther@suse.de>
6926 * tree-if-conv.c: Include tree-ssa-sccvn.h.
6927 (tree_if_conversion): Run CSE on the if-converted loop body.
6929 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
6931 * config/s390/constraints.md (ZL): New constraint.
6932 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
6934 * config/s390/s390.md (movdi_larl): Remove.
6935 (movdi_64): Add the LARL alternative.
6937 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
6940 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
6941 (RTX_CODE_HWINT_P): New macro.
6942 (rtx_code_size): Use RTX_CODE_HWINT_P ().
6944 2018-10-25 Jan Hubicka <jh@suse.cz>
6946 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
6949 2018-10-25 Richard Biener <rguenther@suse.de>
6951 PR tree-optimization/87665
6952 PR tree-optimization/87745
6953 * tree-vectorizer.h (get_earlier_stmt): Remove.
6954 (get_later_stmt): Pick up UID from the original non-pattern stmt.
6956 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
6958 * options.texi (Deprecated): Move list to Var section.
6960 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
6961 Jinsong Ji <jji@us.ibm.com>
6963 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
6964 __vector long to __vector long long.
6965 (_mm_cvtpd_ps): Likewise.
6966 (_mm_cvttpd_epi32): Likewise.
6967 (_mm_cvtpi32_pd): Likewise.
6968 (_mm_unpackhi_epi64): Likewise.
6969 (_mm_unpacklo_epi64): Likewise.
6971 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
6973 PR rtl-optimization/87720
6974 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
6976 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
6978 * gimple-ssa-isolate-paths.c
6979 (find_implicit_erroneous_behavior): Do not change code if the
6980 pass is running for warnings only.
6981 (find_explicit_erroneous_behavior): Likewise.
6983 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
6985 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
6986 Define as rs6000_mangle_decl_assembler_name.
6987 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
6988 long double to IEEE long double, switch the names of the long
6989 double built-in functions to be <func>f128 instead of <func>l.
6991 2018-10-24 Martin Sebor <msebor@redhat.com>
6993 * doc/extend.texi (nonnull): List no-argument form. Reference
6994 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
6996 2018-10-24 Richard Biener <rguenther@suse.de>
6998 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
7000 2018-10-24 Martin Liska <mliska@suse.cz>
7002 PR tree-optimization/84436
7003 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
7005 (switch_conversion::contains_linear_function_p): New.
7006 (switch_conversion::build_one_array): Support linear
7007 transformation on input.
7008 * tree-switch-conversion.h (struct switch_conversion): Add
7009 contains_linear_function_p declaration.
7011 2018-10-24 Richard Biener <rguenther@suse.de>
7013 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
7014 if its argument is CONSTANT_CLASS_P.
7016 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
7018 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
7019 it is wrong for forward declarations.
7021 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
7023 * config/s390/s390.c (s390_check_qrst_address): Add the missing
7024 SYMBOL_REF_P () check.
7026 2018-10-24 Richard Biener <rguenther@suse.de>
7028 PR tree-optimization/87105
7029 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
7030 dump classification.
7031 (vect_analyze_data_ref_accesses): Handle duplicate loads and
7032 stores by splitting the affected group after the fact.
7033 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
7034 fail the SLP build because of size constraints.
7036 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7038 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
7039 * configure: Regenerate.
7040 * config.in: Regenerate.
7041 * varasm.c (mergeable_string_section): Use readonly_data_section
7042 if linker doesn't support SHF_MERGE with alignment > 8.
7043 (mergeable_constant_section): Likewise.
7045 2018-10-24 Richard Biener <rguenther@suse.de>
7047 PR tree-optimization/84013
7048 * tree-ssa-structalias.c (struct msdi_data): New struct for
7049 marshalling data to walk_stmt_load_store_ops.
7050 (maybe_set_dependence_info): Refactor as callback for
7051 walk_stmt_load_store_ops.
7052 (compute_dependence_clique): Set restrict info on all stmt kinds.
7054 2018-10-24 Martin Liska <mliska@suse.cz>
7056 * cgraph.c (cgraph_node::dump):
7057 Remove reduntant dumps and make tp_first_run dump more compact.
7059 2018-10-24 Richard Biener <rguenther@suse.de>
7061 PR tree-optimization/87665
7062 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
7065 2018-10-12 Jeff Law <law@redhat.com>
7067 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
7070 2018-10-23 Richard Biener <rguenther@suse.de>
7072 * tree-vrp.c (add_assert_info): Guard dump_printf with
7074 * gimple-ssa-evrp-analyze.c
7075 (evrp_range_analyzer::record_ranges_from_incoming_edge):
7076 Use value_range::ignore_equivs_equal_p.
7078 2018-10-23 Richard Biener <rguenther@suse.de>
7080 PR tree-optimization/87105
7081 PR tree-optimization/87608
7082 * passes.def (pass_all_early_optimizations): Add early phi-opt
7084 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
7085 addition to debug stmts.
7086 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
7087 and abs replacement early.
7088 * tree-cfg.c (gimple_empty_block_p): Likewise.
7090 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
7093 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
7094 specified to configure.
7095 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
7097 2018-10-23 Richard Biener <rguenther@suse.de>
7099 PR tree-optimization/87700
7100 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
7102 2018-10-23 Jakub Jelinek <jakub@redhat.com>
7105 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
7106 second argument from __mmask16 to __mmask8.
7107 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
7108 _mm_mask_packs_epi32): Likewise.
7109 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
7111 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
7113 2018-10-23 Richard Biener <rguenther@suse.de>
7115 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
7117 2018-10-23 Richard Biener <rguenther@suse.de>
7119 PR tree-optimization/86144
7120 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
7121 over simd attribute.
7123 2018-10-23 Richard Biener <rguenther@suse.de>
7125 PR tree-optimization/87693
7126 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
7127 the case we do not find the taken edge.
7129 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
7130 Jinsong Ji <jji@us.ibm.com>
7132 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
7133 (_mm_store_pd): Use unaligned vector type for pointer cast.
7134 (_mm_maskmoveu_si128): Likewise.
7135 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
7136 (_mm_store_ps): Use unaligned vector type for pointer cast.
7138 2018-10-22 Paul Koning <ni1d@arrl.net>
7140 * symtab.c (symtab_node::increase_alignment): Correct max
7143 2018-10-22 Yury Gribov <tetra2005@gmail.com>
7145 PR tree-optimization/87633
7146 * match.pd: Do not generate unordered integer comparisons.
7148 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
7150 PR rtl-optimization/87600
7151 * combine.c: Add include of expr.h.
7152 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
7153 register to a pseudo.
7154 (make_more_copies): New function, add a copy to a new pseudo after
7155 the moves from hard registers into pseudos.
7156 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
7157 later. Call make_more_copies.
7159 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
7161 * lra-constraints.c (process_alt_operands): New local array,
7162 matching_early_clobber. Check matching_early_clobber before
7163 decrementing reject, and set matching_early_clobber after.
7165 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
7168 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
7169 call output_addr_const and hope for the best.
7171 2018-10-22 Richard Biener <rguenther@suse.de>
7173 * gimple-ssa-evrp-analyze.c
7174 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
7175 smarter about what ranges to use.
7176 * tree-vrp.c (add_assert_info): Dump here.
7177 (register_edge_assert_for_2): Instead of here at multiple but
7180 * gcc.dg/tree-ssa/evrp12.c: New testcase.
7181 * gcc.dg/predict-6.c: Adjust.
7182 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
7183 * gcc.dg/tree-ssa/vrp02.c: Likewise.
7184 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
7186 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
7187 Richard Biener <rguenther@suse.de>
7189 * bitmap.h: Update data structure documentation, including a
7190 description of bitmap views as either linked-lists or splay trees.
7191 (struct bitmap_element_def): Update comments for splay tree bitmaps.
7192 (struct bitmap_head_def): Likewise.
7193 (bitmap_list_view, bitmap_tree_view): New prototypes.
7194 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
7196 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
7197 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
7198 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
7199 released bitmap element here.
7200 (bitmap_element_free): Remove.
7201 (bitmap_elt_clear_from): Work on splay tree bitmaps.
7202 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
7203 this function similar ones such that linked-list bitmap implementation
7204 functions are grouped.
7205 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
7206 and moved for grouping.
7207 (bitmap_list_insert_element_after): Renamed from
7208 bitmap_elt_insert_after, and moved for grouping.
7209 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
7210 (bitmap_tree_link_left, bitmap_tree_link_right,
7211 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
7212 bitmap_tree_link_element, bitmap_tree_unlink_element,
7213 bitmap_tree_find_element): New functions for splay-tree bitmap
7215 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
7216 Renamed and moved, see above entries.
7217 (bitmap_tree_listify_from): New function to convert part of a splay
7218 tree bitmap to a linked-list bitmap.
7219 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
7220 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
7221 (bitmap_find_bit): Remove.
7222 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
7223 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
7224 Handle splay tree bitmaps.
7225 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
7226 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
7227 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
7228 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
7229 bitmap_intersect_compl_p, bitmap_ior_and_compl,
7230 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
7231 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
7232 corresponding changes to use linked-list specific bitmap_element
7233 manipulation functions as applicable for efficiency.
7234 (bitmap_tree_to_vec): New function.
7235 (debug_bitmap_elt_file): New function split out from ...
7236 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
7237 (bitmap_print): Likewise.
7239 PR tree-optimization/63155
7240 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
7242 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
7245 2018-10-22 Martin Liska <mliska@suse.cz>
7247 PR tree-optimization/87686
7249 2018-08-29 Martin Liska <mliska@suse.cz>
7251 * tree-switch-conversion.c (switch_conversion::expand):
7252 Strenghten assumption about gswitch statements.
7254 2018-10-22 Martin Liska <mliska@suse.cz>
7256 * ipa-icf.c (sem_item::compare_attributes): Remove.
7257 (sem_item::compare_referenced_symbol_properties): Use
7258 attribute_list_equal instead.
7259 (sem_function::equals_wpa): Likewise.
7260 * ipa-icf.h: Remove compare_attributes.
7262 2018-10-22 Richard Biener <rguenther@suse.de>
7265 * mem-stats.h (mem_usage::operator==): Fix pasto.
7267 2018-10-22 Richard Biener <rguenther@suse.de>
7269 PR tree-optimization/87640
7270 * tree-vrp.c (set_value_range_with_overflow): Decompose
7272 (extract_range_from_binary_expr_1): Adjust.
7274 2018-10-22 Martin Jambor <mjambor@suse.cz>
7276 * tree-eh.h (stmt_could_throw_p): Add function parameter.
7277 (stmt_can_throw_external): Likewise.
7278 (stmt_can_throw_internal): Likewise.
7279 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
7280 (lower_eh_constructs_2): Likewise.
7281 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
7282 (stmt_can_throw_external): Likewise.
7283 (stmt_can_throw_internal): Likewise.
7284 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
7285 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
7286 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
7287 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
7288 (pass_lower_eh_dispatch::execute): Pass cfun to
7289 stmt_can_throw_external.
7290 (cleanup_empty_eh): Likewise.
7291 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
7292 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
7293 stmt_can_throw_external instead of pushing it to cfun.
7294 (symbol_table::create_edge): Likewise.
7295 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
7296 stmt_can_throw_internal.
7297 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
7298 to stmt_could_throw_p.
7299 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
7300 stmt_can_throw_internal.
7301 (pass_store_merging::execute): Likewise.
7302 * gimple-ssa-strength-reduction.c
7303 (find_candidates_dom_walker::before_dom_children): Pass cfun to
7305 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
7306 stmt_can_throw_internal.
7307 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
7308 to stmt_can_throw_external.
7309 (check_stmt): Pass cfun to stmt_could_throw_p.
7310 (check_stmt): Pass cfun to stmt_can_throw_external.
7311 (pass_nothrow::execute): Likewise.
7312 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
7313 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
7314 stmt_can_throw_internal.
7315 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
7316 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
7317 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
7318 * tree-complex.c (expand_complex_libcall): Pass cfun to
7319 stmt_could_throw_p and to stmt_can_throw_internal.
7320 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
7321 * tree-inline.c (copy_edges_for_bb): Likewise.
7322 (maybe_move_debug_stmts_to_successors): Likewise.
7323 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
7325 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
7326 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
7327 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
7328 stmt_can_throw_internal.
7329 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
7330 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
7332 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
7333 stmt_can_throw_internal.
7334 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
7335 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
7337 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
7338 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
7339 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
7340 (convert_mult_to_fma_1): Likewise.
7341 (convert_to_divmod): Likewise.
7342 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
7343 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
7344 * tree-ssa-propagate.c
7345 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
7346 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
7347 (maybe_optimize_range_tests): Likewise.
7348 (linearize_expr_tree): Likewise.
7349 (reassociate_bb): Likewise.
7350 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7351 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
7352 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
7353 (handle_char_store): Likewise.
7354 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
7355 stmt_can_throw_internal.
7356 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
7358 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7359 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
7360 (vectorizable_simd_clone_call): Likewise.
7361 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
7362 (gimple_stringop_fixed_value): Likewise.
7364 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
7366 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
7367 literal pool references.
7368 (s390_check_qrst_address): Adapt to the new behavior of
7369 s390_loadrelative_operand_p ().
7371 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
7374 * config/i386/sse.md (*andnot<mode>3_bcst): New.
7376 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
7379 * config/i386/sse.md (*<code><mode>3_bcst): New.
7381 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
7384 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
7385 V4DI, V16SI and V8DI.
7386 (*sub<mode>3<mask_name>_bcst): New.
7387 (*add<mode>3<mask_name>_bcst): Likewise.
7389 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
7390 Jinsong Ji <jji@us.ibm.com>
7392 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
7393 __m64 with __vector unsigned long long for compatibility.
7394 (_mm_movemask_epi8): Likewise.
7395 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
7396 (_mm_cvttps_pi32): Likewise.
7397 (_mm_cvtpi32_ps): Likewise.
7398 (_mm_cvtps_pi16): Likewise.
7399 (_mm_loadh_pi): Likewise.
7400 (_mm_storeh_pi): Likewise.
7401 (_mm_movehl_ps): Likewise.
7402 (_mm_movelh_ps): Likewise.
7403 (_mm_loadl_pi): Likewise.
7404 (_mm_storel_pi): Likewise.
7405 (_mm_movemask_ps): Likewise.
7406 (_mm_shuffle_pi16): Likewise.
7408 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7411 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
7412 __builtin_ia32_vfnmsubpd512_mask.
7413 (_mm512_mask_fnmsub_round_pd): Likewise.
7414 (_mm512_fnmsub_pd): Likewise.
7415 (_mm512_mask_fnmsub_pd): Likewise.
7416 (_mm512_maskz_fnmsub_round_pd): Use
7417 __builtin_ia32_vfnmsubpd512_maskz.
7418 (_mm512_maskz_fnmsub_pd): Likewise.
7419 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
7420 (_mm512_mask_fnmsub_round_ps): Likewise.
7421 (_mm512_fnmsub_ps): Likewise.
7422 (_mm512_mask_fnmsub_ps): Likewise.
7423 (_mm512_maskz_fnmsub_round_ps): Use
7424 __builtin_ia32_vfnmsubps512_maskz.
7425 (_mm512_maskz_fnmsub_ps): Likewise.
7426 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
7427 __builtin_ia32_vfnmsubpd256_mask.
7428 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
7429 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
7430 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
7431 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
7432 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
7433 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
7434 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
7435 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
7436 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
7437 __builtin_ia32_vfnmsubpd.
7438 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
7439 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
7440 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
7441 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
7442 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
7443 * config/i386/i386-builtin.def: Add
7444 __builtin_ia32_vfnmsubpd256_mask,
7445 __builtin_ia32_vfnmsubpd256_maskz,
7446 __builtin_ia32_vfnmsubpd128_mask,
7447 __builtin_ia32_vfnmsubpd128_maskz,
7448 __builtin_ia32_vfnmsubps256_mask,
7449 __builtin_ia32_vfnmsubps256_maskz,
7450 __builtin_ia32_vfnmsubps128_mask,
7451 __builtin_ia32_vfnmsubps128_maskz,
7452 __builtin_ia32_vfnmsubpd512_mask,
7453 __builtin_ia32_vfnmsubpd512_maskz,
7454 __builtin_ia32_vfnmsubps512_mask,
7455 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
7456 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
7457 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
7458 __builtin_ia32_vfnmsubpd256.
7459 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
7460 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
7461 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
7463 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
7465 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
7467 (fmai_vmfnmsub_<mode><round_name>): Likewise.
7469 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7472 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
7473 __builtin_ia32_vfnmaddpd512_mask.
7474 (_mm512_mask_fnmadd_round_pd): Likewise.
7475 (_mm512_fnmadd_pd): Likewise.
7476 (_mm512_mask_fnmadd_pd): Likewise.
7477 (_mm512_maskz_fnmadd_round_pd): Use
7478 __builtin_ia32_vfnmaddpd512_maskz.
7479 (_mm512_maskz_fnmadd_pd): Likewise.
7480 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
7481 (_mm512_mask_fnmadd_round_ps): Likewise.
7482 (_mm512_fnmadd_ps): Likewise.
7483 (_mm512_mask_fnmadd_ps): Likewise.
7484 (_mm512_maskz_fnmadd_round_ps): Use
7485 __builtin_ia32_vfnmaddps512_maskz.
7486 (_mm512_maskz_fnmadd_ps): Likewise.
7487 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
7488 __builtin_ia32_vfnmaddpd256_mask.
7489 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
7490 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
7491 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
7492 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
7493 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
7494 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
7495 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
7496 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
7497 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
7498 __builtin_ia32_vfnmaddpd.
7499 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
7500 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
7501 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
7502 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
7503 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
7504 * config/i386/i386-builtin.def: Add
7505 __builtin_ia32_vfnmaddpd256_mask,
7506 __builtin_ia32_vfnmaddpd256_maskz,
7507 __builtin_ia32_vfnmaddpd128_mask,
7508 __builtin_ia32_vfnmaddpd128_maskz,
7509 __builtin_ia32_vfnmaddps256_mask,
7510 __builtin_ia32_vfnmaddps256_maskz,
7511 __builtin_ia32_vfnmaddps128_mask,
7512 __builtin_ia32_vfnmaddps128_maskz,
7513 __builtin_ia32_vfnmaddpd512_mask,
7514 __builtin_ia32_vfnmaddpd512_maskz,
7515 __builtin_ia32_vfnmaddps512_mask,
7516 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
7517 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
7518 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
7519 __builtin_ia32_vfnmaddpd256.
7520 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
7521 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
7522 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
7524 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
7526 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
7528 (fmai_vmfnmadd_<mode><round_name>): Likewise.
7530 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7533 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
7534 __builtin_ia32_vfmsubpd512_mask.
7535 (_mm512_mask_fmsub_round_pd): Likewise.
7536 (_mm512_fmsub_pd): Likewise.
7537 (_mm512_mask_fmsub_pd): Likewise.
7538 (_mm512_maskz_fmsub_round_pd): Use
7539 __builtin_ia32_vfmsubpd512_maskz.
7540 (_mm512_maskz_fmsub_pd): Likewise.
7541 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
7542 (_mm512_mask_fmsub_round_ps): Likewise.
7543 (_mm512_fmsub_ps): Likewise.
7544 (_mm512_mask_fmsub_ps): Likewise.
7545 (_mm512_maskz_fmsub_round_ps): Use
7546 __builtin_ia32_vfmsubps512_maskz.
7547 (_mm512_maskz_fmsub_ps): Likewise.
7548 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
7549 __builtin_ia32_vfmsubpd256_mask.
7550 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
7551 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
7552 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
7553 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
7554 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
7555 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
7556 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
7557 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
7558 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
7559 __builtin_ia32_vfmsubpd.
7560 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
7561 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
7562 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
7563 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
7564 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
7565 * config/i386/i386-builtin.def: Add
7566 __builtin_ia32_vfmsubpd256_mask,
7567 __builtin_ia32_vfmsubpd256_maskz,
7568 __builtin_ia32_vfmsubpd128_mask,
7569 __builtin_ia32_vfmsubpd128_maskz,
7570 __builtin_ia32_vfmsubps256_mask,
7571 __builtin_ia32_vfmsubps256_maskz,
7572 __builtin_ia32_vfmsubps128_mask,
7573 __builtin_ia32_vfmsubps128_maskz,
7574 __builtin_ia32_vfmsubpd512_mask,
7575 __builtin_ia32_vfmsubpd512_maskz,
7576 __builtin_ia32_vfmsubps512_mask,
7577 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
7578 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
7579 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
7580 __builtin_ia32_vfmsubpd256.
7581 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
7582 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
7583 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
7585 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
7587 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
7589 (fmai_vmfmsub_<mode><round_name>): Likewise.
7591 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7593 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
7594 Remove plus. Renamed to ...
7595 (*sub<mode>3<mask_name>_bcst): This.
7596 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
7597 (*add<mode>3<mask_name>_bcst): This.
7599 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7602 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
7604 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
7607 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
7608 (_mm_or_epi32): Likewise.
7609 (_mm256_xor_epi32): Likewise.
7610 (_mm_xor_epi32): Likewise.
7611 (_mm256_or_epi64): Likewise.
7612 (_mm_or_epi64): Likewise.
7613 (_mm256_xor_epi64): Likewise.
7614 (_mm_xor_epi64): Likewise.
7616 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
7619 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
7621 2018-10-20 Jakub Jelinek <jakub@redhat.com>
7624 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
7626 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
7628 * doc/ux.texi: Move @section directly after @node.
7630 2018-10-19 Jakub Jelinek <jakub@redhat.com>
7634 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
7635 depend closely nested inside of loop with ordered clause with
7638 2018-10-19 David Malcolm <dmalcolm@redhat.com>
7640 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
7641 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
7642 * doc/ux.texi: New file.
7644 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
7646 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
7647 be the first CR field allocated.
7649 2018-10-19 Richard Biener <rguenther@suse.de>
7652 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
7653 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
7655 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
7658 * config/i386/sse.md
7659 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
7660 (*add<mode>3<mask_name>_bcst_2): Likewise.
7662 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
7664 * config/i386/sse.md
7665 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
7666 Replace nonimmediate_operand with register_operand.
7667 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
7669 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
7672 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
7674 PR rtl-optimization/87596
7675 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
7676 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
7677 for instructions in FROM..TO range.
7679 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
7681 * cfgexpand.c (expand_one_var): Use specific wording in error message
7682 for non-local frame variables.
7683 * stor-layout.c (layout_decl): Do not issue a warning for them.
7685 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
7687 * haifa-sched.c (priority): Add force_recompute parameter.
7688 (apply_replacement): Call priority () with force_recompute = true.
7689 (restore_pattern): Likewise.
7691 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7693 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
7694 HOST_BITS_PER_WIDE_INT.
7695 (test_vector_ops_duplicate): Likewise.
7697 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7700 * config/i386/sse.md (VF_AVX512): New.
7701 (avx512bcst): Likewise.
7702 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
7704 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
7706 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
7709 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
7711 * doc/invoke.texi (-dumpversion): Improve grammar.
7712 (-dumpfullversion): Make more consistent with -dumpversion.
7714 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
7716 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
7717 Set JUMP_LABEL to the jump insn.
7718 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
7719 Predict emitted jump and add label to jump insn.
7721 2018-10-18 David Malcolm <dmalcolm@redhat.com>
7723 PR tree-optimization/87562
7724 * input.c (get_substring_ranges_for_loc): Use
7725 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
7726 getting the linemap for the endpoint. Verify that it's either
7727 in the same linemap as the start point's spelling location, or
7728 at least in the same file.
7730 2018-10-18 Richard Biener <rguenther@suse.de>
7732 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
7733 feed width-specific load/store costs through ix86_vec_cost.
7734 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
7735 (k8_cost): Likewise.
7736 (bdver_cost): Likewise.
7737 (znver1_cost): Likewise.
7738 (btver1_cost): Likewise.
7739 (btver2_cost): Likewise.
7741 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7743 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
7744 to simplify subreg of vec_merge.
7746 2018-10-18 Richard Biener <rguenther@suse.de>
7748 * config/i386/i386.c: Fix costing of vector FMA.
7750 2018-10-18 Richard Biener <rguenther@suse.de>
7752 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
7754 (ix86_builtin_vectorization_cost): For vec_construct properly
7755 cost insertion into SSE regs.
7756 (...): Adjust calls to ix86_vec_cost.
7758 2018-10-18 Richard Biener <rguenther@suse.de>
7762 2018-02-07 Richard Biener <rguenther@suse.de>
7764 PR tree-optimization/84204
7765 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
7768 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
7771 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
7773 (test_vector_ops_duplicate): Add test for a scalar subreg of a
7774 VEC_MERGE of a VEC_DUPLICATE.
7776 2018-10-17 Joseph Myers <joseph@codesourcery.com>
7778 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
7779 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
7780 * doc/standards.texi (C Language): Document C2X.
7781 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
7782 (rl78_option_override): Handle "GNU C2X" language name.
7784 2018-10-17 Joseph Myers <joseph@codesourcery.com>
7786 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
7787 Document C17 as published in 2018.
7789 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
7792 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
7793 bail out if both sides do not have the same storage order.
7795 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
7797 * bitmap.c (bitmap_head::dump): New.
7798 * bitmap.h (bitmap_head): Add dump().
7799 * gimple-ssa-evrp-analyze.c
7800 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
7801 (evrp_range_analyzer::set_ssa_range_info): Same.
7802 (evrp_range_analyzer::record_ranges_from_phis): Same.
7803 (evrp_range_analyzer::record_ranges_from_stmt): Same.
7804 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
7805 * gimple-ssa-sprintf.c (get_int_range): Same.
7806 (format_integer): Same.
7807 (sprintf_dom_walker::handle_gimple_call): Same.
7808 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
7809 (ipcp_vr_lattice::top_p): Same.
7810 (ipcp_vr_lattice::bottom_p): Same.
7811 (ipcp_vr_lattice::set_to_bottom): Same.
7812 (ipa_vr_operation_and_type_effects): Same.
7813 (propagate_vr_across_jump_function): Same.
7814 (ipcp_store_vr_results): Same.
7815 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
7816 (ipa_print_node_jump_functions_for_edge): Same.
7817 (ipa_get_value_range): Same.
7818 (ipa_compute_jump_functions_for_edge): Same.
7819 (ipa_write_jump_function): Same.
7820 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
7821 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
7823 * vr-values.c (set_value_range_to_nonnegative): Same.
7824 (set_value_range_to_truthvalue): Same.
7825 (vr_values::get_value_range): Same.
7826 (vr_values::set_defs_to_varying): Same.
7827 (vr_values::update_value_range): Same.
7828 (symbolic_range_based_on_p): Same.
7829 (vr_values::op_with_boolean_value_range_p): Same.
7830 (vr_values::extract_range_for_var_from_comparison_expr): Same.
7831 (vr_values::extract_range_from_ssa_name): Same.
7832 (vr_values::extract_range_from_binary_expr): Same.
7833 (vr_values::extract_range_from_unary_expr): Same.
7834 (vr_values::extract_range_from_cond_expr): Same.
7835 (vr_values::extract_range_from_comparison): Same.
7836 (vr_values::check_for_binary_op_overflow): Same.
7837 (vr_values::extract_range_basic): Same.
7838 (vr_values::extract_range_from_assignment): Same.
7839 (compare_ranges): Same.
7840 (compare_range_with_value): Same.
7841 (vr_values::adjust_range_with_scev): Same.
7842 (vrp_valueize): Same.
7843 (vrp_valueize_1): Same.
7844 (vr_values::get_vr_for_comparison): Same.
7845 (vr_values::compare_name_with_value): Same.
7846 (vr_values::compare_names): Same.
7847 (vr_values::vrp_evaluate_conditional): Same.
7848 (find_case_label_ranges): Same.
7849 (vr_values::vrp_visit_switch_stmt): Same.
7850 (vr_values::extract_range_from_phi_node): Same.
7851 (vr_values::simplify_div_or_mod_using_ranges): Same.
7852 (vr_values::simplify_bit_ops_using_ranges): Same.
7853 (test_for_singularity): Same.
7854 (range_fits_type_p): Same.
7855 (vr_values::simplify_cond_using_ranges_1): Same.
7856 (vr_values::simplify_switch_using_ranges): Same.
7857 (vr_values::simplify_float_conversion_using_ranges): Same.
7858 (vr_values::two_valued_val_range_p): Same.
7859 (vr_values::add_equivalence): Move to value_range::equiv_add.
7860 * vr-values.h (vr_values::add_equivalence): Remove.
7861 (VR_INITIALIZER): Remove.
7862 * tree-vrp.c (value_range::set): New.
7863 (value_range::equiv_add): New.
7864 (value_range::value_range): New.
7865 (value_range::deep_copy): New.
7866 (value_range::check): New.
7867 (value_range::equal_p): New.
7868 (value_range::ignore_equivs_equal_p): New.
7869 (value_range::operator==): New.
7870 (value_range::operator!=): New.
7871 (value_range::symbolic_p): New.
7872 (value_range::numeric_p): New.
7873 (value_range::set_undefined): New.
7874 (value_range::set_varying): New.
7875 (value_range::may_contain_p): New.
7876 (value_range::equiv_clear): New.
7877 (value_range::singleton_p): New.
7878 (value_range::intersect): New.
7879 (value_range::dump): New.
7880 (value_range::set_and_canonicalize): New.
7881 (set_value_range): Adjust for value_range API.
7882 (set_value_range_to_undefined): Same.
7883 (set_value_range_to_varying): Same.
7884 (set_and_canonicalize_value_range): Same.
7885 (set_value_range_to_nonnull): Same.
7886 (set_value_range_to_null): Same.
7887 (range_is_null): Same.
7888 (range_is_nonnull): Same.
7889 (range_int_cst_p): Same.
7890 (range_int_cst_singleton_p): Same.
7891 (symbolic_range_p): Same.
7892 (range_includes_zero_p): Same.
7893 (value_range_constant_singleton): Same.
7894 (vrp_set_zero_nonzero_bits): Same.
7895 (ranges_from_anti_range): Same.
7896 (extract_range_into_wide_ints): Same.
7897 (extract_range_from_multiplicative_op): Same.
7898 (set_value_range_with_overflow): Same.
7899 (extract_range_from_binary_expr_1): Same.
7900 (extract_range_from_unary_expr): Same.
7901 (dump_value_range): Same.
7902 (debug_value_range): Same.
7903 (vrp_prop::check_array_ref): Same.
7904 (vrp_prop::check_mem_ref): Same.
7905 (vrp_prop::vrp_initialize): Same.
7906 (vrp_prop::visit_stmt): Same.
7907 (intersect_ranges): Same.
7908 (vrp_prop::visit_phi): Same.
7909 (vrp_prop::vrp_finalize): Same.
7910 (determine_value_range_1): Same.
7911 (determine_value_range): Same.
7912 (vrp_intersect_ranges_1): Rename to...
7913 (vrp_intersect_1): this.
7914 (vrp_intersect_ranges): Rename to...
7915 (value_range::intersect_helper): ...this.
7916 (vrp_meet_1): Rename to...
7917 (value_range::union_helper): ...this.
7918 (vrp_meet): Rename to...
7919 (value_range::union_): ...this.
7920 (copy_value_range): Remove.
7921 * tree-vrp.h (struct value_range): Rewrite into a proper class.
7922 (value_range::vrtype): New.
7923 (value_range::type): New.
7924 (value_range::equiv): New.
7925 (value_range::min): New.
7926 (value_range::max): New.
7927 (value_range::varying_p): New.
7928 (value_range::undefined_p): New.
7929 (value_range::null_p): New.
7930 (value_range::equiv_add): New.
7931 (copy_value_range): Remove.
7933 2018-10-17 David Malcolm <dmalcolm@redhat.com>
7935 * Makefile.in (SELFTEST_TARGETS): New.
7936 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
7937 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
7938 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
7940 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
7941 (selftest-c++-gdb, selftest-c++-valgrind): Move to
7943 * configure: Regenerate.
7944 * configure.ac (selftest_languages): New.
7946 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
7948 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
7949 overflow wraps argument.
7950 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
7951 wide_int_range_multiplicative_op.
7952 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
7953 overflow wraps argument.
7954 (wide_int_range_multiplicative_op): Same.
7955 (wide_int_range_lshift): Same.
7956 (wide_int_range_div): Same.
7957 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
7958 (wide_int_range_lshift): Same.
7959 (wide_int_range_div): Same.
7961 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
7963 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
7964 use sign as argument.
7965 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
7966 wide_int_range_shift_undefined_p.
7968 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7970 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
7972 (@despeculate_copy<ALLI_TI:mode>): ... This.
7973 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
7976 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7978 * config.gcc: Obsolete *-*-solaris2.10*.
7979 * doc/install.texi (Specific, *-*-solaris2*): Document it.
7981 2018-10-12 Jeff Law <law@redhat.com>
7983 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
7984 reg + sym +- const_int addressing modes.
7986 2018-10-15 David Malcolm <dmalcolm@redhat.com>
7988 * common.opt (fdiagnostics-minimum-margin-width=): New option.
7989 * diagnostic-show-locus.c (layout::layout): Apply the minimum
7991 (layout::start_annotation_line): Only print up to 3 of the
7992 margin character, to avoid touching the left-hand side.
7993 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
7994 minimum margin width, as set by test_diagnostic_context's ctor.
7995 (selftest::test_fixit_insert_containing_newline): Likewise.
7996 (selftest::test_fixit_insert_containing_newline_2): Likewise.
7997 (selftest::test_line_numbers_multiline_range): Clear
7998 dc.min_margin_width.
7999 * diagnostic.c (diagnostic_initialize): Initialize
8001 * diagnostic.h (struct diagnostic_context): Add field
8003 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
8004 * opts.c (common_handle_option): Handle
8005 OPT_fdiagnostics_minimum_margin_width_.
8006 * selftest-diagnostic.c
8007 (selftest::test_diagnostic_context::test_diagnostic_context):
8008 Initialize min_margin_width to 6.
8009 * toplev.c (general_init): Initialize global_dc->min_margin_width.
8011 2018-10-15 David Malcolm <dmalcolm@redhat.com>
8013 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
8014 Fix usage of "error_at_rich_loc" in the comment.
8016 2018-10-15 Renlin Li <renlin.li@arm.com>
8019 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
8020 if-conversioned loop when it contains ifn with types not
8021 supported by backend.
8022 * internal-fn.c (expand_direct_optab_fn): Add an assert.
8023 (direct_internal_fn_supported_p): New helper function.
8024 * internal-fn.h (direct_internal_fn_supported_p): Declare.
8026 2018-10-15 Jakub Jelinek <jakub@redhat.com>
8029 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
8030 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
8031 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
8033 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
8035 PR tree-optimization/87022
8036 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
8037 bits in dist vector rather than the first one.
8039 2018-10-15 Richard Biener <rguenther@suse.de>
8042 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
8043 (visit_loadstore): When a used restrict tag escaped verify that
8044 the points-to solution of "other" pointers do not include
8046 (compute_dependence_clique): If a used restrict tag escaped
8047 communicated that down to visit_loadstore.
8049 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
8051 * config/s390/s390.c (s390_expand_vec_init): Force vector element
8052 into reg if it isn't a general operand.
8054 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
8057 * config/i386/sse.md (*vec_dupv2di): Add register source to
8060 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
8063 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
8064 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
8065 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
8066 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
8068 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
8070 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
8071 (notice_args_size): Set it in the current trace if no insn that can
8072 throw internally has been seen yet.
8073 (connect_traces): When connecting args_size between traces, allow the
8074 incoming values not to match if there is an insn setting it before the
8075 first insn that can throw internally; in that case, force the creation
8076 of a CFI note on this latter insn.
8078 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
8080 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
8081 the base class, because using the injected-class-name was not clearly
8082 specified until DR 176.
8084 2018-10-12 Paul Koning <ni1d@arrl.net>
8086 * config/pdp11/pdp11.md (doloop_end): New expander.
8087 (doloop_end_insn): renamed from "doloop_end".
8088 (addqi3): New pattern.
8089 (subqi3): New pattern.
8090 * config/pdp11/predicates.md (incdec_operand): New predicate.
8092 2018-10-12 Yury Gribov <tetra2005@gmail.com>
8095 * real.c (format_helper::can_represent_integral_type_p): New function
8096 * real.h (format_helper::can_represent_integral_type_p): Ditto.
8097 * match.pd: New pattern.
8099 2018-10-12 Alexandre Oliva <oliva@adacore.com>
8101 * configure.ac: Introduce --enable-large-address-aware
8102 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
8103 * doc/install.texi: Document it.
8104 * configure, config.in: Rebuilt.
8105 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
8106 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
8107 (LINK_SPEC): Insert it.
8108 * config/i386/mingw-w64.h: Likewise.
8110 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
8112 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
8114 PR rtl-optimization/87600
8115 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
8117 2018-10-12 Paul Koning <ni1d@arrl.net>
8119 * doc/md.texi (doloop_end): Document that the pattern code may
8120 need to check operand mode.
8122 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
8124 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
8125 to zero-extend between int and floating-point registers.
8126 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
8127 ldp into floating-point registers. Add type and arch attributes.
8128 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
8129 Use f_loads for type attribute.
8131 2018-10-11 Martin Sebor <msebor@redhat.com>
8133 * doc/extend.texi (attribute packed): Correct typos.
8135 2018-10-11 Martin Sebor <msebor@redhat.com>
8137 * doc/extend.texi (attribute flatten): Mention interaction with
8140 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
8143 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
8144 Set new_decl virtual flag to zero.
8146 2018-10-11 Martin Sebor <msebor@redhat.com>
8149 * doc/extend.texi (attribute format_arg): Discuss using multiple
8150 attributes on a single function.
8152 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
8154 PR tree-optimization/86829
8155 * match.pd (sin (atan (x))): New simplification rules.
8156 (cos (atan (x))): Likewise.
8157 * real.c (build_sinatan_real): New function.
8158 * real.h (build_sinatan_real): Prototype.
8160 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
8162 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
8164 (fold_mergeeo_helper): New helper function.
8165 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
8166 intrinsics. Correct some whitespace indentation issues.
8168 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
8171 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
8172 Use HOST_WIDE_INT_1U for shift.
8174 2018-10-11 Doug Rupp <rupp@adacore.com>
8175 Olivier Hainque <hainque@adacore.com>
8177 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
8178 Pass --relax to the linker for RTPs.
8179 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
8181 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
8182 Jan Hubicka <jh@suse.cz>
8183 Martin Jambor <mjambor@suse.cz>
8185 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
8186 the same elements are repeated rather than printing all of them.
8187 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
8188 "repeated" elements.
8189 * read-rtl-function.c (test_loading_repeat): New function.
8190 (read_rtl_function_c_tests): Call test_loading_repeat.
8191 * rtl-tests.c (test_dumping_repeat): New function.
8192 (rtl_tests_c_tests): Call test_dumping_repeat.
8194 2018-10-11 Richard Biener <rguenther@suse.de>
8196 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
8197 bdver?_cost): Unify to ...
8198 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
8199 * config/i386/i386.c (processor_cost_table): Adjust.
8201 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
8204 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
8205 the thunk when expanding to GIMPLE.
8207 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
8210 * varasm.c (mergeable_string_section): Don't try to move zero-length
8211 strings to the merge section.
8213 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
8216 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
8218 2018-10-10 Jakub Jelinek <jakub@redhat.com>
8221 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
8222 to special_args set.
8224 2018-10-10 Richard Biener <rguenther@suse.de>
8226 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
8227 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
8228 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
8229 and recursing and pattern terminating the recursion on SSE
8230 vector width using ix86_expand_reduc.
8231 (reduc_sminmax_scal_<mode>): Split into part reducing to half
8232 width and recursing and SSE2 vector variant doing the final
8233 reduction with ix86_expand_reduc.
8234 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
8235 with terminating the recursion at AVX level, splitting that
8238 2018-10-09 David Malcolm <dmalcolm@redhat.com>
8240 * genmatch.c (error_cb): Rename to...
8241 (diagnostic_cb): ...this, converting int params to enums.
8242 (fatal_at): Update for renaming.
8243 (warning_at): Likewise.
8245 * input.c (selftest::ebcdic_execution_charset::apply):
8246 Update for renaming of...
8247 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
8249 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
8250 converting level and reason to enums.
8251 (class selftest::lexer_error_sink): Rename to...
8252 (class selftest::lexer_test_options): ...this, renaming field
8253 "m_errors" to "m_diagnostics".
8254 (selftest::lexer_test_options::apply): Update for renaming of...
8255 (selftest::lexer_test_options::on_error): ...this, renaming to...
8256 (selftest::lexer_test_options::on_diagnostic): ...this
8257 converting level and reason to enums.
8258 (selftest::test_lexer_string_locations_raw_string_unterminated):
8259 Update for renamings.
8260 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
8263 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
8265 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
8266 * config/rs6000/pmmintrin.h: New file.
8268 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
8270 PR tree-optimization/86659
8271 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
8273 2018-10-09 Richard Biener <rguenther@suse.de>
8275 PR tree-optimization/63155
8276 * tree-ssa-structalias.c: Include tree-ssa.h.
8277 (get_constraint_for_ssa_var): For undefs return nothing_id.
8278 (find_func_aliases): Cleanup PHI handling.
8280 2018-10-09 Richard Biener <rguenther@suse.de>
8282 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
8285 2018-10-09 Martin Liska <mliska@suse.cz>
8287 * asan.c (asan_emit_stack_protection): If a stack variable
8288 is located in a same file as current function, then emit
8289 line info into variable definition string.
8291 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
8293 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
8296 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
8298 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
8301 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
8303 PR tree-optimization/86659
8304 * gimple-match.h (struct gimple_match_op): Add reverse field.
8305 (gimple_match_op::set_op): New overloaded method.
8306 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
8307 the REF_REVERSE_STORAGE_ORDER flag on the value.
8308 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
8309 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
8311 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
8314 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
8315 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
8317 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
8320 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
8321 Defined with __builtin_ia32_vfmaddsubpd512_mask.
8323 2018-10-08 Richard Biener <rguenther@suse.de>
8325 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
8326 cost the same as AVX128 ones.
8328 2018-10-08 Paul Koning <ni1d@arrl.net>
8330 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
8331 (expand_block_move): New function.
8332 * config/pdp11/pdp11.c (output_block_move): Remove.
8333 (expand_block_move): New function.
8334 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
8335 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
8336 (*movmemhi1): Remove.
8338 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
8340 * config/s390/2827.md: Increase latencies for some FP instructions.
8342 2018-10-08 Richard Biener <rguenther@suse.de>
8344 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
8346 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
8347 * tree-vectorizer.h (dump_stmt_cost): Adjust.
8348 (add_stmt_cost): Dump return value of the hook.
8350 2018-10-08 Richard Biener <rguenther@suse.de>
8352 PR tree-optimization/63155
8353 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
8354 (ssa_propagation_engine::ssa_propagate): Remove redundant
8355 bitmap bit clearing.
8357 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
8359 PR rtl-optimization/86939
8360 PR rtl-optimization/87479
8361 * ira.h (non_conflicting_reg_copy_p): New prototype.
8362 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
8363 (make_hard_regno_dead): Don't add conflicts for register
8364 ignore_reg_for_conflicts.
8365 (make_object_dead): Likewise.
8366 (non_conflicting_reg_copy_p): New function.
8367 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
8368 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
8369 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
8370 (make_hard_regno_dead): Don't add conflicts for register
8371 ignore_reg_for_conflicts. Remove special conflict handling of
8372 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
8373 check_pic_pseudo_p and update callers.
8374 (mark_pseudo_dead): Don't add conflicts for register
8375 ignore_reg_for_conflicts.
8376 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
8378 2018-10-05 Andrew Waterman <andrew@sifive.com>
8379 Jim Wilson <jimw@sifive.com>
8381 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
8382 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
8383 new pattern using HONOR_SNANS that emits one extra instruction.
8385 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
8387 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
8388 patterns): Merge SI and DI patterns to a GPR pattern.
8389 (unnamed define_insn and define_split for record form of that): Merge
8390 to a single define_insn_and_split pattern.
8392 2018-10-05 David Malcolm <dmalcolm@redhat.com>
8395 * input.c (expand_location_to_spelling_point): Add param "aspect"
8396 and use rather than hardcoding LOCATION_ASPECT_CARET.
8397 (get_substring_ranges_for_loc): Handle the case of a single token
8398 within a macro expansion.
8399 * input.h (expand_location_to_spelling_point): Add "aspect" param,
8400 defaulting to LOCATION_ASPECT_CARET.
8402 2018-10-05 Paul Koning <ni1d@arrl.net>
8404 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
8405 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
8406 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
8407 (pdp11_guard_type): New function.
8409 2018-10-05 Paul Koning <ni1d@arrl.net>
8411 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
8412 * config/pdp11/pdp11.opt (mfloat32): Remove.
8414 * doc/invoke.texi (pdp11 -mfloat32): Remove:
8415 (pdp11 -mfloat64): Remove.
8417 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
8419 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
8420 (*cmp<mode>_cc_i387): Ditto.
8421 (*cmpu<mode>_cc_i387): Ditto.
8422 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
8423 * config/i386/i386.c (ix86_expand_fp_compare): Remove
8425 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
8426 Emit x86_sahf_1 pattern.
8427 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
8428 (ix86_expand_carry_flag_compare): Ditto.
8430 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
8432 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
8433 to reg_or_0_operand. Add "C" constraint.
8434 (*cmpxf_cc_i387): Ditto.
8435 (*cmp<mode>_i387): Change operand 2 predicate
8436 to nonimm_or_0_operand. Add "C" constraint.
8437 (*cmp<mode>_cc_i387): Ditto.
8438 (*cmp<mode>_0_i387): Remove insn pattern.
8439 (*cmp<mode>_0_cc_i387): Ditto.
8441 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
8443 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
8444 * config/i386/predicates.md (nonimm_or_0_operand): Rename
8445 from vector_move_operand. Update all uses.
8447 2018-10-05 Martin Sebor <msebor@redhat.com>
8449 PR tree-optimization/87490
8450 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
8453 2018-10-05 Richard Biener <rguenther@suse.de>
8455 PR tree-optimization/63155
8456 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
8457 vertical space in dumpfiles.
8458 * tree-ssa-propagate.h
8459 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
8460 * tree-ssa-propagate.c (cfg_blocks_back): New global.
8461 (ssa_edge_worklist_back): Likewise.
8462 (curr_order): Likewise.
8463 (cfg_blocks_get): Remove abstraction.
8464 (cfg_blocks_add): Likewise.
8465 (cfg_blocks_empty_p): Likewise.
8466 (add_ssa_edge): Add to current or next worklist based on
8468 (add_control_edge): Likewise.
8469 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
8471 (ssa_propagation_engine::ssa_propagate): ... here. Unify
8472 iteration from CFG and SSA edge worklist so we process
8473 everything in RPO order, prioritizing forward progress
8475 (ssa_prop_init): Allocate new worklists, do not dump
8477 (ssa_prop_fini): Free new worklists.
8479 2018-10-05 Richard Biener <rguenther@suse.de>
8481 * tree-core.h (tree_block::abstract_flag): Remove.
8482 (tree_block::block_num): Make full 32bits.
8483 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
8484 * tree.h (BLOCK_ABSTRACT): Remove.
8485 * dwarf2out.c (gen_lexical_block_die): Remove dead code
8486 resulting from BLOCK_ABSTRACT being always false.
8487 (gen_inlined_subroutine_die): Likewise.
8488 (gen_block_die): Likewise.
8489 * tree.c (block_ultimate_origin): Likewise.
8490 * tree-pretty-print.c (dump_block_node): Remove code dealing
8491 with BLOCK_ABSTRACT.
8492 * tree-ssa-live.c (dump_scope_block): Likewise.
8493 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
8494 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
8496 2018-10-05 Richard Biener <rguenther@suse.de>
8498 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
8499 is asked for initialize mode to the component mode of the
8502 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
8505 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
8506 assembler for -mavx.
8507 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
8509 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
8512 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
8514 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
8515 to be DImode. When using mffscrn, force the operand to a register.
8517 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
8519 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
8520 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
8521 X87MODEF mode iterator.
8522 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
8523 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
8524 X87MODEF mode iterator.
8526 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
8528 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
8529 -Wno-prio-ctor-dtor.
8531 2018-10-04 David Malcolm <dmalcolm@redhat.com>
8533 * Makefile.in (OBJS): Add opt-problem.o.
8534 * dump-context.h: Include "selftest.h.
8535 (selftest::temp_dump_context): New forward decl.
8536 (class dump_context): Make friend of class
8537 selftest::temp_dump_context.
8538 (dump_context::dump_loc_immediate): New decl.
8539 (class dump_pretty_printer): Move here from dumpfile.c.
8540 (class temp_dump_context): Move to namespace selftest.
8541 (temp_dump_context::temp_dump_context): Add param
8542 "forcibly_enable_dumping".
8543 (selftest::verify_dumped_text):
8544 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
8545 (selftest::verify_item):
8546 (ASSERT_IS_TEXT): Move here from dumpfile.c.
8547 (ASSERT_IS_TREE): Likewise.
8548 (ASSERT_IS_GIMPLE): Likewise.
8549 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
8551 (dump_context::dump_loc_immediate): ...this new function.
8552 (class dump_pretty_printer): Move to dump-context.h.
8553 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
8554 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
8555 (temp_dump_context::temp_dump_context): Move to "selftest"
8556 namespace. Add param "forcibly_enable_dumping", and use it to
8557 conditionalize the use of m_pp;
8558 (selftest::verify_dumped_text): Make non-static.
8559 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
8560 (selftest::verify_item): Make non-static.
8561 (ASSERT_IS_TEXT): Move to dump-context.h.
8562 (ASSERT_IS_TREE): Likewise.
8563 (ASSERT_IS_GIMPLE): Likewise.
8564 (selftest::test_capture_of_dump_calls): Pass "true" for new
8565 param of temp_dump_context.
8566 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
8567 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
8569 * opt-problem.cc: New file.
8570 * opt-problem.h: New file.
8571 * optinfo-emit-json.cc
8572 (selftest::test_building_json_from_dump_calls): Pass "true" for
8573 new param of temp_dump_context.
8574 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
8575 (optinfo::emit_for_opt_problem): New function.
8576 (optinfo::emit): Clarity which emit_item is used.
8577 * optinfo.h (optinfo::get_dump_location): New accessor.
8578 (optinfo::emit_for_opt_problem): New decl.
8579 (optinfo::emit): Make const.
8580 * selftest-run-tests.c (selftest::run_tests): Call
8581 selftest::opt_problem_cc_tests.
8582 * selftest.h (selftest::opt_problem_cc_tests): New decl.
8583 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
8584 bool to opt_result, converting fprintf messages to
8585 opt_result::failure_at calls. Add "stmt" param for use by the
8587 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
8588 (runtime_alias_check_p): Convert return type from bool to
8589 opt_result, converting dump_printf calls to
8590 opt_result::failure_at, using the statement DDR_A for their
8592 (find_data_references_in_stmt): Convert return type from bool to
8593 opt_result, converting "return false" to opt_result::failure_at
8595 * tree-data-ref.h: Include "opt-problem.h".
8596 (dr_analyze_innermost): Convert return type from bool to opt_result,
8597 and add a const gimple * param.
8598 (find_data_references_in_stmt): Convert return type from bool to
8600 (runtime_alias_check_p): Likewise.
8601 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
8602 dr_analyze_innermost.
8603 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
8604 Convert return type from bool to opt_result, adding a message for
8605 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
8606 (vect_analyze_data_ref_dependence): Convert return type from bool
8607 to opt_result. Change sense of return type from "false"
8608 effectively meaning "no problems" to "false" meaning a problem,
8609 so that "return false" becomes "return opt_result::success".
8610 Convert "return true" calls to opt_result::failure_at, using
8611 the location of statement A rather than vect_location.
8612 (vect_analyze_data_ref_dependences): Convert return type from bool
8614 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
8615 calls to opt_result::failure_at, using the stmt location rather
8617 (vect_verify_datarefs_alignment): Convert return type from bool
8619 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
8620 into multiple more-tightly-scoped copies.
8621 (vect_analyze_data_refs_alignment): Convert return type from bool
8623 (vect_analyze_data_ref_accesses): Likewise, converting a
8624 "return false" to a "return opt_result::failure_at", adding a
8626 (vect_prune_runtime_alias_test_list): Convert return type from
8627 bool to opt_result, converting dump_printf_loc to
8628 opt_result::failure_at. Add a %G to show the pertinent statement,
8629 and use the stmt's location rather than vect_location.
8630 (vect_find_stmt_data_reference): Convert return type from
8631 bool to opt_result, converting dump_printf_loc to
8632 opt_result::failure_at, using stmt's location.
8633 (vect_analyze_data_refs): Convert return type from bool to
8634 opt_result. Convert "return false" to "return
8635 opt_result::failure_at", adding messages as needed.
8636 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
8637 type from bool to opt_result.
8638 (vect_determine_vf_for_stmt): Likewise.
8639 (vect_determine_vectorization_factor): Likewise, converting
8640 dump_printf_loc to opt_result::failure_at, using location of phi
8641 rather than vect_location.
8642 (vect_analyze_loop_form_1): Convert return type from bool to
8643 opt_result, converting dump_printf_loc calls, retaining the use of
8645 (vect_analyze_loop_form): Convert return type from loop_vec_info
8646 to opt_loop_vec_info.
8647 (vect_analyze_loop_operations): Convert return type from bool to
8648 opt_result, converting dump_printf_loc calls, using the location
8649 of phi/stmt rather than vect_location where available. Convert
8650 various "return false" to "return opt_result::failure_at" with
8651 "unsupported phi" messages.
8652 (vect_get_datarefs_in_loop): Convert return type from bool to
8653 opt_result. Add a message for the
8654 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
8655 (vect_analyze_loop_2): Convert return type from bool to
8656 opt_result. Ensure "ok" is set to a opt_result::failure_at before
8657 each "goto again;", adding new messages where needed.
8658 Add "unsupported grouped {store|load}" messages.
8659 (vect_analyze_loop): Convert return type from loop_vec_info to
8661 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
8663 * tree-vect-stmts.c (process_use): Likewise, converting
8664 dump_printf_loc call and using stmt location, rather than
8666 (vect_mark_stmts_to_be_vectorized): Likeise.
8667 (vect_analyze_stmt): Likewise, adding a %G.
8668 (vect_get_vector_types_for_stmt): Convert return type from bool to
8669 opt_result, converting dump_printf_loc calls and using stmt
8670 location, rather than vect_location.
8671 (vect_get_mask_type_for_stmt): Convert return type from tree to
8672 opt_tree, converting dump_printf_loc calls and using stmt location.
8673 * tree-vectorizer.c: Include "opt-problem.h.
8674 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
8675 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
8676 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
8677 enabled, use it to report at the top level "couldn't vectorize
8678 loop" followed by the problem.
8679 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
8680 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
8682 (vect_analyze_stmt): Likewise.
8683 (vect_get_vector_types_for_stmt): Likewise.
8684 (tree vect_get_mask_type_for_stmt): Likewise.
8685 (vect_analyze_data_ref_dependences): Likewise.
8686 (vect_enhance_data_refs_alignment): Likewise.
8687 (vect_analyze_data_refs_alignment): Likewise.
8688 (vect_verify_datarefs_alignment): Likewise.
8689 (vect_analyze_data_ref_accesses): Likewise.
8690 (vect_prune_runtime_alias_test_list): Likewise.
8691 (vect_find_stmt_data_reference): Likewise.
8692 (vect_analyze_data_refs): Likewise.
8693 (vect_analyze_loop): Convert return type from loop_vec_info to
8695 (vect_analyze_loop_form): Likewise.
8696 (vect_analyze_slp): Convert return type from bool to opt_result.
8698 2018-10-04 David Malcolm <dmalcolm@redhat.com>
8700 * doc/invoke.texi (-fopt-info): Document new "internals"
8702 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
8703 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
8705 (optinfo_verbosity_options): Add "internals".
8706 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
8707 (dump_context::apply_dump_filter_p): New member function.
8708 (dump_context::dump_loc): Use apply_dump_filter_p rather than
8709 explicitly masking the dump_kind.
8710 (dump_context::begin_scope): Increment the scope depth first. Use
8711 apply_dump_filter_p rather than explicitly masking the dump_kind.
8712 (dump_context::emit_item): Use apply_dump_filter_p rather than
8713 explicitly masking the dump_kind.
8714 (dump_dec): Likewise.
8715 (dump_hex): Likewise.
8716 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
8717 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
8718 (opt_info_switch_p): Update handling of default
8719 MSG_OPTIMIZED_LOCATIONS to cope with default of
8720 MSG_PRIORITY_USER_FACING.
8721 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
8722 masking the dump_kind.
8723 (selftest::test_capture_of_dump_calls): Update test_dump_context
8724 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
8725 than MSG_ALL. Generalize scope test to be run at all four
8726 combinations of with/without MSG_PRIORITY_USER_FACING and
8727 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
8728 for each of the two values.
8729 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
8730 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
8731 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
8732 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
8733 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
8734 with MSG_PRIORITY_*.
8735 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
8736 dump messages as MSG_PRIORITY_USER_FACING.
8737 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
8738 about the interaction with MSG_PRIORITY_*.
8740 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
8742 * varasm.c (output_constant): Add new parameter merge_strings.
8743 Make strings properly zero terminated in merge string sections.
8744 (mergeable_string_section): Don't fail if the last char is non-zero.
8745 (assemble_variable_contents): Handle merge string sections.
8746 (assemble_variable): Likewise.
8747 (assemble_constant_contents): Likewise.
8748 (output_constant_def_contents): Likewise.
8749 (output_constructor_array_range,
8750 output_constructor_regular_field): Adjust call to output_constant.
8751 (output_object_block): Adjust call to assemble_constant_contents
8752 and assemble_variable_contents.
8754 2018-10-04 Martin Liska <mliska@suse.cz>
8757 * cgraphunit.c (process_function_and_variable_attributes):
8758 Warn about a function with alias attribute and a body.
8760 2018-10-04 Martin Liska <mliska@suse.cz>
8763 * multiple_target.c (redirect_to_specific_clone): New function.
8764 (ipa_target_clone): Use it.
8765 * tree-inline.c: Fix comment.
8767 2018-10-04 David Malcolm <dmalcolm@redhat.com>
8769 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
8771 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
8772 (gcc::dump_manager::register_pass): New member function, adapted
8773 from loop body in gcc::pass_manager::register_pass, adding a
8774 call to update_dfi_for_opt_info.
8775 (gcc::dump_manager::opt_info_enable_passes): Store the
8776 -fopt-info options into the new fields. Move the loop
8778 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
8780 * dumpfile.h (struct opt_pass): New forward decl.
8781 (gcc::dump_manager::register_pass): New decl.
8782 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
8783 (class gcc::dump_manager): Add fields "m_optgroup_flags",
8784 "m_optinfo_flags", and "m_optinfo_filename".
8785 * passes.c (gcc::pass_manager::register_pass): Move all of the
8786 dump-handling code to gcc::dump_manager::register_pass.
8788 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
8790 PR rtl-optimization/87466
8791 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
8792 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
8793 * doc/tm.texi: Regenerate.
8794 * ira-lives.c (process_bb_node_lives): Use the new target hook.
8795 * lra-lives.c (process_bb_lives): Likewise.
8796 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
8799 2018-10-04 Tamar Christina <tamar.christina@arm.com>
8801 * params.c (add_params): Fix initialization.
8803 2018-10-04 Martin Liska <mliska@suse.cz>
8805 PR gcov-profile/84107
8806 * tree-profile.c (init_ic_make_global_vars):
8807 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
8808 Come up with new ic_tuple* variables. Emit
8809 __gcov_indirect_call{,_topn} variables.
8810 (gimple_gen_ic_profiler): Access the variable
8812 (gimple_gen_ic_func_profiler): Access
8813 __gcov_indirect_call.callee field.
8814 (gimple_init_gcov_profiler): Use ptr_type_node.
8815 * value-prof.c (gimple_ic): Use ptr_type_node.
8817 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8819 PR tree-optimization/85787
8820 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
8821 malloc_candidate_p into this function and add support for
8822 detecting multiple phis.
8823 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
8825 2018-10-04 Martin Liska <mliska@suse.cz>
8828 * ipa-inline.c (inline_to_all_callers_1):
8829 Call ultimate_alias_target for node being inlined.
8831 2018-10-03 Jeff Law <law@redhat.com>
8833 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
8835 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
8836 * tree.h (get_typenode_from_name): Prototype.
8838 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
8840 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
8841 Change operand 2 predicate to nonimmediate_operand.
8842 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
8844 2018-10-03 Martin Sebor <msebor@redhat.com>
8845 Jeff Law <law@redhat.com>
8847 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
8849 (get_string_length): Detect unterminated arrays.
8850 (format_string): Same.
8851 (format_directive): Warn about unterminated arrays.
8852 (handle_gimple_call): Mark statements with no_warning as needed.
8854 2018-10-03 Jim Wilson <jimw@sifive.com>
8856 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
8857 also define __riscv_abi_rve. Delete trailing white space.
8859 2018-10-03 Paul Koning <ni1d@arrl.net>
8861 Enable LRA register allocator for PDP11.
8862 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
8865 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
8866 * config/pdp11/pdp11.opt (-mlra): New option.
8867 * doc/invoke.texi (PDP-11 Options): Document -mlra.
8869 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
8871 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
8872 (*<absneg:code>extend<mode>xf2): Ditto.
8874 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
8876 PR tree-optimization/87415
8877 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
8880 2018-10-02 Jeff Law <law@redhat.com>
8882 * gimple-fold.c (get_range_strlen): Only set *nonstr when
8883 an unterminated string is discovered. Bubble up range
8884 even for unterminated strings.
8885 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
8886 indicates the string was not terminated via NONSTR.
8888 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
8890 * tree-vrp.c (extract_range_from_unary_expr): Special case all
8891 pointer conversions.
8892 Do not do anything special for anti-ranges.
8894 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
8896 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
8897 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
8899 2018-10-03 Martin Liska <mliska@suse.cz>
8901 PR gcov-profile/86109
8902 * coverage.c (coverage_begin_function): Do not
8903 mark lambdas as artificial.
8904 * tree-core.h (struct GTY): Remove tm_clone_flag
8905 and introduce new lambda_function.
8906 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
8908 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
8911 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
8912 P8_VECTOR and VSX are enabled.
8914 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
8916 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
8917 0x3907 as CPU model number.
8919 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
8921 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
8922 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
8923 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
8924 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
8925 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
8926 * config/s390/s390.md: Likewise. Rename also the cpu attribute
8927 value from arch12 to z14.
8929 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
8931 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
8933 (isinf<mode>2): Ditto.
8935 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
8937 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
8938 before emitting fxam. Perform calculations in XFmode.
8940 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
8942 * match.pd (((X /[ex] A) +- B) * A): New transformation.
8944 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
8947 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
8948 * tree.c (signed_or_unsigned_type_for): Handle complex.
8950 2018-10-02 Jeff Law <law@redhat.com>
8952 * gimple-fold.c (get_range_strlen): Remove dead code.
8954 2018-10-02 Martin Sebor <msebor@redhat.com>
8955 Jeff Law <law@redhat.com>
8957 * builtins.c (unterminated_array): Add new arguments.
8958 If argument is not terminated, bubble up size and exact
8960 (expand_builtin_strnlen): Detect, avoid expanding
8961 and diagnose unterminated arrays.
8962 (c_strlen): Fill in offset of start of unterminated strings.
8963 * builtins.h (unterminated_array): Update prototype.
8965 2018-10-02 Richard Biener <rguenther@suse.de>
8967 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
8968 of haddv4df, first reduce to SSE width and exploit the fact
8969 that we only need element zero with the reduction result.
8970 (reduc_plus_scal_v2df): Likewise.
8972 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
8974 * dojump.h (do_jump): Delete.
8975 (do_jump_1): Likewise.
8976 (split_comparison): Move around.
8977 * dojump.c (do_jump): Make static.
8978 (do_jump_1): Likewise.
8979 (jumpifnot): Move around.
8980 (jumpifnot_1): Likewise.
8982 (jumpif_1): Likewise.
8983 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
8985 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
8987 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
8988 insns in the delay slot and add_insn_after for the jump insn.
8990 2018-10-02 Richard Biener <rguenther@suse.de>
8992 * tree-inline.c (expand_call_inline): Use the location of
8993 the callee declaration for the inline-entry marker.
8994 * final.c (notice_source_line): Remove special-casing of
8995 NOTE_INSN_INLINE_ENTRY.
8997 2018-10-01 Carl Love <cel@us.ibm.com>
9000 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
9001 (__builtin_mtfsb0): New.
9002 (__builtin_mtfsb1): New.
9003 ( __builtin_set_fpscr_rn): New.
9004 (__builtin_set_fpscr_drn): New.
9005 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
9006 (rs6000_expand_set_fpscr_rn_builtin): Add.
9007 (rs6000_expand_set_fpscr_drn_builtin): Add.
9008 (rs6000_expand_builtin): Add case statement entries for
9009 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
9010 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
9011 RS6000_BUILTIN_MFFSL.
9012 (rs6000_init_builtins): Add ftype initialization and def_builtin
9013 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
9014 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
9015 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
9016 rs6000_mffscdrn): Add define_insn.
9017 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
9018 * doc/extend.texi: Add documentation for the builtins.
9020 2018-10-01 Richard Biener <rguenther@suse.de>
9022 PR tree-optimization/87465
9023 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
9024 causing branch miscounts.
9026 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9028 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
9029 aarch64_option_default_param): New.
9030 (params.h): Include.
9031 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
9032 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
9033 stack-clash protection validation code.
9035 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9037 * params.c (validate_param): New.
9038 (add_params): Use it.
9039 (set_param_value): Refactor param validation into validate_param.
9040 (diagnostic.h): Include.
9041 * diagnostic.h (diagnostic_ready_p): New.
9043 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9045 * params.c (set_param_value):
9046 Add index of parameter being validated.
9047 * common/common-target.def (option_validate_param): New.
9048 * common/common-targhooks.h (default_option_validate_param): New.
9049 * common/common-targhooks.c (default_option_validate_param): New.
9050 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
9051 * doc/tm.texi: Regenerate.
9053 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9056 * config/aarch64/aarch64.c (aarch64_override_options_internal):
9057 Add validation for stack-clash parameters and set defaults.
9059 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9062 * configure.ac: Add stack-clash-protection-guard-size.
9063 * doc/install.texi: Document it.
9064 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
9065 * params.def: Update comment for guard-size.
9066 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
9067 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
9068 * configure: Regenerate.
9070 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9073 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
9074 STACK_DYNAMIC_OFFSET): New.
9075 * config/aarch64/aarch64.c (aarch64_layout_frame):
9076 Update outgoing args size.
9077 (aarch64_stack_clash_protection_alloca_probe_range,
9078 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
9080 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9083 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
9085 * target.def (stack_clash_protection_alloca_probe_range): New.
9086 (stack_clash_protection_final_dynamic_probe): Remove.
9087 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
9088 (default_stack_clash_protection_final_dynamic_probe): Remove.
9089 * targhooks.c: Likewise.
9090 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
9091 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
9092 * doc/tm.texi: Regenerate.
9094 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9097 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
9098 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
9099 aarch64_clamp_to_uimm12_shift): New.
9100 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
9101 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
9103 2018-10-01 Tamar Christina <tamar.christina@arm.com>
9106 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
9108 2018-10-01 Jeff Law <law@redhat.com>
9109 Richard Sandiford <richard.sandiford@linaro.org>
9110 Tamar Christina <tamar.christina@arm.com>
9113 * config/aarch64/aarch64.md
9114 (probe_stack_range): Add k (SP) constraint.
9115 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
9116 STACK_CLASH_MAX_UNROLL_PAGES): New.
9117 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
9118 stack probes for stack clash.
9119 (aarch64_allocate_and_probe_stack_space): New.
9120 (aarch64_expand_prologue): Use it.
9121 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
9122 (aarch64_sub_sp): Add emit_move_imm optional param.
9124 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
9126 PR tree-optimization/87261
9127 * match.pd: Remove trailing whitespace.
9128 Add (x & y) | ~(x | y) -> ~(x ^ y),
9129 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
9131 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
9133 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
9135 (ashlsi3_insn): Update instruction constraints.
9136 (ashrsi3_insn): Likewise.
9137 (rotrsi3): Likewise.
9138 (add_shift): Likewise.
9139 * config/arc/constraints.md (Csz): New 32 bit constraint. It
9140 avoids placing in the limm field small constants which, otherwise,
9141 could end into a small instruction.
9143 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
9145 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
9146 destination register is not odd-even.
9147 (umaddsidi4_split): Likewise.
9149 2018-10-01 Richard Biener <rguenther@suse.de>
9151 * tree-inline.c (expand_call_inline): Store origin of fn
9152 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
9153 * tree.c (block_ultimate_origin): Simplify and do some
9156 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
9158 * config/i386/mmx.md (EMMS): New int iterator.
9159 (emms): New int attribute.
9160 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
9161 EMMS int iterator. Explicitly declare clobbers.
9162 (mmx_emms): Remove expander.
9164 * config/i386/predicates.md (emms_operation): Remove predicate.
9165 (vzeroall_pattern): New predicate.
9166 (vzeroupper_pattern): Rename from vzeroupper_operation.
9167 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
9168 vzeroupper_pattern and vzeroall_pattern predicates.
9170 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
9172 PR rtl-optimization/86939
9173 * ira-lives.c (make_hard_regno_born): Rename from this...
9174 (make_hard_regno_live): ... to this. Remove update to conflict
9175 information. Update function comment.
9176 (make_hard_regno_dead): Add conflict information update. Update
9178 (make_object_born): Rename from this...
9179 (make_object_live): ... to this. Remove update to conflict information.
9180 Update function comment.
9181 (make_object_dead): Add conflict information update. Update function
9183 (mark_pseudo_regno_live): Call make_object_live.
9184 (mark_pseudo_regno_subword_live): Likewise.
9185 (mark_hard_reg_dead): Update function comment.
9186 (mark_hard_reg_live): Call make_hard_regno_live.
9187 (process_bb_node_lives): Likewise.
9188 * lra-lives.c (make_hard_regno_born): Rename from this...
9189 (make_hard_regno_live): ... to this. Remove update to conflict
9190 information. Remove now uneeded check_pic_pseudo_p argument.
9191 Update function comment.
9192 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
9193 to conflict information. Update function comment.
9194 (mark_pseudo_live): Remove update to conflict information. Update
9196 (mark_pseudo_dead): Add conflict information update.
9197 (mark_regno_live): Call make_hard_regno_live.
9198 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
9199 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
9201 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
9204 * config/i386/i386.c (construct_container): Use TImode for
9205 BLKmode values in 2 integer registers.
9207 2018-09-29 Jeff Law <law@redhat.com>
9209 * builtins.c (unterminated_array): Pass in c_strlen_data * to
9210 c_strlen rather than just a tree *.
9211 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
9212 Update recursive calls appropriately. If caller did not provide a
9213 suitable data pointer, create a local one. When a non-terminated
9214 string is discovered, bubble up information about the string via the
9215 c_strlen_data object.
9216 * builtins.h (c_strlen): Update prototype.
9217 (c_strlen_data): New structure.
9218 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
9219 For a type 2 call, if c_strlen indicates a non-terminated string
9220 use the length of the non-terminated string.
9221 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
9223 2018-09-29 Jakub Jelinek <jakub@redhat.com>
9226 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
9227 __m512d type for __A argument rather than __m512.
9229 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
9231 * match.pd (simple_comparison): Don't optimize if either operand is
9232 a function pointer when target needs function pointer canonicalization.
9234 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
9236 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
9237 power5 .. power9 to remove indirection.
9238 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
9239 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
9240 ASM_CPU_476_SPEC): Delete.
9241 (ASM_CPU_SPEC): Adjust.
9242 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
9243 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
9245 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
9247 * config.in: Delete HAVE_AS_DCI.
9248 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
9249 * config/rs6000/rs6000.h: Ditto.
9250 * configure.ac: Delete HAVE_AS_DCI.
9251 * configure: Regenerate.
9253 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
9255 * config.in (HAVE_AS_LWSYNC): Delete.
9256 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
9257 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
9259 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
9260 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
9262 * configure.ac: Delete HAVE_AS_LWSYNC.
9263 * configure: Regenerate.
9265 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
9266 Pierre-Marie de Rodat <derodat@adacore.com>
9268 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
9269 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
9270 (cgraph_node::create_thunk): Add indirect_offset parameter.
9271 (thunk_adjust): Likewise.
9272 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
9273 and initialize the corresponding field with it.
9274 (cgraph_node::dump): Dump indirect_offset field.
9275 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
9276 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
9277 (thunk_adjust): Add indirect_offset parameter and deal with it.
9278 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
9279 pass it to thunk_adjust. Do not call the target hook if it's non-zero
9280 or if the thunk is external or local. Fix formatting. Do not chain
9281 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
9282 if any, in the GIMPLE representation.
9283 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
9284 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
9285 (input_node): Read indirect_offset field.
9286 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
9287 call to thunk_adjust.
9288 * tree-nested.c (struct nesting_info): Add thunk_p field.
9289 (create_nesting_tree): Set it.
9290 (convert_all_function_calls): Copy static chain from targets to thunks.
9291 (finalize_nesting_tree_1): Return early for thunks.
9292 (unnest_nesting_tree_1): Do not finalize thunks.
9293 (gimplify_all_functions): Do not gimplify thunks.
9295 2018-09-28 David Malcolm <dmalcolm@redhat.com>
9297 * opt-suggestions.c (option_proposer::build_option_suggestions):
9298 Release "option_values".
9300 2018-09-28 David Malcolm <dmalcolm@redhat.com>
9302 * coverage.c (get_coverage_counts): Convert problem-reporting dump
9303 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
9304 * dumpfile.c (kind_as_string): New function.
9305 (dump_loc): Rather than a hardcoded prefix of "note: ", use
9306 kind_as_string to vary the prefix based on dump_kind.
9307 (selftest::test_capture_of_dump_calls): Update for above.
9309 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
9311 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
9312 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
9314 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
9316 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
9317 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
9318 INVALID_REGNUM instead of FPSR_REG.
9319 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
9320 * config/i386/i386.md: Update comment of FP compares.
9321 (fldenv): Do not clobber FPSR_REG.
9323 2018-09-28 Richard Biener <rguenther@suse.de>
9325 * tree.h (BLOCK_ORIGIN): New.
9326 * omp-expand.c (grid_expand_target_grid_body): Assign
9327 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
9328 * tree-inline.c (remap_block): Likewise.
9329 * auto-profile.c (get_function_decl_from_block): Simplify
9330 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
9331 * langhooks.c (lhd_print_error_function): Likewise.
9332 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
9334 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
9335 * tree.c (block_nonartificial_location): Likewise.
9336 (block_ultimate_origin): Likewise.
9337 * tree-pretty-print.c (percent_K_format): Likewise. Remove
9338 no longer needed LTO case.
9340 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
9341 Jan Hubicka <jh@suse.cz>
9342 Martin Jambor <mjambor@suse.cz>
9344 * simplify-rtx.c (simplify_merge_mask): New function.
9345 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
9346 same masks are used in op1 or op2.
9347 (test_vec_merge): New function.
9348 (test_vector_ops): Call test_vec_merge.
9350 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
9352 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
9353 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
9354 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
9355 (cypress_costs): Set it.
9356 (supersparc_costs): Likewise.
9357 (hypersparc_costs): Likewise.
9358 (leon_cost): Likewise.
9359 (leon3_costs): Likewise.
9360 (sparclet_costs): Likewise.
9361 (ultrasparc_costs): Likewise.
9362 (ultrasparc_costs): Likewise.
9363 (niagara_costs): Likewise.
9364 (niagara2_costs): Likewise.
9365 (niagara3_costs): Likewise.
9366 (niagara4_costs): Likewise.
9367 (niagara7_costs): Likewise.
9368 (m8_costs): Likewise.
9369 (TARGET_CAN_FOLLOW_JUMP): Define.
9370 (pass_work_around_errata::gate): Minor tweak.
9371 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
9372 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
9373 Automaitcally clear MASK_FSMULD mask for V7 processors.
9374 (sparc_can_follow_jump): New static function.
9375 (output_ubranch): Deal with CROSSING_JUMP_P.
9376 (sparc_use_sched_lookahead): Rewrite using switch statement.
9377 (sparc_issue_rate): Reorder.
9378 (sparc_branch_cost): New function.
9380 2018-09-27 Martin Sebor <msebor@redhat.com>
9382 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
9383 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
9384 (int_fits_type_p): Same.
9386 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
9388 * config/i386/i386.md (FPCR_REG): Remove.
9389 (UNSPEC_FLDCW): Remove.
9390 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
9391 (x86_fldcw_1): Remove insn pattern.
9392 (fnstenv): Do not clobber FPCR_REG.
9394 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
9395 (CALL_USED_REGISTERS): Ditto.
9396 (REG_ALLOC_ORDER): Ditto.
9397 (REG_CLASS_CONTENTS): Ditto.
9398 (HI_REGISTER_NAMES): Ditto.
9399 (ADDITIONAL_REGISTER_NAMES): Use defines instead
9400 of numerical constants.
9401 * config/i386/i386.c (regclass_map): Remove fpsr register.
9402 (dbx_register_map): Ditto.
9403 (dbx64_register_map): Ditto.
9404 (svr4_dbx_register_map): Ditto.
9405 (print_reg): Do not handle FPCR_REG.
9407 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
9410 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
9411 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
9412 Delete, always treat as true.
9413 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
9414 Ditto. Simplify remaining code.
9415 * config/powerpcspe/powerpcspe.h: Ditto.
9416 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
9417 Simplify remaining code.
9418 (rs6000_expand_builtin): Ditto.
9419 * config/rs6000/rs6000.h: Ditto.
9420 * configure.ac: Ditto.
9421 * configure: Regenerate.
9423 2018-09-27 Martin Liska <mliska@suse.cz>
9425 * coverage.c (get_coverage_counts): Revert the formatting
9426 of missing profile opt info.
9428 2018-09-27 Richard Biener <rguenther@suse.de>
9432 * dwarf2out.c (set_block_origin_self): Do not mark outermost
9433 block as we do not output that.
9434 (gen_inlined_subroutine_die): Elide the originally outermost
9435 block, matching what we do for concrete instances.
9436 (decls_for_scope): Add parameter specifying whether to recurse
9439 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
9440 Tom de Vries <tom@codesourcery.com>
9444 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
9445 STORE_FLAG_VALUE == 1.
9447 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
9449 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
9450 constant definitions.
9451 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
9452 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
9453 ("speculation_barrier"): New expander definition.
9455 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
9457 PR gcov-profile/86957
9458 * common.opt: New warning option -Wmissing-profile.
9459 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
9460 * doc/invoke.texi: Document -Wmissing-profile.
9462 2018-09-26 Jim Wilson <jimw@sifive.com>
9464 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
9465 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
9467 2018-09-26 Martin Sebor <msebor@redhat.com>
9469 * tree.c (zerop): Change return type to bool.
9470 (integer_zerop, integer_onep, integer_each_onep): Same.
9471 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
9472 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
9473 (real_onep, real_minus_onep, chain_index): Same.
9474 (print_type_hash_statistics, type_list_equal): Same.
9475 * tree.h (zerop): Same.
9476 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
9477 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
9478 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
9479 (real_onep, real_minus_onep, chain_index): Same.
9480 (print_type_hash_statistics, type_list_equal): Same.
9482 2018-09-26 Jim Wilson <jimw@sifive.com>
9484 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
9486 2018-09-26 Jakub Jelinek <jakub@redhat.com>
9489 * config/i386/i386.c: Include debug.h and dwarf2out.h.
9490 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
9493 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
9495 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
9497 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
9499 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
9500 and FP_SECOND_SSE_REGS.
9501 (REG_CLASS_NAMES): Ditto.
9502 (REG_CLASS_CONTENTS): Ditto.
9503 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
9504 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
9505 (ix86_preferred_output_reload_class): Ditto.
9506 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
9507 clobber constraint to "=&f".
9508 (fix_truncdi_i387): Ditto.
9509 (lrintxfdi2): Ditto.
9510 (fistdi2_<rounding>): Ditto.
9511 (fpremxf4_i387): Change "=u" constraint to "=f".
9512 (fprem1xf4_i387): Ditto.
9514 (fptanxf4_i387): Ditto.
9515 (fxtractxf3_i387): Ditto.
9516 (fscalexf4_i387): Ditto.
9517 (atan2xf3): Change "u" constraint to "f".
9518 (fyl2xxf3_i387): Ditto.
9519 (fyl2xp1xf3_i387): Ditto.
9521 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
9524 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
9525 for removed I387_MASK_PM entity.
9528 2018-09-26 Jeff Law <law@redhat.com>
9530 2018-09-26 Alexey Neyman <stilor@att.net>
9532 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
9533 headers are no longer pulled in by <isl/val.h>.
9535 2018-09-26 Richard Biener <rguenther@suse.de>
9538 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
9539 or concrete instance DIE to the tree. Create abstract origin
9540 attributes also for concrete instances.
9542 2018-09-26 Alexey Neyman <stilor@att.net>
9544 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
9545 headers are no longer pulled in by <isl/val.h>.
9547 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
9549 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
9550 Use new helper functions.
9551 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
9552 Use new helper functions.
9553 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
9554 aarch_mm_needs_release): New declarations.
9555 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
9556 aarch_mm_needs_release): New.
9558 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
9560 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
9561 (arm32_output_mi_thunk): Deal with long calls.
9563 2018-09-26 Richard Biener <rguenther@suse.de>
9567 * tree-inline.c (expand_call_inline): When the location
9568 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
9569 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
9570 the inserted BLOCK to make inlined_function_outer_scope_p
9572 * dwarf2out.c (add_call_src_coords_attributes): Do not add
9573 coords for reserved locations.
9575 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
9577 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
9578 (*call_indirect_nonlocal_sysv<mode>): Ditto.
9579 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
9580 (*sibcall_nonlocal_sysv<mode>): Ditto.
9581 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
9582 (<bd>_<mode>): Ditto.
9583 (<bd>tf_<mode>): Ditto.
9585 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
9587 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
9588 control string as a list of templates instead of as C code.
9589 (*altivec_movti): Ditto.
9590 * config/rs6000/darwin.md (movdf_low_di): Ditto.
9592 2018-09-25 Jim Wilson <jimw@sifive.com>
9594 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
9595 when target symbol is weak.
9597 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
9600 * builtins.c (unterminated_array): Simplify.
9601 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
9602 where pointer arithmetic is safe.
9604 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
9607 * config/rs6000/altivec.md (altivec_vspltb): Use
9608 const_0_to_15_operand instead of u5bit_cint_operand.
9609 (*altivec_vspltb_internal): Ditto.
9610 (altivec_vspltb_direct): Ditto.
9611 (altivec_vsplth): Use const_0_to_7_operand instead of
9613 (*altivec_vsplth_internal): Ditto.
9614 (altivec_vsplth_direct): Ditto.
9615 (altivec_vspltw): Use const_0_to_3_operand instead of
9617 (*altivec_vspltw_internal): Ditto.
9618 (altivec_vspltw_direct): Ditto.
9619 (altivec_vspltsf): Ditto.
9620 (*altivec_vspltsf_internal): Ditto.
9621 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
9622 various splats with the proper size immediate. Reorder the various
9623 cases by ascending size of immediate, and put all such together.
9625 2018-09-25 Richard Biener <rguenther@suse.de>
9628 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
9630 (maybe_create_die_with_external_ref): Do not create
9631 DW_TAG_imported_unit here.
9632 (add_abstract_origin_attribute): Handle external BLOCK refs.
9633 (dwarf2out_abstract_function): Simplify LTO case.
9634 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
9635 rather than using maybe_create_die_with_external_ref.
9637 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
9640 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
9641 (frndintxf2_mask_pm_i387): Ditto.
9642 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
9643 Enable for !flag_trapping_math.
9644 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
9645 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
9646 Change operand 1 predicate to nonimmediate_operand.
9647 (attr "i387_cw"): Remove mask_pm.
9648 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
9649 (enum ix86_entity): Remove I387_MASK_PM.
9650 * config/i386/i386.c (ix86_i387_mode_needed): Do not
9651 handle I387_MASK_PM.
9652 (ix86_mode_needed): Ditto.
9653 (ix86_mode_after): Ditto.
9654 (ix86_mode_entry): Ditto.
9655 (ix86_mode_exit): Ditto.
9656 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
9658 2018-09-25 Jakub Jelinek <jakub@redhat.com>
9660 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
9661 to_update_switch_stmts to vNULL instead of calling create on them
9664 2018-09-25 Richard Biener <rguenther@suse.de>
9666 PR tree-optimization/87402
9667 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
9668 (visit_phi): Re-instantiate handling of supposed to be VARYING
9669 but non-VARYING backedge value.
9671 2018-09-25 Richard Biener <rguenther@suse.de>
9674 * dwarf2out.c (struct sym_off_pair): New.
9675 (external_die_map): New global.
9676 (lookup_decl_die): When in LTO create DIEs lazily from the
9678 (lookup_block_die): New function, create DIEs lazily in LTO.
9679 (equate_block_to_die): New function.
9680 (dwarf2out_die_ref_for_decl): During WPA get the association
9681 from the external DIE map.
9682 (dwarf2out_register_external_die): Record mapping into the
9684 (maybe_create_die_with_external_ref): New function split out from
9685 DIE generation part of old dwarf2out_register_external_die.
9686 (add_abstract_origin_attribute): Do not return the DIE. When
9687 in LTO reference externals directly.
9688 (dwarf2out_abstract_function): When in LTO ignore calls for
9689 decls with external DIEs (already present abstract instances).
9690 (gen_call_site_die): Adjust.
9691 (add_high_low_attributes): Likewise.
9692 (gen_lexical_block_die): Likewise.
9693 (gen_inlined_subroutine_die): Likewie.
9694 (gen_block_die): Likewise.
9695 (dwarf2out_inline_entry): Likewise.
9696 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
9699 2018-09-25 Martin Liska <mliska@suse.cz>
9701 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
9702 integers and not by a float value.
9704 2018-09-25 Martin Liska <mliska@suse.cz>
9707 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
9709 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
9710 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
9711 * godump.c (go_format_type): Remove extra parenthesis.
9713 2018-09-25 Martin Liska <mliska@suse.cz>
9715 * alias.c (set_dest_equal_p): Remove unused function.
9716 * config/i386/i386.c (def_builtin_pure2): Likewise.
9717 * diagnostic-show-locus.c (class layout): Remove
9719 (layout::layout): Likewise here.
9720 * dump-context.h (class temp_dump_context): Likewise.
9721 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
9722 (add_AT_loclistsptr): Likewise.
9723 (add_AT_offset): Likewise.
9724 (get_AT_hi_pc): Likewise.
9725 (is_comdat_die): Likewise.
9726 (type_is_enum): Likewise.
9727 (ceiling): Likewise.
9728 (add_AT_vms_delta): Likewise.
9729 (is_class_die): Likewise.
9730 * edit-context.c (class line_event): Remove unused field.
9731 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
9733 * ipa-cp.c (ipa_get_vr_lat): Likewise.
9734 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
9735 (ok_for_base_p_nonstrict): Likewise.
9736 * tree-chrec.c (is_not_constant_evolution): Likewise.
9737 (chrec_fold_poly_cst): Likewise.
9738 * tree-if-conv.c (has_pred_critical_p): Likewise.
9739 * tree-ssa-coalesce.c (print_exprs): Likewise.
9740 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
9741 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
9742 * tree-vrp.c (value_ranges_intersect_p): Likewise.
9743 (value_range_nonnegative_p): Likewise.
9745 2018-09-25 Martin Liska <mliska@suse.cz>
9747 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
9748 Do not handle "GNU Pascal".
9749 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
9751 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
9752 from documentation. Likewise.
9753 * dbxout.c (dbxout_range_type): Likewise.
9754 * doc/cpp.texi: Likewise.
9755 * doc/extend.texi: Likewise.
9756 * doc/frontends.texi: Likewise.
9757 * doc/invoke.texi: Remove Pascal entry.
9758 * tree.def (CLEANUP_POINT_EXPR): Likewise.
9759 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
9761 2018-09-25 Martin Liska <mliska@suse.cz>
9764 * doc/invoke.texi: Document all parameters and remove default
9767 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
9770 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
9771 contains HOST_WIDE_INTs when computing its size.
9773 2018-09-24 Jim Wilson <jimw@sifive.com>
9776 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
9778 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
9780 2018-09-24 Andrew Pinski <apinski@marvell.com>
9782 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
9783 access prev before checking it for NULLness in the
9784 AARCH64_FUSE_CMP_BRANCH case.
9786 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
9789 * config/i386/i386.c (rest_of_insert_endbranch): Set
9790 endbr_queued_at_entrance to true and don't insert ENDBR if
9791 x86_function_profiler will be called.
9792 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
9794 * config/i386/i386.h (machine_function): Add
9795 endbr_queued_at_entrance.
9797 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
9799 * genattrtab.c (mk_attr_alt): Use alternative_mask.
9800 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
9802 (check_attr_test): Use alternative_mask.
9803 (get_attr_value): Likewise.
9804 (compute_alternative_mask): Use alternative_mask and XWINT.
9805 (make_alternative_compare): Use alternative_mask.
9806 (attr_alt_subset_p): Use XWINT.
9807 (attr_alt_subset_of_compl_p): Likewise.
9808 (attr_alt_intersection): Use alternative_mask and XWINT.
9809 (attr_alt_union): Likewise.
9810 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
9811 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
9812 (simplify_test_exp): Use alternative_mask and XWINT.
9813 (write_test_expr): Use alternative_mask and XWINT, adjust bit
9814 number calculation to support 64 bits. Generate code that
9815 checks 64-bit masks.
9816 (main): Use alternative_mask.
9817 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
9819 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
9822 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
9823 RETURN+USE when returning via %r14.
9825 2018-09-24 Martin Liska <mliska@suse.cz>
9827 * gcov.c (output_lines): Print colorization legend
9828 for both flag_use_colors and flag_use_hotness_colors.
9831 2018-09-24 Martin Liska <mliska@suse.cz>
9833 * coverage.c (get_coverage_counts): Use warning_at
9834 with current_function_decl location. Use %qD in warning
9837 2018-09-24 Martin Liska <mliska@suse.cz>
9839 * memory-block.h (memory_block_pool::release): Annotate with
9840 valgrind that the memory is not accessible.
9842 2018-09-24 Martin Liska <mliska@suse.cz>
9845 * asan.c: Make asan_handled_variables extern.
9847 * cfgexpand.c (expand_stack_vars): Make sure
9848 a representative is unpoison if another
9849 variable in the partition is handled by
9850 use-after-scope sanitization.
9852 2018-09-24 Richard Biener <rguenther@suse.de>
9854 PR tree-optimization/63155
9855 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
9856 the worklist when the edge of the respective argument isn't
9859 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
9861 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
9862 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
9863 (MASK_CLASS_P): Update for rename.
9864 (MAYBE_MASK_CLASS_P): Ditto.
9865 (REG_CLASS_NAMES): Update.
9866 (REG_CLASS_CONTENT): Update.
9867 * config/i386/i386.c (regclass_map): Update for MASK_REG
9868 and ALL_MASK_REGS rename.
9869 * config/i386/constraints.md (Yk): Update for rename.
9872 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
9874 * config/i386/i386.h (enum reg_class): Remove
9875 EVEX_SSE_REGS and MOD4_SSE_REGS.
9876 (REG_CLASS_NAMES): Update.
9877 (REG_CLASS_CONTENT): Update.
9878 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
9879 registers as ALL_SSE_REGS.
9880 (ix86_additional_allocno_class_p): Remove.
9881 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
9882 (ix86_register_priority): Lower priority of EVEX SSE registers.
9883 Use IN_RANGE macro where appropriate.
9884 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
9885 AVX-5124VNNIW checks.
9886 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
9887 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
9888 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
9889 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
9890 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
9891 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
9892 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
9893 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
9894 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
9895 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
9896 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
9897 * config/i386/constraints.md (Yh): Remove.
9899 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
9901 * config/i386/i386.c (regclass_map): Declare integer REX registers
9904 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
9906 * doc/service.texi (Service): Switch the fsf.org link to https.
9908 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
9911 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9912 Define to speculation_safe_value_not_needed.
9914 2018-09-21 Florian Weimer <fweimer@redhat.com>
9917 * doc/extend.texi (Common Function Attributes): Mention that
9918 noreturn suppresses tail call optimization.
9920 2018-09-21 Jeff Law <law@redhat.com>
9922 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
9923 vr_values::cleanup_edges_and_switches.
9924 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
9926 (identify_jump_threads): Remove EDGE_IGNORE handling.
9927 (execute_vrp): Move handling of to_remove_edges and
9928 to_update_switch_stmts into vr_values class member functions.
9929 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
9930 (to_update_switch_stmts): Likewise.
9931 * vr-values.c: Include cfghooks.h.
9932 (vr_values::vr_values): Initialize to_remove_edges and
9933 to_update_switch_stmts.
9934 (vr_values::~vr_values): Verify to_remove_edges and
9935 to_update_switch_stmts are empty.
9936 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
9937 (vr_values::cleanup_edges_and_switches): New member function.
9938 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
9939 function. Add new data members.
9941 2018-09-21 David Malcolm <dmalcolm@redhat.com>
9943 PR tree-optimization/87309
9944 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
9945 calls with pflags and alt_flags.
9946 (selftest::test_capture_of_dump_calls): Add test of interaction of
9947 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
9949 2018-09-21 Olivier Hainque <hainque@adacore.com>
9951 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
9953 2018-09-21 Olivier Hainque <hainque@adacore.com>
9955 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
9957 2018-09-21 Olivier Hainque <hainque@adacore.com>
9959 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
9960 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
9961 (VXWORKS_LIBS_RTP): Minor reordering.
9963 2018-09-21 Olivier Hainque <hainque@adacore.com>
9965 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
9966 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
9968 2018-09-21 Olivier Hainque <hainque@adacore.com>
9970 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
9971 (PTRDIFF_TYPE): Likewise.
9973 2018-09-21 Olivier Hainque <hainque@adacore.com>
9975 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
9976 triplet, similar to support for VxWorks7.
9977 * config/vxworks-dummy.h: Provide a default definition
9978 of TARGET_VXWORKS64 to 0.
9980 2018-09-21 Olivier Hainque <hainque@adacore.com>
9982 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
9983 * config/vxworks-dummy.h: here.
9985 2018-09-21 Olivier Hainque <hainque@adacore.com>
9987 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
9989 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
9990 Bo Zhou <zbo.zhou@hisilicon.com>
9992 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
9993 * config/aarch64/aarch64-tune.md: Regenerated.
9994 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
9995 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
9996 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
9998 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
9999 Julian Brown <julian@codesourcery.com>
10001 * builtins.c (get_builtin_sync_mem): Handle address spaces.
10003 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
10005 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
10006 if the call takes a static chain.
10008 2018-09-21 Martin Liska <mliska@suse.cz>
10010 * auto-profile.c (autofdo_source_profile::read): Do not
10012 (read_profile): Do not add working sets.
10013 (read_autofdo_file): Remove sum_all.
10014 (afdo_callsite_hot_enough_for_early_inline): Remove const
10016 * coverage.c (struct counts_entry): Remove gcov_summary.
10017 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
10018 do not support GCOV_TAG_PROGRAM_SUMMARY.
10019 (get_coverage_counts): Remove summary and expected
10021 * coverage.h (get_coverage_counts): Likewise.
10022 * doc/gcov-dump.texi: Remove -w option.
10023 * gcov-dump.c (dump_working_sets): Remove.
10024 (main): Do not support '-w' option.
10025 (print_usage): Likewise.
10026 (tag_summary): Likewise.
10027 * gcov-io.c (gcov_write_summary): Do not dump
10029 (gcov_read_summary): Likewise.
10030 (gcov_histo_index): Remove.
10031 (gcov_histogram_merge): Likewise.
10032 (compute_working_sets): Likewise.
10033 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
10035 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
10036 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
10037 (GCOV_HISTOGRAM_SIZE): Remove.
10038 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
10039 (struct gcov_summary): Simplify rapidly just
10040 to runs and sum_max fields.
10041 (gcov_histo_index): Remove.
10042 (NUM_GCOV_WORKING_SETS): Likewise.
10043 (compute_working_sets): Likewise.
10044 * gcov-tool.c (print_overlap_usage_message): Remove
10045 trailing empty line.
10046 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
10047 (output_lines): Remove program related line.
10048 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
10049 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
10051 (input_profile_summary): Do not read it.
10052 (merge_profile_summaries): And do not merge it.
10053 (input_symtab): Do not call removed function.
10054 * modulo-sched.c (sms_schedule): Do not print sum_max.
10055 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
10056 removed when histogram method was invented.
10057 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
10059 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
10061 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
10062 and dump selected value.
10063 * profile.c (add_working_set): Remove.
10064 (get_working_sets): Likewise.
10065 (find_working_set): Likewise.
10066 (get_exec_counts): Do not work with working sets.
10067 (read_profile_edge_counts): Do not inform as sum_max is removed.
10068 (compute_branch_probabilities): Likewise.
10069 (compute_value_histograms): Remove argument for call of
10070 get_coverage_counts.
10071 * profile.h: Do not make gcov_summary const.
10073 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
10075 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
10077 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
10079 PR tree-optimization/86990
10080 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
10081 Check that the entire merged store group is made of constants only for
10082 overlapping stores.
10084 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
10086 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
10087 (VTABLE_VERIFICATION_SPEC): Likewise.
10088 (SANITIZER_EARLY_SPEC): Likewise.
10089 (SANITIZER_SPEC): Likewise.
10090 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
10091 * doc/invoke.texi (Link Options): Document -r.
10093 2018-09-20 Richard Biener <rguenther@suse.de>
10095 PR middle-end/87054
10096 * gimplify.c (gimplify_expr): Retain alignment of
10097 addressable lvalue in dereference.
10099 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
10102 * configure.ac: Check for .loc is_stmt support.
10103 * configure, config.in: Rebuilt.
10104 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
10107 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
10109 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
10110 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
10113 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
10115 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10117 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
10120 2018-09-20 Marek Polacek <polacek@redhat.com>
10122 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
10124 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
10126 PR tree-optimization/87288
10127 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
10128 into account when determining PEELING_FOR_NITERS.
10130 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
10132 PR tree-optimization/86877
10133 * tree-vect-loop.c (vect_analyze_loop_2): Call
10134 vect_verify_datarefs_alignment.
10136 2018-09-19 Marek Polacek <polacek@redhat.com>
10138 * doc/invoke.texi: Document -Wclass-conversion.
10140 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
10142 * config/pa/pa.c (pa_adjust_priority): Delete.
10143 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
10145 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
10146 (atomic_storehi): Likewise.
10147 (atomic_storesi): Likewise.
10148 (atomic_loaddi): Restore compare and swap exchange loop code.
10150 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
10152 PR rtl-optimization/86902
10153 * combine.c (try_combine): When changing the CC mode used, don't change
10154 an unrelated mode in other_insn to that new CC mode.
10156 2018-09-19 David Malcolm <dmalcolm@redhat.com>
10158 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
10159 with %T in place of calls to dump_generic_expr.
10160 (prune_runtime_alias_test_list): Likewise.
10161 (create_runtime_alias_checks): Likewise.
10162 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
10163 (vect_analyze_data_ref_dependence): Likewise.
10164 (vect_slp_analyze_data_ref_dependence): Likewise.
10165 (vect_record_base_alignment): Likewise. Use %G in place of call
10166 to dump_gimple_stmt.
10167 (vect_compute_data_ref_alignment): Likewise.
10168 (verify_data_ref_alignment): Likewise.
10169 (vect_find_same_alignment_drs): Likewise.
10170 (vect_analyze_group_access_1): Likewise.
10171 (vect_analyze_data_ref_accesses): Likewise.
10172 (dependence_distance_ge_vf): Likewise.
10173 (dump_lower_bound): Likewise.
10174 (vect_prune_runtime_alias_test_list): Likewise.
10175 (vect_find_stmt_data_reference): Likewise.
10176 (vect_analyze_data_refs): Likewise.
10177 (vect_create_addr_base_for_vector_ref): Likewise.
10178 (vect_create_data_ref_ptr): Likewise.
10179 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
10180 (vect_can_advance_ivs_p): Likewise.
10181 (vect_update_ivs_after_vectorizer): Likewise.
10182 (vect_gen_prolog_loop_niters): Likewise.
10183 (vect_prepare_for_masked_peels): Likewise.
10184 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
10185 (vect_determine_vectorization_factor): Likewise.
10186 (vect_is_simple_iv_evolution): Likewise.
10187 (vect_analyze_scalar_cycles_1): Likewise.
10188 (vect_analyze_loop_operations): Likewise.
10189 (report_vect_op): Likewise.
10190 (vect_is_slp_reduction): Likewise.
10191 (check_reduction_path): Likewise.
10192 (vect_is_simple_reduction): Likewise.
10193 (vect_create_epilog_for_reduction): Likewise.
10194 (vect_finalize_reduction:): Likewise.
10195 (vectorizable_induction): Likewise.
10196 (vect_transform_loop_stmt): Likewise.
10197 (vect_transform_loop): Likewise.
10198 (optimize_mask_stores): Likewise.
10199 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
10200 (vect_split_statement): Likewise.
10201 (vect_recog_over_widening_pattern): Likewise.
10202 (vect_recog_average_pattern): Likewise.
10203 (vect_determine_min_output_precision_1): Likewise.
10204 (vect_determine_precisions_from_range): Likewise.
10205 (vect_determine_precisions_from_users): Likewise.
10206 (vect_mark_pattern_stmts): Likewise.
10207 (vect_pattern_recog_1): Likewise.
10208 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10209 (vect_record_max_nunits): Likewise.
10210 (vect_build_slp_tree_1): Likewise.
10211 (vect_build_slp_tree_2): Likewise.
10212 (vect_print_slp_tree): Likewise.
10213 (vect_analyze_slp_instance): Likewise.
10214 (vect_detect_hybrid_slp_stmts): Likewise.
10215 (vect_detect_hybrid_slp_1): Likewise.
10216 (vect_slp_analyze_operations): Likewise.
10217 (vect_slp_analyze_bb_1): Likewise.
10218 (vect_transform_slp_perm_load): Likewise.
10219 (vect_schedule_slp_instance): Likewise.
10220 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
10221 (vect_mark_stmts_to_be_vectorized): Likewise.
10222 (vect_init_vector_1): Likewise.
10223 (vect_get_vec_def_for_operand): Likewise.
10224 (vect_finish_stmt_generation_1): Likewise.
10225 (vect_check_load_store_mask): Likewise.
10226 (vectorizable_call): Likewise.
10227 (vectorizable_conversion): Likewise.
10228 (vectorizable_operation): Likewise.
10229 (vectorizable_load): Likewise.
10230 (vect_analyze_stmt): Likewise.
10231 (vect_is_simple_use): Likewise.
10232 (vect_get_vector_types_for_stmt): Likewise.
10233 (vect_get_mask_type_for_stmt): Likewise.
10234 * tree-vectorizer.c (increase_alignment): Likewise.
10236 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
10238 * doc/rtl.texi: Adjust vec_select description.
10239 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
10240 non-constant selectors.
10242 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
10244 * config/aarch64/aarch64-protos.h
10245 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
10246 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
10247 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
10248 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
10249 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
10250 (AARCH64_FL_PROFILE): Move index so flags are ordered.
10251 (AARCH64_ISA_RCPC8_4): New flag.
10252 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
10253 to aarch64_offset_9bit_signed_unscaled_p.
10254 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
10256 * config/aarch64/constraints.md (Ust): New constraint.
10257 * config/aarch64/predicates.md.
10258 (aarch64_9bit_offset_memory_operand): New predicate.
10259 (aarch64_rcpc_memory_operand): New predicate.
10261 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
10263 PR rtl-optimization/87361
10264 * rtlanal.c (nonzero_bits1): Revert accidental change.
10266 2018-09-19 Richard Biener <rguenther@suse.de>
10268 PR tree-optimization/87349
10269 PR tree-optimization/87342
10270 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
10272 2018-09-18 Marek Polacek <polacek@redhat.com>
10274 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
10275 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
10277 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
10279 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
10281 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
10283 PR rtl-optimization/86882
10284 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
10286 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
10288 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
10289 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
10291 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
10294 * doc/invoke.texi (Link Options): Fix formatting and grammar.
10296 2018-09-18 Richard Biener <rguenther@suse.de>
10298 PR middle-end/63155
10299 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
10300 (compute_samebase_partition_bases): Likewise.
10301 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
10302 (gimple_can_coalesce_p): Simplify.
10304 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
10306 Handle a library implementation of ffs calling __builtin_ffs.
10307 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
10308 (mmix_init_libfuncs): New function: make __builtin_ffs expand
10311 2018-09-17 David Malcolm <dmalcolm@redhat.com>
10313 * diagnostic-show-locus.c (class layout_range): Add field
10315 (layout_range::layout_range): Add "original_idx" param and use it
10316 to initialize new field.
10317 (make_range): Use 0 for original_idx.
10318 (layout::layout): Pass in index to calls to
10319 maybe_add_location_range.
10320 (layout::maybe_add_location_range): Add param "original_idx" and
10321 pass it on to layout_range.
10322 (layout::print_any_labels): Pass on range->m_original_idx to
10324 (gcc_rich_location::add_location_if_nearby): Use 0 for
10326 * gcc-rich-location.h (text_range_label::get_text): Update for new
10328 (range_label_for_type_mismatch::get_text): Likewise.
10330 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
10332 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
10334 2018-09-17 David Malcolm <dmalcolm@redhat.com>
10336 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
10337 format_string_diagnostic_t.
10338 (fmtwarn_n): Likewise.
10339 * substring-locations.c
10340 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
10341 (format_warning_n_va): Convert to...
10342 (format_string_diagnostic_t::emit_warning_n_va): ...this.
10343 (format_warning_va): Convert to...
10344 (format_string_diagnostic_t::emit_warning_va): ...this.
10345 (format_warning_at_substring): Convert to...
10346 (format_string_diagnostic_t::emit_warning): ...this.
10347 (format_warning_at_substring_n): Convert to...
10348 (format_string_diagnostic_t::emit_warning_n): ...this.
10349 * substring-locations.h (class format_string_diagnostic_t): New
10351 (format_warning_va): Convert to
10352 format_string_diagnostic_t::emit_warning_va.
10353 (format_warning_n_va): Convert to
10354 format_string_diagnostic_t::emit_warning_n_va.
10355 (format_warning_at_substring): Convert to
10356 format_string_diagnostic_t::emit_warning.
10357 (format_warning_at_substring_n): Convert to
10358 format_string_diagnostic_t::emit_warning_n.
10360 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
10361 Bernd Schmidt <bernds_cb1@t-online.de>
10363 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
10366 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
10368 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
10369 operand 0 predicate to nonimmediate operand.
10370 (rint<mode>2_frndint): Remove insn pattern.
10371 (rint<mode>2): Change operand 1 predicate to general_operand.
10372 Extend operand 1 to XFmode and generate rintxf2 insn.
10373 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
10374 Do not use X87MODEF mode macro.
10375 (frndintxf2_<rounding>_i387): Rename from
10376 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
10377 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
10378 to XFmode and generate significandxf3 insn.
10380 2018-09-17 Richard Biener <rguenther@suse.de>
10382 PR tree-optimization/87328
10383 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
10384 visiting unexecutable backedges when not iterating.
10385 (do_rpo_vn): Mark all edges not executable even when not
10388 2018-09-17 Martin Jambor <mjambor@suse.cz>
10391 * doc/invoke.texi (Warning Options): Likewise.
10393 2018-09-17 Richard Biener <rguenther@suse.de>
10395 PR tree-optimization/87301
10396 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
10397 clean EH info from leftover copy assignments.
10399 2018-09-17 Martin Liska <mliska@suse.cz>
10401 PR gcov-profile/85871
10402 * gcov.c (output_intermediate_file): Fix out of bounds
10405 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
10407 * config/arc/arc.c: Object attributes for core4 not reflected
10409 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
10412 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
10414 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
10416 2018-09-17 Martin Liska <mliska@suse.cz>
10418 * doc/gcov.texi: Document new option --use-hotness-colors.
10419 * gcov.c (struct source_info): Declare new field.
10420 (source_info::source_info): Set default for maximum_count.
10421 (print_usage): Add new -q option.
10422 (process_args): Process it.
10423 (accumulate_line_info): Save src->maximum_count.
10424 (output_line_beginning): Make color line number if
10425 flag_use_hotness_colors is set.
10426 (output_line_details): Pass default argument value.
10427 (output_lines): Pass src->maximum_count.
10429 2018-09-17 Martin Liska <mliska@suse.cz>
10431 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
10432 Use processor_names table.
10433 * config/i386/i386.c (ix86_default_align): Use
10434 processor_cost_table for alignment values.
10435 (ix86_option_override_internal): Use processor_names.
10436 (ix86_function_specific_print): Likewise.
10437 * config/i386/i386.h (struct processor_costs):
10438 Add alignment values.
10439 (struct ptt): Remove and replace with const char *.
10440 * config/i386/x86-tune-costs.h (struct processor_costs):
10441 Declare default alignments for all costs.
10443 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
10445 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
10446 symbolics or VR_VARYING ranges for ABS_EXPR.
10447 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
10448 when range will wrap.
10450 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
10452 PR middle-end/86864
10453 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
10454 before and after a JUMP_TABLE_DATA.
10456 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
10458 PR middle-end/87188
10459 * dojump.c (do_compare_and_jump): Canonicalize function pointers
10460 when one operand is a function pointer. Use POINTER_TYPE_P and
10461 FUNC_OR_METHOD_TYPE_P.
10462 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
10463 * fold-const.c (build_range_check): Likewise.
10464 * match.pd (simple_comparison): Likewise.
10466 2018-09-14 David Malcolm <dmalcolm@redhat.com>
10469 * spellcheck.c (get_edit_distance_cutoff): New function.
10470 (selftest::test_edit_distance_unit_test_oneway): Rename to...
10471 (selftest::test_get_edit_distance_one_way): ...this.
10472 (selftest::test_get_edit_distance_unit): Rename to...
10473 (selftest::test_get_edit_distance_both_ways): ...this.
10474 (selftest::test_edit_distances): Move tests to this new function,
10475 and test some more pairs of strings. Update for above renaming.
10476 (selftest::get_old_cutoff): New function.
10477 (selftest::test_get_edit_distance_cutoff): New function.
10478 (selftest::assert_suggested_for): New function.
10479 (ASSERT_SUGGESTED_FOR): New macro.
10480 (selftest::assert_not_suggested_for): New function.
10481 (ASSERT_NOT_SUGGESTED_FOR): New macro.
10482 (selftest::test_suggestions): New function.
10483 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
10484 tests to selftest::test_edit_distances and call it. Add calls to
10485 selftest::test_get_edit_distance_cutoff and
10486 selftest::test_suggestions.
10487 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
10488 (best_match::consider): Replace hard-coded cutoff calculation with
10490 (best_match::get_cutoff): New declaration.
10491 (best_match::get_best_meaningful_candidate): Likewise.
10493 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
10495 * builtins.c (fold_builtin_strlen): Remove TODO comment.
10497 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
10500 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
10502 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
10503 terminated string literal.
10505 2018-09-14 Martin Sebor <msebor@redhat.com>
10507 * builtins.c (unterminated_array): Handle ARRAY_REF.
10508 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
10509 * builtins.h (unterminated_array): Declare extern.
10510 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
10512 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
10515 2018-09-14 Martin Sebor <msebor@redhat.com>
10516 Jeff Law <law@redhat.com>
10518 * builtins.c (unterminated_array): New.
10519 (expand_builtin_strcpy): Adjust.
10520 (expand_builtin_strcpy_args): Detect unterminated arrays.
10521 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
10522 unterminated arrays.
10523 * gimple-fold.h (get_maxval_strlen): Add argument.
10524 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
10526 * gimple-fold.c (get_range_strlen): Add argument.
10527 (get_maxval_strlen): Adjust.
10528 * gimple-fold.h (get_range_strlen): Add argument.
10530 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
10532 * config/i386/movdirintrin.h: Fix copyright year.
10534 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
10536 * reg-stack.c: Include regs.h.
10537 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
10538 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
10539 FIRST_STACK_REG, not DFmode.
10540 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
10541 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
10542 (change stack): Default register mode to the reg_raw_mode of
10543 FIRST_STACK_REG, not DFmode.
10544 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
10545 (*swapxf): Rename from swapxf.
10547 2018-09-14 Carl Love <cel@us.ibm.com>
10549 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
10550 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
10552 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
10555 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
10558 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
10561 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
10563 2018-09-14 Jason Merrill <jason@redhat.com>
10565 Fix --enable-gather-detailed-mem-stats.
10566 * hash-table.c (hash_table_usage): Change from variable to function.
10567 * hash-table.h: Adjust.
10568 * Makefile.in: Add missing dependencies on hash-table.h.
10570 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10572 PR tree-optimization/87259
10574 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
10575 execute_cse_reciprocals_1 has tried transforming.
10577 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
10579 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
10580 VR_VARYING for PLUS/MINUS_EXPR.
10582 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
10584 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
10587 2018-09-14 Richard Biener <rguenther@suse.de>
10589 PR middle-end/63155
10590 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
10591 bits for the merged partition.
10593 2018-09-13 Martin Sebor <msebor@redhat.com>
10594 Bernd Edlinger <bernd.edlinger@hotmail.de>
10596 * builtins.h (c_srlen): Add argument.
10597 * builtins.c (warn_string_no_nul): New function.
10598 (c_strlen): Add argument and use it. Update recursive calls.
10599 Pass DECL argument to string_constant to get info on non
10600 terminated strings. Update *NONSTR as needed.
10601 (fold_builtin_strlen): Add argument to calls to c_strlen.
10602 Warn for unterminated arrays.
10603 (warn_string_no_null): Add prototype.
10604 * expr.c (string_constant): Update arguments. Update recursive
10605 calls appropriately. Detect missing NUL terminator and outermost
10606 declaration its missing in.
10607 Improve checks for arrays with nonzero lower bound or elements
10608 that are not a single byte. Simplify offset computation.
10609 Simplify checks for non-NUL terminated strings.
10610 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
10611 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
10613 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
10615 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
10617 * fold-const.c (c_getstr): Fix function comment. Remove unused third
10618 argument. Fix range checks.
10619 * fold-const.h (c_getstr): Adjust protoype.
10620 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
10621 string is constant but contains no NUL byte.
10623 * expr.c (string_constant): Adjust function comment.
10624 Remove bogus check for zero termination.
10626 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
10628 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
10629 (get_constant_size): Don't make STRING_CSTs larger than they are.
10630 (check_string_literal): New check function for STRING_CSTs.
10631 (output_constant): Use it.
10633 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
10636 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
10638 2018-09-13 Richard Biener <rguenther@suse.de>
10640 PR tree-optimization/87263
10641 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
10642 (struct unwind_state): Add max_rpo field.
10643 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
10644 Compute max_rpo, the max RPO number a block can be backwards reached
10645 from. Re-write non-iterating mode to a RPO ordered worklist approach,
10646 separating it from the iterating mode.
10648 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
10650 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
10651 (rfs_decision): New scheduling decision.
10653 2018-09-13 Richard Biener <rguenther@suse.de>
10656 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
10657 (vn_nary_op_insert_pieces_predicated): Do not write useless
10658 valid_dominated_by_p entry outside of the allocated storage.
10660 2018-09-13 Omar Sandoval <osandov@osandov.com>
10661 Tom de Vries <tdevries@suse.de>
10664 * dwarf2out.c (is_c): New function.
10665 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
10667 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
10670 * config/aarch64/aarch64.md (*aarch64_bfxil):
10672 * config/aarch64/constraints.md (Ulc): Define.
10673 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
10675 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
10678 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
10680 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
10681 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
10682 aarch64_layout_frame call.
10683 (aarch64_expand_epilogue): Likewise.
10684 (aarch64_initial_elimination_offset): Likewise.
10685 (aarch64_get_separate_components): Likewise.
10686 (aarch64_use_return_insn_p): Likewise.
10687 (aarch64_layout_frame): Remove unneeded check.
10689 2018-09-13 Jakub Jelinek <jakub@redhat.com>
10691 * configure.ac: Only append
10692 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
10693 gcc_config_arguments if it was never reconfigured or last reconfigure
10694 was with different arguments.
10695 * configure: Regenerated.
10697 2018-09-13 Jakub Jelinek <jakub@redhat.com>
10698 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10700 PR middle-end/87290
10701 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
10702 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
10704 2018-09-13 Jakub Jelinek <jakub@redhat.com>
10706 PR tree-optimization/87287
10707 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
10708 X % C == 0 to X % (unsigned) C == 0 optimization to ...
10709 * match.pd (X % C == 0): ... here. New optimization.
10711 2018-09-12 Jakub Jelinek <jakub@redhat.com>
10713 PR middle-end/82853
10714 * expr.h (maybe_optimize_mod_cmp): Declare.
10715 * expr.c (mod_inv): New function.
10716 (maybe_optimize_mod_cmp): New function.
10717 (do_store_flag): Use it.
10718 * cfgexpand.c (expand_gimple_cond): Likewise.
10720 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
10721 Julian Brown <julian@codesourcery.com>
10723 PR middle-end/86336
10724 * gimplify.c (gimplify_scan_omp_clauses): Set
10725 target_firstprivatize_array_bases in OpenACC parallel and kernels
10726 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
10727 OpenACC data regions.
10729 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
10731 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
10732 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
10734 2018-09-12 Richard Biener <rguenther@suse.de>
10736 PR tree-optimization/87280
10737 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
10738 edge but unreachable target.
10739 (do_rpo_vn): For conservatively handling a PHI only mark
10740 the backedge executable but not the block reachable.
10742 2018-09-12 Richard Biener <rguenther@suse.de>
10744 PR tree-optimization/87266
10745 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
10748 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
10750 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
10752 ("trunc<BFP:mode><DFP_ALL:mode>2")
10753 ("trunc<DFP_ALL:mode><BFP:mode>2")
10754 ("extend<BFP:mode><DFP_ALL:mode>2")
10755 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
10756 according to the target operand type.
10758 2018-09-12 Jakub Jelinek <jakub@redhat.com>
10759 Andreas Krebbel <krebbel@linux.ibm.com>
10761 PR tree-optimization/86844
10762 * gimple-ssa-store-merging.c
10763 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
10764 there are any overlapping stores in between them, make sure they are
10765 also coalesced or we give up completely.
10767 2018-09-12 Jakub Jelinek <jakub@redhat.com>
10769 PR middle-end/87248
10770 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
10771 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
10773 2018-09-12 Tom de Vries <tdevries@suse.de>
10775 * common.opt (gdescribe-dies): Add option.
10776 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
10777 attribute for artifical and nameless decls.
10778 (dwarf2out_register_external_die): Add description attribute to
10779 external reference die.
10780 (add_desc_attribute): New functions.
10781 (gen_subprogram_die): Add description attribute to
10782 DW_TAG_call_site_parameter.
10783 * tree-pretty-print.c (print_generic_expr_to_str): New function.
10784 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
10785 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
10786 -gno-describe-dies.
10787 (@item -gdescribe-dies): Add.
10789 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
10791 * tree-vrp.c (vrp_shift_undefined_p): Remove.
10792 (extract_range_from_binary_expr_1: Call
10793 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
10794 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
10797 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
10799 * gimple-ssa-warn-alloca.c
10800 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
10801 field for ALLOCA_BOUND_*_LARGE.
10803 2018-09-11 Nathan Sidwell <nathan@acm.org>
10805 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
10807 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
10809 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
10810 for clobbers. Remove obsolete comment.
10812 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
10814 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
10815 mpxchk, mpxld and mpxst types.
10816 (define_attr length_immediate): Remove all processing of mpx types.
10817 (define_attr prefix_0f): Ditto.
10818 (define_attr memory): Ditto.
10820 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
10822 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
10823 (log<mode>2): Change operand 1 predicate to general_operand.
10824 Extend operand 1 to XFmode and generate logxf3 insn.
10825 (log10<mode>2): Change operand 1 predicate to general_operand.
10826 Extend operand 1 to XFmode and generate log10xf3 insn.
10827 (log2<mode>2): Change operand 1 predicate to general_operand.
10828 Extend operand 1 to XFmode and generate log2xf3 insn.
10829 (fyl2xp1_extend<mode>xf3_i387): Remove.
10830 (log1p<mode>2): Change operand 1 predicate to general_operand.
10831 Extend operand 1 to XFmode and generate log1pxf3 insn.
10832 (fxtract_extend<mode>xf3_i387): Remove.
10833 (logb<mode>2): Change operand 1 predicate to general_operand.
10834 Extend operand 1 to XFmode and generate logbxf3 insn.
10835 (ilogb<mode>2): Change operand 1 predicate to general_operand.
10836 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
10837 (significand<mode>2): Change operand 1 predicate to general_operand.
10838 Extend operand 1 to XFmode and generate significandxf3 insn.
10840 2018-09-11 Nathan Sidwell <nathan@acm.org>
10842 * gcc.c (perror_with_name, pfatal_with_name): Delete.
10843 (load_specs): Use fatal_error.
10844 (DELETE_IF_ORDINARY, process_command): Use error.
10845 (execute, run_attempt): Use fatal_error.
10847 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
10849 * diagnostic-core.h (sorry_at): New prototype.
10850 * diagnostic.c (sorry_at): New function.
10852 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
10854 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
10855 by zero as VR_UNDEFINED.
10857 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
10859 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
10860 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
10861 (<sincos>mode2): New expander.
10862 (sincos_extend<mode>xf3_i387): Remove insn pattern.
10863 (sincos -> sin, cos splitters): Remove splitter patterns.
10864 (sincos<mode>3): Change operand 2 predicate to general_operand.
10865 Extend operand 2 to XFmode and generate sincosxf3 insn.
10866 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
10867 Change operand 3 predicate to const1_operand.
10868 (fptan_extend<mode>xf4_i387): Remove insn pattern.
10869 (tanxf2): Update operands in the call to fptanxf4_i387.
10870 (tan<mode>2): Change operand 1 predicate to general_operand.
10871 Extend operand 1 to XFmode and generate tanxf3 insn.
10872 (atan2xf3): Rename from *fpatanxf3_i387.
10873 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
10874 (atan2xf3): Remove expander.
10875 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
10876 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
10877 (atan<mode>2): Change operand 1 predicate to general_operand.
10878 Extend operand 1 to XFmode and generate atanxf3 insn.
10880 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
10882 * config/i386/i386.md (x87/SSE constant load splitter): Use
10883 memory_operand instead of nonimmediate_operand for input operand
10886 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
10888 * config/i386/i386.md (float partial SSE register stall splitter): Move
10889 splitter near its instruction pattern.
10890 (float_extend partial SSE register stall splitter): Ditto.
10891 (float_truncate partial SSE register stall splitter): Ditto.
10893 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
10896 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
10897 to speculation_safe_value_not_needed.
10900 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
10901 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
10902 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
10903 leaf_function_p, instead use has_hard_reg_initial_val.
10905 2018-09-09 Nathan Sidwell <nathan@acm.org>
10907 * gcc.h (pfatal_with_name): Don't declare here.
10908 * gcc.c (pfatal_with_name): Make static.
10910 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
10912 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
10915 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
10917 PR rtl-optimization/85458
10918 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
10919 priority hook to reduce the priority of EXPR.
10921 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
10923 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
10924 DImode for x87 on 32bit targets. Conditionally disable x87 modes
10925 with X87_ENABLE_FLOAT. Remove preparation code.
10926 (*float<SWI48:mode><MODEF:mode>2): Rename from
10927 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
10928 math using "enabled" attribute.
10929 (*floatdi<MODEF:mode>2_i387): Rename from
10930 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
10931 enable for 32bit targets only.
10932 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
10934 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
10935 as operand 1 predicate. Rewrite as define_insn_and_split.
10936 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
10938 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
10940 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
10941 to fallthru to FLOAT case.
10943 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
10946 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
10947 around folding of vec_sl to handle out of range shift values.
10949 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
10951 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
10952 Update callers to gen_fix_trunc<mode>_i387_fisttp
10953 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
10954 nonimmediate_operand.
10955 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
10956 and corresponding splitters.
10957 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
10958 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
10959 (fix_truncdi_i387_with_temp): Remove insn pattern
10960 and corresponding splitters.
10961 (fix_trunc<mode>_i387): Change operand 0 predicate to
10962 nonimmediate_operand.
10963 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
10964 and corresponding splitters.
10965 (*fistdi2_1): Remove.
10967 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
10968 (lrintxfdi2): Remove expander. Reimplement as define_insn.
10969 (*fist<mode>2_1): Remove.
10970 (fist<mode>2): Ditto.
10971 (fist<mode>2_with_temp): Remove insn pattern and corresponding
10973 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
10974 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
10975 (fistdi2_<rounding>): Change operand 0 predicate to
10976 nonimmediate_operand.
10977 (fistdi2_<rounding>_with_temp): Remove insn pattern
10978 and corresponding splitters.
10979 (fist<mode>2_<rounding>): Change operand 0 predicate to
10980 nonimmediate_operand.
10981 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
10982 and corresponding splitters.
10984 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
10986 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
10988 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
10991 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
10993 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
10994 early gimple folding of vec_splat().
10995 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
10996 * gimple-fold.h: Add an extern define for tree_vec_extract().
10998 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
11000 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
11001 wrappers around TREE_TYPE comparisons.
11003 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
11006 * config/s390/predicates.md: Add nonsym_memory_operand.
11007 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
11008 contains a SYMBOL_REF, load it into an intermediate pseudo.
11009 (s390_emit_compare_and_swap): Legitimize operand.
11010 * config/s390/s390.md: Use the new nonsym_memory_operand
11011 with UNSPECV_CAS patterns.
11013 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
11016 * config/s390/s390-passes.def: New file.
11017 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
11019 (make_pass_s390_early_mach): Add declaration.
11020 * config/s390/s390.c (make_pass_s390_early_mach):
11021 (s390_option_override): Remove dynamic registration.
11022 * config/s390/t-s390: Add s390-passes.def.
11024 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
11026 * config/s390/s390.c (s390_decompose_constant_pool_ref):
11027 Remove UNSPEC_LTREL_BASE check.
11028 (annotate_constant_pool_refs): Likewise.
11029 (find_constant_pool_ref): Likewise.
11030 (find_ltrel_base): Removed.
11031 (replace_ltrel_base): Removed.
11032 (s390_mainpool_finish): Remove replace_ltrel_base call.
11033 (s390_chunkify_start): Remove pending LTREL_BASE logic.
11034 (s390_chunkify_finish): Remove replace_ltrel_base call.
11035 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
11037 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
11040 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
11041 to speculation_safe_value_not_needed.
11043 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
11044 Bernd Schmidt <bernds_cb1@t-online.de>
11046 * config/nvptx/nvptx-opts.h: New file.
11047 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
11048 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
11049 (ASM_SPEC): Define.
11050 (TARGET_SM35): New macro.
11051 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
11053 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
11055 (misa=): New option.
11056 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
11058 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
11060 * config/i386/i386.md (truncdfsf2): Remove expander.
11061 (truncdfsf2_with_temp): Ditto.
11062 (truncxf<mode>2): Ditto.
11063 (*truncdfsf_fast_mixed): Remove insn pattern.
11064 (*truncdfsf_fast_i387): Ditto.
11065 (*truncdfsf_mixed): Ditto.
11066 (*truncdfsf_i387): Ditto.
11067 (*truncdfsf2_i387_1): Ditto.
11068 (*truncxfsf2_mixed): Ditto.
11069 (*truncxfdf2_mixed): Ditto.
11070 (*truncxf<mode>2_i387_noop): Ditto. Update callers
11071 to call gen_truncxf<mode>2 instead.
11072 (*truncxf<mode>2_i387): Remove.
11073 (reg->reg splitters): Remove splitter pattern.
11074 (reg->mem splitters): Ditto.
11076 (truncdfsf2): New insn pattern.
11077 (truncxf<mode>2): Ditto.
11079 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11081 * tree-ssa-math-opts.c (is_mult_by): New function.
11082 (is_square_of): Use the above.
11083 (optimize_recip_sqrt): New function.
11084 (pass_cse_reciprocals::execute): Use the above.
11086 2018-09-05 Richard Biener <rguenther@suse.de>
11089 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
11090 to zero-init the emplaced vec.
11092 2018-09-05 Martin Liska <mliska@suse.cz>
11094 PR tree-optimization/87205
11095 * tree-switch-conversion.c (pass_lower_switch::execute):
11096 Group cases for switch statements.
11098 2018-09-05 Richard Biener <rguenther@suse.de>
11100 PR tree-optimization/87217
11101 * tree-ssa-sccvn.c (vuse_valueize): New.
11102 (vn_reference_lookup_pieces): Use it.
11103 (vn_reference_lookup): Likewise.
11105 2018-09-05 Nathan Sidwell <nathan@acm.org>
11108 * stor-layout.c (place_field): Scan forwards to check last
11109 bitfield when ms_bitfield_placement is in effect.
11111 2018-09-05 Richard Biener <rguenther@suse.de>
11114 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
11117 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
11118 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
11120 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
11121 * config.gcc (extra_objs): Build it.
11122 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
11124 * config/aarch64/aarch64-passes.def
11125 (pass_tag_collision_avoidance): New pass.
11126 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
11127 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
11128 (aarch64_classify_address): Remove static qualifier.
11129 (aarch64_address_info, aarch64_address_type): Move to...
11130 * config/aarch64/aarch64-protos.h: ... here.
11131 (make_pass_tag_collision_avoidance): New function.
11132 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
11135 2018-09-05 Martin Liska <mliska@suse.cz>
11137 * doc/gcov.texi: Update documentation of humar
11139 * gcov.c (format_count): Print one decimal place, it provides
11140 more fine number of situations like '1G' vs. '1.4G'.
11142 2018-09-05 Martin Liska <mliska@suse.cz>
11145 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
11146 * optc-gen.awk: Allow 'Var' for Deprecated options in order
11147 to generate a MASK value.
11149 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
11152 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
11153 if frame pointer isn't used.
11154 (compute_frame_pointer_to_fb_displacement): Likewise.
11156 2018-09-04 Jakub Jelinek <jakub@redhat.com>
11159 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
11160 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
11161 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
11162 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
11163 and OPTION_MASK_ISA_XSAVEC_UNSET.
11165 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
11167 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
11168 XOR operations in NAND case.
11170 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
11172 * wide-int-range.cc (wide_int_range_convert): New.
11173 * wide-int-range.h (wide_int_range_convert): New.
11174 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
11175 code into wide_int_range_convert.
11176 (extract_range_into_wide_ints): Do not munge anti range constants
11177 into the entire domain. Just return the range back.
11179 2018-09-04 Martin Liska <mliska@suse.cz>
11181 * genmatch.c (output_line_directive): Add new argument
11183 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
11185 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
11187 * doc/invoke.texi (Option Summary): Add whitespace.
11189 * doc/invoke.texi (Option Summary): Add -Waligned-new.
11191 2018-09-04 Richard Biener <rguenther@suse.de>
11193 PR tree-optimization/87211
11194 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
11195 backedge value we're supposed to treat as VARYING also number
11196 the PHI to VARYING in case it got a different value-number already.
11198 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
11200 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
11201 (extract_range_from_binary_expr_1): Do not call
11202 vrp_can_optimize_bit_op.
11203 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
11205 (wide_int_range_get_mask_and_bounds): New.
11206 (wide_int_range_optimize_bit_op): New.
11207 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
11208 (wide_int_range_bit_and): Same.
11209 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
11210 (wide_int_range_optimize_bit_op): New.
11211 (wide_int_range_get_mask_and_bounds): New.
11213 2018-09-04 Richard Biener <rguenther@suse.de>
11215 PR tree-optimization/87176
11216 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
11217 variable. When value-numbering a virtual PHI node make sure
11218 to not value-number to the backedge value.
11220 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
11222 * doc/extend.texi (Long Long, Hex Floats): Document support for
11223 long long and hex floats in more recent versions of ISO C++.
11225 2018-09-03 Richard Biener <rguenther@suse.de>
11227 PR tree-optimization/87177
11228 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
11231 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11233 * bb-reorder.c (edge_order): Convert to C-qsort-style
11234 tri-state comparator.
11235 (reorder_basic_blocks_simple): Change std::stable_sort to
11238 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11240 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
11241 tri-state comparator.
11242 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
11244 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11246 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
11247 (mergesort): ... here as maximum count for using netsort.
11248 (gcc_qsort): Set nlim to 3 if stable sort is requested.
11249 (gcc_stablesort): New.
11250 * system.h (gcc_stablesort): Declare.
11252 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
11254 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
11255 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
11256 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
11258 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
11260 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
11261 lxsdx and stxsdx alternatives.
11262 (*mov<mode>_hardfloat64): Ditto.
11263 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
11265 2018-09-03 Richard Biener <rguenther@suse.de>
11267 PR tree-optimization/87200
11268 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
11271 2018-09-03 Martin Liska <mliska@suse.cz>
11273 PR tree-optimization/87201
11274 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
11275 Fix parenthesis in an expression.
11277 2018-09-03 Richard Biener <rguenther@suse.de>
11279 PR tree-optimization/87197
11280 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
11281 visited. CSE the VN_INFO hashtable lookup.
11283 PR tree-optimization/87169
11284 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
11285 iterating make sure there's no extra backedges from irreducible
11286 regions feeding the header. Mark the destination block
11289 2018-09-03 Martin Liska <mliska@suse.cz>
11292 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
11293 * common/common-targhooks.c (default_get_valid_option_values):
11295 * common/common-targhooks.h (default_get_valid_option_values):
11297 * common/config/i386/i386-common.c: Move processor_target_table
11299 (ix86_get_valid_option_values): New function.
11300 (TARGET_GET_VALID_OPTION_VALUES): New macro.
11301 * config/i386/i386.c (struct ptt): Move to i386-common.c.
11302 (PTA_*): Move all defined masks into i386-common.c.
11303 (ix86_function_specific_restore): Use new processor_cost_table.
11304 * config/i386/i386.h (struct ptt): Moved from i386.c.
11305 (struct pta): Likewise.
11306 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
11307 * doc/tm.texi.in: Likewise.
11308 * opt-suggestions.c (option_proposer::suggest_option):
11309 Pass prefix to build_option_suggestions.
11310 (option_proposer::get_completions): Likewise.
11311 (option_proposer::build_option_suggestions): Use the new target
11313 * opts.c (struct option_help_tuple): New struct.
11314 (print_filtered_help): Use the new target hook.
11316 2018-09-03 Martin Liska <mliska@suse.cz>
11318 PR middle-end/59521
11319 * predict.c (set_even_probabilities): Add likely_edges
11320 argument and handle cases where we have precisely one
11322 (combine_predictions_for_bb): Catch also likely_edges.
11323 (tree_predict_by_opcode): Handle gswitch statements.
11324 * tree-cfg.h (find_case_label_for_value): New declaration.
11325 (find_taken_edge_switch_expr): Likewise.
11326 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
11327 Find pivot in decision tree based on probabily, not by number of
11330 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
11332 * doc/standards.texi (Standards): Update Objective-C reference.
11334 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
11336 * doc/install.texi (Prerequisites): Update link for MPC.
11338 2018-09-01 Michael Matz <matz@suse.de>
11340 PR tree-optimization/87074
11341 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
11342 PHIs for outer-loop uses.
11344 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
11346 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
11347 * doc/invoke.texi (C Dialect Options): Ditto.
11349 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
11351 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
11353 2018-08-31 Richard Biener <rguenther@suse.de>
11355 PR tree-optimization/87168
11356 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
11357 (rpo_elim::eliminate_avail): When OP was not visited it must
11360 2018-08-31 David Malcolm <dmalcolm@redhat.com>
11362 * tree-vrp.c (copy_value_range): Convert param "from" from
11363 "value_range *" to "const value_range *".
11364 (range_is_null): Likewise for param "vr".
11365 (range_int_cst_p): Likewise.
11366 (range_int_cst_singleton_p): Likewise.
11367 (symbolic_range_p): Likewise.
11368 (value_ranges_intersect_p): Likewise for both params.
11369 (value_range_nonnegative_p): Likewise for param "vr".
11370 (value_range_constant_singleton): Likewise.
11371 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
11372 (extract_range_into_wide_ints): Likewise for param "vr".
11373 (extract_range_from_multiplicative_op): Likewise for params "vr0"
11375 (vrp_can_optimize_bit_op): Likewise.
11376 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
11378 (extract_range_from_unary_expr): Likewise.
11379 (debug_value_range): Likewise for param "vr".
11380 (value_range::dump): Add "const" qualifier.
11381 (vrp_prop::check_array_ref): Convert local "vr" from
11382 "value_range *" to "const value_range *".
11383 (vrp_prop::check_mem_ref): Likewise.
11384 (vrp_prop::visit_stmt): Likewise for local "old_vr".
11385 (vrp_intersect_ranges_1): Likewise for param "vr_1".
11386 (vrp_intersect_ranges): Likewise.
11387 (simplify_stmt_for_jump_threading): Likewise for local "vr".
11388 (vrp_prop::vrp_finalize): Likewise.
11389 * tree-vrp.h (value_range::dump): Add "const" qualifier.
11390 (vrp_intersect_ranges): Add "const" qualifier to params as above.
11391 (extract_range_from_unary_expr): Likewise.
11392 (value_range_constant_singleton): Likewise.
11393 (symbolic_range_p): Likewise.
11394 (copy_value_range): Likewise.
11395 (extract_range_from_binary_expr_1): Likewise.
11396 (range_int_cst_p): Likewise.
11397 (vrp_set_zero_nonzero_bits): Likewise.
11398 (range_int_cst_singleton_p): Likewise.
11400 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
11402 * config/aarch64/arm_neon.h (vabsd_s64): New.
11403 (vnegd_s64): Likewise.
11405 2018-08-31 Martin Jambor <mjambor@suse.cz>
11407 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
11409 2018-08-31 Martin Liska <mliska@suse.cz>
11411 * ipa-icf.c (sem_item::add_type): Use
11412 sem_item::m_type_hash_cache.
11413 * ipa-icf.h: Move the cache from sem_item_optimizer
11416 2018-08-31 Nathan Sidwell <nathan@acm.org>
11418 * doc/extend.texi (Backwards Compatibility): Remove implicit
11419 extern C leeway of () being (...).
11421 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11423 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
11425 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
11429 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
11431 2018-08-31 Jakub Jelinek <jakub@redhat.com>
11433 PR middle-end/87138
11434 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
11435 gen_int_mode. Formatting fixes.
11437 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
11439 * target.def (custom_function_descriptors): Improve documentation.
11440 * doc/tm.texi.in (Trampolines): Expand discussion of function
11441 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
11442 beginning of the section.
11443 * doc/tm.texi: Regenerated.
11445 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
11447 * cfg.h (class auto_edge_flag): Spell out the template-id of the
11448 base class in the initializer list. This is a workaround for
11449 building with older GCC.
11450 (class auto_bb_flag): Likewise.
11452 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
11454 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
11455 (altivec_vcmpequ<VI_char>_p): Remove star.
11456 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
11458 (expand_strncmp_vec_sequence): New function.
11459 (emit_final_str_compare_vec): New function.
11460 (expand_strn_compare): Add support for vector strncmp.
11461 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
11462 length specification to bytes.
11463 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
11464 (vcmpnezb_p): New pattern.
11465 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
11466 for option -mstring-compare-inline-limit.
11468 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
11470 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
11471 (PTA_SKYLAKE): Add PTA_AES.
11472 (PTA_GOLDMONT): Likewise.
11474 2018-08-29 Jan Hubicka <jh@suse.cz>
11477 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
11478 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
11480 2018-08-29 Jan Hubicka <jh@suse.cz>
11482 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
11484 (hash_tree): Do not visit TYPE_STUB_DECL.
11485 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
11486 stream TYPE_STUB_DECL.
11487 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
11488 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
11489 after free_lang_data.
11490 (type_in_anonymous_namespace_p): Likewise.
11492 2018-08-29 Jan Hubicka <jh@suse.cz>
11494 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
11495 comment that it has to be even number.
11496 (class sreal): Change m_sig type to int32_t.
11497 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
11498 int64_t for temporary calculations.
11499 (sreal_verify_basics): Drop one bit from minimum and maximum.
11501 2018-08-30 Richard Biener <rguenther@suse.de>
11503 PR tree-optimization/87147
11504 * tree-ssa-sccvn.c (SSA_VISITED): New function.
11505 (visit_phi): When the degenerate result is from the backedge and
11506 we didn't visit its definition yet drop to VARYING.
11507 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
11509 2018-08-29 Jan Hubicka <jh@suse.cz>
11511 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
11513 (hash_tree): Likewise.
11515 2018-08-29 Jan Hubicka <jh@suse.cz>
11517 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
11518 and TYPE_NEXT_REF_TO.
11520 2018-08-29 Jan Hubicka <jh@suse.cz>
11522 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
11523 comment that it has to be even number.
11524 (class sreal): Change m_sig type to int32_t.
11525 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
11526 int64_t for temporary calculations.
11527 (sreal_verify_basics): Drop one bit from minimum and maximum.
11529 2018-08-30 Tamar Christina <tamar.christina@arm.com>
11531 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
11533 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
11535 PR middle-end/86995
11536 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
11537 if to_add is negative.
11539 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
11541 PR middle-end/87053
11542 * builtins.c (c_strlen): Improve range checks.
11544 2018-08-29 Martin Sebor <msebor@redhat.com>
11545 Jeff Law <law@redhat.com>
11547 PR tree-optimization/86714
11548 PR tree-optimization/86711
11549 * builtins.c (c_strlen): Add arguments to call to string_constant.
11550 * expr.c (string_constant): Add argument. Detect missing nul
11551 terminator and outermost declaration it's missing in.
11552 * expr.h (string_constant): Add argument.
11553 * fold-const.c (read_from_constant_string): Add arguments to call to
11555 (c_getstr): Likewise.
11556 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
11557 to string_constant.
11558 * tree-ssa-strlen.c (get_stridx): Likewise.
11560 2018-08-29 Jan Hubicka <jh@suse.cz>
11562 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
11563 Do not stream DECL_VINDEX.
11564 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
11565 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
11566 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
11568 2018-08-29 Richard Biener <rguenther@suse.de>
11570 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
11571 virtual operands that are not default defs to honor region
11573 (rpo_vn_valueize): Remove ineffective code here.
11575 2018-08-29 Richard Biener <rguenther@suse.de>
11577 PR tree-optimization/87132
11578 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
11579 when skipping defs reachable over backedges.
11581 2018-08-29 Richard Biener <rguenther@suse.de>
11583 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
11584 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
11585 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
11586 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
11587 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
11588 (vn_reference_lookup_3): Remove use of const_parms.
11589 (free_rpo_vn): Do not free const_parms.
11590 (do_rpo_vn): Do not call init_const_parms.
11591 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
11592 SSA_NAME_POINTS_TO_READONLY_MEMORY.
11593 (call_may_clobber_ref_p_1): Likewise.
11595 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
11598 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
11600 (-ftree-scev-cprop): Document.
11602 2018-08-29 Jan Hubicka <jh@suse.cz>
11604 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
11606 (sreal constructor): Update.
11607 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
11608 sreal:operator/): Update.
11610 2018-08-29 Martin Liska <mliska@suse.cz>
11612 * tree-switch-conversion.c (switch_conversion::expand):
11613 Strenghten assumption about gswitch statements.
11615 2018-08-29 Richard Biener <rguenther@suse.de>
11617 PR tree-optimization/87117
11618 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
11619 re-value-number released SSA VDEFs.
11621 2018-08-29 Richard Biener <rguenther@suse.de>
11623 PR tree-optimization/87126
11624 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
11626 2018-08-28 Jim Wilson <jimw@sifive.com>
11628 * config/riscv/pic.md: Rewrite.
11629 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
11631 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
11632 (SOFTF, default_load, softload, softstore): New.
11634 2018-08-28 Jeff Law <law@redhat.com>
11636 * fold-const.c (fold_binary_loc): Remove recently added assert.
11638 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
11640 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
11641 to OP parmeter of generated function.
11643 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
11645 PR tree-optimization/87009
11646 * match.pd: Add boolean optimizations.
11648 2018-08-28 Martin Sebor <msebor@redhat.com>
11650 PR middle-end/86631
11651 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
11652 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
11653 (pass_walloca::gate): Use it.
11654 (alloca_call_type): Same.
11655 (pass_walloca::execute): Same.
11656 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
11658 2018-08-28 David Malcolm <dmalcolm@redhat.com>
11660 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
11661 GCC_VERSION for usage of "__gcc_dump_printf__" format from
11662 >= 3005 to >= 9000.
11664 2018-08-28 Richard Biener <rguenther@suse.de>
11666 PR tree-optimization/87124
11667 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
11668 constants before looking up avail.
11670 2018-08-28 Jakub Jelinek <jakub@redhat.com>
11672 PR middle-end/87099
11673 * calls.c (maybe_warn_nonstring_arg): Punt early if
11674 warn_stringop_overflow is zero. Don't call get_range_strlen
11675 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
11676 Swap comparison operands to have constants on rhs. Only use
11677 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
11678 increment lenrng[0].
11680 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
11682 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
11683 use of tree_to_shwi. Remove duplicated test for the size being
11684 a whole number of bytes.
11686 2018-08-28 Richard Biener <rguenther@suse.de>
11688 PR tree-optimization/87117
11689 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
11690 Handle removed stmt without LHS (GIMPLE_NOP).
11692 2018-08-28 Richard Biener <rguenther@suse.de>
11694 PR tree-optimization/87117
11695 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
11696 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
11698 2018-08-28 Richard Biener <rguenther@suse.de>
11700 PR tree-optimization/87117
11701 * tree-ssa-pre.c (compute_avail): Do not make expressions
11702 with predicated values available.
11703 (get_expr_value_id): Assert we do not run into predicated value
11706 2018-08-28 Richard Biener <rguenther@suse.de>
11708 PR tree-optimization/87117
11709 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
11710 get virtual operands.
11711 (get_expr_operands): Handle STRING_CST like other decls.
11713 2018-08-28 Martin Liska <mliska@suse.cz>
11715 * tree.h: Update documentation of fndecl_built_in_p
11719 2018-08-27 Jeff Law <law@redhat.com>
11720 PR tree-optimization/87110
11721 * tree-ssa-dse.c (compute_trims): Handle non-constant
11724 2018-08-27 Martin Sebor <msebor@redhat.com>
11726 PR tree-optimization/86914
11727 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
11729 2018-08-27 Martin Sebor <msebor@redhat.com>
11731 PR tree-optimization/87112
11732 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
11733 the type of the bound argument.
11735 2018-08-27 Jeff Law <law@redhat.com>
11737 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
11738 type does not have a TYPE_SIZE_UNIT.
11740 2018-08-27 Steve Ellcey <sellcey@cavium.com>
11742 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
11743 with include of backend.h.
11745 2018-08-27 Richard Biener <rguenther@suse.de>
11747 PR tree-optimization/86927
11748 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
11749 use const cond reduction code.
11751 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
11753 PR tree-optimization/85758
11754 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
11756 2018-08-27 David Malcolm <dmalcolm@redhat.com>
11759 * diagnostic-show-locus.c (class layout_range): Update for
11760 conversion of show_caret_p to a tri-state.
11761 (layout_range::layout_range): Likewise.
11762 (make_range): Likewise.
11763 (layout::maybe_add_location_range): Likewise.
11764 (layout::should_print_annotation_line_p): Don't show annotation
11765 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
11766 (layout::get_state_at_point): Update for conversion of
11767 show_caret_p to a tri-state. Bail out early for
11768 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
11769 underlining or source colorization.
11770 (gcc_rich_location::add_location_if_nearby): Update for conversion
11771 of show_caret_p to a tri-state.
11772 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
11773 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
11775 (selftest::test_one_liner_labels): Likewise.
11776 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
11777 conversion of show_caret_p to a tri-state.
11778 * pretty-print.c (text_info::set_location): Likewise.
11779 * pretty-print.h (text_info::set_location): Likewise.
11780 * substring-locations.c (format_warning_n_va): Likewise.
11781 * tree-diagnostic.c (default_tree_printer): Likewise.
11782 * tree-pretty-print.c (newline_and_indent): Likewise.
11784 2018-08-27 David Malcolm <dmalcolm@redhat.com>
11787 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
11788 line above for line-insertion fix-it hints.
11789 (selftest::test_fixit_insert_containing_newline): Update the
11790 expected results, and add a test with line-numbering enabled.
11792 2018-08-27 Martin Liska <mliska@suse.cz>
11795 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
11796 params with DECL_HAS_VALUE_EXPR_P.
11798 2018-08-27 Martin Liska <mliska@suse.cz>
11800 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
11801 selected expansion strategy.
11803 2018-08-27 Martin Liska <mliska@suse.cz>
11805 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
11806 * builtins.c (is_builtin_fn): Likewise.
11807 * attribs.c (diag_attr_exclusions): Use new function
11808 fndecl_built_in_p and remove check for FUNCTION_DECL if
11810 (builtin_mathfn_code): Likewise.
11811 (fold_builtin_expect): Likewise.
11812 (fold_call_expr): Likewise.
11813 (fold_builtin_call_array): Likewise.
11814 (fold_call_stmt): Likewise.
11815 (set_builtin_user_assembler_name): Likewise.
11816 (is_simple_builtin): Likewise.
11817 * calls.c (gimple_alloca_call_p): Likewise.
11818 (maybe_warn_nonstring_arg): Likewise.
11819 * cfgexpand.c (expand_call_stmt): Likewise.
11820 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
11821 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
11822 (cgraph_node::verify_node): Likewise.
11823 * cgraphclones.c (build_function_decl_skip_args): Likewise.
11824 (cgraph_node::create_clone): Likewise.
11825 * config/arm/arm.c (arm_insert_attributes): Likewise.
11826 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
11827 * dse.c (scan_insn): Likewise.
11828 * expr.c (expand_expr_real_1): Likewise.
11829 * fold-const.c (operand_equal_p): Likewise.
11830 (fold_binary_loc): Likewise.
11831 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
11832 * gimple-low.c (lower_stmt): Likewise.
11833 * gimple-pretty-print.c (dump_gimple_call): Likewise.
11834 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
11836 * gimple.c (gimple_build_call_from_tree): Likewise.
11837 (gimple_call_builtin_p): Likewise.
11838 (gimple_call_combined_fn): Likewise.
11839 * gimplify.c (gimplify_call_expr): Likewise.
11840 (gimple_boolify): Likewise.
11841 (gimplify_modify_expr): Likewise.
11842 (gimplify_addr_expr): Likewise.
11843 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
11844 * ipa-cp.c (determine_versionability): Likewise.
11845 * ipa-fnsummary.c (compute_fn_summary): Likewise.
11846 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
11847 * ipa-split.c (visit_bb): Likewise.
11848 (split_function): Likewise.
11849 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
11850 * lto-cgraph.c (input_node): Likewise.
11851 * lto-streamer-out.c (write_symbol): Likewise.
11852 * omp-low.c (setjmp_or_longjmp_p): Likewise.
11853 (lower_omp_1): Likewise.
11854 * predict.c (strip_predict_hints): Likewise.
11855 * print-tree.c (print_node): Likewise.
11856 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
11857 * trans-mem.c (is_tm_irrevocable): Likewise.
11858 (is_tm_load): Likewise.
11859 (is_tm_simple_load): Likewise.
11860 (is_tm_store): Likewise.
11861 (is_tm_simple_store): Likewise.
11862 (is_tm_abort): Likewise.
11863 (tm_region_init_1): Likewise.
11864 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
11865 * tree-cfg.c (verify_gimple_call): Likewise.
11866 (move_stmt_r): Likewise.
11867 (stmt_can_terminate_bb_p): Likewise.
11868 * tree-eh.c (lower_eh_constructs_2): Likewise.
11869 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
11870 * tree-inline.c (remap_gimple_stmt): Likewise.
11871 (copy_bb): Likewise.
11872 (estimate_num_insns): Likewise.
11873 (fold_marked_statements): Likewise.
11874 * tree-sra.c (scan_function): Likewise.
11875 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
11876 (optimize_stack_restore): Likewise.
11877 (pass_fold_builtins::execute): Likewise.
11878 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
11879 (mark_all_reaching_defs_necessary_1): Likewise.
11880 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
11881 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
11882 (pass_forwprop::execute): Likewise.
11883 * tree-ssa-loop-im.c (stmt_cost): Likewise.
11884 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
11885 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
11886 * tree-ssa-strlen.c (get_string_length): Likewise.
11887 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
11888 (find_func_aliases_for_call): Likewise.
11889 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
11890 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
11891 * tree-tailcall.c (find_tail_calls): Likewise.
11892 * tree.c (need_assembler_name_p): Likewise.
11893 (free_lang_data_in_decl): Likewise.
11894 (get_call_combined_fn): Likewise.
11895 * ubsan.c (is_ubsan_builtin_p): Likewise.
11896 * varasm.c (incorporeal_function_p): Likewise.
11897 * tree.h (DECL_BUILT_IN): Remove and replace with
11899 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
11900 (fndecl_built_in_p): New.
11902 2018-08-27 Martin Liska <mliska@suse.cz>
11904 PR tree-optimization/86847
11905 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
11906 Dump also subtree probability.
11907 (switch_decision_tree::do_jump_if_equal): New function.
11908 (switch_decision_tree::emit_case_nodes): Handle special
11909 situations in balanced tree that can be emitted much simpler.
11910 Fix calculation of probabilities that happen in tree expansion.
11911 * tree-switch-conversion.h (struct cluster): Add
11913 (struct simple_cluster): Likewise.
11914 (struct case_tree_node): Add new function has_child.
11915 (do_jump_if_equal): New.
11917 2018-08-27 Martin Liska <mliska@suse.cz>
11919 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
11920 Add new argument to bit_test_cluster constructor.
11921 (bit_test_cluster::emit): Set bits really number of values
11923 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
11924 probability argument.
11925 * tree-switch-conversion.h (struct bit_test_cluster):
11926 Add m_handles_entire_switch.
11928 2018-08-27 Martin Liska <mliska@suse.cz>
11930 PR tree-optimization/86702
11931 * tree-switch-conversion.c (jump_table_cluster::emit):
11932 Make probabilities even for values in jump table
11933 according to number of cases handled.
11934 (switch_decision_tree::compute_cases_per_edge): Pass
11935 argument to reset_out_edges_aux function.
11936 (switch_decision_tree::analyze_switch_statement): Likewise.
11937 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
11940 2018-08-27 Martin Liska <mliska@suse.cz>
11942 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
11943 cfun argument explicitly.
11944 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
11945 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
11946 function gimple_switch_default_bb.
11947 (convert_switch_statements):
11949 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
11950 * stmt.c (label_to_block_fn): Use label_to_block and pass
11951 cfun argument explicitly and use gimple_switch_label_bb.
11952 (expand_case): Likewise.
11953 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
11954 cfun argument explicitly. Likewise.
11955 (make_edges_bb): Likewise.
11956 (make_cond_expr_edges): Likewise.
11957 (get_cases_for_edge): Likewise.
11958 (make_gimple_switch_edges): Likewise.
11959 (label_to_block_fn): Likewise.
11960 (label_to_block): Likewise.
11961 (make_goto_expr_edges): Likewise.
11962 (make_gimple_asm_edges): Likewise.
11963 (main_block_label): Likewise.
11964 (group_case_labels_stmt): Likewise.
11965 (find_taken_edge_computed_goto): Likewise.
11966 (find_taken_edge_switch_expr): Likewise.
11967 (gimple_verify_flow_info): Likewise.
11968 (gimple_redirect_edge_and_branch): Likewise.
11969 (gimple_switch_label_bb): New function.
11970 (gimple_switch_default_bb): Likewise.
11971 (gimple_switch_edge): Likewise.
11972 (gimple_switch_default_edge): Likewise.
11973 * tree-cfg.h (label_to_block_fn): Remove and replace ...
11974 (label_to_block): ... with this.
11975 (gimple_switch_label_bb): New.
11976 (gimple_switch_default_bb): Likewise.
11977 (gimple_switch_edge): Likewise.
11978 (gimple_switch_default_edge): Likewise.
11979 * tree-cfgcleanup.c (convert_single_case_switch): Use
11980 new gimple functions and pass new argument to label_to_block.
11981 (cleanup_control_flow_bb):
11982 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
11983 cfun argument explicitly.
11984 (make_eh_edges): Likewise.
11985 (redirect_eh_dispatch_edge): Likewise.
11986 (lower_resx): Likewise.
11987 (lower_eh_dispatch): Likewise.
11988 (maybe_remove_unreachable_handlers): Likewise.
11989 (unsplit_eh): Likewise.
11990 (cleanup_empty_eh): Likewise.
11991 (verify_eh_edges): Likewise.
11992 (verify_eh_dispatch_edge): Likewise.
11993 * tree-ssa-dom.c (record_edge_info): Likewise.
11994 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
11995 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
11996 (thread_through_normal_block): Likewise.
11997 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
11998 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
11999 * tree-switch-conversion.c (switch_conversion::collect): Use new
12001 (switch_conversion::check_final_bb): Likewise.
12002 (switch_conversion::gather_default_values): Pass new argument
12004 (switch_conversion::build_constructors): Likewise.
12005 (switch_decision_tree::compute_cases_per_edge): Use new
12006 gimple_switch_edge function.
12007 (switch_decision_tree::analyze_switch_statement): Pass new argument
12009 (switch_decision_tree::try_switch_expansion): Use
12010 gimple_switch_default_edge.
12011 * tree-vrp.c (find_switch_asserts): Pass new argument
12013 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
12014 (vr_values::simplify_switch_using_ranges): Likewise.
12016 2018-08-27 Richard Biener <rguenther@suse.de>
12018 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
12019 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
12021 * tree-ssa-sccvn.h (struct vn_pval): New structure.
12022 (struct vn_nary_op_s): Add unwind_to member. Add
12023 predicated_values flag and put result into a union together
12024 with a linked list of vn_pval.
12025 (struct vn_ssa_aux): Add name member to make maintaining
12026 a map of SSA name to vn_ssa_aux possible. Remove no longer
12027 needed info, dfsnum, low, visited, on_sccstack, use_processed
12028 and range_info_anti_range_p members.
12029 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
12030 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
12032 (vn_valueize): New global.
12033 (vn_context_bb): Likewise.
12034 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
12035 VN_INFO_PTR_INFO): Remove.
12036 * tree-ssa-sccvn.c: ... (rewrite)
12037 (pass_fre::execute): For -O2+ initialize loops and run
12038 RPO VN in optimistic mode (iterating). For -O1 and -Og
12039 run RPO VN in non-optimistic mode.
12040 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
12041 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
12042 * doc/invoke.texi (sccvn-max-scc-size): Remove.
12043 (rpo-vn-max-loop-depth): Document.
12044 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
12045 when valuezing the VUSE signals we walked out of the region.
12046 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
12047 (phi_translate): Set VN context block to use for availability
12049 (compute_avail): Likewise.
12050 (pre_valueize): New function.
12051 (pass_pre::execute): Adjust to the RPO VN API.
12053 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
12054 (propagate_constants_for_unrolling): Remove.
12055 (tree_unroll_loops_completely): Perform value-numbering
12056 on the unrolled bodies loop parent.
12058 2018-08-27 Richard Biener <rguenther@suse.de>
12060 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
12061 for partial antic compute.
12063 2018-08-27 Jakub Jelinek <jakub@redhat.com>
12065 PR rtl-optimization/87065
12066 * combine.c (simplify_if_then_else): Formatting fix.
12067 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
12069 (known_cond): Don't return const_true_rtx for vector modes. Use
12070 CONST0_RTX instead of const0_rtx. Formatting fixes.
12072 2018-08-27 Martin Liska <mliska@suse.cz>
12074 PR gcov-profile/87069
12075 * gcov.c (process_file): Record files already processed
12076 and warn about a file being processed multiple times.
12078 2018-08-27 Martin Liska <mliska@suse.cz>
12081 * config/aarch64/aarch64.c (aarch64_override_options_internal):
12082 Set default values for x_aarch64_*_string strings.
12083 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
12084 prefix. For -mabi do not print '=ABI' in help and use
12085 <option_value> format for -msve-vector-bits and -moverride
12088 2018-08-26 Jeff Law <law@redhat.com>
12090 * config/mips/frame-header-opt.c: Include "backend.h" rather than
12093 2018-08-26 Marek Polacek <polacek@redhat.com>
12095 PR c++/87029, Implement -Wredundant-move.
12096 * doc/invoke.texi: Document -Wredundant-move.
12098 2018-08-25 Martin Sebor <msebor@redhat.com>
12100 PR tree-optimization/87059
12101 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
12102 to the same type as the other.
12103 * fold-const.c (fold_binary_loc): Assert expectation.
12105 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
12107 * config/darwin.c (machopic_legitimize_pic_address): Clean up
12108 extraneous parentheses, dead code section and formatting.
12110 2018-08-24 David Malcolm <dmalcolm@redhat.com>
12113 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
12114 wide enough for jumps in the line-numbering to be visible.
12115 (layout::print_gap_in_line_numbering): New member function.
12116 (layout::calculate_line_spans): When using line numbering, merge
12117 line spans that are only 1 line apart.
12118 (diagnostic_show_locus): When printing line numbers, show gaps in
12119 line numbering directly, rather than printing headers.
12120 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
12121 line-numbering with multiple line spans.
12122 (selftest::test_fixit_insert_containing_newline_2): Add test of
12123 line-numbering, in which the spans are close enough to be merged.
12125 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
12127 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
12128 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
12129 * tree-vrp.c (range_is_nonnull): Remove.
12130 (range_includes_zero_p): Accept value_range instead of min/max.
12131 (extract_range_from_binary_expr_1): Do not early bail on
12133 Use range_includes_zero_p instead of range_is_nonnull.
12134 (extract_range_from_unary_expr): Use range_includes_zero_p instead
12135 of range_is_nonnull.
12136 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
12137 special case VR_ANTI_RANGE.
12138 (vrp_finalize): Same.
12139 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
12140 instead of min/max.
12141 (range_is_nonnull): Remove.
12142 * vr-values.c (vrp_stmt_computes_nonzero): Use
12143 range_includes_zero_p instead of range_is_nonnull.
12144 (extract_range_basic): Pass value_range to range_includes_zero_p
12145 instead of range_is_nonnull.
12147 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
12149 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
12150 * emit-rtl.h (rtl_data): Remove return_bnd.
12151 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
12152 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
12153 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
12154 (POINTER_BOUNDS_MODE): Remove definition.
12155 (make_pointer_bounds_mode): Remove.
12156 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
12157 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
12158 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
12159 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
12160 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
12161 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
12162 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
12164 * config/i386/i386-modes.def (BND32, BND64): Remove.
12165 * config/i386/i386.c (dbx_register_map): Remove bound registers.
12166 (dbx64_register_map): Ditto.
12167 (svr4_dbx_register_map): Ditto.
12168 (indirect_thunk_bnd_needed): Remove.
12169 (indirect_thunks_bnd_used): Ditto.
12170 (indirect_return_bnd_needed): Ditto.
12171 (indirect_return_via_cx_bnd): Ditto.
12172 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
12173 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
12174 (output_indirect_thunk): Ditto. Remove need_prefix argument.
12175 (output_indirect_thunk_function): Remove handling of
12176 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
12177 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
12178 (ix86_save_reg): Remove handling of crtl->return_bnd.
12179 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
12180 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
12181 and UNSPEC_BNDLX_ADDR.
12182 (ix86_output_indirect_branch_via_reg): Remove handling of
12183 indirect_thunk_prefix_bnd.
12184 (ix86_output_indirect_branch_via_push): Ditto.
12185 (ix86_output_function_return): Ditto.
12186 (ix86_output_indirect_function_return): Ditto.
12187 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
12188 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
12189 (CALL_USED_REGISTERS): Ditto.
12190 (REG_ALLOC_ORDER): Update for removal of bound registers.
12191 (HI_REGISTER_NAMES): Ditto.
12192 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
12193 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
12194 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
12195 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
12196 (FIRST_PSEUDO_REG): Update.
12197 (BND): Remove mode iterator.
12198 * config/i386/predicates.md (bnd_mem_operator): Remove.
12200 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
12202 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
12205 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
12207 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
12208 the case in which the permute needs only a single element and
12209 repeats for every vector of the result. Extend that case to
12210 handle variable-length vectors.
12211 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
12213 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
12216 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
12217 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
12219 2018-08-24 Richard Biener <rguenther@suse.de>
12221 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
12222 bb_flags_allocated members.
12223 (auto_flag): New RAII class for allocating flags.
12224 (auto_edge_flag): New RAII class for allocating edge flags.
12225 (auto_bb_flag): New RAII class for allocating bb flags.
12226 * cfgloop.c (verify_loop_structure): Allocate temporary edge
12228 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
12229 in favor of temporarily allocated BB flag.
12230 * hsa-brig.c: Re-order includes.
12231 * hsa-dump.c: Likewise.
12232 * hsa-regalloc.c: Likewise.
12233 * print-rtl.c: Likewise.
12234 * profile-count.c: Likewise.
12236 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
12239 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
12242 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
12245 * wide-int-range.cc (wide_int_range_div): Do not ignore result
12246 from wide_int_range_multiplicative_op.
12248 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12250 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
12253 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
12255 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
12258 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
12260 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
12261 full GENERIC expression used for replacement.
12263 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
12265 * tree-vrp.c (abs_extent_range): Remove.
12266 (extract_range_into_wide_ints): Pass wide ints by reference.
12267 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
12268 Pass wide ints by reference in all calls to
12269 extract_range_into_wide_ints.
12270 * wide-int-range.cc (wide_int_range_div): New.
12271 * wide-int-range.h (wide_int_range_div): New.
12272 (wide_int_range_includes_zero_p): New.
12273 (wide_int_range_zero_p): New.
12275 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
12277 * config/aarch64/aarch64.md (arches): New enum.
12278 (arch): New enum attr.
12279 (arch_enabled): New attr.
12280 (enabled): Now uses arch_enabled only.
12281 (simd, sve, fp16): Removed attribute.
12282 (fp): Attr now defined in terms of 'arch'.
12283 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
12284 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
12285 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
12286 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
12287 attributes into 'arch'.
12288 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
12289 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
12290 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
12291 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
12292 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
12293 'simd' attribute into 'arch'.
12294 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
12295 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
12296 Convert use of 'fp' attribute to 'arch'.
12297 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
12298 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
12300 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
12301 (different modes) Merge 'fp' and 'simd' into 'arch'.
12302 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
12303 'simd' into 'arch'.
12305 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
12307 PR rtl-optimization/87026
12308 * expmed.c (canonicalize_comparison): If we can no longer create
12309 pseudoregisters, don't.
12311 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
12314 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
12316 * config/arm/arm.c (speculation_barrier_libfunc): New static
12318 (arm_init_libfuncs): Initialize it.
12319 (arm_emit_speculation_barrier): New function.
12320 * config/arm/arm.md (speculation_barrier): Call
12321 arm_emit_speculation_barrier for architectures that do not have
12323 (speculation_barrier_insn): Only match on Armv7 or later.
12325 2018-08-23 Richard Biener <rguenther@suse.de>
12327 PR middle-end/87024
12328 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
12331 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
12333 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
12334 of single-vector TBLs.
12335 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
12336 one input is given.
12338 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
12341 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
12342 aarch64_evpc_tbl guard.
12344 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
12346 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
12349 2018-08-22 Martin Sebor <msebor@redhat.com>
12351 PR middle-end/87052
12352 * tree-pretty-print.c (pretty_print_string): Add argument.
12353 (dump_generic_node): Call to pretty_print_string with string size.
12355 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
12357 PR rtl-optimization/86771
12358 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
12359 of two SETs into those two SETs, one to be placed at i2, if that SETs
12360 destination is modified between i2 and i3.
12362 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12364 PR tree-optimization/86725
12365 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
12367 (vect_analyze_scalar_cycles_1): Check it.
12369 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12371 PR tree-optimization/86725
12372 * tree-vect-loop.c (vect_is_simple_reduction): When treating
12373 an outer loop phi as a double reduction, make sure that the
12374 single user of the phi result is an inner loop phi.
12376 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12378 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
12379 grouped stores with gaps to a strided group.
12381 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
12383 * tree-vect-stmts.c (get_group_load_store_type)
12384 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
12385 first statement in a group.
12387 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12389 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
12390 the sequence used in gcc/gcc.c.
12392 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12395 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
12398 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12400 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
12401 Darwin10-specific unwinder-shim.
12402 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
12403 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
12404 New to cater for Darwin10 Rosetta.
12406 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12408 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
12409 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
12411 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
12416 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
12417 (dwarf2out_switch_text_section): Generate a local label for the
12418 second function sub-section and apply it as the second FDE start
12420 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
12421 second sub-section start.
12423 2018-08-22 Richard Biener <rguenther@suse.de>
12425 PR tree-optimization/86988
12426 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
12428 2018-08-22 Richard Biener <rguenther@suse.de>
12430 PR tree-optimization/86945
12431 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
12433 2018-08-22 Alexandre Oliva <oliva@adacore.com>
12435 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
12436 a comment about how uses of r2 for .sdata2 come about.
12438 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
12440 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
12442 2018-08-21 Marek Polacek <polacek@redhat.com>
12444 PR c++/86981, Implement -Wpessimizing-move.
12445 * doc/invoke.texi: Document -Wpessimizing-move.
12447 2018-08-21 Jan Hubicka <jh@suse.cz>
12449 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
12450 * tree.h (is_redundant_typedef): Remove.
12451 * dwarf2out.c (is_redundant_typedef): Turn into static function.
12453 2018-08-21 Jan Hubicka <jh@suse.cz>
12455 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
12458 2018-08-21 Tamar Christina <tamar.christina@arm.com>
12460 * expmed.c (extract_low_bits): Reject invalid subregs early.
12462 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
12464 PR middle-end/86121
12465 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
12468 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12470 * config/vxworks.h: Guard vxworks_asm_out_constructor and
12471 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
12472 * config/vxworks.c: Likewise.
12474 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12476 * config/vxworks.c: Set targetm.have_ctors_dtors
12477 if HAVE_INITFINI_ARRAY_SUPPORT.
12478 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
12479 if HAVE_INITFINI_ARRAY_SUPPORT.
12481 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12483 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
12484 default search path for VxWorks < 7.
12486 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
12488 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
12489 (get_format_string): Refer to c_getstr.
12491 2018-08-21 Tom de Vries <tdevries@suse.de>
12493 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
12494 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
12495 (debuginfo_early_stop): Declare.
12496 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
12497 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
12498 (debuginfo_early_stop): New function.
12499 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
12500 and debuginfo_early_stop.
12501 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
12502 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
12503 (general_init): Call debuginfo_early_init.
12504 (finalize): Call debuginfo_fini.
12505 (do_compile): Call debuginfo_init.
12506 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
12507 -fdump-early-debug.
12508 (@item -fdump-debug, @item -fdump-earlydebug): Add.
12510 2018-08-21 Tom de Vries <tdevries@suse.de>
12512 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
12513 flag_dump_noaddr and flag_dump_unnumbered.
12515 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
12517 * wide-int-range.cc (wide_int_range_abs): New.
12518 (wide_int_range_order_set): Rename from wide_int_range_min_max.
12519 * wide-int-range.h (wide_int_range_abs): New.
12520 (wide_int_range_min_max): New.
12521 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
12522 case to call wide_int_range_abs.
12523 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
12524 (extract_range_from_abs_expr): Delete.
12526 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
12529 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
12530 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
12533 2018-08-20 Nathan Sidwell <nathan@acm.org>
12534 Jeff Law <law@redhat.com>
12536 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
12537 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
12539 2018-08-20 David Malcolm <dmalcolm@redhat.com>
12542 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
12543 (decl_attributes): Likewise.
12544 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
12546 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
12547 * diagnostic-core.h (class auto_diagnostic_group): New class.
12548 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
12549 (diagnostic_report_diagnostic): Handle the first diagnostics within
12551 (emit_diagnostic): Add auto_diagnostic_group instance.
12552 (inform): Likewise.
12553 (inform_n): Likewise.
12554 (warning): Likewise.
12555 (warning_at): Likewise.
12556 (warning_n): Likewise.
12557 (pedwarn): Likewise.
12558 (permerror): Likewise.
12560 (error_n): Likewise.
12561 (error_at): Likewise.
12563 (fatal_error): Likewise.
12564 (internal_error): Likewise.
12565 (internal_error_no_backtrace): Likewise.
12566 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
12567 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
12568 * diagnostic.h (struct diagnostic_context): Add fields
12569 "diagnostic_group_nesting_depth",
12570 "diagnostic_group_emission_count", "begin_group_cb",
12572 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
12573 Add auto_diagnostic_group instance(s).
12574 (find_explicit_erroneous_behavior): Likewise.
12575 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
12576 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
12577 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
12578 (gimplify_va_arg_expr): Likewise.
12579 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
12580 (HSA_SORRY_AT): Likewise.
12581 * ipa-devirt.c (compare_virtual_tables): Likewise.
12582 (warn_odr): Likewise.
12583 * multiple_target.c (expand_target_clones): Likewise.
12584 * opts-common.c (cmdline_handle_error): Likewise.
12585 * reginfo.c (globalize_reg): Likewise.
12586 * substring-locations.c (format_warning_n_va): Likewise.
12587 * tree-inline.c (expand_call_inline): Likewise.
12588 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
12589 * tree-ssa-loop-niter.c
12590 (do_warn_aggressive_loop_optimizations): Likewise.
12591 * tree-ssa-uninit.c (warn_uninit): Likewise.
12592 * tree.c (warn_deprecated_use): Likewise.
12594 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
12597 * config/i386/i386.md (eh_return): Always update EH return
12598 address in word_mode.
12600 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
12602 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
12603 TARGET_SPLIT_COMPLEX_ARG is defined.
12605 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
12607 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
12609 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
12612 * expr.c (expand_assignment): Assert that bitpos is positive.
12613 (store_field): Likewise
12614 (expand_expr_real_1): Make sure that bitpos is positive.
12615 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
12618 2018-08-20 Nathan Sidwell <nathan@acm.org>
12620 * Makefile.in (CPP_ID_DATA_H): Delete.
12621 (CPP_INTERNAL_H): Don't add it.
12622 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
12623 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
12625 2018-08-20 Richard Biener <rguenther@suse.de>
12627 PR tree-optimization/78655
12628 * tree-vrp.c (extract_range_from_binary_expr_1): Make
12629 pointer + offset nonnull if either operand is nonnull work.
12631 2018-08-20 Tom de Vries <tdevries@suse.de>
12633 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
12634 unless the referenced die describes the added property using
12635 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
12636 Otherwise, add a DW_AT_location to the referenced die.
12638 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
12641 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
12642 register_operand when calling ix86_set_reg_reg_cost.
12643 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
12644 Set *total to 0 for operands that satisfy x86_64_immediate_operand
12645 predicate and to 1 otherwise.
12647 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
12649 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
12650 emit a diagnostic that it is not supported and reset the option.
12651 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
12652 supported and consume the option. (ASM_FINAL_SPEC): New.
12654 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
12656 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
12659 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
12661 C-SKY port: Documentation
12663 * doc/extend.texi (C-SKY Function Attributes): New section.
12664 * doc/invoke.texi (Option Summary): Add C-SKY options.
12665 (C-SKY Options): New section.
12666 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
12668 2018-08-17 Jojo <jijie_rong@c-sky.com>
12669 Huibin Wang <huibin_wang@c-sky.com>
12670 Sandra Loosemore <sandra@codesourcery.com>
12671 Chung-Lin Tang <cltang@codesourcery.com>
12673 C-SKY port: Backend implementation
12675 * config/csky/*: New.
12676 * common/config/csky/*: New.
12678 2018-08-17 Jojo <jijie_rong@c-sky.com>
12679 Huibin Wang <huibin_wang@c-sky.com>
12680 Sandra Loosemore <sandra@codesourcery.com>
12681 Chung-Lin Tang <cltang@codesourcery.com>
12682 Andrew Jenner <andrew@codesourcery.com>
12684 C-SKY port: Configury
12686 * config.gcc (csky-*-*): New.
12687 * configure.ac: Add csky to targets for dwarf2 debug_line support.
12688 * configure: Regenerated.
12690 2018-08-17 David Malcolm <dmalcolm@redhat.com>
12692 * dump-context.h: Include "dumpfile.h".
12693 (dump_context::dump_printf_va): Convert final param from va_list
12694 to va_list *. Convert from ATTRIBUTE_PRINTF to
12695 ATTRIBUTE_GCC_DUMP_PRINTF.
12696 (dump_context::dump_printf_loc_va): Likewise.
12697 * dumpfile.c: Include "stringpool.h".
12698 (make_item_for_dump_printf_va): Delete.
12699 (make_item_for_dump_printf): Delete.
12700 (class dump_pretty_printer): New class.
12701 (dump_pretty_printer::dump_pretty_printer): New ctor.
12702 (dump_pretty_printer::emit_items): New member function.
12703 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
12705 (dump_pretty_printer::emit_item): New member function.
12706 (dump_pretty_printer::stash_item): New member function.
12707 (dump_pretty_printer::format_decoder_cb): New member function.
12708 (dump_pretty_printer::decode_format): New member function.
12709 (dump_context::dump_printf_va): Reimplement in terms of
12710 dump_pretty_printer.
12711 (dump_context::dump_printf_loc_va): Convert final param from va_list
12713 (dump_context::begin_scope): Reimplement call to
12714 make_item_for_dump_printf.
12715 (dump_printf): Update for change to dump_printf_va.
12716 (dump_printf_loc): Likewise.
12717 (selftest::test_capture_of_dump_calls): Convert "stmt" from
12718 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
12719 with %T, %E, and %G.
12720 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
12721 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
12722 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
12723 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
12724 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
12725 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
12726 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
12727 within a dump_printf_loc call to "%wu".
12728 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
12729 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
12730 missing space after "=".
12731 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
12732 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
12733 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
12734 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
12735 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
12736 duplicate "vectorized" from message.
12738 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
12740 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
12741 polyNxK_t element's TYPE_STRING_FLAG.
12743 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
12745 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
12746 (they were unnamed before). Fix comments.
12748 2018-08-17 Nathan Sidwell <nathan@acm.org>
12750 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
12752 2018-08-17 Richard Biener <rguenther@suse.de>
12754 PR tree-optimization/86841
12755 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
12757 2018-08-17 Martin Liska <mliska@suse.cz>
12759 * common.opt: Remove Warn, Init and Report for options with
12760 Ignore/Deprecated flag. Warning is done automatically for
12762 * config/i386/i386.opt: Likewise.
12763 * config/ia64/ia64.opt: Likewise.
12764 * config/rs6000/rs6000.opt: Likewise.
12765 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
12766 Remove usage of flag_check_pointer_bounds.
12767 * lto-wrapper.c (merge_and_complain): Do not handle
12768 OPT_fcheck_pointer_bounds.
12769 (append_compiler_options): Likewise.
12770 * opt-functions.awk: Do not handle Deprecated.
12771 * optc-gen.awk: Check that Var, Report and Init are not
12772 used for an option with Ignore/Deprecated flag.
12773 * opts-common.c (decode_cmdline_option): Do not report
12775 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
12777 * opts.h (struct cl_option): Remove cl_deprecated flag.
12778 (CL_ERR_DEPRECATED): Remove error enum value.
12780 2018-08-17 Richard Biener <rguenther@suse.de>
12782 PR middle-end/86505
12783 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
12784 across a va-arg-pack using call adjust its return value accordingly.
12786 2018-08-16 Martin Sebor <msebor@redhat.com>
12788 PR tree-optimization/86853
12789 * gimple-ssa-sprintf.c (struct format_result): Rename member.
12790 (struct fmtresult): Add member and initialize it in ctors.
12791 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
12792 (format_string): Handle %S the same as %ls. Set MAYFAIL.
12793 (format_directive): Set POSUNDER4K when MAYFAIL is set.
12794 (parse_directive): Handle %C same as %c.
12795 (sprintf_dom_walker::compute_format_length): Adjust.
12796 (is_call_safe): Adjust.
12798 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
12800 * builtins.c (c_strlen): Add new parameter eltsize. Use it
12801 for determining how to count the elements.
12802 * builtins.h (c_strlen): Adjust prototype.
12803 * expr.c (string_constant): Add new parameter mem_size.
12804 Set *mem_size appropriately.
12805 * expr.h (string_constant): Adjust protoype.
12806 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
12807 * gimple-fold.h (get_range_strlen): Adjust prototype.
12808 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
12809 (format_string): Call get_string_length with eltsize.
12811 2018-08-16 David Malcolm <dmalcolm@redhat.com>
12813 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
12814 to emit the span, rather than setting it as the prefix.
12816 2018-08-16 David Malcolm <dmalcolm@redhat.com>
12818 * diagnostic-show-locus.c (layout::start_annotation_line): Add
12819 "margin_char" parameter, defaulting to space. Use it in place
12820 of pp_space for the initial part of the margin.
12821 (layout::print_leading_fixits): Use '+' when filling the margin
12822 of line-insertion fix-it hints.
12824 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12826 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
12829 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12831 * config/rs6000/altivec.md: Don't set length attribute to the default
12833 * config/rs6000/darwin.md: Ditto.
12834 * config/rs6000/dfp.md: Ditto.
12835 * config/rs6000/htm.md: Ditto.
12836 * config/rs6000/rs6000.md: Ditto.
12837 * config/rs6000/sync.md: Ditto.
12838 * config/rs6000/vsx.md: Ditto.
12840 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12842 * config/rs6000/altivec.md: Don't set length attribute to the default
12843 value, for branch instructions.
12844 * config/rs6000/darwin.md: Ditto.
12845 * config/rs6000/rs6000.md: Ditto.
12847 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
12849 * config/rs6000/rs6000.md (length): Always define as const_int 4.
12850 (unnamed conditional branch define_insn): Set length to 4 or 8
12851 depending on offset.
12852 (<bd>_<mode>): Similar, for alternative 0.
12853 (<bd>tf_<mode>): Ditto.
12855 2018-08-16 Tamar Christina <tamar.christina@arm.com>
12857 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
12859 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
12861 * doc/rtl.texi: Replace old RTX class names with new names.
12864 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
12866 * expmed.h (canonicalize_comparison): New declaration.
12867 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
12868 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
12869 * optabs.c (prepare_cmp_insn): Likewise.
12870 * rtl.h (unsigned_condition_p): New function which checks if a
12871 comparison operator is unsigned.
12873 2018-08-16 Nathan Sidwell <nathan@acm.org>
12875 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
12876 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
12878 2018-08-16 Tamar Christina <tamar.christina@arm.com>
12881 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
12882 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
12883 (mov<mov>): ..this and enable unconditionally.
12885 2018-08-16 Tamar Christina <tamar.christina@arm.com>
12887 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
12889 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
12891 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
12892 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
12893 "Common" with "Target".
12895 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
12897 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
12898 * doc/invoke.texi (mmitigate-rop): Remove.
12899 * config/i386/i386.c: Do not include "regrename.h".
12900 (ix86_rop_should_change_byte_p, reg_encoded_number)
12901 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
12903 (ix86_reorg): Remove call to ix86_mitigate_rop.
12904 * config/i386/i386.md (attr "modrm_class"): Remove.
12905 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
12906 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
12907 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
12909 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
12911 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
12912 allow folding of mergeh() and mergel() for the float and double types.
12913 (fold_mergehl_helper): Rework to handle building a permute tree
12916 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
12918 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
12921 2018-08-15 David Malcolm <dmalcolm@redhat.com>
12923 * common.opt (fdiagnostics-show-labels): New option.
12924 * diagnostic-show-locus.c (class layout_range): Add field
12926 (class layout): Add field "m_show_labels_p".
12927 (layout_range::layout_range): Add param "label" and use it to
12928 initialize m_label.
12929 (make_range): Pass in NULL for new "label" param of layout_range's
12931 (layout::layout): Initialize m_show_labels_p.
12932 (layout::maybe_add_location_range): Pass in loc_range->m_label
12933 when constructing layout_range instances.
12934 (struct line_label): New struct.
12935 (layout::print_any_labels): New member function.
12936 (layout::print_line): Call it if label-printing is enabled.
12937 (selftest::test_one_liner_labels): New test.
12938 (selftest::test_diagnostic_show_locus_one_liner): Call it.
12939 * diagnostic.c (diagnostic_initialize): Initialize
12940 context->show_labels_p.
12941 * diagnostic.h (struct diagnostic_context): Add field
12943 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
12944 -fno-diagnostics-show-labels.
12945 * dwarf2out.c (gen_producer_string): Add
12946 OPT_fdiagnostics_show_labels to the ignored options.
12947 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
12949 (gcc_rich_location::maybe_add_expr): Likewise.
12950 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
12951 label" param, defaulting to NULL.
12952 (gcc_rich_location::add_expr): Add "label" param.
12953 (gcc_rich_location::maybe_add_expr): Likewise.
12954 (class text_range_label): New class.
12955 (class range_label_for_type_mismatch): New class.
12956 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
12957 of format_warning_va.
12958 (fmtwarn_n): Likewise for new params of format_warning_n_va.
12959 * lto-wrapper.c (merge_and_complain): Add
12960 OPT_fdiagnostics_show_labels to the "pick one setting" options.
12961 (append_compiler_options): Likewise to the dropped options.
12962 (append_diag_options): Likewise to the passed-on options.
12963 * opts.c (common_handle_option): Handle the new option.
12964 * selftest-diagnostic.c
12965 (test_diagnostic_context::test_diagnostic_context): Enable
12967 * substring-locations.c: Include "gcc-rich-location.h".
12968 (format_warning_n_va): Add "fmt_label" and "param_label" params
12969 and use them as appropriate.
12970 (format_warning_va): Add "fmt_label" and "param_label" params,
12971 passing them on to format_warning_n_va.
12972 (format_warning_at_substring): Likewise.
12973 (format_warning_at_substring_n): Likewise.
12974 * substring-locations.h (format_warning_va): Add "fmt_label" and
12975 "param_label" params.
12976 (format_warning_n_va): Likewise.
12977 (format_warning_at_substring): Likewise.
12978 (format_warning_at_substring_n): Likewise.
12979 * toplev.c (general_init): Initialize global_dc->show_labels_p.
12981 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
12984 * builtins.c (expand_builtin_memcmp): Do not expand the call
12985 when overflow is detected.
12987 2018-08-15 Martin Sebor <msebor@redhat.com>
12989 PR tree-optimization/71625
12990 * config/aarch64/aarch64-builtins.c
12991 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
12993 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
12995 * config/s390/s390.c (s390_reorg): Remove loop.
12997 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
13000 (darwin_function_switched_text_sections): Delete.
13001 * gcc/config/darwin.h
13002 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
13004 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
13007 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
13008 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
13009 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
13011 2018-08-15 Martin Liska <mliska@suse.cz>
13013 PR tree-optimization/86925
13014 * predict.c (expr_expected_value_1): When taking
13015 later predictor, assign also probability.
13016 Use fold_build2_initializer_loc in order to fold
13017 the expression in -frounding-math.
13019 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
13021 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
13023 (expand_vec_perm_1): Try the new method.
13025 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
13028 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
13029 Check whether lra_live_max_point is 0 before dividing.
13031 2018-08-14 Martin Sebor <msebor@redhat.com>
13033 PR tree-optimization/86650
13034 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
13035 (vrp_prop::check_mem_ref): Same.
13037 2018-08-13 Liu Hao <lh_mouse@126.com>
13039 * pretty-print.c (eat_esc_sequence): Swap the foreground and
13040 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
13041 and clear it thereafter, as it only works for DBCS.
13043 2018-08-13 Liu Hao <lh_mouse@126.com>
13045 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
13046 handle returned by _get_osf_handle().
13048 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
13050 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
13051 for folding vec_perm.
13053 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
13055 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
13056 Add support for gimple-folding of vec_pack() and vec_unpack()
13059 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
13061 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
13062 vec_xst variants to the list.
13063 (rs6000_gimple_fold_builtin): Add support for folding unaligned
13064 vector loads and stores.
13066 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
13068 * config.gcc (rs6000-ibm-aix4.x): Delete.
13069 (rs6000-ibm-aix5.1): Delete.
13070 (rs6000-ibm-aix5.2): Delete.
13071 (rs6000-ibm-aix5.3): Delete.
13072 * config/rs6000/aix43.h: Delete.
13073 * config/rs6000/aix51.h: Delete.
13074 * config/rs6000/aix52.h: Delete.
13075 * config/rs6000/t-aix43: Delete.
13077 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
13079 * config/s390/s390.c (s390_decompose_constant_pool_ref):
13081 (s390_decompose_address): Factor out constant pool ref
13084 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13086 * config/nds32/nds32-predicates.c
13087 (nds32_can_use_bclr_p): Change return type as bool.
13088 (nds32_can_use_bset_p): Ditto.
13089 (nds32_can_use_btgl_p): Ditto.
13090 (nds32_can_use_bitci_p): Ditto.
13091 * config/nds32/nds32-protos.h
13092 (nds32_can_use_bclr_p): Change declaration.
13093 (nds32_can_use_bset_p): Ditto.
13094 (nds32_can_use_btgl_p): Ditto.
13095 (nds32_can_use_bitci_p): Ditto.
13097 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13099 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
13100 Support -msched-prolog-epilog option.
13101 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
13103 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13105 * common/config/nds32/nds32-common.c
13106 (nds32_option_optimization_table): Enalbe -malways-align.
13108 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
13110 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
13112 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
13113 OPT_misr_secure_ case.
13114 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
13115 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
13116 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
13118 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
13119 (nds32_isr_info): New field security_level.
13120 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
13121 * config/nds32/nds32.md (return_internal): Consider critical attribute.
13122 * config/nds32/nds32.opt (misr-secure): New option.
13123 * config/nds32/nds32_init.inc: New file.
13124 * config/nds32/nds32_isr.h: New file.
13126 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
13128 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
13129 Update comment for atomic instructions.
13130 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
13131 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
13133 (atomic_loaddi): Revise fence expansion to only emit fence prior to
13134 load for __ATOMIC_SEQ_CST model.
13135 (atomic_loaddi_1): Remove float register target.
13136 (atomic_storedi): Handle CONST_INT values.
13137 (atomic_storedi_1): Remove float register source. Add special case
13139 (memory_barrier): New expander and insn.
13141 2018-08-11 Jakub Jelinek <jakub@redhat.com>
13143 PR tree-optimization/86835
13144 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
13145 new_stmt after def_gsi, make sure to insert new_square_stmt after
13146 that stmt, not 2 stmts before it.
13148 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
13151 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
13154 2018-08-10 Martin Liska <mliska@suse.cz>
13157 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
13159 * builtins.c (expand_builtin_expect_with_probability):
13161 (expand_builtin_expect_with_probability): New function.
13162 (build_builtin_expect_predicate): Add new argumnet probability
13163 for BUILT_IN_EXPECT_WITH_PROBABILITY.
13164 (fold_builtin_expect):
13167 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
13168 * builtins.h (fold_builtin_expect): Set new argument.
13169 * doc/extend.texi: Document __builtin_expect_with_probability.
13170 * doc/invoke.texi: Likewise.
13171 * gimple-fold.c (gimple_fold_call): Pass new argument.
13172 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
13173 also BUILT_IN_EXPECT_WITH_PROBABILITY.
13174 * predict.c (get_predictor_value): New function.
13175 (expr_expected_value): Add new argument probability. Assume
13176 that predictor and probability are always non-null.
13177 (expr_expected_value_1): Likewise. For __builtin_expect and
13178 __builtin_expect_with_probability set probability. Handle
13179 combination in binary expressions.
13180 (tree_predict_by_opcode): Simplify code by simply calling
13181 get_predictor_value.
13182 (pass_strip_predict_hints::execute): Add handling of
13183 BUILT_IN_EXPECT_WITH_PROBABILITY.
13184 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
13186 * tree.h (DECL_BUILT_IN_P): New function.
13188 2018-08-10 Martin Liska <mliska@suse.cz>
13190 PR tree-optimization/85799
13191 * passes.def: Add argument for pass_strip_predict_hints.
13192 * predict.c (class pass_strip_predict_hints): Add new argument
13194 (strip_predictor_early): New function.
13195 (pass_strip_predict_hints::execute): Call the function to
13197 (strip_predict_hints): New function.
13198 * predict.def: Fix comment.
13200 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
13202 * Makefile.in: Clarify which tm.texi to copy over to assert the
13203 right to grant a GFDL license for all.
13205 2018-08-09 Jeff Law <law@redhat.com>
13207 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
13210 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
13212 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
13215 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
13217 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
13218 reductions for variable-length vectors.
13220 2018-08-09 David Malcolm <dmalcolm@redhat.com>
13223 * common.opt (fdiagnostics-show-line-numbers): New option.
13224 * diagnostic-show-locus.c (class layout): Add fields
13225 "m_show_line_numbers_p" and "m_linenum_width";
13226 (num_digits): New function.
13227 (test_num_digits): New function.
13228 (layout::layout): Initialize new fields. Update m_x_offset
13229 logic to handle any left margin.
13230 (layout::print_source_line): Print line number when requested.
13231 (layout::start_annotation_line): New member function.
13232 (layout::print_annotation_line): Call it.
13233 (layout::print_leading_fixits): Likewise.
13234 (layout::print_trailing_fixits): Likewise. Update calls to
13235 move_to_column for new parameter.
13236 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
13237 it to potentially call start_annotation_line.
13238 (layout::show_ruler): Call start_annotation_line.
13239 (selftest::test_line_numbers_multiline_range): New selftest.
13240 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
13241 and selftest::test_line_numbers_multiline_range.
13242 * diagnostic.c (diagnostic_initialize): Initialize
13243 show_line_numbers_p.
13244 * diagnostic.h (struct diagnostic_context): Add field
13245 "show_line_numbers_p".
13246 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
13247 -fno-diagnostics-show-line-numbers.
13248 * dwarf2out.c (gen_producer_string): Add
13249 OPT_fdiagnostics_show_line_numbers to the ignored options.
13250 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
13251 one setting" options.
13252 (append_compiler_options): Likewise to the dropped options.
13253 (append_diag_options): Likewise to the passed-on options.
13254 * opts.c (common_handle_option): Handle the new option.
13255 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
13257 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
13259 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
13260 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
13261 third argument of type "const signed char" to descriptions of
13262 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
13263 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
13264 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
13265 __builtin_bcdsub_ov functions.
13267 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
13269 PR tree-optimization/86858
13270 * tree-vect-loop.c (vect_is_simple_reduction): Restore
13271 flow_bb_inside_loop_p calls.
13273 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
13275 PR tree-optimization/86871
13276 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
13277 instead of gimple_assign_lhs.
13279 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
13282 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
13283 register constraint to operand 0.
13284 (add<mode>3_carryinC): Likewise.
13285 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
13287 2018-08-09 Martin Liska <mliska@suse.cz>
13290 * common.opt: Remove extra line.
13292 2018-08-09 Martin Liska <mliska@suse.cz>
13294 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
13295 at the end of a line, make first letter capital and end up
13296 a sentence with a dot.
13297 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
13298 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
13299 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
13300 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
13301 (PARAM_MAX_ISL_OPERATIONS): Likewise.
13302 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
13303 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
13304 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
13305 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
13306 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
13307 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
13308 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
13309 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
13310 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
13311 (PARAM_TREE_REASSOC_WIDTH): Likewise.
13312 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
13313 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
13314 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
13316 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
13319 * config/s390/s390.c (s390_option_override_internal): Reduce the
13320 stack-clash-protection-probe-interval param if it would be too big
13323 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
13326 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
13327 * config/m68k/m68k.c (handle_move_double): Don't call
13328 m68k_final_prescan_insn.
13329 (m68k_adjust_decorated_operand): Renamed from
13330 m68k_final_prescan_insn, remove first and third operand and
13332 (print_operand): Call it.
13333 (print_operand_address): Call it.
13335 2018-08-08 Nathan Sidwell <nathan@acm.org>
13337 * diagnostic.c (diagnostic_report_current_module): Use
13338 linemap_included_from & linemap_included_from_linemap.
13340 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
13342 * config/aarch64/aarch64-cores.def: Add phecda core.
13343 * config/aarch64/aarch64-tune.md: Regenerate.
13344 * doc/invoke.texi: Add phecda core.
13346 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
13349 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
13351 * config/s390/s390.md ("movti"): Add more alternatives for
13352 constant to GPR copies.
13354 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
13356 * config/s390/s390.c: Fix whitespace damage throughout the file.
13357 * config/s390/s390.h: Likewise.
13358 * config/s390/tpf.h: Likewise.
13360 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
13362 * config/s390/s390.c (s390_loadrelative_operand_p):
13363 Remove TARGET_CPU_ZARCH usages.
13364 (s390_rtx_costs): Likewise.
13365 (s390_legitimate_constant_p): Likewise.
13366 (s390_cannot_force_const_mem): Likewise.
13367 (legitimate_reload_constant_p): Likewise.
13368 (s390_preferred_reload_class): Likewise.
13369 (legitimize_pic_address): Likewise.
13370 (legitimize_tls_address): Likewise.
13371 (s390_split_branches): Removed.
13372 (s390_add_execute): Removed.
13373 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
13374 (s390_mainpool_start): Likewise.
13375 (s390_mainpool_finish): Likewise.
13376 (s390_mainpool_cancel): Removed.
13377 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
13378 (s390_chunkify_cancel): Likewise.
13379 (s390_return_addr_rtx): Likewise.
13380 (s390_register_info): Remove split_branches_pending_p uages.
13381 (s390_optimize_register_info): Likewise.
13382 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
13383 split_branches_pending_p usages.
13384 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
13385 (s390_load_got): Likewise.
13386 (s390_expand_split_stack_prologue): Likewise.
13387 (output_asm_nops): Likewise.
13388 (s390_function_profiler): Likewise.
13389 (s390_emit_call): Likewise.
13390 (s390_conditional_register_usage): Likewise.
13391 (s390_optimize_prologue): Likewise.
13392 (s390_reorg): Remove TARGET_CPU_ZARCH and
13393 split_branches_pending_p usages.
13394 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
13396 (s390_output_indirect_thunk_function): Likewise.
13397 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
13398 (TARGET_CPU_ZARCH_P): Removed.
13399 (struct machine_function): Remove split_branches_pending_p.
13400 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
13402 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
13404 * common/config/s390/s390-common.c (processor_flags_table):
13406 * config.gcc: Remove with_arch/with_tune support.
13407 * config/s390/2064.md: Remove cpu attribute comparisons.
13408 * config/s390/driver-native.c (s390_host_detect_local_cpu):
13410 * config/s390/linux.h (ASM_SPEC):
13411 Remove -march support.
13412 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
13413 Use a table to get an arch level.
13414 * config/s390/s390-opts.h (enum processor_type):
13415 Remove enum values.
13416 * config/s390/s390.c
13417 (processor_table): Remove entries, add arch_level values.
13418 (s390_issue_rate): Remove cases.
13419 (s390_option_override): Adjust
13420 s390_option_override_internal() call.
13421 (s390_option_override_internal): Remove deprecation warning.
13422 (s390_valid_target_attribute_tree): Adjust
13423 s390_option_override_internal() call.
13424 * config/s390/s390.h (struct s390_processor):
13425 Share with s390-c.c, add arch_level field.
13426 * config/s390/s390.md:
13427 Remove occurrences in cpu attribute.
13428 * config/s390/s390.opt: Remove -march/-mtune support.
13429 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
13430 * doc/invoke.texi: Remove deprecation warning.
13432 2018-08-08 Luis Machado <luis.machado@linaro.org>
13434 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
13436 (qdf24xx_tunings): Set vector cost structure to
13437 qdf24xx_vector_cost.
13439 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
13440 <register_sextend>: Set to 3.
13442 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
13445 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
13446 * config/aarch64/aarch64-simd.md
13447 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
13448 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
13449 (aarch64_frecpx<mode>): ...this new pattern.
13450 * config/aarch64/aarch64-simd-builtins.def: Remove comment
13451 about aarch64_frecp<FRECP:frecp_suffix><mode>.
13453 2018-08-07 Martin Liska <mliska@suse.cz>
13455 PR middle-end/83023
13456 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
13457 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
13458 * predict.def (PRED_MALLOC_NONNULL): New predictor.
13459 * doc/extend.texi: Document that malloc attribute adds
13462 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
13465 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13466 Define to speculation_safe_value_not_needed.
13468 2018-08-06 Jeff Law <law@redhat.com>
13470 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
13471 the vr_values instance to cprop_into_stmt.
13472 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
13473 (cprop_operand): Also query EVRP to determine if OP is a constant.
13475 2018-08-06 Nathan Sidwell <nathan@acm.org>
13477 * diagnostic.c (diagnostic_report_current_module): Reroll
13478 included-at loop. Translate text.
13480 2018-08-06 David Malcolm <dmalcolm@redhat.com>
13482 * function-tests.c (selftest::test_expansion_to_rtl): Call
13483 free_after_compilation.
13485 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13487 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
13489 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
13491 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
13492 loops with memory block operations from getting unrolled.
13494 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
13497 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13498 Define to speculation_safe_value_not_needed.
13500 2018-08-06 Jeff Law <law@redhat.com>
13502 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
13505 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13508 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
13509 with all enabled __intN types.
13511 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
13513 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13515 * alias.c (record_set): Check for clobber high.
13516 * cfgexpand.c (expand_gimple_stmt): Likewise.
13517 * combine-stack-adj.c (single_set_for_csa): Likewise.
13518 * combine.c (find_single_use_1): Likewise.
13519 (set_nonzero_bits_and_sign_copies): Likewise.
13520 (get_combine_src_dest): Likewise.
13521 (is_parallel_of_n_reg_sets): Likewise.
13522 (try_combine): Likewise.
13523 (record_dead_and_set_regs_1): Likewise.
13524 (reg_dead_at_p_1): Likewise.
13525 (reg_dead_at_p): Likewise.
13526 * dce.c (deletable_insn_p): Likewise.
13527 (mark_nonreg_stores_1): Likewise.
13528 (mark_nonreg_stores_2): Likewise.
13529 * df-scan.c (df_find_hard_reg_defs): Likewise.
13530 (df_uses_record): Likewise.
13531 (df_get_call_refs): Likewise.
13532 * dwarf2out.c (mem_loc_descriptor): Likewise.
13533 * haifa-sched.c (haifa_classify_rtx): Likewise.
13534 * ira-build.c (create_insn_allocnos): Likewise.
13535 * ira-costs.c (scan_one_insn): Likewise.
13536 * ira.c (equiv_init_movable_p): Likewise.
13537 (rtx_moveable_p): Likewise.
13538 (interesting_dest_for_shprep): Likewise.
13539 * jump.c (mark_jump_label_1): Likewise.
13540 * postreload-gcse.c (record_opr_changes): Likewise.
13541 * postreload.c (reload_cse_simplify): Likewise.
13542 (struct reg_use): Add source expr.
13543 (reload_combine): Check for clobber high.
13544 (reload_combine_note_use): Likewise.
13545 (reload_cse_move2add): Likewise.
13546 (move2add_note_store): Likewise.
13547 * print-rtl.c (print_pattern): Likewise.
13548 * recog.c (decode_asm_operands): Likewise.
13549 (store_data_bypass_p): Likewise.
13550 (if_test_bypass_p): Likewise.
13551 * regcprop.c (kill_clobbered_value): Likewise.
13552 (kill_set_value): Likewise.
13553 * reginfo.c (reg_scan_mark_refs): Likewise.
13554 * reload1.c (maybe_fix_stack_asms): Likewise.
13555 (eliminate_regs_1): Likewise.
13556 (elimination_effects): Likewise.
13557 (mark_not_eliminable): Likewise.
13558 (scan_paradoxical_subregs): Likewise.
13559 (forget_old_reloads_1): Likewise.
13560 * reorg.c (find_end_label): Likewise.
13561 (try_merge_delay_insns): Likewise.
13562 (redundant_insn): Likewise.
13563 (own_thread_p): Likewise.
13564 (fill_simple_delay_slots): Likewise.
13565 (fill_slots_from_thread): Likewise.
13566 (dbr_schedule): Likewise.
13567 * resource.c (update_live_status): Likewise.
13568 (mark_referenced_resources): Likewise.
13569 (mark_set_resources): Likewise.
13570 * rtl.c (copy_rtx): Likewise.
13571 * rtlanal.c (reg_referenced_p): Likewise.
13572 (single_set_2): Likewise.
13573 (noop_move_p): Likewise.
13574 (note_stores): Likewise.
13575 * sched-deps.c (sched_analyze_reg): Likewise.
13576 (sched_analyze_insn): Likewise.
13578 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13580 * cse.c (invalidate_reg): New function extracted from...
13581 (invalidate): ...here.
13582 (canonicalize_insn): Check for clobber high.
13583 (invalidate_from_clobbers): invalidate clobber highs.
13584 (invalidate_from_sets_and_clobbers): Likewise.
13585 (count_reg_usage): Check for clobber high.
13586 (insn_live_p): Likewise.
13587 * cselib.c (cselib_expand_value_rtx_1):Likewise.
13588 (cselib_invalidate_regno): Check for clobber in setter.
13589 (cselib_invalidate_rtx): Pass through setter.
13590 (cselib_invalidate_rtx_note_stores):
13591 (cselib_process_insn): Check for clobber high.
13592 * cselib.h (cselib_invalidate_rtx): Add operand.
13594 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13596 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
13597 (mark_not_eliminable): Likewise.
13598 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
13599 * lra-lives.c (process_bb_lives): Check for clobber high.
13600 * lra.c (new_insn_reg): Remember clobber highs.
13601 (collect_non_operand_hard_regs): Check for clobber high.
13602 (lra_set_insn_recog_data): Likewise.
13603 (add_regs_to_insn_regno_info): Likewise.
13604 (lra_update_insn_regno_info): Likewise.
13606 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13608 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
13609 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
13611 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13613 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
13614 (copy_insn_1): Likewise.
13615 (gen_hard_reg_clobber_high): New gen function.
13616 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
13617 * genemit.c (gen_exp): Likewise.
13618 (gen_emit_seq): Pass through info.
13619 (gen_insn): Check for CLOBBER_HIGH.
13620 (gen_expand): Pass through info.
13621 (gen_split): Likewise.
13622 (output_add_clobbers): Likewise.
13623 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
13624 (remove_clobbers): Likewise.
13625 * rtl.h (gen_hard_reg_clobber_high): New declaration.
13627 2018-08-06 Alan Hayward <alan.hayward@arm.com>
13629 * doc/rtl.texi (clobber_high): Add.
13630 (parallel): Add in clobber high
13631 * rtl.c (rtl_check_failed_code3): Add function.
13632 * rtl.def (CLOBBER_HIGH): Add expression.
13633 * rtl.h (RTL_CHECKC3): Add macro.
13634 (rtl_check_failed_code3): Add declaration.
13635 (XC3EXP): Add macro.
13637 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
13640 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
13641 cfun->machine->max_used_stack_alignment if needed.
13643 2018-08-04 Martin Sebor <msebor@redhat.com>
13645 PR tree-optimization/86571
13646 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
13649 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
13652 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13655 2018-08-03 Jeff Law <law@redhat.com>
13658 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13659 Define to speculation_safe_value_not_needed.
13661 2018-08-03 David Malcolm <dmalcolm@redhat.com>
13663 * doc/gcov.texi (-x): Remove duplicate "to".
13664 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
13665 (-Wif-not-aligned): Remove duplicate "is".
13666 (-flto): Remove duplicate "the".
13667 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
13668 duplicate "v5.00.b".
13669 (MSP430 Options): Remove duplicate "and" from the description
13670 of "-mgprel-sec=regexp".
13671 (x86 Options): Remove duplicate copies of "vmldLog102" and
13672 vmlsLog104 from description of "-mveclibabi=type".
13674 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
13676 * internal-fn.h (first_commutative_argument): Declare.
13677 * internal-fn.c (first_commutative_argument): New function.
13678 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
13679 restrictions for pattern statements. Use first_commutative_argument
13680 to look for commutative operands in calls to internal functions.
13682 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
13684 * Makefile.in (wide-int-range.o): New.
13685 * tree-vrp.c: Move all the wide_int_* functions to...
13686 * wide-int-range.cc: ...here.
13687 * tree-vrp.h: Move all the wide_int_* prototypes to...
13688 * wide-int-range.h: ...here.
13690 2018-08-03 Tom de Vries <tdevries@suse.de>
13692 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
13694 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
13695 * except.c (output_function_exception_table): Do early exit if
13696 targetm_common.except_unwind_info (&global_options) == UI_NONE.
13698 2018-08-03 Martin Liska <mliska@suse.cz>
13700 * predict.c (dump_prediction): Change to 2 digits
13703 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
13705 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
13707 (falkor_am_1_gtov_gtov): ... a new insn reservation.
13709 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
13711 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
13712 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
13713 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
13714 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
13715 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
13717 2018-08-02 David Malcolm <dmalcolm@redhat.com>
13719 * diagnostic-show-locus.c (diagnostic_show_locus): Use
13720 pp_take_prefix when saving the existing prefix.
13721 * diagnostic.c (diagnostic_append_note): Likewise.
13722 * langhooks.c (lhd_print_error_function): Likewise.
13723 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
13724 param's type. Free the existing prefix.
13725 (pp_take_prefix): New function.
13726 (pretty_printer::pretty_printer): Drop the prefix parameter.
13727 Rename the length parameter to match the comment.
13728 (pretty_printer::~pretty_printer): Free the prefix.
13729 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
13731 (struct pretty_printer): Drop the "const" from "prefix" field's
13732 type and clarify memory management.
13733 (pp_set_prefix): Drop the "const" from the 2nd param.
13734 (pp_take_prefix): New decl.
13736 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
13738 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
13739 for word_mode_ok here instead of passing as argument.
13740 (expand_block_compare): Change select_block_compare_mode() call.
13741 (expand_strncmp_gpr_sequence): New function.
13742 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
13744 2018-08-02 Jeff Law <law@redhat.com>
13747 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13748 Define to speculation_safe_value_not_needed.
13751 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13752 Define to speculation_safe_value_not_needed.
13754 2018-08-02 Tom de Vries <tdevries@suse.de>
13757 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
13758 function. Return UI_TARGET unconditionally.
13759 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
13760 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
13762 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
13764 * genemit.c (print_overload_test): Fix typo.
13766 2018-08-02 Richard Biener <rguenther@suse.de>
13768 PR tree-optimization/86816
13769 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
13770 which checks for value availability before querying it.
13771 (gvn_uses_equal): Use it.
13772 (same_succ_hash): Likewise.
13773 (gimple_equal_p): Likewise.
13775 2018-08-02 Nick Clifton <nickc@redhat.com>
13778 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13779 Define to speculation_safe_value_not_needed.
13782 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13783 Define to speculation_safe_value_not_needed.
13786 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13787 Define to speculation_safe_value_not_needed.
13790 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13791 Define to speculation_safe_value_not_needed.
13794 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13795 Define to speculation_safe_value_not_needed.
13798 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13799 Define to speculation_safe_value_not_needed.
13802 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13803 Define to speculation_safe_value_not_needed.
13806 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
13807 Define to speculation_safe_value_not_needed.
13810 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
13811 speculation_safe_value_not_needed.
13814 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
13815 to speculation_safe_value_not_needed.
13817 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
13819 * doc/md.texi: Expand the documentation of instruction names
13820 to mention port-local uses. Document '@' in pattern names.
13821 * read-md.h (overloaded_instance, overloaded_name): New structs.
13822 (mapping): Declare.
13823 (md_reader::handle_overloaded_name): New member function.
13824 (md_reader::get_overloads): Likewise.
13825 (md_reader::m_first_overload): New member variable.
13826 (md_reader::m_next_overload_ptr): Likewise.
13827 (md_reader::m_overloads_htab): Likewise.
13828 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
13829 m_next_overload_ptr and m_overloads_htab.
13830 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
13831 (get_mode_token, get_code_token, get_int_token): New functions.
13832 (map_attr_string): Add an optional argument that passes back
13833 the associated iterator.
13834 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
13835 (md_reader::handle_overloaded_name, add_overload_instance): New
13837 (apply_iterators): Handle '@' names. Report an error if '@'
13838 is used without iterators.
13839 (initialize_iterators): Initialize the new iterator_group fields.
13840 * genopinit.c (handle_overloaded_code_for)
13841 (handle_overloaded_gen): New functions.
13842 (main): Use them to print declarations of maybe_code_for_* and
13843 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
13844 * genemit.c (print_overload_arguments, print_overload_test)
13845 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
13846 (main): Use it to print definitions of maybe_code_for_* and
13847 maybe_gen_* functions.
13848 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
13849 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
13850 instead of explicit mode checks.
13851 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
13852 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
13853 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
13854 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
13855 (aarch64_expand_compare_and_swap): Likewise
13856 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
13857 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
13858 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
13859 (aarch64_constant_pool_reload_icode): Delete.
13860 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
13861 instead of aarch64_constant_pool_reload_icode. Use
13862 code_for_aarch64_reload_mov instead of explicit mode checks.
13863 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
13864 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
13865 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
13866 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
13867 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
13868 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
13869 (aarch64_atomic_load_op_code): Delete.
13870 (aarch64_emit_atomic_load_op): Likewise.
13871 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
13872 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
13873 instead of aarch64_emit_atomic_load_op.
13874 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
13875 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
13876 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
13877 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
13878 character before the pattern name.
13879 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
13880 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
13881 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
13882 (aarch64_frecps<mode>): Likewise.
13883 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
13884 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
13885 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
13886 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
13887 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
13889 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
13891 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
13892 Allow HFmode constants if TARGET_FP_F16INST.
13894 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
13897 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
13898 No longer check last store for clobber of address register.
13900 2018-08-02 Martin Liska <mliska@suse.cz>
13902 PR gcov-profile/86817
13903 * gcov.c (process_all_functions): New function.
13905 (process_file): Move functions processing to
13906 process_all_functions.
13908 2018-08-02 David Malcolm <dmalcolm@redhat.com>
13910 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
13911 "const" to the "gimple *" and "rtx_insn *" parameters.
13912 * dumpfile.h (dump_user_location_t::dump_user_location_t):
13914 (dump_location_t::dump_location_t): Likewise.
13916 2018-08-01 Martin Sebor <msebor@redhat.com>
13918 PR tree-optimization/86650
13919 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
13920 rather than a "gcall *". Directly pass the data of interest
13921 to percent_K_format, rather than building a temporary CALL_EXPR
13923 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
13924 (gimple_fold_builtin_strncat): Adjust.
13925 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
13926 gcall* argument with gimple*.
13927 * gimple-ssa-warn-restrict.c (check_call): Same.
13928 (wrestrict_dom_walker::before_dom_children): Same.
13929 (builtin_access::builtin_access): Same.
13930 (check_bounds_or_overlap): Same
13931 (maybe_diag_overlap): Same.
13932 (maybe_diag_offset_bounds): Same.
13933 * tree-diagnostic.c (default_tree_printer): Move usage of
13934 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
13936 * tree-pretty-print.c (percent_K_format): Add argument.
13937 * tree-pretty-print.h: Add argument.
13938 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
13939 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
13940 (maybe_diag_stxncpy_trunc): Same.
13941 (handle_builtin_stxncpy): Same.
13942 (handle_builtin_strcat): Same.
13944 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
13946 * match.pd: Optimise pointer range checks.
13948 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
13950 PR tree-optimization/86758
13951 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
13952 to remove pattern statements.
13954 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
13956 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
13957 result of dfs_enumerate_from when constructing stmt_vec_infos,
13958 instead of additionally calling get_loop_body.
13960 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
13962 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
13964 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
13965 When creating an iv, assert that the step is not known to be zero.
13966 (vect_setup_realignment): Update call accordingly.
13967 * tree-vect-stmts.c (vectorizable_store): Likewise.
13968 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
13970 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
13972 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
13973 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
13974 (vectorizable_reduction): Likewise.
13975 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13976 (vect_detect_hybrid_slp_stmts): Likewise.
13977 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13979 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
13981 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
13982 (wide_int_set_zero_nonzero_bits): ...this.
13983 (zero_nonzero_bits_from_vr): Rename to...
13984 (vrp_set_zero_nonzero_bits): ...this.
13985 (extract_range_from_multiplicative_op_1): Abstract wide int
13987 (wide_int_range_multiplicative_op): ...here.
13988 (extract_range_from_binary_expr_1): Extract wide int binary
13989 operations into their own functions.
13990 (wide_int_range_lshift): New.
13991 (wide_int_range_can_optimize_bit_op): New.
13992 (wide_int_range_shift_undefined_p): New.
13993 (wide_int_range_bit_xor): New.
13994 (wide_int_range_bit_ior): New.
13995 (wide_int_range_bit_and): New.
13996 (wide_int_range_trunc_mod): New.
13997 (extract_range_into_wide_ints): New.
13998 (vrp_shift_undefined_p): New.
13999 (extract_range_from_multiplicative_op): New.
14000 (vrp_can_optimize_bit_op): New.
14001 * tree-vrp.h (value_range::dump): New.
14002 (wide_int_range_multiplicative_op): New.
14003 (wide_int_range_lshift):New.
14004 (wide_int_range_shift_undefined_p): New.
14005 (wide_int_range_bit_xor): New.
14006 (wide_int_range_bit_ior): New.
14007 (wide_int_range_bit_and): New.
14008 (wide_int_range_trunc_mod): New.
14009 (zero_nonzero_bits_from_bounds): Rename to...
14010 (wide_int_set_zero_nonzero_bits): ...this.
14011 (zero_nonzero_bits_from_vr): Rename to...
14012 (vrp_set_zero_nonzero_bits): ...this.
14013 (range_easy_mask_min_max): Rename to...
14014 (wide_int_range_can_optimize_bit_op): this.
14015 * vr-values.c (simplify_bit_ops_using_ranges): Rename
14016 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
14018 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14020 * tree-vectorizer.h (vect_orig_stmt): New function.
14021 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
14022 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
14023 (vect_create_epilog_for_reduction): Likewise.
14024 (vectorizable_live_operation): Likewise.
14025 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
14026 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
14027 * tree-vect-stmts.c (vectorizable_call): Likewise.
14028 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
14030 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14032 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
14034 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
14035 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
14036 (vect_transform_loop): Likewise.
14037 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
14039 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14041 * tree-vectorizer.h (vect_schedule_slp): Return void.
14042 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
14043 (vect_schedule_slp): Likewise.
14045 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14047 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
14049 (vect_transform_loop): Update calls accordingly. Schedule SLP
14050 instances before the main loop, if any exist.
14052 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
14054 PR tree-optimization/86749
14055 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
14056 If the lhs is used in a COND_EXPR, check that it is being used
14057 as the "then" or "else" value.
14059 2018-08-01 Tom de Vries <tdevries@suse.de>
14062 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
14063 speculation_safe_value_not_needed.
14065 2018-08-01 Richard Biener <rguenther@suse.de>
14067 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
14068 as base and offset.
14070 2018-08-01 Martin Liska <mliska@suse.cz>
14072 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
14073 format how successful transformation is dumped.
14074 (gimple_mod_pow2_value_transform): Likewise.
14075 (gimple_mod_subtract_transform): Likewise.
14076 (gimple_stringops_transform): Likewise.
14078 2018-08-01 Martin Liska <mliska@suse.cz>
14080 PR value-prof/35543
14081 * value-prof.c (interesting_stringop_to_profile_p):
14082 Simplify the code and add BUILT_IN_MEMMOVE.
14083 (gimple_stringops_transform): Likewise.
14085 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
14087 * config/aarch64/aarch64-simd.md
14088 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
14089 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
14090 use GPI iterator instead of SI mode.
14092 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
14094 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
14095 rs6000_speculation_barrier.
14096 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
14097 new barrier pattern name.
14099 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
14101 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
14102 (speculation_barrier): New insn.
14104 2018-08-01 Richard Biener <rguenther@suse.de>
14107 * graphite.h: Include isl/id.h and isl/space.h to allow build
14110 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
14113 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14114 mode for COFF targets.
14115 * defaults.h (TARGET_COFF): Define.
14116 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
14117 TARGET_COFF): Define.
14118 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
14119 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
14120 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
14122 2018-07-31 Alexandre Oliva <oliva@adacore.com>
14124 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
14125 * gimple-streamer-out.c (output_bb): Save it.
14126 * lto-streamer-in.c (input_struct_function_base): Restore
14127 instance discriminator if available. Create map on demand.
14128 * lto-streamer-out.c (output_struct_function_base): Save it if
14130 * final.c (decl_to_instance_map): Document LTO strategy.
14132 2018-07-31 Alexandre Oliva <oliva@adacore.com>
14133 Olivier Hainque <hainque@adacore.com>
14135 * debug.h (decl_to_instance_map_t): New type.
14136 (decl_to_instance_map): Declare.
14137 (maybe_create_decl_to_instance_map): New inline function.
14138 * final.c (bb_discriminator, last_bb_discriminator): New statics,
14139 to track basic block discriminators.
14140 (final_start_function_1): Initialize them.
14141 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
14143 (decl_to_instance_map): New variable.
14144 (map_decl_to_instance, maybe_set_discriminator): New functions.
14145 (notice_source_line): Set discriminator.
14147 2018-07-31 Ian Lance Taylor <iant@golang.org>
14149 * targhooks.c (default_have_speculation_safe_value): Add
14152 2018-07-31 David Malcolm <dmalcolm@redhat.com>
14154 * dump-context.h: Include "pretty-print.h".
14155 (dump_context::refresh_dumps_are_enabled): New decl.
14156 (dump_context::emit_item): New decl.
14157 (class dump_context): Add fields "m_test_pp" and
14159 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
14160 (temp_dump_context::get_dumped_text): New decl.
14161 (class temp_dump_context): Add field "m_pp".
14162 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
14163 (dump_context::refresh_dumps_are_enabled): ...and add a test for
14165 (set_dump_file): Update for above change.
14166 (set_alt_dump_file): Likewise.
14167 (dump_loc): New overload, taking a pretty_printer *.
14168 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
14169 to any test pretty-printer.
14170 (make_item_for_dump_gimple_stmt): New function, adapted from
14171 optinfo::add_gimple_stmt.
14172 (dump_context::dump_gimple_stmt): Call it, and use the result,
14173 eliminating the direct usage of dump_file and alt_dump_file in
14174 favor of indirectly using them via emit_item.
14175 (make_item_for_dump_gimple_expr): New function, adapted from
14176 optinfo::add_gimple_expr.
14177 (dump_context::dump_gimple_expr): Call it, and use the result,
14178 eliminating the direct usage of dump_file and alt_dump_file in
14179 favor of indirectly using them via emit_item.
14180 (make_item_for_dump_generic_expr): New function, adapted from
14182 (dump_context::dump_generic_expr): Call it, and use the result,
14183 eliminating the direct usage of dump_file and alt_dump_file in
14184 favor of indirectly using them via emit_item.
14185 (make_item_for_dump_printf_va): New function, adapted from
14186 optinfo::add_printf_va.
14187 (make_item_for_dump_printf): New function.
14188 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
14189 and use the result, eliminating the direct usage of dump_file and
14190 alt_dump_file in favor of indirectly using them via emit_item.
14191 (make_item_for_dump_dec): New function.
14192 (dump_context::dump_dec): Call it, and use the result,
14193 eliminating the direct usage of dump_file and alt_dump_file in
14194 favor of indirectly using them via emit_item.
14195 (make_item_for_dump_symtab_node): New function, adapted from
14196 optinfo::add_symtab_node.
14197 (dump_context::dump_symtab_node): Call it, and use the result,
14198 eliminating the direct usage of dump_file and alt_dump_file in
14199 favor of indirectly using them via emit_item.
14200 (dump_context::begin_scope): Reimplement, avoiding direct usage
14201 of dump_file and alt_dump_file in favor of indirectly using them
14203 (dump_context::emit_item): New member function.
14204 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
14205 Set up test pretty-printer on the underlying context. Call
14206 refresh_dumps_are_enabled.
14207 (temp_dump_context::~temp_dump_context): Call
14208 refresh_dumps_are_enabled.
14209 (temp_dump_context::get_dumped_text): New member function.
14210 (selftest::verify_dumped_text): New function.
14211 (ASSERT_DUMPED_TEXT_EQ): New macro.
14212 (selftest::test_capture_of_dump_calls): Run all tests twice, with
14213 and then without optinfo enabled. Add uses of
14214 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
14215 * dumpfile.h: Update comment for the dump_* API.
14216 * optinfo-emit-json.cc
14217 (selftest::test_building_json_from_dump_calls): Update for new
14218 param for temp_dump_context ctor.
14219 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
14220 and "m_owned" field.
14221 (optinfo_item::~optinfo_item): Likewise.
14222 (optinfo::add_item): New member function.
14223 (optinfo::emit): Update comment.
14224 (optinfo::add_string): Delete.
14225 (optinfo::add_printf): Delete.
14226 (optinfo::add_printf_va): Delete.
14227 (optinfo::add_gimple_stmt): Delete.
14228 (optinfo::add_gimple_expr): Delete.
14229 (optinfo::add_tree): Delete.
14230 (optinfo::add_symtab_node): Delete.
14231 (optinfo::add_dec): Delete.
14232 * optinfo.h (class dump_context): New forward decl.
14233 (optinfo::add_item): New decl.
14234 (optinfo::add_string): Delete.
14235 (optinfo::add_printf): Delete.
14236 (optinfo::add_printf_va): Delete.
14237 (optinfo::add_gimple_stmt): Delete.
14238 (optinfo::add_gimple_expr): Delete.
14239 (optinfo::add_tree): Delete.
14240 (optinfo::add_symtab_node): Delete.
14241 (optinfo::add_dec): Delete.
14242 (optinfo::add_poly_int): Delete.
14243 (optinfo_item::optinfo_item): Remove "owned" param.
14244 (class optinfo_item): Remove field "m_owned".
14246 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14248 PR middle-end/86705
14249 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
14250 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
14251 requested variable alignment.
14252 (expand_one_ssa_partition): Likewise.
14253 (expand_one_var): Likewise.
14255 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14257 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
14258 to speculation_safe_value_not_needed.
14260 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14262 * targhooks.h (speculation_safe_value_not_needed): New prototype.
14263 * targhooks.c (speculation_safe_value_not_needed): New function.
14264 * target.def (have_speculation_safe_value): Update documentation.
14265 * doc/tm.texi: Regenerated.
14267 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14269 * config/aarch64/iterators.md (ALLI_TI): New iterator.
14270 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
14272 (despeculate_copy<ALLI:mode>_insn): New insn.
14273 (despeculate_copyti_insn): New insn.
14274 (despeculate_simple<ALLI:mode>): New insn
14275 (despeculate_simpleti): New insn.
14276 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
14278 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
14279 aarch64_speculation_safe_value.
14280 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
14282 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14284 * config/aarch64/aarch64-speculation.cc: New file.
14285 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
14286 before pass_reorder_blocks.
14287 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
14289 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
14290 X14 and X15 when tracking speculation.
14291 * config/aarch64/aarch64.md (register name constants): Add
14292 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
14293 (unspec): Add UNSPEC_SPECULATION_TRACKER.
14294 (speculation_barrier): New insn attribute.
14295 (cmp<mode>): Allow SP in comparisons.
14296 (speculation_tracker): New insn.
14297 (speculation_barrier): Add speculation_barrier attribute.
14298 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
14299 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
14300 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
14302 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14304 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
14305 aarch64_track_speculation is true.
14306 (tb<optab><mode>1): Likewise.
14307 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
14308 generate CB[N]Z when tracking speculation.
14309 (aarch64_split_compare_and_swap): Likewise.
14310 (aarch64_split_atomic_op): Likewise.
14312 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14314 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
14316 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14318 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
14319 (speculation_barrier): New insn.
14321 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14323 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
14324 * config/arm/arm.md (speculation_barrier): New expand.
14325 (speculation_barrier_insn): New pattern.
14327 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
14329 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
14330 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
14331 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
14332 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
14334 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
14335 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
14336 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
14337 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
14338 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
14339 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
14340 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
14341 * builtins.c (expand_speculation_safe_value): New function.
14342 (expand_builtin): Call it.
14343 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
14344 * doc/extend.texi: Document __builtin_speculation_safe_value.
14345 * doc/md.texi: Document "speculation_barrier" pattern.
14346 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
14347 TARGET_HAVE_SPECULATION_SAFE_VALUE.
14348 * doc/tm.texi: Regenerated.
14349 * target.def (have_speculation_safe_value, speculation_safe_value): New
14351 * targhooks.c (default_have_speculation_safe_value): New function.
14352 (default_speculation_safe_value): New function.
14353 * targhooks.h (default_have_speculation_safe_value): Add prototype.
14354 (default_speculation_safe_value): Add prototype.
14356 2018-07-31 David Malcolm <dmalcolm@redhat.com>
14358 * dump-context.h (dump_context::dump_loc): New decl.
14359 * dumpfile.c (dump_context::dump_loc): New member function.
14360 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
14361 and dump_gimple_stmt.
14362 (dump_context::dump_gimple_expr_loc): Likewise, using
14364 (dump_context::dump_generic_expr_loc): Likewise, using
14366 (dump_context::dump_printf_loc_va): Likewise, using
14368 (dump_context::begin_scope): Explicitly using the global function
14369 "dump_loc", rather than the member function.
14371 2018-07-31 Martin Sebor <msebor@redhat.com>
14373 PR tree-optimization/86741
14374 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
14376 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
14378 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
14379 depend on whether prefetch instructions will be emitted or not.
14380 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
14381 will be emitted or not.
14382 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
14383 (TARGET_SETMEM_PFD): New macros.
14385 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14387 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
14388 (NULL_STMT_VEC_INFO): Delete.
14389 (stmt_vec_info::operator*): Likewise.
14390 (stmt_vec_info::operator gimple *): Likewise.
14391 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
14392 of NULL_STMT_VEC_INFO.
14393 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
14394 (vect_reassociating_reduction_p): Likewise.
14395 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
14396 (vectorizable_store): Likewise.
14397 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
14398 (vec_info::free_stmt_vec_infos): Likewise.
14400 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14402 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
14403 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
14405 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14407 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
14408 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
14409 (vec_info::free_stmt_vec_info): New private member functions.
14410 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
14411 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
14412 * tree-parloops.c (gather_scalar_reductions): Remove calls to
14413 set_stmt_vec_info_vec and free_stmt_vec_infos.
14414 * tree-vect-loop.c (_loop_vec_info): Remove call to
14415 set_stmt_vec_info_vec.
14416 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
14417 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
14418 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
14419 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
14420 (vec_info::free_stmt_vec_info): ...these new functions. Remove
14421 assignments in {vec_info::,}new_stmt_vec_info that are redundant
14422 with the clearing in the xcalloc.
14423 (stmt_vec_info_vec): Delete.
14424 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
14425 (vectorize_loops): Likewise.
14426 (vec_info::~vec_info): Remove argument from call to
14427 free_stmt_vec_infos.
14428 (vec_info::add_stmt): Remove vinfo argument from call to
14431 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14433 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
14434 rather than a gimple stmt.
14435 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
14436 information for pattern statements when passed the original
14437 statement; instead wait to be passed the pattern statement itself.
14438 Don't call set_vinfo_for_stmt here.
14439 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
14440 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
14441 stmt_vec_infos here.
14442 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
14443 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
14444 stmt_vec_infos entry.
14446 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14448 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
14449 * tree-vectorizer.c (vec_info::replace_stmt): New function.
14450 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
14451 * tree-vect-stmts.c (vectorizable_call): Likewise.
14452 (vectorizable_simd_clone_call): Likewise.
14454 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14456 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
14457 * tree-vectorizer.c (vec_info::remove_stmt): New function.
14458 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
14459 * tree-vect-loop.c (vect_transform_loop): Likewise.
14460 * tree-vect-slp.c (vect_schedule_slp): Likewise.
14461 * tree-vect-stmts.c (vect_remove_stores): Likewise.
14463 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14465 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
14466 (vect_dr_stmt): Delete.
14467 * tree-vectorizer.c (vec_info::lookup_dr): New function.
14468 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
14470 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
14471 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
14472 (vect_verify_datarefs_alignment, vect_peeling_supportable)
14473 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
14474 (vect_analyze_data_refs): Likewise.
14475 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
14477 (vect_find_same_alignment_drs): Likewise.
14478 (vect_slp_analyze_node_dependences): Update calls accordingly.
14479 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
14480 instead of DR_VECT_AUX.
14481 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
14482 of a vector data references. Use vec_info::lookup_dr instead of
14484 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
14485 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
14486 instead of DR_VECT_AUX.
14488 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14490 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
14492 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
14494 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14495 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14496 (vect_gen_prolog_loop_niters): Likewise.
14498 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14500 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
14501 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
14502 (vect_known_alignment_in_bytes, vect_dr_behavior)
14503 (vect_get_scalar_dr_size): Take references as dr_vec_infos
14504 instead of data_references. Update calls to other routines for
14505 which the same change has been made.
14506 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
14507 dr_vec_infos instead of stmt_vec_infos.
14508 (vect_analyze_data_ref_dependence): Update call accordingly.
14509 (vect_slp_analyze_data_ref_dependence)
14510 (vect_record_base_alignments): Use DR_VECT_AUX.
14511 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
14512 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
14513 (vector_alignment_reachable_p, vect_get_data_access_cost)
14514 (vect_peeling_supportable, vect_analyze_group_access_1)
14515 (vect_analyze_group_access, vect_analyze_data_ref_access)
14516 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
14517 (vect_compile_time_alias, vect_small_gap_p)
14518 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
14519 (vect_supportable_dr_alignment): Take references as dr_vec_infos
14520 instead of data_references. Update calls to other routines for
14521 which the same change has been made.
14522 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
14523 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
14524 (vect_slp_analyze_and_verify_node_alignment)
14525 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
14526 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
14527 (vect_setup_realignment): Use dr_vec_infos. Update calls after
14529 (_vect_peel_info::dr): Replace with...
14530 (_vect_peel_info::dr_info): ...this new field.
14531 (vect_peeling_hash_get_most_frequent)
14532 (vect_peeling_hash_choose_best_peeling): Update accordingly.
14533 (vect_peeling_hash_get_lowest_cost):
14534 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
14535 routines for which the same change has been made.
14536 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
14538 * tree-vect-loop-manip.c (get_misalign_in_elems)
14539 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
14541 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14542 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
14543 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
14544 (get_group_load_store_type, get_negative_load_store_type)
14545 (vect_get_data_ptr_increment, vectorizable_store)
14546 (vectorizable_load): Likewise.
14547 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
14548 Update calls to other routines for which the same change has been made.
14550 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14552 * tree-vectorizer.h (vec_info::move_dr): New member function.
14553 (dataref_aux): Rename to...
14554 (dr_vec_info): ...this and add "dr" and "stmt" fields.
14555 (_stmt_vec_info::dr_aux): Update accordingly.
14556 (_stmt_vec_info::data_ref_info): Delete.
14557 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
14558 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
14559 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
14560 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
14562 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
14563 (STMT_VINFO_DR_INFO): New macro.
14564 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
14565 (set_dr_misalignment): Update after rename of dataref_aux.
14566 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
14567 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
14568 initialization of STMT_VINFO_DATA_REF.
14569 * tree-vectorizer.c (vec_info::move_dr): New function.
14570 * tree-vect-patterns.c (vect_recog_bool_pattern)
14571 (vect_recog_mask_conversion_pattern)
14572 (vect_recog_gather_scatter_pattern): Use it.
14573 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
14574 the "dr" and "stmt" fields of dr_vec_info instead of
14575 STMT_VINFO_DATA_REF.
14577 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14579 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
14580 (is_pattern_stmt_p): Use it.
14581 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
14582 on pattern statements.
14584 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14586 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
14587 original stmt as a stmt_vec_info rather than a gimple stmt.
14588 (vect_pattern_recog_1): Take the statement directly as a
14589 stmt_vec_info, rather than via a gimple_stmt_iterator.
14590 Update call to vect_mark_pattern_stmts.
14591 (vect_pattern_recog): Update calls accordingly.
14593 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14595 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
14596 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
14597 a vect_def_type for the first argument.
14598 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
14599 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
14600 operand if it isn't defined by a vectorized statement.
14601 (vect_build_gather_load_calls): Remove the mask_dt argument and
14602 update calls to vect_get_vec_def_for_stmt_copy.
14603 (vectorizable_bswap): Likewise the dt argument.
14604 (vectorizable_call): Update calls to vectorizable_bswap and
14605 vect_get_vec_def_for_stmt_copy.
14606 (vectorizable_simd_clone_call, vectorizable_assignment)
14607 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
14608 (vectorizable_comparison): Update calls to
14609 vect_get_vec_def_for_stmt_copy.
14610 (vectorizable_store): Likewise. Remove now-unnecessary calls to
14611 vect_is_simple_use.
14612 (vect_get_loop_based_defs): Remove dt argument and update call
14613 to vect_get_vec_def_for_stmt_copy.
14614 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
14615 and vect_get_vec_def_for_stmt_copy.
14616 (vectorizable_load): Update calls to vect_build_gather_load_calls
14617 and vect_get_vec_def_for_stmt_copy.
14618 * tree-vect-loop.c (vect_create_epilog_for_reduction)
14619 (vectorizable_reduction, vectorizable_live_operation): Update calls
14620 to vect_get_vec_def_for_stmt_copy.
14622 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14624 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
14625 and gimple stmt arguments with a stmt_vec_info.
14626 (vect_record_base_alignments): Update calls accordingly.
14627 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
14628 and gimple stmt arguments with a stmt_vec_info.
14629 (vect_build_slp_tree_1): Remove vinfo argument and update call
14630 to vect_record_max_nunits.
14631 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
14632 and vect_record_max_nunits.
14634 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14636 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
14637 file and take a stmt_vec_info instead of a gimple stmt.
14638 (supportable_widening_operation, vect_finish_replace_stmt)
14639 (vect_finish_stmt_generation, vect_get_store_rhs)
14640 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
14641 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
14642 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
14643 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
14644 (vect_create_data_ref_ptr, bump_vector_ptr)
14645 (vect_permute_store_chain, vect_setup_realignment)
14646 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
14647 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
14648 (vectorizable_reduction, vectorizable_induction)
14649 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
14650 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
14651 than gimple stmts as arguments.
14652 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
14653 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
14654 (can_group_stmts_p, vect_check_gather_scatter)
14655 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
14656 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
14657 (vect_permute_load_chain, vect_shift_permute_load_chain)
14658 (vect_transform_grouped_load)
14659 (vect_record_grouped_load_vectors): Likewise.
14660 * tree-vect-loop.c (vect_fixup_reduc_chain)
14661 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
14662 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
14663 (vectorizable_reduction, vectorizable_induction)
14664 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
14665 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
14666 (vect_get_load_store_mask): Likewise.
14667 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
14668 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
14669 * tree-vect-stmts.c (vect_mark_relevant)
14670 (is_simple_and_all_uses_invariant)
14671 (exist_non_indexing_operands_for_use_p, process_use)
14672 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
14673 (vect_get_vec_def_for_operand, vect_get_vec_defs)
14674 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
14675 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
14676 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
14677 (get_negative_load_store_type, get_load_store_type)
14678 (vect_check_load_store_mask, vect_check_store_rhs)
14679 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
14680 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
14681 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
14682 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
14683 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
14684 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
14685 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
14686 (supportable_widening_operation): Likewise.
14688 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14690 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
14691 a stmt_vec_info instead of a gcall.
14692 (vect_check_gather_scatter): Update call accordingly.
14693 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
14695 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
14696 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
14697 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
14698 instead of a gimple stmt.
14699 (vect_transform_loop): Update calls accordingly.
14700 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
14701 stmt_vec_infos instead of gimple stmts.
14702 (vect_analyze_slp_instance): Update use accordingly.
14703 * tree-vect-stmts.c (read_vector_array, write_vector_array)
14704 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
14705 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
14706 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
14707 (vect_gen_widened_results_half, vect_get_loop_based_defs)
14708 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
14709 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
14710 down to subroutines.
14712 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14714 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
14715 of the worklist from a vector of gimple stmts to a vector of
14717 * tree-vect-stmts.c (vect_mark_relevant, process_use)
14718 (vect_mark_stmts_to_be_vectorized): Likewise
14720 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14722 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
14723 statement before passing it to vect_analyze_stmt.
14724 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
14725 the chain of phi vector definitions. Track the exit phi via its
14727 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
14728 STMT_VINFO_REDUC_DEF.
14729 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
14730 stmt_vec_infos to handle the statement chains.
14731 (vect_get_slp_defs): Record the first statement in the node
14732 using a stmt_vec_info.
14733 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
14734 statements here and pass their stmt_vec_info down to subroutines.
14735 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
14736 down to vect_finish_stmt_generation.
14737 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
14738 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
14739 stmt_vec_infos to subroutines.
14740 (vect_remove_stores): Use stmt_vec_infos to handle the statement
14743 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14745 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
14746 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
14747 (vect_permute_store_chain, vect_setup_realignment)
14748 (vect_permute_load_chain, vect_shift_permute_load_chain)
14749 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
14750 stmts internally, and when passing values to other vectorizer routines.
14751 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
14752 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
14753 (vect_analyze_loop_operations, get_initial_def_for_reduction)
14754 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
14755 (vectorizable_reduction, vectorizable_induction)
14756 (vectorizable_live_operation, vect_transform_loop_stmt)
14757 (vect_transform_loop): Likewise.
14758 * tree-vect-patterns.c (vect_reassociating_reduction_p)
14759 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
14760 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
14761 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14762 (vect_slp_analyze_node_operations_1): Likewise.
14763 * tree-vect-stmts.c (vect_mark_relevant, process_use)
14764 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
14765 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
14766 (vect_finish_stmt_generation_1, get_group_load_store_type)
14767 (get_load_store_type, vect_build_gather_load_calls)
14768 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
14769 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
14770 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
14771 (vectorizable_store, vectorizable_load, vectorizable_condition)
14772 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
14773 (supportable_widening_operation): Likewise.
14774 (vect_get_vector_types_for_stmt): Likewise.
14775 * tree-vectorizer.h (vect_dr_behavior): Likewise.
14777 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14779 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14780 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
14781 (vect_permute_store_chain, vect_permute_load_chain)
14782 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
14783 repeated stmt_vec_info lookups.
14784 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
14785 (vect_update_ivs_after_vectorizer): Likewise.
14786 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
14787 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
14788 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
14789 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14790 (vect_bb_slp_scalar_cost): Likewise.
14791 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
14793 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14795 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
14796 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
14797 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
14798 to get gassigns and gcalls, rather than operating on generc gimple
14800 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
14801 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
14802 (vectorizable_load, vect_analyze_stmt): Likewise.
14803 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
14805 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14807 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
14808 return stmt_vec_infos rather than gimple stmts. Do not accept
14810 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
14812 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
14813 Update use of get_later_stmt.
14814 (vect_get_constant_vectors): Update call accordingly.
14815 (vect_schedule_slp_instance): Likewise
14816 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
14817 (vect_slp_analyze_instance_dependence): Likewise.
14818 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
14820 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14822 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
14823 (stmt_info_for_cost::stmt_info): ...this new field.
14824 (add_stmt_costs): Update accordingly.
14825 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
14826 (vect_get_known_peeling_cost): Likewise.
14827 (vect_estimate_min_profitable_iters): Likewise.
14828 * tree-vect-stmts.c (record_stmt_cost): Likewise.
14830 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14832 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
14833 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
14834 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
14836 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
14838 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14840 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
14841 a gimple stmt to a stmt_vec_info.
14842 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
14844 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14846 * tree-vectorizer.h (vec_info::grouped_stores): Change from
14847 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
14848 (_loop_vec_info::reduction_chains): Likewise.
14849 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
14851 * tree-vect-slp.c (vect_analyze_slp): Likewise.
14853 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14855 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
14856 a gimple stmt to a stmt_vec_info.
14857 (_stmt_vec_info::next_element): Likewise.
14858 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
14859 (vect_slp_analyze_and_verify_node_alignment)
14860 (vect_analyze_group_access_1, vect_analyze_group_access)
14861 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
14862 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
14863 (vect_supportable_dr_alignment): Update accordingly.
14864 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
14865 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
14866 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
14867 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
14868 * tree-vect-slp.c (vect_build_slp_tree_1)
14869 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
14870 (vect_split_slp_store_group, vect_analyze_slp_instance)
14871 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
14872 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
14873 (get_group_load_store_type, get_load_store_type)
14874 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
14875 (vect_transform_stmt, vect_remove_stores): Likewise.
14877 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14879 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
14880 than a gimple stmt.
14881 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14882 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
14883 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
14884 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
14885 (vector_alignment_reachable_p, vect_get_data_access_cost)
14886 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
14887 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
14888 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
14889 (vect_analyze_group_access_1, vect_analyze_group_access)
14890 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
14891 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
14892 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
14893 result of vect_dr_stmt and use the stmt_vec_info instead of
14894 the associated gimple stmt.
14895 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14896 (vect_gen_prolog_loop_niters): Likewise.
14897 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14899 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14901 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
14902 to a vec<stmt_vec_info>.
14903 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
14904 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
14905 vec<stmt_vec_info>.
14906 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
14907 to a vec<stmt_vec_info>.
14908 (bst_traits::value_type, bst_traits::value_type): Likewise.
14909 (bst_traits::hash): Update accordingly.
14910 (vect_get_and_check_slp_defs): Change the stmts parameter from
14911 a vec<gimple *> to a vec<stmt_vec_info>.
14912 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
14913 (vect_build_slp_tree): Likewise.
14914 (vect_build_slp_tree_2): Likewise. Update uses of
14915 SLP_TREE_SCALAR_STMTS.
14916 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
14917 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
14918 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
14919 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
14920 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
14921 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
14922 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
14923 (vect_get_constant_vectors, vect_get_slp_defs)
14924 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
14925 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
14926 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
14927 instead of gimple stmts.
14928 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
14929 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
14930 (vect_slp_analyze_instance_dependence): Update uses of
14931 SLP_TREE_SCALAR_STMTS.
14932 (vect_slp_analyze_and_verify_node_alignment): Likewise.
14933 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
14934 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
14935 (get_initial_defs_for_reduction): Likewise.
14936 (vect_create_epilog_for_reduction): Likewise.
14937 (vectorize_fold_left_reduction): Likewise.
14938 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
14939 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
14940 (can_vectorize_live_stmts): Likewise.
14942 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14944 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
14945 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
14946 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
14948 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
14950 (gather_scalar_reductions): Update after above interface changes.
14951 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
14952 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
14954 (vect_force_simple_reduction): Likewise.
14955 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
14956 LOOP_VINFO_REDUCTIONS.
14957 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14959 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14961 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
14962 a gimple stmt to a stmt_vec_info.
14963 * tree-vect-loop.c (vect_active_double_reduction_p)
14964 (vect_force_simple_reduction, vectorizable_reduction): Update
14967 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14969 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
14970 vec<gimple *> to a vec<stmt_vec_info>.
14971 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
14972 the reduction_phis argument from a vec<gimple *> to a
14973 vec<stmt_vec_info>.
14974 (vectorizable_reduction): Likewise the phis local variable that
14975 is passed to vect_create_epilog_for_reduction. Update for new type
14976 of SLP_TREE_VEC_STMTS.
14977 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
14978 (vectorizable_live_operation): Likewise.
14979 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
14980 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
14982 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
14984 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
14985 a gimple stmt to a stmt_vec_info.
14986 (vectorizable_condition, vectorizable_live_operation)
14987 (vectorizable_reduction, vectorizable_induction): Pass back the
14988 vectorized statement as a stmt_vec_info.
14989 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
14990 use of STMT_VINFO_VEC_STMT.
14991 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
14992 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
14993 as stmt_vec_infos rather than gimple stmts.
14994 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
14995 to a stmt_vec_info.
14996 (vectorizable_live_operation): Likewise.
14997 (vectorizable_reduction, vectorizable_induction): Likewise,
14998 updating use of STMT_VINFO_VEC_STMT.
14999 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
15000 of STMT_VINFO_VEC_STMT.
15001 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
15002 (vectorizable_simd_clone_call, vectorizable_conversion)
15003 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
15004 (vectorizable_store, vectorizable_load, vectorizable_condition)
15005 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
15006 from a gimple stmt to a stmt_vec_info.
15007 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
15008 pointer to a stmt_vec_info to the vectorizable_* routines.
15010 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15012 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
15013 a gimple stmt to a stmt_vec_info.
15014 (is_pattern_stmt_p): Update accordingly.
15015 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
15016 (vect_record_grouped_load_vectors): Likewise.
15017 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
15018 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
15019 (vect_model_reduction_cost): Likewise.
15020 (vect_create_epilog_for_reduction): Likewise.
15021 (vectorizable_reduction, vectorizable_induction): Likewise.
15022 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
15023 Return the stmt_vec_info for the pattern statement.
15024 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
15025 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
15026 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
15027 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
15028 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
15029 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
15030 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
15031 (free_stmt_vec_info, vect_is_simple_use): Likewise.
15033 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15035 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
15036 (vect_finish_stmt_generation): Likewise.
15037 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
15038 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
15039 (vect_build_gather_load_calls): Use the return value of the above
15040 functions instead of a separate call to vinfo_for_stmt. Use narrow
15041 scopes for the input gimple stmt and wider scopes for the associated
15042 stmt_vec_info. Use vec_info::lookup_def when setting these
15043 stmt_vec_infos from an SSA_NAME definition.
15044 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
15045 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
15046 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
15047 (vectorizable_store, vectorizable_load, vectorizable_condition)
15048 (vectorizable_comparison): Likewise.
15049 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
15050 (vectorizable_reduction): Likewise.
15052 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15054 * tree-vectorizer.h (vect_is_simple_use): Add an optional
15055 stmt_vec_info * parameter before the optional gimple **.
15056 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
15057 (process_use, vect_get_vec_def_for_operand_1): Update callers.
15058 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
15059 * tree-vect-loop.c (vectorizable_reduction): Likewise.
15060 (vectorizable_live_operation): Likewise.
15061 * tree-vect-patterns.c (type_conversion_p): Likewise.
15062 (vect_look_through_possible_promotion): Likewise.
15063 (vect_recog_rotate_pattern): Likewise.
15064 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
15066 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15068 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
15069 a typedef to a wrapper class.
15070 (NULL_STMT_VEC_INFO): New macro.
15071 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
15072 (stmt_vec_info::operator*): New function.
15073 (stmt_vec_info::operator gimple *): Likewise.
15074 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
15075 (add_stmt_costs): Likewise.
15076 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
15077 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
15078 (vect_get_known_peeling_cost): Likewise.
15079 (vect_estimate_min_profitable_iters): Likewise.
15080 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
15081 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
15082 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
15083 (vectorizable_store, free_stmt_vec_infos): Likewise.
15084 (new_stmt_vec_info): Change return type of xcalloc to
15087 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15089 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
15090 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
15091 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
15092 a single_imm_use-based sequence.
15093 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
15095 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15097 * tree-vectorizer.h (vec_info::lookup_def): Declare.
15098 * tree-vectorizer.c (vec_info::lookup_def): New function.
15099 * tree-vect-patterns.c (vect_get_internal_def): Use it.
15100 (vect_widened_op_tree): Likewise.
15101 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
15102 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
15103 (vectorizable_reduction): Likewise.
15104 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
15106 (vect_is_slp_reduction): Update calls accordingly. Use
15107 vec_info::lookup_def.
15108 (vect_is_simple_reduction): Likewise
15109 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
15111 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15113 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
15114 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
15115 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
15117 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
15118 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
15119 (vect_update_vf_for_slp, vect_analyze_loop_operations)
15120 (vect_is_slp_reduction, vectorizable_induction)
15121 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
15122 * tree-vect-patterns.c (vect_init_pattern_stmt):
15123 (vect_determine_min_output_precision_1, vect_determine_precisions)
15124 (vect_pattern_recog): Likewise.
15125 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
15126 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
15127 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
15128 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
15129 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
15130 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
15131 info field from a loop to a loop_vec_info.
15133 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15135 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
15136 (vec_info::add_stmt): Declare.
15137 * tree-vectorizer.c (vec_info::add_stmt): New function.
15138 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
15139 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
15140 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
15141 (vectorizable_induction): Likewise.
15142 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
15143 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
15144 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
15145 (vectorizable_load): Likewise.
15146 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
15147 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
15148 (vect_recog_gather_scatter_pattern): Likewise.
15149 (append_pattern_def_seq): Likewise. Remove a check that is
15150 performed by add_stmt itself.
15152 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15154 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
15155 which make_ssa_name was called with new_stmt before new_stmt
15158 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15160 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
15162 (vect_is_slp_reduction): ...here...
15163 (vect_is_simple_reduction): ...and here. Remove repetition of tests
15164 that are already known to be false.
15166 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15168 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
15169 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
15170 STMT_VINFO_NUM_SLP_USES when it's true.
15171 (vect_free_slp_instance): Add a final_p parameter and pass it to
15172 vect_free_slp_tree.
15173 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
15174 (vect_analyze_slp_instance): Likewise.
15175 (vect_slp_analyze_operations): Likewise.
15176 (vect_slp_analyze_bb_1): Likewise.
15177 * tree-vectorizer.c (vec_info): Likewise.
15178 * tree-vect-loop.c (vect_transform_loop): Likewise.
15180 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15182 * tree-vect-loop.c (vectorizable_reduction): Assert that the
15183 function is not called for second and subsequent members of
15186 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15188 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
15189 cases for nested loops from here to ...
15190 (vect_create_epilog_for_reduction): ...here. Only call
15191 vect_is_simple_use for inner-loop reductions.
15193 2018-07-31 Martin Liska <mliska@suse.cz>
15195 PR gcov-profile/85338
15196 PR gcov-profile/85350
15197 PR gcov-profile/85372
15198 * profile.c (struct location_triplet): New.
15199 (struct location_triplet_hash): Likewise.
15200 (output_location): Do not output a BB that
15201 is already recorded for a line.
15202 (branch_prob): Use streamed_locations.
15204 2018-07-31 Martin Liska <mliska@suse.cz>
15206 PR gcov-profile/85370
15207 * coverage.c (coverage_begin_function): Do not mark target
15208 clones as artificial functions.
15210 2018-07-31 Martin Liska <mliska@suse.cz>
15212 PR gcov-profile/83813
15213 PR gcov-profile/84758
15214 PR gcov-profile/85217
15215 PR gcov-profile/85332
15216 * profile.c (branch_prob): Do not record GOTO expressions
15217 for GIMPLE statements which locations are already streamed.
15219 2018-07-31 Olivier Hainque <hainque@adacore.com>
15221 * gcc.c (handle_spec_function): Accept a soft_matched_part
15222 argument, as do_spec_1. Pass it down to ...
15223 (eval_spec_function): Accept a soft_matched_part argument,
15224 and pass it down to ...
15225 (do_spec_2): Accept a soft_matched_part argument, and pass
15226 it down to do_spec_1.
15227 (do_spec_1): Pass soft_matched_part to handle_spec_function.
15228 (handle_braces): Update call to handle_spec_function.
15229 (driver::set_up_specs): Update calls to do_spec_2.
15230 (compare_debug_dump_opt_spec_function): Likewise.
15231 (compare_debug_self_opt_spec_function): Likewise.
15233 2018-07-31 Olivier Hainque <hainque@adacore.com>
15235 * common.opt (nolibc): New option.
15236 * doc/invoke.texi (Link Options): Document it.
15237 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
15238 * config/alpha/linux.h: Likewise.
15239 * config/arc/elf.h: Likewise.
15240 * config/arm/uclinux-elf.h: Likewise.
15241 * config/arm/unknown-elf.h: Likewise.
15242 * config/avr/avrlibc.h: Likewise.
15243 * config/bfin/bfin.h: Likewise.
15244 * config/bfin/linux.h: Likewise.
15245 * config/bfin/uclinux.h: Likewise.
15246 * config/darwin.h: Likewise.
15247 * config/darwin10.h: Likewise.
15248 * config/darwin12.h: Likewise.
15249 * config/gnu-user.h: Likewise.
15250 * config/lm32/uclinux-elf.h: Likewise.
15251 * config/pa/pa-hpux11.h: Likewise.
15252 * config/pa/pa64-hpux.h: Likewise.
15253 * config/sparc/sparc.h: Likewise.
15255 2018-07-31 Olivier Hainque <hainque@adacore.com>
15257 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
15258 undefined variables.
15260 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
15263 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
15264 instead of GEN_INT.
15266 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
15268 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
15269 terminated string literal.
15271 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
15273 PR rtl-optimization/85160
15274 * combine.c (is_just_move): New function.
15275 (try_combine): Allow combining two instructions into two if neither of
15276 the original instructions was a move.
15278 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
15281 * doc/extend.texi (Global Register Variables): Discourage use of type
15283 (Local Register Variables): Likewise.
15285 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
15287 PR tree-optimization/86506
15288 * hwint.h (ceil_log2): Resync with hwint.c implementation.
15290 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
15293 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
15294 hard_regno, make sure no insn between `from` and `to` clobbers it.
15296 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
15297 Tom de Vries <tdevries@suse.de>
15299 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
15300 (PTX_DEFAULT_RUNTIME_DIM): ... this.
15301 (nvptx_goacc_validate_dims): Set default worker and gang dims to
15302 PTX_DEFAULT_RUNTIME_DIM.
15303 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
15305 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
15307 * config/pa/pa.c (pa_output_addr_vec): Align address table.
15308 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
15309 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
15311 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
15313 * config/rs6000/constraints.md (wG constraint): Delete, no longer
15315 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
15316 predicate to reflect toc fusion has been deleted.
15317 (toc_fusion_mem_raw): Delete, no longer used.
15318 (toc_fusion_mem_wrapped): Likewise.
15319 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
15321 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
15322 Delete, no longer used.
15323 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
15324 meant to be used for toc fusion.
15325 (rs6000_debug_print_mode): Delete toc fusion debugging.
15326 (rs6000_debug_reg_global): Likewise.
15327 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
15328 fusion and secondary reload support that were never used.
15329 (rs6000_option_override_internal): Delete TOC fusion, that was only
15330 partially defined, and it did not work unless you also used the
15332 (rs6000_legitimate_address_p): Delete TOC fusion support.
15333 (rs6000_opt_masks): Likewise.
15334 (fusion_wrap_memory_address): Delete function, no longer used.
15335 (fusion_split_address); Delete TOC fusion support.
15336 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
15337 longer used with toc fusion being deleted.
15338 (TARGET_TOC_FUSION_FP): Likewise.
15339 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
15341 (toc fusion spliter): Delete TOC fusion support.
15342 (toc_fusionload_<mode>): Likewise.
15343 (toc_fusionload_di): Likewise.
15344 (fusion_gpr_load_<mode>): Delete generator function, this insn no
15345 longer needs to be named. Rename predicate to delete TOC fusion.
15346 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
15347 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
15348 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
15349 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
15350 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
15352 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
15354 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
15355 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
15356 __int128 in built-in function prototypes.
15357 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
15358 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
15360 2018-07-27 Martin Sebor <msebor@redhat.com>
15362 PR tree-optimization/86696
15363 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
15364 types, including enums.
15365 (handle_char_store): Be prepared for the above function to fail.
15367 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
15369 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
15370 when optimization level is lower than 2 or optimize for size.
15372 2018-07-26 Martin Sebor <msebor@redhat.com>
15374 PR tree-optimization/86043
15375 PR tree-optimization/86042
15376 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
15377 (get_string_cst_length): Rename...
15378 (get_min_string_length): ...to this. Add argument.
15379 (handle_char_store): Extend to handle multi-character stores by
15381 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
15382 * tree.h (initializer_zerop): Add argument.
15384 2018-07-26 Jakub Jelinek <jakub@redhat.com>
15386 PR middle-end/86660
15387 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
15388 declare target to variables if they have always,{to,from,tofrom} map
15391 2018-07-26 Martin Liska <mliska@suse.cz>
15394 * lto-wrapper.c: Add linker_output as prefix
15395 for ltrans_output_file.
15397 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
15399 PR rtl-optimization/85805
15400 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
15401 value for hard registers if that was written in the same mode.
15403 2018-07-26 Martin Liska <mliska@suse.cz>
15405 PR gcov-profile/86536
15406 * gcov.c (format_gcov): Use printf format %.*f directly
15407 and do not handle special values.
15409 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15411 * common/config/arc/arc-common.c (arc_option_optimization_table):
15412 Update default optimizations for size.
15414 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15416 * config/arc/arc.md (movsf_insn): Add short instruction selection.
15417 * config/arc/constraints.md (CfZ): New constraint.
15418 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
15419 (subsf3_fpu): Likewise.
15420 (cmpsf_fpu): Likewise.
15421 (cmpsf_fpu_uneq): Likewise.
15423 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15425 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
15427 (arc_is_uncached_mem_p): uncached applies to both the variable and
15430 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
15432 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
15435 2018-07-25 David Malcolm <dmalcolm@redhat.com>
15437 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
15438 field "m_scopes" from vec to auto_vec.
15440 2018-07-25 Martin Liska <mliska@suse.cz>
15442 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
15445 2018-07-25 Richard Biener <rguenther@suse.de>
15448 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
15449 special wrt context_die late.
15450 (gen_subprogram_die): Re-use DIEs in local scope.
15452 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
15454 PR tree-optimization/86644
15455 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
15457 2018-07-25 Martin Liska <mliska@suse.cz>
15459 PR middle-end/86645
15460 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
15461 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
15463 2018-07-25 Martin Liska <mliska@suse.cz>
15466 * params.def: Explain ASan abbreviation and provide
15467 a documentation link.
15469 2018-07-24 Martin Sebor <msebor@redhat.com>
15471 PR tree-optimization/86622
15472 PR tree-optimization/86532
15473 * builtins.h (string_length): Declare.
15474 * builtins.c (c_strlen): Correct handling of non-constant offsets.
15475 (check_access): Be prepared for non-constant length ranges.
15476 (string_length): Make extern.
15477 * expr.c (string_constant): Only handle the minor non-constant
15478 array index. Use string_constant to compute the length of
15479 a generic string constant.
15481 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
15483 PR tree-optimization/86618
15484 * tree-vect-stmts.c (vectorizable_call): Don't take the address
15485 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
15487 2018-07-24 David Malcolm <dmalcolm@redhat.com>
15489 PR tree-optimization/86636
15490 * json.cc (json::object::set): Fix comment. Add assertions.
15491 (json::array::append): Move here from json.h. Add comment and an
15493 (json::string::string): Likewise.
15494 * json.h (json::array::append): Move to json.cc.
15495 (json::string::string): Likewise.
15496 * optinfo-emit-json.cc
15497 (optrecord_json_writer::impl_location_to_json): Assert that we
15498 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
15499 wrapper around it. Expand the location once, rather than three
15501 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
15502 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
15504 (optrecord_json_writer::optinfo_to_json): Likewise, in four
15505 places. Fix some overlong lines.
15507 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
15509 * config/aarch64/aarch64-simd.md
15510 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
15511 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
15512 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
15513 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
15514 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
15515 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
15516 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
15517 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
15518 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
15520 2018-07-24 Jakub Jelinek <jakub@redhat.com>
15522 PR middle-end/86627
15523 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
15524 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
15525 and abs_d == d, do the power of two handling if profitable.
15527 2018-07-24 Richard Biener <rguenther@suse.de>
15529 * match.pd: Add BIT_FIELD_REF canonicalizations.
15531 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
15534 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
15536 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
15538 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
15539 terminated STRING_CST object.
15541 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
15543 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
15545 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
15547 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
15548 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
15549 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
15550 the elements into a register.
15551 (rs6000_split_v4si_init_di_reg): Delete.
15552 (rs6000_split_v4si_init): Delete.
15553 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
15554 (vsx_init_v4si): Rewrite as a define_expand.
15556 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
15558 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
15559 zero_extend argument from memory): New.
15561 2018-07-22 Martin Sebor <msebor@redhat.com>
15564 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
15565 diagnosing calls with unknown arguments unless -Walloca-larger-than
15566 is restricted to less than PTRDIFF_MAX bytes.
15568 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
15570 * doc/gcov.texi (Invoking Gcov): Editorial changes.
15572 2018-07-20 David Malcolm <dmalcolm@redhat.com>
15574 * pretty-print.c (text_info::set_location): Remove redundant
15575 "line_table" parameter from call to rich_location::set_range.
15577 2018-07-20 Martin Sebor <msebor@redhat.com>
15579 PR middle-end/82063
15580 * builtins.c (expand_builtin_alloca): Adjust.
15581 * calls.c (alloc_max_size): Simplify.
15582 * cgraphunit.c (cgraph_node::expand): Adjust.
15583 * common.opt (larger_than_size, warn_frame_larger_than): Remove
15585 (frame_larger_than_size): Same.
15586 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
15587 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
15589 * doc/invoke.texi (GCC Command Options): Document option arguments.
15590 Explain byte-size arguments and suffixes.
15591 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
15592 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
15593 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
15594 * doc/options.texi (UInteger): Expand.
15595 (Host_Wide_Int, ByteSize): Document new properties.
15596 * final.c (final_start_function_1): Include sizes in an error message.
15597 * function.c (frame_offset_overflow): Same.
15598 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
15599 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
15600 Diagnose unbounded alloca calls only for limits of less than
15602 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
15603 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
15605 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
15606 only for limits of less than PTRDIFF_MAX.
15607 * langhooks-def.h (lhd_handle_option): Change function argument
15609 * langhooks.c (lhd_handle_option): Same.
15610 * langhooks.h (handle_option): Same.
15611 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
15613 (var_type, var_type_struct): Same.
15614 (var_set): Handle ByteSize flag.
15615 * optc-gen.awk: Add comments to output to ease debugging. Make
15616 use of HOST_WIDE_INT where appropriate.
15617 * opts-gen-save.awk: Use %lx to format unsigned long.
15618 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
15619 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
15620 arguments. Parse bytes-size suffixes.
15621 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
15622 (enum_value_to_arg): Same.
15623 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
15624 (handle_option): Adjust.
15625 (generate_option): Change function argument to HOST_WIDE_INT.
15626 (cmdline_handle_error): Adjust.
15627 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
15628 (set_option): Change function argument to HOST_WIDE_INT.
15629 (option_enabled): Handle cl_host_wide_int.
15630 (get_option_state): Handle CLVC_SIZE.
15631 (control_warning_option): Same.
15632 * opts.c (common_handle_option): Change function argument to
15633 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
15634 OPT_Wvla_larger_than_.
15635 * opts.h (enum cl_var_type): Add an enumerator.
15636 * stor-layout.c (layout_decl): Print a more meaningful warning.
15637 * toplev.c (output_stack_usage): Adjust.
15639 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
15641 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
15642 call to inline_expand_builtin_string_cmp.
15643 (expand_builtin_strcmp): Likewise.
15644 (expand_builtin_strncmp): Likewise.
15645 (inline_string_cmp): Delete the last parameter, change char_type_node
15646 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
15648 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
15649 the inlining expansion on target where the type of the call has same or
15650 narrower precision than unsigned char.
15652 2018-07-20 David Malcolm <dmalcolm@redhat.com>
15654 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
15655 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
15656 * common.opt (fsave-optimization-record): New option.
15657 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
15658 * doc/invoke.texi (-fsave-optimization-record): New option.
15659 * dumpfile.c: Include "optinfo-emit-json.h".
15660 (struct kv_pair): Move to coretypes.h.
15661 (optgroup_options): Make non-static.
15662 (dump_context::end_scope): Call
15663 optimization_records_maybe_pop_dump_scope.
15664 * dumpfile.h (optgroup_options): New decl.
15665 * json.cc: New file.
15666 * json.h: New file.
15667 * optinfo-emit-json.cc: New file.
15668 * optinfo-emit-json.h: New file.
15669 * optinfo.cc: Include "optinfo-emit-json.h".
15670 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
15671 (optinfo_enabled_p): Check optimization_records_enabled_p.
15672 (optinfo_wants_inlining_info_p): Likewise.
15673 * optinfo.h: Update comment.
15674 * profile-count.c (profile_quality_as_string): New function.
15675 * profile-count.h (profile_quality_as_string): New decl.
15676 (profile_count::quality): New accessor.
15677 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
15678 and optinfo_emit_json_cc_tests.
15679 * selftest.h (selftest::json_cc_tests): New decl.
15680 (selftest::optinfo_emit_json_cc_tests): New decl.
15681 * toplev.c: Include "optinfo-emit-json.h".
15682 (compile_file): Call optimization_records_finish.
15683 (do_compile): Call optimization_records_start.
15684 * tree-ssa-live.c: Include optinfo.h.
15685 (remove_unused_scope_block_p): Retain inlining information if
15686 optinfo_wants_inlining_info_p returns true.
15688 2018-07-20 Richard Biener <rguenther@suse.de>
15691 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
15692 to cover -flto-partition=none.
15694 2018-07-20 Martin Liska <mliska@suse.cz>
15696 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
15697 (get_decl_source_range): Remove unused function.
15699 2018-07-20 Richard Biener <rguenther@suse.de>
15701 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
15702 (struct vn_phi_s): Likewise.
15703 (struct vn_reference_s): Likewise.
15704 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
15705 for searching the slot of an entry known to be in the hash itself.
15706 (vn_phi_hasher::equal): Likewise.
15707 (vn_reference_hasher::equal): Likewise.
15708 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
15710 (optimistic_info, current_info): Remove, keeping only valid_info.
15711 (vn_reference_lookup_1): Remove fallback lookup.
15712 (vn_reference_lookup_2): Likewise.
15713 (vn_nary_op_lookup_1): Likewise.
15714 (vn_phi_lookup): Likewise.
15715 (vn_nary_build_or_lookup_1): Make sure to not chain the built
15717 (vn_reference_insert): Adjust, chain the inserted hash element
15718 at last_inserted_ref.
15719 (vn_reference_insert_pieces): Likewise.
15720 (visit_reference_op_call): Likewise.
15721 (vn_nary_op_insert_into): Chain the inserted hash element at
15722 last_inserted_nary.
15723 (vn_nary_op_insert_pieces): Adjust.
15724 (vn_nary_op_insert): Likewise.
15725 (vn_nary_op_insert_stmt): Likewise.
15726 (vn_phi_insert): Adjust, chain the inserted hash element at
15728 (process_scc): Remove clearing and copying the optimistic
15729 table. Instead remove elements inserted during an optimistic
15730 iteration from the single table we maintain.
15731 (init_scc_vn): Adjust.
15732 (free_scc_vn): Likewise.
15733 (sccvn_dom_walker::record_cond): Likewise.
15734 (sccvn_dom_walker::after_dom_children): Likewise.
15736 2018-07-19 Martin Sebor <msebor@redhat.com>
15738 PR tree-optimization/84047
15739 PR tree-optimization/83776
15740 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
15741 (check_array_bounds): Call it.
15743 2018-07-19 Martin Sebor <msebor@redhat.com>
15745 * align.h (align_flags): Use member initialization.
15747 2018-07-19 David Malcolm <dmalcolm@redhat.com>
15749 * Makefile.in (OBJS): Add optinfo.o.
15750 * coretypes.h (class symtab_node): New forward decl.
15751 (struct cgraph_node): New forward decl.
15752 (class varpool_node): New forward decl.
15753 * dump-context.h: New file.
15754 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
15756 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
15757 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
15758 (set_alt_dump_file): Likewise.
15759 (dump_context::~dump_context): New dtor.
15760 (dump_gimple_stmt): Move implementation to...
15761 (dump_context::dump_gimple_stmt): ...this new member function.
15762 Add the stmt to any pending optinfo, creating one if need be.
15763 (dump_gimple_stmt_loc): Move implementation to...
15764 (dump_context::dump_gimple_stmt_loc): ...this new member function.
15765 Start a new optinfo and add the stmt to it.
15766 (dump_gimple_expr): Move implementation to...
15767 (dump_context::dump_gimple_expr): ...this new member function.
15768 Add the stmt to any pending optinfo, creating one if need be.
15769 (dump_gimple_expr_loc): Move implementation to...
15770 (dump_context::dump_gimple_expr_loc): ...this new member function.
15771 Start a new optinfo and add the stmt to it.
15772 (dump_generic_expr): Move implementation to...
15773 (dump_context::dump_generic_expr): ...this new member function.
15774 Add the tree to any pending optinfo, creating one if need be.
15775 (dump_generic_expr_loc): Move implementation to...
15776 (dump_context::dump_generic_expr_loc): ...this new member
15777 function. Add the tree to any pending optinfo, creating one if
15779 (dump_printf): Move implementation to...
15780 (dump_context::dump_printf_va): ...this new member function. Add
15781 the text to any pending optinfo, creating one if need be.
15782 (dump_printf_loc): Move implementation to...
15783 (dump_context::dump_printf_loc_va): ...this new member function.
15784 Start a new optinfo and add the stmt to it.
15785 (dump_dec): Move implementation to...
15786 (dump_context::dump_dec): ...this new member function. Add the
15787 value to any pending optinfo, creating one if need be.
15788 (dump_context::dump_symtab_node): New member function.
15789 (dump_context::get_scope_depth): New member function.
15790 (dump_context::begin_scope): New member function.
15791 (dump_context::end_scope): New member function.
15792 (dump_context::ensure_pending_optinfo): New member function.
15793 (dump_context::begin_next_optinfo): New member function.
15794 (dump_context::end_any_optinfo): New member function.
15795 (dump_context::s_current): New global.
15796 (dump_context::s_default): New global.
15797 (dump_scope_depth): Delete global.
15798 (dumpfile_ensure_any_optinfo_are_flushed): New function.
15799 (dump_symtab_node): New function.
15800 (get_dump_scope_depth): Reimplement in terms of dump_context.
15801 (dump_begin_scope): Likewise.
15802 (dump_end_scope): Likewise.
15803 (selftest::temp_dump_context::temp_dump_context): New ctor.
15804 (selftest::temp_dump_context::~temp_dump_context): New dtor.
15805 (selftest::verify_item): New function.
15806 (ASSERT_IS_TEXT): New macro.
15807 (ASSERT_IS_TREE): New macro.
15808 (ASSERT_IS_GIMPLE): New macro.
15809 (selftest::test_capture_of_dump_calls): New test.
15810 (selftest::dumpfile_c_tests): Call it.
15811 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
15812 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
15813 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
15814 descriptive comment.
15815 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
15816 (dump_node, dump_bb): Move these unrelated decls.
15817 (class dump_manager): Add leading comment.
15818 * optinfo.cc: New file.
15819 * optinfo.h: New file.
15821 2018-07-19 Michael Collison <michael.collison@arm.com>
15822 Richard Henderson <rth@redhat.com>
15824 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
15825 (subti): Handle op1 zero.
15826 (subvti4, usub4ti4): New.
15827 (*sub<GPI>3_compare1_imm): New.
15828 (sub<GPI>3_carryinCV): New.
15829 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
15830 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
15832 2018-07-19 Michael Collison <michael.collison@arm.com>
15833 Richard Henderson <rth@redhat.com>
15835 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
15836 (addti3): Create simpler code if low part is already known to be 0.
15837 (addvti4, uaddvti4): New.
15838 (*add<GPI>3_compareC_cconly_imm): New.
15839 (*add<GPI>3_compareC_cconly): New.
15840 (*add<GPI>3_compareC_imm): New.
15841 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
15842 handle constants within this pattern..
15843 (*add<GPI>3_compareV_cconly_imm): New.
15844 (*add<GPI>3_compareV_cconly): New.
15845 (*add<GPI>3_compareV_imm): New.
15846 (add<GPI>3_compareV): New.
15847 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
15848 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
15849 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
15850 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
15851 with 'comparison' operator.
15852 (*add<GPI>3_compareV_cconly_imm): Ditto.
15853 (*add<GPI>3_compareV_cconly): Ditto.
15854 (*add<GPI>3_compareV_imm): Ditto.
15855 (add<GPI>3_compareV): Ditto.
15856 (add<mode>3_carryinC): Ditto.
15857 (*add<mode>3_carryinC_zero): Ditto.
15858 (*add<mode>3_carryinC): Ditto.
15859 (add<mode>3_carryinV): Ditto.
15860 (*add<mode>3_carryinV_zero): Ditto.
15861 (*add<mode>3_carryinV): Ditto.
15863 2018-07-19 Michael Collison <michael.collison@arm.com>
15864 Richard Henderson <rth@redhat.com>
15866 * config/aarch64/aarch64-modes.def (CC_V): New.
15867 * config/aarch64/aarch64-protos.h
15868 (aarch64_addti_scratch_regs): Declare
15869 (aarch64_subvti_scratch_regs): Declare.
15870 (aarch64_expand_subvti): Declare.
15871 (aarch64_gen_unlikely_cbranch): Declare
15872 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
15873 for signed overflow using CC_Vmode.
15874 (aarch64_get_condition_code_1): Handle CC_Vmode.
15875 (aarch64_gen_unlikely_cbranch): New function.
15876 (aarch64_addti_scratch_regs): New function.
15877 (aarch64_subvti_scratch_regs): New function.
15878 (aarch64_expand_subvti): New function.
15880 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
15882 * config/aarch64/aarch64-option-extensions.def: New entry for profile
15884 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
15885 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
15888 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
15891 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15892 address check not strict.
15894 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
15896 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
15898 (store_pair_lanes<mode>): Likewise.
15899 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
15900 enum value 'ADDR_QUERY_LDP_STP_N'.
15901 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
15902 (aarch64_print_address_internal): Add declaration.
15903 (aarch64_print_ldpstp_address): Remove.
15904 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
15905 (aarch64_print_operand): Change printing of 'y'.
15906 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
15907 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
15908 'true' rather than '1'.
15909 * config/aarch64/constraints.md (Uml): Likewise.
15910 (Uml): Rename to Umn.
15913 2018-07-19 Richard Biener <rguenther@suse.de>
15915 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
15917 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
15918 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
15919 (vn_reference_hasher): Likewise.
15920 (struct vn_tables_s): Remove obstack and alloc-pool members.
15921 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
15922 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
15923 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
15924 (vn_reference_insert_pieces): Likewise.
15925 (alloc_vn_nary_op_noinit): Adjust.
15926 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
15927 (vn_phi_eq): Adjust.
15928 (shared_lookup_phiargs): Remove.
15929 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
15930 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
15931 (visit_reference_op_call): Likewise.
15932 (copy_nary, copy_phi, copy_reference): Remove.
15933 (process_scc): Rewind the obstack when iterating. Do not
15934 copy the elements to valid_info but just move them from one
15935 hashtable to the other.
15936 (allocate_vn_table): Adjust.
15937 (free_vn_table): Likewise.
15938 (init_scc_vn): Likewise.
15939 (free_scc_vn): Likewise.
15941 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
15944 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
15945 indirect_return as function type attribute.
15946 (ix86_attribute_table): Change indirect_return to function
15948 * doc/extend.texi: Update indirect_return attribute.
15950 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
15952 * wide-int.h (widest2_int): New.
15953 * gimple-fold.c (arith_overflowed_p): Use it.
15954 * tree.h (widest2_int_cst): New.
15955 * tree-vrp.c (wide_int_binop_overflow): Rename from
15956 vrp_int_const_binop.
15957 Rewrite to work on trees.
15958 (extract_range_from_multiplicative_op_1): Abstract code to...
15959 (wide_int_range_min_max): ...here.
15960 (wide_int_range_cross_product): ...and here.
15961 (extract_range_from_binary_expr_1): Abstract overflow code to...
15962 (wide_int_range_mult_wrapping): ...here.
15963 * tree-vrp.h (wide_int_range_cross_product): New.
15964 (wide_int_range_mult_wrapping): New.
15966 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
15967 Julia Koval <julia.koval@intel.com>
15969 * config/i386/x86-tune-costs.h (skylake_memcpy,
15970 skylake_memset): Replace rep_prefix with unrolling for size 512.
15972 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
15974 PR middle-end/86544
15975 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
15976 comparision with EQ_EXPR in last stmt.
15978 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
15980 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
15981 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
15982 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
15983 previously known as "PowerPC AltiVec Built-in Functions". Move
15984 some material to new subsubsections "PowerPC AltiVec Built-in
15985 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
15987 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
15988 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
15989 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
15990 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
15992 2018-07-18 Richard Biener <rguenther@suse.de>
15994 PR tree-optimization/86557
15995 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
15998 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
16000 * config/s390/s390.c (s390_function_profiler): Generate CFI.
16002 2018-07-17 Jeff Law <law@redhat.com>
16004 * config/arm/arm.c (get_label_padding): Update for recent
16005 changes to label_to_alignment.
16007 PR tree-optimization/86010
16008 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
16010 * config/mips/mips.c (vr4130_align_insns): Update for recent
16011 changes to label_to_alignment.
16013 * config/frv/frv.c (frv_label_align): Update for recent changes
16014 to label_to_alignment.
16016 * config/nios2/nios2.c (nios2_label_align): Update for recent
16017 changes which dropped ALIGN_LABELS_LOG.
16019 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
16021 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
16022 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
16024 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
16026 * config/arc/arc.c (arc_label_align): Use align_labels instead of
16027 deprecated align_labels_log.
16029 2018-07-17 Richard Biener <rguenther@suse.de>
16032 * dwarf2out.c (init_sections_and_labels): Always generate
16033 a debug_line_str_section for early LTO debug.
16034 (dwarf2out_finish): Reset debug_line_str_hash output early.
16035 Bump counter for extra dwarf5 .debug_loc labels to not conflict
16037 (dwarf2out_early_finish): Output debug_line_str.
16039 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
16041 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
16042 index register on z196 or later.
16044 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
16046 * config/s390/s390.c (s390_default_align): Set default function
16048 (s390_override_options_after_change): Call s390_default align.
16049 (s390_option_override_internal): Call s390_default_align.
16050 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
16052 2018-07-17 Jakub Jelinek <jakub@redhat.com>
16054 PR middle-end/86542
16055 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
16056 to _looptemp_ clauses, other than the first two.
16058 2018-07-17 Martin Liska <mliska@suse.cz>
16060 * opts.c: Do not enable OPT_falign_* for -Os.
16062 2018-07-17 Martin Liska <mliska@suse.cz>
16064 * align.h (MAX_CODE_ALIGN): New.
16065 (MAX_CODE_ALIGN_VALUE): New.
16066 * common/config/i386/i386-common.c (ix86_handle_option):
16067 (MAX_CODE_ALIGN): Moved to align.h.
16068 * final.c (MAX_CODE_ALIGN): Likewise.
16069 * opts.c (parse_and_check_align_values):
16070 (MAX_CODE_ALIGN): Likewise.
16071 (MAX_CODE_ALIGN_VALUE): Likewise.
16073 2018-07-17 Martin Liska <mliska@suse.cz>
16075 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
16076 in order to fulfil coding style.
16077 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
16078 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16079 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
16080 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
16081 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
16082 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
16083 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
16084 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
16085 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16087 2018-07-17 Martin Liska <mliska@suse.cz>
16089 * align.h: New file.
16090 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
16092 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
16093 align_flags of label_to_alignment.
16094 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
16096 * config/m68k/m68k.c: Do not use removed align_labels_value and
16098 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
16099 (LOOP_ALIGN): Likewise.
16100 (LABEL_ALIGN): Likewise.
16101 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
16102 Remove not used macro.
16103 (rs6000_loop_align): Change return type to align_flags.
16104 (rs6000_loop_align_max_skip): Remove.
16105 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
16106 Change return type to align_flags.
16107 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
16108 Remove not used macro.
16109 (rs6000_loop_align): Change return type to align_flags.
16110 (rs6000_loop_align_max_skip): Remove.
16111 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
16112 * config/rx/rx-protos.h (rx_align_for_label): Make it
16114 * config/rx/rx.c (rx_align_for_label): Change return type
16116 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
16118 into align_flags class.
16119 (LABEL_ALIGN): Likewise.
16120 (LOOP_ALIGN): Likewise.
16121 * config/s390/s390.c (s390_label_align): Use align_flags
16123 (s390_asm_output_function_label): Likewise.
16124 * config/sh/sh.c (sh_override_options_after_change):
16125 Use align_flags class directly without macros.
16126 (find_barrier): Likewise.
16127 (barrier_align): Likewise.
16128 (sh_loop_align): Likewise.
16129 * config/spu/spu.c (spu_option_override):
16130 Use align_flags_tuple::get_value instead of removed macros.
16131 (spu_sched_init): Likewise.
16132 * config/spu/spu.h (GTY): Likewise.
16133 * config/visium/visium.c (visium_option_override):
16134 Set "8" as default secondary alignment.
16135 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
16136 in order to guarantee secondary alignment of 8.
16137 * coretypes.h: Include align.h header file.
16138 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
16139 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
16140 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
16141 * doc/tm.texi.in: Likewise.
16142 * final.c (struct label_alignment): Remove not used structure.
16143 (LABEL_ALIGN): Change type to align_flags.
16144 (LOOP_ALIGN): Likewise.
16145 (JUMP_ALIGN): Likewise.
16146 (default_loop_align_max_skip): Remove.
16147 (default_label_align_max_skip): Likewise.
16148 (default_jump_align_max_skip): Likewise.
16149 (default_label_align_after_barrier_max_skip):
16150 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
16151 (LABEL_TO_MAX_SKIP): Remove.
16152 (label_to_alignment): Return align_flags type instead of integer.
16153 (label_to_max_skip): Remove.
16154 (align_fuzz): Use align_flags type.
16155 (compute_alignments): Use align_flags type and use align_flags::max
16156 to combine multiple alignments.
16157 (grow_label_align): Grow vec instead of C array.
16158 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
16159 (shorten_branches): Use align_flags type and use align_flags::max
16160 to combine multiple alignments.
16161 (final_scan_insn_1): Remove usage of secondary alignment that comes
16162 from label alignment, but instead use proper secondary alignment
16163 which is computed in grow_label_align.
16164 * flags.h (struct align_flags_tuple): Move to align.h.
16165 (struct align_flags): Likewise.
16166 (state_align_loops): Rename to align_loops.
16167 (state_align_jumps): Rename to align_jumps.
16168 (state_align_labels): Rename to align_labels.
16169 (state_align_functions): Rename to align_functions.
16170 (align_loops_log): Remove.
16171 (align_jumps_log): Remove.
16172 (align_labels_log): Remove.
16173 (align_functions_log): Remove.
16174 (align_loops_max_skip): Remove.
16175 (align_jumps_max_skip): Remove.
16176 (align_labels_max_skip): Remove.
16177 (align_functions_max_skip): Remove.
16178 (align_loops_value): Remove.
16179 (align_jumps_value): Remove.
16180 (align_labels_value): Remove.
16181 (align_functions_value): Remove.
16182 * output.h (label_to_alignment): Change return type to align_flags.
16183 (label_to_max_skip): Remove.
16184 * target.def: Remove loop_align_max_skip, label_align_max_skip,
16185 jump_align_max_skip macros.
16186 * targhooks.h (default_loop_align_max_skip): Remove.
16187 (default_label_align_max_skip): Likewise.
16188 (default_jump_align_max_skip): Likewise.
16189 (default_label_align_after_barrier_max_skip): Remove.
16190 * toplev.c (read_log_maxskip): Use ::normalize function.
16191 (parse_N_M): Remove not used argument and also call ::normalize.
16192 (parse_alignment_opts): Do not pass unused arguments.
16193 * varasm.c (assemble_start_function): Use directly align_functions
16194 instead of removed macros.
16195 * system.h: Do not poison removed macros.
16197 2018-07-17 Jakub Jelinek <jakub@redhat.com>
16199 PR middle-end/86539
16200 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
16201 and cond temporaries don't have reference type if iterator has
16202 pointer type. For init use &for_pre_body instead of pre_p if
16203 for_pre_body is non-empty.
16205 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
16207 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
16208 double-double modes to SFmode directly directly.
16209 (trunc<mode>sf2_fprs): Delete.
16211 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
16213 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
16214 for conversions between IFmode and the decimal floating point modes.
16215 (init_float128_ieee): Use the correct names for conversions between
16216 KFmode and the decimal floating point modes.
16218 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
16220 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
16221 for the conversions between TDmode and IFmode.
16222 (init_float128_ieee): Use more correct names for the conversions
16223 between TDmode and KFmode.
16225 2018-07-16 Jakub Jelinek <jakub@redhat.com>
16227 PR tree-optimization/86526
16228 * builtins.c (expand_builtin_memcmp): Formatting fixes.
16229 (inline_expand_builtin_string_cmp): Likewise.
16230 (inline_string_cmp): Likewise. Use c_readstr instead of
16231 builtin_memcpy_read_str. Add unit_mode temporary.
16233 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
16235 PR middle-end/86528
16236 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
16237 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
16239 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
16241 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
16242 Alphabetize prototypes of built-in functions, separating out
16243 built-in functions that are listed in this section but should be
16244 described elsewhere.
16246 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
16249 * expmed.c (emit_store_flag): Do not emit setcc followed by a
16250 conditional move when trapping comparison was split to a
16251 non-trapping one (and vice versa).
16253 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
16255 * config/s390/s390.c (s390_function_profiler): Generate nops
16256 instead of profiler call sequences.
16257 * config/s390/s390.opt: Add the new option.
16259 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
16261 * config/s390/s390.c (s390_function_profiler): Generate
16262 __mcount_loc section.
16263 * config/s390/s390.opt: Add the new option.
16265 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
16267 * common.opt: Add the new warning.
16268 * config/s390/s390.c (s390_function_profiler): Emit "brasl
16269 %r0,__fentry__" when -mfentry is specified.
16270 (s390_option_override_internal): Disallow -mfentry for 31-bit
16272 * config/s390/s390.opt: Add the new option.
16274 2018-07-16 Richard Biener <rguenther@suse.de>
16277 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
16278 for function-local FUNCTION_DECL and RESULT_DECL immediately.
16280 2018-07-16 Martin Liska <mliska@suse.cz>
16283 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
16286 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
16288 * config/arc/arcHS.md: Update ARCHS scheduling rules.
16290 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
16292 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
16294 * config/arc/arc-cpus.def (hs4x): New cpu.
16296 * config/arc/arc-tables.opt: Regenerate.
16297 * config/arc/arc.c (arc_sched_issue_rate): New function.
16298 (TARGET_SCHED_ISSUE_RATE): Define.
16299 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
16300 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
16302 (attr tune): Add ARCHS4x tune values.
16303 (attr tune_dspmpy): Define.
16304 (*tst): Correct instruction type.
16305 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
16306 * config/arc/arcHS4x.md: New file.
16307 * config/arc/fpu.md: Update instruction type attributes.
16308 * config/arc/t-multilib: Regenerate.
16310 2018-07-16 Tom de Vries <tdevries@suse.de>
16313 * var-tracking.c (vt_initialize): Fix pre_dec handling.
16315 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16317 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
16320 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
16322 PR tree-optimization/86514
16323 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
16324 conversion to a boolean type from a type with greater precision.
16326 2018-07-16 Tom de Vries <tdevries@suse.de>
16328 * var-tracking.c (vt_initialize): Print adjusted insn slim if
16329 dump_flags request TDF_SLIM.
16331 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
16333 * fold-const.c (int_const_binop_1): Abstract...
16334 (wide_int_binop): ...wide int code here.
16335 (poly_int_binop): ...poly int code here.
16336 Abstract the rest of int_const_binop_1 into int_const_binop.
16337 * fold-const.h (wide_int_binop): New.
16338 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
16339 Remove useless PLUS/MINUS_EXPR case.
16340 (zero_nonzero_bits_from_vr): Move wide int code...
16341 (zero_nonzero_bits_from_bounds): ...here.
16342 (extract_range_from_binary_expr_1): Move mask optimization code...
16343 (range_easy_mask_min_max): ...here.
16344 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
16345 (range_easy_mask_min_max): New.
16347 2018-07-15 Jeff Law <law@redhat.com>
16350 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
16353 2018-07-14 Jim Wilson <jimw@sifive.com>
16355 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
16357 2018-07-14 Paul Koning <ni1d@arrl.net>
16359 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
16361 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
16363 * lto-streamer-out.c (copy_function_or_variable): Dump info about
16366 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
16367 Steve Munroe <munroesj52@gmail.com>
16369 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
16370 (_mm_andnot_si128): Likewise.
16371 (_mm_or_si128): Likewise.
16372 (_mm_xor_si128): Likewise.
16374 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
16376 PR middle-end/78809
16377 * builtins.c (expand_builtin_memcmp): Inline the calls first
16378 when result_eq is false.
16379 (expand_builtin_strcmp): Inline the calls first.
16380 (expand_builtin_strncmp): Likewise.
16381 (inline_string_cmp): New routine. Expand a string compare
16382 call by using a sequence of char comparison.
16383 (inline_expand_builtin_string_cmp): New routine. Inline expansion
16384 a call to str(n)cmp/memcmp.
16385 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
16387 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
16389 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
16391 * config/arm/driver-arm.c: Include arm-native.h.
16392 (host_detect_local_cpu): Use auto-generated data tables.
16393 (vendors, arm_cpu_table): Delete. Move part information to ...
16394 * config/arm/arm-cpus.in: ... here.
16395 * config/arm/parsecpu.awk (gen_native): New function.
16396 (vendor, part): New CPU fields.
16397 (END): Add support for building the native CPU detection tables.
16398 * config/arm/t-arm (arm-native.h): Add build rule.
16399 (driver-arm.o): Add dependency on arm-native.h.
16401 2018-07-13 Richard Biener <rguenther@suse.de>
16403 PR middle-end/85974
16404 * match.pd (addr1 - addr2): Allow either of the operand to
16407 2018-07-13 Tom de Vries <tdevries@suse.de>
16409 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
16412 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
16414 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
16415 arrays instead of numbered variables.
16417 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
16419 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
16420 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
16422 2018-07-13 Richard Biener <rguenther@suse.de>
16425 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
16426 instead of get_context_die.
16428 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
16429 Richard Biener <rguenther@suse.de>
16431 PR middle-end/86489
16432 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
16433 that the loop latch destination where phi is defined.
16435 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
16437 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
16438 (riscv_expand_epilogue): Add assertion to check interrupt mode.
16439 (riscv_set_current_function): Extract getting interrupt type to new
16441 (riscv_get_interrupt_type): New function.
16442 (riscv_merge_decl_attributes): New function, checking interrupt type is
16444 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
16446 2018-07-12 Paul Koning <ni1d@arrl.net>
16448 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
16451 2018-07-12 Paul Koning <ni1d@arrl.net>
16453 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
16454 zero reference, add doloop_end instead.
16455 * doc/md.texi (decrement_and_branch_until_zero): Remove.
16456 (Looping patterns): Remove decrement_and_branch_until_zero. Add
16457 detail for doloop_end.
16459 2018-07-12 Martin Sebor <msebor@redhat.com>
16462 * attribs.c (decl_attributes): Reject conflicting attributes before
16463 calling attribute handlers.
16465 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
16467 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
16469 (gcc::dump_manager::get_dump_file_name): likewise.
16470 (dump_begin): Likewise.
16471 * dumpfile.h (dump_begin): Update prototype.
16472 (gcc::dump_manager::get_dump_file_name,
16473 gcc::dump_manager::get_dump_file_name): Update prototype.
16475 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16477 * internal-fn.h (vectorizable_internal_fn_p): New function.
16478 * tree-vect-slp.c (compatible_calls_p): Likewise.
16479 (vect_build_slp_tree_1): Remove nops argument. Handle calls
16480 to internal functions.
16481 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
16483 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16485 * fold-const.h (inverse_conditions_p): Declare.
16486 * fold-const.c (inverse_conditions_p): New function.
16487 * match.pd: Use inverse_conditions_p. Add folds of view_converts
16488 that test the inverse condition of a conditional internal function.
16489 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
16490 * internal-fn.c (internal_fn_mask_index): Handle conditional
16491 internal functions.
16492 (vectorized_internal_fn_supported_p): New function.
16493 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
16494 (any_pred_load_store): Replace with...
16495 (need_to_predicate): ...this new variable.
16496 (redundant_ssa_names): New variable.
16497 (ifcvt_can_use_mask_load_store): Move initial checks to...
16498 (ifcvt_can_predicate): ...this new function. Handle tree codes
16499 for which a conditional internal function exists.
16500 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
16501 instead of ifcvt_can_use_mask_load_store. Update after variable
16503 (predicate_load_or_store): New function, split out from
16504 predicate_mem_writes.
16505 (check_redundant_cond_expr): New function.
16506 (value_available_p): Likewise.
16507 (predicate_rhs_code): Likewise.
16508 (predicate_mem_writes): Rename to...
16509 (predicate_statements): ...this. Use predicate_load_or_store
16510 and predicate_rhs_code.
16511 (combine_blocks, tree_if_conversion): Update after above name changes.
16512 (ifcvt_local_dce): Handle redundant_ssa_names.
16513 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
16514 general conditional functions.
16515 * tree-vect-stmts.c (vectorizable_call): Likewise.
16517 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16518 Alan Hayward <alan.hayward@arm.com>
16519 David Sherwood <david.sherwood@arm.com>
16521 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
16522 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
16523 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
16524 plus and minus and convert them into IFN_COND_FMA-based sequences.
16525 (convert_mult_to_fma): Handle conditional plus and minus.
16527 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16529 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
16530 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
16531 (cond_fnms_optab): New optabs.
16532 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
16533 internal functions.
16534 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
16535 * internal-fn.h (get_conditional_internal_fn): Declare.
16536 (get_unconditional_internal_fn): Likewise.
16537 * internal-fn.c (cond_ternary_direct): New macro.
16538 (expand_cond_ternary_optab_fn): Likewise.
16539 (direct_cond_ternary_optab_supported_p): Likewise.
16540 (FOR_EACH_COND_FN_PAIR): Likewise.
16541 (get_conditional_internal_fn): New function.
16542 (get_unconditional_internal_fn): Likewise.
16543 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
16544 (gimple_match_op::gimple_match_op): Add a new overload for 5
16546 (gimple_match_op::set_op): Likewise.
16547 (gimple_resimplify5): Declare.
16548 * genmatch.c (decision_tree::gen): Generate simplifications for
16550 * gimple-match-head.c (gimple_simplify): Define an overload for
16551 5 operands. Handle calls with 5 arguments in the top-level overload.
16552 (convert_conditional_op): Handle conversions from unconditional
16553 internal functions to conditional ones.
16554 (gimple_resimplify5): New function.
16555 (build_call_internal): Pass a fifth operand.
16556 (maybe_push_res_to_seq): Likewise.
16557 (try_conditional_simplification): Try converting conditional
16558 internal functions to unconditional internal functions.
16559 Handle 3-operand unconditional forms.
16560 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
16561 Define ternary equivalents of the current rules for binary conditional
16562 internal functions.
16563 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
16564 ternary operations.
16565 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
16566 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
16567 (optab): Handle them.
16568 (SVE_COND_FP_TERNARY): New int iterator.
16569 (sve_fmla_op, sve_fmad_op): New int attributes.
16570 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
16571 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
16572 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
16574 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
16576 * target.def (preferred_else_value): New target hook.
16577 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
16578 * doc/tm.texi: Regenerate.
16579 * targhooks.h (default_preferred_else_value): Declare.
16580 * targhooks.c (default_preferred_else_value): New function.
16581 * internal-fn.h (conditional_internal_fn_code): Declare.
16582 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
16583 (get_conditional_internal_fn): Use it.
16584 (conditional_internal_fn_code): New function.
16585 * gimple-match.h (gimple_match_cond): New struct.
16586 (gimple_match_op): Add a cond member function.
16587 (gimple_match_op::gimple_match_op): Update all forms to take a
16589 * genmatch.c (expr::gen_transform): Use the same condition as res_op
16590 for the suboperation, but don't specify a particular else_value.
16591 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
16592 (visit_nary_op, visit_reference_op_load): Pass
16593 gimple_match_cond::UNCOND to the gimple_match_op constructor.
16594 * gimple-match-head.c: Include tree-eh.h
16595 (convert_conditional_op): New function.
16596 (maybe_resimplify_conditional_op): Likewise.
16597 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
16598 (gimple_resimplify2): Likewise.
16599 (gimple_resimplify3): Likewise.
16600 (gimple_resimplify4): Likewise.
16601 (maybe_push_res_to_seq): Return null for conditional operations.
16602 (try_conditional_simplification): New function.
16603 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
16605 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
16607 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
16609 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
16611 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
16613 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
16615 (hash_tree): Do not hash DECL_FCONTEXT
16616 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
16617 Do not stream DECL_FCONTEXT.
16618 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
16619 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
16621 2018-07-12 Richard Biener <rguenther@suse.de>
16624 * dwarf2out.c (gen_block_die): Only output blocks when they have
16625 at least one !DECL_IGNORED_P variable.
16627 2018-07-12 Richard Biener <rguenther@suse.de>
16630 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
16631 Remove -mieee-fp handling.
16633 2018-07-12 Richard Biener <rguenther@suse.de>
16635 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
16636 left-over from last patch.
16638 2018-07-12 Jakub Jelinek <jakub@redhat.com>
16640 PR tree-optimization/86492
16641 * gimple-ssa-store-merging.c
16642 (imm_store_chain_info::coalesce_immediate_stores): Call
16643 check_no_overlap even for the merge_overlapping case. Formatting fix.
16645 2018-07-12 Richard Biener <rguenther@suse.de>
16647 PR middle-end/86479
16648 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
16649 move possibly trapping operations into the conditional.
16651 2018-07-12 Richard Biener <rguenther@suse.de>
16653 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
16654 (vn_lookup_simplify_result): Remove recursion limit applied
16656 (vn_nary_build_or_lookup_1): Adjust.
16657 (try_to_simplify): Likewise.
16658 * gimple-match-head.c (gimple_resimplify1): Instead apply one
16660 (gimple_resimplify2): Likewise.
16661 (gimple_resimplify3): Likewise.
16662 (gimple_resimplify4): Likewise.
16664 2018-07-11 Jakub Jelinek <jakub@redhat.com>
16666 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
16667 Use __mmask64 type instead of __mmask8 for __M argument.
16668 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
16669 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
16671 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
16672 __mmask16 for __M argument.
16673 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
16674 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
16675 to __mmask16 instead of __mmask8.
16676 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
16677 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
16678 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
16679 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
16680 instead of __mmask16 for __U argument.
16681 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
16682 __mmask16 instead of __mmask8 for __U argument.
16683 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
16685 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
16687 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
16689 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
16691 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
16693 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
16695 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
16697 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
16699 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
16701 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
16703 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
16704 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
16705 return type as well as __M argument type and all casts from __mmask8
16707 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
16708 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
16709 return type as well as __M argument type and all casts from __mmask8
16711 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
16712 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
16713 return type as well as __M argument type and all casts from __mmask8
16715 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
16716 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
16717 return type as well as __M argument type and all casts from __mmask8
16719 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
16720 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
16723 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
16725 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
16726 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
16729 2018-07-11 Paul Koning <ni1d@arrl.net>
16731 * doc/md.texi (define_subst): Document how multiple occurrences of
16732 the same argument in the replacement pattern are handled.
16734 2018-07-11 Paul Koning <ni1d@arrl.net>
16736 * doc/extend.texi (Common Variable Attributes): Move "mode" into
16737 alphabetical order.
16738 (Common Type Attributes): Add "mode" attribute.
16740 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
16742 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
16743 stream DECL_ORIGINAL_TYPE.
16744 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
16745 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
16746 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
16747 Do not walk original type.
16748 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
16750 (write_ts_decl_non_common_tree_pointers): Do not stream
16752 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
16753 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
16755 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
16757 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
16758 thread twice from the same starting edge.
16760 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
16762 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
16763 * gimple.c (gimple_call_nonnull_result_p): ...here...
16764 (gimple_call_nonnull_arg): ...and here.
16765 * gimple.h (gimple_call_nonnull_result_p): New.
16766 (gimple_call_nonnull_arg): New.
16768 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
16770 * config/arm/arm-cpus.in: Move information from fpu field of each
16771 cpu definition to the isa field.
16772 * config/arm/parsecpu.awk (fpu): Delete match rule.
16773 (gen_comm_data): Don't add bits from the CPU's FPU entry.
16775 2018-07-11 Richard Biener <rguenther@suse.de>
16778 * dwarf2out.c (init_sections_and_labels): Use
16779 output_asm_line_debug_info consistently.
16780 (dwarf2out_early_finish): Likewise.
16781 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
16784 2018-07-11 Richard Biener <rguenther@suse.de>
16786 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
16787 Rework father_bb setting in a way to avoid propagating constants
16788 multiple times on a loop body.
16790 2018-07-10 Mark Wielaard <mark@klomp.org>
16793 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
16795 2018-07-10 Richard Biener <rguenther@suse.de>
16797 * hash-map.h (hash_map::iterator::operator*): Return
16798 references to key and value.
16800 2018-07-10 Jakub Jelinek <jakub@redhat.com>
16803 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
16804 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
16805 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
16806 (gimplify_omp_for): For composite loops, move outer
16807 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
16808 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
16809 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
16810 TREE_LIST for both the original class iterator and the "last" helper
16811 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
16812 loop, remember has_decl_expr from outer composite loops for the
16813 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
16815 2018-07-09 Martin Sebor <msebor@redhat.com>
16817 PR middle-end/77357
16818 PR middle-end/86428
16819 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
16820 accessing implicitly initialized array elements.
16821 * expr.c (string_constant): Handle string initializers of
16822 character arrays within aggregates.
16823 * gimple-fold.c (fold_array_ctor_reference): Add argument.
16824 Store element offset. As a special case, handle zero size.
16825 (fold_nonarray_ctor_reference): Same.
16826 (fold_ctor_reference): Add argument. Store subobject offset.
16827 * gimple-fold.h (fold_ctor_reference): Add argument.
16829 2018-07-09 Paul Koning <ni1d@arrl.net>
16831 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
16832 (pdp11_insn_cost): New function.
16833 (pdp11_md_asm_adjust): New function.
16834 (TARGET_INVALID_WITHIN_DOLOOP): Define.
16835 (pdp11_rtx_costs): Update to match machine better.
16836 (output_addr_const_pdp11): Correct format mismatch warnings.
16837 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
16838 * config/pdp11/pdp11.md: General change to add base_cost and/or
16839 length attributes for use by new pdp11_insn_cost function.
16840 (MIN_BRANCH): Correct definition.
16842 (doloop_end): Use standard pattern name for looping pattern.
16843 (doloop_end_nocc): New.
16844 (movsf): Add another constraint alternative.
16845 (zero_extendqihi2): Add constraint alternatives for not in place
16847 (zero_extendhisi2): Remove.
16848 (shift patterns): Add CC handling variants.
16852 (define_peephole2): New peephole to recognize mov that sets CC for
16855 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16857 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
16858 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
16861 2018-07-09 Jakub Jelinek <jakub@redhat.com>
16864 * real.c (real_nextafter): Return true if result is denormal.
16866 2018-07-09 Martin Liska <mliska@suse.cz>
16868 * common.opt: Add back wrongly removed attribute.
16870 2018-07-09 Richard Biener <rguenther@suse.de>
16873 * dwarf2out.c (gen_block_die): For an early generated DIE
16874 always output high/low PC attributes.
16876 2018-07-09 Tom de Vries <tdevries@suse.de>
16878 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
16879 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
16880 onto VAR_DECL with abstract origin.
16882 2018-07-07 Jim Wilson <jimw@sifive.com>
16884 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
16886 2018-07-07 Tom de Vries <tdevries@suse.de>
16888 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
16890 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
16892 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
16894 (combine_bound): Use wide-int overflow calculation instead of
16896 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
16898 * fold-const.c (int_const_binop_2): Same.
16899 (extract_muldiv_1): Same.
16900 (fold_div_compare): Same.
16901 (fold_abs_const): Same.
16903 * poly-int.h (add): Same.
16907 * predict.c (predict_iv_comparison): Same.
16908 * profile-count.c (slow_safe_scale_64bit): Same.
16909 * simplify-rtx.c (simplify_const_binary_operation): Same.
16910 * tree-chrec.c (tree_fold_binomial): Same.
16911 * tree-data-ref.c (split_constant_offset_1): Same.
16912 * tree-if-conv.c (idx_within_array_bound): Same.
16913 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
16914 * tree-ssa-phiopt.c (minmax_replacement): Same.
16915 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
16916 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
16917 * vr-values.c (vr_values::adjust_range_with_scev): Same.
16918 * wide-int.cc (wi::add_large): Same.
16919 (wi::mul_internal): Same.
16920 (wi::sub_large): Same.
16921 (wi::divmod_internal): Same.
16922 * wide-int.h: Change overflow type to overflow_type for neg, add,
16923 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
16924 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
16925 mul_internal, divmod_internal.
16926 (overflow_type): New enum.
16927 (accumulate_overflow): New.
16929 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
16931 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
16932 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
16934 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
16936 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
16937 argument is checked for zero before entering loop, avoid checking again.
16939 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
16941 * gimplify.h (generic_expr_could_trap_p): Set as global function.
16942 * gimplify.h (generic_expr_could_trap_p): Likwise.
16943 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
16945 2018-07-06 Jakub Jelinek <jakub@redhat.com>
16947 PR tree-optimization/86401
16948 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
16949 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
16950 (fold_bit_and_mask): ... here. New helper function for match.pd.
16951 * fold-const.h (fold_bit_and_mask): Declare.
16952 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
16954 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
16957 * target.def (translate_mode_attribute): New hook.
16958 * targhooks.h (default_translate_mode_attribute): Declare.
16959 * targhooks.c (default_translate_mode_attribute): New function.
16960 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
16961 * doc/tm.texi: Regenerate.
16962 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
16963 (rs6000_translate_mode_attribute): New function.
16965 2018-07-06 Paul Koning <ni1d@arrl.net>
16967 * doc/md.texi (define_split): Document DONE and FAIL.
16968 (define_peephole2): Ditto.
16970 2018-07-05 Jeff Law <law@redhat.com>
16972 PR tree-optimization/86010
16973 * tree-ssa-dse.c (compute_trims): More aggressively trim at
16974 both the head and tail of mem* and str* calls.
16976 2018-07-05 Jim Wilson <jimw@sifive.com>
16978 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
16980 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
16982 * config/aarch64/aarch64-simd.md: correct flags text for
16983 MIN_EXPR replacement.
16985 2018-07-05 James Clarke <jrtc27@jrtc27.com>
16987 * configure: Regenerated.
16989 2018-07-05 Carl Love <cel@us.ibm.com>
16991 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
16992 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
16993 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
16994 VSX_BUILTIN_DOUBLEL_V4SF.
16996 2018-07-05 Martin Sebor <msebor@redhat.com>
16999 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
17000 than its domain to compute its the upper bound of a char array.
17002 2018-07-05 Nathan Sidwell <nathan@acm.org>
17004 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
17005 * doc/cpp.texi: Update comment.
17006 * doc/tm.texi: Rebuilt.
17007 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
17008 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
17009 * doc/extend.texi (Backwards Compatibility): Clarify it is system
17010 headers affected by extern "C".
17011 * system.h: Poison NO_IMPLICIT_EXTERN_C.
17012 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
17013 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
17014 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
17015 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
17016 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
17017 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
17018 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
17019 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
17020 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
17021 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
17022 config/sparc/sp64-elf.h, config/spu/spu.h,
17023 config/stormy16/stormy16.h, config/v850/v850.h,
17024 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
17025 define NO_IMPLICIT_EXTERN_C.
17026 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
17028 2018-07-05 Tamar Christina <tamar.christina@arm.com>
17031 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
17032 instead of GET_MODE_SIZE when comparing Units.
17034 2018-07-05 Tamar Christina <tamar.christina@arm.com>
17037 * rtlanal.c (set_noop_p): Constrain on mode change,
17038 include hard-reg-set.h
17040 2018-07-05 Tamar Christina <tamar.christina@arm.com>
17042 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
17044 2018-07-05 Jakub Jelinek <jakub@redhat.com>
17047 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
17050 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
17052 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
17054 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
17057 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
17059 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
17061 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
17063 PR middle-end/86380
17064 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
17066 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
17068 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
17069 neg_*_op* variables.
17071 2018-07-04 Martin Liska <mliska@suse.cz>
17073 * tree-switch-conversion.c: Define
17074 max_ratio_for_speed and max_ratio_for_size constants.
17076 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
17077 Martin Liska <mliska@suse.cz>
17079 PR middle-end/66240
17082 * common.opt: Rename align options with 'str_' prefix.
17083 * common/config/i386/i386-common.c (set_malign_value): New
17085 (ix86_handle_option): Use it to set -falign-* options/
17086 * config/aarch64/aarch64-protos.h (struct tune_params): Change
17087 type from int to string.
17088 * config/aarch64/aarch64.c: Update default values from int
17090 * config/alpha/alpha.c (alpha_override_options_after_change):
17092 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
17093 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17094 max skip conditionally.
17095 * config/i386/freebsd.h (SUBALIGN_LOG): New.
17096 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17097 max skip conditionally.
17098 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17099 max skip conditionally.
17100 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
17101 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17102 max skip conditionally.
17103 * config/i386/i386.c (struct ptt): Change type from int to
17105 (ix86_default_align): Set default values.
17106 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
17107 max skip conditionally.
17108 * config/i386/iamcu.h (SUBALIGN_LOG): New.
17109 (ASM_OUTPUT_MAX_SKIP_ALIGN):
17110 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
17111 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17112 max skip conditionally.
17113 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
17114 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
17115 * config/i386/x86-64.h (SUBALIGN_LOG): New.
17116 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
17117 max skip conditionally.
17118 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
17119 * config/ia64/ia64.c (ia64_option_override): Set default values
17120 for alignment options.
17121 * config/m68k/m68k.c: Handle new str_align_* options.
17122 * config/mips/mips.c (mips_set_compression_mode): Change
17124 (mips_option_override): Set default values for options.
17125 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
17127 * config/rs6000/rs6000.c (rs6000_option_override_internal):
17129 * config/rx/rx.c (rx_option_override): Likewise.
17130 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
17131 (LABEL_ALIGN): Use align_labels_log.
17132 (LOOP_ALIGN): Use align_loops_align.
17133 * config/s390/s390.c (s390_asm_output_function_label): Use new
17135 * config/sh/sh.c (sh_override_options_after_change):
17136 Change type of constants.
17137 * config/spu/spu.c (spu_sched_init): Likewise.
17138 * config/sparc/sparc.c (sparc_option_override): Set default
17139 values for options.
17140 * config/visium/visium.c (visium_option_override): Likewise.
17141 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
17142 emit p2align format with last argument if it's not needed.
17143 * doc/invoke.texi: Document extended format of -falign-*.
17144 * final.c: Use align_labels alignment.
17145 * flags.h (struct target_flag_state): Change type to use
17147 (struct align_flags_tuple): New.
17148 (struct align_flags): Likewise.
17149 (align_loops_log): Redefine macro to use new types.
17150 (align_loops_max_skip): Redefine macro to use new types.
17151 (align_jumps_log): Redefine macro to use new types.
17152 (align_jumps_max_skip): Redefine macro to use new types.
17153 (align_labels_log): Redefine macro to use new types.
17154 (align_labels_max_skip): Redefine macro to use new types.
17155 (align_functions_log): Redefine macro to use new types.
17156 (align_loops): Redefine macro to use new types.
17157 (align_jumps): Redefine macro to use new types.
17158 (align_labels): Redefine macro to use new types.
17159 (align_functions): Redefine macro to use new types.
17160 (align_functions_max_skip): Redefine macro to use new types.
17161 (align_loops_value): New macro.
17162 (align_jumps_value): New macro.
17163 (align_labels_value): New macro.
17164 (align_functions_value): New macro.
17165 * function.c (invoke_set_current_function_hook): Propagate
17166 alignment values from flags to global variables default in
17168 * ipa-icf.c (sem_function::equals_wpa): Use
17169 cl_optimization_option_eq instead of memcmp.
17170 * lto-streamer.h (cl_optimization_stream_out): Support streaming
17172 (cl_optimization_stream_in): Likewise.
17173 * optc-save-gen.awk: Support strings in cl_optimization.
17174 * opth-gen.awk: Likewise.
17175 * opts.c (finish_options): Remove error checking of invalid
17177 (MAX_CODE_ALIGN): Remove.
17178 (MAX_CODE_ALIGN_VALUE): Likewise.
17179 (parse_and_check_align_values): New function.
17180 (check_alignment_argument): Likewise.
17181 (common_handle_option): Use check_alignment_argument.
17182 * opts.h (parse_and_check_align_values): Declare.
17183 * toplev.c (init_alignments): Remove.
17184 (read_log_maxskip): New.
17185 (parse_N_M): Likewise.
17186 (parse_alignment_opts): Likewise.
17187 (backend_init_target): Remove usage of init_alignments.
17188 * toplev.h (parse_alignment_opts): Declare.
17189 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
17191 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
17192 * tree.c (cl_option_hasher::equal): New.
17193 * varasm.c: Use new global macros.
17195 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
17197 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
17198 Use a simpler align directive also if MAXSKIP = ALIGN-1.
17199 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17200 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17201 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17202 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
17203 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
17204 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
17205 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
17206 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17207 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17208 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17209 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
17211 2018-07-04 Martin Liska <mliska@suse.cz>
17212 Jonathan Wakely <jwakely@redhat.com>
17214 * coverage.c: Use correct type.
17215 * doc/invoke.texi: Language correction.
17217 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
17220 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
17221 ENDBRANCH for non-tail call which may return via indirect branch.
17222 * doc/extend.texi: Document indirect_return attribute.
17224 2018-07-03 Martin Sebor <msebor@redhat.com>
17226 PR tree-optimization/86274
17227 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
17229 (format_floating): Correct handling of infinities and NaNs.
17231 2018-07-03 Martin Sebor <msebor@redhat.com>
17233 * print-tree.c (print_real_cst): New function.
17234 (print_node_brief): Call it.
17235 (print_node): Ditto.
17237 2018-07-03 Jeff Law <law@redhat.com>
17239 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
17240 into a single pattern.
17242 * config/h8300/h8300.md (ors code_iterator): New.
17243 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
17244 a single pattern and single splitter.
17245 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
17246 (iorqi3_1, xorqi3_1): Likewise.
17247 (iorqi3, xorqi3 expanders): Similarly.
17249 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
17250 (movmd_internal) into a single pattern using the P mode iterator.
17251 (movmd splitters): Similarly.
17252 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
17253 (movsd splitters): Similarly.
17255 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
17256 ADDB, ADDW and ADDL into a single ADD attribute which selects the
17257 right table based on the size of the operand.
17258 * config/h8300/h8300.md (length_table): Corresponding changes. All
17259 references to "addb", "addw" and "addl" changed to "add".
17260 (btst patterns): Merge two variants into a single pattern.
17261 (tstqi, tsthi): Likewise.
17262 (addhi3_incdec, addsi3_incdec): Likewise.
17263 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
17264 (mulhi3, mulsi3): Likewise.
17265 (udivhi3, udivsi3): Likewise.
17266 (divhi3, divsi3): Likewise.
17267 (andorqi3, andorhi3, andorsi3): Likewise.
17269 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
17272 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
17273 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
17275 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17277 PR tree-optimization/85694
17278 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
17279 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
17281 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
17282 (<u>avg<mode>3_ceil): New patterns.
17284 2018-07-03 David Malcolm <dmalcolm@redhat.com>
17286 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
17287 scan-tree-dump directive.
17288 * gcc.dg/vect/slp-perm-2.c: Likewise.
17289 * gcc.dg/vect/slp-perm-3.c: Likewise.
17290 * gcc.dg/vect/slp-perm-5.c: Likewise.
17291 * gcc.dg/vect/slp-perm-6.c: Likewise.
17292 * gcc.dg/vect/slp-perm-7.c: Likewise.
17293 * gcc.dg/vect/slp-perm-8.c: Likewise.
17295 2018-07-03 Marek Polacek <polacek@redhat.com>
17297 PR middle-end/86202
17298 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
17300 2018-07-03 Richard Biener <rguenther@suse.de>
17303 * tree-ssa-structalias.c (find_func_clobbers): Properly
17304 handle indirect calls.
17306 2018-07-03 Jeff Law <law@redhat.com>
17308 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
17309 (shifts): New code iterator.
17310 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
17311 expander. Fix HImode handling on H8/SX.
17312 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
17313 (subqi3, subhi3, subsi3 expanders): Likewise.
17314 (andqi3, andhi3, andsi3 expanders): Likewise.
17315 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
17316 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
17317 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
17318 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
17319 (zero_extendqihi2, zero_extendqisi2): Likewise.
17320 (extendqihi2, extendqisi2): Likewise.
17321 (rotlqi3, rotlhi3, rotlsi3): Likewise.
17322 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
17323 (rotlqi3_1, rotlhi3_1): Likewise.
17324 (logicalhi3_sn, logicalsi3_sn): Likewise.
17325 (logicalhi3, logicalsi3): Likewise.
17327 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17329 * tree-vect-patterns.c (vect_recog_rotate_pattern)
17330 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
17331 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
17332 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
17333 type to append_pattern_def_seq instead of creating a stmt_vec_info
17335 (build_mask_conversion): Likewise. Remove vinfo argument.
17336 (vect_add_conversion_to_patterm): Likewise, renaming to...
17337 (vect_add_conversion_to_pattern): ...this.
17338 (vect_recog_mask_conversion_pattern): Update call to
17339 build_mask_conversion. Pass the vector type to
17340 append_pattern_def_seq here too.
17341 (vect_recog_gather_scatter_pattern): Update call to
17342 vect_add_conversion_to_pattern.
17344 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17346 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
17347 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
17348 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
17349 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
17350 STMT_VINFO_PATTERN_DEF_SEQ to null here.
17351 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
17352 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
17353 append_pattern_def_seq instead of new_pattern_def_seq.
17354 (vect_recog_divmod_pattern): Do both of the above.
17355 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
17358 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17360 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
17361 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
17362 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
17363 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
17364 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
17365 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
17366 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
17367 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
17368 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
17369 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
17370 parameter with a single stmt_vec_info.
17371 (vect_recog_func_ptr): Likewise.
17372 (vect_recog_gather_scatter_pattern): Likewise, folding in...
17373 (vect_try_gather_scatter_pattern): ...this.
17374 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
17375 the stmt_vec_info of the statement to be matched. Don't clear
17376 STMT_VINFO_RELATED_STMT.
17377 (vect_pattern_recog): Update call accordingly.
17379 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17381 PR tree-optimization/85694
17382 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
17383 (uavgM3_ceil): Document new optabs.
17384 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
17385 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
17387 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
17388 (savg_ceil_optab): New optabs.
17389 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
17390 (vect_vect_recog_func_ptrs): Add it.
17391 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
17392 constant directly from the associated lhs.
17394 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17396 * tree-vect-patterns.c (vect_split_statement): New function.
17397 (vect_convert_input): Use it to try to split an existing cast.
17399 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17401 * poly-int.h (print_hex): New function.
17402 * dumpfile.h (dump_dec, dump_hex): Declare.
17403 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
17404 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
17405 min_input_precision, operation_precision and operation_sign.
17406 * tree-vect-patterns.c (vect_get_range_info): New function.
17407 (vect_same_loop_or_bb_p, vect_single_imm_use)
17408 (vect_operation_fits_smaller_type): Delete.
17409 (vect_look_through_possible_promotion): Add an optional
17410 single_use_p parameter.
17411 (vect_recog_over_widening_pattern): Rewrite to use new
17412 stmt_vec_info infomration. Handle one operation at a time.
17413 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
17414 (vect_truncatable_operation_p, vect_set_operation_type)
17415 (vect_set_min_input_precision): New functions.
17416 (vect_determine_min_output_precision_1): Likewise.
17417 (vect_determine_min_output_precision): Likewise.
17418 (vect_determine_precisions_from_range): Likewise.
17419 (vect_determine_precisions_from_users): Likewise.
17420 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
17421 (vect_vect_recog_func_ptrs): Put over_widening first.
17423 (vect_pattern_recog): Call vect_determine_precisions.
17425 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
17427 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
17428 statements that have been replaced by further pattern statements.
17429 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
17431 2018-07-03 Richard Biener <rguenther@suse.de>
17433 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
17434 always set *dt. Dump vectype in vectype overload.
17435 * dumpfile.h (dump_gimple_expr): New function.
17436 (dump_gimple_expr_loc): Likewise.
17437 * dumpfile.c (dump_gimple_expr): New function.
17438 (dump_gimple_expr_loc): Likewise.
17440 2018-07-02 Jeff Law <law@redhat.com>
17442 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
17443 the H8/300, H8/300H and H8/S variants into a single pattern.
17444 (movhi_h8300, movqi_h8300hs): Similarly.
17445 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
17446 (QHI mode iterator): New.
17448 * config/h8300/h8300.md: Remove trailing whitespace.
17450 2018-07-02 Jim Wilson <jimw@sifive.com>
17452 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
17453 instead of emit_insn for interrupt returns.
17454 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
17455 (riscv_sret, riscv_uret): Likewise.
17457 2018-07-02 David Malcolm <dmalcolm@redhat.com>
17459 * pretty-print.c (selftest::test_pp_format): Move save and restore
17460 of quotes to class auto_fix_quotes, and add an instance.
17461 * selftest.c: Include "intl.h".
17462 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
17463 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
17464 * selftest.h (selftest::auto_fix_quotes): New class.
17466 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
17468 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
17469 (aarch64_sve_prepare_conditional_op): Remove.
17470 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
17471 Allow aarch64_simd_reg_or_zero as select operand; remove
17472 the aarch64_sve_prepare_conditional_op call.
17473 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
17474 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
17475 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
17476 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
17477 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
17478 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
17479 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
17480 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
17481 and a splitters to match all of the *_any patterns.
17482 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
17484 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
17485 (SVE_COND_FP_BINARY_REV): Remove.
17486 (sve_int_op_rev, sve_fp_op_rev): New.
17487 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
17488 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
17489 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
17490 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
17491 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
17492 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
17493 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
17494 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
17495 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
17497 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
17498 Remove match_dup 1 from the inner unspec.
17499 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
17501 * config/aarch64/aarch64.md (movprfx): New attr.
17502 (length): Default movprfx to 8.
17503 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
17504 (*madd<SVE_I>, *msub<SVE_I): Likewise.
17505 (*<su>mul<SVE_I>3_highpart): Likewise.
17506 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
17507 (*v<ASHIFT><SVE_I>3): Likewise.
17508 (*<su><MAXMIN><SVE_I>3): Likewise.
17509 (*<su><MAXMIN><SVE_F>3): Likewise.
17510 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
17511 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
17512 (*div<SVE_F>4): Likewise.
17514 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
17516 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
17519 2018-07-02 Richard Biener <rguenther@suse.de>
17521 PR tree-optimization/86363
17522 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
17523 memset argument refers to a non-variable address.
17525 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
17527 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
17528 {PLUS,MINUS}_EXPR code to...
17529 (adjust_symbolic_bound): ...here,
17530 (combine_bound): ...here,
17531 (set_value_range_with_overflow): ...and here.
17533 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
17535 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
17537 (extract_range_from_abs_expr): ...here.
17539 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
17541 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
17542 -fno-omit-frame-pointer when not optimizing.
17544 2018-07-02 Martin Liska <mliska@suse.cz>
17547 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
17548 (propagate_nothrow): Likewise.
17550 2018-07-02 Martin Liska <mliska@suse.cz>
17553 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
17555 2018-07-02 David Malcolm <dmalcolm@redhat.com>
17557 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
17558 function in r262149, changing "loc" param from source_location to
17559 const dump_location_t &.
17560 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
17561 declaration, as above.
17563 2018-07-01 Paul Koning <ni1d@arrl.net>
17565 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
17566 -munit-asm, -mgnu-asm, -mdec-asm.
17567 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
17568 (pdp11_output_labelref): New.
17569 (pdp11_output_def): New.
17570 (pdp11_output_addr_vec_elt): New.
17571 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
17572 %# and %@ format codes.
17573 (pdp11_option_override): New.
17574 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
17575 (pdp11_output_ident): New.
17576 (pdp11_asm_named_section): New.
17577 (pdp11_asm_init_sections): New.
17578 (pdp11_file_start): New.
17579 (pdp11_file_end): New.
17580 (output_ascii): Use .ascii/.asciz for -mdec-asm.
17581 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
17582 %o, like %c but octal.
17583 (pdp11_option_override): New.
17584 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
17586 (DATA_SECTION_ASM_OP): Ditto.
17587 (READONLY_DATA_SECTION_ASM_OP): New.
17588 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
17589 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
17590 (ASM_OUTPUT_LABELREF): Ditto.
17591 (ASM_OUTPUT_DEF): Ditto.
17592 (ASM_OUTPUT_EXTERNAL): New.
17593 (ASM_OUTPUT_SOURCE_FILENAME): New.
17594 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
17595 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
17596 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
17597 %# and %@ format codes.
17598 * config/pdp11/pdp11.opt (mgnu-asm): New.
17599 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
17600 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
17601 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
17603 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
17605 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
17606 dereferencing path[] beyond its length.
17608 (debug_all_paths): New.
17609 (rewire_first_differing_edge): New.
17610 (adjust_paths_after_duplication): New.
17611 (duplicate_thread_path): Call adjust_paths_after_duplication.
17613 (thread_through_all_blocks): Add new argument to
17614 duplicate_thread_path.
17616 2018-06-30 Jim Wilson <jimw@sifive.com>
17618 * config/riscv/predicates.md (p2m1_shift_operand): New.
17619 (high_mask_shift_operand): New.
17620 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
17621 pattern using p2m1_shift_operand.
17622 (lshsi3_zero_extend_3+2): New combiner pattern using
17623 high_mask_shift_operand.
17625 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17627 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
17629 (vect_recog_rotate_pattern): ...here.
17630 (vect_convert_input): Try to insert casts of invariants in the
17632 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
17633 preheader to be empty.
17635 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17637 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
17638 vector type. If given, install it in the new statement's
17639 STMT_VINFO_VECTYPE.
17640 (vect_element_precision): New function.
17641 (vect_unpromoted_value): New struct.
17642 (vect_unpromoted_value::vect_unpromoted_value): New function.
17643 (vect_unpromoted_value::set_op): Likewise.
17644 (vect_look_through_possible_promotion): Likewise.
17645 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
17646 (vect_widened_op_tree, vect_convert_input): Likewise.
17647 (vect_convert_inputs, vect_convert_output): Likewise.
17648 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
17649 to handle the optional cast of the multiplication result and
17650 vect_widened_op_tree to detect the widened multiplication itself.
17651 Do not require the input and output of promotion casts to have
17652 the same sign, but base the signedness of the operation on the
17653 input rather than the result. If the pattern includes two
17654 promotions, check that those promotions have the same sign.
17655 Do not restrict the MULT_EXPR handling to a double-width result;
17656 handle quadruple-width results and wider. Use vect_convert_inputs
17657 to convert the inputs to the common type.
17658 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
17659 to handle the optional cast of the ABS result. Also allow a sign
17660 change or a sign extension between the ABS and MINUS.
17661 Use vect_widened_op_tree to detect the widened subtraction and use
17662 vect_convert_inputs to convert the inputs to the common type.
17663 (vect_handle_widen_op_by_const): Delete.
17664 (vect_recog_widen_op_pattern): New function.
17665 (vect_recog_widen_mult_pattern): Use it.
17666 (vect_recog_widen_shift_pattern): Likewise.
17667 (vect_recog_widen_sum_pattern): Use
17668 vect_look_through_possible_promotion to handle the promoted
17671 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17673 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
17674 the containing gimple_seq *.
17675 * gimple-iterator.h (gsi_for_stmt): Declare it.
17676 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
17677 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
17678 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
17679 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
17680 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
17682 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
17684 (vect_mark_pattern_stmts): ...here. Handle cases in which the
17685 statement being replaced is part of an existing pattern
17686 definition sequence, inserting the new pattern statements before
17688 (vect_pattern_recog_1): Don't return a bool. If the statement
17689 is already part of a pattern, instead apply pattern matching
17690 to the pattern definition statements. Don't clear the
17691 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
17692 (vect_pattern_recog): Don't break after the first match;
17693 continue processing the pattern definition statements instead.
17694 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
17696 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17698 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17699 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
17700 (vect_recog_widen_sum_pattern): Use it.
17702 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17704 * tree-vect-loop.c (vectorizable_reduction): Assert that the
17705 phi is not a pattern statement and has not been replaced by
17706 a pattern statement.
17707 * tree-vect-patterns.c (type_conversion_p): Don't check
17708 STMT_VINFO_IN_PATTERN_P.
17709 (vect_recog_vector_vector_shift_pattern): Likewise.
17710 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
17711 the pattern statement rather than the original statement; check
17712 directly for a WIDEN_MULT_EXPR here.
17713 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
17714 vect_is_simple_use to return the pattern statement rather
17715 than the original statement; use is_pattern_stmt_p to check
17716 for such a pattern statement.
17717 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
17718 to return the pattern statement rather than the original statement;
17719 don't do the same transformation here.
17720 (vect_is_simple_use): If the defining statement has been replaced
17721 by a pattern statement, return the pattern statement instead.
17722 Remove the corresponding (local) transformation from the vectype
17725 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
17727 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
17728 end and default to null.
17729 * tree-vect-loop.c (vect_create_epilog_for_reduction)
17730 (vectorizable_reduction): Update calls accordingly, dropping the
17731 gimple ** argument if the passed-back statement isn't needed.
17732 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
17733 (vect_recog_rotate_pattern): Likewise.
17734 (vect_recog_mask_conversion_pattern): Likewise.
17735 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
17736 (vect_mask_constant_operand_p): Likewise.
17737 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
17738 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
17739 (get_group_load_store_type, get_load_store_type): Likewise.
17740 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
17741 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
17742 (vectorizable_conversion, vectorizable_assignment): Likewise.
17743 (vectorizable_shift, vectorizable_operation): Likewise.
17744 (vectorizable_store, vect_is_simple_cond): Likewise.
17745 (vectorizable_condition, vectorizable_comparison): Likewise.
17746 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
17747 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
17748 and move it to the end. Cope with null def_stmt_outs.
17750 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
17752 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
17754 2018-06-29 Jeff Law <law@redhat.com>
17756 * config/v850/v850.c (v850_legitimate_address_p): Handle large
17757 displacements for TARGET_V850E2V3 and newer.
17758 (TARGET_LRA_P): Remove. Defaults to LRA now.
17759 * config/v850/v850.md (sign23byte_load): Remove.
17760 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
17761 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
17763 2018-06-29 Martin Liska <mliska@suse.cz>
17766 * coverage.c (coverage_init): Mangle full path name.
17767 * doc/invoke.texi: Document the change.
17768 * gcov-io.c (mangle_path): New.
17769 * gcov-io.h (mangle_path): Likewise.
17770 * gcov.c (mangle_name): Use mangle_path for path mangling.
17772 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17774 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
17775 if starting source register is not even.
17777 2018-06-29 Martin Liska <mliska@suse.cz>
17779 PR tree-optimization/86263
17780 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
17781 Make edge redirection.
17783 2018-06-29 David Malcolm <dmalcolm@redhat.com>
17785 * dumpfile.c (dump_loc): Add indentation based on scope depth.
17786 (dump_scope_depth): New variable.
17787 (get_dump_scope_depth): New function.
17788 (dump_begin_scope): New function.
17789 (dump_end_scope): New function.
17790 * dumpfile.h (get_dump_scope_depth): New declaration.
17791 (dump_begin_scope): New declaration.
17792 (dump_end_scope): New declaration.
17793 (class auto_dump_scope): New class.
17794 (AUTO_DUMP_SCOPE): New macro.
17795 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
17798 2018-06-29 Richard Biener <rguenther@suse.de>
17800 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
17801 compute_all_dependences succeeds.
17802 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
17803 exceed --param loop-max-datarefs-for-datadeps.
17805 2018-06-29 Jakub Jelinek <jakub@redhat.com>
17807 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
17809 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
17812 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
17813 alternative 0 in preferred_for_speed attribute.
17815 2018-06-28 Paul Koning <ni1d@arrl.net>
17817 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
17818 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
17819 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
17820 * config/pdp11/pdp11.md: Correct "length" attribute calculation
17821 for shift insn patterns.
17823 2018-06-28 David Malcolm <dmalcolm@redhat.com>
17825 * cgraph.c (cgraph_node::get_body): Replace assignments to
17826 "dump_file" with calls to set_dump_file.
17827 * dumpfile.c (alt_dump_file): Make static, and group with...
17828 (alt_flags): ...this definition.
17829 (dumps_are_enabled): New variable.
17830 (refresh_dumps_are_enabled): New function.
17831 (set_dump_file): New function.
17832 (set_alt_dump_file): New function.
17833 (gcc::dump_manager::dump_start): Replace assignments to
17834 "dump_file" and "alt_dump_file" with calls to set_dump_file and
17836 (gcc::dump_manager::dump_finish): Likewise.
17837 * dumpfile.h (alt_dump_file): Delete decl.
17838 (dumps_are_enabled): New variable decl.
17839 (set_dump_file): New function decl.
17840 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
17842 * tree-nested.c (lower_nested_functions): Replace assignments to
17843 "dump_file" with calls to set_dump_file.
17845 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
17847 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
17848 goto_locus of each outgoing edge of each basic block.
17850 2018-06-28 Richard Biener <rguenther@suse.de>
17852 * dwarf2out.c (decl_scope_table): Remove.
17853 (push_decl_scope): Likewise.
17854 (pop_decl_scope): Likewise.
17855 (gen_type_die_for_member): Do not call push/pop_decl_scope.
17856 (gen_struct_or_union_type_die): Likewise.
17857 (gen_tagged_type_die): Likewise.
17858 (dwarf2out_init): Do not initialize decl_scope_table.
17859 (dwarf2out_c_finalize): Do not free it.
17861 2018-06-28 Richard Biener <rguenther@suse.de>
17863 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
17864 deciding whether to not re-use a DIE.
17866 2018-06-28 Richard Biener <rguenther@suse.de>
17868 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
17869 DW_AT_abstract_origin attribute.
17871 2018-06-28 Martin Liska <mliska@suse.cz>
17873 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
17874 Use newly introduced constants.
17875 * tree-switch-conversion.h (struct jump_table_cluster):
17876 Define max_ratio_for_size and max_ratio_for_speed.
17878 2018-06-28 Martin Liska <mliska@suse.cz>
17880 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
17881 Add new checking assert to catch invalid state.
17882 (jump_table_cluster::can_be_handled): Handle single case
17884 (jump_table_cluster::is_beneficial): Bail out for such case.
17885 (bit_test_cluster::find_bit_tests):
17886 Add new checking assert to catch invalid state.
17887 (bit_test_cluster::can_be_handled): Handle single case
17889 (bit_test_cluster::is_beneficial): Bail out for such case.
17890 (switch_decision_tree::analyze_switch_statement):
17893 2018-06-28 Martin Liska <mliska@suse.cz>
17895 * common.opt: Introduce -completion option.
17896 * gcc.c (driver_handle_option): Handle it.
17897 (driver::main): Print completions if completion
17899 * opt-suggestions.c (option_proposer::get_completions):
17901 (option_proposer::suggest_completion): Likewise.
17902 (option_proposer::find_param_completions): Likewise.
17903 (verify_autocompletions): Likewise.
17904 (test_completion_valid_options): Likewise.
17905 (test_completion_valid_params): Likewise.
17906 (in_completion_p): Likewise.
17907 (empty_completion_p): Likewise.
17908 (test_completion_partial_match): Likewise.
17909 (test_completion_garbage): Likewise.
17910 (opt_proposer_c_tests): Likewise.
17911 * opt-suggestions.h: Declare new functions.
17912 * opts.c (common_handle_option): Handle OPT__completion_.
17913 * selftest-run-tests.c (selftest::run_tests): Add
17914 opt_proposer_c_tests.
17915 * selftest.c (assert_str_startswith): New.
17916 * selftest.h (assert_str_startswith): Likewise.
17917 (opt_proposer_c_tests): New.
17918 (ASSERT_STR_STARTSWITH): Likewise.
17920 2018-06-28 Martin Liska <mliska@suse.cz>
17922 * Makefile.in: Add opt-suggestions.o.
17923 * gcc-main.c: Include opt-suggestions.h.
17924 * gcc.c (driver::driver): Likewise.
17925 (driver::~driver): Remove m_option_suggestions.
17926 (driver::build_option_suggestions): Moved to option_proposer.
17927 (driver::suggest_option): Likewise.
17928 (driver::handle_unrecognized_options): Use option_proposer.
17929 * gcc.h (class driver): Add new memver m_option_proposer.
17930 * opt-suggestions.c: New file.
17931 * opt-suggestions.h: New file.
17933 2018-06-28 Martin Liska <mliska@suse.cz>
17935 * vec.h (class auto_string_vec): New (moved from auto_argvec).
17936 (auto_string_vec::~auto_string_vec): Likewise.
17938 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
17940 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
17941 prevent_decl_creation_for_types fields up and add reset_location field.
17942 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
17943 statement if id->reset_location is true.
17944 (copy_edges_for_bb): Do not set goto_locus on the new edges if
17945 id->reset_location is true.
17946 (copy_phis_for_bb): Force input_location on the arguments if
17947 id->reset_location is true.
17948 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
17949 is set on the function to be inlined.
17951 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
17953 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
17955 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
17957 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
17958 registers for Pmode.
17959 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
17960 hard registers for the clobbered pseudo.
17962 2018-06-27 Paul Koning <ni1d@arrl.net>
17964 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
17965 mutually exclusive options.
17966 * config/pdp11/constraints.md (h): New constraint.
17967 (O): Update definition to match shift code generation.
17968 (D): New constraint.
17969 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
17971 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
17973 (output_jump): Change arguments.
17974 (pdp11_fixed_cc_regs): New function.
17975 (pdp11_cc_mode): Ditto.
17976 (pdp11_expand_shift): Ditto.
17977 (pdp11_assemble_shift): Ditto.
17978 (pdp11_small_shift): Ditto.
17979 (pdp11_branch_cost): Remove.
17980 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
17982 (pdp11_register_move_cost): Update for CC registers.
17983 (pdp11_rtx_costs): Add case for LSHIFTRT.
17984 (pdp11_output_jump): Add CCNZ mode conditional branches.
17985 (notice_update_cc_on_set): Remove.
17986 (pdp11_cc_mode): New function.
17987 (simple_memory_operand): Correct pre/post decrement case.
17988 (no_side_effect_operand): New function.
17989 (pdp11_regno_reg_class): Add CC_REGS class.
17990 (pdp11_fixed_cc_regs): New function.
17991 (pdp11_small_shift): New function.
17992 (pdp11_expand_shift): New function to expand shift insns.
17993 (pdp11_assemble_shift): New function to output shifts.
17994 (pdp11_branch_cost): Remove.
17995 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
17996 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
17997 (WCHAR_TYPE): Ditto.
17998 (PTRDIFF_TYPE): Ditto.
17999 (ADJUST_INSN_LENGTH): New macro.
18000 (FIXED_REGISTERS): Add CC registers.
18001 (CALL_USED_REGISTERS): Ditto.
18002 (reg_class): Ditto.
18003 (REG_CLASS_NAMES): Ditto.
18004 (REG_CLASS_CONTENTS): Ditto.
18005 (SELECT_CC_MODE): Use new function.
18006 (TARGET_FLAGS_REGNUM): New macro.
18007 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
18008 (cc0_reg_rtx): Remove.
18009 (CC_STATUS_MDEP): Remove.
18010 (CC_STATUS_MDEFP_INIT): Remove.
18011 (CC_IN_FPU): Remove.
18012 (NOTICE_UPDATE_CC): Remove.
18013 (REGISTER_NAMES): Add CC registers.
18014 (BRANCH_COST): Change to constant 1.
18015 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
18017 * config/pdp11/pdp11.opt (mbcopy): Remove.
18018 (mbcopy-builtin): Remove.
18019 (mbranch-cheap): Remove.
18020 (mbranch-expensive): Remove.
18021 * config/pdp11/predicates.md (expand_shift_operand): Update to
18022 match shift code generation.
18023 (ccnz_operator): New predicate.
18024 * doc/invoke.texi (PDP-11 Options): Remove deleted options
18025 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
18026 Remove non-existent option -mabshi, -mno-abshi. Document mutually
18028 * doc/md.texi (PDP-11): Document new D and h constraints. Update
18029 description of O constraint.
18031 2018-06-27 Jeff Law <law@redhat.com>
18032 Austin Law <austinklaw@gmail.com>
18034 * config/v850/v850.md (addsi3_set_flags): New pattern.
18035 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
18036 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
18037 (zero_extendhisi2_v850_set_flags): Likewise.
18038 (zero_extendqisi2_v850_set_flags): Likewise.
18039 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
18040 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
18041 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
18043 * config/v850/v850-protos.h (notice_update_cc): Remove.
18044 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
18045 (v850_print_operand): Handle 'D' and "d".
18046 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
18047 Add handling of arithmetic/logical operations compared against zero.
18048 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
18049 Do not look at v850_compare_op, instead get mode from last argument.
18050 (v850_gen_compare): Remove
18051 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
18052 after reload for prologue insns.
18053 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
18055 (construct_save_jarl): Likewise.
18056 (TARGET_FLAGS_REGNUM): Define.
18057 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
18058 (NOTICE_UPDATE_CC): Remove.
18059 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
18060 than cc0. Conditionalize on reload_completed.
18061 (cmpsi_insn, setfcc_insn): Likewise.
18062 (tst1 splitter): Turn into define_and_split which sets the flags
18064 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
18065 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
18066 (cstoresf4, cstoredf4): Clobber the flags.
18067 (cmpsi, cmpsf, cmpdf): Remove expanders.
18068 (setf_insn): Remove pattern.
18069 (addsi3): Turn into define_and_split which clobbers the flags after
18070 reload and a suitable pattern (addsi3_clobber_flags) for use after
18072 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
18073 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
18074 (ashrsi3, ashrsi3_v850e2): Likewise.
18075 (bins): Clobber the flags.
18076 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
18077 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
18078 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
18079 (call_value_internal_short, call_value_internal_long): Likewise.
18080 (callt_save_interrupt, callt_return_interrupt): Likewise.
18081 (save_interrupt, return_interrupt): Likewise.
18082 (callt_save_all_interrupt, save_all_interrupt): Likewise.
18083 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
18084 (restore_all_interrupt, _restore_all_interrupt): Likewise.
18085 (All FP comparisons): Only allow after reload has completed.
18087 (divh, divhu): Tweak output template.
18088 (branch_z_normal, branch_z_invert): Remove
18089 (branch_nz_normal, branch_nz_invert): Likewise.
18090 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
18092 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
18093 * config/v850/v850.c (notice_update_cc): Remove.
18094 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
18095 (CC_NO_CARRY): Likewise.
18096 (NOTICE_UPDATE_CC): Define to nothing.
18097 * config/v850/v850.md: Remove block comment on cc0 handling
18098 Remove "cc" attribute from all patterns. Remove cc_status handling
18099 from all patterns. Minor formatting fixes.
18101 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18103 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
18104 (cortex-a76.cortex-a55): Likewise.
18105 * config/aarch64/aarch64-tune.md: Regenerate.
18106 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
18107 cortex-a76.cortex-a55.
18109 2018-06-27 Jeff Law <law@redhat.com>
18111 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
18112 (MULTILIB_DIRNAMES): Similarly.
18114 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
18116 * gimple.h (gimple_return_retbnd): Delete.
18117 (gimple_return_set_retbnd): Likewise.
18118 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
18119 gimple_return_set_retbnd.
18120 * gimple-pretty-print.c (dump_gimple_return): Remove call to
18121 gimple_return_retbnd and adjust.
18122 * tree-inline.h (struct copy_body_data): Remove retbnd field.
18123 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
18124 Explicitly return NULL in a couple more cases. Move assertion
18125 on debug statements and remove unreachable code.
18126 (reset_debug_binding): Do not test id->retbnd.
18127 (expand_call_inline): Do not set it.
18129 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
18131 * configure.ac: Add --disable-gcov option.
18132 * configure: Regenerate.
18133 * Makefile.in: Honour @enable_gcov@.
18134 * doc/install.texi: Document --disable-gcov.
18136 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18138 * config/arm/arm-cpus.in (cortex-a76): New entry.
18139 (cortex-a76.cortex-a55): Likewise.
18140 * config/arm/arm-tables.opt: Regenerate.
18141 * config/arm/arm-tune.md: Likewise.
18142 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
18143 * doc/invoke.texi (ARM Options): Document cortex-a76 and
18144 cortex-a76.cortex-a55.
18146 2018-06-27 Tamar Christina <tamar.christina@arm.com>
18149 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
18151 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
18153 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
18155 (EPILOGUE_USES): Likewise.
18157 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
18159 * tree-inline.c (remap_location): New function extracted from...
18160 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
18161 (copy_phis_for_bb): ...here. Call remap_location.
18162 (copy_cfg_body): Adjust call to copy_edges_for_bb.
18164 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
18166 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
18167 unaligned vsx for 16B memset.
18169 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
18172 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
18173 ieee128_float_type_node to long_double_type_node unless
18174 TARGET_LONG_DOUBLE_128 is set.
18176 2018-06-26 David Malcolm <dmalcolm@redhat.com>
18178 * cfgloop.c (get_loop_location): Convert return type from
18179 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
18180 by implicit construction from rtx_insn *, and using
18181 dump_user_location_t::from_function_decl for the fallback case.
18182 * cfgloop.h (get_loop_location): Convert return type from
18183 location_t to dump_user_location_t.
18184 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
18185 dump_printf_loc to pass in a dump_location_t rather than a
18186 location_t, via the gimple stmt.
18187 * coverage.c (get_coverage_counts): Update calls to
18188 dump_printf_loc to pass in dump_location_t rather than a
18190 * doc/optinfo.texi (Dump types): Convert example of
18191 dump_printf_loc from taking "locus" to taking "insn". Update
18192 description of the "_loc" calls to cover dump_location_t.
18193 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
18195 (dump_user_location_t::dump_user_location_t): New constructors,
18196 from gimple *stmt and rtx_insn *.
18197 (dump_user_location_t::from_function_decl): New function.
18198 (dump_loc): Make static.
18199 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
18200 const dump_location_t &.
18201 (dump_generic_expr_loc): Delete.
18202 (dump_printf_loc): Convert param "loc" from location_t to
18203 const dump_location_t &.
18204 (selftest::test_impl_location): New function.
18205 (selftest::dumpfile_c_tests): New function.
18206 * dumpfile.h: Include "profile-count.h".
18207 (class dump_user_location_t): New class.
18208 (struct dump_impl_location_t): New struct.
18209 (class dump_location_t): New class.
18210 (dump_printf_loc): Convert 2nd param from source_location to
18211 const dump_location_t &.
18212 (dump_generic_expr_loc): Delete.
18213 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
18214 const dump_location_t &.
18215 * gimple-fold.c (fold_gimple_assign): Update call to
18216 dump_printf_loc to pass in a dump_location_t rather than a
18217 location_t, via the gimple stmt.
18218 (gimple_fold_call): Likewise.
18219 * gimple-loop-interchange.cc
18220 (loop_cand::analyze_iloop_reduction_var): Update for change to
18221 check_reduction_path.
18222 (tree_loop_interchange::interchange): Update for change to
18223 find_loop_location.
18224 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
18225 change in return-type of find_loop_location.
18226 (graphite_regenerate_ast_isl): Likewise.
18227 * graphite-optimize-isl.c (optimize_isl): Likewise.
18228 * graphite.c (graphite_transform_loops): Likewise.
18229 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
18230 pass in a dump_location_t rather than a location_t, via the
18232 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
18233 * ipa.c (walk_polymorphic_call_targets): Likewise.
18234 * loop-unroll.c (report_unroll): Convert "locus" param from
18235 location_t to dump_location_t.
18236 (decide_unrolling): Update for change to get_loop_location's
18238 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
18239 location_t to dump_user_location_t.
18240 (grid_find_single_omp_among_assignments_1): Updates calls to
18241 dump_printf_loc to pass in a dump_location_t rather than a
18242 location_t, via the gimple stmt.
18243 (grid_parallel_clauses_gridifiable): Convert "tloc" from
18244 location_t to dump_location_t. Updates calls to dump_printf_loc
18245 to pass in a dump_location_t rather than a location_t, via the
18247 (grid_inner_loop_gridifiable_p): Likewise.
18248 (grid_dist_follows_simple_pattern): Likewise.
18249 (grid_gfor_follows_tiling_pattern): Likewise.
18250 (grid_target_follows_gridifiable_pattern): Likewise.
18251 (grid_attempt_target_gridification): Convert initialization
18252 of local "grid" from memset to zero-initialization; FIXME: does
18253 this require C++11? Update call to dump_printf_loc to pass in a
18254 optinfo_location rather than a location_t, via the gimple stmt.
18255 * profile.c (read_profile_edge_counts): Updates call to
18256 dump_printf_loc to pass in a dump_location_t rather than a
18258 (compute_branch_probabilities): Likewise.
18259 * selftest-run-tests.c (selftest::run_tests): Call
18261 * selftest.h (dumpfile_c_tests): New decl.
18262 * tree-loop-distribution.c (pass_loop_distribution::execute):
18263 Update for change in return type of find_loop_location.
18264 * tree-parloops.c (parallelize_loops): Likewise.
18265 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
18266 "locus" from location_t to dump_user_location_t.
18267 (canonicalize_loop_induction_variables): Likewise.
18268 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
18269 for change in return type of find_loop_location.
18270 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
18271 to dump_printf_loc to pass in a dump_location_t rather than a
18272 location_t, via the stmt.
18273 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
18275 * tree-vect-loop-manip.c (find_loop_location): Convert return
18276 type from source_location to dump_user_location_t.
18277 (vect_do_peeling): Update for above change.
18278 (vect_loop_versioning): Update for change in type of
18280 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
18281 from location_t to dump_user_location_t.
18282 (vect_estimate_min_profitable_iters): Update for change in type
18284 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
18285 location_t to dump_location_t.
18286 (vect_slp_bb): Update for change in type of vect_location.
18287 * tree-vectorizer.c (vect_location): Convert from source_location
18288 to dump_user_location_t.
18289 (try_vectorize_loop_1): Update for change in vect_location's type.
18290 (vectorize_loops): Likewise.
18291 (increase_alignment): Likewise.
18292 * tree-vectorizer.h (vect_location): Convert from source_location
18293 to dump_user_location_t.
18294 (find_loop_location): Convert return type from source_location to
18295 dump_user_location_t.
18296 (check_reduction_path): Convert 1st param from location_t to
18297 dump_user_location_t.
18298 * value-prof.c (check_counter): Update call to dump_printf_loc to
18299 pass in a dump_user_location_t rather than a location_t; update
18300 call to error_at for change in type of "locus".
18301 (check_ic_target): Update call to dump_printf_loc to
18302 pass in a dump_user_location_t rather than a location_t, via the
18305 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
18307 * config/s390/s390.h (enum processor_flags): Do not use
18308 default tune parameter when -march was specified.
18310 2018-06-26 Jakub Jelinek <jakub@redhat.com>
18313 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
18314 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
18317 2018-06-26 Richard Biener <rguenther@suse.de>
18319 PR tree-optimization/86287
18321 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
18322 (vect_analyze_loop): Initialize n_stmts.
18324 2018-06-26 Richard Biener <rguenther@suse.de>
18326 PR middle-end/86271
18327 * fold-const.c (fold_convertible_p): Pointer extension
18330 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
18333 * dwarf2out.c (loc_list_has_views): Adjust comments.
18334 (dw_loc_list): Split single cross-partition range with
18337 2018-06-25 Jeff Law <law@redhat.com>
18339 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
18340 on -mbig-switch by default.
18342 * config/v850/predicates.md (const_float_1_operand): Fix match_code
18344 (const_float_0_operand): Remove unused predicate.
18345 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
18346 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
18347 (recipsf2): New expander. Original pattern now called
18349 (recipdf2, recipdf2_insn): Similarly.
18350 (rsqrtsf2, rsqrtsf2_insn): Similarly
18351 (rsqrtdf2, rsqrtdf2_insn): Similarly
18353 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
18355 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
18356 Simplify logic for FreeBSD (twice).
18358 2018-06-25 Martin Sebor <msebor@redhat.com>
18360 PR tree-optimization/86204
18361 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
18362 a strnlen result if it's less than the length of the string.
18364 2018-06-25 Martin Sebor <msebor@redhat.com>
18366 PR tree-optimization/85700
18367 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
18368 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
18369 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
18371 2018-06-25 Martin Sebor <msebor@redhat.com>
18373 * doc/extend.texi (Zero-length arrays): Update and clarify.
18375 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
18377 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
18378 added IEEE/IBM long double multilib support on PowerPC little
18379 endian Linux systems.
18380 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
18381 (MULTILIB_DEFAULTS): Likewise.
18382 * config/rs6000/rs6000.c (rs6000_option_override_internal):
18384 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
18385 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
18386 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
18388 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
18390 PR middle-end/86311
18391 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
18392 (REORDER_45): Likewise.
18394 2018-06-25 Jeff Law <law@redhat.com>
18396 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
18397 dividend to 32 bits. Adjust length.
18398 (udivmodhi4): Cleanup output template. Fix length.
18400 2018-06-25 Carl Love <cel@us.ibm.com>
18402 * config/rs6000/vsx.md: Change word selector to prefered location.
18404 2018-06-25 Richard Biener <rguenther@suse.de>
18406 PR tree-optimization/86304
18407 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
18408 epilogue-if-converted loops as well.
18410 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
18412 * lto-section-out.c (lto_begin_section): Do not print section
18413 name for noaddr and unnumbered dumps.
18415 2018-06-25 Richard Biener <rguenther@suse.de>
18417 * tree-vectorizer.h (struct vec_info_shared): New structure
18418 with parts split out from struct vec_info and loop_nest from
18419 struct _loop_vec_info.
18420 (struct vec_info): Adjust accordingly.
18421 (struct _loop_vec_info): Likewise.
18422 (LOOP_VINFO_LOOP_NEST): Adjust.
18423 (LOOP_VINFO_DATAREFS): Likewise.
18424 (LOOP_VINFO_DDRS): Likewise.
18425 (struct _bb_vec_info): Likewise.
18426 (BB_VINFO_DATAREFS): Likewise.
18427 (BB_VINFO_DDRS): Likewise.
18428 (struct _stmt_vec_info): Add dr_aux member.
18429 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
18430 (DR_MISALIGNMENT_UNINITIALIZED): New.
18431 (set_dr_misalignment): Adjust.
18432 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
18433 (vect_analyze_loop): Adjust prototype.
18434 (vect_analyze_loop_form): Likewise.
18435 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
18436 Compute dependences lazily.
18437 (vect_record_base_alignments): Use shared datarefs/ddrs.
18438 (vect_verify_datarefs_alignment): Likewise.
18439 (vect_analyze_data_refs_alignment): Likewise.
18440 (vect_analyze_data_ref_accesses): Likewise.
18441 (vect_analyze_data_refs): Likewise.
18442 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
18443 constructor parameter for shared part.
18444 (vect_analyze_loop_form): Pass in shared part and adjust.
18445 (vect_analyze_loop_2): Pass in storage for the number of
18446 stmts. Move loop nest finding to the caller. Compute
18448 (vect_analyze_loop): Pass in shared part.
18449 (vect_transform_loop): Verify shared datarefs are unchanged.
18450 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
18451 constructor parameter for shared part.
18452 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
18453 (vect_slp_bb): Verify shared datarefs are unchanged before
18455 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
18457 (new_stmt_vec_info): Initialize DR_AUX misalignment to
18458 DR_MISALIGNMENT_UNINITIALIZED.
18459 * tree-vectorizer.c (vec_info::vec_info): Add constructor
18460 parameter for shared part.
18461 (vec_info::~vec_info): Adjust.
18462 (vec_info_shared::vec_info_shared): New.
18463 (vec_info_shared::~vec_info_shared): Likewise.
18464 (vec_info_shared::save_datarefs): Likewise.
18465 (vec_info_shared::check_datarefs): Likewise.
18466 (try_vectorize_loop_1): Construct shared part live for analyses
18467 of a single loop for multiple vector sizes.
18468 * tree-parloops.c (gather_scalar_reductions): Adjust.
18470 2018-06-25 Richard Biener <rguenther@suse.de>
18472 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
18473 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
18474 (vect_analyze_data_refs): Remove similar code from here and
18475 simplify accordingly.
18477 2018-06-25 Richard Biener <rguenther@suse.de>
18479 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
18480 for reverse storage order accesses rather than asserting
18481 they cannot happen here.
18483 2018-06-25 Tom de Vries <tdevries@suse.de>
18486 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
18487 Use data16 instead of .byte for insn prefix.
18489 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
18492 * parser.c (make_char_string_pack): Pass this literal chars
18493 through cpp_interpret_string.
18494 (cp_parser_userdef_numeric_literal): Check the result of
18495 make_char_string_pack.
18497 2018-06-24 Maya Rashish <coypu@sdf.org>
18499 * ginclude/stddef.h: Simplify conditions around avoiding
18500 re-definition of __size_t.
18502 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
18504 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
18505 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
18507 2018-06-22 Maya Rashish <coypu@sdf.org>
18509 * doc/invoke.texi (mno-fancy-math-387): Update for changes
18510 made to OpenBSD and NetBSD through the years.
18512 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18514 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
18515 behavior of vec_pack (vector double, vector double) to match
18516 behavior of vec_float2 (vector double, vector double).
18518 2018-06-22 Olivier Hainque <hainque@adacore.com>
18520 * gimplify.c (gimplify_function_tree): Prevent creation
18521 of a trampoline for the address of the current function
18522 passed to entry/exit instrumentation hooks.
18524 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
18527 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
18530 2018-06-22 Martin Liska <mliska@suse.cz>
18532 PR tree-optimization/86263
18533 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
18534 Bail out if is_enabled is false.
18535 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
18537 (jump_table_cluster::is_enabled): New function.
18539 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
18541 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
18542 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
18543 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
18544 (lto_input_ts_binfo_tree_pointers): Likewise.
18545 * tree-streamer-out.c (streamer_write_tree_bitfields,
18546 write_ts_binfo_tree_pointers): Likewise.
18547 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
18549 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
18551 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
18553 2018-06-22 Martin Liska <mliska@suse.cz>
18555 * symbol-summary.h (get): Make it pure and inline move
18556 functionality from ::get function.
18557 (get): Remove and inline into ::get and ::get_create.
18558 (get_create): Move code from ::get function.
18560 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18563 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
18564 -x assembler-with-cpp.
18566 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18568 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
18569 _FILE_OFFSET_BITS=64 for C++.
18571 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
18573 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
18574 conversion insn that shows up when pr85657-3.c is compiled using
18575 IEEE 128-bit long double.
18576 (neg<mode>2_internal): Use the correct mode to check whether the
18577 mode is IBM extended.
18578 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
18579 multiply and divide external functions from being created more
18582 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18584 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
18586 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
18587 the edge can be forwarded.
18588 (cfg_layout_merge_blocks): Likewise.
18590 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18592 * except.c (finish_eh_generation): Commit edge insertions only after
18593 the EH edges have been redirected from post-landing to landing pads.
18595 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18597 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
18598 create_tmp_var_for to create the FRAME decl.
18599 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
18601 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
18603 * tree-inline.c (copy_edges_for_bb): Minor tweak.
18604 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
18605 debug statement when resetting its value.
18606 (expand_call_inline): Copy the locus of the call onto the assignment
18607 of the return value, if any. Use local variable in more cases.
18609 2018-06-21 Martin Liska <mliska@suse.cz>
18611 * ipa-pure-const.c (propagate_nothrow): Use
18612 funct_state_summaries->get.
18613 (dump_malloc_lattice): Likewise.
18614 (propagate_malloc): Likewise.
18616 2018-06-21 Richard Biener <rguenther@suse.de>
18618 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
18619 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
18620 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
18622 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
18623 BLOCK_ABSTRACT_ORIGIN unconditionally.
18625 2018-06-21 David Malcolm <dmalcolm@redhat.com>
18627 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
18629 * ipa-reference.c (ipa_reference_c_finalize): Delete
18630 ipa_ref_opt_sum_summaries and set it to NULL.
18632 2018-06-21 Tom de Vries <tdevries@suse.de>
18634 PR tree-optimization/85859
18635 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
18636 test with comment from bb_no_side_effects_p.
18638 2018-06-21 Richard Biener <rguenther@suse.de>
18640 PR tree-optimization/86232
18641 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
18642 max for constant niter.
18644 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
18646 * config/aarch64/aarch64-simd.md
18647 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
18649 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
18651 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
18652 Make opernads of the unspec commutative.
18654 2018-06-21 Richard Biener <rguenther@suse.de>
18656 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
18657 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
18658 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
18659 (vect_analyze_data_ref_dependence): Re-order checks to deal with
18661 (vect_record_base_alignments): Do not record base alignment
18662 for gathers or scatters.
18663 (vect_compute_data_ref_alignment): Drop return value that is always
18664 true. Bail out early for gathers or scatters.
18665 (vect_enhance_data_refs_alignment): Bail out early for gathers
18667 (vect_find_same_alignment_drs): Likewise.
18668 (vect_analyze_data_refs_alignment): Remove dead code.
18669 (vect_slp_analyze_and_verify_node_alignment): Likewise.
18670 (vect_analyze_data_refs): For possible gathers or scatters do
18671 not create an alternate DR, just check their possible validity
18672 and mark them. Adjust DECL_NONALIASED handling to not rely
18673 on DR_BASE_ADDRESS.
18674 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
18675 update inits of gathers or scatters.
18676 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
18677 Also copy gather/scatter flag to pattern vinfo.
18679 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
18681 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
18682 behavior of vec_packsu (vector unsigned long long, vector unsigned
18683 long long) to match behavior of vec_packs with same signature.
18685 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
18686 Thomas Schwinge <thomas@codesourcery.com>
18687 Cesar Philippidis <cesar@codesourcery.com>
18689 * gimplify.c (gimplify_scan_omp_clauses): Add support for
18690 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
18691 (gimplify_adjust_omp_clauses): Likewise.
18692 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
18693 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
18694 (gimplify_omp_target_update): Update handling of acc update and
18696 * omp-low.c (install_var_field): Remove unused parameter
18697 base_pointers_restrict.
18698 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
18699 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
18701 (omp_target_base_pointers_restrict_p): Delete.
18702 (scan_omp_target): Update call to scan_sharing_clauses.
18703 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
18705 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
18706 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
18707 (convert_local_omp_clauses): Likewise.
18708 * tree-pretty-print.c (dump_omp_clause): Likewise.
18709 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
18711 (omp_clause_code_name): Likewise.
18713 2018-06-20 Jakub Jelinek <jakub@redhat.com>
18716 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
18719 PR tree-optimization/86231
18720 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
18721 anti-range don't overwrite *vr0min before using it to compute *vr0max.
18723 2018-06-20 Tom de Vries <tdevries@suse.de>
18725 PR tree-optimization/86097
18726 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
18727 iv type if signedness of iv type is not the same as that of *nit.
18729 2018-06-20 Jakub Jelinek <jakub@redhat.com>
18731 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
18732 EDGE_EH edges, verify they are all EDGE_EH.
18734 2018-06-20 Maya Rashish <coypu@sdf.org>
18736 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
18738 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18740 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
18741 * config/aarch64/aarch64.c (xgene1_tunings): Add
18742 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
18743 (aarch64_mode_valid_for_sched_fusion_p):
18744 Allow 16-byte modes.
18745 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
18746 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
18748 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
18750 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
18751 * config/aarch64/iterators.md (VQ2): New mode iterator.
18753 2018-06-20 Martin Liska <mliska@suse.cz>
18755 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
18756 Change default ratio from 10 to 8.
18758 2018-06-20 Martin Liska <mliska@suse.cz>
18760 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
18762 (bit_test_cluster::find_bit_tests): Likewise.
18763 (switch_decision_tree::analyze_switch_statement): Find clusters.
18764 * tree-switch-conversion.h (struct jump_table_cluster): Document
18767 2018-06-20 Martin Liska <mliska@suse.cz>
18769 * tree-switch-conversion.c (switch_conversion::collect):
18770 Record m_uniq property.
18771 (switch_conversion::expand): Bail out for special conditions.
18772 (group_cluster::~group_cluster): New.
18773 (group_cluster::group_cluster): Likewise.
18774 (group_cluster::dump): Likewise.
18775 (jump_table_cluster::emit): New.
18776 (switch_decision_tree::fix_phi_operands_for_edges): New.
18777 (struct case_node): Remove struct.
18778 (jump_table_cluster::can_be_handled): New.
18779 (case_values_threshold): Moved to header.
18780 (reset_out_edges_aux): Likewise.
18781 (jump_table_cluster::is_beneficial): New.
18782 (bit_test_cluster::can_be_handled): Likewise.
18783 (add_case_node): Remove.
18784 (bit_test_cluster::is_beneficial): New.
18785 (case_bit_test::cmp): New.
18786 (bit_test_cluster::emit): New.
18787 (expand_switch_as_decision_tree_p): Remove.
18788 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
18789 (fix_phi_operands_for_edge): Likewise.
18790 (switch_decision_tree::analyze_switch_statement): New.
18791 (compute_cases_per_edge): Move ...
18792 (switch_decision_tree::compute_cases_per_edge): ... here.
18793 (try_switch_expansion): Likewise.
18794 (switch_decision_tree::try_switch_expansion): Likewise.
18795 (record_phi_operand_mapping): Likewise.
18796 (switch_decision_tree::record_phi_operand_mapping): Likewise.
18797 (emit_case_decision_tree): Likewise.
18798 (switch_decision_tree::emit): Likewise.
18799 (balance_case_nodes): Likewise.
18800 (switch_decision_tree::balance_case_nodes): Likewise.
18801 (dump_case_nodes): Likewise.
18802 (switch_decision_tree::dump_case_nodes): Likewise.
18803 (emit_jump): Likewise.
18804 (switch_decision_tree::emit_jump): Likewise.
18805 (emit_cmp_and_jump_insns): Likewise.
18806 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
18807 (emit_case_nodes): Likewise.
18808 (switch_decision_tree::emit_case_nodes): Likewise.
18809 (conditional_probability): Remove.
18810 * tree-switch-conversion.h (enum cluster_type): New.
18812 (struct cluster): Likewise.
18813 (cluster::cluster): Likewise.
18814 (struct simple_cluster): Likewise.
18815 (simple_cluster::simple_cluster): Likewise.
18816 (struct group_cluster): Likewise.
18817 (struct jump_table_cluster): Likewise.
18818 (struct bit_test_cluster): Likewise.
18819 (struct min_cluster_item): Likewise.
18820 (struct case_tree_node): Likewise.
18821 (case_tree_node::case_tree_node): Likewise.
18822 (jump_table_cluster::case_values_threshold): Likewise.
18823 (struct case_bit_test): Likewise.
18824 (struct switch_decision_tree): Likewise.
18825 (struct switch_conversion): Likewise.
18826 (switch_decision_tree::reset_out_edges_aux): Likewise.
18828 2018-06-20 Martin Liska <mliska@suse.cz>
18830 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
18831 (hoist_edge_and_branch_if_true): Likewise.
18832 (expand_switch_using_bit_tests_p): Likewise.
18833 (struct case_bit_test): Likewise.
18834 (case_bit_test_cmp): Likewise.
18835 (emit_case_bit_tests): Likewise.
18836 (switch_conversion::switch_conversion): New class.
18837 (struct switch_conv_info): Remove old struct.
18838 (collect_switch_conv_info): More to ...
18839 (switch_conversion::collect): ... this.
18840 (check_range): Likewise.
18841 (switch_conversion::check_range): Likewise.
18842 (check_all_empty_except_final): Likewise.
18843 (switch_conversion::check_all_empty_except_final): Likewise.
18844 (check_final_bb): Likewise.
18845 (switch_conversion::check_final_bb): Likewise.
18846 (create_temp_arrays): Likewise.
18847 (switch_conversion::create_temp_arrays): Likewise.
18848 (free_temp_arrays): Likewise.
18849 (gather_default_values): Likewise.
18850 (switch_conversion::gather_default_values): Likewise.
18851 (build_constructors): Likewise.
18852 (switch_conversion::build_constructors): Likewise.
18853 (constructor_contains_same_values_p): Likewise.
18854 (switch_conversion::contains_same_values_p): Likewise.
18855 (array_value_type): Likewise.
18856 (switch_conversion::array_value_type): Likewise.
18857 (build_one_array): Likewise.
18858 (switch_conversion::build_one_array): Likewise.
18859 (build_arrays): Likewise.
18860 (switch_conversion::build_arrays): Likewise.
18861 (gen_def_assigns): Likewise.
18862 (switch_conversion::gen_def_assigns): Likewise.
18863 (prune_bbs): Likewise.
18864 (switch_conversion::prune_bbs): Likewise.
18865 (fix_phi_nodes): Likewise.
18866 (switch_conversion::fix_phi_nodes): Likewise.
18867 (gen_inbound_check): Likewise.
18868 (switch_conversion::gen_inbound_check): Likewise.
18869 (process_switch): Use the newly created class.
18870 (switch_conversion::expand): New.
18871 (switch_conversion::~switch_conversion): New.
18872 * tree-switch-conversion.h: New file.
18874 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18876 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
18877 tree-vect-patterns.c.
18878 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
18879 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
18880 (vect_recog_sad_pattern): Likewise.
18881 (vect_recog_widen_sum_pattern): Likewise.
18882 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
18883 (vect_recog_widen_shift_pattern): Remove the type_in argument.
18884 (vect_recog_rotate_pattern): Likewise.
18885 (vect_recog_mult_pattern): Likewise.
18886 (vect_recog_vector_vector_shift_pattern): Likewise.
18887 (vect_recog_divmod_pattern): Likewise.
18888 (vect_recog_mixed_size_cond_pattern): Likewise.
18889 (vect_recog_bool_pattern): Likewise.
18890 (vect_recog_mask_conversion_pattern): Likewise.
18891 (vect_try_gather_scatter_pattern): Likewise.
18892 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
18893 (vect_recog_over_widening_pattern): Likewise.
18894 (vect_recog_gather_scatter_pattern): Likewise.
18895 (vect_recog_func_ptr): Move from tree-vectorizer.h
18896 (vect_vect_recog_func_ptrs): Move further down the file.
18897 (vect_recog_func): Likewise. Remove the third argument.
18898 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
18899 (vect_pattern_recog_1): Expect the pattern function to do any
18900 necessary target tests. Also expect it to provide a vector type.
18901 Remove the type_in handling.
18903 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18905 * tree-vect-patterns.c (vect_pattern_detected): New function.
18906 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
18907 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
18908 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
18909 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
18910 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
18911 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
18912 (vect_recog_mask_conversion_pattern)
18913 (vect_try_gather_scatter_pattern): Likewise.
18915 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18917 * tree-vect-patterns.c (vect_get_internal_def): New function.
18918 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
18919 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
18920 (search_type_for_mask_1): Use it.
18922 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18924 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
18925 redundant WIDEN_SUM_EXPR handling.
18926 (vect_recog_sad_pattern): Likewise.
18928 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18930 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
18931 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
18932 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
18933 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
18934 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
18936 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18938 * tree-vect-stmts.c (vectorizable_call): Make sure that we
18939 use the stmt_vec_info of the original bb statement for the
18940 new zero assignment, even if the call is part of a pattern.
18942 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18944 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
18945 that the sequence is attached to the original statement rather
18946 than the pattern statement.
18947 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
18948 PATTERN_DEF_SEQ from the original statement rather than
18949 the main pattern statement.
18950 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
18951 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
18952 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
18954 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
18956 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
18957 definition statements before the early exit for statements that aren't
18959 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
18961 (vect_transform_loop): ...here. Process pattern definition
18962 statements without first checking whether the main pattern
18963 statement is live or relevant.
18965 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
18967 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
18968 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
18970 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
18972 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
18973 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
18974 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
18975 (expand_block_compare): Change select_block_compare_mode call.
18976 (expand_strncmp_align_check): Use new functions, fix comment.
18977 (emit_final_str_compare_gpr): New function.
18978 (expand_strn_compare): Refactor and clean up code.
18979 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
18981 2018-06-19 Tony Reix <tony.reix@atos.com>
18982 Damien Bergamini <damien.bergamini@atos.com>
18983 David Edelsohn <dje.gcc@gmail.com>
18985 * collect2.c (static_obj): New variable.
18986 (static_libs): New variable.
18987 (is_in_list): Uncomment declaration.
18988 (main): Track AIX libraries linked statically.
18989 (is_in_list): Uncomment definition.
18990 (scan_prog_file): Don't add AIX shared libraries initializer
18991 to constructor list if linking statically.
18993 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
18995 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
18997 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
18999 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
19001 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
19004 2018-06-19 Martin Liska <mliska@suse.cz>
19006 * config/i386/i386.c (ix86_can_inline_p): Do not use
19007 ipa_fn_summaries::get_create.
19008 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
19010 (devirtualization_time_bonus): Likewise.
19011 (ipcp_propagate_stage): Likewise.
19012 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
19013 (edge_set_predicate): Likewise.
19014 (evaluate_conditions_for_known_args): Likewise.
19015 (evaluate_properties_for_edge): Likewise.
19016 (ipa_call_summary::reset): Tranform to ...
19017 (ipa_call_summary::~ipa_call_summary): ... this.
19018 (ipa_fn_summary::reset): Transform to ...
19019 (ipa_fn_summary::~ipa_fn_summary): ... this.
19020 (ipa_fn_summary_t::remove): Rename to ...
19021 (ipa_fn_summary_t::remove_callees): ... this.
19022 (ipa_fn_summary_t::duplicate): Use placement new
19023 instead of memory copy.
19024 (ipa_call_summary_t::duplicate): Likewise.
19025 (ipa_call_summary_t::remove): Remove.
19026 (dump_ipa_call_summary): Change get_create to get.
19027 (ipa_dump_fn_summary): Dump only when summary exists.
19028 (analyze_function_body): Use symbol_summary::get instead
19030 (compute_fn_summary): Likewise.
19031 (estimate_edge_devirt_benefit): Likewise.
19032 (estimate_edge_size_and_time): Likewise.
19033 (inline_update_callee_summaries): Likewise.
19034 (remap_edge_change_prob): Likewise.
19035 (remap_edge_summaries): Likewise.
19036 (ipa_merge_fn_summary_after_inlining): Likewise.
19037 (write_ipa_call_summary): Likewise.
19038 (ipa_fn_summary_write): Likewise.
19039 (ipa_free_fn_summary): Likewise.
19040 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
19041 (struct ipa_call_summary): Likewise.
19042 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
19044 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
19045 (estimate_size_after_inlining): Likewise.
19046 (estimate_growth): Likewise.
19047 (growth_likely_positive): Likewise.
19048 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
19049 (inline_call): Likewise.
19050 * ipa-inline.c (caller_growth_limits): Likewise.
19051 (can_inline_edge_p): Likewise.
19052 (can_inline_edge_by_limits_p): Likewise.
19053 (compute_uninlined_call_time): Likewise.
19054 (compute_inlined_call_time): Likewise.
19055 (want_inline_small_function_p): Likewise.
19056 (edge_badness): Likewise.
19057 (update_caller_keys): Likewise.
19058 (update_callee_keys): Likewise.
19059 (inline_small_functions): Likewise.
19060 (inline_to_all_callers_1): Likewise.
19061 (dump_overall_stats): Likewise.
19062 (early_inline_small_functions): Likewise.
19063 (early_inliner): Likewise.
19064 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
19065 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
19066 * ipa-pure-const.c (malloc_candidate_p): Likewise.
19067 * ipa-split.c (execute_split_functions): Likewise.
19068 * symbol-summary.h: Likewise.
19069 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
19071 2018-06-19 Richard Biener <rguenther@suse.de>
19073 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
19074 (vectorize_loops): ... here. Fix dbgcnt handling.
19075 (try_vectorize_loop): Wrap try_vectorize_loop_1.
19077 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
19080 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
19081 ieee128 argument takes up only one (vector) register, not two (floating
19084 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
19086 * gimplify.c (gimplify_init_constructor): Really never clear for an
19087 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
19089 2018-06-19 Richard Biener <rguenther@suse.de>
19091 PR tree-optimization/86179
19092 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
19093 after failed recognition.
19095 2018-06-18 Martin Sebor <msebor@redhat.com>
19097 PR middle-end/85602
19098 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
19099 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
19100 Handle integer subtraction.
19101 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
19102 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
19104 2018-06-18 David Malcolm <dmalcolm@redhat.com>
19106 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
19107 param from rtx to rtx_insn *.
19108 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
19110 (frv_ifcvt_modify_insn): Likwise.
19111 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
19112 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
19113 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
19114 as_a <rtx_insn *> cast to local "unprotected_region" once
19115 it's been established that it's not NULL or pc_rtx.
19116 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
19117 param "sethi" from rtx to rtx_insn *.
19118 (nds32_group_float_insns): Likewise for param "insn".
19119 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
19121 (vax_output_int_subtract): Likewise.
19122 * config/vax/vax.c (vax_output_int_add): Likewise for param
19124 (vax_output_int_subtract): Likewise.
19125 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
19126 (emit_pattern_after): Likewise for param "after".
19127 (emit_insn_after): Likewise.
19128 (emit_jump_insn_after): Likewise.
19129 (emit_call_insn_after): Likewise.
19130 (emit_debug_insn_after): Likewise.
19131 (emit_pattern_before): Likewise for param "before".
19132 (emit_insn_before): Likewise.
19133 (emit_jump_insn_before): Likewise.
19134 * final.c (get_insn_template): Likewise for param "insn", removing
19136 * output.h (get_insn_template): Likewise for 2nd param.
19137 * rtl.h (emit_insn_before): Likewise.
19138 (emit_jump_insn_before): Likewise.
19139 (emit_debug_insn_before_noloc): Likewise.
19140 (emit_insn_after): Likewise.
19141 (emit_jump_insn_after): Likewise.
19142 (emit_call_insn_after): Likewise.
19143 (emit_debug_insn_after): Likewise.
19144 (set_insn_deleted): Likewise for param.
19146 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
19149 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
19150 floating point modes, so that IFmode is numerically greater than
19151 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
19152 to declare the ordering. This prevents IFmode from being
19153 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
19154 machine. Include rs6000-modes.h to share the fractional values
19155 between genmodes* and the rest of the compiler.
19156 (IFmode): Likewise.
19157 (KFmode): Likewise.
19158 (TFmode): Likewise.
19159 * config/rs6000/rs6000-modes.h: New file.
19160 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
19161 meaning of rs6000_long_double_size so that 126..128 selects an
19162 appropriate 128-bit floating point type.
19163 (rs6000_option_override_internal): Likewise.
19164 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
19165 (TARGET_LONG_DOUBLE_128): Change the meaning of
19166 rs6000_long_double_size so that 126..128 selects an appropriate
19167 128-bit floating point type.
19168 (LONG_DOUBLE_TYPE_SIZE): Update comment.
19169 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
19170 source and destination to match the standard usage.
19171 (truncifkf2): Likewise.
19172 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
19173 ISA 2.07 to use an explicit clobber, instead of passing in a
19175 (copysign<mode>3_soft): Likewise.
19177 2018-06-18 David Malcolm <dmalcolm@redhat.com>
19179 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
19180 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
19181 (vect_slp_analyze_instance_dependence): Likewise.
19182 (vect_enhance_data_refs_alignment): Likewise.
19183 (vect_analyze_data_refs_alignment): Likewise.
19184 (vect_slp_analyze_and_verify_instance_alignment
19185 (vect_analyze_data_ref_accesses): Likewise.
19186 (vect_prune_runtime_alias_test_list): Likewise.
19187 (vect_analyze_data_refs): Likewise.
19188 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
19189 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19190 (vect_analyze_scalar_cycles_1): Likewise.
19191 (vect_get_loop_niters): Likewise.
19192 (vect_analyze_loop_form_1): Likewise.
19193 (vect_update_vf_for_slp): Likewise.
19194 (vect_analyze_loop_operations): Likewise.
19195 (vect_analyze_loop): Likewise.
19196 (vectorizable_induction): Likewise.
19197 (vect_transform_loop): Likewise.
19198 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
19199 * tree-vect-slp.c (vect_analyze_slp): Likewise.
19200 (vect_make_slp_decision): Likewise.
19201 (vect_detect_hybrid_slp): Likewise.
19202 (vect_slp_analyze_operations): Likewise.
19203 (vect_slp_bb): Likewise.
19204 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
19205 (vectorizable_bswap): Likewise.
19206 (vectorizable_call): Likewise.
19207 (vectorizable_simd_clone_call): Likewise.
19208 (vectorizable_conversion): Likewise.
19209 (vectorizable_assignment): Likewise.
19210 (vectorizable_shift): Likewise.
19211 (vectorizable_operation): Likewise.
19212 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
19214 2018-06-18 Martin Sebor <msebor@redhat.com>
19216 PR tree-optimization/81384
19217 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
19218 * builtins.c (expand_builtin_strnlen): New function.
19219 (expand_builtin): Call it.
19220 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
19221 * builtins.def (BUILT_IN_STRNLEN): New.
19222 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
19223 Warn for bounds in excess of maximum object size.
19224 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
19225 single-value ranges. Handle strnlen.
19226 (handle_builtin_strlen): Handle strnlen.
19227 (strlen_check_and_optimize_stmt): Same.
19228 * doc/extend.texi (Other Builtins): Document strnlen.
19230 2018-06-18 Maya Rashish <coypu@sdf.org>
19232 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
19233 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
19234 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
19236 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
19238 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
19240 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19242 * tree.c (escaped_string::escape): Replace cast to char * by
19243 const_cast<char *> (unescaped).
19245 2018-06-18 Nick Clifton <nickc@redhat.com>
19248 * tree.c (escaped_string): New class. Converts an unescaped
19249 string into its escaped equivalent.
19250 (warn_deprecated_use): Use the new class to convert the
19251 deprecation message, if present.
19252 (test_escaped_strings): New self test.
19253 (test_c_tests): Add test_escaped_strings.
19254 * doc/extend.texi (deprecated): Add a note that the
19255 deprecation message is affected by the -fmessage-length
19256 option, and that control characters will be escaped.
19257 (#pragma GCC error): Document this pragma.
19258 (#pragma GCC warning): Likewise.
19259 * doc/invoke.texi (-fmessage-length): Document this option's
19260 effect on the #warning and #error preprocessor directives and
19261 the deprecated attribute.
19263 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
19265 * tree.c (decl_value_expr_lookup): Revert latest change.
19266 (decl_value_expr_insert): Likewise.
19268 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
19270 * gimplify.c (nonlocal_vlas): Delete.
19271 (nonlocal_vla_vars): Likewise.
19272 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
19274 (gimplify_body): Do not create and destroy nonlocal_vlas.
19275 * tree-nested.c: Include diagnostic.h.
19276 (use_pointer_in_frame): Tweak.
19277 (lookup_field_for_decl): Add assertion and declare the transformation.
19278 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
19279 internal error when the reference is in a wrong context. Do not
19280 create a debug decl by default.
19281 (note_nonlocal_block_vlas): Delete.
19282 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
19283 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
19284 create a debug decl by default.
19285 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
19286 call is in a wrong context.
19287 (fixup_vla_decls): New function.
19288 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
19289 debug variables were created.
19290 * tree.c (decl_value_expr_lookup): Add checking assertion.
19291 (decl_value_expr_insert): Likewise.
19293 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
19295 PR middle-end/82479
19296 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
19297 * tree-scalar-evolution.c (interpret_expr): Likewise.
19298 (expression_expensive_p): Likewise.
19299 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
19300 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
19301 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
19302 (ssa_defined_by_minus_one_stmt_p): New.
19304 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
19306 PR middle-end/64946
19307 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
19308 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
19309 * dojump.c (do_jump): Likewise.
19310 * expr.c (expand_expr_real_2): Check operand type's sign.
19311 * fold-const.c (const_unop): Handle ABSU_EXPR.
19312 (fold_abs_const): Likewise.
19313 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
19314 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
19315 (strip_sign_op_1): Likesise.
19316 * match.pd: Add new pattern to generate ABSU_EXPR.
19317 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
19318 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
19319 * tree-eh.c (operation_could_trap_helper_p): Likewise.
19320 * tree-inline.c (estimate_operator_cost): Likewise.
19321 * tree-pretty-print.c (dump_generic_node): Likewise.
19322 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
19323 * tree.def (ABSU_EXPR): New.
19325 2018-06-16 Jakub Jelinek <jakub@redhat.com>
19327 PR middle-end/86095
19328 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
19329 documented as preserved for backward compatibility only.
19330 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
19332 PR rtl-optimization/86108
19333 * bb-reorder.c (create_forwarder_block): Renamed to ...
19334 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
19335 jump from new landing pad to the second part.
19336 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
19339 2018-06-15 Jakub Jelinek <jakub@redhat.com>
19341 PR middle-end/85878
19342 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
19343 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
19344 Only call store_expr for halves if the mode is the same.
19346 PR middle-end/86123
19347 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
19348 Fix up comment formatting.
19350 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
19352 * typed-splay-tree.h (typed_splay_tree::remove): New function.
19353 (typed_splay_tree::closure,
19354 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
19355 (typed_splay_tree::typed_splay_tree,
19356 typed_splay_tree::operator =): Declared private.
19357 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
19358 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
19359 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
19360 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
19361 typed_splay_tree::splay_tree_splay,
19362 typed_splay_tree::splay_tree_foreach_helper,
19363 typed_splay_tree::splay_tree_insert,
19364 typed_splay_tree::splay_tree_remove,
19365 typed_splay_tree::splay_tree_lookup,
19366 typed_splay_tree::splay_tree_predecessor,
19367 typed_splay_tree::splay_tree_successor,
19368 typed_splay_tree::splay_tree_min,
19369 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
19370 (typed_splay_tree::root, typed_splay_tree::comp,
19371 typed_splay_tree::delete_key,
19372 typed_splay_tree::delete_value): New data members.
19373 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
19374 typed_splay_tree::remove.
19376 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
19378 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
19379 -mginv and -mno-ginv to the assembler.
19380 * config/mips/mips.opt (-mcrc): New option.
19381 (-mginv): Likewise.
19382 * doc/invoke.text (-mcrc): Document.
19383 (-mginv): Likewise.
19385 2018-06-15 Nick Clifton <nickc@redhat.com>
19388 * tree.c (escaped_string): New class. Converts an unescaped
19389 string into its escaped equivalent.
19390 (warn_deprecated_use): Use the new class to convert the
19391 deprecation message, if present.
19392 (test_escaped_strings): New self test.
19393 (test_c_tests): Add test_escaped_strings.
19394 * doc/extend.texi (deprecated): Add a note that the
19395 deprecation message is affected by the -fmessage-length
19396 option, and that control characters will be escaped.
19397 (#pragma GCC error): Document this pragma.
19398 (#pragma GCC warning): Likewise.
19399 * doc/invoke.texi (-fmessage-length): Document this option's
19400 effect on the #warning and #error preprocessor directives and
19401 the deprecated attribute.
19403 2018-06-15 Richard Biener <rguenther@suse.de>
19405 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
19406 here, also noting vector size used.
19407 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
19408 size used in MSG_OPTIMIZED_LOCATIONS dump.
19409 (pass_slp_vectorize::execute): Adjust.
19411 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
19414 * config/arc/arc.c (arc_return_address_register): Fix
19417 2018-06-15 Richard Biener <rguenther@suse.de>
19419 PR middle-end/86159
19420 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
19421 leave useless conversion stripping to force_gimple_operand_gsi.
19422 (gimplify_build2): Likewise.
19423 (gimplify_build1): Likewise.
19425 2018-06-15 Richard Biener <rguenther@suse.de>
19427 PR middle-end/86076
19428 * tree-cfg.c (move_stmt_op): unshare invariant addresses
19429 before adjusting their block.
19431 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
19433 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
19434 multilibs for *-*-rtems*.
19435 * config/riscv/t-rtems: New file.
19437 2018-06-14 Jakub Jelinek <jakub@redhat.com>
19439 PR middle-end/86122
19440 * match.pd ((A +- CST1) +- CST2): Punt if last resort
19441 unsigned_type_for returns NULL.
19444 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
19445 subregs of multi-word pseudos unless the float mode has word size.
19447 2018-06-14 Richard Biener <rguenther@suse.de>
19449 PR middle-end/86139
19450 * tree-vect-generic.c (build_word_mode_vector_type): Remove
19451 duplicate and harmful type_hash_canon.
19452 * tree.c (type_hash_canon): Assert we didn't find ourselves.
19454 2018-06-14 Richard Biener <rguenther@suse.de>
19457 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
19460 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
19462 * config/rtems.h (STDINT_LONG32): Define.
19464 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
19465 Prachi Godbole <prachi.godbole@imgtec.com>
19467 * config/mips/mips-cpus.def: Define P6600.
19468 * config/mips/mips-tables.opt: Regenerate.
19469 * config/mips/mips.c (mips_ucbranch_type): New enum.
19470 (mips_rtx_cost_data): Add support for P6600.
19471 (mips_issue_rate): Likewise.
19472 (mips_multipass_dfa_lookahead): Likewise.
19473 (mips_avoid_hazard): Likewise.
19474 (mips_reorg_process_insns): Likewise.
19475 (mips_classify_branch_p6600): New function.
19476 * config/mips/mips.h (TUNE_P6600): New define.
19477 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
19478 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
19479 * config/mips/mips.md: Include p6600.md.
19480 (processor): Add p6600.
19481 * config/mips/p6600.md: New file.
19482 * doc/invoke.texi: Add p6600 to supported architectures.
19484 2018-06-13 Martin Sebor <msebor@redhat.com>
19486 PR tree-optimization/86114
19487 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
19489 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
19491 2018-06-13 Richard Biener <rguenther@suse.de>
19493 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
19494 Properly set vector type of the intermediate stmt.
19495 * tree-vect-stmts.c (vectorizable_operation): The destination
19496 var always has vectype_out type.
19498 2018-06-13 Jeff Law <law@redhat.com>
19500 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
19501 integer 0 for argument to print_rtl_with_bb.
19502 (rl78_reorg): Likewise.
19504 2018-06-13 David Malcolm <dmalcolm@redhat.com>
19506 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
19507 from rtx to rtx_insn *.
19508 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
19510 (add_sched_insns_for_speculation): Likewise for local "target",
19511 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
19512 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
19513 from rtx_insn ** to rtx_code_label **.
19514 (reorg_emit_nops): Likewise.
19515 (c6x_reorg): Likewise for local "call_labels".
19516 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
19518 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
19519 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
19520 the loops over LABEL_REFS.
19521 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
19523 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
19524 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
19525 (split_branches): Strengthen local "olabel" from rtx to
19526 rtx_insn *, adding a safe_as_a cast.
19527 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
19529 (add_insn_after): Likewise for first two params.
19530 (add_insn_before): Likewise.
19531 (remove_insn): Likewise for param.
19532 (emit_pattern_before_noloc): Likewise for second and third params.
19533 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
19534 (emit_call_insn_before_noloc): Likewise.
19535 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
19537 (emit_barrier_before): Likewise.
19538 (emit_label_before): Strengthen "label" param from "rtx" to
19539 "rtx_code_label *". Strengthen "before" param from "rtx" to
19541 (emit_insn_after_1): Strengthen "after" param from "rtx" to
19543 (emit_pattern_after_noloc): Likewise.
19544 (emit_insn_after_noloc): Likewise.
19545 (emit_jump_insn_after_noloc): Likewise.
19546 (emit_call_insn_after_noloc): Likewise.
19547 (emit_debug_insn_after_noloc): Likewise.
19548 (emit_barrier_after): Likewise.
19549 (emit_label_after): Likewise for both params.
19550 (emit_pattern_after_setloc): Likewise for "after" param. Convert
19551 "loc" param from "int" to "location_t".
19552 (emit_insn_after_setloc): Likewise.
19553 (emit_jump_insn_after_setloc): Likewise.
19554 (emit_call_insn_after_setloc): Likewise.
19555 (emit_debug_insn_after_setloc): Likewise.
19556 (emit_pattern_before_setloc): Likewise for "before" param. Convert
19557 "loc" param from "int" to "location_t".
19558 (emit_pattern_before): Convert NULL_RTX to NULL.
19559 (emit_insn_before_setloc): Convert "loc" param from "int" to
19561 (emit_jump_insn_before_setloc): Likewise.
19562 (emit_call_insn_before_setloc): Likewise.
19563 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
19564 rtx_insn *. Convert "loc" param from "int" to "location_t".
19565 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
19566 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
19567 Convert 3rd param from "int" to "location_t".
19568 (emit_barrier_before, emit_barrier_after, next_real_insn):
19569 Strengthen param from rtx to rtx_insn *.
19570 (emit_label_before): Strengthen 1st param from "rtx" to
19571 "rtx_code_label *". Strengthen 2nd param from "rtx" to
19573 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
19574 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
19575 Strengthen 2nd param from "rtx" to "rtx_insn *".
19576 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
19577 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
19578 Likewise. Convert 3rd param from "int" to "location_t".
19579 (emit_label_after): Strengthen 1st param from "rtx" to
19580 "rtx_code_label *".
19581 (next_real_insn, remove_insn): Strengthen param from "rtx" to
19583 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
19584 from "rtx" to "rtx_insn *".
19586 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
19588 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
19589 bodies streamed in with -Q.
19590 * dumpfile.c (dump_files): Add lto-stream-out dump file.
19591 * dumpfile.h (tree_dump_index): Add lto_stream_out.
19592 * gimple-streamer-out.c: Include gimple-pretty-print.h
19593 (output_bb): Dump stmts streamed.
19594 * lto-section-out.c: Include print-tree.h
19595 (lto_begin_section): Dump sections created.
19596 (lto_output_decl_index): Dump decl encoded.
19597 * lto-streamer-out.c: Include print-tree.h
19598 (create_output_block): Dump output block created.
19599 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
19600 (output_function): Dump function output.
19601 (output_constructor): Dump constructor streamed.
19602 (write_global_stream): Output indexes encoded.
19603 (produce_asm_for_decls): Dump streams encoded.
19604 * lto-streamer.c (streamer_dump_file): New global var.
19605 * lto-streamer.h (streamer_dump_file): Declare.
19606 * passes.c (ipa_write_summaries): Initialize streamer dump.
19607 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
19610 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
19613 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
19614 offsets for register save directives. Emit a second batch of save
19615 directives, if need be, when the function accesses prior frames.
19617 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19619 * config/arc/fpu.md (fmasf4): Force operand to register.
19620 (fnmasf4): Likewise.
19622 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19624 * config/arc/arc-protos.h (arc_pad_return): Remove.
19625 * config/arc/arc.c (machine_function): Remove force_short_suffix
19627 (arc_print_operand): Adjust printing of '&'.
19628 (arc_verify_short): Remove conditional printing of short suffix.
19629 (arc_final_prescan_insn): Remove reference to size_reason.
19630 (pad_return): New function.
19631 (arc_reorg): Call pad_return.
19632 (arc_pad_return): Remove.
19633 (arc_init_machine_status): Remove reference to force_short_suffix.
19634 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
19635 (attr length): When attribute iscompact is true force to 2
19636 regardless; in the case of maybe check if we want to force the
19637 instruction to have 4 bytes length.
19638 (nopv): Change it to generate 4 byte long nop as well.
19639 (blockage): New pattern.
19640 (simple_return): Remove call to arc_pad_return.
19641 (p_return_i): Likewise.
19643 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19645 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
19647 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19649 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
19652 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19654 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
19655 for ARC700 and ARCv2.
19657 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
19660 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
19661 operands[2] instead of operands[1].
19664 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
19666 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
19667 case, check whether the outer register overlaps an unallocatable
19668 register, not just whether it fits the required class.
19670 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
19672 * poly-int.h (can_div_trunc_p): Add new overload in which all values
19674 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
19675 (memrefs_conflict_p): Likewise.
19676 (init_alias_analysis): Likewise.
19677 * cfgexpand.c (expand_debug_expr): Likewise.
19678 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
19679 * cse.c (fold_rtx): Likewise.
19680 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
19681 * expr.c (emit_block_move_hints): Likewise.
19682 (clear_storage_hints, push_block, emit_push_insn): Likewise.
19683 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
19684 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
19685 (emit_group_store): Likewise.
19686 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
19687 to read the PRE/POST_MODIFY increment.
19688 * calls.c (store_one_arg): Use strip_offset.
19689 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
19691 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
19693 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
19694 (simplify_binary_operation_1): Extend CONST_INT handling to
19696 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
19697 than a HOST_WIDE_INT.
19698 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
19700 (adjust_mems, add_stores): Update accodingly.
19701 (vt_canonicalize_addr): Track polynomial offsets.
19702 (emit_note_insn_var_location): Likewise.
19703 (vt_add_function_parameter): Likewise.
19704 (vt_initialize): Likewise.
19706 2018-06-12 Jeff Law <law@redhat.com>
19708 * config.gcc (alpha*-*-freebsd*): Remove.
19709 * config/alpha/freebsd.h: Remove.
19711 2018-06-12 David Malcolm <dmalcolm@redhat.com>
19714 * spellcheck-tree.c (levenshtein_distance): Rename to...
19715 (get_edit_distance): ...this, and update for underlying renaming.
19716 * spellcheck-tree.h (levenshtein_distance): Rename to...
19717 (get_edit_distance): ...this.
19718 * spellcheck.c (levenshtein_distance): Rename to...
19719 (get_edit_distance): ...this. Convert from Levenshtein distance
19720 to Damerau-Levenshtein distance by supporting transpositions of
19721 adjacent characters. Rename "v1" to "v_next" and "v0" to
19723 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
19724 (selftest::test_edit_distance_unit_test_oneway): ...this, and
19725 update for underlying renaming.
19726 (selftest::levenshtein_distance_unit_test): Rename to...
19727 (selftest::test_get_edit_distance_unit): ...this, and update for
19728 underlying renaming.
19729 (selftest::test_find_closest_string): Add example from PR 69968
19730 where transposition helps
19731 (selftest::test_metric_conditions): Update for renaming.
19732 (selftest::test_metric_conditions): Likewise.
19733 (selftest::spellcheck_c_tests): Likewise.
19734 * spellcheck.h (levenshtein_distance): Rename both overloads to...
19735 (get_edit_distance): ...this.
19736 (best_match::consider): Update for renaming.
19738 2018-06-12 Martin Sebor <msebor@redhat.com>
19740 PR tree-optimization/85259
19741 * builtins.c (compute_objsize): Handle constant offsets.
19742 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
19743 true iff a warning has been issued.
19744 * gimple.h (gimple_nonartificial_location): New function.
19745 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
19746 gimple_nonartificial_location and handle -Wno-system-headers.
19747 (handle_builtin_stxncpy): Same.
19749 2018-06-12 Martin Sebor <msebor@redhat.com>
19752 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
19754 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
19756 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
19757 BUILTIN_VEC_XST entries for pointer to double and long long.
19759 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
19762 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
19764 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
19767 2018-06-12 Martin Liska <mliska@suse.cz>
19769 * doc/options.texi: Document IntegerRange.
19771 2018-06-12 Martin Liska <mliska@suse.cz>
19773 * config/i386/i386.opt: Make MPX-related options as Deprecated.
19774 * opt-functions.awk: Handle Deprecated flag.
19775 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
19777 (read_cmdline_option): Report warning for a deprecated option.
19778 * opts.h (struct cl_option): Add new field cl_deprecated.
19779 (CL_ERR_DEPRECATED): New.
19781 2018-06-12 Martin Liska <mliska@suse.cz>
19783 * doc/options.texi: Document Deprecated option flag.
19785 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19787 * config/arc/arc-arch.h (arc_extras): New enum.
19788 (arc_cpu_t):Add field extra.
19789 (arc_cpu_types): Consider the extras.
19790 * config/arc/arc-cpus.def: Add extras info.
19791 * config/arc/arc-opts.h (processor_type): Consider extra field.
19792 * config/arc/arc.c (arc_override_options): Handle extra field.
19794 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
19796 * config/arc/arc-arch.h: Update ARC_OPTX macro.
19797 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
19799 * config/arc/arc.c (arc_init): Update pic warning.
19800 (irq_range): Update irq range parsing warnings.
19801 (arc_override_options): Update various warning messages.
19802 (arc_handle_aux_attribute): Likewise.
19804 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
19806 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
19808 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
19810 * doc/sourcebuild.texi: Document usage of line number 0 in verify
19811 compiler messages directives.
19813 2018-06-12 Matthew Fortune <mfortune@gmail.com>
19815 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
19816 * config/mips/mips-tables.opt: Regenerate.
19817 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
19819 * doc/invoke.texi: Document -march=i6500.
19821 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
19823 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
19824 (i6400_gpmul): Add cpu_unit.
19825 (i6400_gpdiv): Likewise.
19826 (i6400_msa_add_d): Update reservations.
19827 (i6400_msa_int_add) Likewise.
19828 (i6400_msa_short_logic3) Likewise.
19829 (i6400_msa_short_logic2) Likewise.
19830 (i6400_msa_short_logic) Likewise.
19831 (i6400_msa_move) Likewise.
19832 (i6400_msa_cmp) Likewise.
19833 (i6400_msa_short_float2) Likewise.
19834 (i6400_msa_div_d) Likewise.
19835 (i6400_msa_long_logic1) Likewise.
19836 (i6400_msa_long_logic2) Likewise.
19837 (i6400_msa_mult) Likewise.
19838 (i6400_msa_long_float2) Likewise.
19839 (i6400_msa_long_float4) Likewise.
19840 (i6400_msa_long_float5) Likewise.
19841 (i6400_msa_long_float8) Likewise.
19842 (i6400_fpu_fadd): Include frint type.
19843 (i6400_fpu_store): New define_insn_reservation.
19844 (i6400_fpu_load): Likewise.
19845 (i6400_fpu_move): Likewise.
19846 (i6400_fpu_fcmp): Likewise.
19847 (i6400_fpu_fmadd): Likewise.
19848 (i6400_int_mult): Include imul3nc type and update reservation.
19849 (i6400_int_div): Include idiv3 type and update reservation.
19850 (i6400_int_load): Update to check type not move_type.
19851 (i6400_int_store): Likewise.
19852 (i6400_int_prefetch): Set zero latency.
19854 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
19856 * gcc.c: Document new %@{...} sequence.
19857 (LINK_COMMAND_SPEC): Use it for the -L switches.
19858 (cpp_unique_options): Use it for the -I switches.
19859 (at_file_argbuf): New global variable.
19860 (in_at_file): Likewise.
19861 (alloc_args): Create at_file_argbuf.
19862 (clear_args): Truncate at_file_argbuf.
19863 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
19864 (open_at_file): New function.
19865 (close_at_file): Likewise.
19866 (create_at_file): Delete.
19867 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
19870 (validate_switches_from_spec): Deal with %@{...} sequence.
19871 (validate_switches): Likewise.
19872 (driver::finalize): Call clear_args.
19874 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
19876 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
19878 2018-06-11 Martin Sebor <msebor@redhat.com>
19880 * doc/invoke.texi (-Wall): List -Wc++17-compat.
19881 (Wno-class-memaccess): Add @opindex.
19882 (Wno-templates, Wno-multiple-inheritance): Same.
19883 (Wno-virtual-inheritance, Wno-namespaces): Same.
19884 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
19885 (Wno-format-overflow, Wno-format-truncation): Same.
19886 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
19887 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
19888 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
19889 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
19890 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
19891 (Wno-misspelled-isr): Same.
19893 2018-06-11 Martin Sebor <msebor@redhat.com>
19895 * PR tree-optimization/86083
19896 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
19898 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
19900 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
19902 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
19905 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
19906 on the correct operand.
19907 (*movdi_internal64): Ditto.
19909 2018-06-11 Martin Liska <mliska@suse.cz>
19911 PR tree-optimization/86089
19912 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
19914 2018-06-11 Julia Koval <julia.koval@intel.com>
19916 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
19917 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
19918 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
19920 2018-06-11 Olivier Hainque <hainque@adacore.com>
19922 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
19923 for Ada with strict dwarf2.
19925 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
19928 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
19931 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
19933 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
19935 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
19937 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
19940 2018-06-08 Martin Liska <mliska@suse.cz>
19942 * tree-cfg.h (debug_function): Fix argument type to match
19945 2018-06-08 Martin Liska <mliska@suse.cz>
19947 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
19948 Remove usage of MPX-related (and removed) fields.
19949 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
19951 2018-06-08 David Malcolm <dmalcolm@redhat.com>
19953 * cfg.c (debug): Use TDF_NONE rather than 0.
19954 * cfghooks.c (debug): Likewise.
19955 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
19956 (struct dump_option_value_info): Convert to...
19957 (struct kv_pair): ...this template type.
19958 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
19960 (optinfo_verbosity_options): Likewise.
19961 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
19963 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
19964 than int for "optgroup_flags" param.
19965 (dump_generic_expr_loc): Use dump_flags_t rather than int for
19967 (dump_dec): Likewise.
19968 (dump_finish): Use TDF_NONE rather than 0.
19969 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
19970 rather than int for "optgroup_flags" param. Use TDF_NONE rather
19971 than 0. Update for change to option_ptr.
19972 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
19973 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
19974 0. Update for changes to optinfo_verbosity_options and
19976 (opt_info_switch_p): Convert optgroup_flags from int to
19978 (dump_basic_block): Use dump_flags_t rather than int
19979 for "dump_kind" param.
19980 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
19981 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
19982 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
19983 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
19984 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
19985 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
19986 TDF_NONE): Convert from macros to...
19987 (enum dump_flag): ...this new enum.
19988 (dump_flags_t): Update to use enum.
19989 (operator|, operator&, operator~, operator|=, operator&=):
19990 Implement for dump_flags_t.
19991 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
19992 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
19993 Convert from macros to...
19994 (enum optgroup_flag): ...this new enum.
19995 (optgroup_flags_t): New typedef.
19996 (operator|, operator|=): Implement for optgroup_flags_t.
19997 (struct dump_file_info): Convert field "alt_flags" to
19998 dump_flags_t. Convert field "optgroup_flags" to
20000 (dump_basic_block): Use dump_flags_t rather than int for param.
20001 (dump_generic_expr_loc): Likewise.
20002 (dump_dec): Likewise.
20003 (dump_register): Convert param "optgroup_flags" to
20005 (opt_info_enable_passes): Likewise.
20006 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
20008 * gimple-pretty-print.c (debug): Likewise.
20009 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
20010 (merged_store_group::apply_stores): Likewise.
20011 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
20012 * gimple.c (verify_gimple_pp): Likewise.
20013 * graphite-poly.c (print_pbb_body): Likewise.
20014 * passes.c (pass_manager::register_one_dump_file): Convert
20015 local "optgroup_flags" to optgroup_flags_t.
20016 * print-tree.c (print_node): Use TDF_NONE rather than 0.
20018 (debug_body): Likewise.
20019 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
20020 to optgroup_flags_t.
20021 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
20023 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
20024 (convert_mult_to_fma): Likewise.
20025 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
20026 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
20027 * tree-vect-data-refs.c (dump_lower_bound): Convert param
20028 "dump_kind" to dump_flags_t.
20030 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
20032 * config/rs6000/rs6000.c (min, max): Delete.
20034 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
20036 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
20037 -mabi=spe and -mabi=no-spe.
20039 2018-06-08 Martin Liska <mliska@suse.cz>
20041 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
20042 where we expect an existing summary.
20044 2018-06-08 Martin Liska <mliska@suse.cz>
20046 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
20047 * ipa-inline.h (estimate_edge_growth): Likewise.
20049 2018-06-08 Martin Liska <mliska@suse.cz>
20051 * cgraph.c (function_version_hasher::hash): Use
20052 cgraph_node::get_uid ().
20053 (function_version_hasher::equal):
20054 * cgraph.h (cgraph_node::get_uid): New method.
20055 * ipa-inline.c (update_caller_keys): Use
20056 cgraph_node::get_uid ().
20057 (update_callee_keys): Likewise.
20058 * ipa-utils.c (searchc): Likewise.
20059 (ipa_reduced_postorder): Likewise.
20060 * lto-cgraph.c (input_node): Likewise.
20061 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
20062 * symbol-summary.h (symtab_insertion): Likewise.
20063 (symtab_removal): Likewise.
20064 (symtab_duplication): Likewise.
20065 * tree-pretty-print.c (dump_function_header): Likewise.
20066 * tree-sra.c (convert_callers_for_node): Likewise.
20068 2018-06-08 Martin Liska <mliska@suse.cz>
20070 * cgraph.c (symbol_table::create_edge): Always assign a new
20072 (symbol_table::free_edge): Do not recycle numbers.
20073 * cgraph.h (cgraph_edge::get): New method.
20074 * symbol-summary.h (symtab_removal): Use it.
20075 (symtab_duplication): Likewise.
20076 (call_summary::hashable_uid): Remove.
20078 2018-06-08 Martin Liska <mliska@suse.cz>
20080 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
20081 (initialize_growth_caches): Remove.
20082 (free_growth_caches): Likewise.
20083 (do_estimate_edge_time): Use edge_growth_cache.
20084 (do_estimate_edge_size): Likewise.
20085 (do_estimate_edge_hints): Likewise.
20086 * ipa-inline.c (reset_edge_caches): Likewise.
20087 (recursive_inlining): Likewise.
20088 (inline_small_functions): Likewise.
20089 * ipa-inline.h (initialize_growth_caches): Remove.
20090 (estimate_edge_size): Likewise.
20091 (estimate_edge_time): Likewise.
20092 (estimate_edge_hints): Likewise.
20093 (reset_edge_growth_cache): Likewise.
20094 * symbol-summary.h (call_summary::remove): New method.
20096 2018-06-08 Martin Liska <mliska@suse.cz>
20098 * ipa-cp.c (class edge_clone_summary): New summary.
20099 (grow_edge_clone_vectors): Remove.
20100 (ipcp_edge_duplication_hook): Remove.
20101 (class edge_clone_summary_t): New call_summary class.
20102 (ipcp_edge_removal_hook): Remove.
20103 (edge_clone_summary_t::duplicate): New function.
20104 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
20105 (create_specialized_node): Likewise.
20106 (ipcp_driver): Initialize edge_clone_summaries and do not
20109 2018-06-08 Martin Liska <mliska@suse.cz>
20111 * symbol-summary.h (get): New function.
20112 (call_summary::m_initialize_when_cloning): New class member.
20114 2018-06-08 Martin Liska <mliska@suse.cz>
20116 * cgraph.c (cgraph_node::remove): Do not recycle uid.
20117 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
20118 (symbol_table::allocate_cgraph_symbol): Do not set uid.
20119 * passes.c (uid_hash_t): Record removed_nodes by their uids.
20120 (remove_cgraph_node_from_order): Use the removed_nodes set.
20121 (do_per_function_toporder): Likwise.
20122 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
20123 instead of summary_uid.
20124 (symtab_removal): Likewise.
20125 (symtab_duplication): Likewise.
20127 2018-06-08 Martin Liska <mliska@suse.cz>
20129 * ipa-cp.c (ipcp_store_bits_results): Use
20130 ipcp_transformation_sum.
20131 (ipcp_store_vr_results): Likewise.
20132 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
20134 (ipcp_transformation_initialize): ... this.
20135 (ipa_set_node_agg_value_chain):
20136 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
20137 (write_ipcp_transformation_info): Likewise.
20138 (read_ipcp_transformation_info): Likewise.
20139 (ipcp_update_bits): Likewise.
20140 (ipcp_update_vr): Likewise.
20141 (ipcp_transform_function): Likewise.
20142 * ipa-prop.h: Rename ipcp_transformation_summary to
20143 ipcp_transformation.
20144 (class ipcp_transformation_t): New function summary.
20145 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
20146 (ipa_get_agg_replacements_for_node): Likewise.
20148 2018-06-08 Martin Liska <mliska@suse.cz>
20150 * ipa-pure-const.c (struct funct_state_d): Do it class instead
20152 (class funct_state_summary_t): New function_summary class.
20153 (has_function_state): Remove.
20154 (get_function_state): Likewise.
20155 (set_function_state): Likewise.
20156 (add_new_function): Likewise.
20157 (funct_state_summary_t::insert): New function.
20158 (duplicate_node_data): Remove.
20159 (remove_node_data): Remove.
20160 (funct_state_summary_t::duplicate): New function.
20161 (register_hooks): Create new funct_state_summaries.
20162 (pure_const_generate_summary): Use it.
20163 (pure_const_write_summary): Likewise.
20164 (pure_const_read_summary): Likewise.
20165 (propagate_pure_const): Likewise.
20166 (propagate_nothrow): Likewise.
20167 (dump_malloc_lattice): Likewise.
20168 (propagate_malloc): Likewise.
20169 (execute): Do not register hooks, just remove summary
20171 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
20174 2018-06-08 Martin Liska <mliska@suse.cz>
20176 * ipa-reference.c (remove_node_data): Remove.
20177 (duplicate_node_data): Likewise.
20178 (class ipa_ref_var_info_summary_t): New class.
20179 (class ipa_ref_opt_summary_t): Likewise.
20180 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
20181 (get_reference_optimization_summary): Use
20182 ipa_ref_opt_sum_summaries.
20183 (set_reference_vars_info): Remove.
20184 (set_reference_optimization_summary): Likewise.
20185 (ipa_init): Create summaries.
20186 (init_function_info): Use function summary.
20187 (ipa_ref_opt_summary_t::duplicate): New function.
20188 (ipa_ref_opt_summary_t::remove): New function.
20189 (get_read_write_all_from_node): Fix GNU coding style.
20190 (propagate): Use function summary.
20191 (write_node_summary_p): Fix GNU coding style.
20192 (stream_out_bitmap): Likewise.
20193 (ipa_reference_read_optimization_summary): Use function summary.
20194 (ipa_reference_c_finalize): Do not release hooks.
20196 2018-06-08 Martin Liska <mliska@suse.cz>
20198 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
20199 (analyze_function_body): Extract multiple calls of get_create.
20200 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
20201 * ipa-inline.c (recursive_inlining): Use ::get method.
20202 * ipa-inline.h (estimate_edge_growth): Likewise.
20204 2018-06-08 Martin Liska <mliska@suse.cz>
20206 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
20208 (hsa_function_summary::hsa_function_summary): Use the new enum
20210 (hsa_gpu_implementation_p): Use hsa_summaries::get.
20211 * hsa-gen.c (hsa_get_host_function): Likewise.
20212 (get_brig_function_name): Likewise.
20213 * ipa-hsa.c (process_hsa_functions): Likewise.
20214 (ipa_hsa_write_summary): Likewise.
20215 * symbol-summary.h (symtab_duplication): Use ::get function/
20216 (get): New function.
20218 2018-06-08 Martin Liska <mliska@suse.cz>
20220 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
20222 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
20223 (hsa_register_kernel): Likewise.
20224 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
20225 * hsa-gen.c (hsa_get_host_function): Likewise.
20226 (get_brig_function_name): Likewise.
20227 (generate_hsa): Likewise.
20228 (pass_gen_hsail::execute): Likewise.
20229 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
20230 (devirtualization_time_bonus): Likewise.
20231 (ipcp_propagate_stage): Likewise.
20232 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
20233 (edge_set_predicate): Likewise.
20234 (evaluate_conditions_for_known_args): Likewise.
20235 (evaluate_properties_for_edge): Likewise.
20236 (ipa_fn_summary::reset): Likewise.
20237 (ipa_fn_summary_t::duplicate): Likewise.
20238 (dump_ipa_call_summary): Likewise.
20239 (ipa_dump_fn_summary): Likewise.
20240 (analyze_function_body): Likewise.
20241 (compute_fn_summary): Likewise.
20242 (estimate_edge_devirt_benefit): Likewise.
20243 (estimate_edge_size_and_time): Likewise.
20244 (estimate_calls_size_and_time): Likewise.
20245 (estimate_node_size_and_time): Likewise.
20246 (inline_update_callee_summaries): Likewise.
20247 (remap_edge_change_prob): Likewise.
20248 (remap_edge_summaries): Likewise.
20249 (ipa_merge_fn_summary_after_inlining): Likewise.
20250 (ipa_update_overall_fn_summary): Likewise.
20251 (read_ipa_call_summary): Likewise.
20252 (inline_read_section): Likewise.
20253 (write_ipa_call_summary): Likewise.
20254 (ipa_fn_summary_write): Likewise.
20255 (ipa_free_fn_summary): Likewise.
20256 * ipa-hsa.c (process_hsa_functions): Likewise.
20257 (ipa_hsa_write_summary): Likewise.
20258 (ipa_hsa_read_section): Likewise.
20259 * ipa-icf.c (sem_function::merge): Likewise.
20260 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
20261 (do_estimate_edge_time): Likewise.
20262 (estimate_size_after_inlining): Likewise.
20263 (estimate_growth): Likewise.
20264 (growth_likely_positive): Likewise.
20265 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
20266 (inline_call): Likewise.
20267 * ipa-inline.c (caller_growth_limits): Likewise.
20268 (can_inline_edge_p): Likewise.
20269 (can_inline_edge_by_limits_p): Likewise.
20270 (compute_uninlined_call_time): Likewise.
20271 (compute_inlined_call_time): Likewise.
20272 (want_inline_small_function_p): Likewise.
20273 (edge_badness): Likewise.
20274 (update_caller_keys): Likewise.
20275 (update_callee_keys): Likewise.
20276 (recursive_inlining): Likewise.
20277 (inline_small_functions): Likewise.
20278 (inline_to_all_callers_1): Likewise.
20279 (dump_overall_stats): Likewise.
20280 (early_inline_small_functions): Likewise.
20281 (early_inliner): Likewise.
20282 * ipa-inline.h (estimate_edge_growth): Likewise.
20283 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
20284 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
20285 * ipa-prop.h (IPA_NODE_REF): Likewise.
20286 (IPA_EDGE_REF): Likewise.
20287 * ipa-pure-const.c (malloc_candidate_p): Likewise.
20288 (propagate_malloc): Likewise.
20289 * ipa-split.c (execute_split_functions): Likewise.
20290 * symbol-summary.h: Rename get to get_create.
20292 (get_create): Likewise.
20293 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
20295 2018-06-08 Martin Liska <mliska@suse.cz>
20297 * symbol-summary.h (release): Move definition out of class
20299 (symtab_removal): Likewise.
20300 (symtab_duplication): Likewise.
20302 2018-06-08 Martin Liska <mliska@suse.cz>
20304 * symbol-summary.h (function_summary): Move constructor
20305 implementation out of class declaration.
20306 (release): Likewise.
20307 (symtab_insertion): Likewise.
20308 (symtab_removal): Likewise.
20309 (symtab_duplication): Likewise.
20312 2018-06-08 Martin Liska <mliska@suse.cz>
20314 * Makefile.in: Remove support for MPX (macros, related functions,
20315 fields in cgraph_node, ...).
20316 * builtin-types.def (BT_BND): Likewise.
20317 (BT_FN_BND_CONST_PTR): Likewise.
20318 (BT_FN_CONST_PTR_BND): Likewise.
20319 (BT_FN_VOID_PTR_BND): Likewise.
20320 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
20321 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
20322 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
20323 (expand_builtin_mempcpy_with_bounds): Likewise.
20324 (expand_builtin_memset_with_bounds): Likewise.
20325 (expand_builtin_memset_args): Likewise.
20326 (std_expand_builtin_va_start): Likewise.
20327 (expand_builtin): Likewise.
20328 (expand_builtin_with_bounds): Likewise.
20329 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
20330 (DEF_LIB_BUILTIN_CHKP): Likewise.
20331 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
20332 (DEF_CHKP_BUILTIN): Likewise.
20333 (BUILT_IN_MEMCPY): Likewise.
20334 (BUILT_IN_MEMMOVE): Likewise.
20335 (BUILT_IN_MEMPCPY): Likewise.
20336 (BUILT_IN_MEMSET): Likewise.
20337 (BUILT_IN_STPCPY): Likewise.
20338 (BUILT_IN_STRCAT): Likewise.
20339 (BUILT_IN_STRCHR): Likewise.
20340 (BUILT_IN_STRCPY): Likewise.
20341 (BUILT_IN_STRLEN): Likewise.
20342 (BUILT_IN_MEMCPY_CHK): Likewise.
20343 (BUILT_IN_MEMMOVE_CHK): Likewise.
20344 (BUILT_IN_MEMPCPY_CHK): Likewise.
20345 (BUILT_IN_MEMSET_CHK): Likewise.
20346 (BUILT_IN_STPCPY_CHK): Likewise.
20347 (BUILT_IN_STRCAT_CHK): Likewise.
20348 (BUILT_IN_STRCPY_CHK): Likewise.
20349 * calls.c (store_bounds): Likewise.
20350 (emit_call_1): Likewise.
20351 (special_function_p): Likewise.
20352 (maybe_warn_nonstring_arg): Likewise.
20353 (initialize_argument_information): Likewise.
20354 (finalize_must_preallocate): Likewise.
20355 (compute_argument_addresses): Likewise.
20356 (expand_call): Likewise.
20357 * cfgexpand.c (expand_call_stmt): Likewise.
20358 (expand_return): Likewise.
20359 (expand_gimple_stmt_1): Likewise.
20360 (pass_expand::execute): Likewise.
20361 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
20362 (cgraph_node::remove): Likewise.
20363 (cgraph_node::dump): Likewise.
20364 (cgraph_node::verify_node): Likewise.
20365 * cgraph.h (chkp_function_instrumented_p): Likewise.
20366 (symtab_node::get_alias_target): Likewise.
20367 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
20368 (cgraph_local_p): Likewise.
20369 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
20370 (cgraph_edge::rebuild_references): Likewise.
20371 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
20372 (walk_polymorphic_call_targets): Likewise.
20373 (cgraph_node::expand_thunk): Likewise.
20374 (symbol_table::output_weakrefs): Likewise.
20375 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
20376 (ix86_handle_option): Likewise.
20377 * config/i386/constraints.md: Likewise.
20378 * config/i386/i386-builtin-types.def (BND): Likewise.
20382 * config/i386/i386-builtin.def (BDESC_END): Likewise.
20383 (BDESC_FIRST): Likewise.
20385 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
20386 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
20387 * config/i386/i386.c (enum reg_class): Likewise.
20388 (ix86_target_string): Likewise.
20389 (ix86_option_override_internal): Likewise.
20390 (ix86_conditional_register_usage): Likewise.
20391 (ix86_valid_target_attribute_inner_p): Likewise.
20392 (ix86_set_indirect_branch_type): Likewise.
20393 (ix86_set_current_function): Likewise.
20394 (ix86_function_arg_regno_p): Likewise.
20395 (init_cumulative_args): Likewise.
20396 (ix86_function_arg_advance): Likewise.
20397 (ix86_function_arg): Likewise.
20398 (ix86_pass_by_reference): Likewise.
20399 (ix86_function_value_regno_p): Likewise.
20400 (ix86_function_value_1): Likewise.
20401 (ix86_function_value_bounds): Likewise.
20402 (ix86_return_in_memory): Likewise.
20403 (ix86_setup_incoming_vararg_bounds): Likewise.
20404 (ix86_va_start): Likewise.
20405 (indirect_thunk_need_prefix): Likewise.
20406 (print_reg): Likewise.
20407 (ix86_print_operand): Likewise.
20408 (ix86_expand_call): Likewise.
20409 (ix86_output_function_return): Likewise.
20410 (reg_encoded_number): Likewise.
20411 (BDESC_VERIFYS): Likewise.
20412 (ix86_init_mpx_builtins): Likewise.
20413 (ix86_init_builtins): Likewise.
20414 (ix86_emit_cmove): Likewise.
20415 (ix86_emit_move_max): Likewise.
20416 (ix86_expand_builtin): Likewise.
20417 (ix86_builtin_mpx_function): Likewise.
20418 (ix86_get_arg_address_for_bt): Likewise.
20419 (ix86_load_bounds): Likewise.
20420 (ix86_store_bounds): Likewise.
20421 (ix86_load_returned_bounds): Likewise.
20422 (ix86_store_returned_bounds): Likewise.
20423 (ix86_class_likely_spilled_p): Likewise.
20424 (ix86_hard_regno_mode_ok): Likewise.
20425 (x86_order_regs_for_local_alloc): Likewise.
20426 (ix86_mitigate_rop): Likewise.
20427 (ix86_bnd_prefixed_insn_p): Likewise.
20428 (ix86_mpx_bound_mode): Likewise.
20429 (ix86_make_bounds_constant): Likewise.
20430 (ix86_initialize_bounds): Likewise.
20431 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
20432 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
20433 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
20434 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
20435 (TARGET_CHKP_BOUND_MODE): Likewise.
20436 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
20437 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
20438 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
20439 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
20440 * config/i386/i386.h (TARGET_MPX): Likewise.
20441 (TARGET_MPX_P): Likewise.
20442 (VALID_BND_REG_MODE): Likewise.
20443 (FIRST_BND_REG): Likewise.
20444 (LAST_BND_REG): Likewise.
20445 (enum reg_class): Likewise.
20446 (BND_REG_P): Likewise.
20447 (BND_REGNO_P): Likewise.
20448 (BNDmode): Likewise.
20449 (ADJUST_INSN_LENGTH): Likewise.
20450 * config/i386/i386.md: Likewise.
20451 * config/i386/i386.opt: Likewise.
20452 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
20453 (defined): Likewise.
20454 (LINK_MPX): Likewise.
20455 (MPX_SPEC): Likewise.
20456 (LIBMPX_SPEC): Likewise.
20457 (LIBMPXWRAPPERS_SPEC): Likewise.
20458 (CHKP_SPEC): Likewise.
20459 * config/i386/predicates.md: Likewise.
20460 * dbxout.c (dbxout_type): Likewise.
20461 * doc/extend.texi: Likewise.
20462 * doc/invoke.texi: Likewise.
20463 * doc/md.texi: Likewise.
20464 * doc/tm.texi: Likewise.
20465 * doc/tm.texi.in: Likewise.
20466 * dwarf2out.c (is_base_type): Likewise.
20467 (gen_formal_types_die): Likewise.
20468 (gen_subprogram_die): Likewise.
20469 (gen_type_die_with_usage): Likewise.
20470 (gen_decl_die): Likewise.
20471 (dwarf2out_late_global_decl): Likewise.
20472 * expr.c (expand_assignment): Likewise.
20473 (emit_storent_insn): Likewise.
20474 (store_expr_with_bounds): Likewise.
20475 (store_expr): Likewise.
20476 (expand_expr_real_1): Likewise.
20477 * expr.h (store_expr_with_bounds): Likewise.
20478 * function.c (use_register_for_decl): Likewise.
20479 (struct bounds_parm_data): Likewise.
20480 (assign_parms_augmented_arg_list): Likewise.
20481 (assign_parm_find_entry_rtl): Likewise.
20482 (assign_parm_is_stack_parm): Likewise.
20483 (assign_parm_load_bounds): Likewise.
20484 (assign_bounds): Likewise.
20485 (assign_parms): Likewise.
20486 (expand_function_start): Likewise.
20487 * gcc.c (CHKP_SPEC): Likewise.
20488 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
20489 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
20490 (wrestrict_dom_walker::check_call): Likewise.
20491 * gimple.c (gimple_build_call_from_tree): Likewise.
20492 * gimple.h (enum gf_mask): Likewise.
20493 (gimple_call_with_bounds_p): Likewise.
20494 (gimple_call_set_with_bounds): Likewise.
20495 * gimplify.c (gimplify_init_constructor): Likewise.
20496 * ipa-cp.c (initialize_node_lattices): Likewise.
20497 (propagate_constants_across_call): Likewise.
20498 (find_more_scalar_values_for_callers_subset): Likewise.
20499 * ipa-hsa.c (process_hsa_functions): Likewise.
20500 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
20501 * ipa-icf.c (sem_function::merge): Likewise.
20502 * ipa-inline.c (early_inliner): Likewise.
20503 * ipa-pure-const.c (warn_function_noreturn): Likewise.
20504 (warn_function_cold): Likewise.
20505 (propagate_pure_const): Likewise.
20506 * ipa-ref.h (enum GTY): Likewise.
20507 * ipa-split.c (find_retbnd): Likewise.
20508 (consider_split): Likewise.
20509 (split_function): Likewise.
20510 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
20511 * ipa.c (walk_polymorphic_call_targets): Likewise.
20512 (symbol_table::remove_unreachable_nodes): Likewise.
20513 (process_references): Likewise.
20514 (cgraph_build_static_cdtor_1): Likewise.
20515 * lto-cgraph.c (lto_output_node): Likewise.
20516 (output_refs): Likewise.
20517 (compute_ltrans_boundary): Likewise.
20518 (input_overwrite_node): Likewise.
20519 (input_node): Likewise.
20520 (input_cgraph_1): Likewise.
20521 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
20522 * passes.c (pass_manager::execute_early_local_passes): Likewise.
20523 (class pass_chkp_instrumentation_passes): Likewise.
20524 (make_pass_chkp_instrumentation_passes): Likewise.
20525 * passes.def: Likewise.
20526 * rtl.h (struct GTY): Likewise.
20527 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
20528 * stor-layout.c (layout_type): Likewise.
20529 * symtab.c: Likewise.
20530 * target.def: Likewise.
20531 * targhooks.c (default_chkp_bound_type): Likewise.
20532 (default_chkp_bound_mode): Likewise.
20533 (default_builtin_chkp_function): Likewise.
20534 (default_chkp_function_value_bounds): Likewise.
20535 (default_chkp_make_bounds_constant): Likewise.
20536 (default_chkp_initialize_bounds): Likewise.
20537 * targhooks.h (default_chkp_bound_type): Likewise.
20538 (default_chkp_bound_mode): Likewise.
20539 (default_builtin_chkp_function): Likewise.
20540 (default_chkp_function_value_bounds): Likewise.
20541 (default_chkp_make_bounds_constant): Likewise.
20542 (default_chkp_initialize_bounds): Likewise.
20543 * toplev.c (compile_file): Likewise.
20544 (process_options): Likewise.
20545 * tree-core.h (DEF_BUILTIN): Likewise.
20546 (DEF_BUILTIN_CHKP): Likewise.
20547 * tree-inline.c (declare_return_variable): Likewise.
20548 (remap_gimple_stmt): Likewise.
20549 (copy_bb): Likewise.
20550 (initialize_inlined_parameters): Likewise.
20551 (expand_call_inline): Likewise.
20552 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
20553 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
20554 (make_pass_ipa_chkp_produce_thunks): Likewise.
20555 (make_pass_chkp): Likewise.
20556 (make_pass_chkp_opt): Likewise.
20557 (make_pass_chkp_instrumentation_passes): Likewise.
20558 * tree-pretty-print.c (dump_generic_node): Likewise.
20559 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
20560 * tree-ssa-dce.c (propagate_necessity): Likewise.
20561 (eliminate_unnecessary_stmts): Likewise.
20562 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
20563 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
20564 * tree-ssa-sccvn.h: Likewise.
20565 * tree-ssa-strlen.c (get_string_length): Likewise.
20566 (valid_builtin_call): Likewise.
20567 (adjust_last_stmt): Likewise.
20568 (handle_builtin_strchr): Likewise.
20569 (handle_builtin_strcpy): Likewise.
20570 (handle_builtin_stxncpy): Likewise.
20571 (handle_builtin_memcpy): Likewise.
20572 (handle_builtin_strcat): Likewise.
20573 (strlen_check_and_optimize_stmt): Likewise.
20574 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
20575 * tree-streamer-in.c: Likewise.
20576 * tree-streamer.c (record_common_node): Likewise.
20577 * tree.c (tree_code_size): Likewise.
20578 (wide_int_to_tree_1): Likewise.
20579 (type_contains_placeholder_1): Likewise.
20580 (build_common_tree_nodes): Likewise.
20581 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
20582 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
20583 (POINTER_BOUNDS_P): Likewise.
20584 (BOUNDED_TYPE_P): Likewise.
20585 (BOUNDED_P): Likewise.
20586 (CALL_WITH_BOUNDS_P): Likewise.
20587 (pointer_bounds_type_node): Likewise.
20588 * value-prof.c (gimple_ic): Likewise.
20589 * var-tracking.c (vt_add_function_parameters): Likewise.
20590 * varasm.c (make_decl_rtl): Likewise.
20591 (assemble_start_function): Likewise.
20592 (output_constant): Likewise.
20593 (maybe_assemble_visibility): Likewise.
20594 * varpool.c (ctor_for_folding): Likewise.
20595 * chkp-builtins.def: Remove.
20596 * ipa-chkp.c: Remove.
20597 * ipa-chkp.h: Remove.
20598 * rtl-chkp.c: Remove.
20599 * rtl-chkp.h: Remove.
20600 * tree-chkp-opt.c: Remove.
20601 * tree-chkp.c: Remove.
20602 * tree-chkp.h: Remove.
20604 2018-06-07 Carl Love <cel@us.ibm.com>
20606 * config/rs6000/vsx.md (vextract_fp_from_shorth,
20607 vextract_fp_from_shortl): Add BE support.
20609 2018-06-07 Paul Koning <ni1d@arrl.net>
20611 * compare-elim.c (try_merge_compare): Don't merge compare if
20612 address contains a side effect.
20613 (try_eliminate_compare): Likewise.
20615 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
20617 * config.gcc: Support "tremont".
20618 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
20619 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20621 * config/i386/i386.c (m_TREMONT): Define.
20622 (processor_target_table): Add "tremont".
20623 (PTA_TREMONT): Define.
20624 (ix86_lea_outperforms): Add TARGET_TREMONT.
20625 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
20626 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
20627 and M_INTEL_GOLDMONT_PLUS.
20628 (fold_builtin_cpu): Add "tremont".
20629 (ix86_add_stmt_cost): Add TARGET_TREMONT.
20630 (ix86_option_override_internal): Add "tremont".
20631 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
20632 (processor_type): Add PROCESSOR_TREMONT.
20633 * config/i386/x86-tune.def: Add m_TREMONT.
20634 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
20636 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
20638 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
20639 symbol defined for msp430i* devices to be lower case.
20641 2018-06-07 Richard Biener <rguenther@suse.de>
20643 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
20644 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
20645 Properly wrap signed arithmetic if overflow wraps.
20647 2018-06-07 Jakub Jelinek <jakub@redhat.com>
20649 PR tree-optimization/69615
20650 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
20651 of a cast from a same precision integral SSA_NAME in a bb dominated
20652 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
20653 cast to utype if rhs2 has already a compatible type.
20655 2018-06-07 Richard Biener <rguenther@suse.de>
20657 PR tree-optimization/85935
20658 * graphite-scop-detection.c (find_params_in_bb): Analyze
20659 condition operands with respect to the correct loop. Assert
20660 the analysis doesn't fail.
20662 2018-06-04 Carl Love <cel@us.ibm.com>
20664 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
20665 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
20666 as it is slightly cheaper.
20667 (first_match_or_eos_index_<mode>):
20668 Calculate index using natural element order.
20669 (first_match_index_<mode>):
20670 Calculate index using natural element order.
20671 (first_match_or_eos_index_<mode>):
20672 Calculate index using natural order.
20673 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
20674 for BE and LE modes.
20675 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
20676 P9V_BUILTIN_VCLZLSBB_V16QI.
20677 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
20680 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
20682 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
20683 indentation and line wrap for many prototypes. Add missing
20684 @smallexample directives around block of prototypes for vec_xl and
20687 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
20689 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
20690 track if we pass or return IEEE 128-bit floating point.
20691 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
20692 C++ mangling that is compatible with GCC 8.1.
20693 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
20694 (init_cumulative_args): Note if we pass or return IEEE 128-bit
20695 floating point types.
20696 (rs6000_function_arg_advance_1): Likewise.
20697 (rs6000_mangle_type): Optionally generate mangled names that match
20698 what GCC 8.1 generated for IEEE 128-bit floating point types.
20699 (rs6000_globalize_decl_name): If we have an external function that
20700 passes or returns IEEE 128-bit types, generate a weak reference
20701 from the mangled name used in GCC 8.1 to the current mangled
20703 (rs6000_init_builtins): Make __ibm128 use the long double type if
20704 long double is IBM extended double. Make __float128 use the long
20705 double type if long double is IEEE 128-bit.
20708 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
20709 macro for __ibm128 built-in functions.
20710 (PACK_IF): Add __ibm128 pack/unpack functions.
20711 (UNPACK_IF): Likewise.
20712 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
20713 enable long double built-in functions if long double is IEEE
20714 128-bit floating point.
20715 (rs6000_invalid_builtin): Update long double built-in function
20717 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
20718 functions, adjust the built-in function to use the long double
20719 built-in function if __ibm128 and long double are the same type.
20720 * doc/extend.texi (PowerPC builtins): Update documention for
20721 __builtin_{,un}pack_longdouble. Add documentation for
20722 __builtin_{,un}pack_ibm128.
20724 2018-06-06 Jim Wilson <jimw@sifive.com>
20726 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
20727 (struct machine_function): New field interrupt_mode.
20728 (riscv_handle_type_attribute): New function. Add forward declaration.
20729 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
20730 (riscv_expand_epilogue): Check interrupt_mode field.
20731 (riscv_set_current_function): Check interrupt attribute args and
20732 set interrupt_mode field.
20733 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
20734 (riscv_sret, riscv_uret): New.
20735 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
20736 new arguments to interrupt attribute.
20738 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
20741 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
20742 Don't handle -mcpu=power8 if -mpower9-vector is also used.
20744 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
20746 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
20747 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
20748 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
20749 several redundant entries.
20751 2018-06-06 David Malcolm <dmalcolm@redhat.com>
20753 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
20754 type from "rtx" to "rtx_insn *".
20755 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
20756 for local "call_insn", removing cast.
20757 (ix86_expand_call): Likewise, introducing a "call_insn" local.
20759 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
20761 PR tree-optimization/86066
20762 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
20763 for BIT_INSERT_EXPR stores.
20765 2018-06-06 Richard Biener <rguenther@suse.de>
20767 PR tree-optimization/86062
20768 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
20769 component refs ontop
20770 of to be offsetted base.
20772 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
20774 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
20775 to be static and remove check on interrupt attribute name.
20777 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
20779 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
20780 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
20782 2018-06-05 Steve Ellcey <sellcey@cavium.com>
20785 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
20787 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
20788 Remove second argument, change how error is called.
20789 (aarch64_layout_arg): Remove second argument from
20790 aarch64_err_no_fpadvsimd call.
20791 (aarch64_init_cumulative_args): Ditto.
20792 (aarch64_gimplify_va_arg_expr): Ditto.
20793 * config/aarch64/aarch64.md (mov<mode>): Ditto.
20795 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
20797 * config/i386/i386.md (simple_return_indirect_internal): New expander.
20798 (*simple_return_indirect_internal<mode>): Rename from
20799 simple_return_indirect_internal. Use W mode iterator.
20800 (rstorssp): New expander.
20801 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
20802 (clrssbsy): New expander.
20803 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
20805 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
20807 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
20809 (cmse_check_pointed_object): Likewise.
20811 2018-06-05 Martin Liska <mliska@suse.cz>
20813 PR gcov-profile/47618
20814 * doc/invoke.texi: Document how -fprofile-dir format
20817 2018-06-05 Richard Biener <rguenther@suse.de>
20819 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
20820 removal pretend DOM info isn't available so we do not update
20821 it and only remove edges, not dominated blocks. Actually free
20822 DOM info in case we removed something. Remove unreachable blocks.
20823 (mfb_keep_latches): Work with either DOM info or marked backedges.
20824 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
20825 first. Mark backedges if DOM info isn't available.
20826 (Re-)compute DOM info after cleanup_control_flow_pre.
20828 2018-06-05 Richard Biener <rguenther@suse.de>
20830 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
20831 (locus_discrim_hasher::hash): Adjust.
20832 (locus_discrim_hasher::equal): Likewise.
20833 (next_discriminator_for_locus): Work on line directly.
20834 (same_line_p): Pass in expanded locus1 as well.
20835 (assign_discriminators): Avoid redundant location expansions.
20837 2018-06-05 Richard Biener <rguenther@suse.de>
20839 PR tree-optimization/86046
20840 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
20841 if required after clearing TREE_ADDRESSABLE.
20843 2018-06-05 Richard Biener <rguenther@suse.de>
20845 PR tree-optimization/86047
20846 * tree-ssa-loop.c (for_each_index): Glob handling of all
20847 decls and constants and really handle all of them.
20849 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20852 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
20853 qualifier_void_pointer and qualifier_const_void_pointer.
20854 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
20855 (arm_init_builtins): Handle the above.
20856 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
20857 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
20858 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
20861 2018-06-05 Martin Liska <mliska@suse.cz>
20863 * auto-profile.c (read_autofdo_file): Do not use
20864 gcov_ctr_summary struct.
20865 (afdo_callsite_hot_enough_for_early_inline): Likewise.
20866 * coverage.c (struct counts_entry): Likewise.
20867 (read_counts_file): Read just single summary entry.
20868 (get_coverage_counts): Use gcov_summary struct.
20869 * coverage.h (get_coverage_counts): Likewise.
20870 * gcov-dump.c (dump_working_sets): Likewise.
20871 (tag_summary): Dump just single summary.
20872 * gcov-io.c (gcov_write_summary): Write just histogram
20874 (gcov_read_summary): Read just single summary.
20875 (compute_working_sets): Use gcov_summary struct.
20876 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
20877 of GCOV_COUNTERS_SUMMABLE.
20878 (GCOV_COUNTERS_SUMMABLE): Remove.
20879 (GCOV_FIRST_VALUE_COUNTER): Replace with
20880 GCOV_COUNTER_V_INTERVAL.
20881 (struct gcov_ctr_summary): Remove.
20882 (struct gcov_summary): Directly use fields of former
20884 (compute_working_sets): Use gcov_summary struct.
20885 * gcov.c (read_count_file): Do not use ctrs fields.
20886 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
20888 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
20890 * profile.c: Likewise.
20891 * profile.h: Likewise.
20893 2018-06-05 Martin Liska <mliska@suse.cz>
20895 PR gcov-profile/84846
20896 * gcov.c (output_lines): Print working directory only
20897 in intermediate format.
20899 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
20901 * config/s390/s390-builtin-types.def: Add void function type.
20902 * config/s390/s390-builtins.def: Use the function type for the
20905 2018-06-04 Jim Wilson <jimw@sifive.com>
20907 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
20909 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
20910 and maybe_eh_return. Change regno to unsigned int. Use new args to
20911 handle EH_RETURN_DATA_REGNO registers properly.
20912 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
20913 (riscv_expand_epilogue): Update comment. Change argument name and
20914 type. Update code to use new name and type. Pass new args to
20915 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
20917 * config/riscv/riscv.md (NORMAL_RETURN): New.
20918 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
20919 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
20920 (eh_return): Call gen_eh_return_internal and emit barrier.
20921 (eh_return_internal): Call riscv_expand_epilogue.
20923 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
20925 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
20926 bit_insertion field and declare can_be_merged_into method.
20927 (merged_store_group::can_be_merged_into): New method.
20928 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
20929 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
20930 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
20932 2018-06-04 Richard Biener <rguenther@suse.de>
20934 PR tree-optimization/85955
20935 * builtins.c (fold_builtin_sincos): Convert pointers to
20936 destination to appropriate type before dereferencing.
20938 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
20940 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
20942 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
20944 * expr.c (expand_expr_real_1): Force the operand into memory if
20945 its TYPE_MODE is BLKmode and if there is no integer mode for
20946 the number of bits being extracted.
20948 2018-06-04 Jakub Jelinek <jakub@redhat.com>
20952 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
20953 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
20955 2018-06-04 Richard Biener <rguenther@suse.de>
20957 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
20958 (cleanup_tree_cfg_noloop): ... single caller. Do
20959 start_recording_case_labels later.
20961 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
20963 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
20964 to _IMMINTRIN_H_INCLUDED.
20965 * config/i386/pconfigintrin.h: Ditto.
20966 * config/i386/waitpkgintrin.h: Ditto.
20967 * config/i386/immintrin.h: Add includes for sgxintrin.h,
20968 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
20969 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
20970 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
20971 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
20972 waitpkgintrin.h and cldemoteintrin.h.
20974 2018-06-04 Richard Biener <rguenther@suse.de>
20976 PR tree-optimization/86038
20977 * tracer.c (find_best_successor): Check probability for
20978 being initialized, bail out if not.
20980 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
20983 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
20984 of bits to ignore when comparing architectures.
20986 2018-06-04 Jakub Jelinek <jakub@redhat.com>
20988 PR tree-optimization/69615
20989 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
20990 maximum or minimum of the type, try to merge it also as if
20991 range1 is + [-, x - 1] or + [x + 1, -].
20994 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
20996 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
20998 PR tree-optimization/86034
20999 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
21000 the unsigned bitfield type in a bit insertion sequence if it does not
21001 have a larger precision than the bitfield size.
21002 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
21004 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
21006 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
21008 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
21010 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
21011 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
21012 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
21013 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
21015 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
21017 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
21018 Disable -fdelete-null-pointer-checks for ELF toolchain.
21020 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
21021 Kito Cheng <kito.cheng@gmail.com>
21023 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
21024 (nds32le-*-*, nds32be-*-*): Integrate checking process.
21025 (nds32*-*-*): Add glibc and uclibc conditions.
21026 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
21027 (TARGET_EXCEPT_UNWIND_INFO): Define.
21028 * config/nds32/elf.h: New file.
21029 * config/nds32/linux.h: New file.
21030 * config/nds32/nds32-elf.opt: New file.
21031 * config/nds32/nds32-linux.opt: New file.
21032 * config/nds32/nds32-fp-as-gp.c
21033 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
21034 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
21036 (nds32_asm_file_end): Ditto.
21037 (nds32_print_operand): Ditto.
21038 (nds32_insert_attributes): Ditto.
21039 (nds32_init_libfuncs): New function.
21040 (TARGET_HAVE_TLS): Define.
21041 (TARGET_INIT_LIBFUNCS): Define.
21042 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
21044 (TARGET_ELF): Apply different mcmodel setting.
21045 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
21046 been migrated into elf.h and linux.h files.
21047 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
21048 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
21049 (mcmodel): The content has been migrated into nds32-elf.opt and
21050 nds32-linux.opt files.
21051 * config/nds32/t-elf: New file.
21052 * config/nds32/t-linux: New file.
21054 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
21055 Shiva Chen <shiva0217@gmail.com>
21057 * config/nds32/constants.md (unspec_volatile_element): Add
21058 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
21059 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
21061 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
21062 (make_pass_nds32_fp_as_gp): Declare.
21063 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
21065 (nds32_asm_function_end_prologue): Remove unused asm output.
21066 (nds32_asm_function_begin_epilogue): Remove unused asm output.
21067 (nds32_asm_file_start): Output necessary fp_as_gp information.
21068 (nds32_option_override): Adjust register usage.
21069 (nds32_expand_prologue): Consider fp_as_gp situation.
21070 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
21071 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
21074 (simple_return): Ditto.
21075 (omit_fp_begin): Output special directive for fp_as_gp.
21076 (omit_fp_end): Output special directive for fp_as_gp.
21077 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
21078 mforbid-fp-as-gp): New options.
21080 2018-06-01 Mark Wielaard <mark@klomp.org>
21082 * dwarf2out.c (dwarf2out_finish): Remove generation of
21083 DW_AT_loclists_base.
21085 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
21087 * gimple-ssa-store-merging.c: Include gimple-fold.h.
21088 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
21089 (struct merged_store_group): Add bit_insertion field.
21090 (dump_char_array): Use standard hexadecimal format.
21091 (merged_store_group::merged_store_group): Set bit_insertion to false.
21092 (merged_store_group::apply_stores): Use optimal buffer size. Deal
21093 with BIT_INSERT_EXPR stores. Move up code updating the mask and
21094 also print the mask in the dump file.
21095 (pass_store_merging::gate): Minor tweak.
21096 (imm_store_chain_info::coalesce_immediate): Fix wrong association
21097 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
21098 stores with INTEGER_CST stores.
21099 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
21100 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
21101 and use it throughout. Generate bit insertion sequences if need be.
21102 (pass_store_merging::process_store): Remove redundant condition.
21103 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
21105 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
21107 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
21108 the 128-bit floating point types. Fix function comment.
21110 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21112 * config/aarch64/aarch64-simd.md
21113 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
21115 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
21118 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
21120 PR tree-optimization/85989
21121 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
21123 (backprop::intersect_uses): Check it when deciding whether this
21124 is a backedge reference.
21125 (backprop::process_block): Add each phi to m_visited_phis
21126 after visiting it, then clear it at the end.
21128 2018-06-01 Richard Biener <rguenther@suse.de>
21130 * tree-vectorizer.h (vect_dr_stmt): New function.
21131 (vect_get_load_cost): Adjust.
21132 (vect_get_store_cost): Likewise.
21133 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
21134 Use vect_dr_stmt instead of DR_SMTT.
21135 (vect_record_base_alignments): Likewise.
21136 (vect_calculate_target_alignment): Likewise.
21137 (vect_compute_data_ref_alignment): Likewise and make static.
21138 (vect_update_misalignment_for_peel): Likewise.
21139 (vect_verify_datarefs_alignment): Likewise.
21140 (vector_alignment_reachable_p): Likewise.
21141 (vect_get_data_access_cost): Likewise. Pass down
21142 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
21143 (vect_get_peeling_costs_all_drs): Likewise.
21144 (vect_peeling_hash_get_lowest_cost): Likewise.
21145 (vect_enhance_data_refs_alignment): Likewise.
21146 (vect_find_same_alignment_drs): Likewise.
21147 (vect_analyze_data_refs_alignment): Likewise.
21148 (vect_analyze_group_access_1): Likewise.
21149 (vect_analyze_group_access): Likewise.
21150 (vect_analyze_data_ref_access): Likewise.
21151 (vect_analyze_data_ref_accesses): Likewise.
21152 (vect_vfa_segment_size): Likewise.
21153 (vect_small_gap_p): Likewise.
21154 (vectorizable_with_step_bound_p): Likewise.
21155 (vect_prune_runtime_alias_test_list): Likewise.
21156 (vect_analyze_data_refs): Likewise.
21157 (vect_supportable_dr_alignment): Likewise.
21158 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
21159 (vect_gen_prolog_loop_niters): Likewise.
21160 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
21161 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
21163 (vect_recog_mask_conversion_pattern): Likewise.
21164 (vect_try_gather_scatter_pattern): Likewise.
21165 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
21166 to vect_get_store_cost.
21167 (vect_get_store_cost): Get stmt_info instead of DR.
21168 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
21169 (vect_get_load_cost): Get stmt_info instead of DR.
21171 2018-06-01 Richard Biener <rguenther@suse.de>
21173 PR middle-end/86017
21174 * gimple-fold.c (var_decl_component_p): Also allow offsetted
21175 vars wrapped in MEM_REFs.
21177 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
21179 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
21180 Fix subreg tests so that we only return a choice between
21181 GENERAL_REGS and FP_REGS if the original classes included both.
21183 2018-06-01 Richard Biener <rguenther@suse.de>
21186 * tree-ssa-structalias.c (get_function_part_constraint):
21187 Handle NULL fi->decl.
21188 (find_func_aliases_for_call): Properly handle indirect
21189 fi from direct call.
21190 (find_func_clobbers): Likewise.
21191 (ipa_pta_execute): Likewise.
21192 (create_variable_info_for): For functions that are ifunc_resolver
21193 resolve to a varinfo that contains the result of the resolver call.
21194 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
21197 2018-05-31 Michael Collison <michael.collison@arm.com>
21199 * config/aarch64/aarch64.md:
21200 (*fix_to_zero_extenddfdi2): New pattern.
21201 * gcc.target/aarch64/fix_extend1.c: New testcase.
21203 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
21205 PR middle-end/78809
21206 PR middle-end/83026
21207 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
21208 and BUILT_IN_STRNCMP_EQ.
21209 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
21210 BUILT_IN_STRNCMP_EQ.
21211 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
21212 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
21213 (gimple_fold_builtin): Likewise.
21214 * tree-ssa-strlen.c (compute_string_length): New function.
21215 (determine_min_obsize): New function.
21216 (handle_builtin_string_cmp): New function to handle calls to
21217 string compare functions.
21218 (strlen_optimize_stmt): Add handling to builtin string compare
21220 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
21221 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
21222 * tree.c (build_common_builtin_nodes): Add new defines of
21223 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
21225 2018-05-31 Jakub Jelinek <jakub@redhat.com>
21228 * bb-reorder.c (pass_partition_blocks::gate): Return false for
21229 functions with naked attribute.
21231 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
21233 * config/i386/sse.md (avx_vec_concat<mode>):
21234 Substitute concat_tg_mode mode attribute with xtg_mode.
21235 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
21236 (concat_tg_mode): Remove mode attribute.
21238 2018-05-31 Martin Sebor <msebor@redhat.com>
21241 * calls.c (alloc_max_size): Correct a logic error/typo.
21242 Treat excessive arguments as infinite. Warn for invalid arguments.
21243 * doc/invoke.texi (-Walloc-size-larger-than): Update.
21245 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
21248 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
21249 and movx for Haswell.
21251 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
21252 Cesar Philippidis <cesar@codesourcery.com>
21254 PR middle-end/85879
21255 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
21256 when emitting error on private/firstprivate reductions.
21257 * omp-low.c (lower_omp_target): Avoid reference-type processing
21258 on pointers for firstprivate clause.
21260 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
21262 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
21265 * config/aarch64/aarch64-simd.md
21266 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
21267 (aarch64_ld1_x3_<mode>): Likewise
21268 (aarch64_st1x2<VALLDIF:mode>): Likewise
21269 (aarch64_st1_x2_<mode>): Likewise
21270 (aarch64_st1x3<VALLDIF:mode>): Likewise
21271 (aarch64_st1_x3_<mode>): Likewise
21272 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
21273 (vld1_s8_x3): Likewise.
21274 (vld1_u16_x3): Likewise.
21275 (vld1_s16_x3): Likewise.
21276 (vld1_u32_x3): Likewise.
21277 (vld1_s32_x3): Likewise.
21278 (vld1_u64_x3): Likewise.
21279 (vld1_s64_x3): Likewise.
21280 (vld1_f16_x3): Likewise.
21281 (vld1_f32_x3): Likewise.
21282 (vld1_f64_x3): Likewise.
21283 (vld1_p8_x3): Likewise.
21284 (vld1_p16_x3): Likewise.
21285 (vld1_p64_x3): Likewise.
21286 (vld1q_u8_x3): Likewise.
21287 (vld1q_s8_x3): Likewise.
21288 (vld1q_u16_x3): Likewise.
21289 (vld1q_s16_x3): Likewise.
21290 (vld1q_u32_x3): Likewise.
21291 (vld1q_s32_x3): Likewise.
21292 (vld1q_u64_x3): Likewise.
21293 (vld1q_s64_x3): Likewise.
21294 (vld1q_f16_x3): Likewise.
21295 (vld1q_f32_x3): Likewise.
21296 (vld1q_f64_x3): Likewise.
21297 (vld1q_p8_x3): Likewise.
21298 (vld1q_p16_x3): Likewise.
21299 (vld1q_p64_x3): Likewise.
21300 (vst1_s64_x2): Likewise.
21301 (vst1_u64_x2): Likewise.
21302 (vst1_f64_x2): Likewise.
21303 (vst1_s8_x2): Likewise.
21304 (vst1_p8_x2): Likewise.
21305 (vst1_s16_x2): Likewise.
21306 (vst1_p16_x2): Likewise.
21307 (vst1_s32_x2): Likewise.
21308 (vst1_u8_x2): Likewise.
21309 (vst1_u16_x2): Likewise.
21310 (vst1_u32_x2): Likewise.
21311 (vst1_f16_x2): Likewise.
21312 (vst1_f32_x2): Likewise.
21313 (vst1_p64_x2): Likewise.
21314 (vst1q_s8_x2): Likewise.
21315 (vst1q_p8_x2): Likewise.
21316 (vst1q_s16_x2): Likewise.
21317 (vst1q_p16_x2): Likewise.
21318 (vst1q_s32_x2): Likewise.
21319 (vst1q_s64_x2): Likewise.
21320 (vst1q_u8_x2): Likewise.
21321 (vst1q_u16_x2): Likewise.
21322 (vst1q_u32_x2): Likewise.
21323 (vst1q_u64_x2): Likewise.
21324 (vst1q_f16_x2): Likewise.
21325 (vst1q_f32_x2): Likewise.
21326 (vst1q_f64_x2): Likewise.
21327 (vst1q_p64_x2): Likewise.
21328 (vst1_s64_x3): Likewise.
21329 (vst1_u64_x3): Likewise.
21330 (vst1_f64_x3): Likewise.
21331 (vst1_s8_x3): Likewise.
21332 (vst1_p8_x3): Likewise.
21333 (vst1_s16_x3): Likewise.
21334 (vst1_p16_x3): Likewise.
21335 (vst1_s32_x3): Likewise.
21336 (vst1_u8_x3): Likewise.
21337 (vst1_u16_x3): Likewise.
21338 (vst1_u32_x3): Likewise.
21339 (vst1_f16_x3): Likewise.
21340 (vst1_f32_x3): Likewise.
21341 (vst1_p64_x3): Likewise.
21342 (vst1q_s8_x3): Likewise.
21343 (vst1q_p8_x3): Likewise.
21344 (vst1q_s16_x3): Likewise.
21345 (vst1q_p16_x3): Likewise.
21346 (vst1q_s32_x3): Likewise.
21347 (vst1q_s64_x3): Likewise.
21348 (vst1q_u8_x3): Likewise.
21349 (vst1q_u16_x3): Likewise.
21350 (vst1q_u32_x3): Likewise.
21351 (vst1q_u64_x3): Likewise.
21352 (vst1q_f16_x3): Likewise.
21353 (vst1q_f32_x3): Likewise.
21354 (vst1q_f64_x3): Likewise.
21355 (vst1q_p64_x3): Likewise.
21357 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
21359 * config/msp430/msp430.c (msp430_output_labelref): Prepend
21360 user_label_prefix to name.
21362 * tree-core.h: Update comment about the format of NAME string
21363 passed to handler in attribute_spec.
21365 * config/msp430/msp430.md: Remove erroneous subreg expression from
21366 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
21367 zero_extend{q,h}isi2.
21369 2018-05-30 Borislav Petkov <bp@suse.de>
21371 * doc/extend.texi: Document some architecture specific
21372 constraints and sort entries.
21374 2018-05-30 Martin Sebor <msebor@redhat.com>
21376 PR middle-end/85369
21377 * builtins.c (expand_builtin_stpcpy_1): New function.
21378 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
21379 only if the former succeeds.
21381 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
21383 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
21386 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21388 * doc/invoke.texi (-flinker-output): Document
21390 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21392 * passes.c (ipa_write_summaries): Only modify statements if body
21394 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
21395 incrementally linking.
21396 (ipa_passes): Likewise.
21397 * lto-cgraph.c (lto_output_node): When incrementally linking do not
21398 pass down resolution info.
21399 * common.opt (flag_incremental_link): Update info.
21400 * gcc.c (plugin specs): Turn flinker-output=* to
21401 -plugin-opt=-linker-output-known
21402 * toplev.c (compile_file): Also cut compilation when doing incremental
21404 * flag-types. (enum lto_partition_model): Add
21405 LTO_LINKER_OUTPUT_NOLTOREL.
21406 (invoke.texi): Add -flinker-output docs.
21407 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
21408 link same way as WPA; do not stream in dead initializers.
21410 * dwarf2out.c (dwarf2out_die_ref_for_decl,
21411 darf2out_register_external_decl): Support incremental link.
21413 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21415 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
21417 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
21419 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
21420 it down to simple_object_copy_lto_debug_sections.
21421 (run_gcc): Determine incremental LTO link time and configure
21422 lto1 into non-wpa mode, disable renaming of debug sections.
21424 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
21426 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
21427 descriptions of various incorrectly documented functions.
21429 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
21432 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
21433 address check not strict.
21435 2018-05-30 Richard Biener <rguenther@suse.de>
21437 PR tree-optimization/85964
21438 * tracer.c (better_p): Drop initialized count check, we only
21439 call the function with initialized counts now.
21440 (find_best_successor): Do find a best edge if one
21441 has uninitialized count.
21442 (find_best_predecessor): Likewise. Do BB frequency check only
21443 if count is initialized.
21445 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
21447 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
21448 (aarch64_ldrstr_offset_compare): New.
21449 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
21450 load/store orderings.
21451 (aarch64_gen_adjusted_ldpstp): Likewise.
21453 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
21455 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
21456 Check for subset of GENERAL_REGS and FP_REGS.
21457 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
21460 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
21462 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
21463 and wi::to_poly_offset. Add the current offset and then check
21464 whether the sum fits, rather than using an unchecked addition of
21465 a checked term. Check for a shwi rather than a uhwi.
21466 * expr.c (get_bit_range): Use tree_to_poly_uint64.
21467 (store_constructor): Use poly_int_tree_p.
21468 (expand_expr_real_1): Likewise.
21469 * function.c (assign_temp): Likewise.
21470 * fold-const.c (const_binop): Use poly_int_tree_p and
21471 wi::to_poly_offset.
21472 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
21474 * ipa-icf-gimple.c (func_checker::compare_operand): Use
21475 to_poly_offset for MEM offsets.
21476 * ipa-icf.c (sem_variable::equals): Likewise.
21477 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
21478 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
21479 wi::to_poly_offset for BIT_FIELD_REF offsets.
21480 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
21481 wi::to_poly_offset.
21482 * var-tracking.c (emit_note_insn_var_location): Use
21483 tree_to_poly_uint64.
21485 2018-05-29 Jim Wilson <jimw@sifive.com>
21487 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
21489 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
21492 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
21493 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
21495 (sse4_1_round<mode>2): Use nonimmediate_operand
21496 for operand 1 predicate.
21498 2018-05-29 Martin Sebor <msebor@redhat.com>
21499 Richard Biener <rguenther@suse.de>
21502 * calls.c (get_size_range): Call determine_value_range instead
21503 of get_value_range..
21504 * tree-vrp.h (determine_value_range): Declared new function.
21505 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
21507 2018-05-29 Richard Biener <rguenther@suse.de>
21509 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
21510 sure to use non-pattern stmts for get_earlier_stmt arguments.
21511 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
21512 called on pattern stmts.
21513 (get_later_stmt): Likewise.
21515 2018-05-29 Martin Liska <mliska@suse.cz>
21517 PR gcov-profile/85759
21518 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
21521 2018-05-29 Jakub Jelinek <jakub@redhat.com>
21523 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
21525 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
21529 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
21530 VEC_PACK_FLOAT_EXPR): New tree codes.
21531 * tree-pretty-print.c (op_code_prio): Handle
21532 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
21533 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
21534 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
21535 * tree-inline.c (estimate_operator_cost): Likewise.
21536 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
21537 * fold-const.c (const_binop): Likewise.
21538 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
21539 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
21540 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
21541 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
21542 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
21543 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
21544 * expr.c (expand_expr_real_2): Likewise.
21545 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
21546 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
21547 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
21549 * optabs.c (expand_widen_pattern_expr): For
21550 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
21551 sign from result type rather than operand's type.
21552 (expand_binop_directly): For vec_packu_float_optab and
21553 vec_packs_float_optab allow result type to be different from operand's
21555 * optabs-tree.c (optab_for_tree_code): Handle
21556 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
21557 VEC_PACK_FLOAT_EXPR. Formatting fixes.
21558 * tree-vect-generic.c (expand_vector_operations_1): Handle
21559 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
21560 VEC_PACK_FLOAT_EXPR.
21561 * tree-vect-stmts.c (supportable_widening_operation): Handle
21563 (supportable_narrowing_operation): Handle FLOAT_EXPR.
21564 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
21565 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
21566 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
21567 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
21569 (vec_pack<floatprefix>_float_<mode>): New expander.
21570 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
21572 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
21573 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
21574 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
21575 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
21576 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
21578 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
21579 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
21580 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
21581 VEC_PACK_FLOAT_EXPR): Document.
21583 2018-05-29 Richard Biener <rguenther@suse.de>
21585 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
21587 (stmt_vec_info_vec): Make pointer.
21588 (init_stmt_vec_info_vec): Remove.
21589 (free_stmt_vec_info_vec): Likewise.
21590 (set_stmt_vec_info_vec): New function.
21591 (free_stmt_vec_infos): Likewise.
21592 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
21593 (set_vinfo_for_stmt): Likewise.
21594 (get_earlier_stmt): Likewise.
21595 (get_later_stmt): Likewise.
21596 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
21597 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
21598 (vec_info::~vec_info): Free stmt_vec_infos.
21599 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
21600 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
21601 (pass_slp_vectorize::execute): Likewise.
21602 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
21603 (free_stmt_vec_info_vec): Likewise.
21604 (set_stmt_vec_info_vec): New function.
21605 (free_stmt_vec_infos): Likewise.
21606 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
21607 the global stmt_vec_info_vec.
21608 * tree-parloops.c (gather_scalar_reductions): Use
21609 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
21612 2018-05-29 Richard Biener <rguenther@suse.de>
21614 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
21616 2018-05-29 Martin Liska <mliska@suse.cz>
21617 David Malcolm <dmalcolm@redhat.com>
21619 * vec.c (test_reverse): New.
21620 (vec_c_tests): Add new test.
21621 * vec.h (vl_ptr>::reverse): New function.
21623 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
21625 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
21627 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
21630 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
21632 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
21634 2018-05-28 Richard Biener <rguenther@suse.de>
21636 PR tree-optimization/85933
21637 * tree-vect-data-refs.c (vect_record_base_alignments): Only
21638 look at stmts marked as vectorizable.
21640 2018-05-28 Richard Biener <rguenther@suse.de>
21642 PR tree-optimization/85934
21643 * tree-vect-generic.c (expand_vector_operations_1): Hoist
21644 vector boolean check before scalar optimization.
21646 2018-05-28 Jakub Jelinek <jakub@redhat.com>
21648 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
21651 2018-05-28 Mark Wielaard <mark@klomp.org>
21653 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
21654 if it is an expression containing a minus sign.
21656 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
21658 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
21660 2018-05-27 Paul Koning <ni1d@arrl.net>
21662 * config/pdp11/pdp11.md (truncsihi2): Remove.
21664 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
21665 Chung-Ju Wu <jasonwucj@gmail.com>
21667 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
21669 (unaligned_store_dw): Ditto.
21670 * config/nds32/nds32-memory-manipulation.c
21671 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
21672 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
21673 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
21674 (emit_setmem_word_loop): Rename to ...
21675 (emit_setmem_doubleword_loop): ... this.
21676 (nds32_gen_dup_4_byte_to_word_value): New function.
21677 (nds32_gen_dup_8_byte_to_double_word_value): New function.
21678 (nds32_expand_setmem_loop): Refine implementation.
21679 (nds32_expand_setmem_loop_v3m): Ditto.
21680 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
21683 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
21685 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
21687 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
21689 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
21690 (nds32_init_machine_status): Initialize machine->attr_naked_p and
21691 machine->attr_no_prologue_p.
21692 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
21693 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
21694 (nds32_expand_epilogue): Consider attr_naked_p.
21695 (nds32_expand_epilogue_v3pop): Likewise.
21696 (nds32_can_use_return_insn): Likewise.
21697 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
21698 attr_no_prologue_p fields.
21699 * config/nds32/nds32.opt (mret-in-naked-func): New option.
21701 2018-05-27 Jakub Jelinek <jakub@redhat.com>
21704 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
21706 * config/i386/sse.md
21707 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
21709 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
21711 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
21713 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
21715 (*<floatsuffix>floatv2div2sf2): Rename to ...
21716 (*float<floatunssuffix>v2div2sf2): ... this.
21717 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
21718 (float<floatunssuffix>v2div2sf2_mask): ... this.
21719 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
21720 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
21721 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
21723 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
21725 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
21727 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
21729 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
21731 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
21733 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
21734 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
21735 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
21736 gen_ufix_truncv8dfv8si2.
21737 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
21738 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
21739 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
21740 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
21741 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
21742 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
21743 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
21744 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
21746 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
21750 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
21752 2018-05-25 Jim Wilson <jimw@sifive.com>
21754 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
21755 * config/riscv/riscv.c (struct machine_function): Add
21756 interrupt_handler_p and attribute_checked_p fields.
21757 (riscv_attribute_table): Add interrupt.
21758 (riscv_interrupt_type_p): New.
21759 (riscv_save_reg_p): Save extra regs for interrupt handler.
21760 (riscv_use_save_libcall): Return false for interrupt handler.
21761 (riscv_first_stack_step): Add forward declaration.
21762 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
21763 for interrupt handler with large frame. Use it for saved reg list.
21764 (riscv_expand_prologue): Move flag_stack_usage_info support to
21765 eliminate duplication.
21766 (riscv_expand_epilogue): Generate mret for interrupt handler.
21767 (riscv_epilogue_uses): New.
21768 (riscv_can_use_return_insn): Return false for interrupt handler.
21769 (riscv_function_ok_for_sibcall): Likewise.
21770 (riscv_set_current_function): Add interrupt handler support.
21771 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
21772 * config/riscv/riscv.md (UNSPECV_MRET): New.
21774 (riscv_frflags, riscv_fsflags): Use tab after opcode.
21776 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
21778 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
21780 PR tree-optimization/85712
21781 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
21782 this candidate has already been replaced in-situ by a copy.
21784 2018-05-25 Jason Merrill <jason@redhat.com>
21786 PR c++/80485 - inline function non-zero address.
21787 * symtab.c (nonzero_address): Check DECL_COMDAT.
21789 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
21792 * config/alpha/alpha.md (ashlsi3): New insn pattern.
21793 (*ashlsi_se): Rename from *ashldi_se. Define as sign
21794 extension of SImode operation. Use const123_operand predicate.
21795 (*saddsi_1): Remove.
21796 (*saddl_se_1): Ditto.
21797 (*ssubsi_1): Ditto.
21798 (*ssubl_se_1): Ditto.
21799 * config/alpha/predicates.md (const123_operand): New predicate.
21800 * config/alpha/constraints.md (P): Use IN_RANGE.
21802 2018-05-25 Richard Biener <rguenther@suse.de>
21804 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
21806 (ref_maybe_used_by_stmt_p): Likewise.
21807 (stmt_may_clobber_ref_p): Likewise.
21808 (stmt_may_clobber_ref_p_1): Likewise.
21809 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
21811 (ref_maybe_used_by_stmt_p): Likewise.
21812 (stmt_may_clobber_ref_p): Likewise.
21813 (stmt_may_clobber_ref_p_1): Likewise.
21814 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
21815 the alias oracle to disambiguate DRs with stmts DR analysis
21817 (vect_analyze_data_refs): Do not give up on not analyzable
21818 DRs for BB vectorization. Remove code truncating the dataref
21821 2018-05-25 Jakub Jelinek <jakub@redhat.com>
21824 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
21825 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
21826 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
21828 2018-05-25 Richard Biener <rguenther@suse.de>
21830 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
21831 function, combining stmt data ref gathering and fatal analysis
21833 (vect_analyze_data_refs): Remove now redudnant code and simplify.
21834 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
21835 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
21836 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
21837 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
21839 2018-05-25 Bin Cheng <bin.cheng@arm.com>
21841 PR tree-optimization/85720
21842 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
21843 SCC if all partitions are builtins.
21844 (version_loop_by_alias_check): New parameter. Generate cancelable
21845 runtime alias check if all partitions are builtins.
21846 (distribute_loop): Update call to above function.
21848 2018-05-25 Bin Cheng <bin.cheng@arm.com>
21850 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
21851 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
21852 (parm_default_def_partition_arg): Ditto.
21853 (set_parm_default_def_partition): Ditto.
21854 (get_parm_default_def_partitions): Ditto and make it static.
21855 (get_undefined_value_partitions): Ditto and make it static.
21856 (remove_ssa_form): Refactor call to init_var_map here.
21857 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
21858 computation for loop region.
21859 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
21860 (register_default_def): Delete.
21861 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
21862 (parm_default_def_partition_arg): Ditto.
21863 (set_parm_default_def_partition): Ditto.
21864 (get_parm_default_def_partitions): Ditto and make it static.
21865 (get_undefined_value_partitions): Ditto and make it static.
21866 (coalesce_with_default, coalesce_with_default): Update comment.
21867 (create_coalesce_list_for_region): New func factored out from
21868 create_outofssa_var_map.
21869 (populate_coalesce_list_for_outofssa): New func factored out from
21870 create_outofssa_var_map and coalesce_ssa_name.
21871 (create_outofssa_var_map): Delete.
21872 (coalesce_ssa_name): Refactor to support live range computation.
21873 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
21874 (get_parm_default_def_partitions): Delete.
21875 (get_undefined_value_partitions): Ditto.
21876 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
21877 computation for loop region.
21878 (new_tree_live_info, loe_visit_block): Ditto.
21879 (live_worklist, set_var_live_on_entry): Ditto.
21880 (calculate_live_on_exit, verify_live_on_entry): Ditto.
21881 * tree-ssa-live.h (struct _var_map): New fields.
21882 (init_var_map): Change decl.
21883 (region_contains_p): New.
21885 2018-05-25 Bin Cheng <bin.cheng@arm.com>
21887 * tree-ssa-live.h (live_merge_and_clear): Delete.
21889 2018-05-25 Richard Biener <rguenther@suse.de>
21892 * tree-dump.c (dequeue_and_dump): Remove access to removed
21893 operand 2 of a SWITCH_EXPR.
21895 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
21897 * doc/sourcebuild.texi (vect_double_cond_arith): Include
21898 multiplication and division.
21899 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
21900 (cond_udiv@var{m}, cond_umod@var{m}): Document.
21901 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
21902 (cond_udiv_optab, cond_umod_optab): New optabs.
21903 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
21904 (IFN_COND_RDIV): New internal functions.
21905 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
21906 TRUNC_MOD_EXPR and RDIV_EXPR.
21907 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
21908 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
21910 (SVE_INT_BINARY): Include mult.
21911 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
21912 (optab, sve_int_op): Handle mult.
21913 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
21915 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
21916 for SVE_INT_BINARY_SD.
21918 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
21920 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
21921 (optab, sve_int_op): Handle div and udiv.
21922 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
21923 for SVE_INT_BINARY_SD.
21924 (*<optab><mode>3): New insn for the same.
21926 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
21928 * tree-vect-patterns.c: Include predict.h.
21929 (vect_recog_divmod_pattern): Restrict check for division support
21930 to when optimizing for size.
21932 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
21934 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
21935 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
21936 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
21937 (gimple_match_op::set_op): Likewise.
21938 (gimple_resimplify4): Declare.
21939 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
21940 (expr::gen_transform): Likewise.
21941 (decision_tree::gen): Generate a simplification routine for 4 operands.
21942 * gimple-match-head.c (gimple_simplify): Add an overload for
21943 4 operands. In the top-level function, handle up to 4 call
21944 arguments and call gimple_resimplify4.
21945 (gimple_resimplify4): New function.
21946 (build_call_internal): Pass a fourth operand.
21947 (maybe_push_to_seq): Likewise.
21948 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
21949 Fold VEC_COND_EXPRs of an operation and a default value into
21950 an IFN_COND_* function if possible.
21951 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
21953 (SVE_COND_FP_BINARY): Include them.
21954 (optab, sve_fp_op): Handle them.
21955 (SVE_INT_BINARY_REV): New code iterator.
21956 (SVE_COND_FP_BINARY_REV): New int iterator.
21957 (commutative): New int attribute.
21958 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
21960 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
21962 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
21963 (*cond_<optab><mode>): New patterns for reversed operands.
21965 2018-05-25 Richard Biener <rguenther@suse.de>
21967 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
21968 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
21969 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
21970 (STMT_VINFO_GROUPED_ACCESS): Adjust.
21971 * tree-vect-data-refs.c (everywhere): Adjust users.
21972 * tree-vect-loop.c (everywhere): Likewise.
21973 * tree-vect-slp.c (everywhere): Likewise.
21974 * tree-vect-stmts.c (everywhere): Likewise.
21975 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
21977 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21979 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
21981 (gcc_cv_as_section_exclude): ... this.
21982 Try Solaris as #exclude syntax.
21983 * configure: Regenerate.
21984 * config.in: Regenerate.
21985 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
21987 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
21988 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
21990 * varasm.c (default_elf_asm_named_section): Don't check if
21991 HAVE_GAS_SECTION_EXCLUDE is defined.
21993 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
21995 * doc/md.texi: Update the documentation of the cond_* optabs
21996 to mention the new final operand. Fix GET_MODE_NUNITS call.
21997 Describe the scalar case too.
21998 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
21999 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
22001 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
22002 (get_conditional_internal_fn): Update comment.
22003 * tree-vect-loop.c (vectorizable_reduction): Pass the original
22004 accumulator value as a final argument to conditional functions.
22005 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
22006 a define_expand and add an "else" operand. Assert for now that
22007 the else operand is equal to operand 2. Use SVE_INT_BINARY and
22008 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
22009 (*cond_<optab><mode>): New patterns.
22010 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
22011 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
22012 (UNSPEC_COND_EOR): Delete.
22013 (optab): Remove associated mappings.
22014 (SVE_INT_BINARY): New code iterator.
22015 (sve_int_op): Remove int attribute and add "minus" to the code
22017 (SVE_COND_INT_OP): Delete.
22018 (SVE_COND_FP_OP): Rename to...
22019 (SVE_COND_FP_BINARY): ...this.
22021 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
22023 * optabs.c (can_reuse_operands_p): New function.
22024 (maybe_legitimize_operands): Try to reuse the results for
22027 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
22029 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
22030 Add {q} suffix to insn mnemonic.
22032 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
22034 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
22035 (msp430_warn_func_return): New.
22037 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
22039 * fold-const.c (tree_nonzero_bits): New function.
22040 * fold-const.h (tree_nonzero_bits): Likewise.
22041 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
22042 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
22044 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
22048 * varasm.c (assemble_alias): Check ifunc_resolver only on
22051 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
22054 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
22055 when memory input operand is handled.
22057 2018-05-24 Luis Machado <luis.machado@linaro.org>
22059 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
22061 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
22063 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
22065 * match.pd: Delay FMA folds until after vectorization.
22067 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
22070 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
22071 address check not strict.
22073 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
22075 * gimple-match.h (gimple_match_op): New class.
22076 (mprts_hook): Replace parameters with a gimple_match_op *.
22077 (maybe_build_generic_op): Likewise.
22078 (gimple_simplified_result_is_gimple_val): Replace parameters with
22079 a const gimple_match_op *.
22080 (gimple_simplify): Replace code_helper * and tree * parameters with
22081 a gimple_match_op * parameter.
22082 (gimple_resimplify1): Replace code_helper *, tree and tree *
22083 parameters with a gimple_match_op * parameter.
22084 (gimple_resimplify2): Likewise.
22085 (gimple_resimplify3): Likewise.
22086 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
22087 parameters with a gimple_match_op * parameter.
22088 * gimple-match-head.c (gimple_simplify): Change prototypes of
22089 auto-generated functions to take a gimple_match_op * instead of
22090 separate code_helper * and tree * parameters. Make the same
22091 change in the top-level overload and update calls to the
22092 gimple_resimplify routines. Update calls to the auto-generated
22093 functions and to maybe_push_res_to_seq in the publicly-facing
22094 operation-specific gimple_simplify overloads.
22095 (gimple_match_op::MAX_NUM_OPS): Define.
22096 (gimple_resimplify1): Replace rcode and ops with a single res_op
22097 parameter. Update call to gimple_simplify.
22098 (gimple_resimplify2): Likewise.
22099 (gimple_resimplify3): Likewise.
22100 (mprts_hook): Replace parameters with a gimple_match_op *.
22101 (maybe_build_generic_op): Likewise.
22102 (build_call_internal): Replace type, nargs and ops with
22103 a gimple_match_op *.
22104 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
22105 with a single gimple_match_op *. Update calls to mprts_hook,
22106 build_call_internal and gimple_simplified_result_is_gimple_val.
22107 Factor out code that is common to the tree_code and combined_fn cases.
22108 * genmatch.c (expr::gen_transform): Replace tem_code and
22109 tem_ops with a gimple_match_op called tem_op. Update calls
22110 to the gimple_resimplify functions and maybe_push_res_to_seq.
22111 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
22112 res_ops. Update call to the gimple_resimplify functions.
22113 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
22114 (decision_tree::gen): Make the functions take a gimple_match_op *
22115 called res_op instead of separate res_code and res_ops parameters.
22116 Update call accordingly.
22117 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
22118 and ops with a single res_op parameter. Update calls to
22119 maybe_build_generic_op and maybe_push_res_to_seq.
22120 (fold_stmt_1): Update calls to gimple_simplify and
22121 replace_stmt_with_simplification.
22122 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
22123 and gimple_simplified_result_is_gimple_val.
22124 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
22126 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
22127 with a gimple_match_op *.
22128 (vn_nary_build_or_lookup): Likewise. Update call to
22129 vn_nary_build_or_lookup_1.
22130 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
22131 gimple_match_op *. Update calls to the gimple_resimplify routines
22132 and to gimple_simplified_result_is_gimple_val.
22133 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
22134 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
22135 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
22136 (visit_nary_op): Likewise.
22137 (visit_reference_op_load): Likewise.
22139 2018-05-23 Luis Machado <luis.machado@linaro.org>
22141 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
22142 modifier for printing the step amount.
22144 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
22147 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
22150 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
22152 * doc/sourcebuild.texi (Endianness): New subsubsection.
22154 2018-05-23 Luis Machado <luis.machado@linaro.org>
22156 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22157 <prefetch_dynamic_strides>: New const bool field.
22158 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22159 prefetch_dynamic_strides.
22160 (exynosm1_prefetch_tune): Likewise.
22161 (thunderxt88_prefetch_tune): Likewise.
22162 (thunderx_prefetch_tune): Likewise.
22163 (thunderx2t99_prefetch_tune): Likewise.
22164 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
22166 (aarch64_override_options_internal): Update to set
22167 PARAM_PREFETCH_DYNAMIC_STRIDES.
22168 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
22169 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
22170 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
22171 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
22172 prefetch-dynamic-strides setting.
22174 2018-05-23 Luis Machado <luis.machado@linaro.org>
22176 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22177 <minimum_stride>: New const int field.
22178 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22179 minimum_stride field defaulting to -1.
22180 (exynosm1_prefetch_tune): Likewise.
22181 (thunderxt88_prefetch_tune): Likewise.
22182 (thunderx_prefetch_tune): Likewise.
22183 (thunderx2t99_prefetch_tune): Likewise.
22184 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
22185 <default_opt_level>: Set to 3.
22186 (aarch64_override_options_internal): Update to set
22187 PARAM_PREFETCH_MINIMUM_STRIDE.
22188 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
22189 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
22190 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
22191 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
22192 stride is constant and is below the minimum stride threshold.
22194 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22196 * config/arm/arm-cpus.in (mode26): Delete.
22197 (armv4): Delete mode26 reference.
22198 * config/arm/arm.c (arm_configure_build_target): Delete use of
22201 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
22203 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
22205 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
22206 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
22208 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
22209 (floatunsdidf2): Ditto.
22211 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
22213 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
22214 (fixuns_trunc<mode>si2_avx512f): Ditto.
22215 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
22216 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
22217 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
22219 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
22221 PR rtl-optimization/79985
22222 * df-scan.c (df_insn_refs_collect): Remove special case for
22223 global registers and asm statements.
22225 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
22227 * extend.texi (Global Register Variables): Rewrite the bullet list.
22228 Note that the register is available for allocation. Note that access
22229 via inline asm must use constraints. Add note about async-signal
22230 handlers. Remove paragraph about automagic register selection.
22232 2018-05-23 Richard Biener <rguenther@suse.de>
22234 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
22235 of fixed offset from memset VN.
22237 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
22239 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
22240 first_interp field.
22241 (alloc_cand_and_find_basis): Initialize first_interp field.
22242 (slsr_process_mul): Modify first_interp field.
22243 (slsr_process_add): Likewise.
22244 (slsr_process_cast): Modify first_interp field for each new
22246 (slsr_process_copy): Likewise.
22247 (dump_candidate): Dump first_interp field.
22248 (replace_mult_candidate): Process all interpretations, not just
22250 (replace_rhs_if_not_dup): Likewise.
22251 (replace_one_candidate): Likewise.
22253 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
22255 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
22257 (aarch64_needs_frame_chain): New function.
22258 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
22260 2018-05-23 Sudakshina Das <sudi.das@arm.com>
22263 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
22264 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
22265 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
22266 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
22267 as true for strict-align.
22268 (aarch64_can_inline_p): Perform checks even when callee has no
22269 attributes to check for strict alignment.
22270 * doc/extend.texi (AArch64 Function Attributes): Document
22272 * doc/invoke.texi: (AArch64 Options): Likewise.
22274 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
22276 PR tree-optimization/85853
22277 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
22278 the handling of the root of the node to...
22279 (vect_slp_analyze_node_operations_1): ...this new function,
22280 and run the whole thing with the child nodes' def types
22281 set according to their SLP node's def type.
22283 2018-05-23 Richard Biener <rguenther@suse.de>
22285 PR middle-end/85874
22286 * tree-data-ref.c (create_runtime_alias_checks): Defer
22287 and ignore overflow warnings.
22289 2018-05-23 Yury Gribov <tetra2005@gmail.com>
22291 PR tree-optimization/85822
22292 * tree-vrp.c (is_masked_range_test): Fix handling of negative
22295 2018-05-23 Richard Biener <rguenther@suse.de>
22297 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
22298 memset constants via native_interpret_expr.
22300 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
22303 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
22305 (cgraph_node::create_alias): Likewise.
22306 (cgraph_node::get_availability): Check ifunc_resolver instead
22307 of looking up ifunc attribute.
22308 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
22309 * varasm.c (do_assemble_alias): Likewise.
22310 (assemble_alias): Likewise.
22311 (default_binds_local_p_3): Likewise.
22312 * cgraph.h (cgraph_node): Add ifunc_resolver.
22313 (cgraph_node::only_called_directly_or_aliased_p): Return false
22314 for IFUNC resolver.
22315 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
22317 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
22318 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
22319 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
22320 instead of looking up ifunc attribute.
22322 2018-05-22 Luis Machado <luis.machado@linaro.org>
22324 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
22326 2018-05-22 Martin Sebor <msebor@redhat.com>
22328 PR middle-end/85359
22329 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
22330 only when expasion succeeds.
22331 (expand_builtin_strcmp): Same.
22332 (expand_builtin_strncmp): Same.
22334 2018-05-22 Martin Sebor <msebor@redhat.com>
22336 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
22338 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
22339 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22341 * config/aarch64/aarch64-ldpstp.md: Replace uses of
22342 aarch64_mem_pair_operand with memory_operand and delete operand swapping
22344 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
22345 Add check for legitimate_address.
22346 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
22347 (aarch64_swap_ldrstr_operands): New.
22348 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
22351 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
22352 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22354 * config/aarch64/aarch64.md: New patterns to generate stp
22356 (store_pair_sw, store_pair_dw): New patterns to generate stp for
22357 single words and double words.
22358 (load_pair_sw, load_pair_dw): Likewise.
22359 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
22361 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
22363 * config/aarch64/aarch64-ldpstp.md: Modify peephole
22364 for different mode ldpstp and add peephole for merged zero stores.
22365 Likewise for loads.
22366 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
22368 (aarch64_gen_store_pair): Rename calls to match new patterns.
22369 (aarch64_gen_load_pair): Rename calls to match new patterns.
22370 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
22371 (load_pair<DREG:mode><DREG2:mode>): ... This.
22372 (store_pair<mode>): Rename to...
22373 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
22374 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
22375 New mode iterators.
22376 (V_INT_EQUIV): Handle SImode.
22377 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
22380 2018-05-22 Martin Sebor <msebor@redhat.com>
22383 * calls.c (maybe_warn_nonstring_arg): Use string length to set
22384 or ajust the presumed bound on an operation to avoid unnecessary
22387 2018-05-22 Martin Sebor <msebor@redhat.com>
22389 PR tree-optimization/85826
22390 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
22391 assuming that a DECL necesarily has a constant size.
22393 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
22395 PR middle-end/85862
22396 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
22398 2018-05-22 Richard Biener <rguenther@suse.de>
22400 PR tree-optimization/85834
22401 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
22402 non-constant and non-zero memset arguments.
22404 2018-05-22 Martin Liska <mliska@suse.cz>
22407 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
22409 2018-05-22 Richard Biener <rguenther@suse.de>
22411 PR tree-optimization/85863
22412 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
22413 comparisons when vectype is specified.
22414 (vectorizable_condition): Do not specify vectype for
22415 vect_is_simple_cond when SLP vectorizing.
22417 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
22420 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
22421 define __ibm128 as long double.
22422 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
22423 as a distinct type when IEEE 128-bit support is enabled.
22424 (init_float128_ieee): Fix up conversions between IFmode and IEEE
22425 128-bit types to use the correct functions.
22426 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
22427 convert between 128-bit floating point types that have different
22428 modes but the same representation, instead of using gen_lowpart to
22430 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
22432 (IFKF_reg): New attributes to give the register constraints for
22434 (extend<mode>tf2_internal): New insns to mark an explicit
22435 conversion between 128-bit floating point types that have a
22436 different mode but share the same representation.
22438 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
22440 PR tree-optimization/85814
22441 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
22442 a null return from get_strinfo when unsharing the next
22443 strinfo in the chain.
22445 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
22448 * varasm.c (weak_finish): Clean up weak_decls.
22450 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22452 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
22453 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
22454 UNSPEC_UADALP values.
22455 * config/aarch64/iterators.md (ABAL): New int iterator.
22458 (sur): Add mappings for the above.
22459 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
22461 (aarch64_<sur>abal<mode>_4): Likewise.
22462 (aarch64_<sur>adalp<mode>_3): Likewise.
22463 (<sur>sadv16qi): New define_expand.
22465 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
22467 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
22468 (*movdf_internal): Ditto.
22469 (*rcpsf2_sse): Ditto.
22470 (*rsqrtsf2_sse): Ditto.
22471 (*sqrt<mode>2_sse): Ditto.
22473 2018-05-21 Tamar Christina <tamar.christina@arm.com>
22475 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
22477 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
22478 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
22479 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
22480 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
22482 * config/aarch64/arm_neon.h: Likewise.
22483 * config/aarch64/iterators.md (VQ_I): New.
22485 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
22487 * config.gcc: Add arc/t-multilib-linux to tmake_file for
22489 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
22492 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
22494 * config/nds32/constraints.md (S): New constraint.
22495 * config/nds32/nds32.md (call_internal): Use constraint S.
22496 (call_value_internal): Likewise.
22497 (sibcall_internal): Likewise.
22498 (sibcall_value_internal): Likewise.
22500 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
22501 Chung-Ju Wu <jasonwucj@gmail.com>
22503 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
22504 into consideration.
22506 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
22507 Chung-Ju Wu <jasonwucj@gmail.com>
22509 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
22510 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
22511 (nds32_rtx_costs_impl): Simplify.
22512 (nds32_address_cost_impl): Simplify.
22513 (nds32_init_rtx_costs): New function.
22514 (nds32_rtx_costs_speed_prefer): Likewise.
22515 (nds32_rtx_costs_size_prefer): Likewise.
22516 (nds32_address_cost_speed_prefer): Likewise.
22517 (nds32_address_cost_speed_fwprop): Likewise.
22518 (nds32_address_cost_size_prefer): Likewise.
22519 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
22520 * config/nds32/nds32.c (nds32_option_override): Use
22521 nds32_init_rtx_costs function.
22523 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
22525 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
22526 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
22527 (TARGET_PIPELINE_N8): Likewise.
22528 (TARGET_PIPELINE_N10): Likewise.
22529 (TARGET_PIPELINE_N13): Likewise.
22530 (TARGET_PIPELINE_GRAYWOLF): Likewise.
22532 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
22534 * config/nds32/nds32-fpu.md: Update copyright year.
22536 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22538 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
22540 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22542 * config/nds32/nds32.c
22543 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
22544 * config/nds32/nds32.opt (minline-asm-r15): New option.
22546 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22548 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
22550 * config/nds32/nds32.md (abssi2): New pattern.
22552 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
22554 * config/i386/i386.md (rex64namesuffix): New mode attribute.
22555 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
22556 Merge insn pattern from sse_cvtsi2ss<round_name> and
22557 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
22558 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
22559 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
22560 using SWI48 mode iterator.
22561 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
22562 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
22563 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
22564 pattern from sse_cvttss2si<round_saeonly_name>
22565 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
22566 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
22567 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
22568 using SWI48 mode iterator.
22569 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
22570 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
22571 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
22572 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
22573 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
22574 using SWI48 mode iterator.
22575 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
22576 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
22577 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
22578 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
22579 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
22580 SWI48 mode iterator.
22581 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
22582 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
22583 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
22584 pattern from sse_cvttsd2si<round_saeonly_name>
22585 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
22587 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22589 * config/nds32/nds32-md-auxiliary.c
22590 (nds32_valid_smw_lwm_base_p): Refine.
22591 (nds32_output_smw_single_word): Refine.
22592 (nds32_output_smw_double_word): New.
22593 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
22595 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22597 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
22598 (nds32_output_stack_pop): Refine.
22599 (nds32_expand_unaligned_load): Refine.
22600 (nds32_expand_unaligned_store): Refine.
22602 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22603 Chung-Ju Wu <jasonwucj@gmail.com>
22605 * config/nds32/constants.md: Add TP_REGNUM constant.
22606 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
22607 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
22609 * config/nds32/nds32-doubleword.md: Consider flag_pic.
22610 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
22611 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
22612 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
22613 and PIC code generation.
22614 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
22616 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
22618 * config/nds32/nds32.md: Support TLS and PIC.
22619 * config/nds32/nds32.c: Support TLS and PIC.
22620 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
22621 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
22624 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
22626 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
22627 mode with E_ prefix.
22629 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22630 Chung-Ju Wu <jasonwucj@gmail.com>
22632 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
22633 * config/nds32/nds32-md-auxiliary.c
22634 (symbolic_reference_mentioned_p): New.
22635 (nds32_legitimize_ict_address): New.
22636 (nds32_expand_ict_move): New.
22637 (nds32_indirect_call_referenced_p): New.
22638 (nds32_symbol_binds_local_p): Delete.
22639 (nds32_long_call_p): Modify.
22640 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
22641 * config/nds32/nds32-protos.h
22642 (symbolic_reference_mentioned_p): Declare.
22643 (nds32_legitimize_ict_address): Declare.
22644 (nds32_expand_ict_move): Declare.
22645 (nds32_indirect_call_referenced_p): Declare.
22646 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
22647 (nds32_relax_group): Use nds32_ict_const_p as condition.
22648 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
22649 (nds32_asm_file_start): Output ict_model directive in asm code.
22650 (nds32_legitimate_address_p): Consider indirect call.
22651 (nds32_print_operand): Consider indirect call.
22652 (nds32_print_operand_address): Consider indirect call.
22653 (nds32_insert_attributes): Handle "indirect_call" attribute.
22654 (TARGET_LEGITIMATE_ADDRESS_P): Define.
22655 (TARGET_LEGITIMATE_CONSTANT_P): Define.
22656 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
22657 (TARGET_DELEGITIMIZE_ADDRESS): Define.
22658 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
22659 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
22660 (TARGET_ICT_MODEL_SMALL): Define.
22661 (TARGET_ICT_MODEL_LARGE): Define.
22662 * config/nds32/nds32.md (movsi): Consider ict model.
22663 (call, call_value): Consider ict model.
22664 (sibcall, sibcall_value): Consider ict model.
22665 * config/nds32/nds32.opt (mict-model): New option.
22666 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
22669 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
22670 Monk Chiang <sh.chiang04@gmail.com>
22671 Jim Wilson <jimw@sifive.com>
22673 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
22674 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
22675 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
22676 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
22677 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
22678 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
22679 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
22680 compute save_libcall_adjustment properly.
22681 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
22682 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
22683 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
22684 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
22685 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
22686 (ABI_SPEC): Handle mabi=ilp32e.
22687 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
22688 (RVE): Add RVE mask.
22689 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
22690 <-march>: Add rv32e as an example.
22692 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
22695 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
22696 (intra_create_variable_infos): Handle C++ constructors.
22698 2018-05-18 Martin Liska <mliska@suse.cz>
22700 * passes.def: Remove a redundant pass.
22702 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
22705 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
22707 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22709 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
22711 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
22713 (armv2, armv2a, armv3, armv3m): Delete architectures.
22714 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
22715 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
22716 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
22718 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
22719 (*mulsidi3adddi): Likewise.
22720 (mulsidi3): Likewise.
22721 (*mulsidi3_nov6): Likewise.
22722 (umulsidi3): Likewise.
22723 (umulsidi3_nov6): Likewise.
22724 (umaddsidi4): Likewise.
22725 (*umulsidi3adddi): Likewise.
22726 (smulsi3_highpart): Likewise.
22727 (*smulsi3_highpart_nov6): Likewise.
22728 (umulsi3_highpart): Likewise.
22729 (*umulsi3_highpart_nov6): Likewise.
22730 * config/arm/arm.h (arm_arch3m): Delete.
22731 * config/arm/arm.c (arm_arch3m): Delete.
22732 (arm_option_override_internal): Update armv3-related comment.
22733 (arm_configure_build_target): Delete use of isa_bit_mode32.
22734 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
22735 (arm_rtx_costs_internal): Delete check of arm_arch3m.
22736 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
22737 (mulsa3): Likewise.
22738 (mulusa3): Likewise.
22739 * config/arm/arm-protos.h (arm_arch3m): Delete.
22740 * config/arm/arm-tables.opt: Regenerate.
22741 * config/arm/arm-tune.md: Likewise.
22742 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
22743 deleted architectures.
22745 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22747 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
22748 (armv5t, armv5te): New features.
22749 (ARMv5, ARMv5e): Delete fgroups.
22750 (ARMv5t, ARMv5te): Adjust for above changes.
22751 (ARMv6m): Likewise.
22752 (armv5, armv5e): Delete arches.
22753 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
22755 (*call_reg_arm): Likewise.
22756 (*call_value_reg_armv5): Likewise.
22757 (*call_value_reg_arm): Likewise.
22758 (*call_symbol): Likewise.
22759 (*call_value_symbol): Likewise.
22760 (*sibcall_insn): Likewise.
22761 (*sibcall_value_insn): Likewise.
22762 (clzsi2): Likewise.
22763 (prefetch): Likewise.
22764 (define_split and define_peephole2 dependent on arm_arch5):
22766 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
22768 (TARGET_ARM_QBIT): Likewise.
22769 (TARGET_DSP_MULTIPLY): Likewise.
22770 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
22771 (arm_arch5, arm_arch5e): Delete.
22772 (arm_arch5t, arm_arch5te): Declare.
22773 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
22774 (arm_arch5t): Declare.
22775 (arm_option_reconfigure_globals): Update for the above.
22776 (arm_options_perform_arch_sanity_checks): Update comment, replace
22777 use of arm_arch5 with arm_arch5t.
22778 (use_return_insn): Likewise.
22779 (arm_emit_call_insn): Likewise.
22780 (output_return_instruction): Likewise.
22781 (arm_final_prescan_insn): Likewise.
22782 (arm_coproc_builtin_available): Likewise.
22783 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
22784 arm_arch5e with arm_arch5t and arm_arch5te.
22785 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
22786 (arm_arch5t, arm_arch5te): Declare.
22787 * config/arm/arm-tables.opt: Regenerate.
22788 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
22789 * config/arm/t-multilib: Likewise.
22790 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
22791 instead of arm_arch5.
22792 (*call_reg_thumb1): Likewise.
22793 (*call_value_reg_thumb1_v5): Likewise.
22794 (*call_value_reg_thumb1): Likewise.
22795 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
22797 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
22799 2018-05-18 Martin Liska <mliska@suse.cz>
22801 PR gcov-profile/84846
22802 * doc/gcov.texi: Document -t option of gcov tool.
22804 2018-05-18 Martin Liska <mliska@suse.cz>
22806 PR gcov-profile/84846
22807 * gcov.c (print_usage): Add new -t option.
22808 (process_args): Handle the option.
22809 (generate_results): Use stdout as output when requested by
22812 2018-05-18 Martin Liska <mliska@suse.cz>
22814 PR gcov-profile/84846
22815 * coverage.c (coverage_init): Write PWD to .gcno file.
22816 * doc/gcov.texi: Document how working directory is printed.
22817 * gcov-dump.c (dump_gcov_file): Print PWD.
22818 * gcov.c (output_intermediate_file): Likewise.
22819 (read_graph_file): Read PWD string.
22820 (output_lines): Print PWD.
22822 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22824 PR middle-end/85817
22825 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
22826 for retval and return false if all args to phi are zero.
22828 2018-05-18 Richard Biener <rguenther@suse.de>
22830 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
22832 (evrp_dom_walker::before_dom_children): Call it.
22834 2018-05-18 Richard Biener <rguenther@suse.de>
22836 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
22837 results when processing array refs with variable index.
22839 2018-05-18 Toon Moene <toon@moene.org>
22841 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
22842 directly after that of -floop-interchange. Indicate that both
22843 options are enabled by default when specifying -O3.
22845 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22847 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
22848 iterator. Delete separate integer-mode vec_set<mode> expander.
22849 (aarch64_simd_vec_setv2di): Delete.
22850 (vec_setv2di): Delete.
22851 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
22852 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
22853 the "w, r" alternative.
22855 2018-05-18 Martin Liska <mliska@suse.cz>
22857 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
22858 * tree-pass.h (make_pass_lower_switch_O0): New function.
22859 * tree-switch-conversion.c (node_has_low_bound): Remove.
22860 (node_has_high_bound): Likewise.
22861 (node_is_bounded): Likewise.
22862 (class pass_lower_switch): Make it a template type and create
22864 (pass_lower_switch::execute): Add template argument.
22865 (make_pass_lower_switch): New function.
22866 (make_pass_lower_switch_O0): New function.
22867 (do_jump_if_equal): Remove.
22868 (emit_case_nodes): Simplify to just handle all 3 cases and leave
22869 all the hard work to tree optimization passes.
22871 2018-05-18 Martin Liska <mliska@suse.cz>
22873 * dbgcnt.c (limit_low): Renamed from limit.
22874 (limit_high): New variable.
22875 (dbg_cnt_is_enabled): Check for upper limit.
22876 (dbg_cnt): Adjust dumping.
22877 (dbg_cnt_set_limit_by_index): Add new argument for high
22879 (dbg_cnt_set_limit_by_name): Likewise.
22880 (dbg_cnt_process_single_pair): Parse new format.
22881 (dbg_cnt_process_opt): Use strtok.
22882 (dbg_cnt_list_all_counters): Remove 'value' and add
22884 * doc/invoke.texi: Document changes.
22886 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
22888 * doc/sourcebuild.texi (scalar_all_fma): Document.
22889 * tree.def (FMA_EXPR): Delete.
22890 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
22891 * internal-fn.c (ternary_direct): New macro.
22892 (expand_ternary_optab_fn): Likewise.
22893 (direct_ternary_optab_supported_p): Likewise.
22894 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
22895 * builtins.c (fold_builtin_fma): Delete.
22896 (fold_builtin_3): Don't call it.
22897 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
22898 * expr.c (expand_expr_real_2): Likewise.
22899 * fold-const.c (operand_equal_p): Likewise.
22900 (fold_ternary_loc): Likewise.
22901 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
22902 * gimple.c (DEFTREECODE): Likewise.
22903 * gimplify.c (gimplify_expr): Likewise.
22904 * optabs-tree.c (optab_for_tree_code): Likewise.
22905 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
22906 * tree-eh.c (operation_could_trap_p): Likewise.
22907 (stmt_could_throw_1_p): Likewise.
22908 * tree-inline.c (estimate_operator_cost): Likewise.
22909 * tree-pretty-print.c (dump_generic_node): Likewise.
22910 (op_code_prio): Likewise.
22911 * tree-ssa-loop-im.c (stmt_cost): Likewise.
22912 * tree-ssa-operands.c (get_expr_operands): Likewise.
22913 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
22914 * fold-const-call.h (fold_fma): Delete.
22915 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
22916 CFN_FNMA and CFN_FNMS.
22917 (fold_fma): Delete.
22918 * genmatch.c (combined_fn): New enum.
22919 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
22920 (commutative_op): New function.
22921 (commutate): Use it. Handle more than 2 operands.
22922 (dt_operand::gen_gimple_expr): Use commutative_op.
22923 (parser::parse_expr): Allow :c to be used with non-binary
22924 operators if the commutative operand is known.
22925 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
22926 CFN_FMS, CFN_FNMA and CFN_FNMS.
22927 (backprop::process_assign_use): Remove FMA_EXPR handling.
22928 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
22929 (gen_hsa_fma): New function.
22930 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
22931 IFN_FNMA and IFN_FNMS.
22932 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
22933 * gimple-fold.h (follow_all_ssa_edges): Declare.
22934 * gimple-fold.c (follow_all_ssa_edges): New function.
22935 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
22936 gimple_build interface and use follow_all_ssa_edges to fold the result.
22937 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
22938 instead of checking for optabs directly.
22939 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
22940 rather than FMA_EXPRs.
22941 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
22942 call to IFN_FMA instead of an FMA_EXPR.
22944 2018-05-17 Jim Wilson <jimw@sifive.com>
22946 * expr.c (do_tablejump): When converting index to Pmode, if we have a
22947 sign extended promoted subreg, and the range does not have the sign bit
22948 set, then do a sign extend.
22950 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
22951 test, check for sign extended subreg and/or constant operands, and
22952 do a sign extend in that case.
22954 2018-05-17 Steve Ellcey <sellcey@cavium.com>
22956 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
22957 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
22959 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
22960 Change logics_shift_reg to logics_shift_imm.
22961 (thunderx2t99_fp_loadpair_basic): Delete.
22962 (thunderx2t99_fp_storepair_basic): Delete.
22963 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
22964 (thunderx2t99_asimd_polynomial): Delete.
22965 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
22966 and neon_fp_mul_d_scalar_q.
22967 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
22968 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
22969 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
22970 (thunderx2t99_asimd_lut): Add missing tbl types.
22971 (thunderx2t99_asimd_ext): Delete.
22972 (thunderx2t99_asimd_load1_1_mult): Delete.
22973 (thunderx2t99_asimd_load1_2_mult): Delete.
22974 (thunderx2t99_asimd_load1_ldp): New.
22975 (thunderx2t99_asimd_load1): New.
22976 (thunderx2t99_asimd_load2): Add missing *load2* types.
22977 (thunderx2t99_asimd_load3): New.
22978 (thunderx2t99_asimd_load4): New.
22979 (thunderx2t99_asimd_store1_1_mult): Delete.
22980 (thunderx2t99_asimd_store1_2_mult): Delete.
22981 (thunderx2t99_asimd_store2_mult): Delete.
22982 (thunderx2t99_asimd_store2_onelane): Delete.
22983 (thunderx2t99_asimd_store_stp): New.
22984 (thunderx2t99_asimd_store1): New.
22985 (thunderx2t99_asimd_store2): New.
22986 (thunderx2t99_asimd_store3): New.
22987 (thunderx2t99_asimd_store4): New.
22989 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
22991 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
22992 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
22994 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
22995 Segher Boessenkool <segher@kernel.crashing.org>
22998 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
23001 2018-05-17 Richard Biener <rguenther@suse.de>
23003 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
23004 for pruning loop and prune defs feeding only already visited PHIs.
23006 2018-05-17 Richard Biener <rguenther@suse.de>
23008 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
23010 2018-05-17 Bin Cheng <bin.cheng@arm.com>
23011 Richard Biener <rguenther@suse.de>
23013 PR tree-optimization/85793
23014 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
23015 for VMAT_ELEMENTWISE.
23017 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
23019 * internal-fn.h (lookup_internal_fn): Declare
23020 * internal-fn.c (lookup_internal_fn): New function.
23021 * gimple.c (gimple_build_call_from_tree): Handle calls to
23022 internal functions.
23023 * gimple-pretty-print.c (dump_gimple_call): Print "." before
23024 internal function names.
23025 * tree-pretty-print.c (dump_generic_node): Likewise.
23026 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
23028 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
23030 * gimple-fold.h (gimple_build): Make the function forms take
23031 combined_fn rather than built_in_function.
23032 (gimple_simplify): Likewise.
23033 * gimple-match-head.c (gimple_simplify): Likewise.
23034 * gimple-fold.c (gimple_build): Likewise.
23035 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
23036 rather than gimple_build_call_internal.
23037 (get_initial_defs_for_reduction): Likewise.
23038 (vect_create_epilog_for_reduction): Likewise.
23039 (vectorizable_live_operation): Likewise.
23041 2018-05-17 Martin Liska <mliska@suse.cz>
23043 * gimple-ssa-sprintf.c (format_directive): Do not use
23044 space in between 'G_' and '('.
23046 2018-05-17 Jakub Jelinek <jakub@redhat.com>
23049 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
23050 even if the mask is not all ones.
23053 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
23055 (ix86_gimple_fold_builtin): Likewise.
23058 * config/i386/i386.c: Include tree-vector-builder.h.
23059 (ix86_vector_shift_count): New function.
23060 (ix86_fold_builtin): Fold shift builtins by scalar count.
23061 (ix86_gimple_fold_builtin): Likewise.
23063 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
23064 _mm512_setzero): New intrinsics.
23066 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
23067 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23069 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
23070 code generation for cases where splatting a value is not useful.
23071 * simplify-rtx.c (simplify_ternary_operation): Simplify
23072 vec_merge across a vec_duplicate and a paradoxical subreg forming
23073 a vector mode to a vec_concat.
23075 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
23077 * config.gcc: Support "goldmont-plus".
23078 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
23080 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23081 PROCESSOR_GOLDMONT_PLUS.
23082 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
23083 (processor_target_table): Add "goldmont-plus".
23084 (PTA_GOLDMONT_PLUS): Define.
23085 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
23086 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
23087 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
23088 (fold_builtin_cpu): Add "goldmont-plus".
23089 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
23090 (ix86_option_override_internal): Add "goldmont-plus".
23091 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
23092 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
23093 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
23094 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
23096 2018-05-17 Richard Biener <rguenther@suse.de>
23098 PR tree-optimization/85757
23099 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
23100 remove defs that only feed that PHI from further processing.
23102 2018-05-16 Jim Wilson <jimw@sifive.com>
23104 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
23106 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
23108 2018-05-16 Mark Wielaard <mark@klomp.org>
23110 * dwarf2out.c (count_index_strings): New function.
23111 (output_indirect_strings): Call count_index_strings and generate
23112 header for dwarf_version >= 5.
23114 2018-05-16 Mark Wielaard <mark@klomp.org>
23116 * dwarf2out.c (dwarf_FORM): New function.
23117 (set_indirect_string): Use dwarf_FORM.
23118 (reset_indirect_string): Likewise.
23119 (size_of_die): Likewise.
23120 (value_format): Likewise.
23121 (output_die): Likewise.
23122 (add_skeleton_AT_string): Likewise.
23123 (output_macinfo_op): Likewise.
23124 (index_string): Likewise.
23125 (output_index_string_offset): Likewise.
23126 (output_index_string): Likewise.
23127 (count_index_strings): Likewise.
23129 2018-05-16 Carl Love <cel@us.ibm.com>
23131 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
23132 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
23134 2018-05-16 Martin Jambor <mjambor@suse.cz>
23136 * ipa-prop.c (ipa_free_all_edge_args): Remove.
23137 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
23139 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
23141 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
23142 (fnma<mode>4): Likewise.
23143 (fms<mode>4): Likewise.
23144 (fnms<mode>4): Likewise.
23145 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
23146 (aarch64_fnma<mode>4): Likewise.
23147 (aarch64_fms<mode>4): Likewise.
23148 (aarch64_fnms<mode>4): Likewise.
23149 (aarch64_fnmadd<mode>4): Likewise.
23151 2018-05-16 Jason Merrill <jason@redhat.com>
23153 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
23155 2018-05-16 Richard Biener <rguenther@suse.de>
23157 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
23158 (dump_stmt_cost): Declare.
23159 (add_stmt_cost): Dump cost we add.
23160 (add_stmt_costs): New function.
23161 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
23162 No longer exported.
23163 (vect_analyze_stmt): Adjust prototype.
23164 (vectorizable_condition): Likewise.
23165 (vectorizable_live_operation): Likewise.
23166 (vectorizable_reduction): Likewise.
23167 (vectorizable_induction): Likewise.
23168 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
23169 cost vector to pass to vectorizable_ and record afterwards.
23170 (vect_model_reduction_cost): Take cost vector argument and adjust.
23171 (vect_model_induction_cost): Likewise.
23172 (vectorizable_reduction): Likewise.
23173 (vectorizable_induction): Likewise.
23174 (vectorizable_live_operation): Likewise.
23175 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
23176 SLP_TREE_NUMBER_OF_VEC_STMTS.
23177 (vect_analyze_slp_cost_1): Remove.
23178 (vect_analyze_slp_cost): Likewise.
23179 (vect_slp_analyze_node_operations): Take visited args and
23180 a target cost vector. Avoid processing already visited stmt sets.
23181 (vect_slp_analyze_operations): Use a local cost vector to gather
23182 costs and register those of non-discarded instances.
23183 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
23184 (vect_schedule_slp_instance): Remove copying of
23185 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
23187 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
23188 adding cost. Record cost entry location.
23189 (vect_prologue_cost_for_slp_op): Function to compute cost of
23190 a constant or invariant generated for SLP vect in the prologue,
23191 split out from vect_analyze_slp_cost_1.
23192 (vect_model_simple_cost): Make static. Adjust for SLP costing.
23193 (vect_model_promotion_demotion_cost): Likewise.
23194 (vect_model_store_cost): Likewise, make static.
23195 (vect_model_load_cost): Likewise.
23196 (vectorizable_bswap): Add cost vector arg and adjust.
23197 (vectorizable_call): Likewise.
23198 (vectorizable_simd_clone_call): Likewise.
23199 (vectorizable_conversion): Likewise.
23200 (vectorizable_assignment): Likewise.
23201 (vectorizable_shift): Likewise.
23202 (vectorizable_operation): Likewise.
23203 (vectorizable_store): Likewise.
23204 (vectorizable_load): Likewise.
23205 (vectorizable_condition): Likewise.
23206 (vectorizable_comparison): Likewise.
23207 (can_vectorize_live_stmts): Likewise.
23208 (vect_analyze_stmt): Likewise.
23209 (vect_transform_stmt): Adjust calls to vectorizable_*.
23210 * tree-vectorizer.c: Include gimple-pretty-print.h.
23211 (dump_stmt_cost): New function.
23213 2018-05-16 Richard Biener <rguenther@suse.de>
23215 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
23216 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
23217 * tree-ssa-dse.c: Include tree-ssa-loop.h.
23218 (check_name): New callback.
23219 (dse_classify_store): Track cycles via a visited bitmap of PHI
23220 defs and simplify handling of in-loop and across loop dead stores
23221 and properly fail for loop-variant refs. Handle byte-tracking with
23222 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
23225 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
23227 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
23228 (vect_get_mask_type_for_stmt): Likewise.
23229 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
23231 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
23232 to determine the statement's vector type and the vector type that
23233 should be used for calculating nunits. Deal with cases in which
23234 the type has to be deferred.
23235 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
23236 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
23237 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
23238 (vect_determine_vf_for_stmt): New functions, split out from...
23239 (vect_determine_vectorization_factor): ...here.
23240 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
23241 (vect_get_mask_type_for_stmt): New functions, split out from
23242 vect_determine_vectorization_factor.
23244 2018-05-16 Richard Biener <rguenther@suse.de>
23246 * tree-cfg.c (verify_gimple_assign_ternary): Properly
23247 verify the [VEC_]COND_EXPR embedded comparison.
23249 2018-05-15 Martin Sebor <msebor@redhat.com>
23251 PR tree-optimization/85753
23252 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
23253 RECORD_TYPE in addition to ARRAY_TYPE.
23255 2018-05-15 Martin Sebor <msebor@redhat.com>
23257 PR middle-end/85643
23258 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
23260 2018-05-15 Richard Biener <rguenther@suse.de>
23262 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
23263 add by_clobber_p one. Change algorithm to collect all defs
23264 representing uses we need to walk and try reducing them to
23265 a single one before failing.
23266 (dse_dom_walker::dse_optimize_stmt): Adjust.
23268 2018-05-13 Mark Wielaard <mark@klomp.org>
23270 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
23271 (size_of_loc_descr): Likewise.
23272 (output_loc_operands): Likewise.
23273 (output_loc_operands_raw): Likewise.
23274 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
23275 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
23276 (hash_loc_operands): Likewise.
23277 (compare_loc_operands): Likewise.
23279 2018-05-14 Mark Wielaard <mark@klomp.org>
23281 * dwarf2out.c (count_index_addrs): New function.
23282 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
23284 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23286 PR tree-optimization/83648
23287 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
23288 return value as malloc candidate.
23290 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23293 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
23294 param as true in call to suggest_attribute.
23296 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
23298 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
23299 -mreadonly-in-sdata.
23301 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23303 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
23305 (aarch64_crypto_aesd_fused): Likewise.
23307 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
23309 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
23310 (movsi_aarch64): Likewise.
23311 (load_pairsi): Likewise.
23312 (load_pairdi): Likewise.
23313 (store_pairsi): Likewise.
23314 (store_pairdi): Likewise.
23315 (load_pairsf): Likewise.
23316 (load_pairdf): Likewise.
23317 (store_pairsf): Likewise.
23318 (store_pairdf): Likewise.
23319 (zero_extend): Likewise.
23320 (trunc): Swap alternatives.
23321 (fcvt_target): Add '?' to prefer w over r.
23323 2018-05-14 Jakub Jelinek <jakub@redhat.com>
23326 * config/i386/i386.md: Disallow non-commutative arithmetics in
23327 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
23328 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
23329 in the peephole2 before it.
23331 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
23333 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
23334 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
23335 (ix86_handle_option): Handle -mcldemote.
23336 * config.gcc: New header.
23337 * config/i386/cldemoteintrin.h: New file.
23338 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
23339 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
23341 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23342 OPTION_MASK_ISA_CLDEMOTE.
23343 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
23344 (ix86_valid_target_attribute_inner_p): Ditto.
23345 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
23346 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
23347 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
23348 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
23349 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
23351 * config/i386/i386.opt: Add -mcldemote.
23352 * config/i386/x86intrin.h: New header.
23353 * doc/invoke.texi: Add -mcldemote.
23355 2018-05-14 Richard Biener <rguenther@suse.de>
23357 * doc/match-and-simplify.texi: Adjust :s documentation.
23359 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
23361 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
23362 intended memcpy size.
23363 (REORDER_45): Likewise.
23365 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
23367 * sort.cc: New file.
23368 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
23369 * vec.c (qsort_chk): Use gcc_qsort.
23370 * Makefile.in (OBJS-libcommon): Add sort.o.
23371 (build/sort.o): New target. Use it...
23372 (BUILD_RTL): ... here, and...
23373 (build/gencfn-macros): ... here, and...
23374 (build/genmatch): ... here.
23376 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
23377 Chung-Ju Wu <jasonwucj@gmail.com>
23379 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
23380 * config/nds32/nds32-graywolf.md: New file.
23381 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
23382 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
23384 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
23385 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
23386 * config/nds32/nds32.md (pipeline_model): Add graywolf.
23387 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
23388 * config/nds32/pipelines.md: Include n15 settings.
23390 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
23391 Chung-Ju Wu <jasonwucj@gmail.com>
23393 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
23394 * config/nds32/nds32-n13.md: New file.
23395 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
23396 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
23398 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
23399 * config/nds32/nds32.md (pipeline_model): Add n13.
23400 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
23401 * config/nds32/pipelines.md: Include n13 settings.
23403 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
23404 Chung-Ju Wu <jasonwucj@gmail.com>
23406 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
23407 * config/nds32/nds32-n10.md: New file.
23408 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
23409 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
23411 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
23412 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
23413 * config/nds32/nds32.md (pipeline_model): Add n10.
23414 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
23415 * config/nds32/pipelines.md: Include n10 settings.
23417 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
23418 Kito Cheng <kito.cheng@gmail.com>
23419 Chung-Ju Wu <jasonwucj@gmail.com>
23421 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
23422 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23423 Add enum values for DSP extension instructions.
23424 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
23426 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
23427 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
23428 New code iterators.
23429 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
23430 * config/nds32/nds32-dspext.md: New file for DSP implementation.
23431 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
23432 * config/nds32/nds32-intrinsic.md: Likewise.
23433 * config/nds32/nds32_intrinsic.h: Likewise.
23434 * config/nds32/nds32-md-auxiliary.c: Likewise.
23435 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
23436 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
23437 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
23438 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
23439 * config/nds32/nds32-protos.h: New declarations for DSP extension.
23440 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
23441 TYPE_DMAC in switch statement.
23442 * config/nds32/nds32.c: New checking and implementation for DSP
23443 extension instructions.
23444 * config/nds32/nds32.h: Likewise.
23445 * config/nds32/nds32.md: Likewise.
23446 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
23447 * config/nds32/predicates.md: Implement new predicates for DSP
23450 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
23452 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
23453 Reformat alternatives and attributes so it is easier to identify
23454 which constraints/attributes go with which instruction.
23455 (mov<mode>_hardfloat32, FMOVE64): Likewise.
23456 (mov<mode>_softfloat32, FMOVE64): Likewise.
23457 (mov<mode>_hardfloat64, FMOVE64): Likewise.
23458 (mov<mode>_softfloat64, FMOVE64): Likewise.
23460 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
23462 * doc/extend.texi (PowerPC Built-in Functions): Rename this
23464 (Basic PowerPC Built-in Functions): The new name of the
23465 subsection previously known as "PowerPC Built-in Functions".
23466 (Basic PowerPC Built-in Functions Available on all Configurations):
23468 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
23469 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
23470 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
23471 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
23473 2018-05-11 Martin Jambor <mjambor@suse.cz>
23476 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
23479 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
23482 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
23484 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
23486 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
23487 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
23488 (ix86_handle_option): Handle -mwaitpkg.
23489 * config.gcc: New header.
23490 * config/i386/cpuid.h (bit_WAITPKG): New bit.
23491 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
23492 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
23494 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23495 OPTION_MASK_ISA_WAITPKG.
23496 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
23497 (ix86_option_override_internal): Add PTA_WAITPKG.
23498 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
23499 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
23500 IX86_BUILTIN_TPAUSE.
23501 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
23502 __builtin_ia32_umwait and __builtin_ia32_tpause.
23503 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
23504 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
23505 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
23506 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
23507 UNSPECV_TPAUSE): New.
23508 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
23509 * config/i386/i386.opt: Add -mwaitpkg.
23510 * config/i386/waitpkgintrin.h: New file.
23511 * config/i386/x86intrin.h: New header.
23512 * doc/invoke.texi: Add -mwaitpkg.
23514 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
23517 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
23519 (cortex-m0): Use armv6s-m isa.
23520 (cortex-m0plus): Likewise.
23521 (cortex-m1): Likewise.
23522 (cortex-m0.small-multiply): Likewise.
23523 (cortex-m0plus.small-multiply): Likewise.
23524 (cortex-m1.small-multiply): Likewise.
23526 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
23527 Jakub Jelinek <jakub@redhat.com>
23529 PR tree-optimization/85692
23530 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
23531 source permute as well.
23533 2018-05-11 Martin Liska <mliska@suse.cz>
23536 * doc/extend.texi: Document LLVM style format for no_sanitize
23539 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23541 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
23542 mode_supports_vsx_dform_quad to mode_supports_dq_form.
23543 (mode_supports_vsx_dform_quad): Likewise.
23544 (mode_supports_vmx_dform): Move these functions to be next to the
23545 other mode_supports functions.
23546 (mode_supports_dq_form): Likewise.
23547 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
23548 mode_supports_dq_form.
23549 (reg_offset_addressing_ok_p): Likewise.
23550 (offsettable_ok_by_alignment): Likewise.
23551 (rs6000_legitimate_offset_address_p): Likewise.
23552 (legitimate_lo_sum_address_p): Likewise.
23553 (rs6000_legitimize_address): Likewise.
23554 (rs6000_legitimize_reload_address): Likewise.
23555 (rs6000_secondary_reload_inner): Likewise.
23556 (rs6000_preferred_reload_class): Likewise.
23557 (rs6000_output_move_128bit): Likewise.
23559 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
23561 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
23562 Generate SImode target register for null target.
23563 <case IX86_BUILTIN_XGETBV>: Ditto.
23564 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
23565 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
23567 2018-05-10 Carl Love <cel@us.ibm.com>
23569 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
23570 dcbtt and dcbtstt if operands[2] is 0.
23572 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
23575 * config/i386/sse.md (usadv64qi): New expander.
23577 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
23579 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
23580 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
23581 -maltivec=be support.
23582 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
23583 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
23584 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
23585 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
23586 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
23587 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
23588 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
23589 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
23590 altivec_vsumsws): Adjust.
23591 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
23592 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
23593 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
23595 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
23596 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
23597 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
23598 (altivec_lve<VI_char>x): Delete expand.
23599 (*altivec_lve<VI_char>x_internal): Rename to...
23600 (altivec_lve<VI_char>x): ... this.
23601 (altivec_lvxl_<mode>): Delete expand.
23602 (*altivec_lvxl_<mode>_internal): Rename to ...
23603 (altivec_lvxl_<mode>): ... this.
23604 (altivec_stvxl_<mode>): Delete expand.
23605 (*altivec_stvxl_<mode>_internal): Rename to ...
23606 (altivec_stvxl_<mode>): ... this.
23607 (altivec_stve<VI_char>x): Delete expand.
23608 (*altivec_stve<VI_char>x_internal): Rename to ...
23609 (altivec_stve<VI_char>x): ... this.
23610 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
23611 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
23612 reduc_plus_scal_<mode>): Adjust.
23613 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
23615 (rs6000_cpu_cpp_builtins): Adjust.
23616 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
23617 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
23618 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
23619 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
23620 -maltivec=be support.
23621 (rs6000_split_vec_extract_var): Adjust.
23622 (rs6000_split_v4si_init): Adjust.
23623 (swap_selector_for_mode): Delete.
23624 (altivec_expand_lvx_be, altivec_expand_stvx_be,
23625 altivec_expand_stvex_be): Delete.
23626 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
23627 -maltivec=be support.
23628 (rs6000_gimple_fold_builtin): Ditto.
23629 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
23631 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
23632 (TARGET_DIRECT_MOVE_64BIT): Adjust.
23633 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
23634 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
23635 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
23636 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
23637 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
23638 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
23639 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
23640 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
23641 anonymous split): Adjust.
23642 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
23643 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
23645 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
23647 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
23648 when --with-gxx-include-dir is also specified.
23649 * configure: Regenerate.
23651 2018-05-09 Jim Wilson <jimw@sifive.com>
23654 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
23655 * config/riscv/t-withmultilib: New.
23656 * config/riscv/withmultilib.h: New.
23657 * doc/install.texi: Document RISC-V --with-multilib-list support.
23659 2018-05-09 Richard Biener <rguenther@suse.de>
23661 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
23663 (vect_bb_vectorization_profitable_p): Adjust. Compute
23664 actual scalar cost using the cost vector and the add_stmt_cost
23667 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23669 PR rtl-optimization/85645
23670 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
23671 in the REG_CFA_REGISTER note for LR, don't leave it empty.
23673 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23675 PR rtl-optimization/85645
23676 * shrink-wrap.c (spread_components): Return a boolean saying if
23677 anything was changed.
23678 (try_shrink_wrapping_separate): Iterate spread_components until
23679 nothing changes anymore.
23681 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23683 PR rtl-optimization/85645
23684 * regrename.c (build_def_use): Also kill the chains that include the
23685 destination of a REG_CFA_REGISTER note.
23687 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
23689 PR rtl-optimization/85645
23690 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
23691 insn that has a REG_CFA_REGISTER note.
23693 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
23695 * cfgexpand.c (expand_clobber): New function.
23696 (expand_gimple_stmt_1): Use it.
23697 * tree-vect-stmts.c (vect_clobber_variable): New function,
23699 (vectorizable_simd_clone_call): ...here.
23700 (vectorizable_store): Emit a clobber either side of an
23701 IFN_STORE_LANES sequence.
23702 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
23704 2018-05-09 Tom de Vries <tom@codesourcery.com>
23707 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
23708 (define_insn "trap_if_false"): Add exit after trap.
23710 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
23712 PR rtl-optimization/85638
23713 * bb-reorder.c: Include common/common-target.h.
23714 (create_forwarder_block): New function extracted from...
23715 (fix_up_crossing_landing_pad): ...here. Rename into...
23716 (dw2_fix_up_crossing_landing_pad): ...this.
23717 (sjlj_fix_up_crossing_landing_pad): New function.
23718 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
23719 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
23720 from both partitions and exit the loop after one iteration.
23722 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
23725 * doc/extend.texi (PowerPC Built-in Functions): Rename this
23727 (Basic PowerPC Built-in Functions): The new name of the
23728 subsection previously known as "PowerPC Built-in Functions".
23729 (Basic PowerPC Built-in Functions Available on all Configurations):
23731 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
23733 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
23735 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
23737 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
23740 2018-05-08 Jim Wilson <jimw@sifive.com>
23742 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
23743 (LD_EMUL_SUFFIX): New.
23744 (LINK_SPEC): Use it.
23746 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
23748 * doc/extend.texi (PowerPC Built-in Functions): Rename this
23750 (Basic PowerPC Built-in Functions): The new name of the
23751 subsection previously known as "PowerPC Built-in Functions".
23752 (Basic PowerPC Built-in Functions Available on all Configurations):
23754 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
23756 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
23758 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
23760 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
23763 2018-05-08 Jakub Jelinek <jakub@redhat.com>
23766 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
23767 after cmpelim optimization.
23769 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
23771 * config.gcc: Support "goldmont".
23772 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
23773 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23774 PROCESSOR_GOLDMONT.
23775 * config/i386/i386.c (m_GOLDMONT): Define.
23776 (processor_target_table): Add "goldmont".
23777 (PTA_GOLDMONT): Define.
23778 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
23779 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
23780 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
23781 (fold_builtin_cpu): Add "goldmont".
23782 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
23783 (ix86_option_override_internal): Add "goldmont".
23784 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
23785 (processor_type): Add PROCESSOR_GOLDMONT.
23786 * config/i386/i386.md: Add CPU "glm".
23787 * config/i386/glm.md: New file.
23788 * config/i386/x86-tune.def: Add m_GOLDMONT.
23789 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
23791 2018-05-08 Jakub Jelinek <jakub@redhat.com>
23794 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
23796 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
23797 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
23798 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
23801 * config/i386/i386.c (ix86_fold_builtin): Handle
23802 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
23805 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
23806 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
23808 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
23811 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
23812 (check_arch): Likewise.
23813 (check_fpu): Return the result rather than printing it.
23814 (end arch): Fix operator precedence.
23815 (end cpu): Likewise.
23816 (END): Print the result from check_fpu.
23818 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
23819 Alan Hayward <alan.hayward@arm.com>
23820 David Sherwood <david.sherwood@arm.com>
23822 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
23823 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
23824 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
23825 (*fcmuo<mode>_and): New patterns.
23827 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
23829 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
23830 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
23831 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
23832 (cmp_op, sve_imm_con): New code attributes.
23833 (SVE_COND_INT_CMP, imm_con): Delete.
23834 (cmp_op): Remove above unspecs from int attribute.
23835 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
23837 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
23838 comparison-specific unspecs.
23839 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
23840 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
23841 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
23842 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
23843 (*vec_fcm<cmp_op><mode>): Rename to...
23844 (*fcm<cmp_op><mode>): ...this and adjust likewise.
23845 (*vec_fcmuo<mode>): Rename to...
23846 (*fcmuo<mode>): ...this and adjust likewise.
23847 (*pred_fcm<cmp_op><mode>): New pattern.
23848 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
23849 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
23851 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
23853 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
23854 (aarch64_emit_sve_predicated_cond): New function.
23855 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
23856 (aarch64_emit_unspec_cond_or): Replace with...
23857 (aarch64_emit_sve_or_conds): ...this new function. Use
23858 aarch64_emit_sve_ptrue_op for the individual comparisons and
23859 aarch64_emit_binop to OR them together.
23860 (aarch64_emit_inverted_unspec_cond): Replace with...
23861 (aarch64_emit_sve_inverted_cond): ...this new function. Use
23862 aarch64_emit_sve_ptrue_op for the comparison and
23863 aarch64_emit_unop to invert the result.
23864 (aarch64_expand_sve_vec_cmp_float): Update after the above
23865 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
23867 2018-05-07 Nathan Sidwell <nathan@acm.org>
23869 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
23870 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
23871 (Backwards Compatibility): Likewise.
23873 2018-05-07 Luis Machado <luis.machado@linaro.org>
23877 2018-05-07 Luis Machado <luis.machado@linaro.org>
23879 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
23880 <prefetch_dynamic_strides>: New const bool field.
23881 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
23882 prefetch_dynamic_strides.
23883 (exynosm1_prefetch_tune): Likewise.
23884 (thunderxt88_prefetch_tune): Likewise.
23885 (thunderx_prefetch_tune): Likewise.
23886 (thunderx2t99_prefetch_tune): Likewise.
23887 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
23889 (aarch64_override_options_internal): Update to set
23890 PARAM_PREFETCH_DYNAMIC_STRIDES.
23891 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
23892 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
23893 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
23894 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
23895 prefetch-dynamic-strides setting.
23897 2018-05-07 Luis Machado <luis.machado@linaro.org>
23899 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
23900 <minimum_stride>: New const int field.
23901 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
23902 minimum_stride field.
23903 (exynosm1_prefetch_tune): Likewise.
23904 (thunderxt88_prefetch_tune): Likewise.
23905 (thunderx_prefetch_tune): Likewise.
23906 (thunderx2t99_prefetch_tune): Likewise.
23907 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
23908 (aarch64_override_options_internal): Update to set
23909 PARAM_PREFETCH_MINIMUM_STRIDE.
23910 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
23911 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
23912 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
23913 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
23914 stride is constant and is below the minimum stride threshold.
23916 2018-05-07 Luis Machado <luis.machado@linaro.org>
23918 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
23921 2018-05-07 Luis Machado <luis.machado@linaro.org>
23923 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
23924 <prefetch_dynamic_strides>: New const bool field.
23925 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
23926 prefetch_dynamic_strides.
23927 (exynosm1_prefetch_tune): Likewise.
23928 (thunderxt88_prefetch_tune): Likewise.
23929 (thunderx_prefetch_tune): Likewise.
23930 (thunderx2t99_prefetch_tune): Likewise.
23931 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
23933 (aarch64_override_options_internal): Update to set
23934 PARAM_PREFETCH_DYNAMIC_STRIDES.
23935 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
23936 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
23937 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
23938 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
23939 prefetch-dynamic-strides setting.
23941 2018-05-07 Luis Machado <luis.machado@linaro.org>
23943 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
23944 <minimum_stride>: New const int field.
23945 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
23946 minimum_stride field.
23947 (exynosm1_prefetch_tune): Likewise.
23948 (thunderxt88_prefetch_tune): Likewise.
23949 (thunderx_prefetch_tune): Likewise.
23950 (thunderx2t99_prefetch_tune): Likewise.
23951 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
23952 (aarch64_override_options_internal): Update to set
23953 PARAM_PREFETCH_MINIMUM_STRIDE.
23954 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
23955 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
23956 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
23957 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
23958 stride is constant and is below the minimum stride threshold.
23960 2018-05-06 Jakub Jelinek <jakub@redhat.com>
23963 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
23964 the type is addressable. Don't force op into register if it has
23967 2018-05-05 Roland McGrath <mcgrathr@google.com>
23970 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
23971 any section for which we don't know a specific type it should have,
23972 regardless of name. Previously this was done only for the exact
23973 names ".init_array", ".fini_array", and ".preinit_array".
23974 (default_elf_asm_named_section): Add comment about
23975 relationship with default_section_type_flags and SECTION_NOTYPE.
23976 (get_section): Don't consider it a type conflict if one side has
23977 SECTION_NOTYPE and the other doesn't, as long as neither has the
23978 SECTION_BSS et al used in the default_section_type_flags logic.
23980 2018-05-05 Tom de Vries <tom@codesourcery.com>
23983 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
23984 (workaround_barsyncs): New function.
23985 (nvptx_reorg): Use workaround_barsyncs.
23986 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
23987 (define_expand "nvptx_membar_cta"): New define_expand.
23988 (define_insn "*nvptx_membar_cta"): New insn.
23990 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
23992 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
23993 To improve optimization opportunities.
23994 * builtin-types.def: The new needed builtin types for the above.
23996 2018-05-04 Richard Biener <rguenther@suse.de>
23998 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
23999 * gimple-ssa-store-merging.c
24000 (imm_store_chain_info::output_merged_store): Remove redundant create,
24001 release split_store vector contents on failure.
24002 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
24003 scalar stmt vector on cache hit.
24005 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
24007 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
24009 * config.gcc (powerpc-xilinx-eabi*): Remove.
24010 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
24012 (fusion_addis_mem_combo_load): Ditto.
24013 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
24015 (rs6000_cpu_cpp_builtins): Ditto.
24016 * config/rs6000/rs6000-linux.c
24017 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
24018 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
24019 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
24021 (rs6000_setup_reg_addr_masks): Ditto.
24022 (rs6000_init_hard_regno_mode_ok): Ditto.
24023 (rs6000_option_override_internal): Ditto.
24024 (legitimate_lo_sum_address_p): Ditto.
24025 (rs6000_legitimize_address): Ditto.
24026 (rs6000_legitimize_reload_address): Ditto.
24027 (rs6000_legitimate_address_p): Ditto.
24028 (abi_v4_pass_in_fpr): Ditto.
24029 (setup_incoming_varargs): Ditto.
24030 (rs6000_gimplify_va_arg): Ditto.
24031 (rs6000_split_multireg_move): Ditto.
24032 (rs6000_savres_strategy): Ditto.
24033 (rs6000_emit_prologue_components): Ditto.
24034 (rs6000_emit_epilogue_components): Ditto.
24035 (rs6000_emit_prologue): Ditto.
24036 (rs6000_emit_epilogue): Ditto.
24037 (rs6000_elf_file_end): Ditto.
24038 (rs6000_function_value): Ditto.
24039 (rs6000_libcall_value): Ditto.
24040 * config/rs6000/rs6000.h: Ditto.
24041 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
24042 (TARGET_MINMAX): ... this. New.
24043 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
24044 * config/rs6000/rs6000.md: Remove Xilinx FP support.
24045 (*movsi_internal1_single): Delete.
24046 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
24047 mfpu=, mxilinx-fpu): Delete.
24048 * config/rs6000/singlefp.h: Delete.
24049 * config/rs6000/sysv4.h: Remove Xilinx FP support.
24050 * config/rs6000/t-rs6000: Ditto.
24051 * config/rs6000/t-xilinx: Delete.
24052 * config/rs6000/titan.md: Adjust for fp_type removal.
24053 * config/rs6000/vsx.md: Remove Xilinx FP support.
24054 (VStype_simple): Delete.
24055 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
24056 * config/rs6000/xfpu.h: Delete.
24057 * config/rs6000/xfpu.md: Delete.
24058 * config/rs6000/xilinx.h: Delete.
24059 * config/rs6000/xilinx.opt: Delete.
24060 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
24061 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
24063 2018-05-04 Tom de Vries <tom@codesourcery.com>
24066 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
24069 2018-05-04 Richard Biener <rguenther@suse.de>
24071 PR middle-end/85627
24072 * tree-complex.c (update_complex_assignment): We are always in SSA form.
24073 (expand_complex_div_wide): Likewise.
24074 (expand_complex_operations_1): Likewise.
24075 (expand_complex_libcall): Preserve EH info of the original stmt.
24076 (tree_lower_complex): Handle removed blocks.
24077 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
24078 on complex multiplication and division libcall builtins.
24080 2018-05-04 Richard Biener <rguenther@suse.de>
24082 PR middle-end/85574
24083 * fold-const.c (negate_expr_p): Restrict negation of operand
24084 zero of a division to when we know that can happen without
24086 (fold_negate_expr_1): Likewise.
24088 2018-05-04 Jakub Jelinek <jakub@redhat.com>
24091 * real.h (real_nextafter): Declare.
24092 * real.c (real_nextafter): New function.
24093 * fold-const-call.c (fold_const_nextafter): New function.
24094 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
24095 CASE_CFN_NEXTTOWARD.
24096 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
24097 even when arg1_mode is different from arg0_mode.
24099 2018-05-03 Nathan Sidwell <nathan@acm.org>
24101 * doc/extend.texi (Deprecated Features): Remove
24102 -ffriend-injection.
24103 (Backwards Compatibility): Likewise.
24104 * doc/invoke.texi (C++ Language Options): Likewise.
24105 (C++ Dialect Options): Likewise.
24107 2018-05-03 Jakub Jelinek <jakub@redhat.com>
24110 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
24111 _mm512_mask_mullox_epi64): New intrinsics.
24113 2018-05-03 Tom de Vries <tom@codesourcery.com>
24116 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
24117 dump files): Add offload-tree.
24119 2018-05-03 Richard Biener <rguenther@suse.de>
24121 PR tree-optimization/85615
24122 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
24123 to loops not nested in BBs loop father to avoid creating multi-entry
24126 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24128 PR tree-optimization/70291
24129 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
24130 arguments. Change return type to tree. Emit libcall as a new
24131 statement rather than replacing existing one when inplace_p is true.
24132 (expand_complex_multiplication_components): New function.
24133 (expand_complex_multiplication): Expand floating-point complex
24134 multiplication using the above.
24135 (expand_complex_division): Rename inner_type parameter to type.
24136 Update expand_complex_libcall call-site.
24137 (expand_complex_operations_1): Update expand_complex_multiplication
24138 and expand_complex_division call-sites.
24140 2018-05-02 Jakub Jelinek <jakub@redhat.com>
24143 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
24144 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
24145 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
24146 the highest significant bit of the shift count mask is clear. In
24147 check whether and[sq]i3 is needed verify that all significant bits
24148 of the shift count other than the highest are set.
24150 2018-05-02 Tom de Vries <tom@codesourcery.com>
24153 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
24154 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
24155 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
24156 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
24157 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
24158 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
24159 __builtin_goacc_parlevel_size.
24161 2018-05-02 Richard Biener <rguenther@suse.de>
24163 PR tree-optimization/85597
24164 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
24165 do not use split vect_get_vec_defs call but call vect_get_slp_defs
24168 2018-05-02 Tom de Vries <tom@codesourcery.com>
24171 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
24172 dump files): Add ltrans-tree.
24174 2018-05-02 Tom de Vries <tom@codesourcery.com>
24177 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
24178 dump files): Add wpa-ipa.
24180 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
24182 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
24183 powerpc*-*-linux*paired* target.
24184 * config/rs6000/750cl.h: Delete.
24185 * config/rs6000/paired.h: Delete.
24186 * config/rs6000/paired.md: Delete.
24187 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
24189 * config/rs6000/rs6000-builtin.def: Remove paired float support.
24190 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
24191 comment. Remove paired float support.
24192 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
24193 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
24195 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
24196 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
24198 * config/rs6000/rs6000.c: Remove paired float support.
24199 (paired_expand_vector_init, paired_expand_vector_move,
24200 paired_emit_vector_compare, paired_emit_vector_cond_expr,
24201 (paired_expand_lv_builtin, paired_expand_stv_builtin,
24202 paired_expand_builtin, paired_expand_predicate_builtin,
24203 paired_init_builtins): Delete.
24204 * config/rs6000/rs6000.h: Remove paired float support.
24205 * config/rs6000/rs6000.md: Remove paired float support.
24206 (move_from_CR_ov_bit): Delete.
24207 * config/rs6000/rs6000.opt (mpaired): Delete.
24208 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
24209 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
24211 2018-05-02 Richard Biener <rguenther@suse.de>
24213 PR middle-end/85567
24214 * gimplify.c (gimplify_save_expr): When in SSA form allow
24215 SAVE_EXPRs to compute to SSA vars.
24217 2018-05-02 Jakub Jelinek <jakub@redhat.com>
24220 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
24221 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
24222 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
24223 clobber operands[2], instead use a new pseudo. Formatting fixes.
24225 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
24227 PR tree-optimization/85586
24228 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
24229 exit early for statements in the same group if the accesses are
24232 2018-05-02 Tom de Vries <tom@codesourcery.com>
24235 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
24238 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
24240 PR tree-optimization/85143
24241 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
24243 2018-05-01 Tom de Vries <tom@codesourcery.com>
24246 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
24247 not found" error message.
24249 2018-05-01 Tom de Vries <tom@codesourcery.com>
24252 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
24253 * vec.c (test_ordered_remove_if): New function.
24254 (vec_c_tests): Call test_ordered_remove_if.
24255 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
24256 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
24257 * tree-vect-patterns.c (vect_pattern_recog_1): Use
24258 VEC_ORDERED_REMOVE_IF.
24260 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24262 PR tree-optimization/82665
24263 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
24264 pointer subtraction where arguments come from a memchr call.
24266 2018-05-01 Jakub Jelinek <jakub@redhat.com>
24268 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
24269 --push-state --as-needed and --pop-state instead of --as-needed and
24270 --no-as-needed if ld supports it.
24271 * configure: Regenerated.
24274 * doc/install.texi2html: Replace _002d with - and _002a with * in
24275 generated html files using sed.
24277 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24280 * gcc-rich-location.c (blank_line_before_p): New function.
24281 (use_new_line): New function.
24282 (gcc_rich_location::add_fixit_insert_formatted): New function.
24283 * gcc-rich-location.h
24284 (gcc_rich_location::add_fixit_insert_formatted): New function.
24286 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24288 * selftest.c (assert_streq): Rename "expected" and "actual" to
24289 "val1" and "val2". Extend NULL-handling to cover both inputs
24290 symmetrically, while still requiring both to be non-NULL for a pass.
24291 * selftest.h (assert_streq): Rename "expected" and "actual" to
24293 (ASSERT_EQ): Likewise.
24294 (ASSERT_EQ_AT): Likewise.
24295 (ASSERT_KNOWN_EQ): Likewise.
24296 (ASSERT_KNOWN_EQ_AT): Likewise.
24297 (ASSERT_NE): Likewise.
24298 (ASSERT_MAYBE_NE): Likewise.
24299 (ASSERT_MAYBE_NE_AT): Likewise.
24300 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
24301 the assertion to pass.
24302 (ASSERT_STREQ_AT): Likewise.
24304 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
24306 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
24307 interaction with -pie.
24309 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24311 * selftest.h: Fix alphabetization of per-source-file selftest
24314 2018-04-30 Jason Merrill <jason@redhat.com>
24316 PR c++/61982 - dead stores to destroyed objects.
24317 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
24320 2018-04-30 Jason Merrill <jason@redhat.com>
24322 * tree.c (build_clobber): New.
24323 * tree.h: Declare it.
24324 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
24326 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24328 * diagnostic-show-locus.c (layout::layout): Update for
24329 location_get_source_line returning a char_span.
24330 (struct char_span): Move to input.h.
24331 (struct correction): Update for fields in char_span becoming
24333 (struct source_line): Update for location_get_source_line
24334 returning a char_span.
24335 (layout::print_line): Likewise.
24336 * edit-context.c (edited_file::print_content): Likewise.
24337 (edited_file::print_diff_hunk): Likewise.
24338 (edited_file::print_run_of_changed_lines): Likewise.
24339 (edited_file::get_num_lines): Likewise.
24340 (edited_line::edited_line): Likewise.
24341 * final.c (asm_show_source): Likewise.
24342 * input.c (location_get_source_line): Convert return type
24343 from const char * to char_span, losing the final "line_len"
24345 (dump_location_info): Update for the above.
24346 (get_substring_ranges_for_loc): Likewise. Use a char_span
24347 when handling the literal within the line.
24348 (test_reading_source_line): Update for location_get_source_line
24349 returning a char_span.
24350 * input.h (class char_span): Move here from
24351 diagnostic-show-locus.c, converting from a struct to a class.
24352 Make data members private.
24353 (char_span::operator bool): New.
24354 (char_span::length): New.
24355 (char_span::get_buffer): New.
24356 (char_span::operator[]): New.
24357 (char_span::subspan): Make const.
24358 (char_span::xstrdup): New.
24359 (location_get_source_line): Convert return type from const char *
24360 to char_span, losing the final "line_size" param.
24362 2018-04-30 Jan Hubicka <jh@suse.cz>
24364 * lto-wrapper.c (ltrans_priorities): New static var.
24365 (cmp_priority): New.
24366 (run_gcc): Read priorities and if doing parallel build order
24367 the Makefile by them.
24369 2018-04-30 David Malcolm <dmalcolm@redhat.com>
24371 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
24373 2018-04-30 Richard Biener <rguenther@suse.de>
24375 * tree-cfg.c (verify_address): Remove base argument, add
24376 flag whether to check TREE_ADDRESSABLE and do that.
24377 (verify_expr): Remove.
24378 (verify_types_in_gimple_reference): Add pieces from verify_expr.
24379 (verify_gimple_assign_single): Likewise.
24380 (verify_gimple_switch): Likewise.
24381 (verify_expr_location_1): Dereference tp once. Add (disabled)
24382 piece from verify_expr.
24383 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
24385 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
24387 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
24389 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
24391 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
24392 (small_data_pattern): Likewise.
24393 (arc_rewrite_small_data): Likewise.
24394 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
24395 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
24396 (get_symbol_alignment): New function.
24397 (legitimate_small_data_address_p): Likewise.
24398 (legitimate_scaled_address): Update, call
24399 legitimate_small_data_address_p.
24400 (output_sdata): New static variable.
24401 (arc_print_operand): Update how we handle small data operands.
24402 (arc_print_operand_address): Likewise.
24403 (arc_legitimate_address_p): Update, use
24404 legitimate_small_data_address_p.
24405 (arc_rewrite_small_data_p): Remove.
24406 (arc_rewrite_small_data_1): Likewise.
24407 (arc_rewrite_small_data): Likewise.
24408 (small_data_pattern): Likewise.
24409 (compact_sda_memory_operand): Update to use
24410 legitimate_small_data_address_p and get_symbol_alignment.
24411 (prepare_move_operands): Don't rewite sdata pattern.
24412 (prepare_extend_operands): Remove.
24413 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
24415 (zero_extendqisi2): Likewise.
24416 (zero_extendhisi2): Likewise.
24417 (extendqihi2): Likewise.
24418 (extendqisi2): Likewise.
24419 (extendhisi2): Likewise.
24420 (addsi3): Likewise.
24421 (subsi3): Likewise.
24422 (andsi3): Likewise.
24423 * config/arc/constraints.md (Usd): Change it to memory constraint.
24425 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
24427 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
24428 as source of std instructions.
24429 * config/arc/arc.md (movsi_insn): Update pattern predicate to
24430 allow 6-bit constants as source for store instructions.
24431 (movdi_insn): Update instruction pattern to allow 6-bit constants
24432 as source for store instructions.
24434 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
24436 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
24438 2018-04-30 Nathan Sidwell <nathan@acm.org>
24439 Sandra Loosemore <sandra@codesourcery.com>
24441 * dumpfile.c (dump_open): Allow '-' for stdout.
24442 * doc/invoke.texi (Developer Options): Document dump filename
24443 determination early. Document stdin/stdout selection.
24445 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
24447 Microblaze Target: PIC data text relative
24449 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
24450 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
24452 * config/microblaze/microblaze.h (microblaze_constant_address_p):
24453 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
24454 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
24455 New addressing mode for data-text relative position indepenedent code.
24456 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
24457 'ADDRESS_SYMBOLIC_TXT_REL'.
24458 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
24459 (microblaze_legitimate_pic_operand): Exclude function calls from
24460 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
24461 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
24463 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
24464 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
24465 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
24466 for 'address + offset'.
24467 (microblaze_expand_prologue): Add new function prologue call for
24469 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
24470 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
24471 table in case of TARGET_PIC_DATA_TEXT_REL.
24472 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
24473 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
24474 Add new macros 'UNSPEC_TEXT',
24475 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
24476 + exclude function calls from 'UNSPEC_PLT' in case of data text
24478 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
24479 new target hook for generating address diff vector tables in case of
24481 * doc/tm.texi : Regenerate.
24482 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
24483 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
24484 of addr diff vector generation.
24485 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
24486 target hook definition.
24487 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
24488 Add default function for generate_pic_addr_diff_vec -> flag_pic.
24489 * doc/invoke.texi (Add new pic option): Add new microblaze pic
24490 option for data text relative.
24492 2018-04-30 Richard Biener <rguenther@suse.de>
24494 * tree-chrec.h (evolution_function_is_constant_p): Remove
24496 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
24498 2018-04-30 Richard Biener <rguenther@suse.de>
24501 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
24503 2018-04-30 Richard Biener <rguenther@suse.de>
24505 PR tree-optimization/28364
24506 PR tree-optimization/85275
24507 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
24508 copying first exit test.
24510 2018-04-28 Mark Wielaard <mark@klomp.org>
24512 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
24513 dwarf_version >= 5.
24514 (dwarf_AT): Handle DW_AT_addr_base.
24515 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
24517 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
24520 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
24521 (*ashl<dwi>3_doubleword_mask_1): Ditto.
24522 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
24523 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
24525 2018-04-28 Richard Biener <rguenther@suse.de>
24527 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
24528 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
24529 to reflect use. Only add interesting stmts.
24531 2018-04-27 Martin Jambor <mjambor@suse.cz>
24534 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
24535 the jump function allows for passing through aggregate values.
24537 2018-04-27 David Malcolm <dmalcolm@redhat.com>
24539 * input.h (in_system_header_at): Convert from macro to inline
24541 (from_macro_expansion_at): Likewise.
24542 (from_macro_definition_at): Likewise.
24544 2018-04-27 Jeff Law <law@redhat.com>
24546 * config.gcc: Mark tile* targets as deprecated/obsolete.
24548 2018-04-27 Richard Biener <rguenther@suse.de>
24550 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
24553 2018-04-27 Richard Biener <rguenther@suse.de>
24555 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
24557 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
24559 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
24560 with Yd constraint. Set "preferred_for_speed" attribute from
24561 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
24562 with Yd constraint.
24563 (*movdi_internal): Ditto.
24564 (movti_interunit splitters): Remove
24565 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
24566 (movdi_interunit splitters): Ditto.
24567 * config/i386/constraints.md (Ye): Remove.
24568 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
24570 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24573 * config/aarch64/constraints.md (Usg): Limit to 31.
24574 (Usj): Limit to 63.
24576 2018-04-27 Jakub Jelinek <jakub@redhat.com>
24578 PR tree-optimization/85529
24579 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
24580 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
24581 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
24582 zero extension or masking of the MSB bit.
24583 (optimize_range_tests): Add FIRST_BB argument, pass it through
24584 to optimize_range_tests_var_bound.
24585 (maybe_optimize_range_tests, reassociate_bb): Adjust
24586 optimize_range_tests callers.
24588 2018-04-26 Richard Biener <rguenther@suse.de>
24589 Jakub Jelinek <jakub@redhat.com>
24591 * cgraph.h (symbol_table): Just declare debug method here.
24592 * symtab.c (symbol_table::debug): Define.
24594 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
24596 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
24598 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
24600 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
24601 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
24602 (*movdi_internal): Substitute Yi and Yj constraint with x
24603 and Ym and Yn constraint with y constraint. Update "isa"
24604 attribute and set "preferred_for_speed" attribute from
24605 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
24606 (*movsi_internal): Ditto.
24607 (*movdf_internal): Ditto.
24608 (*movsf_internal): Ditto.
24609 (*zero_extendsidi2): Ditto.
24610 * config/i386/sse.md (vec_set<mode>_0): Ditto.
24611 (sse2_loadld): Ditto.
24612 (*vec_extract<ssevecmodelower>_0): Ditto.
24613 (*vec_extractv4si_0_zext_sse4): Ditto.
24614 (vec_concatv2di): Ditto.
24615 (*vec_dup<mode>): Ditto.
24616 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
24617 * config/i386/constraints.md (Yi): Remove.
24622 2018-04-26 Nathan Sidwell <nathan@acm.org>
24624 * dumpfile.c (dump_open): New.
24625 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
24626 (dump_finish): Detect stdio/stderr by value not name.
24628 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
24630 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
24632 2018-04-26 Tom de Vries <tom@codesourcery.com>
24635 * config/nvptx/nvptx.c (verify_neutering_jumps)
24636 (verify_neutering_labels): New function
24637 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
24639 2018-04-26 Tom de Vries <tom@codesourcery.com>
24642 * config/nvptx/nvptx.c (needs_neutering_p): New function.
24643 (nvptx_single): Use needs_neutering_p to skip over insns that do not
24646 2018-04-26 Richard Biener <rguenther@suse.de>
24647 Tom de Vries <tom@codesourcery.com>
24650 * lto-streamer-out.c (output_function): Fixup loops if required to match
24651 discovery done in the reader.
24653 2018-04-26 Richard Biener <rguenther@suse.de>
24655 PR tree-optimization/85116
24656 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
24657 have a loop exit from the single latch predecessor. Remove
24658 case of header with just condition.
24659 (ch_base::copy_headers): Exclude infinite loops from any
24661 (pass_ch::execute): Record exits.
24663 2018-04-26 Richard Biener <rguenther@suse.de>
24665 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
24666 prologue cost vector and pass it to vect_get_load_cost.
24667 (vect_get_peeling_costs_all_drs): Likewise.
24668 (vect_peeling_hash_get_lowest_cost): Likewise.
24669 (vect_enhance_data_refs_alignment): Likewise.
24671 2018-04-26 Richard Biener <rguenther@suse.de>
24673 PR middle-end/85450
24674 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
24675 checking of integer<->pointer conversions.
24676 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
24677 sign-/zero-extending pointer types.
24678 (expand_omp_for_static_chunk): Likewise.
24680 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
24681 Jean Lee <xiaoyur347@gmail.com>
24683 * config/mips/mips.c (mips_asan_shadow_offset): New function.
24684 (TARGET_ASAN_SHADOW_OFFSET): Define.
24685 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
24686 true for -fsanitize=address.
24688 2018-04-25 Mark Wielaard <mark@klomp.org>
24690 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
24693 2018-04-25 Jakub Jelinek <jakub@redhat.com>
24695 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
24696 than "alu", remove explicit "memory" and "imm_disp" attributes.
24697 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
24699 PR middle-end/85414
24700 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
24701 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
24702 gen_lowpart_no_emit.
24704 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
24707 * config/i386/i386.c (ix86_expand_builtin): Change memory
24708 operand to XI, extend p0 to Pmode.
24709 * config/i386/i386.md: Change unspec volatile and operand
24710 1 mode to XI, change operand 0 mode to P.
24712 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24714 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
24715 GET_MODE_MASK before any checking.
24716 (nds32_can_use_bset_p): Likewise.
24717 (nds32_can_use_btgl_p): Likewise.
24719 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24721 * config/nds32/nds32-doubleword.md: New define_split pattern for
24722 illegal register number.
24724 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24726 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
24728 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
24730 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
24732 2018-04-25 Richard Biener <rguenther@suse.de>
24734 * lto-streamer.h (LTO_major_version): Bump to 8.
24736 2018-04-25 Jakub Jelinek <jakub@redhat.com>
24738 * BASE-VER: Set to 9.0.0.
24740 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
24742 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
24743 in __abskf2 and __powikf2.
24745 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24748 * config/aarch64/constraints.md (Usg, Usj): New constraints.
24749 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
24750 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
24751 Use the above on operand 2. Reindent.
24752 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
24754 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
24757 * common/config/i386/i386-common.c (ix86_handle_option): Don't
24759 * config/i386/i386.opt (mcet): Removed.
24760 * doc/install.texi: Remove -mcet documentation.
24761 * doc/invoke.texi: Likewise.
24763 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
24766 * doc/install.texi: Remove -mcet from bootstrap-cet.
24768 2018-04-24 Jakub Jelinek <jakub@redhat.com>
24771 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
24772 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
24776 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
24777 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
24778 containing a CONST_VECTOR.
24780 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
24782 * doc/install.texi: Update newlib dependency for nvptx.
24784 2018-04-24 Jakub Jelinek <jakub@redhat.com>
24787 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
24788 instead of INTVAL when shifting x left.
24790 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
24792 PR tree-optimization/85478
24793 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
24794 vect_grouped_store_supported for single element vectors.
24796 2018-04-24 Richard Biener <rguenther@suse.de>
24799 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
24800 load cost increase to the case of non-constant step.
24802 2018-04-24 Jakub Jelinek <jakub@redhat.com>
24805 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
24806 destination if any_malformed_asm.
24808 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
24810 PR middle-end/85496
24811 * expr.c (store_field): In the bitfield case, if the value comes from
24812 a function call and is returned in registers by means of a PARALLEL,
24813 do not change the mode of the temporary unless BLKmode and VOIDmode.
24815 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
24817 PR rtl-optimization/85423
24818 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
24819 dependencies to debug insns when the previous insn is non-debug.
24821 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
24823 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
24824 enums into a single definition.
24825 (fls): Fix predicates and printing.
24828 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
24830 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
24831 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
24832 and short u6 immediate.
24833 (check_if_valid_sleep_operand): Remove.
24834 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
24836 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24838 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
24839 flag_always_save_lp condition.
24840 * config/nds32/nds32.opt (malways-save-lp): New option.
24842 2018-04-22 Shiva Chen <shiva0217@gmail.com>
24844 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
24845 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
24846 * config/nds32/nds32.h
24847 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
24848 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
24850 2018-04-22 Shiva Chen <shiva0217@gmail.com>
24852 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
24853 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
24855 2018-04-22 Shiva Chen <shiva0217@gmail.com>
24856 Chung-Ju Wu <jasonwucj@gmail.com>
24858 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
24860 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
24861 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
24863 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24865 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
24867 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24869 * config/nds32/nds32-protos.h (nds32_data_alignment,
24870 nds32_local_alignment): Declare.
24871 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
24872 nds32_local_alignment): New functions.
24873 (TARGET_CONSTANT_ALIGNMENT): Define.
24874 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
24876 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24878 * config/nds32/nds32.c
24879 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
24880 (TARGET_MODES_TIEABLE_P): Likewise.
24882 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
24884 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
24885 level Ofast and Og.
24887 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
24888 Chung-Ju Wu <jasonwucj@gmail.com>
24890 * config/nds32/constants.md (unspec_volatile_element): Add enum values
24891 for unaligned access.
24892 * config/nds32/nds32-intrinsic.c: Implementation of expanding
24894 * config/nds32/nds32-intrinsic.md: Likewise.
24895 * config/nds32/nds32_intrinsic.h: Likewise.
24896 * config/nds32/nds32.h (nds32_builtins): Likewise.
24897 * config/nds32/nds32.opt (munaligned-access): New option.
24898 * config/nds32/nds32.c (nds32_asm_file_start): Display
24899 flag_unaligned_access status.
24901 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
24903 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
24904 -mno-relax is present.
24905 * config/riscv/linux.h (LINK_SPEC): Ditto.
24907 2018-04-20 Martin Sebor <msebor@redhat.com>
24910 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
24912 (gimple_fold_builtin_stxcpy_chk): Same.
24913 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
24915 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
24918 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
24919 __powikf2 when long double is IEEE 128-bit.
24921 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
24923 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
24924 step to make sure stack always aligned.
24926 2018-04-20 Carl Love <cel@us.ibm.com>
24929 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
24930 size check for arg0.
24932 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
24933 Tom de Vries <tom@codesourcery.com>
24936 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
24937 Emit insns for calls too.
24938 (nvptx_find_par): Always look for worker-level predecessor insn.
24939 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
24941 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
24942 (nvptx_process_pars): Propagate frames for calls.
24944 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
24947 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
24949 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
24950 (ix86_handle_option): Don't handle OPT_mibt.
24951 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
24953 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
24955 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
24956 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
24957 (ix86_target_macros): Define __CET__ with flag_cf_protection
24958 for -fcf-protection.
24959 * config/i386/i386.c (isa2_opts): Remove -mibt.
24960 * config/i386/i386.h (TARGET_IBT): Removed.
24961 (TARGET_IBT_P): Likewise.
24962 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
24963 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
24964 * config/i386/i386.opt (mcet): Update help message.
24965 (mshstk): Likewise.
24967 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
24968 -mcet as an alias for -mshstk.
24970 2018-04-20 Richard Biener <rguenther@suse.de>
24972 PR middle-end/85475
24973 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
24974 complexity by forcing a single use of the multiply operand.
24976 2018-04-20 Martin Jambor <mjambor@suse.cz>
24979 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
24980 recursion dependency to only apply to non-clones.
24982 2018-04-20 Martin Jambor <mjambor@suse.cz>
24985 * ipa-cp.c (create_specialized_node): Check that clones of
24986 self-recursive edges exist during IPA-CP.
24988 2018-04-19 Toon Moene <toon@moene.org>
24990 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
24993 2018-04-19 Jakub Jelinek <jakub@redhat.com>
24995 PR tree-optimization/85467
24996 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
24997 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
24998 VECTOR_CST element to type.
25000 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
25003 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
25004 * config/i386/i386.md (builtin_setjmp_setup): Removed.
25005 (builtin_longjmp): Likewise.
25006 (save_stack_nonlocal): New pattern.
25007 (restore_stack_nonlocal): Likewise.
25009 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
25012 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
25013 Replace ASM_OUTPUT_LABEL with fprintf.
25015 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
25018 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
25019 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
25020 * config/i386/i386-c.c (ix86_target_macros_internal): Also
25021 define __IBT__ and __SHSTK__ for -fcf-protection.
25022 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
25024 (ix86_trampoline_init): Likewise.
25025 (x86_output_mi_thunk): Likewise.
25026 (ix86_notrack_prefixed_insn_p): Likewise.
25027 (ix86_option_override_internal): Don't disallow -fcf-protection.
25028 * config/i386/i386.md (rdssp<mode>): Also enable for
25030 (incssp<mode>): Likewise.
25031 (nop_endbr): Likewise.
25032 * config/i386/i386.opt (mcet): Change help message to built-in
25035 (mshstk): Likewise.
25036 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
25037 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
25038 enable CET built-in functions.
25040 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
25042 * common/config/i386/i386-common.c
25043 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
25044 OPTION_MASK_ISA_MOVDIRI_UNSET,
25045 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
25046 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
25047 * config.gcc (movdirintrin.h): New header.
25048 * config/i386/cpuid.h (bit_MOVDIRI,
25049 bit_MOVDIR64B): New bits.
25050 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
25052 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
25053 (VOID, PVOID, PCVOID)): New function types.
25054 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
25055 __builtin_ia32_directstoreu_u64,
25056 __builtin_ia32_movdir64b): New builtins.
25057 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
25058 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
25060 (ix86_valid_target_attribute_inner_p): Ditto.
25061 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
25062 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
25063 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
25064 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
25065 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
25066 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
25067 (movdiri<mode>, movdir64b_<mode>): New.
25068 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
25069 * config/i386/immintrin.h: Include movdirintrin.h.
25070 * config/i386/movdirintrin.h: New file.
25071 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
25073 2018-04-19 Richard Biener <rguenther@suse.de>
25075 PR middle-end/85455
25076 * cfg.c (clear_bb_flags): When loop state says we have
25077 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
25079 2018-04-19 Richard Biener <rguenther@suse.de>
25081 PR tree-optimization/84737
25082 * tree-vect-data-refs.c (vect_copy_ref_info): New function
25083 copying restrict info.
25084 (vect_setup_realignment): Use it.
25085 * tree-vectorizer.h (vect_copy_ref_info): Declare.
25086 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
25087 the first DR to all generated stores.
25088 (vectorizable_load): Likewise for loads.
25090 2018-04-19 Jakub Jelinek <jakub@redhat.com>
25092 PR tree-optimization/85446
25093 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
25094 the integral and pointer types to have the same precision.
25096 * doc/install.texi: Document --disable-cet being the default and
25099 2018-04-18 Martin Liska <mliska@suse.cz>
25101 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
25104 2018-04-18 Martin Liska <mliska@suse.cz>
25107 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
25110 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
25111 arguments if they are comparable.
25113 2018-04-18 Martin Liska <mliska@suse.cz>
25116 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
25119 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
25122 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
25125 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
25126 ENDBR after calling __morestack.
25128 2018-04-18 David Malcolm <dmalcolm@redhat.com>
25131 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
25132 by using gcc_base_ver to generate a gcc_driver_version, and use
25133 it when generating GCC_DRIVER_NAME.
25134 * configure: Regenerate.
25136 2018-04-18 Jakub Jelinek <jakub@redhat.com>
25139 * config.gcc: Obsolete powerpc*-*-*spe*.
25141 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25144 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
25145 (stabstr_D): Change type of unum from unsigned int to
25146 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
25149 2018-04-17 Jim Wilson <jimw@sifive.com>
25152 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
25153 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
25154 Set arg_pointer_offset after using pretend_args_size.
25156 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25158 PR rtl-optimization/85431
25159 * dse.c (record_store): Ignore zero width stores.
25162 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
25163 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
25164 __builtin_stack_restore rather than after it.
25165 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
25166 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
25167 argument instead of virtual_dynamic_stack_rtx.
25169 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
25171 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
25173 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
25174 Add note to error message to explain internal mapping of overloaded
25175 built-in function name to non-overloaded built-in function name.
25176 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
25179 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25182 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
25183 where the inputs overlap with the output.
25185 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25187 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
25188 (=v, v) alternative and explicit "memory" attribute.
25189 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
25190 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
25192 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
25193 "sselog1" type instead of "sselog".
25194 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
25195 "sselog". Remove explicit "memory" attribute.
25196 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
25197 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
25199 (vec_extract_hi_v32hi): Merge all alternatives into one, use
25200 "sselog1" type instead of "sselog". Remove explicit "memory"
25202 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
25203 use "sselog1" type instead of "sselog". Remove explicit "memory"
25205 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
25206 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
25208 (vec_extract_hi_v64qi): Merge all alternatives into one, use
25209 "sselog1" type instead of "sselog". Remove explicit "memory"
25211 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
25212 use "sselog1" type instead of "sselog". Remove explicit "memory"
25216 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
25218 PR middle-end/85414
25219 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
25222 2018-04-17 Martin Jambor <mjambor@suse.cz>
25225 * ipa-cp.c (create_specialized_node): Call
25226 expand_all_artificial_thunks if necessary.
25228 2018-04-17 Martin Liska <mliska@suse.cz>
25231 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
25232 in message, remote space in between '_G' and '('.
25234 2018-04-17 Jakub Jelinek <jakub@redhat.com>
25237 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
25238 avx512f_vmcmp<mode>3<round_saeonly_name>,
25239 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
25240 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
25241 avx512f_rndscale<mode><round_saeonly_name>,
25242 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
25243 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
25244 Use %<iptr>2 instead of %2 for -masm=intel.
25245 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
25246 avx512f_vcvttss2usi<round_saeonly_name>,
25247 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
25249 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
25250 avx512f_vcvttsd2usi<round_saeonly_name>,
25251 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
25252 Use %q1 instead of %1 for -masm=intel.
25253 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
25254 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
25255 of %3 for -masm=intel.
25256 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
25258 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
25260 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
25262 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
25263 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
25265 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
25267 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
25268 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
25269 %g1 and one with %0 and %1.
25270 (avx512er_vmrcp28<mode><round_saeonly_name>,
25271 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
25272 %1 for -masm=intel.
25273 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
25274 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
25275 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
25276 of %0 and %{%4%} for -masm=intel.
25277 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
25278 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
25279 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
25280 order of %0 and %{%5%}%{z%} for -masm=intel.
25282 2018-04-17 Jan Hubicka <jh@suse.cz>
25285 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
25287 2018-04-17 Martin Liska <mliska@suse.cz>
25290 * multiple_target.c (create_dispatcher_calls): Set apostrophes
25291 for target_clone error message. Make default implementation
25292 clone to be a local declaration.
25293 (separate_attrs): Add new argument and check for an empty
25295 (expand_target_clones): Handle it.
25296 (ipa_target_clone): Make redirection just for target_clones
25299 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
25300 Tom de Vries <tom@codesourcery.com>
25302 PR middle-end/84955
25303 * omp-expand.c (expand_oacc_for): Add dummy false branch for
25304 tiled basic blocks without omp continue statements.
25306 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
25309 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
25310 vec_extract expression as having side effects to make sure it gets
25313 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
25316 * config/i386/i386.c (get_builtin_code_for_version): Check
25319 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
25322 * config.gcc: Support "skylake".
25323 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
25325 * config/i386/i386.c (m_SKYLAKE): Define.
25326 (processor_target_table): Add "skylake".
25327 (ix86_option_override_internal): Add "skylake".
25328 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
25329 PROCESSOR_CANNONLAKE.
25330 (get_builtin_code_for_version): Fix priority for
25331 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
25332 PROCESSOR_SKYLAKE-AVX512.
25333 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
25334 (processor_type): Add PROCESSOR_SKYLAKE.
25336 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
25337 Jason Merrill <jason@redhat.com>
25340 * convert.c (convert_to_integer_1): Use direct recursion for
25341 enumeral types and types with a precision less than the number
25342 of bits in their mode.
25344 2018-04-16 Julia Koval <julia.koval@intel.com>
25347 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
25348 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
25350 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
25353 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
25354 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
25355 and -mno-direct-move.
25357 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
25360 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
25361 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
25362 Ensure negative shifts result in {0}.
25364 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
25366 PR rtl-optimization/79916
25367 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
25368 regs (if any) to define how to gnerate SD moves when LRA is in
25371 2018-04-13 Jakub Jelinek <jakub@redhat.com>
25373 PR rtl-optimization/85393
25374 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
25375 * except.c (expand_dw2_landing_pad_for_region): Make static.
25376 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
25377 a label and unconditional jump to old_bb, rather than
25378 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
25381 PR rtl-optimization/85376
25382 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
25383 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
25384 instead of a specific value.
25386 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
25387 Bin Cheng <bin.cheng@arm.com>
25389 PR tree-optimization/82965
25390 PR tree-optimization/83991
25391 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
25392 by_profile_only parameter.
25393 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
25394 information if the loop was predicted to iterate too many times.
25395 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
25397 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
25400 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
25403 2018-04-13 Martin Liska <mliska@suse.cz>
25404 Jakub Jelinek <jakub@redhat.com>
25406 PR middle-end/81657
25407 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
25408 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
25409 * builtins.c (expand_builtin_memory_copy_args): Use
25410 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
25411 handle dest_addr == pc_rtx.
25413 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
25416 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
25417 asked to not generate direct moves.
25418 (fix_trunc<mode>si2_stfiwx): Similar.
25419 (fix_trunc<mode>si2_internal): Similar.
25421 2018-04-12 Jakub Jelinek <jakub@redhat.com>
25424 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
25425 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
25426 lookup if dest in some wider mode is known to be const0_rtx and
25427 if so, record permanent equivalence for it to be ZERO_EXTEND of
25428 the narrower mode destination.
25430 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
25432 * lto-streamer-out.c (output_function): Revert 259346.
25433 * omp-expand.c (expand_oacc_for): Likewise.
25435 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
25437 PR rtl-optimization/85354
25438 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
25439 * sel-sched.c (sel_global_init): ... here.
25441 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
25444 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
25445 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
25446 mode for PE-COFF targets.
25447 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
25448 (i386_pe_asm_lto_end): Likewise.
25449 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
25450 (TARGET_ASM_LTO_END): Likewise.
25451 * config/i386/winnt.c (saved_debug_info_level): New static variable.
25452 (i386_pe_asm_lto_start): New function.
25453 (i386_pe_asm_lto_end): Likewise.
25455 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
25456 Richard Biener <rguenther@suse.de>
25458 PR middle-end/84955
25459 * lto-streamer-out.c (output_function): Fix CFG loop state before
25461 * omp-expand.c (expand_oacc_for): Handle calls to internal
25462 functions like regular functions.
25464 2018-04-12 Richard Biener <rguenther@suse.de>
25467 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
25468 for the early LTO debug to properly generate references to it
25469 during DIE emission. Do not re-use that for the skeleton for
25471 (dwarf2out_early_finish): Likewise.
25473 2018-04-12 Jakub Jelinek <jakub@redhat.com>
25476 * config/i386/sse.md
25477 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
25478 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
25479 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
25480 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
25481 and output is a reg, avoid creating invalid lowpart subreg, but
25482 instead split into a 512-bit move. Don't split if not AVX512VL,
25483 input is xmm16+ reg and output is a mem.
25484 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
25485 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
25486 xmm16+ reg and output is a mem.
25488 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25490 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
25491 also for flag_dwarf2_cfi_asm.
25493 2018-04-12 Jakub Jelinek <jakub@redhat.com>
25495 PR rtl-optimization/85342
25496 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
25497 a bool scalar var inside of the loop instead. Don't try to update
25498 recog_data.operand after failed apply_change_group.
25500 2018-04-12 Tom de Vries <tom@codesourcery.com>
25503 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
25504 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
25505 array with flexible array member as array without given dimension.
25506 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
25507 argument for undefined param to true.
25509 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
25512 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
25513 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
25514 from PowerPC section.
25515 * config/rs6000/sysv4.opt (mcall-): Improve help text.
25516 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
25517 help text that is too long.
25518 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
25519 help text that is too long.
25520 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
25521 help text that is too long.
25523 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
25525 * config/alpha/alpha.md (stack_probe_internal): Rename
25526 from "probe_stack". Update all callers.
25528 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
25530 PR rtl-optimization/84566
25531 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
25532 sched_macro_fuse_insns.
25534 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
25537 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
25538 (compute_block_dependences): ... from here.
25540 2018-04-11 Jakub Jelinek <jakub@redhat.com>
25542 PR tree-optimization/85331
25543 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
25544 from int to HOST_WIDE_INT.
25546 2018-04-11 Martin Jambor <mjambor@suse.cz>
25549 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
25550 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
25551 not the same as the source val.
25552 (cgraph_edge_brings_value_p): New parameter.
25553 (gather_edges_for_value): Pass destination value to
25554 cgraph_edge_brings_value_p.
25555 (perhaps_add_new_callers): Likewise.
25556 (get_info_about_necessary_edges): Likewise and exclude values brought
25557 only by self-recursive edges.
25558 (create_specialized_node): Redirect only clones of self-calling edges.
25559 (+self_recursive_pass_through_p): New function.
25560 (find_more_scalar_values_for_callers_subset): Use it.
25561 (find_aggregate_values_for_callers_subset): Likewise.
25562 (known_aggs_to_agg_replacement_list): Removed.
25563 (decide_whether_version_node): Re-calculate known constants for all
25564 remaining context clones.
25566 2018-04-11 Richard Biener <rguenther@suse.de>
25569 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
25570 from early DWARF output.
25571 (dwarf2out_early_finish): Output line info unconditionally into
25572 early DWARF and add reference to it.
25574 2018-04-11 Jakub Jelinek <jakub@redhat.com>
25577 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
25578 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
25579 other than V2DFmode using iptr mode attribute.
25580 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
25582 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
25584 PR rtl-optimization/84659
25585 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
25587 2018-04-11 Jakub Jelinek <jakub@redhat.com>
25590 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
25592 (output_loc_list): Pass address of a dummy size variable even in the
25593 locview handling loop.
25594 (index_location_lists): Add comment on why skip_loc_list_entry can't
25597 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
25600 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
25603 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
25606 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
25607 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
25608 and -mstring-compare-inline-limit.
25610 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
25613 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
25614 for stack clash protection in a register whenever we need it to be in
25617 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
25619 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
25620 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
25622 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
25625 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
25627 (mlong-double-): Ditto.
25628 * config/rs6000/sysv4.opt (msdata=): Ditto.
25629 (mtls-size=): Ditto.
25631 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
25633 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
25634 erroneous entries for
25635 "vector int vec_ldl (int, long int *)", and
25636 "vector unsigned int vec_ldl (int, unsigned long int *)".
25637 Add comments and entries for
25638 "vector bool char vec_ldl (int, bool char *)",
25639 "vector bool short vec_ldl (int, bool short *)",
25640 "vector bool int vec_ldl (int, bool int *)",
25641 "vector bool long long vec_ldl (int, bool long long *)",
25642 "vector pixel vec_ldl (int, pixel *)",
25643 "vector long long vec_ldl (int, long long *)",
25644 "vector unsigned long long vec_ldl (int, unsigned long long *)".
25645 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
25646 type tree bool_long_long_type_node and correct definition of
25647 bool_V2DI_type_node to make reference to this new type tree.
25648 (rs6000_mangle_type): Replace erroneous reference to
25649 bool_long_type_node with bool_long_long_type_node.
25650 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
25651 comments to emphasize sign distinctions for char and int types and
25652 replace RS6000_BTI_bool_long constant with
25653 RS6000_BTI_bool_long_long constant. Also add comment to restrict
25654 use of RS6000_BTI_pixel.
25655 (bool_long_type_node): Remove this macro definition.
25656 (bool_long_long_type_node): New macro definition
25658 2018-04-10 Jakub Jelinek <jakub@redhat.com>
25660 PR rtl-optimization/85300
25661 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
25662 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
25663 simplify_unary_operation fails.
25665 2018-04-10 Martin Liska <mliska@suse.cz>
25667 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
25668 cgraph_edge and ipa_ref.
25670 2018-04-10 Jakub Jelinek <jakub@redhat.com>
25674 * config/i386/sse.md
25675 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
25676 computation of the VEC_MERGE selector from mask.
25677 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
25678 Fix decoding of the VEC_MERGE selector into mask.
25680 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
25682 PR tree-optimization/85286
25683 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
25685 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
25687 * final.c (final_1): Set insn_last_address as well as
25688 insn_current_address.
25690 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25693 * explow.c (emit_stack_probe): Call validize_mem on memory location
25694 before passing it to gen_probe_stack. Create address operand and
25695 legitimize it for the probe_stack_address case.
25697 2018-04-09 Jan Hubicka <jh@suse.cz>
25700 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
25701 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
25702 * tree.c (free_lang_data_in_type): Fix handling of binfos;
25704 (free_lang_data): Rebuild type inheritance graph.
25706 2018-04-09 Martin Sebor <msebor@redhat.com>
25708 * invoke.texi (-finline-small-functions): Mention other optimization
25710 (-findirect-inlining, -fpartial-inlining): Same.
25711 (-finline-functions-called-once): Same.
25712 (-freorder-blocks-and-partition): Same.
25714 2018-04-09 Jan Hubicka <jh@suse.cz>
25717 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
25718 jumps; choose last target that matches the criteria (i.e.
25719 no partition changes for non-crossing jumps).
25720 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
25721 support for redirecting crossing jumps to non-crossing.
25723 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
25725 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
25726 also for naked functions.
25728 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
25730 * config/arc/arc.md (add_shift): New pattern.
25731 (add_shift2): Likewise.
25732 (sub_shift): Likewise.
25733 (sub_shift_cmp0_noout): Likewise.
25734 (compare_si_ashiftsi): Likewise.
25735 (xbfu_cmp0_noout): New combine pattern.
25736 (xbfu_cmp0"): Likewise.
25737 (movsi_set_cc_insn): Place the predicable variant first.
25738 (commutative_binary_cmp0_noout): Remove clobber.
25739 (commutative_binary_cmp0): New pattern.
25740 (noncommutative_binary_cmp0): Likewise.
25741 (noncommutative_binary_cmp0_noout): Likewise.
25742 (noncommutative_binary_comparison_result_used): Removed.
25743 (rsub_cmp0): New pattern.
25744 (rsub_cmp0_noout): Likewise.
25745 (extzvsi): Changed, keep only meaningful variants.
25746 (SQH, SEZ): New iterators.
25747 (SQH_postfix): New mode attribute.
25748 (SEZ_prefix): New code attribute.
25749 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
25750 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
25751 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
25752 of numerical value.
25753 (noncommutative_operator): Check the availability of barrel
25756 2018-04-09 Richard Biener <rguenther@suse.de>
25758 PR tree-optimization/85284
25759 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
25760 Only use the niter constraining form of simple_iv when the exit
25761 is always executed.
25763 2018-04-09 Tom de Vries <tom@codesourcery.com>
25766 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
25767 (define_expand "*memory_barrier"): New define_expand.
25768 (define_insn "memory_barrier"): New insn.
25770 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25772 PR rtl-optimization/80463
25773 PR rtl-optimization/83972
25774 PR rtl-optimization/83480
25776 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
25777 correct producer for the insn.
25778 (tidy_control_flow): Fixup seqnos in case of debug insns.
25780 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25782 PR rtl-optimization/83913
25784 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
25785 different sched-times when merging exprs.
25787 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25789 PR rtl-optimization/83962
25791 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
25792 tidy_fallthru_edge and tidy_control_flow.
25794 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
25796 PR rtl-optimization/83530
25798 * sel-sched.c (force_next_insn): New global variable.
25799 (remove_insn_for_debug): When force_next_insn is true, also leave only
25800 next insn in the ready list.
25801 (sel_sched_region): When the region wasn't scheduled, make another pass
25802 over it with force_next_insn set to 1.
25804 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
25806 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
25808 * config/nds32/constants.md (unspec_volatile_element): Add enum values
25809 for interrupt control.
25810 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
25811 functions for interrupt control.
25812 * config/nds32/nds32-intrinsic.md: Likewise.
25813 * config/nds32/nds32_intrinsic.h: Likewise.
25814 * config/nds32/nds32.h (nds32_builtins): Likewise.
25816 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
25818 * config/nds32/nds32.c (nds32_init_machine_status,
25819 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
25820 strict_aligned_p field.
25821 (nds32_expand_to_rtl_hook): New function.
25822 (TARGET_EXPAND_TO_RTL_HOOK): Define.
25823 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
25825 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25826 Chung-Ju Wu <jasonwucj@gmail.com>
25828 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
25829 * config/nds32/nds32-n7.md: New file.
25830 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
25831 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
25833 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
25834 * config/nds32/nds32.md (pipeline_model): Add n7.
25835 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
25836 * config/nds32/pipelines.md: Include n7 settings.
25838 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25839 Chung-Ju Wu <jasonwucj@gmail.com>
25841 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
25842 * config/nds32/nds32-e8.md: New file.
25843 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
25844 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
25846 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
25847 * config/nds32/nds32.md (pipeline_model): Add e8.
25848 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
25849 * config/nds32/pipelines.md: Include e8 settings.
25851 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25852 Chung-Ju Wu <jasonwucj@gmail.com>
25854 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
25855 * config/nds32/nds32-n8.md: New file.
25856 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
25857 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
25859 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
25860 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
25861 * config/nds32/nds32.md (pipeline_model): Add n8.
25862 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
25863 * config/nds32/pipelines.md: Include n8 settings.
25865 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
25866 Chung-Ju Wu <jasonwucj@gmail.com>
25868 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
25869 * config/nds32/nds32-n9-2r1w.md: New file.
25870 * config/nds32/nds32-n9-3r2w.md: New file.
25871 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
25872 nds32_register_ports): New or modify for cpu n9.
25873 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
25875 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
25876 * config/nds32/nds32-utils.c: New file.
25877 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
25878 TARGET_MUL_SLOW): Define.
25879 * config/nds32/nds32.md (pipeline_model): New attribute.
25880 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
25881 New options that support cpu n9.
25882 * config/nds32/pipelines.md: Include n9 settings.
25883 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
25885 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
25887 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
25888 information if necessary.
25889 (output_cond_branch_compare_zero): Likewise.
25890 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
25891 (nds32_target_alignment): Refine for alignment.
25892 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
25893 (FUNCTION_BOUNDARY): Modify.
25894 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
25896 * config/nds32/nds32.opt (malways-align, malign-functions): New.
25898 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
25900 * config/nds32/constants.md (unspec_volatile_element): Add values for
25901 TLB operation and data prefetch.
25902 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
25903 functions for TLB operation and data prefetch.
25904 * config/nds32/nds32-intrinsic.md: Likewise.
25905 * config/nds32/nds32_intrinsic.h: Likewise.
25906 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
25907 (nds32_print_operand): Likewise.
25908 * config/nds32/nds32.h (nds32_builtins): Likewise.
25910 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
25911 Andrew Pinski <pinsika@gcc.gnu.org>
25913 PR middle-end/82976
25914 * match.pd: Use constant_boolean_node of correct type instead of
25915 boolean_true_node or boolean_false_node for simplifying
25916 pointer comparisons to zero.
25918 2018-04-07 Jakub Jelinek <jakub@redhat.com>
25920 PR tree-optimization/80021
25921 * tree.c (verify_type_variant): Make error call in verify_variant_match
25922 translatable and remove final full stop.
25924 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
25926 * config/nds32/constants.md (unspec_volatile_element): Add
25927 UNSPEC_VOLATILE_EH_RETURN.
25928 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
25929 nds32_output_stack_pop): Support dwarf exception handling process.
25930 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
25931 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
25932 exception handling process.
25933 (nds32_compute_stack_frame): Likewise.
25934 (nds32_return_addr_rtx): Likewise.
25935 (nds32_initial_elimination_offset): Likewise.
25936 (nds32_expand_prologue): Likewise.
25937 (nds32_expand_epilogue): Likewise.
25938 (nds32_dynamic_chain_address): New function.
25939 * config/nds32/nds32.h (machine_function): Add fields for dwarf
25940 exception handling.
25941 (DYNAMIC_CHAIN_ADDRESS): Define.
25942 (EH_RETURN_DATA_REGNO): Define.
25943 (EH_RETURN_STACKADJ_RTX): Define.
25944 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
25945 patterns for dwarf exception handling.
25947 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
25949 * config/nds32/nds32.h: Clean up obsolete macros.
25951 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
25953 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
25954 Add enum values for particular instructions.
25955 * config/nds32/nds32-intrinsic.c: Implementation of expanding
25956 particular intrinsic functions.
25957 * config/nds32/nds32-intrinsic.md: Likewise.
25958 * config/nds32/nds32_intrinsic.h: Likewise.
25959 * config/nds32/nds32.h (nds32_builtins): Likewise.
25960 * config/nds32/nds32.md (type): Add pbsad and pbsada.
25961 (btst, ave): New patterns for particular instructions.
25963 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
25965 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
25966 Add enum values for atomic load/store and memory sync.
25967 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
25969 * config/nds32/nds32-intrinsic.md: Likewise.
25970 * config/nds32/nds32_intrinsic.h: Likewise.
25971 * config/nds32/nds32.h (nds32_builtins): Likewise.
25973 2018-04-07 Jakub Jelinek <jakub@redhat.com>
25975 PR tree-optimization/85257
25976 * fold-const.c (native_encode_vector): If not all elts could fit
25977 and off is -1, return 0 rather than offset.
25978 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
25979 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
25980 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
25981 adjust buffer in native_interpret_expr call.
25983 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
25985 * config/nds32/constants.md (unspec_volatile_element): Add cache
25986 control enum values.
25987 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
25988 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
25989 * config/nds32/nds32.c (nds32_cctl_names): New.
25990 (nds32_print_operand): Handle cache control register names.
25991 * config/nds32/nds32.h (nds32_builtins): New enum values.
25992 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
25994 * config/nds32/nds32.md (type): Add mmu.
25995 * config/nds32/pipelines.md (simple_insn): Add mmu.
25997 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
25999 * config/nds32/nds32.md (type): Remove call.
26000 * config/nds32/pipelines.md (simple_insn): Likewise.
26002 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
26004 * config/nds32/constants.md (unspec_volatile_element): Add
26005 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
26006 UNSPEC_VOLATILE_FMFCFG.
26007 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
26008 description for fmfcfg and fmfcsr.
26009 (bdesc_1arg): Add fmtcsr.
26010 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
26011 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
26012 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
26013 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
26014 unspec_fmfcfg): New patterns.
26015 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
26016 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
26017 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
26018 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
26019 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
26020 __nds32__fmfcfg): Define.
26022 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
26024 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
26025 intrinsic register names.
26026 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
26027 intrinsic register enum values and macros.
26029 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
26031 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
26032 for load/store addressing form.
26033 (nds32_print_operand_address): Likewise.
26035 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
26038 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
26039 based on LABEL_REF. Remove useless assertion.
26040 (pic_address_needs_scratch): Fix formatting.
26041 (sparc_legitimize_pic_address): Minor tweaks.
26042 (sparc_delegitimize_address): Adjust assertion accordingly.
26043 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
26044 into symbolic_operand.
26045 (movsi_high_pic_label_ref): Likewise.
26046 (movsi_lo_sum_pic_label_ref): Likewise.
26047 (movdi_pic_label_ref): Likewise.
26048 (movdi_high_pic_label_ref): Likewise.
26049 (movdi_lo_sum_pic_label_ref): Likewise.
26051 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
26053 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
26054 custom LIB_SPEC setup.
26056 2018-04-06 Ruslan Bukin <br@bsdpad.com>
26057 Kito Cheng <kito.cheng@gmail.com>
26059 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
26060 * config/riscv/freebsd.h: New.
26062 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
26064 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
26065 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
26068 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
26069 Kito Cheng <kito.cheng@gmail.com>
26071 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
26072 nds32_output_call, nds32_symbol_binds_local_p): New functions.
26073 * config/nds32/nds32-protos.h (nds32_output_call,
26074 nds32_output_return): Declare.
26075 * config/nds32/nds32.md: Refine all the call and return patterns.
26077 2018-04-06 Jakub Jelinek <jakub@redhat.com>
26080 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
26081 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
26083 PR rtl-optimization/84872
26084 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
26085 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
26086 EDGE_CROSSING edge.
26088 2018-04-06 Tamar Christina <tamar.christina@arm.com>
26090 * expr.c (copy_blkmode_to_reg): Revert 254862.
26091 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
26093 2018-04-06 Richard Biener <rguenther@suse.de>
26095 PR middle-end/85244
26096 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
26097 after seeing a component reference with an adjacent field. Treat
26098 refs to arrays at struct end of external decls similar to
26099 refs to unconstrained commons.
26101 2018-04-06 Jakub Jelinek <jakub@redhat.com>
26104 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
26105 look through SAVE_EXPRs with non-side-effects argument. Adjust
26107 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
26110 2018-04-06 Richard Biener <rguenther@suse.de>
26112 PR middle-end/85180
26113 * alias.c (find_base_term): New wrapper around find_base_term
26114 unwinding CSELIB_VAL_PTR changes.
26115 (find_base_term): Do not restore CSELIB_VAL_PTR during the
26118 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26120 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
26122 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
26123 constant definitions.
26124 ("nop"): lr 0,0 -> nopr r0
26125 ("nop_lr0", "nop_lr1"): New insn definitions.
26127 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
26129 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
26130 NDS32_V3PUSH_AVAILABLE_P macro.
26132 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
26133 Chung-Ju Wu <jasonwucj@gmail.com>
26135 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
26136 (nds32*-*-*): Add float and fpu_config into supported_defaults.
26137 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
26138 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
26139 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
26140 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
26141 * config/nds32/constraints.md: New constraints and checking for hard
26142 float configuration.
26143 * config/nds32/iterators.md: New mode iterator and attribute for hard
26144 float configuration.
26145 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
26147 * config/nds32/nds32-fpu.md: New file.
26148 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
26149 deal with hard float code generation.
26150 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
26152 (abi_type, float_reg_number): New enum type.
26153 * config/nds32/nds32-predicates.c: New predicates for hard float.
26154 * config/nds32/nds32-protos.h: Declare functions for hard float.
26155 * config/nds32/nds32.c: Implementation for hard float configuration.
26156 * config/nds32/nds32.h: Definitions for hard float configuration.
26157 * config/nds32/nds32.md: Include hard float machine description and
26158 modify patterns for hard float configuration.
26159 * config/nds32/nds32.opt: New options for hard float configuration.
26160 * config/nds32/predicates.md: New predicates for hard float
26163 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
26165 * common/config/nds32/nds32-common.c
26166 (nds32_option_optimization_table): Enable -mreleax-hint by default.
26168 2018-04-05 Jakub Jelinek <jakub@redhat.com>
26170 PR middle-end/85195
26171 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
26172 CONSTRUCTOR_ELT (ctor, ...)->value.
26174 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
26177 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
26179 2018-04-05 Tom de Vries <tom@codesourcery.com>
26182 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
26185 2018-04-05 Shiva Chen <shiva0217@gmail.com>
26186 Kito Cheng <kito.cheng@gmail.com>
26188 * config/nds32/constraints.md (U33): Fine-tune checking condition.
26189 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
26190 * config/nds32/nds32.h (nds32_16bit_address_type): Add
26191 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
26193 2018-04-05 Shiva Chen <shiva0217@gmail.com>
26194 Kito Cheng <kito.cheng@gmail.com>
26196 * config/nds32/constraints.md (Ufe): New memory constraint.
26197 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
26198 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
26199 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
26201 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
26202 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
26204 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26206 * config/nds32/nds32.md: Use optimize_size in the condition for
26207 alu-shift instructions.
26209 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26211 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
26213 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26215 * config/nds32/nds32.md (negsi2): Refine pattern.
26217 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
26218 Chung-Ju Wu <jasonwucj@gmail.com>
26220 * config/nds32/iterators.md (shift_rotate): New code iterator.
26221 (shift): New code attribute.
26222 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
26223 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
26224 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
26225 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
26226 bit-wise operations.
26227 (andsi3, *andsi3): Ditto.
26228 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
26229 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
26230 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
26231 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
26232 nds32_ior_operand, nds32_xor_operand): New predicates.
26234 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26236 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
26237 (addsi3, subsi3): ... this.
26239 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26241 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
26243 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26245 * config/nds32/nds32.md: Adjust indention.
26247 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
26249 * config/nds32/nds32.md (feature): New attribute.
26251 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
26253 * config/nds32/nds32.md (subtype): New attribute.
26255 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
26258 * config/arm/arm-builtins.c (arm_expand_builtin): Change
26259 expansion to perform a bitwise AND of the argument followed by a
26260 boolean negation of the result.
26262 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
26264 PR rtl-optimization/84878
26265 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
26266 the basic block. Assert the use reference is not artificial and that
26267 it has an associated insn.
26269 2018-04-04 Michael Matz <matz@suse.de>
26271 * builtins.c (compute_objsize): Pass correct operand
26272 to array_at_struct_end_p.
26274 2018-04-04 Richard Biener <rguenther@suse.de>
26277 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
26278 from contexts for DINFO_LEVEL_TERSE and below.
26280 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
26282 * config/nds32/nds32-doubleword.md (move_<mode>): Require
26283 resiter_operand condition.
26284 * config/nds32/nds32.md (*move<mode>): Ditto.
26286 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
26287 Monk Chiang <sh.chiang04@gmail.com>
26289 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
26291 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26293 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
26295 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26296 Kito Cheng <kito.cheng@gmail.com>
26298 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
26299 nds32_cond_code_str, output_cond_branch,
26300 output_cond_branch_compare_zero, nds32_expand_cbranch,
26301 nds32_expand_cstore, nds32_expand_movcc,
26302 nds32_output_cbranchsi4_equality_zero,
26303 nds32_output_cbranchsi4_equality_reg,
26304 nds32_output_cbranchsi4_equality_reg_or_const_int,
26305 nds32_output_cbranchsi4_greater_less_zero: New functions.
26306 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
26307 nds32_expand_cstore, nds32_expand_movcc,
26308 nds32_output_cbranchsi4_equality_zero,
26309 nds32_output_cbranchsi4_equality_reg,
26310 nds32_output_cbranchsi4_equality_reg_or_const_int,
26311 nds32_output_cbranchsi4_greater_less_zero): Declare.
26312 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
26313 nds32_rimm11s_operand): New predicates.
26314 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
26315 * config/nds32/nds32.md: Rewrite all the branch and conditional move
26318 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
26320 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
26321 * config/nds32/nds32.md: Ditto.
26322 * config/nds32/pipelines.md: Ditto.
26324 2018-04-04 Richard Biener <rguenther@suse.de>
26326 PR tree-optimization/85168
26327 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
26328 propagating abnormals.
26330 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26332 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
26334 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
26335 Kito Cheng <kito.cheng@gmail.com>
26337 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
26338 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
26339 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
26340 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
26341 * config/nds32/nds32.md (sibcall_internal): New.
26342 (sibcall_register): Remove.
26343 (sibcall_immediate): Remove.
26344 (sibcall_value_internal): New.
26345 (sibcall_value_register): Remove.
26346 (sibcall_value_immediate): Remove.
26347 * config/nds32/predicates.md (nds32_general_register_operand): New.
26348 (nds32_call_address_operand): New.
26350 2018-04-03 Jakub Jelinek <jakub@redhat.com>
26352 PR rtl-optimization/85167
26353 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
26354 bb_defs if *split_p, instead preinitialize it to NULL.
26356 PR tree-optimization/85156
26357 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
26358 evaluating the argument multiple times.
26360 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
26362 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
26364 (_mm_cvtpd_ps): Likewise.
26365 (_mm_cvttpd_epi32): Likewise.
26366 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
26367 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
26368 vector, pixel, and bool following altivec.h include.
26370 2018-04-03 Martin Sebor <msebor@redhat.com>
26372 * doc/extend.texi (Common Function Attributes): Clarify.
26373 (const attribute): Likewise.
26374 (pure attribute): Likewise.
26376 2018-04-03 Jakub Jelinek <jakub@redhat.com>
26379 * config/i386/i386.c (ix86_expand_vector_set): Use
26380 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
26382 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
26384 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
26385 instructions when changing rounding bits to preserve precision bits
26386 in the x87 control word.
26388 2018-04-03 Martin Liska <mliska@suse.cz>
26390 PR tree-optimization/82491
26391 * rtl.h (strip_offset_and_add): Replace += suboffset with
26392 poly_uint64 () + suboffset.
26394 2018-03-29 Martin Liska <mliska@suse.cz>
26395 Martin Jambor <mjambor@suse.cz>
26398 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
26399 param_type is not an integral or pointer type.
26401 2018-04-03 Richard Biener <rguenther@suse.de>
26403 * sese.h (recompute_all_dominators): Remove.
26405 2018-04-02 Martin Sebor <msebor@redhat.com>
26407 * doc/invoke.texi (-Wrestrict): Fix typos.
26409 2018-04-02 Jim Wilson <jimw@sifive.com>
26411 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
26412 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
26413 (<optab>di3, <optab>si3_extend): Likewise.
26414 (<optab>si3_mask, <optab>si3_mask_1): New.
26415 (<optab>di3_mask, <optab>di3_mask_1): New.
26416 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
26417 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
26418 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
26420 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
26422 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
26425 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
26427 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
26428 (nds32_canonicalize_comparison): New function.
26430 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
26431 Kito Cheng <kito.cheng@gmail.com>
26432 Kuan-Lin Chen <kuanlinchentw@gmail.com>
26434 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
26435 * config/nds32/constants.md (unspec_volatile_element): Add
26436 UNSPEC_VOLATILE_RELAX_GROUP.
26437 * config/nds32/nds32-relax-opt.c: New file.
26438 * config/nds32/nds32-predicates.c
26439 (nds32_symbol_load_store_p): New function.
26440 * config/nds32/nds32-protos.h
26441 (nds32_symbol_load_store_p): Declare function.
26442 (make_pass_nds32_relax_opt): Declare new rtl pass function.
26443 * config/nds32/nds32.c
26444 (nds32_register_pass): New function to register pass.
26445 (nds32_register_passes): New function to register passes.
26446 * config/nds32/nds32.md (relax_group): New pattern.
26447 * config/nds32/nds32.opt (mrelax-hint): New option.
26448 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
26450 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
26452 * config/nds32/t-nds32: Modify files dependency.
26454 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
26456 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
26457 (PROFILE_HOOK): Define its implementation.
26459 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
26461 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
26462 type and 32-bit size.
26464 2018-04-01 Jakub Jelinek <jakub@redhat.com>
26466 PR middle-end/85090
26467 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
26468 (V_128_256): New mode iterator.
26469 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
26470 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
26471 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
26473 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
26474 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
26476 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
26479 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
26480 NaN inputs correctly.
26482 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
26485 * config/rs6000/vsx.md (??r): New mode attribute.
26486 (*vsx_mov<mode>_64bit): Use it.
26487 (*vsx_mov<mode>_32bit): Likewise.
26489 2018-03-30 Martin Sebor <msebor@redhat.com>
26491 PR tree-optimization/84818
26492 * builtins.c (check_access): Use warning_n.
26494 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26497 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
26499 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
26502 2018-03-30 Julia Koval <julia.koval@intel.com>
26505 * x86-tune.def (movx, partial_reg_dependency): Enable for
26508 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
26510 PR inline-asm/84985
26511 * lra-constraints.c (process_alt_operands): Move setting
26512 this_alternative_matches below.
26514 2018-03-29 Martin Liska <mliska@suse.cz>
26517 * doc/invoke.texi: Document how LTO works with debug info.
26518 Describe auto-load support of binutils. Mention 'x86-64'
26519 as valid option value of -march option.
26521 2018-03-29 Jakub Jelinek <jakub@redhat.com>
26523 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
26526 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
26527 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
26528 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
26531 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
26534 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
26535 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
26536 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
26537 for RS6000_BTM_POWERPC64.
26538 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
26539 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
26540 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
26543 (DIVDEU): Likewise.
26545 2018-03-28 Carl Love <cel@us.ibm.com>
26548 2017-09-27 Carl Love <cel@us.ibm.com>
26550 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
26551 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
26552 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
26555 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26557 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
26558 instead of __vector bool.
26559 (_mm_max_pu8): Likewise.
26560 (_mm_min_pi16): Likewise.
26562 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
26565 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
26566 (DIVWEUO): Likewise.
26567 (DIVDEO): Likewise.
26568 (DIVDEUO): Likewise.
26569 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
26570 DIVWEUO and DIVDEUO.
26571 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
26572 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
26573 (div_extend): Likewise.
26574 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
26576 (__builtin_divweuo): Likewise.
26577 (__builtin_divdeo): Likewise.
26578 (__builtin_divdeuo): Likewise.
26580 2018-03-28 Jakub Jelinek <jakub@redhat.com>
26583 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
26584 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
26586 PR tree-optimization/82004
26587 * gimple-match-head.c (optimize_pow_to_exp): New function.
26588 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
26589 Don't fold to exp if optimize_pow_to_exp is false.
26591 2018-03-28 Martin Liska <mliska@suse.cz>
26594 * calls.c (initialize_argument_information): Fix trailing space.
26595 * common.opt: Fix typo and provide better explanation for
26596 -fsanitize-coverage option.
26597 * config/i386/i386.opt: Fix typo.
26599 2018-03-28 Jakub Jelinek <jakub@redhat.com>
26600 Martin Liska <mliska@suse.cz>
26603 * gimplify.c (asan_poison_variable): Don't do the check for
26604 gimplify_omp_ctxp here.
26605 (gimplify_decl_expr): Do it here.
26606 (gimplify_target_expr): Likewise.
26608 2018-03-28 Martin Liska <mliska@suse.cz>
26611 * config/i386/i386.c (ix86_function_arg_advance): Do not call
26612 chkp_type_bounds_count if MPX is not enabled.
26614 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
26616 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
26618 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
26621 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
26622 function to create the function decl for complex long double
26623 multiply and divide for -mabi=ieeelongdouble.
26624 (init_float128_ieee): Call it.
26626 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
26629 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
26630 -fcf-protection=branch -mibt.
26631 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
26633 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
26636 * config/arm/arm.c (arm_valid_symbolic_address): Handle
26637 arm_word_relocations.
26639 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
26642 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
26643 extern array declarations.
26645 2018-03-27 Richard Biener <rguenther@suse.de>
26647 PR middle-end/84067
26648 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
26649 explicit single_use checks.
26651 2018-03-27 Richard Biener <rguenther@suse.de>
26653 PR tree-optimization/85082
26654 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
26657 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
26659 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
26660 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
26661 Turn on fasynchronous-unwind-tables and funwind-tables.
26663 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
26666 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
26667 (*bmi_blsr_<mode>_ccz): Ditto.
26669 2018-03-26 Tom de Vries <tom@codesourcery.com>
26671 PR tree-optimization/85063
26672 * omp-general.c (offloading_function_p): New function. Factor out
26674 * omp-offload.c (pass_omp_target_link::gate): ... here.
26675 * omp-general.h (offloading_function_p): Declare.
26676 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
26677 with attribute omp declare target for offloading functions.
26679 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
26681 PR tree-optimization/84005
26682 * tree-data-ref.h (get_base_for_alignment): Declare.
26683 * tree-data-ref.c (get_base_for_alignment_1): New function.
26684 (get_base_for_alignment): Likewise.
26685 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
26686 get_base_for_alignment to find a suitable base object, instead
26687 of always using drb->base_address.
26689 2018-03-23 Jakub Jelinek <jakub@redhat.com>
26691 PR inline-asm/85022
26692 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
26693 known size by default.
26695 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
26697 PR inline-asm/85030
26698 * lra-constraints.c (process_alt_operands): Don't match BLKmode
26699 and non BLKmode operands.
26701 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26704 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
26705 Clean up attributes.
26707 2018-03-23 Richard Biener <rguenther@suse.de>
26710 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
26711 we are going to emit early debug for LTO.
26713 2018-03-23 Jakub Jelinek <jakub@redhat.com>
26715 PR inline-asm/85034
26716 * function.c (match_asm_constraints_1): Don't optimize if input
26717 doesn't satisfy general_operand predicate for output's mode.
26719 PR inline-asm/85022
26720 * alias.c (write_dependence_p): Don't require for x_canonicalized
26721 non-VOIDmode if x has VOIDmode.
26724 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
26725 just don't try to optimize it rather than assert it never happens.
26727 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
26729 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
26730 macro expansions for definition of ST_INTERNAL_<mode> and
26731 LD_INTERNAL_<mode> builtins.
26732 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
26734 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
26736 (altivec_expand_st_builtin): Likewise.
26737 (altivec_expand_builtin): Remove calls to deleted functions.
26738 (rs6000_address_for_altivec): Delete this function.
26739 * config/rs6000/vector.md: Remove expands for
26740 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
26742 2018-03-22 Sudakshina Das <sudi.das@arm.com>
26745 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
26746 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
26747 re-computing once computed.
26748 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
26749 (arm_init_machine_status): Initialize
26750 machine->static_chain_stack_bytes.
26752 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
26755 * doc/extend.texi: Add four new prototypes for vec_ld.
26756 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
26757 definitions for more logical presentation.
26758 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
26759 entries for V1TI variants of __builtin_altivec_ld builtin.
26760 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
26761 handling of V1TI variant of LVX icode pattern.
26762 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
26763 (rs6000_gimple_fold_builtin): Likewise.
26764 (altivec_init_builtins): Add code to define
26765 __builtin_altivec_lvx_v1ti function.
26767 2018-03-22 Jakub Jelinek <jakub@redhat.com>
26769 PR inline-asm/84941
26770 * function.c (match_asm_constraints_1): Don't do the optimization
26771 if input isn't a REG, SUBREG, MEM or constant.
26773 2018-03-22 Tom de Vries <tom@codesourcery.com>
26775 PR tree-optimization/84956
26776 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
26777 bb_has_abnormal_pred.
26779 2018-03-22 Jakub Jelinek <jakub@redhat.com>
26782 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
26783 DECL_INITIAL (decl) to decl at the end.
26784 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
26785 adjust the comment.
26787 2018-03-21 Joseph Myers <joseph@codesourcery.com>
26789 * doc/extend.texi (__builtin_tgmath): Document when complex
26790 integer types are treated as _Complex _Float64.
26792 2018-03-21 Tom de Vries <tom@codesourcery.com>
26794 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
26796 2018-03-21 Jakub Jelinek <jakub@redhat.com>
26798 PR tree-optimization/84960
26799 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
26800 if it is ENTRY block, move them into single succ of ENTRY in that case.
26802 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
26804 PR tree-optimization/84811
26805 * poly-int.h (poly_span_traits): Remove the T3 parameter and
26806 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
26807 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
26808 (known_subrange_p): Update accordingly. Cast each value involved
26809 in the size comparison, rather than casting the result of the
26812 2018-03-21 Jakub Jelinek <jakub@redhat.com>
26814 PR tree-optimization/84982
26815 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
26816 by flipping the least significant bit rather than all bits from
26817 bitpos to bitpos + bitsize - 1.
26819 2018-03-21 Nathan Sidwell <nathan@acm.org>
26821 * doc/extend.texi (Deprecated Features): Remove mention of
26822 long-deleted deprecations.
26824 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26827 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
26828 * configure: Regenerate.
26830 2018-03-21 Tom de Vries <tom@codesourcery.com>
26832 PR tree-optimization/83126
26833 * tree-parloops.c (num_phis): New function.
26834 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
26836 2018-03-21 Nathan Sidwell <nathan@acm.org>
26838 * doc/extend.texi (Deprecated Features): Update deprecated flags,
26839 mention anon-struct/union members and trailing attributes.
26841 2018-03-21 Bin Cheng <bin.cheng@arm.com>
26843 PR tree-optimization/84969
26844 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
26845 builtin memset partitions if they set different rhs values.
26847 2018-03-21 Jakub Jelinek <jakub@redhat.com>
26849 PR rtl-optimization/84989
26850 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
26851 VEC_DUPLICATE with scalar result mode.
26853 2018-03-21 Martin Liska <mliska@suse.cz>
26856 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
26857 not intended return statement.
26859 2018-03-21 Martin Liska <mliska@suse.cz>
26862 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
26863 (chkp_find_bound_slots_1): Limit number of iterations.
26865 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
26868 * Minor grammar fixes for x86 options.
26870 2018-03-20 Jakub Jelinek <jakub@redhat.com>
26873 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
26874 holding REG_CFA_RESTORE notes, instead turn them into a USE.
26876 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
26879 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
26880 (altivec_lvx_<mode>_1op): Likewise.
26881 (altivec_stvx_<mode>_2op): Likewise.
26882 (altivec_stvx_<mode>_1op): Likewise.
26883 (altivec_lvx_<VM2:mode>): New define_expand.
26884 (altivec_stvx_<VM2:mode>): Likewise.
26885 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
26886 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
26887 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
26888 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
26889 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
26890 (rs6000_gen_lvx): Likewise.
26891 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
26892 (altivec_expand_stv_builtin): Likewise.
26893 (altivec_expand_builtin): Likewise.
26894 * config/rs6000/vector.md: Likewise.
26896 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26899 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
26902 2018-03-20 Richard Biener <rguenther@suse.de>
26905 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
26906 sign-conversions as zero, fall back to standard scalar_stmt
26909 2018-03-20 Martin Liska <mliska@suse.cz>
26912 * predict.c (rebuild_frequencies): Handle case when we have
26913 PROFILE_ABSENT, but flag_guess_branch_prob is false.
26915 2018-03-20 Jakub Jelinek <jakub@redhat.com>
26918 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
26919 flag_section_anchors.
26920 * varasm.c (use_blocks_for_decl_p): Remove hack for
26921 dw2_force_const_mem.
26924 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
26926 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
26927 be created, use lowpart_subreg of operands[0] rather than operands[0]
26929 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
26930 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
26931 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
26932 and n constraint instead of aarch64_shift_imm_di and Usd.
26933 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
26934 (*aarch64_<optab>_reg_minus<mode>3): ... this.
26936 2018-03-20 Sudakshina Das <sudi.das@arm.com>
26939 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
26940 to favor GPR over NEON registers.
26941 (<shift>di3_neon): Likewise.
26943 2018-03-20 Tom de Vries <tom@codesourcery.com>
26946 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
26947 (nvptx_process_pars): Emit bar.sync asap and alap.
26949 2018-03-20 Tom de Vries <tom@codesourcery.com>
26952 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
26953 seen_label if seen_label is already set.
26955 2018-03-20 Jakub Jelinek <jakub@redhat.com>
26958 * config/i386/i386.c (fold_builtin_cpu): For features above 31
26959 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
26960 Use 1U instead of 1. Formatting fixes.
26963 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
26964 instead of TREE_TYPE (s1) for the return value.
26966 2018-03-19 Jakub Jelinek <jakub@redhat.com>
26968 PR tree-optimization/84946
26969 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
26970 bitsize + bitsize in poly_uint64 rather than poly_int64.
26973 * dwarf2asm.c: Include fold-const.c.
26974 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
26975 of decl rather than decl itself.
26977 PR rtl-optimization/84643
26978 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
26980 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
26983 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
26984 calling assemble_variable.
26986 2018-03-19 Sudakshina Das <sudi.das@arm.com>
26989 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
26990 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
26992 2018-03-19 Jim Wilson <jimw@sifive.com>
26995 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
26996 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
26997 (riscv_first_stack_step): Likewise.
26998 (riscv_option_override): Use STACK_BOUNDARY instead of
26999 MIN_STACK_BOUNDARY.
27000 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
27001 MIN_STACK_BOUNDARY.
27002 (BIGGEST_ALIGNMENT): Set to 128.
27003 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
27004 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
27007 2018-03-19 Richard Biener <rguenther@suse.de>
27009 PR tree-optimization/84933
27010 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
27011 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
27013 2018-03-19 Richard Biener <rguenther@suse.de>
27015 PR tree-optimization/84859
27016 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
27017 (cond_if_else_store_replacement): Perform sinking operation on
27018 single-store BBs regardless of MAX_STORES_TO_SINK setting.
27019 Generalize what a BB with a single eligible store is.
27021 2018-03-19 Richard Biener <rguenther@suse.de>
27023 PR tree-optimization/84929
27024 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
27025 chrec_is_positive against non-chrec arg.
27027 2018-03-19 Tamar Christina <tamar.christina@arm.com>
27030 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
27032 2018-03-18 Martin Liska <mliska@suse.cz>
27034 PR rtl-optimization/84635
27035 * regrename.c (build_def_use): Use matches_mode only when
27038 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
27040 PR tree-optimization/84913
27041 * tree-vect-loop.c (vectorizable_reduction): Don't try to
27042 vectorize chains of COND_EXPRs.
27044 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
27046 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
27048 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
27050 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
27052 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
27054 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
27056 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
27057 Kito Cheng <kito.cheng@gmail.com>
27059 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
27060 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
27061 (nds32_adjust_reg_alloc_order): New function.
27062 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
27064 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
27066 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
27067 nds32_print_operand, nds32_print_operand_address): Use
27068 HOST_WIDE_INT_PRINT_DEC instead.
27070 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
27072 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
27074 2018-03-17 Jakub Jelinek <jakub@redhat.com>
27077 * config/i386/i386.c (initial_ix86_tune_features,
27078 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
27079 unsigned long long.
27080 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
27081 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
27082 rather than 1u << ix86_tune. Formatting fix.
27083 (ix86_option_override_internal): Change ix86_arch_mask from
27084 unsigned int to unsigned HOST_WIDE_INT, initialize to
27085 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
27086 (ix86_function_specific_restore): Likewise.
27088 2018-03-16 Jakub Jelinek <jakub@redhat.com>
27091 * postreload.c (reload_combine_recognize_pattern): Perform
27092 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
27093 truncate_int_for_mode the result for the destination's mode.
27096 * hsa-gen.c (mem_type_for_type): Fix comment typo.
27097 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
27099 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
27102 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
27105 * lra-assigns.c (lra_split_hard_reg_for): Don't use
27106 regno_allocno_class_array and sorted_pseudos.
27107 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
27108 insns where regno is used.
27110 2018-03-16 Martin Liska <mliska@suse.cz>
27113 * multiple_target.c (create_dispatcher_calls): Redirect
27114 reference in the symbol table.
27116 2018-03-16 Martin Liska <mliska@suse.cz>
27119 * multiple_target.c (create_dispatcher_calls): Redirect also
27122 2018-03-16 Jakub Jelinek <jakub@redhat.com>
27126 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
27127 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
27128 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
27130 2018-03-16 Julia Koval <julia.koval@intel.com>
27132 * doc/invoke.texi (Skylake Server): Add CLWB.
27133 Cannonlake): Remove CLWB.
27135 2018-03-16 Jakub Jelinek <jakub@redhat.com>
27137 PR tree-optimization/84841
27138 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
27140 (FLOAT_ONE_CONST_TYPE): Define.
27141 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
27142 (sort_by_operand_rank): Put entries with higher constant_type last
27143 rather than first to match comments.
27145 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
27147 * config/nios2/nios2.md (movsi_internal): Fix thinko in
27150 2018-03-15 Jakub Jelinek <jakub@redhat.com>
27153 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
27154 check and use address of target always.
27156 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
27159 * config/i386/i386.c (indirect_thunk_needed): Update comments.
27160 (indirect_thunk_bnd_needed): Likewise.
27161 (indirect_thunks_used): Likewise.
27162 (indirect_thunks_bnd_used): Likewise.
27163 (indirect_return_needed): New.
27164 (indirect_return_bnd_needed): Likewise.
27165 (output_indirect_thunk_function): Add a bool argument for
27167 (output_indirect_thunk_function): Don't generate alias for
27168 function return thunk.
27169 (ix86_code_end): Call output_indirect_thunk_function to generate
27170 function return thunks.
27171 (ix86_output_function_return): Set indirect_return_bnd_needed
27172 and indirect_return_needed instead of indirect_thunk_bnd_needed
27173 and indirect_thunk_needed.
27175 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
27177 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
27178 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
27179 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
27181 2018-03-15 David Malcolm <dmalcolm@redhat.com>
27182 Paul Hua <paul.hua.gm@gmail.com>
27185 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
27187 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
27189 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
27190 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
27191 resp. SFmode cases.
27193 2018-03-15 Tamar Christina <tamar.christina@arm.com>
27196 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
27197 instead of GET_MODE_SIZE when comparing Units.
27199 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
27202 * varasm.c (hash_section): Return an unchangeble hash value
27203 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
27204 Return !aarch64_can_use_per_function_literal_pools_p ().
27206 2018-03-15 Jakub Jelinek <jakub@redhat.com>
27209 * optabs.c (emit_conditional_move): Pass address of cmode's copy
27210 rather than address of cmode as last argument to prepare_cmp_insn.
27212 2018-03-15 Julia Koval <julia.koval@intel.com>
27214 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
27215 F_AVX512VNNI, F_AVX512BITALG): New.
27217 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
27220 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
27221 insn for floating-point loads and stores.
27223 2018-03-14 Carl Love <cel@us.ibm.com>
27225 * config/rs6000/rs6000-c.c: Add macro definitions for
27226 ALTIVEC_BUILTIN_VEC_PERMXOR.
27227 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
27228 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
27229 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
27230 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
27232 * config/doc/extend.texi: Add prototypes for vec_permxor.
27234 2018-03-14 David Malcolm <dmalcolm@redhat.com>
27237 * diagnostic-show-locus.c (class layout_point): Convert m_line
27238 from int to linenum_type.
27239 (line_span::comparator): Use linenum "compare" function when
27240 comparing line numbers.
27241 (test_line_span): New function.
27242 (layout_range::contains_point): Convert param "row" from int to
27244 (layout_range::intersects_line_p): Likewise.
27245 (layout::will_show_line_p): Likewise.
27246 (layout::print_source_line): Likewise.
27247 (layout::should_print_annotation_line_p): Likewise.
27248 (layout::print_annotation_line): Likewise.
27249 (layout::print_leading_fixits): Likewise.
27250 (layout::annotation_line_showed_range_p): Likewise.
27251 (struct line_corrections): Likewise for field m_row.
27252 (line_corrections::line_corrections): Likewise for param "row".
27253 (layout::print_trailing_fixits): Likewise.
27254 (layout::get_state_at_point): Likewise.
27255 (layout::get_x_bound_for_row): Likewise.
27256 (layout::print_line): Likewise.
27257 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
27258 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
27259 * input.c (selftest::test_linenum_comparisons): New function.
27260 (selftest::input_c_tests): Call it.
27261 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
27262 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
27263 * selftest.h (ASSERT_GT): New macro.
27264 (ASSERT_GT_AT): New macro.
27265 (ASSERT_LT): New macro.
27266 (ASSERT_LT_AT): New macro.
27268 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
27270 PR rtl-optimization/84780
27271 * combine.c (distribute_links): Don't make a link based on pc_rtx.
27273 2018-03-14 Martin Liska <mliska@suse.cz>
27275 * tree.c (record_node_allocation_statistics): Use
27276 get_stats_node_kind.
27277 (get_stats_node_kind): New function extracted from
27278 record_node_allocation_statistics.
27279 (free_node): Use get_stats_node_kind.
27281 2018-03-14 Richard Biener <rguenther@suse.de>
27283 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
27284 that the value-set of ANTIC_IN doesn't grow.
27287 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
27289 (BB_VISITED_WITH_VISITED_SUCCS): New define.
27290 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
27292 2018-03-14 Julia Koval <julia.koval@intel.com>
27294 * config.gcc (icelake-client, icelake-server): New.
27296 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
27297 (initial_ix86_arch_features): Ditto.
27298 (PTA_SKYLAKE): Add SGX.
27299 (PTA_ICELAKE): Remove.
27300 (PTA_ICELAKE_CLIENT): New.
27301 (PTA_ICELAKE_SERVER): New.
27302 (ix86_option_override_internal): Split up icelake on icelake client and
27304 (get_builtin_code_for_version): Ditto.
27305 (fold_builtin_cpu): Ditto.
27306 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
27307 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
27308 * config/i386/i386.h (processor_type): Ditto.
27309 * doc/invoke.texi: Ditto.
27311 2018-03-14 Jakub Jelinek <jakub@redhat.com>
27314 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
27315 INTEGER_CST offset, add it together with bitpos / 8 and
27316 sign extend based on POINTER_SIZE.
27320 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
27323 * config/i386/constraints.md (Yc): New register constraint.
27324 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
27325 Use Yc constraint for alternative 2 of operand 0. Remove
27326 preferred_for_speed attribute.
27328 2018-03-14 Richard Biener <rguenther@suse.de>
27330 PR tree-optimization/84830
27331 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
27332 with the old one to avoid oscillations.
27334 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
27337 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
27339 (assign_by_spills): Return a flag of reload assignment failure.
27340 Do not process the reload assignment failures. Do not spill other
27341 reload pseudos if they has the same reg class. Update n if
27343 (lra_assign): Add a return arg. Set up from the result of
27344 assign_by_spills call.
27345 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
27346 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
27347 usage_insns if it is not NULL.
27348 (spill_hard_reg_in_range): New function.
27349 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
27350 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
27351 function prototypes.
27352 (lra_assign): Change prototype.
27353 * lra.c (lra): Add code to deal with fails by splitting hard reg
27356 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
27358 * config/riscv/riscv.opt (mrelax): New option.
27359 * config/riscv/riscv.c (riscv_file_start): Emit ".option
27360 "norelax" when riscv_mrelax is disabled.
27361 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
27363 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27366 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
27367 reassociation for int modes.
27369 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
27371 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
27372 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
27374 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
27375 * config/aarch64/aarch64-sve.md
27376 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
27377 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
27378 (*extend<mode><Vwide>2): Rename to...
27379 (aarch64_sve_extend<mode><Vwide>2): ...this.
27380 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
27381 renaming the old pattern to...
27382 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
27384 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
27385 define_expand, renaming the old pattern to...
27386 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
27387 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
27388 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
27389 account when deciding which SVE instruction the optab should use.
27390 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
27392 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
27394 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
27395 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
27396 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
27397 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
27398 (tlsdesc_small_<mode>): Turn a define_expand and use
27399 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
27400 (tlsdesc_small_advsimd_<mode>): ...this.
27401 (tlsdesc_small_sve_<mode>): New pattern.
27403 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
27405 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
27406 (UNSPEC_UMUL_HIGHPART): New constants.
27407 (MUL_HIGHPART): New int iteraor.
27408 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
27409 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
27411 (*<su>mul<mode>3_highpart): New define_insn.
27413 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
27416 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
27419 2018-03-13 Martin Liska <mliska@suse.cz>
27422 * (sem_item_optimizer::sem_item_optimizer): Initialize new
27424 (sem_item_optimizer::~sem_item_optimizer): Release it.
27425 (sem_item_optimizer::merge_classes): Register variable aliases.
27426 (sem_item_optimizer::fixup_pt_set): New function.
27427 (sem_item_optimizer::fixup_points_to_sets): Likewise.
27428 * ipa-icf.h: Declare new variables and functions.
27430 2018-03-13 Jakub Jelinek <jakub@redhat.com>
27432 PR middle-end/84834
27433 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
27434 integer_pow2p@2 and test integer_pow2p in condition.
27435 (A < 0 ? C : 0): Similarly for @1.
27437 PR middle-end/84831
27438 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
27439 characters starting at p contain '\0' character, don't look beyond
27443 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
27444 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
27447 * reg-stack.c (change_stack): Change update_end var from int to
27448 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
27449 also call set_block_for_insn on the newly added insns and rescan.
27452 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
27453 on the last operand.
27456 * tree.c (stabilize_reference_1): Return save_expr (e) for
27457 STATEMENT_LIST even if it doesn't have side-effects.
27459 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
27461 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
27463 2018-03-12 Renlin Li <renlin.li@arm.com>
27465 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
27466 aarch64_output_scalar_simd_mov_immediate.
27468 2018-03-12 Martin Sebor <msebor@redhat.com>
27470 PR tree-optimization/83456
27471 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
27472 for perfectly overlapping calls to memcpy.
27473 (gimple_fold_builtin_memory_chk): Same.
27474 (gimple_fold_builtin_strcpy): Handle no-warning.
27475 (gimple_fold_builtin_stxcpy_chk): Same.
27476 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
27478 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
27480 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
27481 parameter. Use it for SFmode.
27482 (rs6000_function_arg_advance_1): Adjust.
27483 (rs6000_function_arg): Adjust.
27484 (rs6000_gimplify_va_arg): Pass false for that new parameter.
27486 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
27488 PR rtl-optimization/84169
27489 PR rtl-optimization/84780
27490 * combine.c (can_combine_p): Check for a 2-insn combination whether
27491 the destination register is used between the two insns, too.
27493 2018-03-12 Richard Biener <rguenther@suse.de>
27495 PR tree-optimization/84803
27496 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
27497 for refs DR analysis didn't process.
27499 2018-03-12 Richard Biener <rguenther@suse.de>
27501 PR tree-optimization/84777
27502 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
27503 force-vectorize loops ignore whether we are optimizing for size.
27505 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
27507 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
27508 (TARGET_MD_ASM_ADJUST): Define.
27510 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
27511 Kito Cheng <kito.cheng@gmail.com>
27512 Chung-Ju Wu <jasonwucj@gmail.com>
27514 * config/nds32/nds32.c (nds32_compute_stack_frame,
27515 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
27516 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
27517 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
27518 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
27519 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
27520 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
27521 * config/nds32/nds32.md (prologue, epilogue): Use macro
27522 NDS32_V3PUSH_AVAILABLE_P to do checking.
27524 2018-03-11 Jakub Jelinek <jakub@redhat.com>
27527 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
27528 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
27529 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
27530 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
27531 addition of most attributes on !orig_type_die or the attribute not
27532 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
27534 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
27535 Chung-Ju Wu <jasonwucj@gmail.com>
27537 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
27538 __NDS32_VH__ macro.
27539 * config/nds32/nds32.opt (mvh): New option.
27541 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
27542 Chung-Ju Wu <jasonwucj@gmail.com>
27544 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
27546 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
27547 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
27550 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
27551 Chung-Ju Wu <jasonwucj@gmail.com>
27553 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
27555 * config/nds32/nds32-multiple.md (strlensi): New pattern.
27556 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
27558 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
27559 Kito Cheng <kito.cheng@gmail.com>
27560 Chung-Ju Wu <jasonwucj@gmail.com>
27562 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
27563 UNSPEC_FFMISM and UNSPEC_FLMISM.
27564 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
27565 for ffb, ffmism and flmism.
27566 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
27567 (unspec_ffmism): Ditto.
27568 (unspec_flmism): Ditto.
27569 (nds32_expand_builtin_impl): Check if string extension is available.
27570 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
27571 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
27573 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
27576 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
27579 * lra-assigns.c (assign_by_spills): Return a flag of reload
27580 assignment failure. Do not process the reload assignment
27581 failures. Do not spill other reload pseudos if they has the same
27583 (lra_assign): Add a return arg. Set up from the result of
27584 assign_by_spills call.
27585 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
27586 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
27587 usage_insns if it is not NULL.
27588 (spill_hard_reg_in_range): New function.
27589 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
27590 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
27591 function prototypes.
27592 (lra_assign): Change prototype.
27593 * lra.c (lra): Add code to deal with fails by splitting hard reg
27596 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
27599 * config/i386/i386.opt: Replace Enforcment with Enforcement.
27601 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
27604 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
27605 (dw_val_node): Add val_symbolic_view.
27606 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
27607 (symview_upper_bound): New.
27608 (new_line_info_table): Initialize symviews_since_reset.
27609 (dwarf2out_source_line): Count symviews_since_reset and set
27610 symview_upper_bound.
27611 (dw_val_equal_p): Handle symview.
27612 (add_AT_symview): New.
27613 (print_dw_val): Handle symview.
27614 (attr_checksum, attr_checksum_ordered): Likewise.
27615 (same_dw_val_p, size_of_die): Likewise.
27616 (value_format, output_die): Likewise.
27617 (add_high_low_attributes): Use add_AT_symview for entry_view.
27618 (dwarf2out_finish): Reset symview_upper_bound, clear
27621 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
27624 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
27625 Add strict argument and use it.
27626 (rs6000_split_multireg_move): Update for new strict argument.
27627 (mem_operand_gpr): Disallow all non-offsettable addresses.
27628 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
27630 2018-03-09 Jakub Jelinek <jakub@redhat.com>
27633 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
27634 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
27635 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
27638 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
27639 decl, use remap_type if we want to use the type.
27641 2018-03-09 Martin Sebor <msebor@redhat.com>
27643 PR tree-optimization/84526
27644 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
27646 (builtin_access::generic_overlap): Be prepared to handle non-array
27649 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
27651 PR rtl-optimization/84682
27652 * lra-constraints.c (process_address_1): Check is_address flag
27653 for address constraints.
27654 (process_alt_operands): Likewise.
27655 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
27656 preprocess_constraints.
27657 * recog.h (preprocess_constraints): Add oploc parameter.
27659 * recog.c (preprocess_constraints): Test address_operand for
27660 CT_ADDRESS constraints.
27662 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
27665 * lra-assigns.c (assign_by_spills): Return a flag of reload
27666 assignment failure. Do not process the reload assignment
27667 failures. Do not spill other reload pseudos if they has the same
27669 (lra_assign): Add a return arg. Set up from the result of
27670 assign_by_spills call.
27671 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
27672 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
27673 usage_insns if it is not NULL.
27674 (spill_hard_reg_in_range): New function.
27675 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
27676 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
27677 function prototypes.
27678 (lra_assign): Change prototype.
27679 * lra.c (lra): Add code to deal with fails by splitting hard reg
27682 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27685 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
27686 Accept complain bool parameter. Only emit errors if it is true.
27687 (arm_parse_cpu_option_name): Likewise.
27688 (arm_target_thumb_only): Adjust callers of the above.
27689 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
27690 prototype to take a default true bool parameter.
27691 (arm_parse_arch_option_name): Likewise.
27693 2018-03-09 David Malcolm <dmalcolm@redhat.com>
27694 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
27698 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
27699 * configure: Regenerate.
27700 * configure.ac ("linker --version-script option"): New.
27701 ("linker soname option"): New.
27703 2018-03-09 Richard Biener <rguenther@suse.de>
27705 PR tree-optimization/84775
27706 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
27707 immediate uses of predicate stmts and mark them modified.
27710 PR tree-optimization/84178
27711 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
27713 (version_loop_for_if_conversion): Delay update_ssa call.
27714 (tree_if_conversion): Delay update_ssa until after predicate
27717 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
27720 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
27721 when the function accesses prior frames.
27723 2018-03-08 Jakub Jelinek <jakub@redhat.com>
27726 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
27727 gen_llsym, otherwise call maybe_gen_llsym.
27729 PR inline-asm/84742
27730 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
27731 has ',' character inside of it.
27733 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27736 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
27737 as clobbering CC_REGNUM.
27739 2018-03-08 Richard Biener <rguenther@suse.de>
27741 PR middle-end/84552
27742 * tree-scalar-evolution.c: Include tree-into-ssa.h.
27743 (follow_copies_to_constant): Do not follow SSA names registered
27746 2018-03-08 Richard Biener <rguenther@suse.de>
27748 PR tree-optimization/84178
27749 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
27751 (version_loop_for_if_conversion): Delay update_ssa call.
27752 (tree_if_conversion): Delay update_ssa until after predicate
27755 2018-03-08 David Malcolm <dmalcolm@redhat.com>
27757 PR tree-optimization/84178
27758 * tree-if-conv.c (release_bb_predicate): Remove the
27759 the assertion that the stmts have NULL use_ops.
27760 Discard the statements, asserting that they haven't
27761 yet been added to a BB.
27763 2018-03-08 Richard Biener <rguenther@suse.de>
27765 PR tree-optimization/84746
27766 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
27767 (phi_translate): Pass in destination ANTIC_OUT set.
27768 (phi_translate_1): Likewise. For a simplified result lookup
27769 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
27770 (phi_translate_set): Adjust.
27771 (do_pre_regular_insertion): Likewise.
27772 (do_pre_partial_partial_insertion): Likewise.
27774 2018-03-08 Martin Liska <mliska@suse.cz>
27776 PR gcov-profile/84735
27777 * doc/gcov.texi: Document usage of profile files.
27778 * gcov-io.h: Document changes in the format.
27780 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
27784 * dwarf2out.c (struct dw_line_info_table): Update comments for
27786 (FORCE_RESET_NEXT_VIEW): New.
27787 (FORCE_RESETTING_VIEW_P): New.
27788 (RESETTING_VIEW_P): Check for -1 too.
27789 (ZERO_VIEW_P): Likewise.
27790 (new_line_info_table): Force-reset next view.
27791 (dwarf2out_begin_function): Likewise.
27792 (dwarf2out_source_line): Simplify zero_view_p initialization.
27793 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
27794 view directly. Omit view when omitting .loc at line 0.
27796 2018-03-08 Jakub Jelinek <jakub@redhat.com>
27798 PR tree-optimization/84740
27799 * tree-switch-conversion.c (process_switch): Call build_constructors
27800 only if info.phi_count is non-zero.
27802 PR tree-optimization/84739
27803 * tree-tailcall.c (find_tail_calls): Check call arguments against
27804 DECL_ARGUMENTS (current_function_decl) rather than
27805 DECL_ARGUMENTS (func) when checking for tail recursion.
27807 2018-03-07 Jakub Jelinek <jakub@redhat.com>
27809 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
27810 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
27811 Volker Reichelt's entry and add entries for people that perform
27812 GCC fuzzy testing and report numerous bugs.
27814 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
27817 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
27818 readonly data in sdata, if that is disabled.
27819 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
27820 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
27821 -mreadonly-in-sdata option.
27823 2018-03-07 Martin Sebor <msebor@redhat.com>
27825 PR tree-optimization/84468
27826 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
27827 basic block when looking for nul assignment.
27829 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
27832 * except.h (output_function_exception_table): Adjust prototype.
27833 * except.c (output_function_exception_table): Remove FNNAME parameter
27834 and add SECTION parameter. Ouput one part of the table at a time.
27835 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
27836 the first part of the exception table and emit unwind directives.
27837 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
27838 (i386_pe_seh_cold_init): Likewise.
27839 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
27840 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
27841 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
27842 (ix86_output_call_insn): Emit a nop in one more case for SEH.
27843 * config/i386/winnt.c: Include except.h.
27844 (struct seh_frame_state): Add reg_offset, after_prologue and
27845 in_cold_section fields.
27846 (i386_pe_seh_end_prologue): Set seh->after_prologue.
27847 (i386_pe_seh_cold_init): New function.
27848 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
27849 to seh->in_cold_section.
27850 (seh_emit_push): Record the offset of the push.
27851 (seh_emit_save): Record the offet of the save.
27852 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
27853 Test seh->after_prologue to disregard the epilogue.
27854 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
27855 (i386_pe_end_cold_function): New function.
27857 2018-03-07 Jakub Jelinek <jakub@redhat.com>
27860 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
27861 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
27864 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
27866 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
27867 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
27869 PR middle-end/84723
27870 * multiple_target.c: Include tree-inline.h and intl.h.
27871 (expand_target_clones): Diagnose and fail if node->definition and
27872 !tree_versionable_function_p (node->decl).
27874 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
27876 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
27878 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
27879 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
27880 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
27882 2018-03-06 Jakub Jelinek <jakub@redhat.com>
27885 * combine.c (try_combine): Use reg_or_subregno instead of handling
27886 just paradoxical SUBREGs and REGs.
27888 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
27890 * config/arc/arc.c (arc_finalize_pic): Remove function.
27891 (arc_must_save_register): We use single base PIC register, remove
27892 checks to save/restore the PIC register.
27893 (arc_expand_prologue): Likewise.
27894 * config/arc/arc-protos.h (arc_set_default_type_attributes):
27896 (arc_verify_short): Likewise.
27897 (arc_attr_type): Likewise.
27898 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
27899 (walk_stores): Likewise.
27900 (arc_address_cost): Make it static.
27901 (arc_verify_short): Likewise.
27902 (branch_dest): Likewise.
27903 (arc_attr_type): Likewise.
27904 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
27905 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
27906 (arc_final_prescan_insn): Remove inserting the nops due to
27907 hardware hazards. It is done in reorg step.
27908 (insn_length_variant_t): Remove.
27909 (insn_length_parameters_t): Likewise.
27910 (arc_insn_length_parameters): Likewise.
27911 (arc_get_insn_variants): Likewise.
27912 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
27914 2018-03-06 Jakub Jelinek <jakub@redhat.com>
27916 PR inline-asm/84683
27917 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
27920 PR tree-optimization/84687
27921 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
27923 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
27925 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27927 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
27928 Rename to ppc_speculation_barrier.
27929 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
27930 __builtin_ppc_speculation_barrier.
27932 2018-03-05 Jakub Jelinek <jakub@redhat.com>
27935 * combine.c (combine_simplify_rtx): Don't try to simplify if
27936 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
27939 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
27941 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
27942 to 32 bytes when compiling for POWER9.
27944 2018-03-05 Jakub Jelinek <jakub@redhat.com>
27947 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
27948 regparm >= 3 with no arg reg available also for calls with
27949 flag_force_indirect_call. Pass decl to ix86_function_regparm.
27952 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
27954 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
27956 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
27959 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
27961 2018-03-05 Richard Biener <rguenther@suse.de>
27963 PR tree-optimization/84486
27964 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
27965 When inserting a __builtin_assume_aligned call set the LHS
27966 SSA name alignment info accordingly.
27968 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
27970 PR tree-optimization/84114
27971 * config/aarch64/aarch64.c (aarch64_reassociation_width)
27972 Avoid reassociation of FLOAT_MODE addition.
27974 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
27976 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
27977 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
27978 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
27979 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
27980 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
27981 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
27982 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
27984 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
27985 __builtin_ia32_wbinvd): New builtins.
27986 (SPECIAL_ARGS2): New.
27987 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
27988 (SPECIAL_ARGS2): New.
27989 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
27990 (ix86_valid_target_attribute_inner_p): Ditto.
27991 (ix86_init_mmx_sse_builtins): Add special_args2.
27992 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
27993 TARGET_WBNOINVD_P): New.
27994 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
27995 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
27996 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
27997 * config/i386/immintrin.h (_wbinvd): New intrinsic.
27998 * config/i386/pconfigintrin.h: New file.
27999 * config/i386/wbnoinvdintrin.h: Ditto.
28000 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
28002 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
28004 2018-03-05 Richard Biener <rguenther@suse.de>
28006 PR tree-optimization/84670
28007 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
28009 (BB_VISITED_WITH_VISITED_SUCCS): New define.
28010 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
28011 (compute_antic_aux): Only assert the number of values in ANTIC_IN
28012 doesn't grow if all successors (recursively) were visited at least
28015 2018-03-05 Richard Biener <rguenther@suse.de>
28017 PR tree-optimization/84650
28018 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
28019 if executed in the loop pipeline.
28021 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
28023 * doc/configfiles.texi (Configuration Files): Move info about
28024 conditionalizing $target-protos.h to...
28025 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
28026 differs from $target-protos.h.
28028 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
28029 Chung-Ju Wu <jasonwucj@gmail.com>
28031 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
28032 * config/nds32/nds32-multiple.md (setmemsi): Define.
28033 * config/nds32/nds32-memory-manipulation.c
28034 (nds32_gen_dup_4_byte_to_word_value): New.
28035 (emit_setmem_word_loop): New.
28036 (emit_setmem_byte_loop): New.
28037 (nds32_expand_setmem_loop): New.
28038 (nds32_expand_setmem_loop_v3m): New.
28039 (nds32_expand_setmem_unroll): New.
28040 (nds32_expand_setmem): New.
28042 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
28043 Chung-Ju Wu <jasonwucj@gmail.com>
28045 * config/nds32/nds32-memory-manipulation.c
28046 (nds32_emit_load_store): New.
28047 (nds32_emit_post_inc_load_store): New.
28048 (nds32_emit_mem_move): New.
28049 (nds32_emit_mem_move_block): New.
28050 (nds32_expand_movmemsi_loop_unknown_size): New.
28051 (nds32_expand_movmemsi_loop_known_size): New.
28052 (nds32_expand_movmemsi_loop): New.
28053 (nds32_expand_movmemsi_unroll): New.
28054 (nds32_expand_movmemqi): Rename ...
28055 (nds32_expand_movmemsi): ... to this.
28056 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
28057 (movmemsi): ... to this.
28058 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
28059 (nds32_expand_movmemsi): ... to this.
28061 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
28062 Monk Chiang <sh.chiang04@gmail.com>
28063 Chung-Ju Wu <jasonwucj@gmail.com>
28065 * config/nds32/nds32-protos.h
28066 (nds32_expand_load_multiple): New arguments.
28067 (nds32_expand_store_multiple): Ditto.
28068 (nds32_valid_multiple_load_store): Rename ...
28069 (nds32_valid_multiple_load_store_p): ... to this.
28070 * config/nds32/nds32-memory-manipulation.c
28071 (nds32_expand_load_multiple): Refine implementation.
28072 (nds32_expand_store_multiple): Ditto.
28073 * config/nds32/nds32-multiple.md
28074 (load_multiple): Update nds32_expand_load_multiple interface.
28075 (store_multiple): Update nds32_expand_store_multiple interface.
28076 * config/nds32/nds32-predicates.c
28077 (nds32_valid_multiple_load_store): Rename ...
28078 (nds32_valid_multiple_load_store_p): ... to this and refine
28080 * config/nds32/predicates.md
28081 (nds32_load_multiple_and_update_address_operation): New predicate.
28082 (nds32_store_multiple_and_update_address_operation): New predicate.
28084 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
28085 Chung-Ju Wu <jasonwucj@gmail.com>
28087 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
28088 (combo): New attribute.
28089 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
28091 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
28093 * config/nds32/nds32.opt: Change -mcmodel= default value.
28095 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
28096 Monk Chiang <sh.chiang04@gmail.com>
28097 Chung-Ju Wu <jasonwucj@gmail.com>
28099 * config/nds32/constants.md (unspec_element): New enum.
28100 * config/nds32/constraints.md (Umw): New constraint.
28101 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
28102 * config/nds32/nds32-intrinsic.md: Likewise.
28103 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
28104 (nds32_valid_smw_lwm_base_p): New.
28105 (nds32_output_smw_single_word): New.
28106 (nds32_output_lmw_single_word): New.
28107 (nds32_expand_unaligned_load): New.
28108 (nds32_expand_unaligned_store): New.
28109 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
28110 (nds32_output_smw_single_word): Declare.
28111 (nds32_output_lmw_single_word): Declare.
28112 (nds32_expand_unaligned_load): Declare.
28113 (nds32_expand_unaligned_store): Declare.
28114 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
28115 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
28116 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
28117 NDS32_BUILTIN_UASTORE_DW.
28118 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
28121 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
28122 Kito Cheng <kito.cheng@gmail.com>
28123 Chung-Ju Wu <jasonwucj@gmail.com>
28125 * config/nds32/nds32-intrinsic.c
28126 (nds32_expand_builtin_null_ftype_reg): Delete.
28127 (nds32_expand_builtin_reg_ftype_imm): Ditto.
28128 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
28129 (nds32_read_argument): New.
28130 (nds32_legitimize_target): Ditto.
28131 (nds32_legitimize_argument): Ditto.
28132 (nds32_check_constant_argument): Ditto.
28133 (nds32_expand_unop_builtin): Ditto.
28134 (nds32_expand_unopimm_builtin): Ditto.
28135 (nds32_expand_binop_builtin): Ditto.
28136 (nds32_builtin_decl_impl): Ditto.
28137 (builtin_description): Ditto.
28138 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
28139 (nds32_init_builtins_impl): Ditto.
28140 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
28141 (nds32_builtin_decl): New.
28142 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
28143 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
28145 2018-03-02 Jeff Law <law@redhat.com>
28147 * reorg.c (stop_search_p): Handle DEBUG_INSN.
28148 (redundant_insn, fill_simple_delay_slots): Likewise.
28149 (fill_slots_from_thread): Likewise.
28150 * resource.c (mark_referenced_resources): Likewise.
28151 (mark_set_resources, find_dead_or_set_registers): Likewise.
28153 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28155 * substring-locations.h (format_warning_va): Formatting fix for
28156 ATTRIBUTE_GCC_DIAG.
28157 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
28159 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
28160 * substring-locations.c: Include intl.h.
28161 (format_warning_va): Turned into small wrapper around
28162 format_warning_n_va, renamed to ...
28163 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
28164 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
28166 (format_warning_at_substring_n): New function.
28167 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
28168 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
28169 format_warning_at_substring with just a shorter name instead of
28170 const function pointer.
28171 (fmtwarn_n): New function.
28172 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
28173 appropriate, get rid of all the fmtstr temporaries, move conditionals
28174 with G_() wrapped string literals directly into fmtwarn arguments,
28175 cast dir.len to (int), formatting fixes.
28177 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
28179 * doc/invoke.texi: Remove "Cilk Plus" references.
28181 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28182 Richard Biener <rguenther@suse.de>
28185 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
28186 for error or warning attributes if CALL_FROM_THUNK_P is set.
28189 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28192 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
28193 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
28196 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
28197 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
28199 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
28200 instead of -1U in last predictors element's probability member.
28202 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
28205 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
28206 arguments if they are comparable.
28208 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
28210 PR tree-optimization/84634
28211 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
28212 masks and masked_loop_p with a single loop_masks, making sure it's
28213 null for bb vectorization.
28215 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
28217 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
28218 (vect_analyze_data_ref_access): Use loop->safe_len rather than
28219 loop->force_vectorize to check whether there is no alias.
28221 2018-03-02 Jakub Jelinek <jakub@redhat.com>
28224 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
28226 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
28228 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
28229 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
28230 instead of a loop around prev_real_insn.
28231 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
28234 PR inline-asm/84625
28235 * config/i386/i386.c (ix86_print_operand): Use conditional
28236 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
28239 2018-03-02 Richard Biener <rguenther@suse.de>
28241 PR tree-optimization/84427
28242 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
28243 (bitmap_set_subtract_values): Rewrite to handle multiple
28246 (prune_clobbered_mems): Likewise.
28247 (phi_translate): Take edge instead of pred/phiblock.
28248 (phi_translate_1): Likewise.
28249 (phi_translate_set): Likewise. Insert all translated
28250 exprs for a value into the set, keeping possibly multiple
28251 expressions per value.
28252 (compute_antic_aux): Adjust for phi_translate changes.
28253 When intersecting union the expressions and prune those
28254 not in the final value set, keeping possibly multiple
28255 expressions per value. Do not use value-insertion
28256 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
28257 all expressions. Add verification that the value-sets
28258 only shrink during iteration.
28259 (compute_partial_antic_aux): Adjust for the phi_translate changes.
28260 (do_pre_regular_insertion): Likewise.
28261 (do_pre_partial_partial_insertion): Likewise.
28263 2018-03-02 Richard Biener <rguenther@suse.de>
28266 * config/darwin.c (saved_debug_info_level): New static global.
28267 (darwin_asm_lto_start): Disable debug info generation for LTO out.
28268 (darwin_asm_lto_end): Restore debug info generation settings.
28270 2018-03-01 Martin Liska <mliska@suse.cz>
28273 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
28274 volatile arguments.
28276 2018-03-01 Richard Biener <rguenther@suse.de>
28279 * dwarf2out.c (gen_variable_die): Properly handle late VLA
28280 type annotation with LTO when debug was disabled at compile-time.
28282 2018-03-01 Matthew Fortune <mfortune@gmail.com>
28284 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
28286 (mips_final_postscan_insn): Likewise.
28288 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
28290 PR rtl-optimization/84528
28291 * alias.c (init_alias_target): Add commentary.
28292 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
28293 a unique base value if the frame pointer is not eliminated
28294 to the stack pointer.
28296 2018-03-01 Tom de Vries <tom@codesourcery.com>
28298 PR rtl-optimization/83327
28299 * lra-int.h (hard_regs_spilled_into): Declare.
28300 * lra.c (hard_regs_spilled_into): Define.
28301 (init_reg_info): Init hard_regs_spilled_into.
28302 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
28303 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
28304 (process_bb_lives): Handle hard_regs_spilled_into.
28305 (lra_create_live_ranges_1): Before doing liveness propagation, clear
28306 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
28308 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
28310 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
28311 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
28312 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
28313 * config/rs6000/aix72.h: New file.
28315 2018-02-28 Jakub Jelinek <jakub@redhat.com>
28317 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
28318 instead of warning_at with conditional singular and plural messages
28322 * stor-layout.c (update_alignment_for_field): For
28323 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
28324 && !DECL_PACKED (field), do the alignment update, just use
28325 only desired_align instead of MAX (type_align, desired_align)
28327 (place_field): Don't do known_align < desired_align handling
28328 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
28329 is non-NULL, instead do it after rli->prev_field handling and
28330 only if not within a bitfield word. For DECL_PACKED (field)
28331 use type_align of BITS_PER_UNIT.
28333 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
28335 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
28336 superfluous parentheses and trailing spaces.
28338 2018-02-28 Richard Biener <rguenther@suse.de>
28340 PR tree-optimization/84584
28341 * graphite-scop-detection.c (scop_detection::add_scop): Discard
28342 SCoPs with fake exit edge.
28344 2018-02-28 Martin Liska <mliska@suse.cz>
28347 * timevar.c (timer::print): Fix format to properly print 100%
28350 2018-02-28 Richard Biener <rguenther@suse.de>
28352 PR middle-end/84607
28353 * genmatch.c (capture_info::walk_match): Do not mark
28354 captured expressions without operands as expr_p given
28355 they act more like predicates and should be subject to
28356 "lost tail" side-effect preserving.
28358 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
28360 PR rtl-optimization/81611
28361 * auto-inc-dec.c (attempt_change): Move dead note from
28362 mem_insn if it's the next use of regno
28363 (find_address): Take address use of reg holding
28364 non-incremented value. Add parm to limit search to the named
28366 (merge_in_block): Attempt to use a mem insn that is the next
28367 use of the original regno.
28369 2018-02-27 Martin Sebor <msebor@redhat.com>
28372 * doc/invoke.texi (-Wmissing-attributes): New option.
28373 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
28375 2018-02-27 Martin Sebor <msebor@redhat.com>
28377 PR translation/84207
28378 * diagnostic-core.h (warning_n, error_n, inform_n): Change
28379 n argument to unsigned HOST_WIDE_INT.
28380 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
28381 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
28382 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
28383 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
28385 2018-02-27 Richard Biener <rguenther@suse.de>
28387 PR tree-optimization/84512
28388 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
28389 Do not use the estimate returned from record_stmt_cost for
28390 the scalar iteration cost but sum properly using add_stmt_cost.
28392 2018-02-27 Richard Biener <rguenther@suse.de>
28394 PR tree-optimization/84466
28395 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
28396 Adjust last change to less strictly validate use operands.
28398 2018-02-27 Martin Liska <mliska@suse.cz>
28400 PR gcov-profile/84548
28401 * gcov.c (process_file): Allow partial overlap and consider it
28402 also as group functions.
28403 (output_lines): Properly calculate range of lines for a group.
28405 2018-02-27 Martin Liska <mliska@suse.cz>
28407 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
28408 'ggc' suffixes. Change first column width.
28409 (timer::print): Fix formatting of the column.
28411 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
28413 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
28414 preserve inline entry blocks for the sake of debug inline
28415 entry point markers alone.
28416 (remove_unused_locals): Suggest in comments a better place to
28417 force the preservation of inline entry blocks that are
28418 otherwise unused, but do not preserve them.
28420 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
28422 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
28424 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
28427 * config/i386/constraints.md (Bs): Replace
28428 ix86_indirect_branch_register with
28429 TARGET_INDIRECT_BRANCH_REGISTER.
28431 * config/i386/i386.md (indirect_jump): Likewise.
28432 (tablejump): Likewise.
28433 (*sibcall_memory): Likewise.
28434 (*sibcall_value_memory): Likewise.
28435 Peepholes of indirect call and jump via memory: Likewise.
28436 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
28437 (*sibcall_value_GOT_32): Likewise.
28438 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28439 (GOT_memory_operand): Likewise.
28440 (call_insn_operand): Likewise.
28441 (sibcall_insn_operand): Likewise.
28442 (GOT32_symbol_operand): Likewise.
28443 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
28445 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
28447 PR rtl-optimization/83496
28448 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
28449 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
28450 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
28451 redundant insn, if any.
28452 (relax_delay_slots): Likewise.
28453 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
28455 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
28457 PR tree-optimization/83965
28458 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
28459 that grouped statements are part of a reduction chain. Return
28460 true if the statement is not marked as a reduction itself but
28461 is part of a group.
28462 (vect_recog_dot_prod_pattern): Don't check whether the statement
28463 is part of a group here.
28464 (vect_recog_sad_pattern): Likewise.
28465 (vect_recog_widen_sum_pattern): Likewise.
28467 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
28470 * final.c (rest_of_clean_state): Also look for calls inside sequences.
28472 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
28475 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
28477 (ix86_output_indirect_function_return): New prototype.
28478 (ix86_split_simple_return_pop_internal): Likewise.
28479 * config/i386/i386.c (indirect_return_via_cx): New.
28480 (indirect_return_via_cx_bnd): Likewise.
28481 (indirect_thunk_name): Handle return va CX_REG.
28482 (output_indirect_thunk_function): Create alias for
28483 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
28484 (ix86_output_indirect_jmp): Remove the bool argument.
28485 (ix86_output_indirect_function_return): New function.
28486 (ix86_split_simple_return_pop_internal): Likewise.
28487 * config/i386/i386.md (*indirect_jump): Don't pass false
28488 to ix86_output_indirect_jmp.
28489 (*tablejump_1): Likewise.
28490 (simple_return_pop_internal): Change it to define_insn_and_split.
28491 Call ix86_split_simple_return_pop_internal to split it for
28492 -mfunction-return=.
28493 (simple_return_indirect_internal): Call
28494 ix86_output_indirect_function_return instead of
28495 ix86_output_indirect_jmp.
28497 2018-02-26 Jakub Jelinek <jakub@redhat.com>
28500 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
28501 memset and value initialization afterwards.
28503 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
28505 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
28507 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
28510 * common/config/aarch64/aarch64-common.c
28511 (aarch_option_optimization_table[]): Switch
28512 off fomit-frame-pointer
28514 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
28515 Chung-Ju Wu <jasonwucj@gmail.com>
28517 * config/nds32/nds32-multiple.md (load_multiple): Disallow
28519 (store_multiple): Ditto.
28521 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
28523 * config.gcc: Add --with-cpu support for nds32 target.
28524 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
28525 * config/nds32/nds32.opt: Add -mcpu= option.
28527 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
28529 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
28530 isel=yes): Warn for these deprecated options.
28532 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
28534 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
28535 ISA_2_5_MASKS_EMBEDDED.
28537 2018-02-23 Jakub Jelinek <jakub@redhat.com>
28539 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
28540 p->max as pointers rather than using iterative_hash_expr.
28542 2018-02-23 Carl Love <cel@us.ibm.com>
28544 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
28545 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
28547 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
28548 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
28549 P8V_BUILTIN_VEC_VUNSIGNED2.
28551 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
28554 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
28555 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
28557 * lra-constraints.c (curr_insn_transform): Set up
28558 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
28560 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
28561 * lra-eliminations.c (spill_pseudos): Ditto.
28562 (process_insn_for_elimination): Ditto.
28563 * lra-lives.c (reg_early_clobber_p): Use the new macros.
28564 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
28565 LRA_NON_CLOBBERED_ALT.
28567 2018-02-22 Martin Sebor <msebor@redhat.com>
28569 PR tree-optimization/84480
28570 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
28571 to maybe_diag_stxncpy_trunc. Call it.
28572 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
28573 from gimple_fold_builtin_strcpy. Print inlining stack.
28574 (handle_builtin_stxncpy): Print inlining stack.
28575 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
28577 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
28580 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
28581 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
28582 and -fcheck-pointer-bounds are used together.
28583 (indirect_thunk_prefix): New enum.
28584 (indirect_thunk_need_prefix): New function.
28585 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
28586 "_nt" instead of "_bnd" for NOTRACK prefix.
28587 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
28588 (output_indirect_thunk_function): Likewise.
28590 (ix86_code_end): Update output_indirect_thunk_function calls.
28591 (ix86_output_indirect_branch_via_reg): Replace
28592 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
28593 (ix86_output_indirect_branch_via_push): Likewise.
28594 (ix86_output_function_return): Likewise.
28595 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
28596 incompatible with -fcf-protection=branch and
28597 -fcheck-pointer-bounds.
28599 2018-02-22 Steve Ellcey <sellcey@cavium.com>
28602 * config/aarch64/aarch64.c (aarch64_print_address_internal):
28603 Change gcc_assert call to output_operand_lossage.
28605 2018-02-22 Steve Ellcey <sellcey@cavium.com>
28607 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
28609 2018-02-22 DJ Delorie <dj@redhat.com>
28610 Sebastian Perta <sebastian.perta@renesas.com>
28611 Oleg Endo <olegendo@gcc.gnu.org>
28613 * config/rx/rx.c (rx_rtx_costs): New function.
28614 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
28616 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
28618 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
28620 2018-02-22 Martin Liska <mliska@suse.cz>
28623 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
28624 Add "native" as a possible value.
28626 2018-02-22 Martin Liska <mliska@suse.cz>
28629 * config/i386/i386.c (ix86_option_override_internal):
28630 Add "native" as a possible value for -march and -mtune.
28632 2018-02-22 Jakub Jelinek <jakub@redhat.com>
28635 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
28636 to all type variants.
28638 PR tree-optimization/84503
28639 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
28640 width as info->bitpos + info->bitsize - start.
28641 (merged_store_group::merge_overlapping): Simplify width computation.
28642 (check_no_overlap): New function.
28643 (imm_store_chain_info::try_coalesce_bswap): Compute expected
28644 start + width and last_order of the group, fail if check_no_overlap
28646 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
28647 to group if check_no_overlap fails.
28649 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
28651 * config/rs6000/altivec.md: Delete contraint arguments to
28652 define_expand, define_split, and define_peephole2, and in
28653 define_insn_and_split if always unused.
28654 * config/rs6000/darwin.md: Ditto.
28655 * config/rs6000/dfp.md: Ditto.
28656 * config/rs6000/rs6000.md: Ditto.
28657 * config/rs6000/sync.md: Ditto.
28658 * config/rs6000/vector.md: Ditto.
28659 * config/rs6000/vsx.md: Ditto.
28661 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
28663 * config/rs6000/altivec.md: Write output control strings as braced
28664 blocks instead of double-quoted strings.
28665 * config/rs6000/darwin.md: Ditto.
28666 * config/rs6000/rs6000.md: Ditto.
28667 * config/rs6000/vector.md: Ditto.
28668 * config/rs6000/vsx.md: Ditto.
28670 2018-02-21 Jason Merrill <jason@redhat.com>
28672 PR c++/84314 - ICE with templates and fastcall attribute.
28673 * attribs.c (build_type_attribute_qual_variant): Remove assert.
28675 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
28677 * ipa-cp.c (determine_versionability): Fix comment typos.
28679 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
28682 * ipa-cp.c (determine_versionability): Do not version functions caling
28685 2018-02-21 Martin Liska <mliska@suse.cz>
28688 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
28689 Add "native" as a possible value.
28690 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
28691 the macro when native cpu detection is available.
28693 2018-02-21 Martin Liska <mliska@suse.cz>
28696 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
28697 Add "native" as a possible value.
28698 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
28699 when native cpu detection is available.
28701 2018-02-21 Jakub Jelinek <jakub@redhat.com>
28702 Martin Sebor <msebor@redhat.com>
28704 PR tree-optimization/84478
28705 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
28707 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
28708 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
28709 support which is conservatively correct, for 2 only stay conservative
28710 for maxlen. Formatting and comment capitalization fixes. Add STRICT
28711 argument to the 2 argument get_range_strlen, adjust 6 arg
28712 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
28714 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
28715 (gimple_fold_builtin_strlen): Pass true as last argument to
28718 2018-02-20 Martin Sebor <msebor@redhat.com>
28720 PR middle-end/84095
28721 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
28722 (builtin_memref::set_base_and_offset): Same. Handle inner references.
28723 (builtin_memref::builtin_memref): Factor out parts into
28724 set_base_and_offset and call it.
28726 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
28728 PR middle-end/84406
28729 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
28730 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
28731 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
28732 search at the associated MODE_INT.
28734 2018-02-20 Jeff Law <law@redhat.com>
28736 PR middle-end/82123
28737 PR tree-optimization/81592
28738 PR middle-end/79257
28739 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
28740 for range data rather than using global data.
28741 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
28742 range data rather than using global data.
28743 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
28744 pass it to children as needed.
28745 (struct directive::fmtresult): Similarly.
28746 (struct directive::set_width): Similarly.
28747 (struct directive::set_precision): Similarly.
28748 (format_integer, format_directive, parse_directive): Similarly.
28749 (format_none): Accept unnamed vr_values parameter.
28750 (format_percent, format_floating, format_character): Similarly.
28751 (format_string, format_plain): Similarly.
28752 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
28753 the EVRP range analyzer for range data rather than using global data.
28754 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
28755 gimple-ssa-evrp-analyze.h
28756 (class sprintf_dom_walker): Add after_dom_children member function.
28757 Add evrp_range_analyzer member.
28758 (sprintf_dom_walker::before_dom_children): Call into the EVRP
28759 range analyzer as needed.
28760 (sprintf_dom_walker::after_dom_children): New member function.
28761 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
28763 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
28764 (evrp_range_analyzer::pop_to_marker): Likewise.
28766 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
28768 PR tree-optimization/84419
28769 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
28770 with the required type if its current type is compatible but
28773 2018-02-20 Jakub Jelinek <jakub@redhat.com>
28775 PR middle-end/82004
28776 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
28777 after vectorization.
28779 2018-02-20 Martin Liska <mliska@suse.cz>
28782 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
28783 possible values if we don't have a hint.
28785 2018-02-20 Martin Liska <mliska@suse.cz>
28789 * final.c (shorten_branches): Build align_tab array with one
28791 * opts.c (finish_options): Add alignment option limit check.
28792 (MAX_CODE_ALIGN): Likewise.
28793 (MAX_CODE_ALIGN_VALUE): Likewise.
28794 * doc/invoke.texi: Document maximum allowed option value for
28795 all -falign-* options.
28797 2018-02-19 Jakub Jelinek <jakub@redhat.com>
28800 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
28801 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
28802 * var-tracking.c (emit_note_insn_var_location): Remove all references
28803 to NOTE_INSN_CALL_ARG_LOCATION.
28804 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
28805 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
28806 Use copy_rtx_if_shared.
28807 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
28808 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
28809 (dwarf2out_var_location): Remove handling of
28810 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
28812 * final.c (final_scan_insn): Remove all references to
28813 NOTE_INSN_CALL_ARG_LOCATION.
28814 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
28815 before dumping final insns.
28816 * except.c (emit_note_eh_region_end): Remove all references to
28817 NOTE_INSN_CALL_ARG_LOCATION.
28818 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
28819 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
28820 * config/arc/arc.c (hwloop_optimize): Likewise.
28821 * config/arm/arm.c (create_fix_barrier): Likewise.
28822 * config/s390/s390.c (s390_chunkify_start): Likewise.
28823 * config/sh/sh.c (find_barrier): Likewise.
28824 * config/i386/i386.c (rest_of_insert_endbranch,
28825 ix86_seh_fixup_eh_fallthru): Likewise.
28826 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
28827 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
28828 * config/frv/frv.c (frv_function_prologue): Likewise.
28829 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
28831 (note_outside_basic_block_p): Remove all references to
28832 NOTE_INSN_CALL_ARG_LOCATION.
28833 * gengtype.c (adjust_field_rtx_def): Likewise.
28834 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
28836 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
28837 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
28840 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
28843 PR tree-optimization/84452
28844 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
28845 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
28848 2018-02-19 Martin Liska <mliska@suse.cz>
28851 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
28853 2018-02-19 Martin Liska <mliska@suse.cz>
28854 Richard Sandiford <richard.sandiford@linaro.org>
28856 PR tree-optimization/82491
28857 * gimple-fold.c (get_base_constructor): Make earlier bail out
28860 2018-02-19 Carl Love <cel@us.ibm.com>
28862 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
28863 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
28865 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
28866 P8V_BUILTIN_VEC_NEG.
28868 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
28870 * config/rl78/rl78.md (movdf): New define expand.
28872 2018-02-19 Martin Liska <mliska@suse.cz>
28875 * doc/invoke.texi: Fix typo.
28876 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
28878 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
28880 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
28881 handle rs6000_single_float and rs6000_double_float specially for
28884 2018-02-16 Jeff Law <law@redhat.com>
28886 * config/rx/rx.c (add_pop_cfi_notes): New function.;
28887 (pop_regs): Use it.
28889 2018-02-16 Jakub Jelinek <jakub@redhat.com>
28892 * ipa-inline.c (inline_small_functions): Fix a typo.
28894 2018-02-16 Nathan Sidwell <nathan@acm.org>
28896 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
28898 2018-02-16 Carl Love <cel@us.ibm.com>
28900 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
28901 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
28902 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
28903 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
28904 expansion to P8V_BUILTIN_VEC_FLOAT2.
28906 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
28908 PR rtl-optimization/70023
28909 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
28910 src_regno into account.
28912 2018-02-16 Carl Love <cel@us.ibm.com>
28914 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
28915 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
28916 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
28917 * config/rs6000/rs6000.c: Remove case statements for
28918 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
28919 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
28920 and P9V_BUILTIN_VEC_VINSERT4B.
28921 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
28922 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
28923 * config/rs6000/vsx.md:
28924 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
28927 2018-02-16 Carl Love <cel@us.ibm.com>
28929 * config/rs6000/altivec.h: Add builtin names vec_extract4b
28931 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
28933 * config/rs6000/rs6000-c.c: Add the definitions for
28934 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
28935 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
28936 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
28937 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
28938 definition for insert4b and define insn *insert3b_internal.
28939 * doc/extend.texi: Add documentation for vec_extract4b.
28941 2018-02-16 Nathan Sidwell <nathan@acm.org>
28943 * doc/extend.texi (Backwards Compatibility): Mention friend
28944 injection. Note for-scope is deprecated.
28945 * doc/invoke.texi (-ffriend-injection): Deprecate.
28947 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
28949 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
28950 that moved to I2, also allow destinations that are a paradoxical
28951 subreg (instead of a normal reg).
28953 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
28956 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
28959 2018-02-16 Richard Biener <rguenther@suse.de>
28961 PR tree-optimization/84037
28962 PR tree-optimization/84016
28964 * config/i386/i386.c (ix86_builtin_vectorization_cost):
28965 Adjust vec_construct for the fact we need additional higher latency
28966 128bit inserts for AVX256 and AVX512 vector builds.
28967 (ix86_add_stmt_cost): Scale vector construction cost for
28970 2018-02-16 Richard Biener <rguenther@suse.de>
28972 PR tree-optimization/84417
28973 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
28974 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
28975 (non_rewritable_lvalue_p): Likewise, use poly-ints.
28977 2018-02-16 Martin Liska <mliska@suse.cz>
28980 * internal-fn.def (ASAN_CHECK): Set proper flags.
28981 (ASAN_MARK): Likewise.
28983 2018-02-16 Julia Koval <julia.koval@intel.com>
28985 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
28986 from PTA_CANNONLAKE.
28988 2018-02-16 Jakub Jelinek <jakub@redhat.com>
28991 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
28992 Use ++iter rather than iter++ for std::list iterators.
28993 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
28994 defer deleting them until all nodes in the forest are processed. Do
28995 free even leaf nodes. Change to_process into auto_vec.
28998 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
28999 * vec.h (vec_default_construct): Use memset instead of placement new
29000 if BROKEN_VALUE_INITIALIZATION is defined.
29001 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
29002 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
29005 PR rtl-optimization/83723
29006 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
29007 * lra.c (lra_substitute_pseudo): Likewise. If true, use
29008 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
29010 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
29012 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
29014 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
29016 PR rtl-optimization/81443
29017 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
29018 from inner REGs to paradoxical SUBREGs.
29020 2018-02-16 Richard Biener <rguenther@suse.de>
29022 PR tree-optimization/84399
29023 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
29024 For operands we can analyze at their definition make sure we can
29025 analyze them at each use as well.
29027 2018-02-16 Richard Biener <rguenther@suse.de>
29029 PR tree-optimization/84190
29030 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
29031 volatile accesses if the decl isn't volatile.
29033 2018-02-15 Jason Merrill <jason@redhat.com>
29035 PR c++/84314 - ICE with templates and fastcall attribute.
29036 * attribs.c (build_type_attribute_qual_variant): Don't clobber
29037 TYPE_CANONICAL on an existing type.
29039 2018-02-15 Jakub Jelinek <jakub@redhat.com>
29041 PR tree-optimization/84383
29042 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
29043 dstoff nor call operand_equal_p if dstbase is NULL.
29045 PR tree-optimization/84334
29046 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
29047 also a CONSTANT_CLASS_P, punt.
29049 2018-02-14 Jim Wilson <jimw@sifive.com>
29051 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
29052 first SMALL_OPERAND check. New local min_second_step. Move assert
29053 to where locals are set. Add TARGET_RVC support.
29054 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
29056 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
29058 * doc/invoke.texi: Correct -Wformat-overflow code sample.
29060 2018-02-14 Martin Sebor <msebor@redhat.com>
29062 PR tree-optimization/83698
29063 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
29064 arrays constrain the offset range to their bounds.
29065 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
29066 (builtin_access::overlap): Avoid setting the size of overlap if it's
29068 (maybe_diag_overlap): Also consider arrays when deciding what values
29069 of offsets to include in diagnostics.
29071 2018-02-14 Martin Sebor <msebor@redhat.com>
29074 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
29075 that correspond to the kind of a declaration.
29077 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
29080 * config/pa/pa.md: Load address of PIC label using the linkage table
29081 if the label is nonlocal.
29083 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
29085 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
29086 warning message if user requests -maltivec=be.
29087 * doc/invoke.texi: Document deprecation of -maltivec=be.
29089 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
29092 * config/rs6000/rs6000-c.c: Update definitions for
29093 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
29094 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
29096 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
29099 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
29100 add _get_ssp intrinsics. Remove argument from
29101 __builtin_ia32_rdssp[d|q].
29102 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
29103 * config/i386/i386-builtin.def: Remove argument from
29104 __builtin_ia32_rdssp[d|q].
29105 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
29106 ix86_expand_special_args_builtin for _rdssp[d|q].
29107 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
29108 Clear register before usage.
29109 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
29110 Add documentation for new _get_ssp and _inc_ssp intrinsics.
29112 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
29114 PR tree-optimization/84357
29115 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
29116 operand 1 of an ARRAY_REF too.
29118 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
29121 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
29122 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
29124 (set_of_reg): New struct.
29125 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
29126 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
29127 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
29129 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
29130 Split into bitclr, bitset, bitinvert patterns if appropriate.
29131 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
29132 use rx_fuse_in_memory_bitop.
29133 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
29134 to named insn, correct maximum insn length.
29136 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
29139 * machmode.def: Define a complex mode for PARTIAL_INT.
29140 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
29142 * doc/rtl.texi: Document CSPImode.
29143 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
29145 (msp430_hard_regno_nregs_with_padding): Likewise.
29147 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
29150 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
29152 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
29154 PR rtl-optimization/84169
29155 * combine.c (try_combine): New variable split_i2i3. Set it to true if
29156 we generated a parallel as new i3 and we split that to new i2 and i3
29157 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
29158 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
29159 those to i2, not i1. Partially rewrite this scan code.
29161 2018-02-13 Jakub Jelinek <jakub@redhat.com>
29164 * stor-layout.c (place_field): For variable length fields, adjust
29165 offset_align afterwards not just based on the field's alignment,
29166 but also on the size.
29168 PR middle-end/84309
29169 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
29170 of exps and logs in the use_exp2 case.
29172 2018-02-13 Jeff Law <law@redhat.com>
29174 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
29175 entry for "vector".
29177 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
29180 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
29184 * common.opt (gas-loc-support, gas-locview-support): New.
29185 (ginline-points, ginternal-reset-location-views): New.
29186 * doc/invoke.texi: Document them. Use @itemx where intended.
29187 (gvariable-location-views): Adjust.
29188 * target.def (reset_location_view): New.
29189 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
29190 (TARGET_RESET_LOCATION_VIEW): New.
29191 * doc/tm.texi: Rebuilt.
29192 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
29193 (dwarf2out_default_as_locview_support): New.
29194 (output_asm_line_debug_info): Use option variables.
29195 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
29196 (output_loc_list): Likewise.
29197 (add_high_low_attributes): Check option variables.
29198 Don't output entry view attribute in strict mode.
29199 (gen_inlined_subroutine_die): Check option variables.
29200 (dwarf2out_inline_entry): Likewise.
29201 (init_sections_and_labels): Likewise.
29202 (dwarf2out_early_finish): Likewise.
29203 (maybe_reset_location_view): New, from...
29204 (dwarf2out_var_location): ... here. Call it.
29205 * debug.h (dwarf2out_default_as_loc_support): Declare.
29206 (dwarf2out_default_as_locview_support): Declare.
29207 * hooks.c (hook_int_rtx_insn_0): New.
29208 * hooks.h (hook_int_rtx_insn_0): Declare.
29209 * toplev.c (process_options): Take -gas-loc-support and
29210 -gas-locview-support from dwarf2out. Enable
29211 -gvariable-location-views by default only with locview
29212 assembler support. Enable -ginternal-reset-location-views by
29213 default only if the target defines the corresponding hook.
29214 Enable -ginline-points by default if location views are
29215 enabled; force it disabled if statement frontiers are
29217 * tree-inline.c (expand_call_inline): Check option variables.
29218 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
29220 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
29222 PR tree-optimization/84321
29223 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
29224 handling. Also check whether the anti-range contains any values
29225 that satisfy the mask; switch to a VR_RANGE if not.
29227 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
29230 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
29232 2018-02-13 Martin Jambor <mjambor@suse.cz>
29235 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
29236 of call statements, also set location of a load to a temporary.
29238 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
29240 * config/rl78/rl78.c (add_vector_labels): New function.
29241 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
29242 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
29243 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
29244 which checks that no arguments are passed.
29245 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
29246 * doc/extend.texi: Documentation for the new attribute.
29248 2018-02-13 Andreas Schwab <schwab@suse.de>
29250 * config/riscv/linux.h (CPP_SPEC): Define.
29252 2018-02-13 Jakub Jelinek <jakub@redhat.com>
29255 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
29256 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
29257 OPTION_MASK_ISA_AES as first argument to def_builtin_const
29258 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
29259 instead of OPTION_MASK_ISA_PCLMUL as first argument to
29260 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
29261 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
29262 temporarily for AES and PCLMUL builtins.
29264 PR tree-optimization/84339
29265 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
29266 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
29269 PR middle-end/84309
29270 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
29271 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
29272 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
29274 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
29276 * omp-simd-clone.h: New file.
29277 * omp-simd-clone.c: Include omp-simd-clone.h.
29278 (expand_simd_clones): No longer static.
29279 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
29280 cgraph.h and omp-simd-clone.h.
29281 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
29282 (vect_recog_widen_shift_pattern): Formatting fix.
29283 (vect_pattern_recog_1): Don't check optab for calls.
29286 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
29287 operands[2] into a REG before using gen_lowpart on it.
29289 2018-02-12 Jeff Law <law@redhat.com>
29292 * config/sh/sh.c (find_barrier): Consider a sibling call
29295 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
29296 successfully back substituting a reg.
29298 2018-02-12 Richard Biener <rguenther@suse.de>
29300 PR tree-optimization/84037
29301 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
29302 parameter, move visited init to caller.
29303 (vect_slp_analyze_operations): Separate cost from validity
29304 check, initialize visited once for all instances.
29305 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
29307 * tree-vect-stmts.c (vect_model_simple_cost): Make early
29309 (vect_model_promotion_demotion_cost): Likewise.
29310 (vectorizable_bswap): Guard cost modeling with !slp_node
29311 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
29313 (vectorizable_call): Likewise.
29314 (vectorizable_conversion): Likewise.
29315 (vectorizable_assignment): Likewise.
29316 (vectorizable_shift): Likewise.
29317 (vectorizable_operation): Likewise.
29318 (vectorizable_store): Likewise.
29319 (vectorizable_load): Likewise.
29320 (vectorizable_condition): Likewise.
29321 (vectorizable_comparison): Likewise.
29323 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
29326 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
29327 (ASAN_MARK): Fix fnspec to account for return value, change pointer
29328 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
29330 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
29332 PR middle-end/83665
29333 * params.def (inline-min-speedup): Increase from 8 to 15.
29334 (max-inline-insns-auto): Decrease from 40 to 30.
29335 * ipa-split.c (consider_split): Add some buffer for function to
29336 be considered inlining candidate.
29337 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
29340 2018-02-12 Richard Biener <rguenther@suse.de>
29342 PR tree-optimization/84037
29343 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
29344 matched stmts if we cannot swap the non-matched ones.
29346 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
29348 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
29349 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
29350 _mm_maskz_scalef_round_ss): New intrinsics.
29351 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
29352 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
29353 __builtin_ia32_scalefss_round): Remove.
29354 (__builtin_ia32_scalefsd_mask_round,
29355 __builtin_ia32_scalefss_mask_round): New intrinsics.
29356 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
29357 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
29358 ((match_operand:VF_128 2 "<round_nimm_predicate>"
29359 "<round_constraint>")): Changed to ...
29360 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
29361 "<round_scalar_constraint>")): ... this.
29362 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
29363 %0, %1, %2<round_op3>}"): Changed to ...
29364 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
29365 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
29366 %2<round_scalar_mask_op3>}"): ... this.
29367 * config/i386/subst.md (round_scalar_nimm_predicate): New.
29369 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
29371 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
29372 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
29373 (_mm_maskz_sqrt_round_ss): New intrinsics.
29374 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
29375 (__builtin_ia32_sqrtsd_mask_round)
29376 (__builtin_ia32_sqrtss_mask_round): New builtins.
29377 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
29378 (__builtin_ia32_sqrtss_round): Remove.
29379 (__builtin_ia32_sqrtsd_mask_round)
29380 (__builtin_ia32_sqrtss_mask_round): New builtins.
29381 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
29382 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
29383 ((match_operand:VF_128 1 "vector_operand"
29384 "xBm,<round_constraint>")): Changed to ...
29385 ((match_operand:VF_128 1 "vector_operand"
29386 "xBm,<round_scalar_constraint>")): ... this.
29387 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
29388 %0, %2, %<iptr>1<round_op3>}): Changed to ...
29389 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
29390 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
29391 %<iptr>1<round_scalar_mask_op3>}): ... this.
29392 ((set_attr "prefix" "<round_prefix>")): Changed to ...
29393 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
29395 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
29398 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
29399 Cast vec_cmpeq result to correct type.
29400 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
29401 Cast vec_cmpgt result to correct type.
29403 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
29405 * final.c (final_scan_insn_1): Renamed from...
29406 (final_scan_insn): ... this. New wrapper, to recover
29407 seen from the outermost call in recursive ones.
29408 * config/sparc/sparc.c (output_return): Drop seen from call.
29409 (output_sibcall): Likewise.
29410 * config/visium/visium.c (output_branch): Likewise.
29412 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
29414 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
29417 2018-02-10 Alan Modra <amodra@gmail.com>
29420 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
29421 Specify LR as an input.
29423 2018-02-10 Jakub Jelinek <jakub@redhat.com>
29426 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
29427 remove_member_access_dummy_vars): New functions.
29428 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
29429 lower_omp_1, execute_lower_omp): Use them.
29431 PR rtl-optimization/84308
29432 * shrink-wrap.c (spread_components): Release todo vector.
29434 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
29436 PR rtl-optimization/57193
29437 * ira-color.c (struct allocno_color_data): Add member
29438 conflict_allocno_hard_prefs.
29439 (update_conflict_allocno_hard_prefs): New.
29440 (bucket_allocno_compare_func): Add a preference based on
29441 conflict_allocno_hard_prefs.
29442 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
29443 (color_allocnos): Remove a dead code. Initiate
29444 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
29446 2018-02-09 Jakub Jelinek <jakub@redhat.com>
29449 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
29450 constraint from =wa to wa. Avoid a subreg on the output operand,
29451 instead use a pseudo and subreg it in a move.
29452 (p9_xxbrd_<mode>): Changed to ...
29453 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
29454 (p9_xxbrd_v2df): New expander.
29455 (p9_xxbrw_<mode>): Changed to ...
29456 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
29457 (p9_xxbrw_v4sf): New expander.
29459 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
29461 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
29463 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
29466 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
29467 multiply in 32-bit mode.
29468 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
29469 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
29472 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
29474 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
29475 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
29476 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
29477 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
29479 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
29482 * dwarf2out.c (is_trivial_indirect_ref): New function.
29483 (dwarf2out_late_global_decl): Do not generate a location
29484 attribute for variables that have a non-trivial DECL_VALUE_EXPR
29485 and that are not defined in the current unit.
29487 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
29489 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
29490 instead of a libcall for UNORDERED.
29492 2018-02-09 Tamar Christina <tamar.christina@arm.com>
29495 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
29496 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
29498 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
29501 * config/s390/s390.c (s390_set_current_function): Invoke
29502 s390_indirect_branch_settings also if fndecl didn't change.
29504 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
29506 * config/rs6000/rs6000.md (blockage): Set length to zero.
29508 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
29510 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
29512 2018-02-09 Jakub Jelinek <jakub@redhat.com>
29515 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
29516 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
29520 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
29521 PARALLEL incoming that failed vt_get_decl_and_offset check.
29523 PR middle-end/84237
29524 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
29525 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
29527 (get_variable_section): For decls in named .bss* sections pass true as
29528 second argument to bss_initializer_p.
29530 2018-02-09 Marek Polacek <polacek@redhat.com>
29531 Jakub Jelinek <jakub@redhat.com>
29534 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
29535 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
29536 Sync some changes from cxx_fold_indirect_ref.
29538 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
29540 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
29542 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
29543 (BLOCK_INLINE_ENTRY_LABEL): New.
29544 (dwarf2out_var_location): Disregard inline entry markers.
29545 (inline_entry_data): New struct.
29546 (inline_entry_data_hasher): New hashtable type.
29547 (inline_entry_data_hasher::hash): New.
29548 (inline_entry_data_hasher::equal): New.
29549 (inline_entry_data_table): New variable.
29550 (add_high_low_attributes): Add DW_AT_entry_pc and
29551 DW_AT_GNU_entry_view attributes if a pending entry is found
29552 in inline_entry_data_table. Add old entry_pc attribute only
29553 if debug nonbinding markers are disabled.
29554 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
29555 markers are enabled.
29556 (block_within_block_p, dwarf2out_inline_entry): New.
29557 (dwarf2out_finish): Check that no entries remained in
29558 inline_entry_data_table.
29559 * final.c (reemit_insn_block_notes): Handle inline entry notes.
29560 (final_scan_insn, notice_source_line): Likewise.
29561 (rest_of_clean_state): Skip inline entry markers.
29562 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
29564 * gimple.c (gimple_build_debug_inline_entry): New.
29565 * gimple.h (enum gimple_debug_subcode): Add
29566 GIMPLE_DEBUG_INLINE_ENTRY.
29567 (gimple_build_debug_inline_entry): Declare.
29568 (gimple_debug_inline_entry_p): New.
29569 (gimple_debug_nonbind_marker_p): Adjust.
29570 * insn-notes.def (INLINE_ENTRY): New.
29571 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
29572 inline entry marker notes.
29573 (print_insn): Likewise.
29574 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
29575 (INSN_DEBUG_MARKER_KIND): Likewise.
29576 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
29577 * tree-inline.c (expand_call_inline): Build and insert
29578 debug_inline_entry stmt.
29579 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
29580 inline entry blocks early, if nonbind markers are enabled.
29581 (dump_scope_block): Dump fragment info.
29582 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
29583 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
29584 (gimple_build_debug_inline_entry): New.
29585 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
29586 Enable/disable inline entry points too.
29587 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
29588 (DEBUG_INSN): Describe inline entry markers.
29590 * common.opt (gvariable-location-views): New.
29591 (gvariable-location-views=incompat5): New.
29592 * config.in: Rebuilt.
29593 * configure: Rebuilt.
29594 * configure.ac: Test assembler for view support.
29595 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
29596 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
29597 * dwarf2out.c (var_loc_view): New typedef.
29598 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
29599 (dwarf2out_locviews_in_attribute): New.
29600 (dwarf2out_locviews_in_loclist): New.
29601 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
29602 (enum dw_line_info_opcode): Add LI_adv_address.
29603 (struct dw_line_info_table): Add view.
29604 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
29605 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
29606 (zero_view_p): New variable.
29607 (ZERO_VIEW_P): New macro.
29608 (output_asm_line_debug_info): New.
29609 (struct var_loc_node): Add view.
29610 (add_AT_view_list, AT_loc_list): New.
29611 (add_var_loc_to_decl): Add view param. Test it against last.
29612 (new_loc_list): Add view params. Record them.
29613 (AT_loc_list_ptr): Handle loc and view lists.
29614 (view_list_to_loc_list_val_node): New.
29615 (print_dw_val): Handle dw_val_class_view_list.
29616 (size_of_die): Likewise.
29617 (value_format): Likewise.
29618 (loc_list_has_views): New.
29619 (gen_llsym): Set vl_symbol too.
29620 (maybe_gen_llsym, skip_loc_list_entry): New.
29621 (dwarf2out_maybe_output_loclist_view_pair): New.
29622 (output_loc_list): Output view list or entries too.
29623 (output_view_list_offset): New.
29624 (output_die): Handle dw_val_class_view_list.
29625 (output_dwarf_version): New.
29626 (output_compilation_unit_header): Use it.
29627 (output_skeleton_debug_sections): Likewise.
29628 (output_rnglists, output_line_info): Likewise.
29629 (output_pubnames, output_aranges): Update version comments.
29630 (output_one_line_info_table): Output view numbers in asm comments.
29631 (dw_loc_list): Determine current endview, pass it to new_loc_list.
29632 Call maybe_gen_llsym.
29633 (loc_list_from_tree_1): Adjust.
29634 (add_AT_location_description): Create view list attribute if
29635 needed, check it's absent otherwise.
29636 (convert_cfa_to_fb_loc_list): Adjust.
29637 (maybe_emit_file): Call output_asm_line_debug_info for test.
29638 (dwarf2out_var_location): Reset views as needed. Precompute
29639 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
29640 attribute. Set view.
29641 (new_line_info_table): Reset next view.
29642 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
29643 (dwarf2out_source_line): Likewise. Output view resets and labels to
29644 the assembler, or select appropriate line info opcodes.
29645 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
29646 (optimize_string_length): Catch it. Adjust.
29647 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
29648 dw_val_class_view_list, and remove it if no longer needed.
29649 (hash_loc_list): Hash view numbers.
29650 (loc_list_hasher::equal): Compare them.
29651 (optimize_location_lists): Check whether a view list symbol is
29652 needed, and whether the locview attribute is present, and
29653 whether they match. Remove the locview attribute if no longer
29655 (index_location_lists): Call skip_loc_list_entry for test.
29656 (dwarf2out_finish): Call output_asm_line_debug_info for test.
29657 Use output_dwarf_version.
29658 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
29659 (struct dw_val_node): Add val_view_list.
29660 * final.c (SEEN_NEXT_VIEW): New.
29661 (set_next_view_needed): New.
29662 (clear_next_view_needed): New.
29663 (maybe_output_next_view): New.
29664 (final_start_function): Rename to...
29665 (final_start_function_1): ... this. Take pointer to FIRST,
29666 add SEEN parameter. Emit param bindings in the initial view.
29667 (final_start_function): Reintroduce SEEN-less interface.
29668 (final): Rename to...
29669 (final_1): ... this. Take SEEN parameter. Output final pending
29670 next view at the end.
29671 (final): Reintroduce seen-less interface.
29672 (final_scan_insn): Output pending next view before switching
29673 sections or ending a block. Mark the next view as needed when
29674 outputting variable locations. Notify debug backend of section
29675 changes, and of location view changes.
29676 (rest_of_handle_final): Adjust.
29677 * toplev.c (process_options): Autodetect value for debug variable
29678 location views option. Warn on incompat5 without -gdwarf-5.
29679 * doc/invoke.texi (gvariable-location-views): New.
29680 (gvariable-location-views=incompat5): New.
29681 (gno-variable-location-views): New.
29683 2018-02-08 David Malcolm <dmalcolm@redhat.com>
29685 PR tree-optimization/84136
29686 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
29687 that the result of find_edge is non-NULL.
29689 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
29692 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
29693 storing integer register in SImode. Fix cost of 256 and 512
29694 byte aligned SSE register store.
29696 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
29698 * config/i386/i386.c (ix86_multiplication_cost): Fix
29699 multiplication cost for TARGET_AVX512DQ.
29701 2018-02-08 Marek Polacek <polacek@redhat.com>
29703 PR tree-optimization/84238
29704 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
29707 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
29709 PR tree-optimization/84265
29710 * tree-vect-stmts.c (vectorizable_store): Don't treat
29711 VMAT_CONTIGUOUS accesses as grouped.
29712 (vectorizable_load): Likewise.
29714 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
29716 PR tree-optimization/81635
29717 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
29718 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
29719 (test_round_for_mask): New functions.
29720 (wide_int_cc_tests): Call test_round_for_mask.
29721 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
29722 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
29723 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
29724 range returned by get_range_info.
29726 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
29729 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
29730 * symtab.c: Include builtins.h
29731 (symtab_node::output_to_lto_symbol_table_p): Move here
29732 from lto-streamer-out.c:output_symbol_p.
29733 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
29734 (output_symbol_p): Move all logic to symtab.c
29735 (produce_symtab): Update.
29737 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
29739 * config/s390/s390-opts.h (enum indirect_branch): Define.
29740 * config/s390/s390-protos.h (s390_return_addr_from_memory)
29741 (s390_indirect_branch_via_thunk)
29742 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
29743 (enum s390_indirect_branch_type): Define.
29744 * config/s390/s390.c (struct s390_frame_layout, struct
29745 machine_function): Remove.
29746 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
29747 (indirect_branch_table_label_no, indirect_branch_table_name):
29749 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
29750 (enum s390_indirect_branch_option): Define.
29751 (s390_return_addr_from_memory): New function.
29752 (s390_handle_string_attribute): New function.
29753 (s390_attribute_table): Add new attribute handler.
29754 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
29755 (s390_indirect_branch_via_thunk): New function.
29756 (s390_indirect_branch_via_inline_thunk): New function.
29757 (s390_function_ok_for_sibcall): When jumping via thunk disallow
29758 sibling call optimization for non z10 compiles.
29759 (s390_emit_call): Force indirect branch target to be a single
29760 register. Add r1 clobber for non-z10 compiles.
29761 (s390_emit_epilogue): Emit return jump via return_use expander.
29762 (s390_reorg): Handle JUMP_INSNs as execute targets.
29763 (s390_option_override_internal): Perform validity checks for the
29764 new command line options.
29765 (s390_indirect_branch_attrvalue): New function.
29766 (s390_indirect_branch_settings): New function.
29767 (s390_set_current_function): Invoke s390_indirect_branch_settings.
29768 (s390_output_indirect_thunk_function): New function.
29769 (s390_code_end): Implement target hook.
29770 (s390_case_values_threshold): Implement target hook.
29771 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
29773 * config/s390/s390.h (struct s390_frame_layout)
29774 (struct machine_function): Move here from s390.c.
29775 (TARGET_INDIRECT_BRANCH_NOBP_RET)
29776 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
29777 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
29778 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
29779 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
29780 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
29781 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
29782 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
29783 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
29784 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
29785 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
29786 (mnemonic attribute): Add values which aren't recognized
29788 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
29789 pattern for branch conversion. Fix mnemonic attribute.
29790 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
29791 indirect branch via thunk if requested.
29792 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
29793 ("*indirect_jump"): Disable for branch conversion using out of
29795 ("indirect_jump_via_thunk<mode>_z10")
29796 ("indirect_jump_via_thunk<mode>")
29797 ("indirect_jump_via_inlinethunk<mode>_z10")
29798 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
29799 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
29800 ("casesi_jump_via_inlinethunk<mode>_z10")
29801 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
29802 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
29803 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
29804 ("*indirect2_jump"): Disable for branch conversion.
29805 ("casesi_jump"): Turn into expander and expand patterns for branch
29807 ("return_use"): New expander.
29808 ("*return"): Emit return via thunk and rename it to ...
29809 ("*return<mode>"): ... this one.
29810 * config/s390/s390.opt: Add new options and and enum for the
29813 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
29815 * lra-constraints.c (match_reload): Unconditionally use
29816 gen_lowpart_SUBREG, rather than selecting between that
29817 and equivalent gen_rtx_SUBREG code.
29819 2018-02-08 Richard Biener <rguenther@suse.de>
29821 PR tree-optimization/84233
29822 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
29823 changed flag instead of boguously re-using phi_inserted.
29825 2018-02-08 Martin Jambor <mjambor@suse.cz>
29827 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
29828 static local variables.
29830 2018-02-08 Richard Biener <rguenther@suse.de>
29832 PR tree-optimization/84278
29833 * tree-vect-stmts.c (vectorizable_store): When looking for
29834 smaller vector types to perform grouped strided loads/stores
29835 make sure the mode is supported by the target.
29836 (vectorizable_load): Likewise.
29838 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
29840 * config/aarch64/aarch64.c (aarch64_components_for_bb):
29841 Increase LDP/STP opportunities by adding adjacent callee-saves.
29843 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
29845 PR rtl-optimization/84068
29846 PR rtl-optimization/83459
29847 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
29849 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
29851 PR tree-optimization/84224
29852 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
29853 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
29854 non-zero arguments.
29856 2018-02-07 Iain Sandoe <iain@codesourcery.com>
29859 * config/rs6000/altivec.md (*restore_world): Remove LR use.
29860 * config/rs6000/predicates.md (restore_world_operation): Adjust op
29861 count, remove one USE.
29863 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
29865 * doc/install.texi (Configuration): Document the
29866 --with-long-double-format={ibm,ieee} PowerPC configuration
29870 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
29871 Convert from define_expand to be define_insn_and_split. Rework
29872 float/double/_Float128 conversions to QI/HI/SImode to work with
29873 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
29874 conversions to QI/HImode types did a store and then a load to
29875 truncate the value. For conversions to VSX registers, don't split
29876 the insn, instead emit the code directly. Use the code iterator
29877 any_fix to combine signed and unsigned conversions.
29878 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
29879 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
29880 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
29881 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
29882 (fix_<mode>di2_hw): Likewise.
29883 (fixuns_<mode>di2_hw): Likewise.
29884 (fix_<mode>si2_hw): Likewise.
29885 (fixuns_<mode>si2_hw): Likewise.
29886 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
29887 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
29888 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
29889 fix<uns>_trunc<SFDF:mode>si2_p8.
29890 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
29891 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
29892 (fix<uns>_<mode>_mem): Likewise.
29893 (fctiw<u>z_<mode>_mem): Likewise.
29894 (fix<uns>_<mode>_mem): Likewise.
29895 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
29896 the register allocator from doing a direct move to the GPRs to do
29897 a store, and instead use the ISA 3.0 store byte/half-word from
29898 vector register instruction. For IEEE 128-bit floating point,
29899 also optimize stores of 32-bit ints.
29900 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
29902 2018-02-07 Alan Hayward <alan.hayward@arm.com>
29904 * genextract.c (push_pathstr_operand): New function to support
29906 (walk_rtx): Call push_pathstr_operand.
29907 (print_path): Support [a-zA-Z].
29909 2018-02-07 Richard Biener <rguenther@suse.de>
29911 PR tree-optimization/84037
29912 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
29913 (cse_and_gimplify_to_preheader): Declare.
29914 (vect_get_place_in_interleaving_chain): Likewise.
29915 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
29917 (_loop_vec_info::~_loop_vec_info): Delete it.
29918 (cse_and_gimplify_to_preheader): New function.
29919 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
29920 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
29921 (vectorizable_load): Likewise. For grouped stores always base
29922 the IV on the first element.
29923 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
29924 condition before gimplifying.
29926 2018-02-07 Jakub Jelinek <jakub@redhat.com>
29928 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
29929 *DIV_EXPR and *MOD_EXPR.
29931 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
29934 * config/i386/i386.c (ix86_option_override_internal): Mask out
29935 the CF_SET bit when checking -fcf-protection.
29937 2018-02-07 Tom de Vries <tom@codesourcery.com>
29940 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
29943 2018-02-07 Richard Biener <rguenther@suse.de>
29945 PR tree-optimization/84204
29946 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
29949 PR tree-optimization/84205
29950 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
29951 special-case isl_ast_op_zdiv_r.
29953 PR tree-optimization/84223
29954 * graphite-scop-detection.c (gather_bbs::before_dom_children):
29955 Only add conditions from within the region.
29956 (gather_bbs::after_dom_children): Adjust.
29958 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
29961 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
29962 * config/avr/avr.md: Only post-reload split REG-REG moves if
29963 either register is GENERAL_REG_P.
29965 2018-02-07 Jakub Jelinek <jakub@redhat.com>
29967 PR tree-optimization/84235
29968 * tree-ssa-scopedtables.c
29969 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
29970 if the subtraction is performed in floating point type where NaNs are
29971 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
29972 build 1. Formatting fix.
29974 2018-02-06 Jakub Jelinek <jakub@redhat.com>
29977 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
29978 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
29979 and skip it regardless of bb boundaries. Use CALL_P macro,
29980 don't test INSN_P (insn) together with CALL_P or JUMP_P check
29981 unnecessarily, formatting fix.
29983 2018-02-06 Michael Collison <michael.collison@arm.com>
29985 * config/arm/thumb2.md:
29986 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
29987 (*thumb_mov_notscc): Ditto.
29989 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
29992 * config/rs6000/rs6000.md (su code attribute): Use "u" for
29993 unsigned_fix, not "s".
29995 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29997 * configure.ac (gcc_fn_eh_frame_ro): New function.
29998 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
29999 correct .eh_frame permissions.
30000 * configure: Regenerate.
30002 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
30004 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
30005 irrelevant options.
30007 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30009 * config/rs6000/rs6000.c (rs6000_option_override_internal):
30010 Display warning message for -mno-speculate-indirect-jumps.
30012 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
30014 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
30016 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
30018 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
30020 PR tree-optimization/84225
30021 * tree-eh.c (find_trapping_overflow): Only call
30022 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
30024 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
30027 * config/i386/i386.c: Reimplement the check of possible options
30028 -mibt/-mshstk conbination. Change error messages.
30029 * doc/invoke.texi: Fix a typo: remove extra '='.
30031 2018-02-06 Marek Polacek <polacek@redhat.com>
30033 PR tree-optimization/84228
30034 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
30036 2018-02-06 Tamar Christina <tamar.christina@arm.com>
30039 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
30040 emitted arch directives.
30041 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
30042 __ARM_FEATURE_COPROC before changing architectures.
30044 2018-02-06 Richard Biener <rguenther@suse.de>
30046 * config/i386/i386.c (print_reg): Fix typo.
30047 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
30049 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
30051 * configure: Regenerate.
30053 2018-02-05 Martin Sebor <msebor@redhat.com>
30055 PR tree-optimization/83369
30056 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
30059 2018-02-05 Martin Liska <mliska@suse.cz>
30061 * doc/invoke.texi: Cherry-pick upstream r323995.
30063 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
30065 * ira.c (ira_init_register_move_cost): Adjust comment.
30067 2018-02-05 Martin Liska <mliska@suse.cz>
30069 PR gcov-profile/84137
30070 * doc/gcov.texi: Fix typo in documentation.
30072 2018-02-05 Martin Liska <mliska@suse.cz>
30074 PR gcov-profile/83879
30075 * doc/gcov.texi: Document necessity of --dynamic-list-data when
30076 using dlopen functionality.
30078 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
30080 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
30081 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
30082 _mm_maskz_range_ss, _mm_mask_range_round_ss,
30083 _mm_maskz_range_round_ss): New intrinsics.
30084 (__builtin_ia32_rangesd128_round)
30085 (__builtin_ia32_rangess128_round): Remove.
30086 (__builtin_ia32_rangesd128_mask_round,
30087 __builtin_ia32_rangess128_mask_round): New builtins.
30088 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
30089 __builtin_ia32_rangess128_round): Remove.
30090 (__builtin_ia32_rangesd128_mask_round,
30091 __builtin_ia32_rangess128_mask_round): New builtins.
30092 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
30093 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
30094 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
30095 "<round_saeonly_constraint>")): Changed to ...
30096 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
30097 "<round_saeonly_scalar_constraint>")): ... this.
30098 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
30099 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
30100 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
30101 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
30102 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
30104 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
30106 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
30108 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
30109 Remove all values except native, 8540 and 8548.
30111 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
30113 * config/i386/i386.c (ix86_output_function_return): Pass
30114 INVALID_REGNUM, instead of -1, as invalid register number to
30115 indirect_thunk_name and output_indirect_thunk.
30117 2018-02-02 Julia Koval <julia.koval@intel.com>
30119 * config.gcc: Add -march=icelake.
30120 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
30121 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
30122 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
30123 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
30124 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
30125 (processor_target_table): Add icelake.
30126 (ix86_option_override_internal): Handle new PTAs.
30127 (get_builtin_code_for_version): Handle icelake.
30128 (M_INTEL_COREI7_ICELAKE): New.
30129 (fold_builtin_cpu): Handle icelake.
30130 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
30131 * doc/invoke.texi: Add -march=icelake.
30133 2018-02-02 Julia Koval <julia.koval@intel.com>
30135 * config/i386/i386.c (ix86_option_override_internal): Change flags type
30136 to wide_int_bitmask.
30137 * wide-int-bitmask.h: New.
30139 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
30142 * config/i386/i386.md: Replace Pmode with word_mode in
30143 builtin_setjmp_setup and builtin_longjmp to support x32.
30145 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
30149 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
30151 (rs6000_supported_cpu_names): New static variable.
30152 (linux_cpu_translation_table): Likewise.
30153 (elf_platform) <cpu>: Define new static variable and use it.
30154 Translate kernel AT_PLATFORM name to canonical name if needed.
30155 Error if platform name is unknown.
30157 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
30160 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
30162 2018-02-01 Jeff Law <law@redhat.com>
30165 * config/i386/i386.c (release_scratch_register_on_entry): Add new
30166 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
30167 the scratch if RELEASE_VIA_POP is false.
30168 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
30169 If we have to save a temporary register, decrement SIZE appropriately.
30170 Pass new arguments to release_scratch_register_on_entry.
30171 (ix86_adjust_stack_and_probe): Likewise.
30172 (ix86_emit_probe_stack_range): Pass new arguments to
30173 release_scratch_register_on_entry.
30175 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
30177 PR rtl-optimization/84157
30178 * combine.c (change_zero_ext): Use REG_P predicate in
30179 front of HARD_REGISTER_P predicate.
30181 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
30183 * config/avr/avr.c (avr_option_override): Move disabling of
30184 -fdelete-null-pointer-checks to...
30185 * common/config/avr/avr-common.c (avr_option_optimization_table):
30188 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30190 PR tree-optimization/81635
30191 * tree-data-ref.c (split_constant_offset_1): For types that
30192 wrap on overflow, try to use range info to prove that wrapping
30195 2018-02-01 Renlin Li <renlin.li@arm.com>
30198 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
30199 TAILCALL_ADDR_REGS.
30200 (aarch64_register_move_cost): Likewise.
30201 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
30202 TAILCALL_ADDR_REGS.
30203 (REG_CLASS_NAMES): Likewise.
30204 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
30205 TAILCALL_ADDR_REGS. Remove IP registers.
30206 * config/aarch64/aarch64.md (Ucs): Update register constraint.
30208 2018-02-01 Richard Biener <rguenther@suse.de>
30210 * domwalk.h (dom_walker::dom_walker): Add additional constructor
30211 for specifying RPO order and allow NULL for that.
30212 * domwalk.c (dom_walker::dom_walker): Likewise.
30213 (dom_walker::walk): Handle NULL RPO order.
30214 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
30216 (rewrite_update_dom_walker): Likewise.
30217 (mark_def_dom_walker): Likewise.
30219 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30221 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
30222 (aarch64_maybe_expand_sve_subreg_move): Declare.
30223 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
30224 * config/aarch64/predicates.md (aarch64_any_register_operand): New
30226 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
30227 that are semantically a reverse operation.
30228 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
30229 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
30230 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
30232 (aarch64_can_change_mode_class): For big-endian, forbid changes
30233 between two SVE modes if they have different element sizes.
30235 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30237 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
30238 the TImode handling for big-endian targets.
30240 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30242 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
30243 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
30245 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
30246 Remove BSWAP handing for big-endian targets and use the form of
30247 LD1RQ appropariate for the mode.
30249 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30251 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
30252 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
30253 duplicated element.
30255 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
30258 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
30259 check for operands that need to go through aarch64_sve_reload_be.
30261 2018-02-01 Jakub Jelinek <jakub@redhat.com>
30263 PR tree-optimization/81661
30264 PR tree-optimization/84117
30265 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
30266 * tree-eh.c: Include gimplify.h.
30267 (find_trapping_overflow, replace_trapping_overflow,
30268 rewrite_to_non_trapping_overflow): New functions.
30269 * tree-vect-loop.c: Include tree-eh.h.
30270 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
30271 * tree-data-ref.c: Include tree-eh.h.
30272 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
30274 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
30276 PR rtl-optimization/84123
30277 * combine.c (change_zero_ext): Check if hard register satisfies
30278 can_change_dest_mode before calling gen_lowpart_SUBREG.
30280 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
30283 * ira.c (ira_init_register_move_cost): Remove assert.
30285 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
30287 PR rtl-optimization/84071
30288 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
30289 * doc/tm.texi: Regenerate.
30291 2018-01-31 Richard Biener <rguenther@suse.de>
30293 PR tree-optimization/84132
30294 * tree-data-ref.c (analyze_miv_subscript): Properly
30295 check whether evolution_function_is_affine_multivariate_p
30296 before calling gcd_of_steps_may_divide_p.
30298 2018-01-31 Julia Koval <julia.koval@intel.com>
30301 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
30302 * config/i386/i386.md (rdpid_rex64) New.
30303 (rdpid): Make 32bit only.
30305 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
30308 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
30309 an IDENTIFIER_NODE for FUNCTION_TYPE's.
30311 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
30314 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
30316 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
30318 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
30320 PR rtl-optimization/84071
30321 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
30322 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
30324 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
30326 * config/arc/arc.c (arc_handle_aux_attribute): New function.
30327 (arc_attribute_table): Add 'aux' attribute.
30328 (arc_in_small_data_p): Consider aux like variables.
30329 (arc_is_aux_reg_p): New function.
30330 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
30331 (arc_get_aux_arg): New function.
30332 (prepare_move_operands): Handle aux-register access.
30333 (arc_handle_aux_attribute): New function.
30334 * doc/extend.texi (ARC Variable attributes): Add subsection.
30336 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
30338 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
30339 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
30340 (arc_attribute_table): Add 'uncached' attribute.
30341 (arc_print_operand): Print '.di' flag for uncached memory
30343 (arc_in_small_data_p): Do not consider for small data the uncached
30345 (arc_is_uncached_mem_p): New function.
30346 * config/arc/predicates.md (compact_store_memory_operand): Check
30347 for uncached memory accesses.
30348 (nonvol_nonimm_operand): Likewise.
30349 * doc/extend.texi (ARC Type Attribute): New subsection.
30351 2018-01-31 Jakub Jelinek <jakub@redhat.com>
30354 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
30355 falign-loops=): Add Optimization flag.
30357 2018-01-30 Jeff Law <law@redhat.com>
30360 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
30361 INT_REGISTERS_SAVED. Check it prior to calling
30362 get_scratch_register_on_entry.
30363 (ix86_adjust_stack_and_probe): Similarly.
30364 (ix86_emit_probe_stack_range): Similarly.
30365 (ix86_expand_prologue): Corresponding changes.
30367 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30370 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
30371 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
30373 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
30376 * lra-constraints.c (curr_insn_transform): Process AND in the
30379 2018-01-30 Jakub Jelinek <jakub@redhat.com>
30381 PR rtl-optimization/83986
30382 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
30383 dependence against last_pending_memory_flush in addition to
30384 pending_jump_insns.
30386 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
30388 PR tree-optimization/81611
30389 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
30392 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30395 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
30398 2018-01-30 Richard Biener <rguenther@suse.de>
30399 Jakub Jelinek <jakub@redhat.com>
30401 PR tree-optimization/84111
30402 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
30403 inner loops added during recursion, as they don't have up-to-date
30406 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
30409 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
30410 (can_inline_edge_by_limits_p): ... here.
30411 (can_early_inline_edge_p, check_callers,
30412 update_caller_keys, update_callee_keys, recursive_inlining,
30413 add_new_edges_to_heap, speculation_useful_p,
30414 inline_small_functions,
30415 inline_small_functions, flatten_function,
30416 inline_to_all_callers_1): Update.
30418 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
30420 * profile-count.c (profile_count::combine_with_ipa_count): Handle
30423 2018-01-30 Richard Biener <rguenther@suse.de>
30425 PR tree-optimization/83008
30426 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
30427 invariant and constant vector uses in stmts when they need
30428 more than one stmt.
30430 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30433 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
30434 * configure: Regenerate.
30436 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
30438 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
30440 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
30441 Use gen_rtx_REG rather than gen_lowpart.
30443 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
30445 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
30446 rather than 0 when creating partial subregs.
30448 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
30450 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
30453 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
30456 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
30457 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
30458 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
30459 flags. This restores the settings used before the 2017-07-24.
30460 Turning off pre increment/decrement/modify allows IVOPTS to
30461 optimize DF/SF loops where the index is an int.
30463 2018-01-29 Richard Biener <rguenther@suse.de>
30464 Kelvin Nilsen <kelvin@gcc.gnu.org>
30467 * tree-vect-stmts.c (vectorizable_call): Don't call
30468 targetm.vectorize_builtin_md_vectorized_function if callee is
30471 2018-01-22 Carl Love <cel@us.ibm.com>
30473 * doc/extend.tex: Fix typo in second arg in
30474 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
30476 2018-01-29 Richard Biener <rguenther@suse.de>
30478 PR tree-optimization/84086
30479 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
30480 (flush_ssaname_freelist): When SSA names were released reset
30481 the SCEV hash table.
30483 2018-01-29 Richard Biener <rguenther@suse.de>
30485 PR tree-optimization/84057
30486 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
30487 removed paths when removing edges.
30489 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
30491 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
30492 -mfunction-return=@var{choice}.
30494 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
30496 PR diagnostic/84034
30497 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
30498 Handle CR like TAB.
30499 (layout::print_source_line): Likewise.
30500 (test_get_line_width_without_trailing_whitespace): Add test cases.
30502 2018-01-27 Jakub Jelinek <jakub@redhat.com>
30504 PR middle-end/84040
30505 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
30508 2018-01-26 Jim Wilson <jimw@sifive.com>
30510 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
30512 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
30515 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30517 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
30518 and CMP + SUB-immediate -> SUBS.
30520 2018-01-26 Martin Sebor <msebor@redhat.com>
30522 PR tree-optimization/83896
30523 * tree-ssa-strlen.c (get_string_len): Rename...
30524 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
30525 Avoid assuming length is constant.
30526 (handle_char_store): Use HOST_WIDE_INT for string length.
30528 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
30531 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
30532 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
30534 2018-01-26 Richard Biener <rguenther@suse.de>
30536 PR rtl-optimization/84003
30537 * dse.c (record_store): Only record redundant stores when
30538 the earlier store aliases at least all accesses the later one does.
30540 2018-01-26 Jakub Jelinek <jakub@redhat.com>
30542 PR rtl-optimization/83985
30543 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
30544 REG_CFA_RESTORE insns.
30545 (delete_unmarked_insns): Don't ignore separate shrink wrapping
30546 REG_CFA_RESTORE insns here.
30549 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
30550 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
30552 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30554 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
30555 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
30556 (arc_init): Likewise.
30557 (arc_override_options): Likewise.
30558 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
30560 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
30562 * config/arc/arc.h (TARGET_DBNZ): Define.
30563 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
30564 properly set the tune attribute.
30565 (dbnz): Use TARGET_DBNZ guard.
30566 * config/arc/arc.opt (mtune): Add core3 option.
30568 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30570 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
30571 recognize new pic like addresses.
30572 (arc_delegitimize_address): Clean up.
30574 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30576 * config/arc/arc-arches.def: Option mrf16 valid for all
30578 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
30579 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
30580 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
30581 * config/arc/arc-tables.opt: Regenerate.
30582 * config/arc/arc.c (arc_conditional_register_usage): Handle
30583 reduced register file case.
30584 (arc_file_start): Set must have build attributes.
30585 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
30586 mrf16 option value.
30587 * config/arc/arc.opt (mrf16): Add new option.
30588 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
30589 * config/arc/genmultilib.awk: Handle new mrf16 option.
30590 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
30591 * config/arc/t-multilib: Regenerate.
30592 * doc/invoke.texi (ARC Options): Document mrf16 option.
30594 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30596 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
30597 * config/arc/arc.c (arc_handle_secure_attribute): New function.
30598 (arc_attribute_table): Add 'secure_call' attribute.
30599 (arc_print_operand): Print secure call operand.
30600 (arc_function_ok_for_sibcall): Don't optimize tail calls when
30602 (arc_is_secure_call_p): New function. * config/arc/arc.md
30603 (call_i): Add support for sjli instruction.
30604 (call_value_i): Likewise.
30605 * config/arc/constraints.md (Csc): New constraint.
30607 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
30608 John Eric Martin <John.Martin@emmicro-us.com>
30610 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
30611 * config/arc/arc.c (_arc_jli_section): New struct.
30612 (arc_jli_section): New type.
30613 (rc_jli_sections): New static variable.
30614 (arc_handle_jli_attribute): New function.
30615 (arc_attribute_table): Add jli_always and jli_fixed attribute.
30616 (arc_file_end): New function.
30617 (TARGET_ASM_FILE_END): Define.
30618 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
30619 (arc_add_jli_section): New function.
30620 (jli_call_scan): Likewise.
30621 (arc_reorg): Call jli_call_scan.
30622 (arc_output_addsi): Remove 'S' from printing asm operand.
30623 (arc_is_jli_call_p): New function.
30624 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
30626 (movhi_insn): Likewise.
30627 (movsi_insn): Likewise.
30628 (movsi_set_cc_insn): Likewise.
30629 (loadqi_update): Likewise.
30630 (load_zeroextendqisi_update): Likewise.
30631 (load_signextendqisi_update): Likewise.
30632 (loadhi_update): Likewise.
30633 (load_zeroextendhisi_update): Likewise.
30634 (load_signextendhisi_update): Likewise.
30635 (loadsi_update): Likewise.
30636 (loadsf_update): Likewise.
30637 (movsicc_insn): Likewise.
30638 (bset_insn): Likewise.
30639 (bxor_insn): Likewise.
30640 (bclr_insn): Likewise.
30641 (bmsk_insn): Likewise.
30642 (bicsi3_insn): Likewise.
30643 (cmpsi_cc_c_insn): Likewise.
30644 (movsi_ne): Likewise.
30645 (movsi_cond_exec): Likewise.
30646 (clrsbsi2): Likewise.
30647 (norm_f): Likewise.
30657 (call_i): Remove 'S' asm letter, add jli instruction.
30658 (call_value_i): Likewise.
30659 * config/arc/arc.op (mjli-always): New option.
30660 * config/arc/constraints.md (Cji): New constraint.
30661 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
30663 (subsf3_fpx): Likewise.
30664 (mulsf3_fpx): Likewise.
30665 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
30667 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
30668 function attrbutes.
30669 * doc/invoke.texi (ARC): Document mjli-always option.
30671 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
30673 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
30674 avoid addition with 0 and use incw and decw where possible.
30676 2018-01-26 Richard Biener <rguenther@suse.de>
30678 PR tree-optimization/81082
30679 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
30680 association if it requires casting to unsigned.
30681 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
30682 from fold_plusminus_mult_expr to catch important cases late when
30683 range info is available.
30685 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30687 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
30688 * configure.ac (hidden_linkonce): New test.
30689 * configure: Regenerate.
30690 * config.in: Regenerate.
30692 2018-01-26 Julia Koval <julia.koval@intel.com>
30694 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
30695 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
30696 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
30697 _mm_mask_bitshuffle_epi64_mask): Fix type.
30698 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
30699 USI_FTYPE_V4DI_V4DI_USI): Remove.
30700 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
30701 __builtin_ia32_vpshufbitqmb256_mask,
30702 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
30703 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
30704 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
30706 2018-01-26 Alan Modra <amodra@gmail.com>
30709 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
30710 UNSPEC_VBPERMQ. Sort other unspecs.
30712 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
30714 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
30716 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
30718 PR middle-end/83055
30719 * predict.c (drop_profile): Do not push/pop cfun; update also
30721 (handle_missing_profiles): Fix logic looking for zero profiles.
30723 2018-01-25 Jakub Jelinek <jakub@redhat.com>
30725 PR middle-end/83977
30726 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
30727 on functions with #pragma omp declare simd or functions with simd
30729 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
30730 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
30731 Remove trailing \n from warning_at calls.
30733 2018-01-25 Tom de Vries <tom@codesourcery.com>
30736 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
30737 for neutered workers.
30739 2018-01-24 Joseph Myers <joseph@codesourcery.com>
30742 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
30743 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
30745 2018-01-24 Jeff Law <law@redhat.com>
30748 * i386.c (get_probe_interval): Move to earlier point.
30749 (ix86_compute_frame_layout): If -fstack-clash-protection and
30750 the frame is larger than the probe interval, then use pushes
30751 to save registers rather than reg->mem moves.
30752 (ix86_expand_prologue): Remove conditional for int_registers_saved
30755 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
30758 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
30759 min/max for never referenced object.
30761 2018-01-24 Jakub Jelinek <jakub@redhat.com>
30763 PR middle-end/83977
30764 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
30766 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
30767 attributes from DECL_ATTRIBUTES (decl) without affecting
30768 DECL_ATTRIBUTES (current_function_decl).
30769 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
30770 functions with non-NULL DECL_ABSTRACT_ORIGIN.
30772 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
30774 PR tree-optimization/83979
30775 * fold-const.c (fold_comparison): Use constant_boolean_node
30776 instead of boolean_{true,false}_node.
30778 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
30780 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
30783 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30785 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
30786 Simplify the clause that sets the length attribute.
30787 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
30788 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
30789 clause that sets the length attribute.
30790 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
30792 2018-01-24 Tom de Vries <tom@codesourcery.com>
30795 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
30796 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
30797 Add strict parameter.
30798 (prevent_branch_around_nothing): Insert dummy insn between branch to
30799 label and label with no ptx insn inbetween.
30800 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
30802 2018-01-24 Tom de Vries <tom@codesourcery.com>
30805 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
30806 for neutered threads in warp.
30807 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
30809 2018-01-24 Richard Biener <rguenther@suse.de>
30811 PR tree-optimization/83176
30812 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
30815 2018-01-24 Richard Biener <rguenther@suse.de>
30817 PR tree-optimization/82819
30818 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
30819 code generating pluses that are no-ops in the target precision.
30821 2018-01-24 Richard Biener <rguenther@suse.de>
30823 PR middle-end/84000
30824 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
30826 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
30828 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
30829 to merge probabilities.
30830 * predict.c (probably_never_executed): Also mark as cold functions
30831 with global 0 profile and guessed local profile.
30832 * profile-count.c (profile_probability::combine_with_count): New
30834 * profile-count.h (profile_probability::operator*,
30835 profile_probability::operator*=, profile_probability::operator/,
30836 profile_probability::operator/=): Reduce precision to adjusted
30837 and set value to guessed on contradictory divisions.
30838 (profile_probability::combine_with_freq): Remove.
30839 (profile_probability::combine_wiht_count): Declare.
30840 (profile_count::force_nonzero):: Set to adjusted.
30841 (profile_count::probability_in):: Set quality to adjusted.
30842 * tree-ssa-tail-merge.c (replace_block_by): Use
30843 combine_with_count.
30845 2018-01-23 Andrew Waterman <andrew@sifive.com>
30846 Jim Wilson <jimw@sifive.com>
30848 * config/riscv/riscv.c (riscv_stack_boundary): New.
30849 (riscv_option_override): Set riscv_stack_boundary. Handle
30850 riscv_preferred_stack_boundary_arg.
30851 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
30852 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
30853 (STACK_BOUNDARY): Set to riscv_stack_boundary.
30854 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
30855 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
30856 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
30858 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
30861 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
30862 of struct ix86_frame.
30863 (ix86_expand_epilogue): Likewise. Add a local variable for
30864 the reg_save_offset field in struct ix86_frame.
30866 2018-01-23 Bin Cheng <bin.cheng@arm.com>
30868 PR tree-optimization/82604
30869 * tree-loop-distribution.c (enum partition_kind): New enum item
30870 PKIND_PARTIAL_MEMSET.
30871 (partition_builtin_p): Support above new enum item.
30872 (generate_code_for_partition): Ditto.
30873 (compute_access_range): Differentiate cases that equality can be
30874 proven at all loops, the innermost loops or no loops.
30875 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
30876 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
30877 (finalize_partitions, distribute_loop): Don't fuse partition of
30878 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
30879 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
30880 parloop is enabled.
30882 2018-01-23 Martin Liska <mliska@suse.cz>
30884 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
30885 order to ignore the predictor.
30886 (PRED_POLYMORPHIC_CALL): Likewise.
30887 (PRED_RECURSIVE_CALL): Likewise.
30889 2018-01-23 Martin Liska <mliska@suse.cz>
30891 * tree-profile.c (tree_profiling): Print function header to
30892 aware reader which function we are working on.
30893 * value-prof.c (gimple_find_values_to_profile): Do not print
30894 not interesting value histograms.
30896 2018-01-23 Martin Liska <mliska@suse.cz>
30898 * profile-count.h (enum profile_quality): Add
30899 profile_uninitialized as the first value. Do not number values
30900 as they are zero based.
30901 (profile_count::verify): Update sanity check.
30902 (profile_probability::verify): Likewise.
30904 2018-01-23 Nathan Sidwell <nathan@acm.org>
30906 * doc/invoke.texi (ffor-scope): Deprecate.
30908 2018-01-23 David Malcolm <dmalcolm@redhat.com>
30910 PR tree-optimization/83510
30911 * domwalk.c (set_all_edges_as_executable): New function.
30912 (dom_walker::dom_walker): Convert bool param
30913 "skip_unreachable_blocks" to enum reachability. Move setup of
30914 edge flags to set_all_edges_as_executable and only do it when
30915 reachability is REACHABLE_BLOCKS.
30916 * domwalk.h (enum dom_walker::reachability): New enum.
30917 (dom_walker::dom_walker): Convert bool param
30918 "skip_unreachable_blocks" to enum reachability.
30919 (set_all_edges_as_executable): New decl.
30920 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
30921 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
30923 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
30924 but converting true to REACHABLE_BLOCKS.
30925 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
30927 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
30928 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
30929 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
30931 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
30932 if check_all_array_refs will be called.
30934 2018-01-23 David Malcolm <dmalcolm@redhat.com>
30936 * tree.c (selftest::test_location_wrappers): Add more test
30939 2018-01-23 David Malcolm <dmalcolm@redhat.com>
30941 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
30942 (selftest::test_bit_in_range): Likewise.
30944 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
30947 * doc/sourcebuild.texi (vect_float): Say that the selector
30948 only describes the situation when -funsafe-math-optimizations is on.
30949 (vect_float_strict): Document.
30951 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
30953 PR tree-optimization/83965
30954 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
30955 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
30956 instead of checking only for a reduction.
30957 (vect_recog_widen_sum_pattern): Likewise.
30959 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
30961 * predict.c (probably_never_executed): Only use precise profile info.
30962 (compute_function_frequency): Skip after inlining hack since we now
30963 have quality checking.
30965 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
30967 * profile-count.h (profile_probability::very_unlikely,
30968 profile_probability::unlikely, profile_probability::even): Set
30969 precision to guessed.
30971 2018-01-23 Richard Biener <rguenther@suse.de>
30973 PR tree-optimization/83963
30974 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
30975 Properly terminate dominator walk when crossing the exit edge not
30976 when visiting its source block.
30978 2018-01-23 Jakub Jelinek <jakub@redhat.com>
30981 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
30982 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
30984 2018-01-22 Jakub Jelinek <jakub@redhat.com>
30986 PR tree-optimization/83957
30987 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
30988 semicolon after for body surrounded by braces.
30990 PR tree-optimization/83081
30991 * profile-count.h (profile_probability::split): New method.
30992 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
30993 Use profile_probability::split.
30994 (do_compare_rtx_and_jump): Fix adjustment of probabilities
30995 when splitting a single conditional jump into 2.
30997 2018-01-22 David Malcolm <dmalcolm@redhat.com>
30999 PR tree-optimization/69452
31000 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
31003 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31005 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
31006 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
31007 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
31009 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31011 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
31013 * config/rl78/rl78.md (movdi): New define_expand.
31014 * config/rl78/rl78.c (rl78_split_movdi): New function.
31016 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
31019 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
31021 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
31022 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
31023 128-bit to produce an UNSPEC move to get the double word with the
31024 signbit and then a shift directly to do signbit.
31025 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
31026 implementation with a new version that just does either a direct
31027 move or a regular move. Move memory interface to separate insns.
31028 Move insns so they are next to the expander.
31029 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
31030 with signbit move. Split big and little endian case.
31031 (signbit<mode>2_dm_mem_le): Likewise.
31032 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
31033 (signbit<mode>2_dm2): Likewise.
31035 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31037 * config/rl78/rl78.md (anddi3): New define_expand.
31039 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31041 * config/rl78/rl78.md (umindi3): New define_expand.
31043 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31045 * config/rl78/rl78.md (smindi3): New define_expand.
31047 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31049 * config/rl78/rl78.md (smaxdi3): New define_expand.
31051 2018-01-22 Carl Love <cel@us.ibm.com>
31053 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
31054 LVX_V1TI): Add macro expansion.
31055 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
31056 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
31057 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
31058 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
31059 Change check to determine if the instruction is a byte reversing
31060 entry. Fix typo in comment.
31061 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
31062 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
31063 Add def_builtin calls for new builtins.
31064 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
31065 Add define_insn expansion.
31067 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31069 * config/rl78/rl78.md (umaxdi3): New define_expand.
31071 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
31073 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
31074 for non-QImode registers.
31076 2018-01-22 Richard Biener <rguenther@suse.de>
31078 PR tree-optimization/83963
31079 * graphite-scop-detection.c (scop_detection::get_sese): Delay
31080 including the loop exit block.
31081 (scop_detection::merge_sese): Likewise.
31082 (scop_detection::add_scop): Do it here instead.
31084 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31086 * doc/sourcebuild.texi (arm_softfloat): Document.
31088 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
31091 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
31092 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
31093 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
31095 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31096 David Edelsohn <dje.gcc@gmail.com>
31099 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
31100 Change "crset eq" to "crset 2".
31101 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
31102 (*call_indirect_aix<mode>_nospec): Likewise.
31103 (*call_value_indirect_aix<mode>_nospec): Likewise.
31104 (*call_indirect_elfv2<mode>_nospec): Likewise.
31105 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
31106 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
31107 change assembly output from . to $.
31108 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
31109 (indirect_jump<mode>_nospec): Change assembly output from . to $.
31110 (*tablejump<mode>_internal1_nospec): Likewise.
31112 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
31115 * config/sh/sh_optimize_sett_clrt.cc:
31116 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
31118 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
31120 PR tree-optimization/83940
31121 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
31122 offset_dt to vect_constant_def rather than vect_unknown_def_type.
31123 (vect_check_load_store_mask): Add a mask_dt_out parameter and
31124 use it to pass back the definition type.
31125 (vect_check_store_rhs): Likewise rhs_dt_out.
31126 (vect_build_gather_load_calls): Add a mask_dt argument and use
31127 it instead of a call to vect_is_simple_use.
31128 (vectorizable_store): Update calls to vect_check_load_store_mask
31129 and vect_check_store_rhs. Use the dt returned by the latter instead
31130 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
31131 instead of calls to vect_is_simple_use. Pass the scalar rather
31132 than the vector operand to vect_is_simple_use when handling
31133 second and subsequent copies of an rhs value.
31134 (vectorizable_load): Update calls to vect_check_load_store_mask
31135 and vect_build_gather_load_calls. Use the cached mask_dt and
31136 gs_info.offset_dt instead of calls to vect_is_simple_use.
31138 2018-01-20 Jakub Jelinek <jakub@redhat.com>
31140 PR middle-end/83945
31141 * tree-emutls.c: Include gimplify.h.
31142 (lower_emutls_2): New function.
31143 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
31144 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
31145 it before further processing.
31148 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
31149 UINTVAL (trueop1) instead of INTVAL (op1).
31151 2018-01-19 Jakub Jelinek <jakub@redhat.com>
31155 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
31156 INCOMING_FRAME_SP_OFFSET if not defined.
31157 (scan_trace): Add ENTRY argument. If true and
31158 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
31159 emit a note to adjust the CFA offset.
31160 (create_cfi_notes): Adjust scan_trace callers.
31161 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
31162 INCOMING_FRAME_SP_OFFSET in the CIE.
31163 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
31164 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
31166 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
31167 * doc/tm.texi: Regenerated.
31169 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
31171 PR rtl-optimization/83147
31172 * lra-constraints.c (remove_inheritance_pseudos): Use
31173 lra_substitute_pseudo_within_insn.
31175 2018-01-19 Tom de Vries <tom@codesourcery.com>
31176 Cesar Philippidis <cesar@codesourcery.com>
31179 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
31181 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
31184 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
31185 spaces for function labels.
31187 2018-01-19 Martin Liska <mliska@suse.cz>
31189 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
31190 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
31191 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
31192 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
31193 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
31194 (PRED_CONST_RETURN): Change from 69 to 65.
31195 (PRED_NULL_RETURN): Change from 91 to 71.
31196 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
31197 (PRED_LOOP_GUARD): Change from 66 to 73.
31199 2018-01-19 Martin Liska <mliska@suse.cz>
31201 * predict.c (predict_insn_def): Add new assert.
31202 (struct branch_predictor): Change type to signed integer.
31203 (test_prediction_value_range): Amend test to cover
31204 PROB_UNINITIALIZED.
31205 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
31206 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
31207 (PRED_LOOP_ITERATIONS_MAX): Likewise.
31208 (PRED_LOOP_IV_COMPARE): Likewise.
31209 * predict.h (PROB_UNINITIALIZED): Define new constant.
31211 2018-01-19 Martin Liska <mliska@suse.cz>
31213 * predict.c (dump_prediction): Add new format for
31214 analyze_brprob.py script which is enabled with -details
31216 * profile-count.h (precise_p): New function.
31218 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
31220 PR tree-optimization/83922
31221 * tree-vect-loop.c (vect_verify_full_masking): Return false if
31222 there are no statements that need masking.
31223 (vect_active_double_reduction_p): New function.
31224 (vect_analyze_loop_operations): Use it when handling phis that
31225 are not in the loop header.
31227 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
31229 PR tree-optimization/83914
31230 * tree-vect-loop.c (vectorizable_induction): Don't convert
31231 init_expr or apply the peeling adjustment for inductions
31232 that are nested within the vectorized loop.
31234 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31236 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
31239 2018-01-18 Jakub Jelinek <jakub@redhat.com>
31243 * function.h (gimplify_parameters): Add gimple_seq * argument.
31244 * function.c: Include gimple.h and options.h.
31245 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
31246 for the added local temporaries if needed.
31247 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
31248 if there are any parameter cleanups, wrap whole body into a
31249 try/finally with the cleanups.
31251 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
31254 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
31255 Use GET_MODE_CLASS for scalar floating point.
31257 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
31261 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
31262 Fix call of call_cgraph_insertion_hooks.
31264 2018-01-18 Martin Sebor <msebor@redhat.com>
31266 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
31268 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
31271 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
31274 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
31277 * common.opt: (-ffile-prefix-map): New option.
31278 * opts.c (common_handle_option): Defer it.
31279 * opts-global.c (handle_common_deferred_options): Handle it.
31280 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
31281 * file-prefix-map.h: New file.
31282 (remap_debug_filename, add_debug_prefix_map): ...here.
31283 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
31284 * final.c (debug_prefix_map, add_debug_prefix_map
31285 remap_debug_filename): Move to...
31286 * file-prefix-map.c: New file.
31287 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
31288 generalize, get rid of alloca(), use strrchr() instead of strchr().
31289 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
31290 Implement in terms of add_prefix_map().
31291 (remap_macro_filename, remap_debug_filename): Implement in term of
31293 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
31294 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
31295 * dbxout.c: Include file-prefix-map.h.
31296 * varasm.c: Likewise.
31297 * vmsdbgout.c: Likewise.
31298 * xcoffout.c: Likewise.
31299 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
31300 * doc/cppopts.texi (-fmacro-prefix-map): Document.
31301 * doc/invoke.texi (-ffile-prefix-map): Document.
31302 (-fdebug-prefix-map): Update description.
31304 2018-01-18 Martin Liska <mliska@suse.cz>
31306 * config/i386/i386.c (indirect_thunk_name): Document that also
31308 (output_indirect_thunk): Document why both instructions
31309 (pause and lfence) are generated.
31311 2018-01-18 Richard Biener <rguenther@suse.de>
31313 PR tree-optimization/83887
31314 * graphite-scop-detection.c
31315 (scop_detection::get_nearest_dom_with_single_entry): Remove.
31316 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
31317 (scop_detection::merge_sese): Re-implement with a flood-fill
31318 algorithm that properly finds a SESE region if it exists.
31320 2018-01-18 Jakub Jelinek <jakub@redhat.com>
31323 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
31324 pointer_diff optimizations use view_convert instead of convert.
31326 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31328 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
31329 Generate different code for -mno-speculate-indirect-jumps.
31330 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
31331 (*call_indirect_aix<mode>): Disable for
31332 -mno-speculate-indirect-jumps.
31333 (*call_indirect_aix<mode>_nospec): New define_insn.
31334 (*call_value_indirect_aix<mode>): Disable for
31335 -mno-speculate-indirect-jumps.
31336 (*call_value_indirect_aix<mode>_nospec): New define_insn.
31337 (*sibcall_nonlocal_sysv<mode>): Generate different code for
31338 -mno-speculate-indirect-jumps.
31339 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
31341 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
31343 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
31344 long double type, set the flags for noting the default long double
31345 type, even if we don't pass or return a long double type.
31347 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
31350 * ipa-inline.c (flatten_function): Do not overwrite final inlining
31353 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
31355 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
31356 support for merge[hl].
31357 (fold_mergehl_helper): New helper function.
31358 (tree-vector-builder.h): New #include for tree_vector_builder usage.
31359 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
31360 (altivec_vmrglw_direct): Add xxmrglw insn.
31362 2018-01-17 Andrew Waterman <andrew@sifive.com>
31364 * config/riscv/riscv.c (riscv_conditional_register_usage): If
31365 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
31367 2018-01-17 David Malcolm <dmalcolm@redhat.com>
31370 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
31371 call the lto_location_cache before reading the
31372 DECL_SOURCE_LOCATION of the types.
31374 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
31375 Richard Sandiford <richard.sandiford@linaro.org>
31377 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
31378 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
31379 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
31380 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
31381 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
31383 * config/aarch64/constraints.md (aarch64_movti_operand):
31385 * config/aarch64/predicates.md (Uti): Add new constraint.
31387 2018-01-17 Carl Love <cel@us.ibm.com>
31389 * config/rs6000/vsx.md (define_expand xl_len_r,
31390 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
31391 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
31393 (define_expand, define_insn): Move the shift left from the
31394 define_insn to the define_expand for lxvl and stxvl instructions.
31395 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
31396 and XL_LEN_R definitions to PURE.
31398 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
31400 * config/i386/i386.c (indirect_thunk_name): Declare regno
31401 as unsigned int. Compare regno with INVALID_REGNUM.
31402 (output_indirect_thunk): Ditto.
31403 (output_indirect_thunk_function): Ditto.
31404 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
31405 in the call to output_indirect_thunk_function.
31407 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
31409 PR middle-end/83884
31410 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
31411 rather than the size of inner_type to determine the stack slot size
31412 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
31414 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
31417 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
31420 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
31422 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
31423 endian Linux systems to optionally enable multilibs for selecting
31424 the long double type if the user configured an explicit type.
31425 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
31426 have no long double multilibs if not defined.
31427 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
31428 warn if the user used -mabi={ieee,ibm}longdouble and we built
31429 multilibs for long double.
31430 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
31431 appropriate multilib option.
31432 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
31434 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
31435 for building long double multilibs.
31436 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
31438 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
31440 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
31443 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
31445 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
31448 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
31451 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
31454 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
31456 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
31457 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
31459 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
31461 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
31462 different rtl trees depending on TARGET_64BIT.
31463 (rs6000_gen_lvx): Likewise.
31465 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
31467 * config/visium/visium.md (nop): Tweak comment.
31468 (hazard_nop): Likewise.
31470 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31472 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
31473 -mspeculate-indirect-jumps.
31474 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
31475 for -mno-speculate-indirect-jumps.
31476 (*call_indirect_elfv2<mode>_nospec): New define_insn.
31477 (*call_value_indirect_elfv2<mode>): Disable for
31478 -mno-speculate-indirect-jumps.
31479 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
31480 (indirect_jump): Emit different RTL for
31481 -mno-speculate-indirect-jumps.
31482 (*indirect_jump<mode>): Disable for
31483 -mno-speculate-indirect-jumps.
31484 (*indirect_jump<mode>_nospec): New define_insn.
31485 (tablejump): Emit different RTL for
31486 -mno-speculate-indirect-jumps.
31487 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
31488 (tablejumpsi_nospec): New define_expand.
31489 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
31490 (tablejumpdi_nospec): New define_expand.
31491 (*tablejump<mode>_internal1): Disable for
31492 -mno-speculate-indirect-jumps.
31493 (*tablejump<mode>_internal1_nospec): New define_insn.
31494 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
31497 2018-01-16 Artyom Skrobov tyomitch@gmail.com
31499 * caller-save.c (insert_save): Drop unnecessary parameter. All
31502 2018-01-16 Jakub Jelinek <jakub@redhat.com>
31503 Richard Biener <rguenth@suse.de>
31506 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
31507 return early, inline manually is_gimple_sizepos. Make sure if we
31508 call gimplify_expr we don't end up with a gimple constant.
31509 * tree.c (variably_modified_type_p): Don't return true for
31510 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
31511 * gimplify.h (is_gimple_sizepos): Remove.
31513 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31515 PR tree-optimization/83857
31516 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
31517 vectorizable_live_operation for pure SLP statements.
31518 (vectorizable_live_operation): Handle PHIs.
31520 2018-01-16 Richard Biener <rguenther@suse.de>
31522 PR tree-optimization/83867
31523 * tree-vect-stmts.c (vect_transform_stmt): Precompute
31524 nested_in_vect_loop_p since the scalar stmt may get invalidated.
31526 2018-01-16 Jakub Jelinek <jakub@redhat.com>
31529 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
31530 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
31531 If off is not INTEGER_CST, issue a may not be aligned warning
31532 rather than isn't aligned. Use isn%'t rather than isn't.
31533 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
31535 <case MULT_EXPR>: Improve the case when bottom and one of the
31536 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
31537 operand, in that case check if the other operand is multiple of
31538 bottom divided by the INTEGER_CST operand.
31540 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31543 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
31544 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
31545 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
31546 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
31547 * config/pa/pa.c (pa_function_arg_advance): Likewise.
31548 (pa_function_arg, pa_arg_partial_bytes): Likewise.
31549 (pa_function_arg_size): New function.
31551 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31553 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
31554 in a separate statement.
31556 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
31558 PR tree-optimization/83847
31559 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
31560 group gathers and scatters.
31562 2018-01-16 Jakub Jelinek <jakub@redhat.com>
31564 PR rtl-optimization/86620
31565 * params.def (max-sched-ready-insns): Bump minimum value to 1.
31567 PR rtl-optimization/83213
31568 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
31569 to last if both are JUMP_INSNs.
31571 PR tree-optimization/83843
31572 * gimple-ssa-store-merging.c
31573 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
31574 store_immediate_info for bswap/nop orig_stores.
31576 2018-01-15 Andrew Waterman <andrew@sifive.com>
31578 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
31580 <UDIV>: Increase cost if !TARGET_DIV.
31582 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
31584 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
31585 (define_attr "cr_logical_3op"): New.
31586 (cceq_ior_compare): Adjust.
31587 (cceq_ior_compare_complement): Adjust.
31588 (*cceq_rev_compare): Adjust.
31589 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
31590 (is_cracked_insn): Adjust.
31591 (insn_must_be_first_in_group): Adjust.
31592 * config/rs6000/40x.md: Adjust.
31593 * config/rs6000/440.md: Adjust.
31594 * config/rs6000/476.md: Adjust.
31595 * config/rs6000/601.md: Adjust.
31596 * config/rs6000/603.md: Adjust.
31597 * config/rs6000/6xx.md: Adjust.
31598 * config/rs6000/7450.md: Adjust.
31599 * config/rs6000/7xx.md: Adjust.
31600 * config/rs6000/8540.md: Adjust.
31601 * config/rs6000/cell.md: Adjust.
31602 * config/rs6000/e300c2c3.md: Adjust.
31603 * config/rs6000/e500mc.md: Adjust.
31604 * config/rs6000/e500mc64.md: Adjust.
31605 * config/rs6000/e5500.md: Adjust.
31606 * config/rs6000/e6500.md: Adjust.
31607 * config/rs6000/mpc.md: Adjust.
31608 * config/rs6000/power4.md: Adjust.
31609 * config/rs6000/power5.md: Adjust.
31610 * config/rs6000/power6.md: Adjust.
31611 * config/rs6000/power7.md: Adjust.
31612 * config/rs6000/power8.md: Adjust.
31613 * config/rs6000/power9.md: Adjust.
31614 * config/rs6000/rs64.md: Adjust.
31615 * config/rs6000/titan.md: Adjust.
31617 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31619 * config/i386/predicates.md (indirect_branch_operand): Rewrite
31620 ix86_indirect_branch_register logic.
31622 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31624 * config/i386/constraints.md (Bs): Update
31625 ix86_indirect_branch_register check. Don't check
31626 ix86_indirect_branch_register with GOT_memory_operand.
31628 * config/i386/predicates.md (GOT_memory_operand): Don't check
31629 ix86_indirect_branch_register here.
31630 (GOT32_symbol_operand): Likewise.
31632 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31634 * config/i386/predicates.md (constant_call_address_operand):
31635 Rewrite ix86_indirect_branch_register logic.
31636 (sibcall_insn_operand): Likewise.
31638 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31640 * config/i386/constraints.md (Bs): Replace
31641 ix86_indirect_branch_thunk_register with
31642 ix86_indirect_branch_register.
31644 * config/i386/i386.md (indirect_jump): Likewise.
31645 (tablejump): Likewise.
31646 (*sibcall_memory): Likewise.
31647 (*sibcall_value_memory): Likewise.
31648 Peepholes of indirect call and jump via memory: Likewise.
31649 * config/i386/i386.opt: Likewise.
31650 * config/i386/predicates.md (indirect_branch_operand): Likewise.
31651 (GOT_memory_operand): Likewise.
31652 (call_insn_operand): Likewise.
31653 (sibcall_insn_operand): Likewise.
31654 (GOT32_symbol_operand): Likewise.
31656 2018-01-15 Jakub Jelinek <jakub@redhat.com>
31658 PR middle-end/83837
31659 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
31660 type rather than type addr's type points to.
31661 (expand_omp_atomic_mutex): Likewise.
31662 (expand_omp_atomic): Likewise.
31664 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
31667 * config/i386/i386.c (output_indirect_thunk_function): Use
31668 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
31669 for __x86_return_thunk.
31671 2018-01-15 Richard Biener <rguenther@suse.de>
31673 PR middle-end/83850
31674 * expmed.c (extract_bit_field_1): Fix typo.
31676 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31679 * config/arm/iterators.md (VF): New mode iterator.
31680 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
31681 Remove integer-related logic from pattern.
31682 (neon_vabd<mode>_3): Likewise.
31684 2018-01-15 Jakub Jelinek <jakub@redhat.com>
31686 PR middle-end/82694
31687 * common.opt (fstrict-overflow): No longer an alias.
31688 (fwrapv-pointer): New option.
31689 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
31690 also for pointer types based on flag_wrapv_pointer.
31691 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
31692 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
31693 opts->x_flag_wrapv got set.
31694 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
31695 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
31696 POINTER_TYPE_OVERFLOW_UNDEFINED.
31697 * match.pd: Likewise in address comparison pattern.
31698 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
31700 2018-01-15 Richard Biener <rguenther@suse.de>
31703 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
31704 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
31705 Reset type names to their identifier if their TYPE_DECL doesn't
31706 have linkage (and thus is used for ODR and devirt).
31707 (save_debug_info_for_decl): Remove.
31708 (save_debug_info_for_type): Likewise.
31709 (add_tree_to_fld_list): Adjust.
31710 * tree-pretty-print.c (dump_generic_node): Make dumping of
31711 type names more robust.
31713 2018-01-15 Richard Biener <rguenther@suse.de>
31715 * BASE-VER: Bump to 8.0.1.
31717 2018-01-14 Martin Sebor <msebor@redhat.com>
31720 * builtins.c (check_access): Avoid warning when the no-warning bit
31723 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
31725 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
31726 * ira-color (allocno_hard_regs_compare): Likewise.
31728 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
31731 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
31732 Use .pushsection/.popsection.
31734 2018-01-14 Martin Sebor <msebor@redhat.com>
31737 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
31739 2018-01-14 Jakub Jelinek <jakub@redhat.com>
31741 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
31742 entry from extra_headers.
31743 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
31744 extra_headers, make the list bitwise identical to the i?86-*-* one.
31746 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31748 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
31749 -mcmodel=large with -mindirect-branch=thunk,
31750 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
31751 -mfunction-return=thunk-extern.
31752 * doc/invoke.texi: Document -mcmodel=large is incompatible with
31753 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
31754 -mfunction-return=thunk and -mfunction-return=thunk-extern.
31756 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31758 * config/i386/i386.c (print_reg): Print the name of the full
31759 integer register without '%'.
31760 (ix86_print_operand): Handle 'V'.
31761 * doc/extend.texi: Document 'V' modifier.
31763 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31765 * config/i386/constraints.md (Bs): Disallow memory operand for
31766 -mindirect-branch-register.
31768 * config/i386/predicates.md (indirect_branch_operand): Likewise.
31769 (GOT_memory_operand): Likewise.
31770 (call_insn_operand): Likewise.
31771 (sibcall_insn_operand): Likewise.
31772 (GOT32_symbol_operand): Likewise.
31773 * config/i386/i386.md (indirect_jump): Call convert_memory_address
31774 for -mindirect-branch-register.
31775 (tablejump): Likewise.
31776 (*sibcall_memory): Likewise.
31777 (*sibcall_value_memory): Likewise.
31778 Disallow peepholes of indirect call and jump via memory for
31779 -mindirect-branch-register.
31780 (*call_pop): Replace m with Bw.
31781 (*call_value_pop): Likewise.
31782 (*sibcall_pop_memory): Replace m with Bs.
31783 * config/i386/i386.opt (mindirect-branch-register): New option.
31784 * doc/invoke.texi: Document -mindirect-branch-register option.
31786 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31788 * config/i386/i386-protos.h (ix86_output_function_return): New.
31789 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
31790 set function_return_type.
31791 (indirect_thunk_name): Add ret_p to indicate thunk for function
31793 (output_indirect_thunk_function): Pass false to
31794 indirect_thunk_name.
31795 (ix86_output_indirect_branch_via_reg): Likewise.
31796 (ix86_output_indirect_branch_via_push): Likewise.
31797 (output_indirect_thunk_function): Create alias for function
31798 return thunk if regno < 0.
31799 (ix86_output_function_return): New function.
31800 (ix86_handle_fndecl_attribute): Handle function_return.
31801 (ix86_attribute_table): Add function_return.
31802 * config/i386/i386.h (machine_function): Add
31803 function_return_type.
31804 * config/i386/i386.md (simple_return_internal): Use
31805 ix86_output_function_return.
31806 (simple_return_internal_long): Likewise.
31807 * config/i386/i386.opt (mfunction-return=): New option.
31808 (indirect_branch): Mention -mfunction-return=.
31809 * doc/extend.texi: Document function_return function attribute.
31810 * doc/invoke.texi: Document -mfunction-return= option.
31812 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
31814 * config/i386/i386-opts.h (indirect_branch): New.
31815 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
31816 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
31817 with local indirect jump when converting indirect call and jump.
31818 (ix86_set_indirect_branch_type): New.
31819 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
31820 (indirectlabelno): New.
31821 (indirect_thunk_needed): Likewise.
31822 (indirect_thunk_bnd_needed): Likewise.
31823 (indirect_thunks_used): Likewise.
31824 (indirect_thunks_bnd_used): Likewise.
31825 (INDIRECT_LABEL): Likewise.
31826 (indirect_thunk_name): Likewise.
31827 (output_indirect_thunk): Likewise.
31828 (output_indirect_thunk_function): Likewise.
31829 (ix86_output_indirect_branch_via_reg): Likewise.
31830 (ix86_output_indirect_branch_via_push): Likewise.
31831 (ix86_output_indirect_branch): Likewise.
31832 (ix86_output_indirect_jmp): Likewise.
31833 (ix86_code_end): Call output_indirect_thunk_function if needed.
31834 (ix86_output_call_insn): Call ix86_output_indirect_branch if
31836 (ix86_handle_fndecl_attribute): Handle indirect_branch.
31837 (ix86_attribute_table): Add indirect_branch.
31838 * config/i386/i386.h (machine_function): Add indirect_branch_type
31839 and has_local_indirect_jump.
31840 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
31842 (tablejump): Likewise.
31843 (*indirect_jump): Use ix86_output_indirect_jmp.
31844 (*tablejump_1): Likewise.
31845 (simple_return_indirect_internal): Likewise.
31846 * config/i386/i386.opt (mindirect-branch=): New option.
31847 (indirect_branch): New.
31850 (thunk-inline): Likewise.
31851 (thunk-extern): Likewise.
31852 * doc/extend.texi: Document indirect_branch function attribute.
31853 * doc/invoke.texi: Document -mindirect-branch= option.
31855 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
31858 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
31860 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
31862 * ipa-inline.c (want_inline_small_function_p): Return false if
31863 inlining has already failed with CIF_FINAL_ERROR.
31864 (update_caller_keys): Call want_inline_small_function_p before
31866 (update_callee_keys): Likewise.
31868 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
31870 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
31872 (rs6000_quadword_masked_address_p): Likewise.
31873 (quad_aligned_load_p): Likewise.
31874 (quad_aligned_store_p): Likewise.
31875 (const_load_sequence_p): Add comment to describe the outer-most loop.
31876 (mimic_memory_attributes_and_flags): New function.
31877 (rs6000_gen_stvx): Likewise.
31878 (replace_swapped_aligned_store): Likewise.
31879 (rs6000_gen_lvx): Likewise.
31880 (replace_swapped_aligned_load): Likewise.
31881 (replace_swapped_load_constant): Capitalize argument name in
31882 comment describing this function.
31883 (rs6000_analyze_swaps): Add a third pass to search for vector loads
31884 and stores that access quad-word aligned addresses and replace
31885 with stvx or lvx instructions when appropriate.
31886 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
31887 New function prototype.
31888 (rs6000_quadword_masked_address_p): Likewise.
31889 (rs6000_gen_lvx): Likewise.
31890 (rs6000_gen_stvx): Likewise.
31891 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
31892 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
31893 when memory address is aligned.
31894 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
31895 this split to select lvx instruction when memory address is aligned.
31896 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
31897 instruction when memory address is aligned.
31898 (*vsx_le_perm_load_v16qi): Likewise.
31899 (four unnamed splitters): Modify to select the stvx instruction
31900 when memory is aligned.
31902 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
31904 * predict.c (determine_unlikely_bbs): Handle correctly BBs
31905 which appears in the queue multiple times.
31907 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31908 Alan Hayward <alan.hayward@arm.com>
31909 David Sherwood <david.sherwood@arm.com>
31911 * tree-vectorizer.h (vec_lower_bound): New structure.
31912 (_loop_vec_info): Add check_nonzero and lower_bounds.
31913 (LOOP_VINFO_CHECK_NONZERO): New macro.
31914 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
31915 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
31916 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
31917 fields. Make seg_len the distance travelled, not including the
31919 (dr_direction_indicator): Declare.
31920 (dr_zero_step_indicator): Likewise.
31921 (dr_known_forward_stride_p): Likewise.
31922 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
31924 (runtime_alias_check_p): Allow runtime alias checks with
31926 (operator ==): Compare access_size and align.
31927 (prune_runtime_alias_test_list): Rework for new distinction between
31928 the access_size and seg_len.
31929 (create_intersect_range_checks_index): Likewise. Cope with polynomial
31931 (get_segment_min_max): New function.
31932 (create_intersect_range_checks): Use it.
31933 (dr_step_indicator): New function.
31934 (dr_direction_indicator): Likewise.
31935 (dr_zero_step_indicator): Likewise.
31936 (dr_known_forward_stride_p): Likewise.
31937 * tree-loop-distribution.c (data_ref_segment_size): Return
31938 DR_STEP * (niters - 1).
31939 (compute_alias_check_pairs): Update call to the dr_with_seg_len
31941 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
31942 (vect_preserves_scalar_order_p): New function, split out from...
31943 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
31944 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
31945 (vect_vfa_access_size): New function.
31946 (vect_vfa_align): Likewise.
31947 (vect_compile_time_alias): Take access_size_a and access_b arguments.
31948 (dump_lower_bound): New function.
31949 (vect_check_lower_bound): Likewise.
31950 (vect_small_gap_p): Likewise.
31951 (vectorizable_with_step_bound_p): Likewise.
31952 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
31953 depencies if the vectorization factor is 1. Convert the checks
31954 for nonzero steps into checks on the bounds of DR_STEP. Try using
31955 a bunds check for variable steps if the minimum required step is
31956 relatively small. Update calls to the dr_with_seg_len
31957 constructor and to vect_compile_time_alias.
31958 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
31960 (vect_loop_versioning): Call it.
31961 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
31963 (vect_estimate_min_profitable_iters): Account for any bounds checks.
31965 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31966 Alan Hayward <alan.hayward@arm.com>
31967 David Sherwood <david.sherwood@arm.com>
31969 * doc/sourcebuild.texi (vect_scatter_store): Document.
31970 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
31972 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
31974 * genopinit.c (main): Add supports_vec_scatter_store and
31975 supports_vec_scatter_store_cached to target_optabs.
31976 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
31977 IFN_MASK_SCATTER_STORE.
31978 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
31980 * internal-fn.h (internal_store_fn_p): Declare.
31981 (internal_fn_stored_value_index): Likewise.
31982 * internal-fn.c (scatter_store_direct): New macro.
31983 (expand_scatter_store_optab_fn): New function.
31984 (direct_scatter_store_optab_supported_p): New macro.
31985 (internal_store_fn_p): New function.
31986 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
31987 IFN_MASK_SCATTER_STORE.
31988 (internal_fn_mask_index): Likewise.
31989 (internal_fn_stored_value_index): New function.
31990 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
31991 for scatter stores.
31992 * optabs-query.h (supports_vec_scatter_store_p): Declare.
31993 * optabs-query.c (supports_vec_scatter_store_p): New function.
31994 * tree-vectorizer.h (vect_get_store_rhs): Declare.
31995 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
31996 true for scatter stores.
31997 (vect_gather_scatter_fn_p): Handle scatter stores too.
31998 (vect_check_gather_scatter): Consider using scatter stores if
31999 supports_vec_scatter_store_p.
32000 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
32001 scatter stores too.
32002 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
32003 internal_fn_stored_value_index.
32004 (check_load_store_masking): Handle scatter stores too.
32005 (vect_get_store_rhs): Make public.
32006 (vectorizable_call): Use internal_store_fn_p.
32007 (vectorizable_store): Handle scatter store internal functions.
32008 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
32009 when deciding whether the end of the group has been reached.
32010 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
32011 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
32012 (mask_scatter_store<mode>): New insns.
32014 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32015 Alan Hayward <alan.hayward@arm.com>
32016 David Sherwood <david.sherwood@arm.com>
32018 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
32019 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
32020 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
32022 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
32023 Use vect_truncate_gather_scatter_offset if we can't treat the
32024 operation as a normal gather load or scatter store.
32025 (get_group_load_store_type): Take the gather_scatter_info
32026 as argument. Try using a gather load or scatter store for
32027 single-element groups.
32028 (get_load_store_type): Update calls to get_group_load_store_type
32029 and vect_use_strided_gather_scatters_p.
32031 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32032 Alan Hayward <alan.hayward@arm.com>
32033 David Sherwood <david.sherwood@arm.com>
32035 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
32036 optional tree argument.
32037 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
32039 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
32040 but continue to use the current value as a fallback.
32041 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
32042 to compare the updates.
32043 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
32044 (get_load_store_type): Use it when handling a strided access.
32045 (vect_get_strided_load_store_ops): New function.
32046 (vect_get_data_ptr_increment): Likewise.
32047 (vectorizable_load): Handle strided gather loads. Always pass
32048 a step to vect_create_data_ref_ptr and bump_vector_ptr.
32050 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32051 Alan Hayward <alan.hayward@arm.com>
32052 David Sherwood <david.sherwood@arm.com>
32054 * doc/md.texi (gather_load@var{m}): Document.
32055 (mask_gather_load@var{m}): Likewise.
32056 * genopinit.c (main): Add supports_vec_gather_load and
32057 supports_vec_gather_load_cached to target_optabs.
32058 * optabs-tree.c (init_tree_optimization_optabs): Use
32059 ggc_cleared_alloc to allocate target_optabs.
32060 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
32061 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
32063 * internal-fn.h (internal_load_fn_p): Declare.
32064 (internal_gather_scatter_fn_p): Likewise.
32065 (internal_fn_mask_index): Likewise.
32066 (internal_gather_scatter_fn_supported_p): Likewise.
32067 * internal-fn.c (gather_load_direct): New macro.
32068 (expand_gather_load_optab_fn): New function.
32069 (direct_gather_load_optab_supported_p): New macro.
32070 (direct_internal_fn_optab): New function.
32071 (internal_load_fn_p): Likewise.
32072 (internal_gather_scatter_fn_p): Likewise.
32073 (internal_fn_mask_index): Likewise.
32074 (internal_gather_scatter_fn_supported_p): Likewise.
32075 * optabs-query.c (supports_at_least_one_mode_p): New function.
32076 (supports_vec_gather_load_p): Likewise.
32077 * optabs-query.h (supports_vec_gather_load_p): Declare.
32078 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
32079 and memory_type field.
32080 (NUM_PATTERNS): Bump to 15.
32081 * tree-vect-data-refs.c: Include internal-fn.h.
32082 (vect_gather_scatter_fn_p): New function.
32083 (vect_describe_gather_scatter_call): Likewise.
32084 (vect_check_gather_scatter): Try using internal functions for
32085 gather loads. Recognize existing calls to a gather load function.
32086 (vect_analyze_data_refs): Consider using gather loads if
32087 supports_vec_gather_load_p.
32088 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
32089 (vect_get_gather_scatter_offset_type): Likewise.
32090 (vect_convert_mask_for_vectype): Likewise.
32091 (vect_add_conversion_to_patterm): Likewise.
32092 (vect_try_gather_scatter_pattern): Likewise.
32093 (vect_recog_gather_scatter_pattern): New pattern recognizer.
32094 (vect_vect_recog_func_ptrs): Add it.
32095 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
32096 internal_fn_mask_index and internal_gather_scatter_fn_p.
32097 (check_load_store_masking): Take the gather_scatter_info as an
32098 argument and handle gather loads.
32099 (vect_get_gather_scatter_ops): New function.
32100 (vectorizable_call): Check internal_load_fn_p.
32101 (vectorizable_load): Likewise. Handle gather load internal
32103 (vectorizable_store): Update call to check_load_store_masking.
32104 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
32105 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
32106 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
32107 (aarch64_gather_scale_operand_d): New predicates.
32108 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
32109 (mask_gather_load<mode>): New insns.
32111 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32112 Alan Hayward <alan.hayward@arm.com>
32113 David Sherwood <david.sherwood@arm.com>
32115 * optabs.def (fold_left_plus_optab): New optab.
32116 * doc/md.texi (fold_left_plus_@var{m}): Document.
32117 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
32118 * internal-fn.c (fold_left_direct): Define.
32119 (expand_fold_left_optab_fn): Likewise.
32120 (direct_fold_left_optab_supported_p): Likewise.
32121 * fold-const-call.c (fold_const_fold_left): New function.
32122 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
32123 * tree-parloops.c (valid_reduction_p): New function.
32124 (gather_scalar_reductions): Use it.
32125 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
32126 (vect_finish_replace_stmt): Declare.
32127 * tree-vect-loop.c (fold_left_reduction_fn): New function.
32128 (needs_fold_left_reduction_p): New function, split out from...
32129 (vect_is_simple_reduction): ...here. Accept reductions that
32130 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
32131 (vect_force_simple_reduction): Also store the reduction type in
32132 the assignment's STMT_VINFO_REDUC_TYPE.
32133 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
32134 (merge_with_identity): New function.
32135 (vect_expand_fold_left): Likewise.
32136 (vectorize_fold_left_reduction): Likewise.
32137 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
32138 scalar phi in place for it. Check for target support and reject
32139 cases that would reassociate the operation. Defer the transform
32140 phase to vectorize_fold_left_reduction.
32141 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
32142 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
32143 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
32145 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32147 * tree-if-conv.c (predicate_mem_writes): Remove redundant
32148 call to ifc_temp_var.
32150 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32151 Alan Hayward <alan.hayward@arm.com>
32152 David Sherwood <david.sherwood@arm.com>
32154 * target.def (legitimize_address_displacement): Take the original
32155 offset as a poly_int.
32156 * targhooks.h (default_legitimize_address_displacement): Update
32158 * targhooks.c (default_legitimize_address_displacement): Likewise.
32159 * doc/tm.texi: Regenerate.
32160 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
32161 as an argument, moving assert of ad->disp == ad->disp_term to...
32162 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
32163 Try calling targetm.legitimize_address_displacement before expanding
32164 the address rather than afterwards, and adjust for the new interface.
32165 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
32166 Match the new hook interface. Handle SVE addresses.
32167 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
32168 new hook interface.
32170 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32172 * Makefile.in (OBJS): Add early-remat.o.
32173 * target.def (select_early_remat_modes): New hook.
32174 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
32175 * doc/tm.texi: Regenerate.
32176 * targhooks.h (default_select_early_remat_modes): Declare.
32177 * targhooks.c (default_select_early_remat_modes): New function.
32178 * timevar.def (TV_EARLY_REMAT): New timevar.
32179 * passes.def (pass_early_remat): New pass.
32180 * tree-pass.h (make_pass_early_remat): Declare.
32181 * early-remat.c: New file.
32182 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
32184 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
32186 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32187 Alan Hayward <alan.hayward@arm.com>
32188 David Sherwood <david.sherwood@arm.com>
32190 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
32191 vfm1 with a bound_epilog parameter.
32192 (vect_do_peeling): Update calls accordingly, and move the prologue
32193 call earlier in the function. Treat the base bound_epilog as 0 for
32194 fully-masked loops and retain vf - 1 for other loops. Add 1 to
32195 this base when peeling for gaps.
32196 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
32197 with fully-masked loops.
32198 (vect_estimate_min_profitable_iters): Handle the single peeled
32199 iteration in that case.
32201 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32202 Alan Hayward <alan.hayward@arm.com>
32203 David Sherwood <david.sherwood@arm.com>
32205 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
32206 single-element interleaving even if the size is not a power of 2.
32207 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
32208 accesses for single-element interleaving if the group size is
32211 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32212 Alan Hayward <alan.hayward@arm.com>
32213 David Sherwood <david.sherwood@arm.com>
32215 * doc/md.texi (fold_extract_last_@var{m}): Document.
32216 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
32217 * optabs.def (fold_extract_last_optab): New optab.
32218 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
32219 * internal-fn.c (fold_extract_direct): New macro.
32220 (expand_fold_extract_optab_fn): Likewise.
32221 (direct_fold_extract_optab_supported_p): Likewise.
32222 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
32223 * tree-vect-loop.c (vect_model_reduction_cost): Handle
32224 EXTRACT_LAST_REDUCTION.
32225 (get_initial_def_for_reduction): Do not create an initial vector
32226 for EXTRACT_LAST_REDUCTION reductions.
32227 (vectorizable_reduction): Leave the scalar phi in place for
32228 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
32229 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
32230 epilogue code for EXTRACT_LAST_REDUCTION and defer the
32231 transform phase to vectorizable_condition.
32232 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
32234 (vect_finish_stmt_generation): ...here.
32235 (vect_finish_replace_stmt): New function.
32236 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
32237 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
32239 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
32241 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32242 Alan Hayward <alan.hayward@arm.com>
32243 David Sherwood <david.sherwood@arm.com>
32245 * doc/md.texi (extract_last_@var{m}): Document.
32246 * optabs.def (extract_last_optab): New optab.
32247 * internal-fn.def (EXTRACT_LAST): New internal function.
32248 * internal-fn.c (cond_unary_direct): New macro.
32249 (expand_cond_unary_optab_fn): Likewise.
32250 (direct_cond_unary_optab_supported_p): Likewise.
32251 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
32252 loops using EXTRACT_LAST.
32253 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
32254 (extract_last_<mode>): ...this optab.
32255 (vec_extract<mode><Vel>): Update accordingly.
32257 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32258 Alan Hayward <alan.hayward@arm.com>
32259 David Sherwood <david.sherwood@arm.com>
32261 * target.def (empty_mask_is_expensive): New hook.
32262 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
32263 * doc/tm.texi: Regenerate.
32264 * targhooks.h (default_empty_mask_is_expensive): Declare.
32265 * targhooks.c (default_empty_mask_is_expensive): New function.
32266 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
32267 if the target says that empty masks are expensive.
32268 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
32270 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
32272 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32273 Alan Hayward <alan.hayward@arm.com>
32274 David Sherwood <david.sherwood@arm.com>
32276 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
32277 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
32278 (vect_use_loop_mask_for_alignment_p): New function.
32279 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
32280 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
32281 niters_skip argument. Make sure that the first niters_skip elements
32282 of the first iteration are inactive.
32283 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
32284 Update call to vect_set_loop_masks_directly.
32285 (get_misalign_in_elems): New function, split out from...
32286 (vect_gen_prolog_loop_niters): ...here.
32287 (vect_update_init_of_dr): Take a code argument that specifies whether
32288 the adjustment should be added or subtracted.
32289 (vect_update_init_of_drs): Likewise.
32290 (vect_prepare_for_masked_peels): New function.
32291 (vect_do_peeling): Skip prologue peeling if we're using a mask
32292 instead. Update call to vect_update_inits_of_drs.
32293 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
32295 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
32296 alignment. Do not include the number of peeled iterations in
32297 the minimum threshold in that case.
32298 (vectorizable_induction): Adjust the start value down by
32299 LOOP_VINFO_MASK_SKIP_NITERS iterations.
32300 (vect_transform_loop): Call vect_prepare_for_masked_peels.
32301 Take the number of skipped iterations into account when calculating
32303 * tree-vect-stmts.c (vect_gen_while_not): New function.
32305 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32306 Alan Hayward <alan.hayward@arm.com>
32307 David Sherwood <david.sherwood@arm.com>
32309 * doc/sourcebuild.texi (vect_fully_masked): Document.
32310 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
32311 default value to 0.
32312 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
32314 (vect_analyze_loop_2): ...here. Don't check the vectorization
32315 factor against the number of loop iterations if the loop is
32318 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32319 Alan Hayward <alan.hayward@arm.com>
32320 David Sherwood <david.sherwood@arm.com>
32322 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
32323 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
32324 (dump_groups): Update accordingly.
32325 (iv_use::mem_type): New member variable.
32326 (address_p): New function.
32327 (record_use): Add a mem_type argument and initialize the new
32329 (record_group_use): Add a mem_type argument. Use address_p.
32330 Remove obsolete null checks of base_object. Update call to record_use.
32331 (find_interesting_uses_op): Update call to record_group_use.
32332 (find_interesting_uses_cond): Likewise.
32333 (find_interesting_uses_address): Likewise.
32334 (get_mem_type_for_internal_fn): New function.
32335 (find_address_like_use): Likewise.
32336 (find_interesting_uses_stmt): Try find_address_like_use before
32337 calling find_interesting_uses_op.
32338 (addr_offset_valid_p): Use the iv mem_type field as the type
32339 of the addressed memory.
32340 (add_autoinc_candidates): Likewise.
32341 (get_address_cost): Likewise.
32342 (split_small_address_groups_p): Use address_p.
32343 (split_address_groups): Likewise.
32344 (add_iv_candidate_for_use): Likewise.
32345 (autoinc_possible_for_pair): Likewise.
32346 (rewrite_groups): Likewise.
32347 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
32348 (determine_group_iv_cost): Update after split of USE_ADDRESS.
32349 (get_alias_ptr_type_for_ptr_address): New function.
32350 (rewrite_use_address): Rewrite address uses in calls that were
32351 identified by find_address_like_use.
32353 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32354 Alan Hayward <alan.hayward@arm.com>
32355 David Sherwood <david.sherwood@arm.com>
32357 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
32359 * gimple-expr.h (is_gimple_addressable: Likewise.
32360 * gimple-expr.c (is_gimple_address): Likewise.
32361 * internal-fn.c (expand_call_mem_ref): New function.
32362 (expand_mask_load_optab_fn): Use it.
32363 (expand_mask_store_optab_fn): Likewise.
32365 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32366 Alan Hayward <alan.hayward@arm.com>
32367 David Sherwood <david.sherwood@arm.com>
32369 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
32370 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
32371 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
32372 (cond_umax@var{mode}): Document.
32373 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
32374 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
32375 (cond_umin_optab, cond_umax_optab): New optabs.
32376 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
32377 (COND_IOR, COND_XOR): New internal functions.
32378 * internal-fn.h (get_conditional_internal_fn): Declare.
32379 * internal-fn.c (cond_binary_direct): New macro.
32380 (expand_cond_binary_optab_fn): Likewise.
32381 (direct_cond_binary_optab_supported_p): Likewise.
32382 (get_conditional_internal_fn): New function.
32383 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
32384 Cope with reduction statements that are vectorized as calls rather
32386 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
32387 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
32388 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
32389 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
32390 (UNSPEC_COND_EOR): New unspecs.
32391 (optab): Add mappings for them.
32392 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
32393 (sve_int_op, sve_fp_op): New int attributes.
32395 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32396 Alan Hayward <alan.hayward@arm.com>
32397 David Sherwood <david.sherwood@arm.com>
32399 * optabs.def (while_ult_optab): New optab.
32400 * doc/md.texi (while_ult@var{m}@var{n}): Document.
32401 * internal-fn.def (WHILE_ULT): New internal function.
32402 * internal-fn.h (direct_internal_fn_supported_p): New override
32403 that takes two types as argument.
32404 * internal-fn.c (while_direct): New macro.
32405 (expand_while_optab_fn): New function.
32406 (convert_optab_supported_p): Likewise.
32407 (direct_while_optab_supported_p): New macro.
32408 * wide-int.h (wi::udiv_ceil): New function.
32409 * tree-vectorizer.h (rgroup_masks): New structure.
32410 (vec_loop_masks): New typedef.
32411 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
32412 and fully_masked_p.
32413 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
32414 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
32415 (vect_max_vf): New function.
32416 (slpeel_make_loop_iterate_ntimes): Delete.
32417 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
32418 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
32419 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
32420 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
32421 internal-fn.h, stor-layout.h and optabs-query.h.
32422 (vect_set_loop_mask): New function.
32423 (add_preheader_seq): Likewise.
32424 (add_header_seq): Likewise.
32425 (interleave_supported_p): Likewise.
32426 (vect_maybe_permute_loop_masks): Likewise.
32427 (vect_set_loop_masks_directly): Likewise.
32428 (vect_set_loop_condition_masked): Likewise.
32429 (vect_set_loop_condition_unmasked): New function, split out from
32430 slpeel_make_loop_iterate_ntimes.
32431 (slpeel_make_loop_iterate_ntimes): Rename to..
32432 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
32433 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
32434 (vect_do_peeling): Update call accordingly.
32435 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
32437 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
32438 mask_compare_type, can_fully_mask_p and fully_masked_p.
32439 (release_vec_loop_masks): New function.
32440 (_loop_vec_info): Use it to free the loop masks.
32441 (can_produce_all_loop_masks_p): New function.
32442 (vect_get_max_nscalars_per_iter): Likewise.
32443 (vect_verify_full_masking): Likewise.
32444 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
32445 retries, and free the mask rgroups before retrying. Check loop-wide
32446 reasons for disallowing fully-masked loops. Make the final decision
32447 about whether use a fully-masked loop or not.
32448 (vect_estimate_min_profitable_iters): Do not assume that peeling
32449 for the number of iterations will be needed for fully-masked loops.
32450 (vectorizable_reduction): Disable fully-masked loops.
32451 (vectorizable_live_operation): Likewise.
32452 (vect_halve_mask_nunits): New function.
32453 (vect_double_mask_nunits): Likewise.
32454 (vect_record_loop_mask): Likewise.
32455 (vect_get_loop_mask): Likewise.
32456 (vect_transform_loop): Handle the case in which the final loop
32457 iteration might handle a partial vector. Call vect_set_loop_condition
32458 instead of slpeel_make_loop_iterate_ntimes.
32459 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
32460 (check_load_store_masking): New function.
32461 (prepare_load_store_mask): Likewise.
32462 (vectorizable_store): Handle fully-masked loops.
32463 (vectorizable_load): Likewise.
32464 (supportable_widening_operation): Use vect_halve_mask_nunits for
32466 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
32467 (vect_gen_while): New function.
32468 * config/aarch64/aarch64.md (umax<mode>3): New expander.
32469 (aarch64_uqdec<mode>): New insn.
32471 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32472 Alan Hayward <alan.hayward@arm.com>
32473 David Sherwood <david.sherwood@arm.com>
32475 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
32476 (reduc_xor_scal_optab): New optabs.
32477 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
32478 (reduc_xor_scal_@var{m}): Document.
32479 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
32480 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
32481 internal functions.
32482 * fold-const-call.c (fold_const_call): Handle them.
32483 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
32484 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
32485 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
32486 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
32487 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
32488 (UNSPEC_XORV): New unspecs.
32489 (optab): Add entries for them.
32490 (BITWISEV): New int iterator.
32491 (bit_reduc_op): New int attributes.
32493 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32494 Alan Hayward <alan.hayward@arm.com>
32495 David Sherwood <david.sherwood@arm.com>
32497 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
32498 * internal-fn.def (VEC_SHL_INSERT): New internal function.
32499 * optabs.def (vec_shl_insert_optab): New optab.
32500 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
32501 (duplicate_and_interleave): Likewise.
32502 * tree-vect-loop.c: Include internal-fn.h.
32503 (neutral_op_for_slp_reduction): New function, split out from
32504 get_initial_defs_for_reduction.
32505 (get_initial_def_for_reduction): Handle option 2 for variable-length
32506 vectors by loading the neutral value into a vector and then shifting
32507 the initial value into element 0.
32508 (get_initial_defs_for_reduction): Replace the code argument with
32509 the neutral value calculated by neutral_op_for_slp_reduction.
32510 Use gimple_build_vector for constant-length vectors.
32511 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
32512 but the first group_size elements have a neutral value.
32513 Use duplicate_and_interleave otherwise.
32514 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
32515 Update call to get_initial_defs_for_reduction. Handle SLP
32516 reductions for variable-length vectors by creating one vector
32517 result for each scalar result, with the elements associated
32518 with other scalar results stubbed out with the neutral value.
32519 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
32520 Require IFN_VEC_SHL_INSERT for double reductions on
32521 variable-length vectors, or SLP reductions that have
32522 a neutral value. Require can_duplicate_and_interleave_p
32523 support for variable-length unchained SLP reductions if there
32524 is no neutral value, such as for MIN/MAX reductions. Also require
32525 the number of vector elements to be a multiple of the number of
32526 SLP statements when doing variable-length unchained SLP reductions.
32527 Update call to vect_create_epilog_for_reduction.
32528 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
32529 and remove initial values.
32530 (duplicate_and_interleave): Make public.
32531 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
32532 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
32534 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32535 Alan Hayward <alan.hayward@arm.com>
32536 David Sherwood <david.sherwood@arm.com>
32538 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
32539 (can_duplicate_and_interleave_p): New function.
32540 (vect_get_and_check_slp_defs): Take the vector of statements
32541 rather than just the current one. Remove excess parentheses.
32542 Restriction rejectinon of vect_constant_def and vect_external_def
32543 for variable-length vectors to boolean types, or types for which
32544 can_duplicate_and_interleave_p is false.
32545 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
32546 (duplicate_and_interleave): New function.
32547 (vect_get_constant_vectors): Use gimple_build_vector for
32548 constant-length vectors and suitable variable-length constant
32549 vectors. Use duplicate_and_interleave for other variable-length
32550 vectors. Don't defer the update when inserting new statements.
32552 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32553 Alan Hayward <alan.hayward@arm.com>
32554 David Sherwood <david.sherwood@arm.com>
32556 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
32557 min_profitable_iters doesn't go negative.
32559 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32560 Alan Hayward <alan.hayward@arm.com>
32561 David Sherwood <david.sherwood@arm.com>
32563 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
32564 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
32565 * optabs.def (vec_mask_load_lanes_optab): New optab.
32566 (vec_mask_store_lanes_optab): Likewise.
32567 * internal-fn.def (MASK_LOAD_LANES): New internal function.
32568 (MASK_STORE_LANES): Likewise.
32569 * internal-fn.c (mask_load_lanes_direct): New macro.
32570 (mask_store_lanes_direct): Likewise.
32571 (expand_mask_load_optab_fn): Handle masked operations.
32572 (expand_mask_load_lanes_optab_fn): New macro.
32573 (expand_mask_store_optab_fn): Handle masked operations.
32574 (expand_mask_store_lanes_optab_fn): New macro.
32575 (direct_mask_load_lanes_optab_supported_p): Likewise.
32576 (direct_mask_store_lanes_optab_supported_p): Likewise.
32577 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
32579 (vect_load_lanes_supported): Likewise.
32580 * tree-vect-data-refs.c (strip_conversion): New function.
32581 (can_group_stmts_p): Likewise.
32582 (vect_analyze_data_ref_accesses): Use it instead of checking
32583 for a pair of assignments.
32584 (vect_store_lanes_supported): Take a masked_p parameter.
32585 (vect_load_lanes_supported): Likewise.
32586 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
32587 vect_store_lanes_supported and vect_load_lanes_supported.
32588 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
32589 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
32590 parameter. Don't allow gaps for masked accesses.
32591 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
32592 and vect_load_lanes_supported.
32593 (get_load_store_type): Take a masked_p parameter and update
32594 call to get_group_load_store_type.
32595 (vectorizable_store): Update call to get_load_store_type.
32596 Handle IFN_MASK_STORE_LANES.
32597 (vectorizable_load): Update call to get_load_store_type.
32598 Handle IFN_MASK_LOAD_LANES.
32600 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32601 Alan Hayward <alan.hayward@arm.com>
32602 David Sherwood <david.sherwood@arm.com>
32604 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
32606 * config/aarch64/aarch64-protos.h
32607 (aarch64_sve_struct_memory_operand_p): Declare.
32608 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
32609 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
32610 (VPRED, vpred): Handle SVE structure modes.
32611 * config/aarch64/constraints.md (Utx): New constraint.
32612 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
32613 (aarch64_sve_struct_nonimmediate_operand): New predicates.
32614 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
32615 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
32616 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
32617 structure modes. Split into pieces after RA.
32618 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
32619 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
32621 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
32622 SVE structure modes.
32623 (aarch64_classify_address): Likewise.
32624 (sizetochar): Move earlier in file.
32625 (aarch64_print_operand): Handle SVE register lists.
32626 (aarch64_array_mode): New function.
32627 (aarch64_sve_struct_memory_operand_p): Likewise.
32628 (TARGET_ARRAY_MODE): Redefine.
32630 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32631 Alan Hayward <alan.hayward@arm.com>
32632 David Sherwood <david.sherwood@arm.com>
32634 * target.def (array_mode): New target hook.
32635 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
32636 * doc/tm.texi: Regenerate.
32637 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
32638 * hooks.c (hook_optmode_mode_uhwi_none): New function.
32639 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
32640 targetm.array_mode.
32641 * stor-layout.c (mode_for_array): Likewise. Support polynomial
32644 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32645 Alan Hayward <alan.hayward@arm.com>
32646 David Sherwood <david.sherwood@arm.com>
32648 * fold-const.c (fold_binary_loc): Check the argument types
32649 rather than the result type when testing for a vector operation.
32651 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32653 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
32654 * doc/tm.texi: Regenerate.
32656 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32657 Alan Hayward <alan.hayward@arm.com>
32658 David Sherwood <david.sherwood@arm.com>
32660 * doc/invoke.texi (-msve-vector-bits=): Document new option.
32661 (sve): Document new AArch64 extension.
32662 * doc/md.texi (w): Extend the description of the AArch64
32663 constraint to include SVE vectors.
32664 (Upl, Upa): Document new AArch64 predicate constraints.
32665 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
32667 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
32668 (msve-vector-bits=): New option.
32669 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
32670 SVE when these are disabled.
32671 (sve): New extension.
32672 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
32673 modes. Adjust their number of units based on aarch64_sve_vg.
32674 (MAX_BITSIZE_MODE_ANY_MODE): Define.
32675 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
32676 aarch64_addr_query_type.
32677 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
32678 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
32679 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
32680 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
32681 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
32682 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
32683 (aarch64_simd_imm_zero_p): Delete.
32684 (aarch64_check_zero_based_sve_index_immediate): Declare.
32685 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
32686 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
32687 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
32688 (aarch64_sve_float_mul_immediate_p): Likewise.
32689 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
32690 rather than an rtx.
32691 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
32692 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
32693 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
32694 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
32695 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
32696 (aarch64_regmode_natural_size): Likewise.
32697 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
32698 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
32700 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
32701 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
32702 for VG and the SVE predicate registers.
32703 (V_ALIASES): Add a "z"-prefixed alias.
32704 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
32705 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
32706 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
32707 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
32708 (REG_CLASS_NAMES): Add entries for them.
32709 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
32710 and the predicate registers.
32711 (aarch64_sve_vg): Declare.
32712 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
32713 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
32714 (REGMODE_NATURAL_SIZE): Define.
32715 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
32717 * config/aarch64/aarch64.c: Include cfgrtl.h.
32718 (simd_immediate_info): Add a constructor for series vectors,
32719 and an associated step field.
32720 (aarch64_sve_vg): New variable.
32721 (aarch64_dbx_register_number): Handle VG and the predicate registers.
32722 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
32723 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
32724 (VEC_ANY_DATA, VEC_STRUCT): New constants.
32725 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
32726 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
32727 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
32728 (aarch64_get_mask_mode): New functions.
32729 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
32730 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
32731 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
32732 predicate modes and predicate registers. Explicitly restrict
32733 GPRs to modes of 16 bytes or smaller. Only allow FP registers
32734 to store a vector mode if it is recognized by
32735 aarch64_classify_vector_mode.
32736 (aarch64_regmode_natural_size): New function.
32737 (aarch64_hard_regno_caller_save_mode): Return the original mode
32739 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
32740 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
32741 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
32742 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
32744 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
32745 does not overlap dest if the function is frame-related. Handle
32747 (aarch64_split_add_offset): New function.
32748 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
32749 them aarch64_add_offset.
32750 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
32751 and update call to aarch64_sub_sp.
32752 (aarch64_add_cfa_expression): New function.
32753 (aarch64_expand_prologue): Pass extra temporary registers to the
32754 functions above. Handle the case in which we need to emit new
32755 DW_CFA_expressions for registers that were originally saved
32756 relative to the stack pointer, but now have to be expressed
32757 relative to the frame pointer.
32758 (aarch64_output_mi_thunk): Pass extra temporary registers to the
32760 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
32761 IP0 and IP1 values for SVE frames.
32762 (aarch64_expand_vec_series): New function.
32763 (aarch64_expand_sve_widened_duplicate): Likewise.
32764 (aarch64_expand_sve_const_vector): Likewise.
32765 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
32766 Handle SVE constants. Use emit_move_insn to move a force_const_mem
32767 into the register, rather than emitting a SET directly.
32768 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
32769 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
32770 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
32771 (offset_9bit_signed_scaled_p): New functions.
32772 (aarch64_replicate_bitmask_imm): New function.
32773 (aarch64_bitmask_imm): Use it.
32774 (aarch64_cannot_force_const_mem): Reject expressions involving
32775 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
32776 (aarch64_classify_index): Handle SVE indices, by requiring
32777 a plain register index with a scale that matches the element size.
32778 (aarch64_classify_address): Handle SVE addresses. Assert that
32779 the mode of the address is VOIDmode or an integer mode.
32780 Update call to aarch64_classify_symbol.
32781 (aarch64_classify_symbolic_expression): Update call to
32782 aarch64_classify_symbol.
32783 (aarch64_const_vec_all_in_range_p): New function.
32784 (aarch64_print_vector_float_operand): Likewise.
32785 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
32786 "vN" for FP registers with SVE modes. Handle (const ...) vectors
32787 and the FP immediates 1.0 and 0.5.
32788 (aarch64_print_address_internal): Handle SVE addresses.
32789 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
32790 (aarch64_regno_regclass): Handle predicate registers.
32791 (aarch64_secondary_reload): Handle big-endian reloads of SVE
32793 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
32794 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
32795 (aarch64_convert_sve_vector_bits): New function.
32796 (aarch64_override_options): Use it to handle -msve-vector-bits=.
32797 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
32798 rather than an rtx.
32799 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
32800 Handle SVE vector and predicate modes. Accept VL-based constants
32801 that need only one temporary register, and VL offsets that require
32802 no temporary registers.
32803 (aarch64_conditional_register_usage): Mark the predicate registers
32804 as fixed if SVE isn't available.
32805 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
32806 Return true for SVE vector and predicate modes.
32807 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
32808 rather than an unsigned int. Handle SVE modes.
32809 (aarch64_preferred_simd_mode): Update call accordingly. Handle
32811 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
32813 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
32814 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
32815 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
32816 (aarch64_sve_float_mul_immediate_p): New functions.
32817 (aarch64_sve_valid_immediate): New function.
32818 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
32819 Explicitly reject structure modes. Check for INDEX constants.
32820 Handle PTRUE and PFALSE constants.
32821 (aarch64_check_zero_based_sve_index_immediate): New function.
32822 (aarch64_simd_imm_zero_p): Delete.
32823 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
32824 vector modes. Accept constants in the range of CNT[BHWD].
32825 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
32826 ask for an Advanced SIMD mode.
32827 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
32828 (aarch64_simd_vector_alignment): Handle SVE predicates.
32829 (aarch64_vectorize_preferred_vector_alignment): New function.
32830 (aarch64_simd_vector_alignment_reachable): Use it instead of
32832 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
32833 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
32835 (MAX_VECT_LEN): Delete.
32836 (expand_vec_perm_d): Add a vec_flags field.
32837 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
32838 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
32839 (aarch64_evpc_ext): Don't apply a big-endian lane correction
32841 (aarch64_evpc_rev): Rename to...
32842 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
32843 (aarch64_evpc_rev_global): New function.
32844 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
32845 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
32847 (aarch64_evpc_sve_tbl): New function.
32848 (aarch64_expand_vec_perm_const_1): Update after rename of
32849 aarch64_evpc_rev. Handle SVE permutes too, trying
32850 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
32851 than aarch64_evpc_tbl.
32852 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
32853 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
32854 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
32855 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
32856 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
32857 (aarch64_expand_sve_vcond): New functions.
32858 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
32859 of aarch64_vector_mode_p.
32860 (aarch64_dwarf_poly_indeterminate_value): New function.
32861 (aarch64_compute_pressure_classes): Likewise.
32862 (aarch64_can_change_mode_class): Likewise.
32863 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
32864 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
32865 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
32866 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
32867 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
32868 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
32869 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
32870 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
32872 (Dn, Dl, Dr): Accept const as well as const_vector.
32873 (Dz): Likewise. Compare against CONST0_RTX.
32874 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
32875 of "vector" where appropriate.
32876 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
32877 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
32878 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
32879 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
32880 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
32881 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
32882 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
32883 (v_int_equiv): Extend to SVE modes.
32884 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
32886 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
32887 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
32888 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
32889 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
32890 (SVE_COND_FP_CMP): New int iterators.
32891 (perm_hilo): Handle the new unpack unspecs.
32892 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
32894 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
32895 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
32896 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
32897 (aarch64_equality_operator, aarch64_constant_vector_operand)
32898 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
32899 (aarch64_sve_nonimmediate_operand): Likewise.
32900 (aarch64_sve_general_operand): Likewise.
32901 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
32902 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
32903 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
32904 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
32905 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
32906 (aarch64_sve_float_arith_immediate): Likewise.
32907 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
32908 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
32909 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
32910 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
32911 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
32912 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
32913 (aarch64_sve_float_arith_operand): Likewise.
32914 (aarch64_sve_float_arith_with_sub_operand): Likewise.
32915 (aarch64_sve_float_mul_operand): Likewise.
32916 (aarch64_sve_vec_perm_operand): Likewise.
32917 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
32918 (aarch64_mov_operand): Accept const_poly_int and const_vector.
32919 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
32920 as well as const_vector.
32921 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
32922 in file. Use CONST0_RTX and CONSTM1_RTX.
32923 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
32924 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
32925 Use aarch64_simd_imm_zero.
32926 * config/aarch64/aarch64-sve.md: New file.
32927 * config/aarch64/aarch64.md: Include it.
32928 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
32929 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
32930 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
32931 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
32932 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
32933 (sve): New attribute.
32934 (enabled): Disable instructions with the sve attribute unless
32936 (movqi, movhi): Pass CONST_POLY_INT operaneds through
32937 aarch64_expand_mov_immediate.
32938 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
32939 CNT[BHSD] immediates.
32940 (movti): Split CONST_POLY_INT moves into two halves.
32941 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
32942 Split additions that need a temporary here if the destination
32943 is the stack pointer.
32944 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
32945 (*add<mode>3_poly_1): New instruction.
32946 (set_clobber_cc): New expander.
32948 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32950 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
32951 parameter and use it instead of GET_MODE_SIZE (innermode). Use
32952 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
32953 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
32954 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
32955 Change innermode from fixed_mode_size to machine_mode.
32956 (simplify_subreg): Update call accordingly. Handle a constant-sized
32957 subreg of a variable-length CONST_VECTOR.
32959 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
32960 Alan Hayward <alan.hayward@arm.com>
32961 David Sherwood <david.sherwood@arm.com>
32963 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
32964 (add_offset_to_base): New function, split out from...
32965 (create_mem_ref): ...here. When handling a scale other than 1,
32966 check first whether the address is valid without the offset.
32967 Add it into the base if so, leaving the index and scale as-is.
32969 2018-01-12 Jakub Jelinek <jakub@redhat.com>
32972 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
32973 fold_for_warn before checking if arg2 is INTEGER_CST.
32975 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
32977 * config/rs6000/predicates.md (load_multiple_operation): Delete.
32978 (store_multiple_operation): Delete.
32979 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
32980 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
32981 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
32982 guarded by TARGET_STRING.
32983 (rs6000_output_load_multiple): Delete.
32984 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
32985 OPTION_MASK_STRING / TARGET_STRING handling.
32986 (print_operand) <'N', 'O'>: Add comment that these are unused now.
32987 (const rs6000_opt_masks) <"string">: Change mask to 0.
32988 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
32989 (MASK_STRING): Delete.
32990 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
32992 (load_multiple): Delete.
32999 (store_multiple): Delete.
33006 (movmemsi_8reg): Delete.
33007 (corresponding unnamed define_insn): Delete.
33008 (movmemsi_6reg): Delete.
33009 (corresponding unnamed define_insn): Delete.
33010 (movmemsi_4reg): Delete.
33011 (corresponding unnamed define_insn): Delete.
33012 (movmemsi_2reg): Delete.
33013 (corresponding unnamed define_insn): Delete.
33014 (movmemsi_1reg): Delete.
33015 (corresponding unnamed define_insn): Delete.
33016 * config/rs6000/rs6000.opt (mno-string): New.
33017 (mstring): Replace by deprecation warning stub.
33018 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
33020 2018-01-12 Jakub Jelinek <jakub@redhat.com>
33022 * regrename.c (regrename_do_replace): If replacing the same
33023 reg multiple times, try to reuse last created gen_raw_REG.
33026 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
33027 main to workaround a bug in GDB.
33029 2018-01-12 Tom de Vries <tom@codesourcery.com>
33032 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
33034 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
33036 PR rtl-optimization/80481
33037 * ira-color.c (get_cap_member): New function.
33038 (allocnos_conflict_by_live_ranges_p): Use it.
33039 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
33040 (setup_slot_coalesced_allocno_live_ranges): Ditto.
33042 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
33045 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
33046 (*saddl_se_1): Ditto.
33047 (*ssubsi_1): Ditto.
33048 (*ssubl_se_1): Ditto.
33050 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
33052 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
33053 rather than wi::to_widest for DR_INITs.
33054 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
33055 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
33056 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
33058 (vect_analyze_group_access_1): Note that here.
33060 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
33062 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
33063 polynomial type sizes.
33065 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
33067 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
33068 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
33069 (gimple_add_tmp_var): Likewise.
33071 2018-01-12 Martin Liska <mliska@suse.cz>
33073 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
33074 (gimple_alloc_sizes): Likewise.
33075 (dump_gimple_statistics): Use PRIu64 in printf format.
33076 * gimple.h: Change uint64_t to int.
33078 2018-01-12 Martin Liska <mliska@suse.cz>
33080 * tree-core.h: Use uint64_t instead of int.
33081 * tree.c (tree_node_counts): Likewise.
33082 (tree_node_sizes): Likewise.
33083 (dump_tree_statistics): Use PRIu64 in printf format.
33085 2018-01-12 Martin Liska <mliska@suse.cz>
33087 * Makefile.in: As qsort_chk is implemented in vec.c, add
33088 vec.o to linkage of gencfn-macros.
33089 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
33090 passing the info to record_node_allocation_statistics.
33091 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
33093 * ggc-common.c (struct ggc_usage): Add operator== and use
33094 it in operator< and compare function.
33095 * mem-stats.h (struct mem_usage): Likewise.
33096 * vec.c (struct vec_usage): Remove operator< and compare
33097 function. Can be simply inherited.
33099 2018-01-12 Martin Jambor <mjambor@suse.cz>
33102 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
33103 * tree-ssa-math-opts.c: Include domwalk.h.
33104 (convert_mult_to_fma_1): New function.
33105 (fma_transformation_info): New type.
33106 (fma_deferring_state): Likewise.
33107 (cancel_fma_deferring): New function.
33108 (result_of_phi): Likewise.
33109 (last_fma_candidate_feeds_initial_phi): Likewise.
33110 (convert_mult_to_fma): Added deferring logic, split actual
33111 transformation to convert_mult_to_fma_1.
33112 (math_opts_dom_walker): New type.
33113 (math_opts_dom_walker::after_dom_children): New method, body moved
33114 here from pass_optimize_widening_mul::execute, added deferring logic
33116 (pass_optimize_widening_mul::execute): Moved most of code to
33117 math_opts_dom_walker::after_dom_children.
33118 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
33119 * config/i386/i386.c (ix86_option_override_internal): Added
33120 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
33122 2018-01-12 Richard Biener <rguenther@suse.de>
33125 * dwarf2out.c (gen_variable_die): Do not reset old_die for
33126 inline instance vars.
33128 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
33131 * config/rx/rx.c (rx_is_restricted_memory_address):
33132 Handle SUBREG case.
33134 2018-01-12 Richard Biener <rguenther@suse.de>
33136 PR tree-optimization/80846
33137 * target.def (split_reduction): New target hook.
33138 * targhooks.c (default_split_reduction): New function.
33139 * targhooks.h (default_split_reduction): Declare.
33140 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
33141 target requests first reduce vectors by combining low and high
33143 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
33144 (get_vectype_for_scalar_type_and_size): Export.
33145 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
33146 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
33147 * doc/tm.texi: Regenerate.
33148 * config/i386/i386.c (ix86_split_reduction): Implement
33149 TARGET_VECTORIZE_SPLIT_REDUCTION.
33151 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
33154 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
33155 in PIC mode except for TARGET_VXWORKS_RTP.
33156 * config/sparc/sparc.c: Include cfgrtl.h.
33157 (TARGET_INIT_PIC_REG): Define.
33158 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
33159 (sparc_pic_register_p): New predicate.
33160 (sparc_legitimate_address_p): Use it.
33161 (sparc_legitimize_pic_address): Likewise.
33162 (sparc_delegitimize_address): Likewise.
33163 (sparc_mode_dependent_address_p): Likewise.
33164 (gen_load_pcrel_sym): Remove 4th parameter.
33165 (load_got_register): Adjust call to above. Remove obsolete stuff.
33166 (sparc_expand_prologue): Do not call load_got_register here.
33167 (sparc_flat_expand_prologue): Likewise.
33168 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
33169 (sparc_use_pseudo_pic_reg): New function.
33170 (sparc_init_pic_reg): Likewise.
33171 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
33172 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
33174 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
33176 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
33177 Add item for branch_cost.
33179 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
33181 PR rtl-optimization/83565
33182 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
33183 not extend the result to a larger mode for rotate operations.
33184 (num_sign_bit_copies1): Likewise.
33186 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
33189 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
33191 Use values-Xc.o for -pedantic.
33192 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
33194 2018-01-12 Martin Liska <mliska@suse.cz>
33197 * ipa-devirt.c (final_warning_record::grow_type_warnings):
33199 (possible_polymorphic_call_targets): Use it.
33200 (ipa_devirt): Likewise.
33202 2018-01-12 Martin Liska <mliska@suse.cz>
33204 * profile-count.h (enum profile_quality): Use 0 as invalid
33205 enum value of profile_quality.
33207 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
33209 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
33210 -mext-string options.
33212 2018-01-12 Richard Biener <rguenther@suse.de>
33214 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
33215 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
33216 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
33218 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
33220 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
33222 * configure.ac (--with-long-double-format): Add support for the
33223 configuration option to change the default long double format on
33225 * config.gcc (powerpc*-linux*-*): Likewise.
33226 * configure: Regenerate.
33227 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
33228 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
33229 used without modification.
33231 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
33233 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
33234 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
33235 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
33236 MISC_BUILTIN_SPEC_BARRIER.
33237 (rs6000_init_builtins): Likewise.
33238 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
33240 (speculation_barrier): New define_insn.
33241 * doc/extend.texi: Document __builtin_speculation_barrier.
33243 2018-01-11 Jakub Jelinek <jakub@redhat.com>
33246 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
33247 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
33248 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
33250 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
33251 integral modes instead of "ss" and "sd".
33252 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
33253 vectors with 32-bit and 64-bit elements.
33254 (vecdupssescalarmodesuffix): New mode attribute.
33255 (vec_dup<mode>): Use it.
33257 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
33260 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
33261 frame if argument is passed on stack.
33263 2018-01-11 Jakub Jelinek <jakub@redhat.com>
33266 * ree.c (combine_reaching_defs): Optimize also
33267 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
33268 reg2=any_extend(exp); reg1=reg2;, formatting fix.
33270 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
33272 PR middle-end/83189
33273 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
33275 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
33277 PR middle-end/83718
33278 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
33279 after they are computed.
33281 2018-01-11 Bin Cheng <bin.cheng@arm.com>
33283 PR tree-optimization/83695
33284 * gimple-loop-linterchange.cc
33285 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
33286 reset cached scev information after interchange.
33287 (pass_linterchange::execute): Remove call to scev_reset_htab.
33289 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33291 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
33292 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
33293 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
33294 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
33295 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
33296 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
33297 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
33298 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
33299 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
33300 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
33301 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
33302 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
33303 (V_lane_reg): Likewise.
33304 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
33306 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
33307 (vfmal_lane_low<mode>_intrinsic,
33308 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
33309 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
33310 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
33311 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
33312 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
33313 vfmsl_lane_high<mode>_intrinsic): New define_insns.
33315 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33317 * config/arm/arm-cpus.in (fp16fml): New feature.
33318 (ALL_SIMD): Add fp16fml.
33319 (armv8.2-a): Add fp16fml as an option.
33320 (armv8.3-a): Likewise.
33321 (armv8.4-a): Add fp16fml as part of fp16.
33322 * config/arm/arm.h (TARGET_FP16FML): Define.
33323 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
33325 * config/arm/arm-modes.def (V2HF): Define.
33326 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
33327 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
33328 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
33329 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
33330 vfmsl_low, vfmsl_high): New set of builtins.
33331 * config/arm/iterators.md (PLUSMINUS): New code iterator.
33332 (vfml_op): New code attribute.
33333 (VFMLHALVES): New int iterator.
33334 (VFML, VFMLSEL): New mode attributes.
33335 (V_reg): Define mapping for V2HF.
33336 (V_hi, V_lo): New mode attributes.
33337 (VF_constraint): Likewise.
33338 (vfml_half, vfml_half_selector): New int attributes.
33339 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
33341 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
33342 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
33344 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
33345 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
33346 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
33347 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
33349 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
33350 Document new effective target and option set.
33352 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33354 * config/arm/arm-cpus.in (armv8_4): New feature.
33355 (ARMv8_4a): New fgroup.
33356 (armv8.4-a): New arch.
33357 * config/arm/arm-tables.opt: Regenerate.
33358 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
33359 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
33360 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
33361 Add matching rules for -march=armv8.4-a and extensions.
33362 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
33364 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
33367 * config/rx/rx.md (BW): New mode attribute.
33368 (sync_lock_test_and_setsi): Add mode suffix to insn output.
33370 2018-01-11 Richard Biener <rguenther@suse.de>
33372 PR tree-optimization/83435
33373 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
33374 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
33375 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
33377 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33378 Alan Hayward <alan.hayward@arm.com>
33379 David Sherwood <david.sherwood@arm.com>
33381 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
33383 (aarch64_classify_address): Initialize it. Track polynomial offsets.
33384 (aarch64_print_address_internal): Use it to check for a zero offset.
33386 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33387 Alan Hayward <alan.hayward@arm.com>
33388 David Sherwood <david.sherwood@arm.com>
33390 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
33391 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
33392 Return a poly_int64 rather than a HOST_WIDE_INT.
33393 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
33394 rather than a HOST_WIDE_INT.
33395 * config/aarch64/aarch64.h (aarch64_frame): Protect with
33396 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
33397 hard_fp_offset, frame_size, initial_adjust, callee_offset and
33398 final_offset from HOST_WIDE_INT to poly_int64.
33399 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
33400 to_constant when getting the number of units in an Advanced SIMD
33402 (aarch64_builtin_vectorized_function): Check for a constant number
33404 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
33406 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
33407 attribute instead of GET_MODE_NUNITS.
33408 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
33409 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
33410 GET_MODE_SIZE for fixed-size registers.
33411 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
33412 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
33413 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
33414 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
33415 (aarch64_print_operand, aarch64_print_address_internal)
33416 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
33417 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
33418 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
33419 Handle polynomial GET_MODE_SIZE.
33420 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
33421 wider than SImode without modification.
33422 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
33423 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
33424 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
33425 passing and returning SVE modes.
33426 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
33427 rather than GEN_INT.
33428 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
33429 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
33430 (aarch64_allocate_and_probe_stack_space): Likewise.
33431 (aarch64_layout_frame): Cope with polynomial offsets.
33432 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
33433 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
33434 polynomial offsets.
33435 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
33436 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
33437 poly_int64 rather than a HOST_WIDE_INT.
33438 (aarch64_get_separate_components, aarch64_process_components)
33439 (aarch64_expand_prologue, aarch64_expand_epilogue)
33440 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
33441 (aarch64_anchor_offset): New function, split out from...
33442 (aarch64_legitimize_address): ...here.
33443 (aarch64_builtin_vectorization_cost): Handle polynomial
33444 TYPE_VECTOR_SUBPARTS.
33445 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
33447 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
33448 number of elements from the PARALLEL rather than the mode.
33449 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
33450 rather than GET_MODE_BITSIZE.
33451 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
33452 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
33453 (aarch64_expand_vec_perm_const_1): Handle polynomial
33454 d->perm.length () and d->perm elements.
33455 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
33456 Apply to_constant to d->perm elements.
33457 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
33458 polynomial CONST_VECTOR_NUNITS.
33459 (aarch64_move_pointer): Take amount as a poly_int64 rather
33461 (aarch64_progress_pointer): Avoid temporary variable.
33462 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
33463 the mode attribute instead of GET_MODE.
33465 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33466 Alan Hayward <alan.hayward@arm.com>
33467 David Sherwood <david.sherwood@arm.com>
33469 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
33470 x exists before using it.
33471 (aarch64_add_constant_internal): Rename to...
33472 (aarch64_add_offset_1): ...this. Replace regnum with separate
33473 src and dest rtxes. Handle the case in which they're different,
33474 including when the offset is zero. Replace scratchreg with an rtx.
33475 Use 2 additions if there is no spare register into which we can
33476 move a 16-bit constant.
33477 (aarch64_add_constant): Delete.
33478 (aarch64_add_offset): Replace reg with separate src and dest
33479 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
33480 Use aarch64_add_offset_1.
33481 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
33482 an rtx rather than an int. Take the delta as a poly_int64
33483 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
33484 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
33485 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
33486 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
33487 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
33488 and aarch64_add_sp.
33489 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
33490 aarch64_add_constant.
33492 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33494 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
33495 Use scalar_float_mode.
33497 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33499 * config/aarch64/aarch64-simd.md
33500 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
33501 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
33502 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
33503 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
33504 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
33505 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
33506 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
33507 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
33508 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
33509 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
33511 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
33514 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
33515 targ_options->x_arm_arch_string is non NULL.
33517 2018-01-11 Tamar Christina <tamar.christina@arm.com>
33519 * config/aarch64/aarch64.h
33520 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
33522 2018-01-11 Sudakshina Das <sudi.das@arm.com>
33525 * expmed.c (emit_store_flag_force): Swap if const op0
33526 and change VOIDmode to mode of op0.
33528 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
33530 PR rtl-optimization/83761
33531 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
33532 than bytes to mode_for_size.
33534 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
33536 PR middle-end/83189
33537 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
33538 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
33541 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
33543 PR middle-end/83575
33544 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
33545 when in layout mode.
33546 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
33547 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
33550 2018-01-10 Michael Collison <michael.collison@arm.com>
33552 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
33553 * config/aarch64/aarch64-option-extension.def: Add
33554 AARCH64_OPT_EXTENSION of 'fp16fml'.
33555 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33556 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
33557 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
33558 * config/aarch64/constraints.md (Ui7): New constraint.
33559 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
33560 (VFMLA_SEL_W): Ditto.
33563 (VFMLA16_LOW): New int iterator.
33564 (VFMLA16_HIGH): Ditto.
33565 (UNSPEC_FMLAL): New unspec.
33566 (UNSPEC_FMLSL): Ditto.
33567 (UNSPEC_FMLAL2): Ditto.
33568 (UNSPEC_FMLSL2): Ditto.
33569 (f16mac): New code attribute.
33570 * config/aarch64/aarch64-simd-builtins.def
33571 (aarch64_fmlal_lowv2sf): Ditto.
33572 (aarch64_fmlsl_lowv2sf): Ditto.
33573 (aarch64_fmlalq_lowv4sf): Ditto.
33574 (aarch64_fmlslq_lowv4sf): Ditto.
33575 (aarch64_fmlal_highv2sf): Ditto.
33576 (aarch64_fmlsl_highv2sf): Ditto.
33577 (aarch64_fmlalq_highv4sf): Ditto.
33578 (aarch64_fmlslq_highv4sf): Ditto.
33579 (aarch64_fmlal_lane_lowv2sf): Ditto.
33580 (aarch64_fmlsl_lane_lowv2sf): Ditto.
33581 (aarch64_fmlal_laneq_lowv2sf): Ditto.
33582 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
33583 (aarch64_fmlalq_lane_lowv4sf): Ditto.
33584 (aarch64_fmlsl_lane_lowv4sf): Ditto.
33585 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
33586 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
33587 (aarch64_fmlal_lane_highv2sf): Ditto.
33588 (aarch64_fmlsl_lane_highv2sf): Ditto.
33589 (aarch64_fmlal_laneq_highv2sf): Ditto.
33590 (aarch64_fmlsl_laneq_highv2sf): Ditto.
33591 (aarch64_fmlalq_lane_highv4sf): Ditto.
33592 (aarch64_fmlsl_lane_highv4sf): Ditto.
33593 (aarch64_fmlalq_laneq_highv4sf): Ditto.
33594 (aarch64_fmlsl_laneq_highv4sf): Ditto.
33595 * config/aarch64/aarch64-simd.md:
33596 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
33597 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
33598 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
33599 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
33600 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
33601 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
33602 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
33603 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
33604 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
33605 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
33606 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
33607 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
33608 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
33609 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
33610 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
33611 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
33612 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
33613 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
33614 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
33615 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
33616 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
33617 (vfmlsl_low_u32): Ditto.
33618 (vfmlalq_low_u32): Ditto.
33619 (vfmlslq_low_u32): Ditto.
33620 (vfmlal_high_u32): Ditto.
33621 (vfmlsl_high_u32): Ditto.
33622 (vfmlalq_high_u32): Ditto.
33623 (vfmlslq_high_u32): Ditto.
33624 (vfmlal_lane_low_u32): Ditto.
33625 (vfmlsl_lane_low_u32): Ditto.
33626 (vfmlal_laneq_low_u32): Ditto.
33627 (vfmlsl_laneq_low_u32): Ditto.
33628 (vfmlalq_lane_low_u32): Ditto.
33629 (vfmlslq_lane_low_u32): Ditto.
33630 (vfmlalq_laneq_low_u32): Ditto.
33631 (vfmlslq_laneq_low_u32): Ditto.
33632 (vfmlal_lane_high_u32): Ditto.
33633 (vfmlsl_lane_high_u32): Ditto.
33634 (vfmlal_laneq_high_u32): Ditto.
33635 (vfmlsl_laneq_high_u32): Ditto.
33636 (vfmlalq_lane_high_u32): Ditto.
33637 (vfmlslq_lane_high_u32): Ditto.
33638 (vfmlalq_laneq_high_u32): Ditto.
33639 (vfmlslq_laneq_high_u32): Ditto.
33640 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
33641 (AARCH64_FL_FOR_ARCH8_4): New.
33642 (AARCH64_ISA_F16FML): New ISA flag.
33643 (TARGET_F16FML): New feature flag for fp16fml.
33644 (doc/invoke.texi): Document new fp16fml option.
33646 2018-01-10 Michael Collison <michael.collison@arm.com>
33648 * config/aarch64/aarch64-builtins.c:
33649 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
33650 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33651 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
33652 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
33653 (AARCH64_ISA_SHA3): New ISA flag.
33654 (TARGET_SHA3): New feature flag for sha3.
33655 * config/aarch64/iterators.md (sha512_op): New int attribute.
33656 (CRYPTO_SHA512): New int iterator.
33657 (UNSPEC_SHA512H): New unspec.
33658 (UNSPEC_SHA512H2): Ditto.
33659 (UNSPEC_SHA512SU0): Ditto.
33660 (UNSPEC_SHA512SU1): Ditto.
33661 * config/aarch64/aarch64-simd-builtins.def
33662 (aarch64_crypto_sha512hqv2di): New builtin.
33663 (aarch64_crypto_sha512h2qv2di): Ditto.
33664 (aarch64_crypto_sha512su0qv2di): Ditto.
33665 (aarch64_crypto_sha512su1qv2di): Ditto.
33666 (aarch64_eor3qv8hi): Ditto.
33667 (aarch64_rax1qv2di): Ditto.
33668 (aarch64_xarqv2di): Ditto.
33669 (aarch64_bcaxqv8hi): Ditto.
33670 * config/aarch64/aarch64-simd.md:
33671 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
33672 (aarch64_crypto_sha512su0qv2di): Ditto.
33673 (aarch64_crypto_sha512su1qv2di): Ditto.
33674 (aarch64_eor3qv8hi): Ditto.
33675 (aarch64_rax1qv2di): Ditto.
33676 (aarch64_xarqv2di): Ditto.
33677 (aarch64_bcaxqv8hi): Ditto.
33678 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
33679 (vsha512h2q_u64): Ditto.
33680 (vsha512su0q_u64): Ditto.
33681 (vsha512su1q_u64): Ditto.
33682 (veor3q_u16): Ditto.
33683 (vrax1q_u64): Ditto.
33684 (vxarq_u64): Ditto.
33685 (vbcaxq_u16): Ditto.
33686 * config/arm/types.md (crypto_sha512): New type attribute.
33687 (crypto_sha3): Ditto.
33688 (doc/invoke.texi): Document new sha3 option.
33690 2018-01-10 Michael Collison <michael.collison@arm.com>
33692 * config/aarch64/aarch64-builtins.c:
33693 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
33694 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33695 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
33696 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
33697 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
33698 (AARCH64_ISA_SM4): New ISA flag.
33699 (TARGET_SM4): New feature flag for sm4.
33700 * config/aarch64/aarch64-simd-builtins.def
33701 (aarch64_sm3ss1qv4si): Ditto.
33702 (aarch64_sm3tt1aq4si): Ditto.
33703 (aarch64_sm3tt1bq4si): Ditto.
33704 (aarch64_sm3tt2aq4si): Ditto.
33705 (aarch64_sm3tt2bq4si): Ditto.
33706 (aarch64_sm3partw1qv4si): Ditto.
33707 (aarch64_sm3partw2qv4si): Ditto.
33708 (aarch64_sm4eqv4si): Ditto.
33709 (aarch64_sm4ekeyqv4si): Ditto.
33710 * config/aarch64/aarch64-simd.md:
33711 (aarch64_sm3ss1qv4si): Ditto.
33712 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
33713 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
33714 (aarch64_sm4eqv4si): Ditto.
33715 (aarch64_sm4ekeyqv4si): Ditto.
33716 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
33717 (sm3part_op): Ditto.
33718 (CRYPTO_SM3TT): Ditto.
33719 (CRYPTO_SM3PART): Ditto.
33720 (UNSPEC_SM3SS1): New unspec.
33721 (UNSPEC_SM3TT1A): Ditto.
33722 (UNSPEC_SM3TT1B): Ditto.
33723 (UNSPEC_SM3TT2A): Ditto.
33724 (UNSPEC_SM3TT2B): Ditto.
33725 (UNSPEC_SM3PARTW1): Ditto.
33726 (UNSPEC_SM3PARTW2): Ditto.
33727 (UNSPEC_SM4E): Ditto.
33728 (UNSPEC_SM4EKEY): Ditto.
33729 * config/aarch64/constraints.md (Ui2): New constraint.
33730 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
33731 * config/arm/types.md (crypto_sm3): New type attribute.
33732 (crypto_sm4): Ditto.
33733 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
33734 (vsm3tt1aq_u32): Ditto.
33735 (vsm3tt1bq_u32): Ditto.
33736 (vsm3tt2aq_u32): Ditto.
33737 (vsm3tt2bq_u32): Ditto.
33738 (vsm3partw1q_u32): Ditto.
33739 (vsm3partw2q_u32): Ditto.
33740 (vsm4eq_u32): Ditto.
33741 (vsm4ekeyq_u32): Ditto.
33742 (doc/invoke.texi): Document new sm4 option.
33744 2018-01-10 Michael Collison <michael.collison@arm.com>
33746 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
33747 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
33748 (AARCH64_FL_FOR_ARCH8_4): New.
33749 (AARCH64_FL_V8_4): New flag.
33750 (doc/invoke.texi): Document new armv8.4-a option.
33752 2018-01-10 Michael Collison <michael.collison@arm.com>
33754 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
33755 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
33756 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
33757 * config/aarch64/aarch64-option-extension.def: Add
33758 AARCH64_OPT_EXTENSION of 'sha2'.
33759 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
33760 (crypto): Disable sha2 and aes if crypto disabled.
33761 (crypto): Enable aes and sha2 if enabled.
33762 (simd): Disable sha2 and aes if simd disabled.
33763 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
33765 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
33766 (TARGET_SHA2): New feature flag for sha2.
33767 (TARGET_AES): New feature flag for aes.
33768 * config/aarch64/aarch64-simd.md:
33769 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
33770 conditional on TARGET_AES.
33771 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
33772 (aarch64_crypto_sha1hsi): Make pattern conditional
33774 (aarch64_crypto_sha1hv4si): Ditto.
33775 (aarch64_be_crypto_sha1hv4si): Ditto.
33776 (aarch64_crypto_sha1su1v4si): Ditto.
33777 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
33778 (aarch64_crypto_sha1su0v4si): Ditto.
33779 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
33780 (aarch64_crypto_sha256su0v4si): Ditto.
33781 (aarch64_crypto_sha256su1v4si): Ditto.
33782 (doc/invoke.texi): Document new aes and sha2 options.
33784 2018-01-10 Martin Sebor <msebor@redhat.com>
33786 PR tree-optimization/83781
33787 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
33790 2018-01-11 Martin Sebor <msebor@gmail.com>
33791 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
33793 PR tree-optimization/83501
33794 PR tree-optimization/81703
33796 * tree-ssa-strlen.c (get_string_cst): Rename...
33797 (get_string_len): ...to this. Handle global constants.
33798 (handle_char_store): Adjust.
33800 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
33801 Jim Wilson <jimw@sifive.com>
33803 * config/riscv/riscv-protos.h (riscv_output_return): New.
33804 * config/riscv/riscv.c (struct machine_function): New naked_p field.
33805 (riscv_attribute_table, riscv_output_return),
33806 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
33807 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
33808 (riscv_compute_frame_info): Only compute frame->mask if not a naked
33810 (riscv_expand_prologue): Add early return for naked function.
33811 (riscv_expand_epilogue): Likewise.
33812 (riscv_function_ok_for_sibcall): Return false for naked function.
33813 (riscv_set_current_function): New.
33814 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
33815 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
33816 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
33817 * doc/extend.texi (RISC-V Function Attributes): New.
33819 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
33821 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
33822 check for 128-bit long double before checking TCmode.
33823 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
33824 128-bit long doubles before checking TFmode or TCmode.
33825 (FLOAT128_IBM_P): Likewise.
33827 2018-01-10 Martin Sebor <msebor@redhat.com>
33829 PR tree-optimization/83671
33830 * builtins.c (c_strlen): Unconditionally return zero for the empty
33832 Use -Warray-bounds for warnings.
33833 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
33834 for non-constant array indices with COMPONENT_REF, arrays of
33835 arrays, and pointers to arrays.
33836 (gimple_fold_builtin_strlen): Determine and set length range for
33837 non-constant character arrays.
33839 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
33841 PR middle-end/81897
33842 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
33845 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
33847 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
33849 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
33852 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
33853 VECTOR_MEM_ALTIVEC_OR_VSX_P.
33854 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
33855 indexed_or_indirect_operand predicate.
33856 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
33857 (*vsx_le_perm_load_v8hi): Likewise.
33858 (*vsx_le_perm_load_v16qi): Likewise.
33859 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
33860 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
33861 (*vsx_le_perm_store_v8hi): Likewise.
33862 (*vsx_le_perm_store_v16qi): Likewise.
33863 (eight unnamed splitters): Likewise.
33865 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
33867 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
33868 * config/rs6000/emmintrin.h: Likewise.
33869 * config/rs6000/mmintrin.h: Likewise.
33870 * config/rs6000/xmmintrin.h: Likewise.
33872 2018-01-10 David Malcolm <dmalcolm@redhat.com>
33875 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
33877 * tree.c (tree_nop_conversion): Return true for location wrapper
33879 (maybe_wrap_with_location): New function.
33880 (selftest::check_strip_nops): New function.
33881 (selftest::test_location_wrappers): New function.
33882 (selftest::tree_c_tests): Call it.
33883 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
33884 (maybe_wrap_with_location): New decl.
33885 (EXPR_LOCATION_WRAPPER_P): New macro.
33886 (location_wrapper_p): New inline function.
33887 (tree_strip_any_location_wrapper): New inline function.
33889 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
33892 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
33893 stack_realign_offset for the largest alignment of stack slot
33895 (ix86_find_max_used_stack_alignment): New function.
33896 (ix86_finalize_stack_frame_flags): Use it. Set
33897 max_used_stack_alignment if we don't realign stack.
33898 * config/i386/i386.h (machine_function): Add
33899 max_used_stack_alignment.
33901 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
33903 * config/arm/arm.opt (-mbranch-cost): New option.
33904 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
33907 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
33910 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
33911 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
33913 2018-01-10 Richard Biener <rguenther@suse.de>
33916 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
33917 early out so it also covers the case where we have a non-NULL
33920 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
33922 PR tree-optimization/83753
33923 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
33924 for non-strided grouped accesses if the number of elements is 1.
33926 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
33929 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
33930 * i386.h (TARGET_USE_GATHER): Define.
33931 * x86-tune.def (X86_TUNE_USE_GATHER): New.
33933 2018-01-10 Martin Liska <mliska@suse.cz>
33936 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
33937 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
33939 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
33940 CLEANUP_NO_PARTITIONING is not set.
33942 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
33944 * doc/rtl.texi: Remove documentation of (const ...) wrappers
33945 for vectors, as a partial revert of r254296.
33946 * rtl.h (const_vec_p): Delete.
33947 (const_vec_duplicate_p): Don't test for vector CONSTs.
33948 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
33949 * expmed.c (make_tree): Likewise.
33952 * common.md (E, F): Use CONSTANT_P instead of checking for
33954 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
33955 checking for CONST_VECTOR.
33957 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
33959 PR middle-end/83575
33960 * predict.c (force_edge_cold): Handle in more sane way edges
33961 with no prediction.
33963 2018-01-09 Carl Love <cel@us.ibm.com>
33965 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
33967 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
33968 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
33969 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
33970 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
33971 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
33972 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
33973 * config/rs6000/rs6000-protos.h: Add extern defition for
33974 rs6000_generate_float2_double_code.
33975 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
33977 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
33978 (float2_v2df): Add define_expand.
33980 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
33983 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
33984 op_mode in the force_to_mode call.
33986 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
33988 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
33989 instead of checking each element individually.
33990 (aarch64_evpc_uzp): Likewise.
33991 (aarch64_evpc_zip): Likewise.
33992 (aarch64_evpc_ext): Likewise.
33993 (aarch64_evpc_rev): Likewise.
33994 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
33995 instead of checking each element individually. Return true without
33997 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
33998 whether all selected elements come from the same input, instead of
33999 checking each element individually. Remove calls to gen_rtx_REG,
34000 start_sequence and end_sequence and instead assert that no rtl is
34003 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
34005 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
34006 order of HIGH and CONST checks.
34008 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
34010 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
34011 if the destination isn't an SSA_NAME.
34013 2018-01-09 Richard Biener <rguenther@suse.de>
34015 PR tree-optimization/83668
34016 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
34018 (canonicalize_loop_form): ... here, renamed from ...
34019 (canonicalize_loop_closed_ssa_form): ... this and amended to
34020 swap successor edges for loop exit blocks to make us use
34021 the RPO order we need for initial schedule generation.
34023 2018-01-09 Joseph Myers <joseph@codesourcery.com>
34025 PR tree-optimization/64811
34026 * match.pd: When optimizing comparisons with Inf, avoid
34027 introducing or losing exceptions from comparisons with NaN.
34029 2018-01-09 Martin Liska <mliska@suse.cz>
34032 * asan.c (shadow_mem_size): Add gcc_assert.
34034 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
34036 Don't save registers in main().
34039 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
34040 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
34041 * config/avr/avr.c (avr_set_current_function): Don't error if
34042 naked, OS_task or OS_main are specified at the same time.
34043 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
34045 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
34047 * common/config/avr/avr-common.c (avr_option_optimization_table):
34048 Switch on -mmain-is-OS_task for optimizing compilations.
34050 2018-01-09 Richard Biener <rguenther@suse.de>
34052 PR tree-optimization/83572
34053 * graphite.c: Include cfganal.h.
34054 (graphite_transform_loops): Connect infinite loops to exit
34055 and remove fake edges at the end.
34057 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
34059 * ipa-inline.c (edge_badness): Revert accidental checkin.
34061 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
34064 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
34065 symbols; not inline clones.
34067 2018-01-09 Jakub Jelinek <jakub@redhat.com>
34070 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
34071 hard registers. Formatting fixes.
34073 PR preprocessor/83722
34074 * gcc.c (try_generate_repro): Pass
34075 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
34076 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
34079 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
34080 Kito Cheng <kito.cheng@gmail.com>
34082 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
34083 (riscv_leaf_function_p): Delete.
34084 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
34086 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
34088 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
34090 (do_ifelse): New function.
34091 (do_isel): New function.
34092 (do_sub3): New function.
34093 (do_add3): New function.
34094 (do_load_mask_compare): New function.
34095 (do_overlap_load_compare): New function.
34096 (expand_compare_loop): New function.
34097 (expand_block_compare): Call expand_compare_loop() when appropriate.
34098 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
34099 option description.
34100 (-mblock-compare-inline-loop-limit): New option.
34102 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
34105 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
34106 Reverse order of second and third operands in first alternative.
34107 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
34108 of first and second elements in UNSPEC_VPERMR vector.
34109 (altivec_expand_vec_perm_le): Likewise.
34111 2018-01-08 Jeff Law <law@redhat.com>
34113 PR rtl-optimizatin/81308
34114 * tree-switch-conversion.c (cfg_altered): New file scoped static.
34115 (process_switch): If group_case_labels makes a change, then set
34117 (pass_convert_switch::execute): If a switch is converted, then
34118 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
34120 PR rtl-optimization/81308
34121 * recog.c (split_all_insns): Conditionally cleanup the CFG after
34124 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
34126 PR target/83663 - Revert r255946
34127 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
34128 generation for cases where splatting a value is not useful.
34129 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
34130 across a vec_duplicate and a paradoxical subreg forming a vector
34131 mode to a vec_concat.
34133 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
34135 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
34136 -march=armv8.3-a variants.
34137 * config/arm/t-multilib: Likewise.
34138 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
34140 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
34142 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
34144 (cceq_ior_compare_complement): Give it a name so I can use it, and
34145 change boolean_or_operator predicate to boolean_operator so it can
34146 be used to generate a crand.
34147 (eqne): New code iterator.
34148 (bd/bd_neg): New code_attrs.
34149 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
34150 a single define_insn.
34151 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
34152 decrement (bdnzt/bdnzf/bdzt/bdzf).
34153 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
34154 with the new names of the branch decrement patterns, and added the
34155 names of the branch decrement conditional patterns.
34157 2018-01-08 Richard Biener <rguenther@suse.de>
34159 PR tree-optimization/83563
34160 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
34163 2018-01-08 Richard Biener <rguenther@suse.de>
34165 PR middle-end/83713
34166 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
34168 2018-01-08 Richard Biener <rguenther@suse.de>
34170 PR tree-optimization/83685
34171 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
34172 references to abnormals.
34174 2018-01-08 Richard Biener <rguenther@suse.de>
34177 * dwarf2out.c (output_indirect_strings): Handle empty
34178 skeleton_debug_str_hash.
34179 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
34181 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
34183 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
34184 (emit_store_direct): Likewise.
34185 (arc_trampoline_adjust_address): Likewise.
34186 (arc_asm_trampoline_template): New function.
34187 (arc_initialize_trampoline): Use asm_trampoline_template.
34188 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
34189 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
34190 * config/arc/arc.md (flush_icache): Delete pattern.
34192 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
34194 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
34195 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
34198 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
34201 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
34202 by not USED_FOR_TARGET.
34203 (make_pass_resolve_sw_modes): Likewise.
34205 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
34207 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
34210 2018-01-08 Richard Biener <rguenther@suse.de>
34212 PR middle-end/83580
34213 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
34215 2018-01-08 Richard Biener <rguenther@suse.de>
34217 PR middle-end/83517
34218 * match.pd ((t * 2) / 2) -> t): Add missing :c.
34220 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
34222 PR middle-end/81897
34223 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
34224 basic blocks with a small number of successors.
34225 (convert_control_dep_chain_into_preds): Improve handling of
34227 (dump_predicates): Split apart into...
34228 (dump_pred_chain): ...here...
34229 (dump_pred_info): ...and here.
34230 (can_one_predicate_be_invalidated_p): Add debugging printfs.
34231 (can_chain_union_be_invalidated_p): Improve check for invalidation
34233 (uninit_uses_cannot_happen): Avoid unnecessary if
34234 convert_control_dep_chain_into_preds yielded nothing.
34236 2018-01-06 Martin Sebor <msebor@redhat.com>
34238 PR tree-optimization/83640
34239 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
34240 subtracting negative offset from size.
34241 (builtin_access::overlap): Adjust offset bounds of the access to fall
34242 within the size of the object if possible.
34244 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
34246 PR rtl-optimization/83699
34247 * expmed.c (extract_bit_field_1): Restrict the vector usage of
34248 extract_bit_field_as_subreg to cases in which the extracted
34249 value is also a vector.
34251 * lra-constraints.c (process_alt_operands): Test for the equivalence
34252 substitutions when detecting a possible reload cycle.
34254 2018-01-06 Jakub Jelinek <jakub@redhat.com>
34257 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
34258 by default if flag_selective_schedling{,2}. Formatting fixes.
34260 PR rtl-optimization/83682
34261 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
34262 if it has non-VECTOR_MODE element mode.
34263 (vec_duplicate_p): Likewise.
34265 PR middle-end/83694
34266 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
34267 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
34269 2018-01-05 Jakub Jelinek <jakub@redhat.com>
34272 * config/i386/i386-builtin.def
34273 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
34274 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
34275 Require also OPTION_MASK_ISA_AVX512F in addition to
34276 OPTION_MASK_ISA_GFNI.
34277 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
34278 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
34279 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
34280 to OPTION_MASK_ISA_GFNI.
34281 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
34282 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
34283 OPTION_MASK_ISA_AVX512BW.
34284 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
34285 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
34286 addition to OPTION_MASK_ISA_GFNI.
34287 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
34288 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
34289 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
34290 to OPTION_MASK_ISA_GFNI.
34291 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
34292 a requirement for all ISAs rather than any of them with a few
34294 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
34296 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
34297 bitmasks to be enabled with 3 exceptions, instead of requiring any
34298 enabled ISA with lots of exceptions.
34299 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
34300 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
34301 Change avx512bw in isa attribute to avx512f.
34302 * config/i386/sgxintrin.h: Add license boilerplate.
34303 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
34304 to __AVX512F__ and __AVX512VL to __AVX512VL__.
34305 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
34306 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
34308 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
34309 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
34310 temporarily sse2 rather than sse if not enabled already.
34313 * config/i386/sse.md (VI248_VLBW): Rename to ...
34314 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
34315 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
34316 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
34317 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
34318 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
34319 mode iterator instead of VI248_VLBW.
34321 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
34323 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
34324 (record_modified): Skip clobbers; add debug output.
34325 (param_change_prob): Use sreal frequencies.
34327 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
34329 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
34330 punt for user-aligned variables.
34332 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
34334 * tree-chrec.c (chrec_contains_symbols): Return true for
34337 2018-01-05 Sudakshina Das <sudi.das@arm.com>
34340 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
34341 of (x|y) == x for BICS pattern.
34343 2018-01-05 Jakub Jelinek <jakub@redhat.com>
34345 PR tree-optimization/83605
34346 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
34347 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
34350 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
34352 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
34353 * config/epiphany/rtems.h: New file.
34355 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34356 Uros Bizjak <ubizjak@gmail.com>
34359 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
34360 QIreg_operand instead of register_operand predicate.
34361 * config/i386/i386.c (ix86_rop_should_change_byte_p,
34362 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
34363 comments instead of -fmitigate[-_]rop.
34365 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
34368 * cgraphunit.c (symbol_table::compile): Switch to text_section
34369 before calling assembly_start debug hook.
34370 * run-rtl-passes.c (run_rtl_passes): Likewise.
34373 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34375 * tree-vrp.c (extract_range_from_binary_expr_1): Check
34376 range_int_cst_p rather than !symbolic_range_p before calling
34377 extract_range_from_multiplicative_op_1.
34379 2018-01-04 Jeff Law <law@redhat.com>
34381 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
34382 redundant test in assertion.
34384 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34386 * doc/rtl.texi: Document machine_mode wrapper classes.
34388 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34390 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
34391 using tree_to_uhwi.
34393 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34395 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
34396 the VEC_PERM_EXPR fold to fail.
34398 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34401 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
34402 to switched_sections.
34404 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34407 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
34408 test for d.testing.
34410 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
34413 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
34414 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
34416 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34419 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
34420 is BLKmode and bitpos not zero or mode change is needed.
34422 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
34425 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
34428 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
34431 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
34432 instead of MULT rtx. Update all corresponding splitters.
34433 (*saddl_se): Ditto.
34434 (*ssub<modesuffix>): Ditto.
34435 (*ssubl_se): Ditto.
34436 (*cmp_sadd_di): Update split patterns.
34437 (*cmp_sadd_si): Ditto.
34438 (*cmp_sadd_sidi): Ditto.
34439 (*cmp_ssub_di): Ditto.
34440 (*cmp_ssub_si): Ditto.
34441 (*cmp_ssub_sidi): Ditto.
34442 * config/alpha/predicates.md (const23_operand): New predicate.
34443 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
34444 Look for ASHIFT, not MULT inner operand.
34445 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
34447 2018-01-04 Martin Liska <mliska@suse.cz>
34449 PR gcov-profile/83669
34450 * gcov.c (output_intermediate_file): Add version to intermediate
34452 * doc/gcov.texi: Document new field 'version' in intermediate
34453 file format. Fix location of '-k' option of gcov command.
34455 2018-01-04 Martin Liska <mliska@suse.cz>
34458 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
34460 2018-01-04 Jakub Jelinek <jakub@redhat.com>
34462 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
34464 2018-01-03 Martin Sebor <msebor@redhat.com>
34466 PR tree-optimization/83655
34467 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
34468 checking calls with invalid arguments.
34470 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34472 * tree-vect-stmts.c (vect_get_store_rhs): New function.
34473 (vectorizable_mask_load_store): Delete.
34474 (vectorizable_call): Return false for masked loads and stores.
34475 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
34476 instead of gimple_assign_rhs1.
34477 (vectorizable_load): Handle IFN_MASK_LOAD.
34478 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
34480 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34482 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
34484 (vectorizable_mask_load_store): ...here.
34485 (vectorizable_load): ...and here.
34487 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34489 * tree-vect-stmts.c (vect_build_all_ones_mask)
34490 (vect_build_zero_merge_argument): New functions, split out from...
34491 (vectorizable_load): ...here.
34493 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34495 * tree-vect-stmts.c (vect_check_store_rhs): New function,
34497 (vectorizable_mask_load_store): ...here.
34498 (vectorizable_store): ...and here.
34500 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34502 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
34504 (vectorizable_mask_load_store): ...here.
34506 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34508 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
34509 (vect_model_store_cost): Take a vec_load_store_type instead of a
34511 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
34512 (vect_model_store_cost): Take a vec_load_store_type instead of a
34514 (vectorizable_mask_load_store): Update accordingly.
34515 (vectorizable_store): Likewise.
34516 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
34518 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34520 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
34521 IFN_MASK_LOAD calls here rather than...
34522 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
34524 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34525 Alan Hayward <alan.hayward@arm.com>
34526 David Sherwood <david.sherwood@arm.com>
34528 * expmed.c (extract_bit_field_1): For vector extracts,
34529 fall back to extract_bit_field_as_subreg if vec_extract
34532 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34533 Alan Hayward <alan.hayward@arm.com>
34534 David Sherwood <david.sherwood@arm.com>
34536 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
34537 they are variable or constant sized.
34538 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
34539 slots for constant-sized data.
34541 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34542 Alan Hayward <alan.hayward@arm.com>
34543 David Sherwood <david.sherwood@arm.com>
34545 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
34546 handling COND_EXPRs with boolean comparisons, try to find a better
34547 basis for the mask type than the boolean itself.
34549 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34551 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
34552 is calculated and how it can be overridden.
34553 * genmodes.c (max_bitsize_mode_any_mode): New variable.
34554 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
34556 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
34559 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34560 Alan Hayward <alan.hayward@arm.com>
34561 David Sherwood <david.sherwood@arm.com>
34563 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
34564 Remove the mode argument.
34565 (aarch64_simd_valid_immediate): Remove the mode and inverse
34567 * config/aarch64/iterators.md (bitsize): New iterator.
34568 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
34569 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
34570 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
34571 aarch64_simd_valid_immediate.
34572 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
34573 (aarch64_reg_or_bic_imm): Likewise.
34574 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
34575 with an insn_type enum and msl with a modifier_type enum.
34576 Replace element_width with a scalar_mode. Change the shift
34577 to unsigned int. Add constructors for scalar_float_mode and
34578 scalar_int_mode elements.
34579 (aarch64_vect_float_const_representable_p): Delete.
34580 (aarch64_can_const_movi_rtx_p)
34581 (aarch64_simd_scalar_immediate_valid_for_move)
34582 (aarch64_simd_make_constant): Update call to
34583 aarch64_simd_valid_immediate.
34584 (aarch64_advsimd_valid_immediate_hs): New function.
34585 (aarch64_advsimd_valid_immediate): Likewise.
34586 (aarch64_simd_valid_immediate): Remove mode and inverse
34587 arguments. Rewrite to use the above. Use const_vec_duplicate_p
34588 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
34589 and aarch64_float_const_representable_p on the result.
34590 (aarch64_output_simd_mov_immediate): Remove mode argument.
34591 Update call to aarch64_simd_valid_immediate and use of
34592 simd_immediate_info.
34593 (aarch64_output_scalar_simd_mov_immediate): Update call
34596 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34597 Alan Hayward <alan.hayward@arm.com>
34598 David Sherwood <david.sherwood@arm.com>
34600 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
34601 (mode_nunits): Likewise CONST_MODE_NUNITS.
34602 * machmode.def (ADJUST_NUNITS): Document.
34603 * genmodes.c (mode_data::need_nunits_adj): New field.
34604 (blank_mode): Update accordingly.
34605 (adj_nunits): New variable.
34606 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
34608 (emit_mode_size_inline): Set need_bytesize_adj for all modes
34609 listed in adj_nunits.
34610 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
34611 listed in adj_nunits. Don't emit case statements for such modes.
34612 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
34613 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
34614 nothing if adj_nunits is nonnull.
34615 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
34616 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
34617 (emit_mode_fbit): Update use of print_maybe_const_decl.
34618 (emit_move_size): Likewise. Treat the array as non-const
34620 (emit_mode_adjustments): Handle adj_nunits.
34622 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34624 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
34625 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
34626 (VECTOR_MODES): Use it.
34627 (make_vector_modes): Take the prefix as an argument.
34629 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34630 Alan Hayward <alan.hayward@arm.com>
34631 David Sherwood <david.sherwood@arm.com>
34633 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
34634 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
34635 for MODE_VECTOR_BOOL.
34636 * machmode.def (VECTOR_BOOL_MODE): Document.
34637 * genmodes.c (VECTOR_BOOL_MODE): New macro.
34638 (make_vector_bool_mode): New function.
34639 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
34641 * lto-streamer-in.c (lto_input_mode_table): Likewise.
34642 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
34644 * stor-layout.c (int_mode_for_mode): Likewise.
34645 * tree.c (build_vector_type_for_mode): Likewise.
34646 * varasm.c (output_constant_pool_2): Likewise.
34647 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
34648 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
34649 for MODE_VECTOR_BOOL.
34650 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
34651 of mode class checks.
34652 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
34653 instead of a list of mode class checks.
34654 (expand_vector_scalar_condition): Likewise.
34655 (type_for_widest_vector_mode): Handle BImode as an inner mode.
34657 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34658 Alan Hayward <alan.hayward@arm.com>
34659 David Sherwood <david.sherwood@arm.com>
34661 * machmode.h (mode_size): Change from unsigned short to
34663 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
34664 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
34665 or if measurement_type is not polynomial.
34666 (fixed_size_mode::includes_p): Check for constant-sized modes.
34667 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
34668 return a poly_uint16 rather than an unsigned short.
34669 (emit_mode_size): Change the type of mode_size from unsigned short
34670 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
34671 (emit_mode_adjustments): Cope with polynomial vector sizes.
34672 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
34674 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
34676 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
34677 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
34678 * caller-save.c (setup_save_areas): Likewise.
34679 (replace_reg_with_saved_mem): Likewise.
34680 * calls.c (emit_library_call_value_1): Likewise.
34681 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
34682 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
34683 (gen_lowpart_for_combine): Likewise.
34684 * convert.c (convert_to_integer_1): Likewise.
34685 * cse.c (equiv_constant, cse_insn): Likewise.
34686 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
34687 (cselib_subst_to_values): Likewise.
34688 * dce.c (word_dce_process_block): Likewise.
34689 * df-problems.c (df_word_lr_mark_ref): Likewise.
34690 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
34691 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
34692 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
34693 (rtl_for_decl_location): Likewise.
34694 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
34695 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
34696 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
34697 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
34698 (expand_expr_real_1): Likewise.
34699 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
34700 (pad_below): Likewise.
34701 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
34702 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
34703 * ira.c (get_subreg_tracking_sizes): Likewise.
34704 * ira-build.c (ira_create_allocno_objects): Likewise.
34705 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
34706 (ira_sort_regnos_for_alter_reg): Likewise.
34707 * ira-costs.c (record_operand_costs): Likewise.
34708 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
34709 (resolve_simple_move): Likewise.
34710 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
34711 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
34712 (lra_constraints): Likewise.
34713 (CONST_POOL_OK_P): Reject variable-sized modes.
34714 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
34715 (add_pseudo_to_slot, lra_spill): Likewise.
34716 * omp-low.c (omp_clause_aligned_alignment): Likewise.
34717 * optabs-query.c (get_best_extraction_insn): Likewise.
34718 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
34719 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
34720 (expand_mult_highpart, valid_multiword_target_p): Likewise.
34721 * recog.c (offsettable_address_addr_space_p): Likewise.
34722 * regcprop.c (maybe_mode_change): Likewise.
34723 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
34724 * regrename.c (build_def_use): Likewise.
34725 * regstat.c (dump_reg_info): Likewise.
34726 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
34727 (find_reloads, find_reloads_subreg_address): Likewise.
34728 * reload1.c (eliminate_regs_1): Likewise.
34729 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
34730 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
34731 (simplify_binary_operation_1, simplify_subreg): Likewise.
34732 * targhooks.c (default_function_arg_padding): Likewise.
34733 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
34734 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
34735 (verify_gimple_assign_ternary): Likewise.
34736 * tree-inline.c (estimate_move_cost): Likewise.
34737 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34738 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
34739 (get_address_cost_ainc): Likewise.
34740 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
34741 (vect_supportable_dr_alignment): Likewise.
34742 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
34743 (vectorizable_reduction): Likewise.
34744 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
34745 (vectorizable_operation, vectorizable_load): Likewise.
34746 * tree.c (build_same_sized_truth_vector_type): Likewise.
34747 * valtrack.c (cleanup_auto_inc_dec): Likewise.
34748 * var-tracking.c (emit_note_insn_var_location): Likewise.
34749 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
34750 (ADDR_VEC_ALIGN): Likewise.
34752 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34753 Alan Hayward <alan.hayward@arm.com>
34754 David Sherwood <david.sherwood@arm.com>
34756 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
34758 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
34759 or if measurement_type is polynomial.
34760 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
34761 * combine.c (make_extraction): Likewise.
34762 * dse.c (find_shift_sequence): Likewise.
34763 * dwarf2out.c (mem_loc_descriptor): Likewise.
34764 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
34765 (extract_bit_field, extract_low_bits): Likewise.
34766 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
34767 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
34768 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
34769 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
34770 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
34771 * reload.c (find_reloads): Likewise.
34772 * reload1.c (alter_reg): Likewise.
34773 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
34774 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
34775 * tree-if-conv.c (predicate_mem_writes): Likewise.
34776 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
34777 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
34778 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
34779 * valtrack.c (dead_debug_insert_temp): Likewise.
34780 * varasm.c (mergeable_constant_section): Likewise.
34781 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
34783 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34784 Alan Hayward <alan.hayward@arm.com>
34785 David Sherwood <david.sherwood@arm.com>
34787 * expr.c (expand_assignment): Cope with polynomial mode sizes
34788 when assigning to a CONCAT.
34790 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34791 Alan Hayward <alan.hayward@arm.com>
34792 David Sherwood <david.sherwood@arm.com>
34794 * machmode.h (mode_precision): Change from unsigned short to
34796 (mode_to_precision): Return a poly_uint16 rather than an unsigned
34798 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
34799 or if measurement_type is not polynomial.
34800 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
34801 in which the mode is already known to be a scalar_int_mode.
34802 * genmodes.c (emit_mode_precision): Change the type of mode_precision
34803 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
34805 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
34806 for GET_MODE_PRECISION.
34807 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
34808 for GET_MODE_PRECISION.
34809 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
34811 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
34812 (expand_field_assignment, make_extraction): Likewise.
34813 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
34814 (get_last_value): Likewise.
34815 * convert.c (convert_to_integer_1): Likewise.
34816 * cse.c (cse_insn): Likewise.
34817 * expr.c (expand_expr_real_1): Likewise.
34818 * lra-constraints.c (simplify_operand_subreg): Likewise.
34819 * optabs-query.c (can_atomic_load_p): Likewise.
34820 * optabs.c (expand_atomic_load): Likewise.
34821 (expand_atomic_store): Likewise.
34822 * ree.c (combine_reaching_defs): Likewise.
34823 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
34824 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
34825 * tree.h (type_has_mode_precision_p): Likewise.
34826 * ubsan.c (instrument_si_overflow): Likewise.
34828 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34829 Alan Hayward <alan.hayward@arm.com>
34830 David Sherwood <david.sherwood@arm.com>
34832 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
34833 polynomial numbers of units.
34834 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
34835 (valid_vector_subparts_p): New function.
34836 (build_vector_type): Remove temporary shim and take the number
34837 of units as a poly_uint64 rather than an int.
34838 (build_opaque_vector_type): Take the number of units as a
34839 poly_uint64 rather than an int.
34840 * tree.c (build_vector_from_ctor): Handle polynomial
34841 TYPE_VECTOR_SUBPARTS.
34842 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
34843 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
34844 (build_vector_from_val): If the number of units is variable,
34845 use build_vec_duplicate_cst for constant operands and
34846 VEC_DUPLICATE_EXPR otherwise.
34847 (make_vector_type): Remove temporary is_constant ().
34848 (build_vector_type, build_opaque_vector_type): Take the number of
34849 units as a poly_uint64 rather than an int.
34850 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
34852 * cfgexpand.c (expand_debug_expr): Likewise.
34853 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
34854 (store_constructor, expand_expr_real_1): Likewise.
34855 (const_scalar_mask_from_tree): Likewise.
34856 * fold-const-call.c (fold_const_reduction): Likewise.
34857 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
34858 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
34859 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
34860 (fold_relational_const): Likewise.
34861 (native_interpret_vector): Likewise. Change the size from an
34862 int to an unsigned int.
34863 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
34864 TYPE_VECTOR_SUBPARTS.
34865 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
34866 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
34867 duplicating a non-constant operand into a variable-length vector.
34868 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
34869 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
34870 * ipa-icf.c (sem_variable::equals): Likewise.
34871 * match.pd: Likewise.
34872 * omp-simd-clone.c (simd_clone_subparts): Likewise.
34873 * print-tree.c (print_node): Likewise.
34874 * stor-layout.c (layout_type): Likewise.
34875 * targhooks.c (default_builtin_vectorization_cost): Likewise.
34876 * tree-cfg.c (verify_gimple_comparison): Likewise.
34877 (verify_gimple_assign_binary): Likewise.
34878 (verify_gimple_assign_ternary): Likewise.
34879 (verify_gimple_assign_single): Likewise.
34880 * tree-pretty-print.c (dump_generic_node): Likewise.
34881 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34882 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
34883 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
34884 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
34885 (vect_shift_permute_load_chain): Likewise.
34886 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
34887 (expand_vector_condition, optimize_vector_constructor): Likewise.
34888 (lower_vec_perm, get_compute_type): Likewise.
34889 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
34890 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
34891 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
34892 (vect_recog_mask_conversion_pattern): Likewise.
34893 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
34894 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
34895 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34896 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
34897 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
34898 (vectorizable_shift, vectorizable_operation, vectorizable_store)
34899 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
34900 (supportable_widening_operation): Likewise.
34901 (supportable_narrowing_operation): Likewise.
34902 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
34904 * varasm.c (output_constant): Likewise.
34906 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34907 Alan Hayward <alan.hayward@arm.com>
34908 David Sherwood <david.sherwood@arm.com>
34910 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
34911 so that both the length == 3 and length != 3 cases set up their
34912 own permute vectors. Add comments explaining why we know the
34913 number of elements is constant.
34914 (vect_permute_load_chain): Likewise.
34916 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34917 Alan Hayward <alan.hayward@arm.com>
34918 David Sherwood <david.sherwood@arm.com>
34920 * machmode.h (mode_nunits): Change from unsigned char to
34922 (ONLY_FIXED_SIZE_MODES): New macro.
34923 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
34924 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
34925 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
34927 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
34928 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
34929 or if measurement_type is not polynomial.
34930 * genmodes.c (ZERO_COEFFS): New macro.
34931 (emit_mode_nunits_inline): Make mode_nunits_inline return a
34933 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
34934 Use ZERO_COEFFS when emitting initializers.
34935 * data-streamer.h (bp_pack_poly_value): New function.
34936 (bp_unpack_poly_value): Likewise.
34937 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
34938 for GET_MODE_NUNITS.
34939 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
34940 for GET_MODE_NUNITS.
34941 * tree.c (make_vector_type): Remove temporary shim and make
34942 the real function take the number of units as a poly_uint64
34943 rather than an int.
34944 (build_vector_type_for_mode): Handle polynomial nunits.
34945 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
34946 * emit-rtl.c (const_vec_series_p_1): Likewise.
34947 (gen_rtx_CONST_VECTOR): Likewise.
34948 * fold-const.c (test_vec_duplicate_folding): Likewise.
34949 * genrecog.c (validate_pattern): Likewise.
34950 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
34951 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
34952 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
34953 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
34954 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
34955 * rtlanal.c (subreg_get_info): Likewise.
34956 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
34957 (vect_grouped_load_supported): Likewise.
34958 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
34959 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
34960 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
34961 (simplify_const_unary_operation, simplify_binary_operation_1)
34962 (simplify_const_binary_operation, simplify_ternary_operation)
34963 (test_vector_ops_duplicate, test_vector_ops): Likewise.
34964 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
34965 instead of CONST_VECTOR_NUNITS.
34966 * varasm.c (output_constant_pool_2): Likewise.
34967 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
34968 explicit-encoded elements in the XVEC for variable-length vectors.
34970 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34972 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
34974 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34975 Alan Hayward <alan.hayward@arm.com>
34976 David Sherwood <david.sherwood@arm.com>
34978 * coretypes.h (fixed_size_mode): Declare.
34979 (fixed_size_mode_pod): New typedef.
34980 * builtins.h (target_builtins::x_apply_args_mode)
34981 (target_builtins::x_apply_result_mode): Change type to
34982 fixed_size_mode_pod.
34983 * builtins.c (apply_args_size, apply_result_size, result_vector)
34984 (expand_builtin_apply_args_1, expand_builtin_apply)
34985 (expand_builtin_return): Update accordingly.
34987 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34989 * cse.c (hash_rtx_cb): Hash only the encoded elements.
34990 * cselib.c (cselib_hash_rtx): Likewise.
34991 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
34992 CONST_VECTOR encoding.
34994 2018-01-03 Jakub Jelinek <jakub@redhat.com>
34995 Jeff Law <law@redhat.com>
34998 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
34999 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
35000 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
35001 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
35004 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
35005 explicitly probe *sp in a noreturn function if there were any callee
35006 register saves or frame pointer is needed.
35008 2018-01-03 Jakub Jelinek <jakub@redhat.com>
35011 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
35012 BLKmode for ternary, binary or unary expressions.
35015 * var-tracking.c (delete_vta_debug_insn): New inline function.
35016 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
35017 insns from get_insns () to NULL instead of each bb separately.
35018 Use delete_vta_debug_insn. No longer static.
35019 (vt_debug_insns_local, variable_tracking_main_1): Adjust
35020 delete_vta_debug_insns callers.
35021 * rtl.h (delete_vta_debug_insns): Declare.
35022 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
35023 instead of variable_tracking_main.
35025 2018-01-03 Martin Sebor <msebor@redhat.com>
35027 PR tree-optimization/83603
35028 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
35029 arguments past the endof the argument list in functions declared
35030 without a prototype.
35031 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
35032 Avoid checking when arguments are null.
35034 2018-01-03 Martin Sebor <msebor@redhat.com>
35037 * doc/extend.texi (attribute const): Fix a typo.
35038 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
35039 issuing -Wsuggest-attribute for void functions.
35041 2018-01-03 Martin Sebor <msebor@redhat.com>
35043 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
35044 offset_int::from instead of wide_int::to_shwi.
35045 (maybe_diag_overlap): Remove assertion.
35046 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
35047 * gimple-ssa-sprintf.c (format_directive): Same.
35048 (parse_directive): Same.
35049 (sprintf_dom_walker::compute_format_length): Same.
35050 (try_substitute_return_value): Same.
35052 2018-01-03 Jeff Law <law@redhat.com>
35054 PR middle-end/83654
35055 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
35056 non-constant residual for zero at runtime and avoid probing in
35057 that case. Reorganize code for trailing problem to mirror handling
35060 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
35062 PR tree-optimization/83501
35063 * tree-ssa-strlen.c (get_string_cst): New.
35064 (handle_char_store): Call get_string_cst.
35066 2018-01-03 Martin Liska <mliska@suse.cz>
35068 PR tree-optimization/83593
35069 * tree-ssa-strlen.c: Include tree-cfg.h.
35070 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
35071 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
35072 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
35074 (strlen_dom_walker::before_dom_children): Call
35075 gimple_purge_dead_eh_edges. Dump tranformation with details
35077 (strlen_dom_walker::before_dom_children): Update call by adding
35078 new argument cleanup_eh.
35079 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
35081 2018-01-03 Martin Liska <mliska@suse.cz>
35084 * cif-code.def (VARIADIC_THUNK): New enum value.
35085 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
35088 2018-01-03 Jan Beulich <jbeulich@suse.com>
35090 * sse.md (mov<mode>_internal): Tighten condition for when to use
35091 vmovdqu<ssescalarsize> for TI and OI modes.
35093 2018-01-03 Jakub Jelinek <jakub@redhat.com>
35095 Update copyright years.
35097 2018-01-03 Martin Liska <mliska@suse.cz>
35100 * ipa-visibility.c (function_and_variable_visibility): Skip
35101 functions with noipa attribure.
35103 2018-01-03 Jakub Jelinek <jakub@redhat.com>
35105 * gcc.c (process_command): Update copyright notice dates.
35106 * gcov-dump.c (print_version): Ditto.
35107 * gcov.c (print_version): Ditto.
35108 * gcov-tool.c (print_version): Ditto.
35109 * gengtype.c (create_file): Ditto.
35110 * doc/cpp.texi: Bump @copying's copyright year.
35111 * doc/cppinternals.texi: Ditto.
35112 * doc/gcc.texi: Ditto.
35113 * doc/gccint.texi: Ditto.
35114 * doc/gcov.texi: Ditto.
35115 * doc/install.texi: Ditto.
35116 * doc/invoke.texi: Ditto.
35118 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35120 * vector-builder.h (vector_builder::m_full_nelts): Change from
35121 unsigned int to poly_uint64.
35122 (vector_builder::full_nelts): Update prototype accordingly.
35123 (vector_builder::new_vector): Likewise.
35124 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
35125 (vector_builder::operator ==): Likewise.
35126 (vector_builder::finalize): Likewise.
35127 * int-vector-builder.h (int_vector_builder::int_vector_builder):
35128 Take the number of elements as a poly_uint64 rather than an
35130 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
35131 from unsigned int to poly_uint64.
35132 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
35133 (vec_perm_indices::new_vector): Likewise.
35134 (vec_perm_indices::length): Likewise.
35135 (vec_perm_indices::nelts_per_input): Likewise.
35136 (vec_perm_indices::input_nelts): Likewise.
35137 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
35138 number of elements per input as a poly_uint64 rather than an
35139 unsigned int. Use the original encoding for variable-length
35140 vectors, rather than clamping each individual element.
35141 For the second and subsequent elements in each pattern,
35142 clamp the step and base before clamping their sum.
35143 (vec_perm_indices::series_p): Handle polynomial element counts.
35144 (vec_perm_indices::all_in_range_p): Likewise.
35145 (vec_perm_indices_to_tree): Likewise.
35146 (vec_perm_indices_to_rtx): Likewise.
35147 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
35148 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
35149 (tree_vector_builder::new_binary_operation): Handle polynomial
35150 element counts. Return false if we need to know the number
35151 of elements at compile time.
35152 * fold-const.c (fold_vec_perm): Punt if the number of elements
35153 isn't known at compile time.
35155 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35157 * vec-perm-indices.h (vec_perm_builder): Change element type
35158 from HOST_WIDE_INT to poly_int64.
35159 (vec_perm_indices::element_type): Update accordingly.
35160 (vec_perm_indices::clamp): Handle polynomial element_types.
35161 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
35162 (vec_perm_indices::all_in_range_p): Likewise.
35163 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
35165 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
35166 polynomial vec_perm_indices element types.
35167 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
35168 * fold-const.c (fold_vec_perm): Likewise.
35169 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
35170 * tree-vect-generic.c (lower_vec_perm): Likewise.
35171 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
35172 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
35173 element type to HOST_WIDE_INT.
35175 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35176 Alan Hayward <alan.hayward@arm.com>
35177 David Sherwood <david.sherwood@arm.com>
35179 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
35180 rather than an int. Use plus_constant.
35181 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
35182 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
35184 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35185 Alan Hayward <alan.hayward@arm.com>
35186 David Sherwood <david.sherwood@arm.com>
35188 * calls.c (emit_call_1, expand_call): Change struct_value_size from
35189 a HOST_WIDE_INT to a poly_int64.
35191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35192 Alan Hayward <alan.hayward@arm.com>
35193 David Sherwood <david.sherwood@arm.com>
35195 * calls.c (load_register_parameters): Cope with polynomial
35196 mode sizes. Require a constant size for BLKmode parameters
35197 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
35198 forces a parameter to be padded at the lsb end in order to
35199 fill a complete number of words, require the parameter size
35200 to be ordered wrt UNITS_PER_WORD.
35202 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35203 Alan Hayward <alan.hayward@arm.com>
35204 David Sherwood <david.sherwood@arm.com>
35206 * reload1.c (spill_stack_slot_width): Change element type
35207 from unsigned int to poly_uint64_pod.
35208 (alter_reg): Treat mode sizes as polynomial.
35210 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35211 Alan Hayward <alan.hayward@arm.com>
35212 David Sherwood <david.sherwood@arm.com>
35214 * reload.c (complex_word_subreg_p): New function.
35215 (reload_inner_reg_of_subreg, push_reload): Use it.
35217 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35218 Alan Hayward <alan.hayward@arm.com>
35219 David Sherwood <david.sherwood@arm.com>
35221 * lra-constraints.c (process_alt_operands): Reject matched
35222 operands whose sizes aren't ordered.
35223 (match_reload): Refer to this check here.
35225 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35226 Alan Hayward <alan.hayward@arm.com>
35227 David Sherwood <david.sherwood@arm.com>
35229 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
35230 that the mode size is in the set {1, 2, 4, 8, 16}.
35232 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35233 Alan Hayward <alan.hayward@arm.com>
35234 David Sherwood <david.sherwood@arm.com>
35236 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
35237 Use plus_constant instead of gen_rtx_PLUS.
35239 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35240 Alan Hayward <alan.hayward@arm.com>
35241 David Sherwood <david.sherwood@arm.com>
35243 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
35244 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
35245 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
35246 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
35247 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
35248 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
35249 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
35250 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
35251 * config/i386/i386.c (ix86_push_rounding): ...this new function.
35252 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
35254 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
35255 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
35256 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
35257 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
35258 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
35259 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
35260 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
35261 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
35262 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
35263 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
35265 * expr.c (emit_move_resolve_push): Treat the input and result
35266 of PUSH_ROUNDING as a poly_int64.
35267 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
35268 (emit_push_insn): Likewise.
35269 * lra-eliminations.c (mark_not_eliminable): Likewise.
35270 * recog.c (push_operand): Likewise.
35271 * reload1.c (elimination_effects): Likewise.
35272 * rtlanal.c (nonzero_bits1): Likewise.
35273 * calls.c (store_one_arg): Likewise. Require the padding to be
35274 known at compile time.
35276 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35277 Alan Hayward <alan.hayward@arm.com>
35278 David Sherwood <david.sherwood@arm.com>
35280 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
35281 Use plus_constant instead of gen_rtx_PLUS.
35283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35284 Alan Hayward <alan.hayward@arm.com>
35285 David Sherwood <david.sherwood@arm.com>
35287 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
35288 rather than an int.
35290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35291 Alan Hayward <alan.hayward@arm.com>
35292 David Sherwood <david.sherwood@arm.com>
35294 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
35295 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
35296 via stack temporaries. Treat the mode size as polynomial too.
35298 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35299 Alan Hayward <alan.hayward@arm.com>
35300 David Sherwood <david.sherwood@arm.com>
35302 * expr.c (expand_expr_real_2): When handling conversions involving
35303 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
35304 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
35305 as a poly_uint64 too.
35307 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35308 Alan Hayward <alan.hayward@arm.com>
35309 David Sherwood <david.sherwood@arm.com>
35311 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
35313 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35314 Alan Hayward <alan.hayward@arm.com>
35315 David Sherwood <david.sherwood@arm.com>
35317 * combine.c (can_change_dest_mode): Handle polynomial
35318 REGMODE_NATURAL_SIZE.
35319 * expmed.c (store_bit_field_1): Likewise.
35320 * expr.c (store_constructor): Likewise.
35321 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
35322 and polynomial REGMODE_NATURAL_SIZE.
35323 (gen_lowpart_common): Likewise.
35324 * reginfo.c (record_subregs_of_mode): Likewise.
35325 * rtlanal.c (read_modify_subreg_p): Likewise.
35327 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35328 Alan Hayward <alan.hayward@arm.com>
35329 David Sherwood <david.sherwood@arm.com>
35331 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
35332 numbers of elements.
35334 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35335 Alan Hayward <alan.hayward@arm.com>
35336 David Sherwood <david.sherwood@arm.com>
35338 * match.pd: Cope with polynomial numbers of vector elements.
35340 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35341 Alan Hayward <alan.hayward@arm.com>
35342 David Sherwood <david.sherwood@arm.com>
35344 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
35345 in a POINTER_PLUS_EXPR.
35347 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35348 Alan Hayward <alan.hayward@arm.com>
35349 David Sherwood <david.sherwood@arm.com>
35351 * omp-simd-clone.c (simd_clone_subparts): New function.
35352 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
35353 (ipa_simd_modify_function_body): Likewise.
35355 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35356 Alan Hayward <alan.hayward@arm.com>
35357 David Sherwood <david.sherwood@arm.com>
35359 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
35360 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
35361 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
35362 (expand_vector_condition, vector_element): Likewise.
35363 (subparts_gt): New function.
35364 (get_compute_type): Use subparts_gt.
35365 (count_type_subparts): Delete.
35366 (expand_vector_operations_1): Use subparts_gt instead of
35367 count_type_subparts.
35369 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35370 Alan Hayward <alan.hayward@arm.com>
35371 David Sherwood <david.sherwood@arm.com>
35373 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
35374 (vect_compile_time_alias): ...this new function. Do the calculation
35375 on poly_ints rather than trees.
35376 (vect_prune_runtime_alias_test_list): Update call accordingly.
35378 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35379 Alan Hayward <alan.hayward@arm.com>
35380 David Sherwood <david.sherwood@arm.com>
35382 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
35384 (vect_schedule_slp_instance): Likewise.
35386 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35387 Alan Hayward <alan.hayward@arm.com>
35388 David Sherwood <david.sherwood@arm.com>
35390 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
35391 constant and extern definitions for variable-length vectors.
35392 (vect_get_constant_vectors): Note that the number of units
35393 is known to be constant.
35395 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35396 Alan Hayward <alan.hayward@arm.com>
35397 David Sherwood <david.sherwood@arm.com>
35399 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
35400 of units as polynomial. Choose between WIDE and NARROW based
35403 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35404 Alan Hayward <alan.hayward@arm.com>
35405 David Sherwood <david.sherwood@arm.com>
35407 * tree-vect-stmts.c (simd_clone_subparts): New function.
35408 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
35410 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35411 Alan Hayward <alan.hayward@arm.com>
35412 David Sherwood <david.sherwood@arm.com>
35414 * tree-vect-stmts.c (vectorizable_call): Treat the number of
35415 vectors as polynomial. Use build_index_vector for
35416 IFN_GOMP_SIMD_LANE.
35418 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35419 Alan Hayward <alan.hayward@arm.com>
35420 David Sherwood <david.sherwood@arm.com>
35422 * tree-vect-stmts.c (get_load_store_type): Treat the number of
35423 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
35424 for variable-length vectors.
35425 (vectorizable_mask_load_store): Treat the number of units as
35426 polynomial, asserting that it is constant if the condition has
35427 already been enforced.
35428 (vectorizable_store, vectorizable_load): Likewise.
35430 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35431 Alan Hayward <alan.hayward@arm.com>
35432 David Sherwood <david.sherwood@arm.com>
35434 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
35435 of units as polynomial. Punt if we can't tell at compile time
35436 which vector contains the final result.
35438 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35439 Alan Hayward <alan.hayward@arm.com>
35440 David Sherwood <david.sherwood@arm.com>
35442 * tree-vect-loop.c (vectorizable_induction): Treat the number
35443 of units as polynomial. Punt on SLP inductions. Use an integer
35444 VEC_SERIES_EXPR for variable-length integer reductions. Use a
35445 cast of such a series for variable-length floating-point
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 * tree.h (build_index_vector): Declare.
35453 * tree.c (build_index_vector): New function.
35454 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
35455 of units as polynomial, forcibly converting it to a constant if
35456 vectorizable_reduction has already enforced the condition.
35457 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
35458 to create a {1,2,3,...} vector.
35459 (vectorizable_reduction): Treat the number of units as polynomial.
35460 Choose vectype_in based on the largest scalar element size rather
35461 than the smallest number of units. Enforce the restrictions
35464 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35465 Alan Hayward <alan.hayward@arm.com>
35466 David Sherwood <david.sherwood@arm.com>
35468 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
35469 number of units as polynomial.
35471 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35472 Alan Hayward <alan.hayward@arm.com>
35473 David Sherwood <david.sherwood@arm.com>
35475 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
35476 * target.def (autovectorize_vector_sizes): Return the vector sizes
35477 by pointer, using vector_sizes rather than a bitmask.
35478 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
35479 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
35480 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
35482 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
35483 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
35484 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
35485 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
35486 * omp-general.c (omp_max_vf): Likewise.
35487 * omp-low.c (omp_clause_aligned_alignment): Likewise.
35488 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
35489 * tree-vect-loop.c (vect_analyze_loop): Likewise.
35490 * tree-vect-slp.c (vect_slp_bb): Likewise.
35491 * doc/tm.texi: Regenerate.
35492 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
35494 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
35495 the vector size as a poly_uint64 rather than an unsigned int.
35496 (current_vector_size): Change from an unsigned int to a poly_uint64.
35497 (get_vectype_for_scalar_type): Update accordingly.
35498 * tree.h (build_truth_vector_type): Take the size and number of
35499 units as a poly_uint64 rather than an unsigned int.
35500 (build_vector_type): Add a temporary overload that takes
35501 the number of units as a poly_uint64 rather than an unsigned int.
35502 * tree.c (make_vector_type): Likewise.
35503 (build_truth_vector_type): Take the number of units as a poly_uint64
35504 rather than an unsigned int.
35506 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35507 Alan Hayward <alan.hayward@arm.com>
35508 David Sherwood <david.sherwood@arm.com>
35510 * target.def (get_mask_mode): Take the number of units and length
35511 as poly_uint64s rather than unsigned ints.
35512 * targhooks.h (default_get_mask_mode): Update accordingly.
35513 * targhooks.c (default_get_mask_mode): Likewise.
35514 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
35515 * doc/tm.texi: Regenerate.
35517 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35518 Alan Hayward <alan.hayward@arm.com>
35519 David Sherwood <david.sherwood@arm.com>
35521 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
35522 * omp-general.c (omp_max_vf): Likewise.
35523 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
35524 (expand_omp_simd): Handle polynomial safelen.
35525 * omp-low.c (omplow_simd_context): Add a default constructor.
35526 (omplow_simd_context::max_vf): Change from int to poly_uint64.
35527 (lower_rec_simd_input_clauses): Update accordingly.
35528 (lower_rec_input_clauses): Likewise.
35530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35531 Alan Hayward <alan.hayward@arm.com>
35532 David Sherwood <david.sherwood@arm.com>
35534 * tree-vectorizer.h (vect_nunits_for_cost): New function.
35535 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
35536 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
35537 (vect_analyze_slp_cost): Likewise.
35538 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
35539 (vect_model_load_cost): Likewise.
35541 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35542 Alan Hayward <alan.hayward@arm.com>
35543 David Sherwood <david.sherwood@arm.com>
35545 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
35546 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
35547 from an unsigned int * to a poly_uint64_pod *.
35548 (calculate_unrolling_factor): New function.
35549 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
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-vectorizer.h (_slp_instance::unrolling_factor): Change
35556 from an unsigned int to a poly_uint64.
35557 (_loop_vec_info::slp_unrolling_factor): Likewise.
35558 (_loop_vec_info::vectorization_factor): Change from an int
35560 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
35561 (vect_get_num_vectors): New function.
35562 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
35563 (vect_get_num_copies): Use vect_get_num_vectors.
35564 (vect_analyze_data_ref_dependences): Change max_vf from an int *
35565 to an unsigned int *.
35566 (vect_analyze_data_refs): Change min_vf from an int * to a
35568 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
35569 than an unsigned HOST_WIDE_INT.
35570 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
35571 (vect_analyze_data_ref_dependence): Change max_vf from an int *
35572 to an unsigned int *.
35573 (vect_analyze_data_ref_dependences): Likewise.
35574 (vect_compute_data_ref_alignment): Handle polynomial vf.
35575 (vect_enhance_data_refs_alignment): Likewise.
35576 (vect_prune_runtime_alias_test_list): Likewise.
35577 (vect_shift_permute_load_chain): Likewise.
35578 (vect_supportable_dr_alignment): Likewise.
35579 (dependence_distance_ge_vf): Take the vectorization factor as a
35580 poly_uint64 rather than an unsigned HOST_WIDE_INT.
35581 (vect_analyze_data_refs): Change min_vf from an int * to a
35583 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
35584 vfm1 as a poly_uint64 rather than an int. Make the same change
35585 for the returned bound_scalar.
35586 (vect_gen_vector_loop_niters): Handle polynomial vf.
35587 (vect_do_peeling): Likewise. Update call to
35588 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
35589 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
35591 * tree-vect-loop.c (vect_determine_vectorization_factor)
35592 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
35593 (vect_get_known_peeling_cost): Likewise.
35594 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
35595 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
35596 (vect_transform_loop): Likewise. Use the lowest possible VF when
35597 updating the upper bounds of the loop.
35598 (vect_min_worthwhile_factor): Make static. Return an unsigned int
35599 rather than an int.
35600 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
35601 polynomial unroll factors.
35602 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
35603 (vect_make_slp_decision): Likewise.
35604 (vect_supported_load_permutation_p): Likewise, and polynomial
35606 (vect_analyze_slp_cost): Handle polynomial vf.
35607 (vect_slp_analyze_node_operations): Likewise.
35608 (vect_slp_analyze_bb_1): Likewise.
35609 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
35610 than an unsigned HOST_WIDE_INT.
35611 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
35612 (vectorizable_load): Handle polynomial vf.
35613 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
35615 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
35617 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35618 Alan Hayward <alan.hayward@arm.com>
35619 David Sherwood <david.sherwood@arm.com>
35621 * match.pd: Handle bit operations involving three constants
35622 and try to fold one pair.
35624 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
35626 * tree-vect-loop-manip.c: Include gimple-fold.h.
35627 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
35628 niters_maybe_zero parameters. Handle other cases besides a step of 1.
35629 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
35630 Add a path that uses a step of VF instead of 1, but disable it
35632 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
35633 and niters_no_overflow parameters. Update calls to
35634 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
35635 Create a new SSA name if the latter choses to use a ste other
35636 than zero, and return it via niters_vector_mult_vf_var.
35637 * tree-vect-loop.c (vect_transform_loop): Update calls to
35638 vect_do_peeling, vect_gen_vector_loop_niters and
35639 slpeel_make_loop_iterate_ntimes.
35640 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
35641 (vect_gen_vector_loop_niters): Update declarations after above changes.
35643 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
35645 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
35646 128-bit round to integer instructions.
35647 (ceil<mode>2): Likewise.
35648 (btrunc<mode>2): Likewise.
35649 (round<mode>2): Likewise.
35651 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
35653 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
35654 unaligned VSX load/store on P8/P9.
35655 (expand_block_clear): Allow the use of unaligned VSX
35656 load/store on P8/P9.
35658 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
35660 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
35662 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
35663 swap associated with both a load and a store.
35665 2018-01-02 Andrew Waterman <andrew@sifive.com>
35667 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
35668 * config/riscv/riscv.md (clear_cache): Use it.
35670 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
35672 * web.c: Remove out-of-date comment.
35674 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35676 * expr.c (fixup_args_size_notes): Check that any existing
35677 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
35678 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
35679 (emit_single_push_insn): ...here.
35681 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35683 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
35684 (const_vector_encoded_nelts): New function.
35685 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
35686 (const_vector_int_elt, const_vector_elt): Declare.
35687 * emit-rtl.c (const_vector_int_elt_1): New function.
35688 (const_vector_elt): Likewise.
35689 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
35690 of CONST_VECTOR_ELT.
35692 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35694 * expr.c: Include rtx-vector-builder.h.
35695 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
35696 directly on the tree encoding.
35697 (const_vector_from_tree): Likewise.
35698 * optabs.c: Include rtx-vector-builder.h.
35699 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
35700 sequence of "u" values.
35701 * vec-perm-indices.c: Include rtx-vector-builder.h.
35702 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
35703 directly on the vec_perm_indices encoding.
35705 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35707 * doc/rtl.texi (const_vector): Describe new encoding scheme.
35708 * Makefile.in (OBJS): Add rtx-vector-builder.o.
35709 * rtx-vector-builder.h: New file.
35710 * rtx-vector-builder.c: Likewise.
35711 * rtl.h (rtx_def::u2): Add a const_vector field.
35712 (CONST_VECTOR_NPATTERNS): New macro.
35713 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
35714 (CONST_VECTOR_DUPLICATE_P): Likewise.
35715 (CONST_VECTOR_STEPPED_P): Likewise.
35716 (CONST_VECTOR_ENCODED_ELT): Likewise.
35717 (const_vec_duplicate_p): Check for a duplicated vector encoding.
35718 (unwrap_const_vec_duplicate): Likewise.
35719 (const_vec_series_p): Check for a non-duplicated vector encoding.
35720 Say that the function only returns true for integer vectors.
35721 * emit-rtl.c: Include rtx-vector-builder.h.
35722 (gen_const_vec_duplicate_1): Delete.
35723 (gen_const_vector): Call gen_const_vec_duplicate instead of
35724 gen_const_vec_duplicate_1.
35725 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
35726 (gen_const_vec_duplicate): Use rtx_vector_builder.
35727 (gen_const_vec_series): Likewise.
35728 (gen_rtx_CONST_VECTOR): Likewise.
35729 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
35730 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
35731 Build a new vector rather than modifying a CONST_VECTOR in-place.
35732 (handle_special_swappables): Update call accordingly.
35733 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
35734 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
35735 Build a new vector rather than modifying a CONST_VECTOR in-place.
35736 (handle_special_swappables): Update call accordingly.
35738 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35740 * simplify-rtx.c (simplify_const_binary_operation): Use
35741 CONST_VECTOR_ELT instead of XVECEXP.
35743 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35745 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
35746 the selector elements to be different from the data elements
35747 if the selector is a VECTOR_CST.
35748 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
35749 ssizetype for the selector.
35751 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35753 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
35754 before testing each element individually.
35755 * tree-vect-generic.c (lower_vec_perm): Likewise.
35757 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35759 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
35760 * selftest-run-tests.c (selftest::run_tests): Call it.
35761 * vector-builder.h (vector_builder::operator ==): New function.
35762 (vector_builder::operator !=): Likewise.
35763 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
35764 (vec_perm_indices::all_from_input_p): New function.
35765 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
35766 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
35767 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
35768 instead of reading the VECTOR_CST directly. Detect whether both
35769 vector inputs are the same before constructing the vec_perm_indices,
35770 and update the number of inputs argument accordingly. Use the
35771 utility functions added above. Only construct sel2 if we need to.
35773 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35775 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
35776 the broadcast of the low byte.
35777 (expand_mult_highpart): Use an explicit encoding for the permutes.
35778 * optabs-query.c (can_mult_highpart_p): Likewise.
35779 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
35780 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
35781 (vectorizable_bswap): Likewise.
35782 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
35783 explicit encoding for the power-of-2 permutes.
35784 (vect_permute_store_chain): Likewise.
35785 (vect_grouped_load_supported): Likewise.
35786 (vect_permute_load_chain): Likewise.
35788 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35790 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
35791 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
35792 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
35793 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
35794 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
35795 (vect_gen_perm_mask_any): Likewise.
35797 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35799 * int-vector-builder.h: New file.
35800 * vec-perm-indices.h: Include int-vector-builder.h.
35801 (vec_perm_indices): Redefine as an int_vector_builder.
35802 (auto_vec_perm_indices): Delete.
35803 (vec_perm_builder): Redefine as a stand-alone class.
35804 (vec_perm_indices::vec_perm_indices): New function.
35805 (vec_perm_indices::clamp): Likewise.
35806 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
35807 (vec_perm_indices::new_vector): New function.
35808 (vec_perm_indices::new_expanded_vector): Update for new
35809 vec_perm_indices class.
35810 (vec_perm_indices::rotate_inputs): New function.
35811 (vec_perm_indices::all_in_range_p): Operate directly on the
35812 encoded form, without computing elided elements.
35813 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
35814 encoding. Update for new vec_perm_indices class.
35815 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
35816 the given vec_perm_builder.
35817 (expand_vec_perm_var): Update vec_perm_builder constructor.
35818 (expand_mult_highpart): Use vec_perm_builder instead of
35819 auto_vec_perm_indices.
35820 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
35821 vec_perm_indices instead of auto_vec_perm_indices. Use a single
35822 or double series encoding as appropriate.
35823 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
35824 vec_perm_indices instead of auto_vec_perm_indices.
35825 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
35826 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
35827 (vect_permute_store_chain): Likewise.
35828 (vect_grouped_load_supported): Likewise.
35829 (vect_permute_load_chain): Likewise.
35830 (vect_shift_permute_load_chain): Likewise.
35831 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
35832 (vect_transform_slp_perm_load): Likewise.
35833 (vect_schedule_slp_instance): Likewise.
35834 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
35835 (vectorizable_mask_load_store): Likewise.
35836 (vectorizable_bswap): Likewise.
35837 (vectorizable_store): Likewise.
35838 (vectorizable_load): Likewise.
35839 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
35840 vec_perm_indices instead of auto_vec_perm_indices. Use
35841 tree_to_vec_perm_builder to read the vector from a tree.
35842 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
35843 vec_perm_builder instead of a vec_perm_indices.
35844 (have_whole_vector_shift): Use vec_perm_builder and
35845 vec_perm_indices instead of auto_vec_perm_indices. Leave the
35846 truncation to calc_vec_perm_mask_for_shift.
35847 (vect_create_epilog_for_reduction): Likewise.
35848 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
35849 from auto_vec_perm_indices to vec_perm_indices.
35850 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
35851 instead of changing individual elements.
35852 (aarch64_vectorize_vec_perm_const): Use new_vector to install
35853 the vector in d.perm.
35854 * config/arm/arm.c (expand_vec_perm_d::perm): Change
35855 from auto_vec_perm_indices to vec_perm_indices.
35856 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
35857 instead of changing individual elements.
35858 (arm_vectorize_vec_perm_const): Use new_vector to install
35859 the vector in d.perm.
35860 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
35861 Update vec_perm_builder constructor.
35862 (rs6000_expand_interleave): Likewise.
35863 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
35864 (rs6000_expand_interleave): Likewise.
35866 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35868 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
35869 to qimode could truncate the indices.
35870 * optabs.c (expand_vec_perm_var): Likewise.
35872 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
35874 * Makefile.in (OBJS): Add vec-perm-indices.o.
35875 * vec-perm-indices.h: New file.
35876 * vec-perm-indices.c: Likewise.
35877 * target.h (vec_perm_indices): Replace with a forward class
35879 (auto_vec_perm_indices): Move to vec-perm-indices.h.
35880 * optabs.h: Include vec-perm-indices.h.
35881 (expand_vec_perm): Delete.
35882 (selector_fits_mode_p, expand_vec_perm_var): Declare.
35883 (expand_vec_perm_const): Declare.
35884 * target.def (vec_perm_const_ok): Replace with...
35885 (vec_perm_const): ...this new hook.
35886 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
35887 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
35888 * doc/tm.texi: Regenerate.
35889 * optabs.def (vec_perm_const): Delete.
35890 * doc/md.texi (vec_perm_const): Likewise.
35891 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
35892 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
35893 expand_vec_perm for constant permutation vectors. Assert that
35894 the mode of variable permutation vectors is the integer equivalent
35895 of the mode that is being permuted.
35896 * optabs-query.h (selector_fits_mode_p): Declare.
35897 * optabs-query.c: Include vec-perm-indices.h.
35898 (selector_fits_mode_p): New function.
35899 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
35900 is defined, instead of checking whether the vec_perm_const_optab
35901 exists. Use targetm.vectorize.vec_perm_const instead of
35902 targetm.vectorize.vec_perm_const_ok. Check whether the indices
35903 fit in the vector mode before using a variable permute.
35904 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
35905 vec_perm_indices instead of an rtx.
35906 (expand_vec_perm): Replace with...
35907 (expand_vec_perm_const): ...this new function. Take the selector
35908 as a vec_perm_indices rather than an rtx. Also take the mode of
35909 the selector. Update call to shift_amt_for_vec_perm_mask.
35910 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
35911 Use vec_perm_indices::new_expanded_vector to expand the original
35912 selector into bytes. Check whether the indices fit in the vector
35913 mode before using a variable permute.
35914 (expand_vec_perm_var): Make global.
35915 (expand_mult_highpart): Use expand_vec_perm_const.
35916 * fold-const.c: Includes vec-perm-indices.h.
35917 * tree-ssa-forwprop.c: Likewise.
35918 * tree-vect-data-refs.c: Likewise.
35919 * tree-vect-generic.c: Likewise.
35920 * tree-vect-loop.c: Likewise.
35921 * tree-vect-slp.c: Likewise.
35922 * tree-vect-stmts.c: Likewise.
35923 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
35925 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
35926 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
35927 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
35928 (aarch64_vectorize_vec_perm_const): ...this new function.
35929 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
35930 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
35931 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
35932 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
35933 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
35934 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
35935 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
35937 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
35938 check for NEON modes.
35939 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
35940 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
35941 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
35942 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
35944 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
35945 the old VEC_PERM_CONST conditions.
35946 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
35947 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
35948 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
35949 (ia64_vectorize_vec_perm_const_ok): Merge into...
35950 (ia64_vectorize_vec_perm_const): ...this new function.
35951 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
35952 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
35953 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
35954 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
35955 * config/mips/mips.c (mips_expand_vec_perm_const)
35956 (mips_vectorize_vec_perm_const_ok): Merge into...
35957 (mips_vectorize_vec_perm_const): ...this new function.
35958 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
35959 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
35960 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
35961 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
35962 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
35963 (rs6000_expand_vec_perm_const): Delete.
35964 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
35966 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
35967 (altivec_expand_vec_perm_const_le): Take each operand individually.
35968 Operate on constant selectors rather than rtxes.
35969 (altivec_expand_vec_perm_const): Likewise. Update call to
35970 altivec_expand_vec_perm_const_le.
35971 (rs6000_expand_vec_perm_const): Delete.
35972 (rs6000_vectorize_vec_perm_const_ok): Delete.
35973 (rs6000_vectorize_vec_perm_const): New function.
35974 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
35975 an element count and rtx array.
35976 (rs6000_expand_extract_even): Update call accordingly.
35977 (rs6000_expand_interleave): Likewise.
35978 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
35979 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
35980 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
35981 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
35982 (rs6000_expand_vec_perm_const): Delete.
35983 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
35984 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
35985 (altivec_expand_vec_perm_const_le): Take each operand individually.
35986 Operate on constant selectors rather than rtxes.
35987 (altivec_expand_vec_perm_const): Likewise. Update call to
35988 altivec_expand_vec_perm_const_le.
35989 (rs6000_expand_vec_perm_const): Delete.
35990 (rs6000_vectorize_vec_perm_const_ok): Delete.
35991 (rs6000_vectorize_vec_perm_const): New function. Remove stray
35992 reference to the SPE evmerge intructions.
35993 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
35994 an element count and rtx array.
35995 (rs6000_expand_extract_even): Update call accordingly.
35996 (rs6000_expand_interleave): Likewise.
35997 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
35998 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
36000 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
36002 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36004 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
36005 vector mode and that that mode matches the mode of the data
36007 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
36008 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
36009 directly using expand_vec_perm_1 when forcing selectors into
36011 (expand_vec_perm_var): New function, split out from expand_vec_perm.
36013 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36015 * optabs-query.h (can_vec_perm_p): Delete.
36016 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
36017 * optabs-query.c (can_vec_perm_p): Split into...
36018 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
36019 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
36020 particular selector is valid.
36021 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
36022 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
36023 (vect_grouped_load_supported): Likewise.
36024 (vect_shift_permute_load_chain): Likewise.
36025 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
36026 (vect_transform_slp_perm_load): Likewise.
36027 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
36028 (vectorizable_bswap): Likewise.
36029 (vect_gen_perm_mask_checked): Likewise.
36030 * fold-const.c (fold_ternary_loc): Likewise. Don't take
36031 implementations of variable permutation vectors into account
36032 when deciding which selector to use.
36033 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
36034 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
36035 with a false third argument.
36036 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
36037 to test whether the constant selector is valid and can_vec_perm_var_p
36038 to test whether a variable selector is valid.
36040 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36042 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
36043 * optabs-query.c (can_vec_perm_p): Likewise.
36044 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
36045 instead of vec_perm_indices.
36046 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
36047 (vect_gen_perm_mask_checked): Likewise,
36048 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
36049 (vect_gen_perm_mask_checked): Likewise,
36051 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
36053 * optabs-query.h (qimode_for_vec_perm): Declare.
36054 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
36055 (qimode_for_vec_perm): ...this new function.
36056 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
36058 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
36060 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
36061 does not have a conditional at the top.
36063 2018-01-02 Richard Biener <rguenther@suse.de>
36065 * ipa-inline.c (big_speedup_p): Fix expression.
36067 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
36070 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
36073 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
36077 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
36078 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
36079 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
36080 cond_taken_branch_cost 3->4.
36082 2018-01-01 Jakub Jelinek <jakub@redhat.com>
36084 PR tree-optimization/83581
36085 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
36086 TODO_cleanup_cfg if any changes have been made.
36088 PR middle-end/83608
36089 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
36090 convert_modes if target mode has the right side, but different mode
36093 PR middle-end/83609
36094 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
36095 last argument when extracting from CONCAT. If either from_real or
36096 from_imag is NULL, use expansion through memory. If result is not
36097 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
36098 the parts directly to inner mode, if even that fails, use expansion
36101 PR middle-end/83623
36102 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
36103 check for bswap in mode rather than HImode and use that in expand_unop
36106 Copyright (C) 2018 Free Software Foundation, Inc.
36108 Copying and distribution of this file, with or without modification,
36109 are permitted in any medium without royalty provided the copyright
36110 notice and this notice are preserved.