1 2018-11-16 Richard Biener <rguenther@suse.de>
3 PR tree-optimization/88011
4 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
5 replacing set_value_range_to_undefined and
6 set_value_range_to_varying with method calls.
8 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
11 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
13 (*r<noxa>sbg_<mode>_sll): Likewise.
14 (*r<noxa>sbg_<mode>_srl): Likewise.
15 (*r<noxa>sbg_sidi_srl): New pattern.
17 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
19 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
20 Default to TARGET_VXWORKS_RTP.
21 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
22 of TARGET_VXWORKS_RTP.
23 * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
24 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
25 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
27 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
30 * doc/extend.texi (Common Type Attributes): Make it explicit
31 that attribute "packed" can apply to C++ classes.
33 2018-11-15 Martin Sebor <msebor@redhat.com>
37 * tree.c (type_argument_type): New function.
38 * tree.h (type_argument_type): Declare it.
39 * gcc/doc/extend.texi (alloc_align): Update and clarify.
40 (alloc_size, nonnull, sentinel): Same.
42 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
43 Kwok Cheung Yeung <kcy@codesourcery.com>
45 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
46 int_mode_for_size fails.
47 (vectorizable_load): Likewise.
49 2018-11-15 David Malcolm <dmalcolm@redhat.com>
51 * doc/ux.texi (Group logically-related diagnostics): Move
52 discussion of auto_diagnostic_group into this new subsection.
53 Give an example of where this grouping is used.
55 2018-11-15 David Malcolm <dmalcolm@redhat.com>
58 * Makefile.in (OBJS): Move json.o to...
59 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
60 * common.opt (fdiagnostics-format=): New option.
61 (diagnostics_output_format): New enum.
62 * diagnostic-format-json.cc: New file.
63 * diagnostic.c (default_diagnostic_final_cb): New function, taken
64 from start of diagnostic_finish.
65 (diagnostic_initialize): Initialize final_cb to
66 default_diagnostic_final_cb.
67 (diagnostic_finish): Move "being treated as errors" messages to
68 default_diagnostic_final_cb. Call any final_cb.
69 (default_diagnostic_finalizer): Add diagnostic_t param.
70 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
71 diagnostic_finalizer callback.
72 * diagnostic.h (enum diagnostics_output_format): New enum.
73 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
74 (struct diagnostic_context): Add "final_cb".
75 (default_diagnostic_finalizer): Add diagnostic_t param.
76 (diagnostic_output_format_init): New decl.
77 * doc/invoke.texi (-fdiagnostics-format): New option.
78 * dwarf2out.c (gen_producer_string): Ignore
79 OPT_fdiagnostics_format_.
80 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
81 * lto-wrapper.c (append_diag_options): Ignore it.
82 * opts.c (common_handle_option): Handle it.
84 2018-11-15 David Malcolm <dmalcolm@redhat.com>
86 PR tree-optimization/88015
87 * graphite-isl-ast-to-gimple.c
88 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
90 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
92 2018-11-15 Richard Biener <rguenther@suse.de>
95 * gimple.c (gimple_call_flags): Union flags from decl, type
97 * trans-mem.c (is_tm_pure_call): Simplify.
99 2018-11-15 Richard Biener <rguenther@suse.de>
101 PR tree-optimization/88031
102 * tree-vect-loop.c (vectorizable_reduction): Move check
103 for multiple types earlier so we get the expected dump.
104 Simplify calls to vectorizable_condition.
105 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
106 * tree-vect-stmts.c (vectorizable_condition): Instead of
107 reduc_def and reduc_index take just a flag. Simplify
108 code-generation now that we can rely on the defs being set up.
109 (vectorizable_comparison): Remove unused argument.
111 2018-11-15 Richard Biener <rguenther@suse.de>
113 PR tree-optimization/88030
114 * tree-complex.c (need_eh_cleanup): New global.
115 (update_complex_assignment): Mark blocks that need EH update.
116 (expand_complex_comparison): Likewise.
117 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
118 perform EH cleanup and schedule CFG cleanup if that did anything.
120 2018-11-15 Jakub Jelinek <jakub@redhat.com>
122 PR rtl-optimization/88018
123 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
124 on the presence of fallthru edge, rather than if it is a USE or not.
126 2018-11-15 Richard Biener <rguenther@suse.de>
129 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
130 analyze_subscript_affine_affine properly.
132 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
134 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
135 (GLIBC_DYNAMIC_LINKER): Define.
136 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
138 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
140 PR tree-optimization/84648
141 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
142 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
143 by calling adjust_cond_for_loop_until_wrap.
145 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
148 * doc/extend.texi (Common Function Attributes): Clarify linker
149 restrictions on "aligned" attribute.
150 (Common Variable Attributes): Likewise. Mention that linker
151 restrictions don't apply to stack-allocated variables.
153 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
155 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
158 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
162 * doc/invoke.texi (Optimize Options): Remove bad example about
163 interaction between -flto and -O. Replace it with a note that
164 you need to compile with -O and not just link. Copy-edit -flto
165 discussion to reduce verbiage and improve flow.
167 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
170 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
171 also suppress many optimizations. Alphabetize option lists for
172 -O1, -O2, and -Os. Add list of options disabled with -Og, and
173 correct documentation for those options to say that.
174 * opts.c (default_options_table): Sort table by level and option
175 name, to make it easier to correlate to the manual.
177 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
179 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
180 printing of the names of segment registers.
182 2018-11-14 Nathan Sidwell <nathan@acm.org>
186 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
189 2018-11-14 David Malcolm <dmalcolm@redhat.com>
191 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
193 2018-11-14 Jakub Jelinek <jakub@redhat.com>
195 P1236R1 - Signed integers are two's complement
196 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
199 * hash-map.h (hash_map::iterator::reference_pair): New class.
200 (hash_map::iterator::operator*): Return it rather than std::pair.
202 2018-11-14 Jeff Law <law@redhat.com>
204 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
205 iff the operand is a constant.
207 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
209 * gimple-ssa-evrp-analyze.c
210 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
211 ignore_equivs_equal_p to equal_p.
212 * ipa-cp.c (meet_with_1): Use equal_p instead of
213 ignore_equivs_equal_p.
214 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
215 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
216 (value_range::operator==): Remove.
217 (value_range::operator!=): Remove.
218 (vrp_prop::visit_stmt): Use equal_p.
219 * tree-vrp.h (value_range): Remove operator==, operator!=,
220 ignore_equivs_equal_p.
221 * vr-values.c (update_value_range): Use equal_p.
223 2018-11-14 Michael Matz <matz@suse.de>
226 * gimplify.c (collect_fallthrough_labels): Add new argument,
227 return location via that, don't modify statements.
228 (warn_implicit_fallthrough_r): Adjust call, don't use
229 statement location directly.
231 2018-11-14 Richard Biener <rguenther@suse.de>
234 * tree-data-ref.c (split_constant_offset): Add wrapper
235 allocating a cache hash-map.
236 (split_constant_offset_1): Cache results of expanding
237 expressions from SSA def stmts.
239 2018-11-14 Richard Biener <rguenther@suse.de>
242 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
244 (lambda_vector_mult_const): Likewise.
245 (lambda_matrix_right_hermite): Use lambda_int temporaries.
247 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
248 Jackson Woodruff <jackson.woodruff@arm.com>
250 PR 71026/tree-optimization
251 * match.pd: Simplify floating point comparisons.
253 2018-11-14 Jakub Jelinek <jakub@redhat.com>
255 PR rtl-optimization/87817
256 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
257 last argument has low 8 bits clear, fold to 0.
259 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
261 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
262 MAX_OFILE_ALIGNMENT as needed.
264 2018-11-14 Richard Biener <rguenther@suse.de>
266 PR tree-optimization/88019
267 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
268 COND_EXPR arguments to non-trapping overflow.
270 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
272 * config/arc/arc.h (reg_class): Reorder registers classes, remove
273 unused register classes.
274 (REG_CLASS_NAMES): Likewise.
275 (REG_CLASS_CONTENTS): Likewise.
276 (FIXED_REGISTERS): Make lp_count fixed.
277 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
278 (PROGRAM_COUNTER_REGNO): Remove.
279 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
280 register classes, use constants for register numbers, remove
281 reg_class_contents references.
282 (arc_process_double_reg_moves): Add asserts.
283 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
284 lra_in_progress predicate.
285 (arc_init_reg_tables): Remove unused register classes.
286 (arc_register_move_cost): Likewise.
287 (arc_preferred_reload_class): Likewise.
288 (hwloop_optimize): Update rtx patterns involving lp_count register.
289 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
290 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
291 CHEAP_CORE_REGS. Former one will be used for LRA.
292 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
293 one will be used for LRA.
294 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
295 one will be used for LRA.
296 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
297 Former one will be used for LRA.
298 ("f"): Delete constraint.
301 ("l"): Change it from register constraint to constraint.
302 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
303 (movhi_insn): Likewise.
304 (movsi_insn): Update pattern.
307 (stack_tie): Remove 'b' constraint letter.
309 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
310 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
311 (R57_REG, R59_REG, PCL_REG): Likewise.
312 (ILINK1_REGNUM): Renamed to ILINK1_REG.
313 (ILINK2_REGNUM): Renamed to ILINK2_REG.
316 (Rcw): Remove unused reg classes.
317 * config/arc/predicates.md (dest_reg_operand): Just default on
318 register_operand predicate.
319 (mpy_dest_reg_operand): Likewise.
320 (move_dest_operand): Use macros instead of constants.
321 * config/arc/arc.opt (mlra): Switch to lra as default.
323 2018-11-14 Richard Biener <rguenther@suse.de>
325 PR tree-optimization/87974
326 * tree-vect-loop.c (vectorizable_reduction): When computing
327 the vectorized reduction PHI vector type ignore constant
330 2018-11-14 Jakub Jelinek <jakub@redhat.com>
332 PR tree-optimization/87977
333 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
334 stmt, build a new one and replace the old one with it. Formatting fix.
335 Call release_ssa_name (x) if !has_other_use and !delete_div.
336 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
337 verify lhs of stmt is still def.
339 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
341 PR rtl-optimization/87507
342 * lower-subreg.c (operand_for_swap_move_operator): New function.
343 (simple_move): Strip simple operators.
344 (find_pseudo_copy): Likewise.
345 (resolve_operand_for_swap_move_operator): New function.
346 (resolve_simple_move): Strip simple operators and swap operands.
348 2018-11-13 Jakub Jelinek <jakub@redhat.com>
350 PR tree-optimization/87898
351 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
352 (ipa_simd_modify_function_body): Remove debug stmts where the first
353 argument was changed into a non-decl.
355 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
357 PR rtl-optimization/87899
358 * lra-lives.c (start_living): Update white space in comment.
359 (enum point_type): New.
360 (sparseset_contains_pseudos_p): New function.
361 (update_pseudo_point): Likewise.
362 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
363 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
364 handling. Move early exit after adding conflicts.
365 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
366 if regno is already live. Remove all handling of program points.
367 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
368 after adding conflicts. Remove all handling of program points and
369 ignore_reg_for_conflicts.
370 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
371 and do not guard call to mark_pseudo_live.
372 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
373 and do not guard call to mark_pseudo_dead.
374 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
375 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
376 Use new function update_pseudo_point. Handle register copies by
377 removing the source register from the live set. Handle INOUT operands.
378 Update to the next program point using the unused_set, dead_set and
380 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
382 2018-11-13 David Malcolm <dmalcolm@redhat.com>
384 * builtins.c: Replace "source_location" with "location_t".
385 * diagnostic-show-locus.c: Likewise.
386 * diagnostic.c: Likewise.
387 * dumpfile.c: Likewise.
388 * gcc-rich-location.h: Likewise.
389 * genmatch.c: Likewise.
390 * gimple.h: Likewise.
391 * gimplify.c: Likewise.
393 * input.h: Likewise. Eliminate the typedef.
394 * omp-expand.c: Likewise.
395 * selftest.h: Likewise.
396 * substring-locations.h (get_source_location_for_substring):
398 (get_location_within_string): ...this.
399 * tree-cfg.c: Replace "source_location" with "location_t".
400 * tree-cfgcleanup.c: Likewise.
401 * tree-diagnostic.c: Likewise.
402 * tree-into-ssa.c: Likewise.
403 * tree-outof-ssa.c: Likewise.
404 * tree-parloops.c: Likewise.
405 * tree-phinodes.c: Likewise.
406 * tree-phinodes.h: Likewise.
407 * tree-ssa-loop-ivopts.c: Likewise.
408 * tree-ssa-loop-manip.c: Likewise.
409 * tree-ssa-phiopt.c: Likewise.
410 * tree-ssa-phiprop.c: Likewise.
411 * tree-ssa-threadupdate.c: Likewise.
412 * tree-ssa.c: Likewise.
413 * tree-ssa.h: Likewise.
414 * tree-vect-loop-manip.c: Likewise.
416 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
418 * doc/extend.texi: Fix typo in the weakref description.
420 2018-11-13 Richard Biener <rguenther@suse.de>
422 PR tree-optimization/86991
423 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
424 group building until we have successfully detected the SLP
426 (vect_is_simple_reduction): Remove fixup code here.
428 2018-11-13 David Malcolm <dmalcolm@redhat.com>
430 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
431 (dump_gimple_stmt): Use it.
432 (dump_gimple_stmt_loc): Likewise.
433 (dump_gimple_expr): Likewise.
434 (dump_gimple_expr_loc): Likewise.
435 (dump_generic_expr): Likewise.
436 (dump_generic_expr_loc): Likewise.
437 (dump_printf): Likewise.
438 (dump_printf_loc): Likewise.
439 (dump_dec): Likewise.
440 (dump_dec): Likewise.
441 (dump_hex): Likewise.
442 (dump_symtab_node): Likewise.
443 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
444 Guard dump call with dump_enabled_p.
445 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
446 * graphite-optimize-isl.c (optimize_isl): Likewise.
447 * graphite.c (graphite_transform_loops): Likewise.
448 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
449 * tree-parloops.c (parallelize_loops): Likewise.
450 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
451 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
452 (vect_prune_runtime_alias_test_list): Likewise.
453 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
454 (vect_estimate_min_profitable_iters): Likewise.
455 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
456 (vect_build_slp_tree_2): Likewise.
457 (vect_supported_load_permutation_p): Likewise.
458 (vect_slp_analyze_operations): Likewise.
459 (vect_slp_analyze_bb_1): Likewise.
460 (vect_slp_bb): Likewise.
461 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
462 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
463 (pass_slp_vectorize::execute): Likewise.
464 (increase_alignment): Likewise.
466 2018-11-13 David Malcolm <dmalcolm@redhat.com>
469 * ipa-inline.c (report_inline_failed_reason): Guard calls to
470 cl_target_option_print_diff and cl_optimization_print_diff with
473 2018-11-13 David Malcolm <dmalcolm@redhat.com>
475 * doc/invoke.texi (-fsave-optimization-record): Note that the
476 output is compressed.
477 * optinfo-emit-json.cc: Include <zlib.h>.
478 (optrecord_json_writer::write): Compress the output.
480 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
482 * tree-vrp.c (value_range_base::dump): Dump type.
483 Do not use INF nomenclature for 1-bit types.
484 (dump_value_range): Group all variants to common dumping code.
485 (debug): New overloaded functions for value_ranges.
486 (value_range_base::dump): Remove no argument version.
487 (value_range::dump): Same.
489 2018-11-13 Richard Biener <rguenther@suse.de>
491 PR tree-optimization/87931
492 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
493 nested cycles we support to latch computations vectorizable_reduction
496 2018-11-13 Martin Liska <mliska@suse.cz>
498 PR tree-optimization/87885
499 * cfghooks.c (account_profile_record): Rename
501 (profile_record_check_consistency): ... this.
502 Calculate missing num_mismatched_freq_in.
503 (profile_record_account_profile): New function
504 that calculates time and size of a function.
505 * cfghooks.h (struct profile_record): Remove
507 (struct cfg_hooks): Remove after_pass flag.
508 (account_profile_record): Rename to ...
509 (profile_record_check_consistency): ... this.
510 (profile_record_account_profile): New.
511 * cfgrtl.c (rtl_account_profile_record): Remove
513 * passes.c (check_profile_consistency): Do only
515 (account_profile): Calculate size and time of
517 (pass_manager::dump_profile_report): Reformat
519 (execute_one_ipa_transform_pass): Call
520 consistency check before clean upand call account_profile
521 after a clean up is done.
522 (execute_one_pass): Call check_profile_consistency and
523 account_profile instead of using after_pass flag..
524 * tree-cfg.c (gimple_account_profile_record): Likewise.
526 2018-11-13 Martin Liska <mliska@suse.cz>
529 * config/i386/i386.c (ix86_option_override_internal): Error
530 about usage -mabi=ms and -fsanitize={,kernel-}address.
532 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
534 * config/aarch64/aarch64.c
535 (aarch64_vectorize_preferred_vector_alignment): Change return type to
537 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
538 alignment being a poly int.
539 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
540 return type to poly_uint64.
541 * target.def (default_preferred_vector_alignment): Likewise.
542 * targhooks.c (default_preferred_vector_alignment): Likewise.
543 * targhooks.h (default_preferred_vector_alignment): Likewise.
544 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
545 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
547 (vect_update_misalignment_for_peel): Likewise.
548 (vect_enhance_data_refs_alignment): Likewise.
549 (vect_find_same_alignment_drs): Likewise.
550 (vect_duplicate_ssa_name_ptr_info): Likewise.
551 (vect_setup_realignment): Likewise.
552 (vect_can_force_dr_alignment_p): Change alignment parameter type to
554 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
555 mask with a compile time variable vector alignment.
556 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
558 (vect_do_peeling): Exit early if vector alignment is not constant.
559 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
561 (vectorizable_store): Likewise.
562 (vectorizable_load): Likweise.
563 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
565 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
567 (vect_can_force_dr_alignment_p): Change alignment parameter type to
570 2018-11-13 Richard Biener <rguenther@suse.de>
572 PR tree-optimization/87962
573 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
574 detect outer reduction for disqualifying in-loop uses.
576 2018-11-13 Richard Biener <rguenther@suse.de>
578 PR tree-optimization/87967
579 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
580 for constants for the scalar loop.
582 2018-11-13 Alan Modra <amodra@gmail.com>
584 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
585 integer constants when -mcmodel=medium.
587 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
589 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
590 * config/arc/elf.h (PROFILE_HOOK): Define.
591 * config/arc/linux.h (PROFILE_HOOK): Likewise.
593 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
595 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
596 jump table data in the text section.
598 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
600 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
601 to fit the eh_return pattern.
602 * config/arc/arc.md (eh_return): Define.
603 (VUNSPEC_ARC_EH_RETURN): Likewise.
604 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
606 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
609 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
611 * common/config/arc/arc-common.c (arc_option_optimization_table):
612 Millicode optimization is default on for size optimizations.
613 * config/arc/arc-protos.h (arc_check_multi): New function.
614 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
615 (ENTER_LEAVE_START_REG): Define.
616 (ENTER_LEAVE_END_REG): Likewise.
617 (arc_override_options): Disable millicode when long calls option
619 (arc_frame_info): Change it from int to bool.
620 (arc_compute_frame_size): Clean up.
621 (arc_save_restore): Remove.
622 (frame_save_reg): New function.
623 (frame_restore_reg): Likewise.
624 (arc_enter_leave_p): Likewise.
625 (arc_save_callee_saves): Likewise.
626 (arc_restore_callee_saves): Likewise.
627 (arc_save_callee_enter): Likewise.
628 (arc_restore_callee_leave): Likewise.
629 (arc_save_callee_milli): Likewise.
630 (arc_restore_callee_milli): Likewise.
631 (arc_expand_prologue): Reimplement to emit enter/leave
633 (arc_expand_epilogue): Likewise.
634 (arc_check_multi): New function.
635 * config/arc/arc.md (push_multi_fp): New pattern.
636 (push_multi_fp_blink): Likewise.
637 (pop_multi_fp): Likewise.
638 (pop_multi_fp_blink): Likewise.
639 (pop_multi_fp_ret): Likewise.
640 (pop_multi_fp_blink_ret): Likewise.
641 * config/arc/arc.opt (mmillicode): Update option.
642 (mcode-density-frame): New option.
643 * config/arc/predicates.md (push_multi_operand): New predicate.
644 (pop_multi_operand): Likewise.
645 * doc/invoke.texi (ARC): Update ARC options information.
648 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
650 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
651 * config/arc/arc.c (operands_ok_ldd_std): New function.
652 (mem_ok_for_ldd_std): Likewise.
653 (gen_operands_ldd_std): Likewise.
654 * config/arc/arc.md: Add peephole2 rules for std/ldd.
656 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
658 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
659 test on stack_usage_file.
660 (lang_dependent_init): Do not open the .su file if generating LTO.
662 2018-11-13 Jakub Jelinek <jakub@redhat.com>
664 PR rtl-optimization/87918
665 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
666 simplify_gen_relational rather than simplify_gen_binary.
668 2018-11-13 Richard Biener <rguenther@suse.de>
670 * tree-ssanames.h (set_range_info): Use value_range_base.
671 (get_range_info): Likewise.
672 * tree-ssanames.c (set_range_info): Likewise.
673 (get_range_info): Likewise.
674 * tree-vrp.c (value_range_base::union_helper): Split
675 out common parts of value_range[_base]::union_.
676 (value_range_base::union_): Update.
677 (value_range::union_): Likewise.
678 (determine_value_range_1): Use value_range_base.
679 (determine_value_range): Likewise.
680 * tree-vrp.h (value_range_base::union_helper): Move ...
681 (value_range::union_helper): ... from here.
683 2018-11-13 Alan Modra <amodra@gmail.com>
685 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
687 (rs6000_secondary_reload_gpr): Don't call find_replacement.
689 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
692 * doc/invoke.texi (Optimize Options): Clarify that the
693 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
694 apply to data cache size.
696 2018-11-13 Alan Modra <amodra@gmail.com>
698 * config/rs6000/predicates.md (logical_const_operand),
699 (logical_operand): Correct comment.
700 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
702 2018-11-13 Alan Modra <amodra@gmail.com>
704 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
706 2018-11-13 Alan Modra <amodra@gmail.com>
708 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
710 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
711 covered by alternative.
712 (movcc_internal1): Ignore h for register preference.
713 (mov<mode>_hardfloat64): Likewise.
714 (mov<mode>_softfloat): Ignore c, l, h for register preference.
716 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
718 PR preprocessor/47823
719 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
722 * doc/extend.texi (Pragmas): Note additional pragmas documented
725 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
729 * tree-scalar-evolution.c (expression_expensive_p): Make
730 BUILTIN POPCOUNT as expensive when backend does not define it.
732 2018-11-12 Fredrik Noring <noring@nocrew.org>
734 * config.gcc: Update with-llsc defaults for MIPS r5900.
736 2018-11-12 Martin Liska <mliska@suse.cz>
738 PR gcov-profile/87442
739 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
741 * doc/invoke.texi: Document them.
742 * tree-profile.c (parse_profile_filter): New.
743 (parse_profile_file_filtering): Likewise.
744 (release_profile_file_filtering): Likewise.
745 (include_source_file_for_profile): Likewise.
746 (tree_profiling): Filter source files based on the
749 2018-11-12 Martin Liska <mliska@suse.cz>
752 * doc/extend.texi: Add missing values for __builtin_cpu_is and
753 __builtin_cpu_supports for x86 target.
755 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
758 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
760 (Arithmetic): Likewise for "lo_sum".
762 2018-11-12 Renlin Li <renlin.li@arm.com>
765 * dse.c (get_stored_val): Add check for compile-time constantness
768 2018-11-12 Sudakshina Das <sudi.das@arm.com>
770 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
771 (ARMv8_5a): New fgroup.
772 (armv8.5-a): New arch.
773 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
775 * config/arm/arm-tables.opt: Regenerate.
776 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
777 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
778 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
779 Add matching rules for -march=armv8.5-a and extensions.
780 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
781 Add sb and predres to all armv8-a except armv8.5-a.
783 2018-11-12 Richard Biener <rguenther@suse.de>
785 * tree-vrp.h (value_range[_base]::set): Make public. Provide
786 overload for single value.
787 (value_range[_base]::set_nonnull): New.
788 (value_range[_base]::set_null): Likewise.
789 (value_range): Document bitmap copying behavior, mark
790 copy constructor and assignment operator deleted.
791 (value_range::move): New.
792 (value_range::set_and_canonicalize): Default bitmap to zero.
793 (set_value_range_to_nonnull): Remove.
794 (set_value_range_to_null): Likewise.
795 (set_value_range): Likewise.
796 (set_value_range_to_value): Likewise.
797 (extract_range_from_unary_expr): Work on value_range_base.
798 (extract_range_from_binary_expr_1): Likewise. Rename to...
799 (extract_range_from_binary_expr): ... this.
800 * tree-vrp.c (value_range::update): Clear equiv bitmap
802 (value_range::move): New, move equiv bitmap.
803 (value_range_base::set_undefined): Avoid assignment.
804 (value_range::set_undefined): Likewise.
805 (value_range_base::set_varying): Likewise.
806 (value_range::set_varying): Likewise.
807 (set_value_range): Remove.
808 (value_range_base::set): New overload for value.
809 (value_range::set): Likewise.
810 (set_value_range_to_nonnull): Remove.
811 (value_range_base::set_nonnull): New.
812 (value_range::set_nonnull): Likewise.
813 (set_value_range_to_null): Remove.
814 (value_range_base::set_null): New.
815 (value_range::set_null): Likewise.
816 (range_is_null): Work on value_range_base.
817 (range_is_nonnull): Likewise.
818 (ranges_from_anti_range): Likewise.
819 (extract_range_into_wide_ints): Likewise.
820 (extract_range_from_multiplicative_op): Likewise.
821 (extract_range_from_binary_expr): Likewise. Update for API changes.
822 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
824 (value_range::intersect_helper): Avoid copy and assignment.
825 (value_range::union_helper): Likewise.
826 (determine_value_range_1): Adjust.
827 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
828 Avoid assignment by using move.
829 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
830 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
832 * tree-ssanames.c (get_range_info): Likewise.
833 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
834 * vr-values.c (vr_values::get_value_range): Adjust.
835 (vr_values::update_value_range): Likewise.
836 (symbolic_range_based_on_p): Work on value_range_base.
837 (vr_values::extract_range_from_binary_expr): Use value_range_base.
838 (vr_values::extract_range_from_unary_expr): Likewise.
839 (vr_values::extract_range_from_cond_expr): Avoid assignment.
840 (vr_values::extract_range_from_comparison): Adjust.
841 (vr_values::check_for_binary_op_overflow): Use value_range_base.
842 (vr_values::extract_range_basic): Adjust.
843 (vr_values::adjust_range_with_scev): Likewise.
844 (vr_values::vrp_visit_assignment_or_call): Likewise.
845 (vr_values::get_vr_for_comparison): Change API to avoid
846 assignment and copy construction.
847 (vr_values::compare_name_with_value): Adjust accordingly.
848 (vr_values::compare_names): Likewise.
849 (vr_values::extract_range_from_phi_node): Avoid assignment and
850 bogus in-place modify of equiv bitmap.
851 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
852 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
853 for extract_range_from_unary_expr API change.
854 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
856 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
858 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
860 2018-11-12 Richard Biener <rguenther@suse.de>
862 * tree-vrp.h (value_range_base::symbolic_p,
863 value_range_base::constant_p, value_range_base::zero_p,
864 value_range_base::singleton_p): Move from value_range.
865 (value_range::dump): Add.
866 * gimple-ssa-evrp-analyze.c
867 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
868 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
869 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
871 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
872 (value_range::constant_p): Likewise.
873 (value_range::singleton_p): Likewise.
874 (value_range_base::dump): Add.
875 (set_value_range_to_undefined): Remove.
876 (set_value_range_to_varying): Likewise.
877 (range_int_cst_p): Take value_range_base argument.
878 (range_int_cst_singleton_p): Likewise.
879 (value_range_constant_singleton): Likewise.
880 (vrp_set_zero_nonzero_bits): Likewise.
881 (extract_range_from_multiplicative_op): Use set_varying.
882 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
883 (extract_range_from_unary_expr): Likewise.
884 (dump_value_range_base): Change to overload of dump_value_range.
885 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
886 (vrp_prop::visit_stmt): Likewise.
887 (value_range::intersect_helper): Likewise.
888 (value_range::union_helper): Likewise.
889 (determine_value_range_1): Likewise.
891 2018-11-12 Richard Biener <rguenther@suse.de>
893 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
894 (set_value_range_to_null): Likewise.
895 * vr-values.c (vr_values::extract_range_from_comparison):
896 Clear equiv for constant singleton ranges.
898 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
900 * config/i386/sse.md: Combine VFIXUPIMM* patterns
901 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
902 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
903 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
904 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
905 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
906 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
908 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
911 * doc/extend.texi (Common Type Attributes): For the align type
912 attribute, copy language about decreasing alignment from the
913 corresponding variable attribute.
915 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
917 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
920 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
923 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
924 -frtti and -fno-rtti code.
926 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
929 * doc/extend.texi (Other Builtins): Document probability associated
930 with __builtin_expect.
932 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
935 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
936 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
937 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
938 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
940 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
942 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
944 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
946 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
948 2018-11-11 Richard Biener <rguenther@suse.de>
950 * tree-vrp.h (class value_range_base): New base class for
951 value_range containing all but the m_equiv member.
952 (dump_value_range_base): Add.
953 (range_includes_zero_p): Work on value_range_base.
954 * tree-vrp.c (value_range_base::set): Split out base handling
956 (value_range::set): this.
957 (value_range::set_equiv): New.
958 (value_range_base::value_range_base): New constructors.
959 (value_range_base::check): Split out base handling from...
960 (value_range::check): this.
961 (value_range::equal_p): Refactor in terms of
962 ignore_equivs_equal_p which is now member of the base.
963 (value_range_base::set_undefined): New.
964 (value_range_base::set_varying): Likewise.
965 (value_range_base::dump):Split out base handling from...
966 (value_range::dump): this.
967 (value_range_base::set_and_canonicalize): Split out base handling
969 (value_range::set_and_canonicalize): this.
970 (value_range_base::union_): New.
971 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
973 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
974 instead of value_range everywhere.
975 (ipcp_vr_lattice::print): Use dump_value_range_base.
976 (ipcp_vr_lattice::meet_with): Adjust.
977 (ipcp_vr_lattice::meet_with_1): Likewise.
978 (ipa_vr_operation_and_type_effects): Likewise.
979 (propagate_vr_across_jump_function): Likewise.
980 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
981 (ipa_get_value_range): Likewise.
982 (ipa_set_jfunc_vr): Likewise.
983 (ipa_compute_jump_functions_for_edge): Likewise.
985 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
988 * doc/invoke.texi (Optimize Options): Add @opindex entries
989 for the positive forms of -fno-xxx and -mno-xxx options
990 that were lacking them.
992 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
994 * combine.c (make_more_copies): Only make an intermediate copy if the
995 dest of a move is a pseudo.
997 2018-11-09 Maya Rashish <coypu@sdf.org>
1000 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
1001 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
1003 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
1007 * doc/invoke.texi (Optimize Options): Clarify default behavior
1008 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
1010 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
1012 PR tree-optimization/87940
1013 * expr.c (string_constant): Don't strip NOPS in subexpressions.
1014 Fold PLUS_EXPR correctly.
1016 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
1019 * config/s390/s390.c (s390_safe_relative_long_p): New function.
1020 (annotate_constant_pool_refs): Skip insns which support
1021 relative addressing.
1022 (annotate_constant_pool_refs_1): New helper function.
1023 (find_constant_pool_ref): Skip insns which support relative
1025 (find_constant_pool_ref_1): New helper function.
1026 (replace_constant_pool_ref): Skip insns which support
1027 relative addressing.
1028 (replace_constant_pool_ref_1): New helper function.
1029 (s390_mainpool_start): Adapt to the new signature.
1030 (s390_mainpool_finish): Likewise.
1031 (s390_chunkify_start): Likewise.
1032 (s390_chunkify_finish): Likewise.
1033 (pass_s390_early_mach::execute): Likewise.
1034 (s390_prologue_plus_offset): Likewise.
1035 (s390_emit_prologue): Likewise.
1036 (s390_emit_epilogue): Likewise.
1038 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1040 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
1041 but unsupported lastprivate with conditional modifier.
1043 2018-11-09 Jeff Law <law@redhat.com>
1045 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
1046 unused argument better. Add gcc_unreachable to silence warning.
1048 2018-11-09 Martin Sebor <msebor@redhat.com>
1051 * attribs.c (has_attribute): New helper function.
1052 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
1053 * attribs.h (decls_mismatched_attributes): Declare.
1054 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
1055 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
1056 * common.opt (-Wattribute-alias): Take an argument.
1057 (-Wno-attribute-alias): New option.
1058 * doc/extend.texi (Common Function Attributes): Document copy.
1059 (Common Variable Attributes): Same.
1060 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
1061 (-Wattribute-alias): Document new option argument.
1063 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1065 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
1066 matching criteria. Remove unused array initializer.
1068 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
1069 Jinsong Ji <jji@us.ibm.com>
1071 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
1072 constraints by introducing a new temporary.
1073 (_mm_cvtss_si64): Likewise.
1075 2018-11-09 Martin Liska <mliska@suse.cz>
1077 * common.opt: Add -fipa-stack-alignment flag.
1078 * doc/invoke.texi: Document it.
1079 * final.c (rest_of_clean_state): Guard stack
1080 shrinking with flag.
1082 2018-11-09 Martin Liska <mliska@suse.cz>
1084 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
1086 (ipa_discover_variable_flags): ... this.
1087 * common.opt: Come up with new flag -fipa-reference-addressable.
1088 * doc/invoke.texi: Document it.
1089 * ipa-reference.c (propagate): Call the renamed fn.
1090 * ipa-visibility.c (whole_program_function_and_variable_visibility):
1092 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
1094 (ipa_discover_variable_flags): ... this. Discover
1095 non-addressable variables only with the newly added flag.
1096 * opts.c: Enable the newly added flag with -O1 and higher
1099 2018-11-09 David Malcolm <dmalcolm@redhat.com>
1101 * json.cc (selftest::test_writing_literals): Fix comment.
1103 2018-11-09 Martin Liska <mliska@suse.cz>
1105 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
1106 string to a stack buffer.
1107 (aarch64_parse_cpu): Likewise.
1108 (aarch64_parse_tune): Likewise.
1110 2018-11-09 Richard Biener <rguenther@suse.de>
1112 PR tree-optimization/87953
1113 * tree-vect-loop.c (vectorizable_reduction): For analysis
1114 always pass ops[0] to vectorizable_condition.
1116 2018-11-09 Stafford Horne <shorne@gmail.com>
1117 Richard Henderson <rth@twiddle.net>
1118 Joel Sherrill <joel@rtems.org>
1120 * common/config/or1k/or1k-common.c: New file.
1121 * config/or1k/*: New.
1122 * config.gcc (or1k*-*-*): New.
1123 * configure.ac (or1k*-*-*): New test for openrisc tls.
1124 * configure: Regenerated.
1125 * doc/install.texi: Document OpenRISC triplets.
1126 * doc/invoke.texi: Document OpenRISC arguments.
1127 * doc/md.texi: Document OpenRISC.
1129 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1131 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
1132 (arm7tdmi-s): Delete CPU.
1133 (arm710t): Add aliases for arm720t and arm740t.
1134 (arm720t, arm740t): Delete CPUs.
1135 (arm920t): Add aliases for arm920, arm922t and arm940t.
1136 (arm920, arm922t, arm940t): Delete CPUs.
1137 (arm10tdmi): Add alias for arm1020t.
1138 (arm1020t): Delete CPU.
1139 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
1140 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
1141 (arm10e): Add aliases for arm1020e and arm1022e.
1142 (arm1020e, arm1022e): Delete CPU.
1143 * config/arm/arm.md (generic_sched): Remove entries that are now
1145 (generic_vfp): Likewise.
1146 * config/arm/arm1020e.md: Simplify tuning selection based on alias
1148 * config/arm/arm-tune.md: Regenerated.
1149 * config/arm/arm-tables.opt: Regenerated.
1151 2018-11-09 Richard Biener <rguenther@suse.de>
1153 PR tree-optimization/87621
1154 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
1155 op with only phi inputs.
1156 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
1157 (ch_base::copy_headers): Run CSE on copied loop headers.
1158 (pass_ch_vect::process_loop_p): Simplify.
1160 2018-11-09 Alexandre Oliva <oliva@adacore.com>
1162 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
1163 for non-w64 x86_64 biarch.
1165 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
1167 PR rtl-optimization/86438
1168 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
1169 of in_b for the compare if in_b is SET_DEST.
1172 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
1173 non-toplevel UNSPEC.
1175 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1177 * tree-vrp.c (value_range::check): Do not access internals
1179 (value_range::singleton_p): Same.
1180 (value_range::type): Same.
1181 (vrp_finalize): Use value_range API.
1183 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1185 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
1187 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1189 * vr-values.c (vr_values::get_value_range): Use value_range API
1190 instead of piecing together ranges.
1191 (vr_values::update_value_range): Same.
1193 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1195 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
1196 of performing ad-hoc calculations.
1197 * tree-ssanames.c (set_range_info): New overloaded function
1198 accepting value_range &.
1199 (get_range_info): Same.
1200 * tree-ssanames.h (set_range_info_raw): Remove.
1201 (set_range_info): New prototype.
1202 (get_range_info): Same.
1203 * tree-vrp.h (value_range::null_p): Rename to zero_p.
1204 * tree-vrp.c (value_range::null_p): Same.
1206 2018-11-09 Jan Hubicka <jh@suse.cz>
1208 * tree.c (fld_type_variant_equal_p): Test user align flag.
1209 (flt_type_variant): Copy user align flag.
1210 (fld_incomplete_type_of): Clear it.
1212 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1214 * config/arm/neon.md (div<mode>3): New pattern.
1216 2018-11-08 Andi Kleen <ak@linux.intel.com>
1218 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
1219 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
1220 (ix86_handle_option): Handle OPT_mptwrite.
1221 * config/i386/cpuid.h (bit_PTWRITE): Add.
1222 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
1223 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
1224 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
1225 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
1226 (ix86_option_override_internal): Handle PTA_PTWRITE.
1227 (ix86_valid_target_attribute_inner_p): Define ptwrite.
1228 (def_builtin2): Force UINT64 to be 64bit only.
1229 * config/i386/i386.h (TARGET_PTWRITE): Add.
1230 (TARGET_PTWRITE_P): Add.
1232 * config/i386/i386.md: Define ptwrite.
1233 * config/i386/i386.opt: Add -mptwrite.
1234 * config/i386/immintrin.h (_ptwrite64): Add.
1236 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
1237 * doc/invoke.texi: Document -mptwrite.
1239 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
1241 PR rtl-optimization/87600
1242 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
1243 * lra-constraints.c (process_alt_operands): Skip illegal hard
1244 register usage. Prefer reloading non hard register operands.
1246 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
1249 * doc/invoke.texi (Optimize Options): Clarify default behavior
1250 for -fno-sched-interblock and -fno-sched-spec.
1252 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
1254 * collect2.c (linker_select): Add USE_LLD_LD.
1255 (ld_suffixes): Add ld.lld.
1256 (main): Handle -fuse-ld=lld.
1257 * common.opt (-fuse-ld=lld): New option.
1258 * doc/invoke.texi (-fuse-ld=lld): Document.
1259 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
1261 2018-11-08 Paul Koning <ni1d@arrl.net>
1263 * config/pdp11/constraints.md: Add "Z" series constraints for use
1264 with pre-dec and post-inc addressing.
1265 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
1266 (pdp11_expand_operands): Add int argument (word count).
1267 (pdp11_sp_frame_offset): Delete.
1268 (pdp11_cmp_length): New function.
1269 (pushpop_regeq): New function.
1270 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
1272 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
1274 (pdp11_initial_elimination_offset): Ditto.
1275 (pdp11_expand_operands): Add word count argument. Bugfixes.
1276 (output_move_multiple): Change how pointer adjustment is done.
1277 (pdp11_gen_int_label): Correct format.
1278 (output_ascii): Ditto.
1279 (pdp11_asm_output_var): Add code for DEC assembler case.
1280 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
1282 (legitimate_const_double_p): Ditto.
1283 (pdp11_register_move_cost): Adjust for new register classes.
1284 (pdp11_regno_reg_class): Ditto.
1285 (expand_block_move): Delete.
1286 (pushpop_regeq): New function.
1287 (pdp11_legitimate_address_p): Bugfix in check for constant
1289 (pdp11_sp_frame_offset): Delete.
1290 (pdp11_reg_save_size): New helper function for new frame layout.
1291 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
1292 (pdp11_expand_shift): Bugfix in check for constant shift count.
1293 (pdp11_shift_length): Ditto.
1294 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
1295 (pdp11_cmp_length): New function.
1296 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
1297 some compile options.
1298 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
1299 (CALL_USED_REGISTERS): Ditto.
1300 (ELIMINABLE_REGS): Ditto.
1301 (REGISTER_NAMES): Ditto.
1302 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
1304 (REG_CLASS_NAMES): Ditto.
1305 (REG_CLASS_CONTENTS): Ditto. Also remove
1306 HARD_FRAME_POINTER_REGNUM.
1307 (CPU_REG_CLASS): New macro.
1308 (CLASS_MAX_NREGS): Adjust for new register classes.
1309 (FUNCTION_PROFILER): Make no-op.
1310 (may_call_alloca): Remove unused declaration.
1311 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
1312 (ASM_OUTPUT_SKIP): Fix format.
1313 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
1314 (HARD_FRAME_POINTER_REGNUM): Remove.
1316 (*rts): Rename. Remove epilogue related checks.
1317 (cmpsi, cmpdi): New insn.
1318 (cbranch<mode>4): Change to apply to SI and DI modes as well.
1319 (mov<mode>): Change constraints to enforce that push/pop
1320 destination cannot use the same register as source.
1321 (*mov<mode><cc_cc>): Ditto.
1322 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
1323 at assembly output rather than as RTL expander.
1324 (zero_extendqihi2): Bugfix in check for same registers.
1325 (adddi3_nocc): Bugfix in check for constant operand.
1326 (addsi3_nocc): Ditto.
1327 (subdi3_nocc): Ditto.
1328 (subsi3_nocc): Ditto.
1329 (negdi2_nocc): Copy input to pdp11_expand_operands.
1330 (negsi2_nocc): Ditto.
1331 (bswap2_nocc): Ditto.
1332 * config/pdp11/pdp11.opt (mlra): Fix documentation.
1333 * config/pdp11/t-pdp11: Use -Os.
1335 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
1337 * config/arm/parsecpu.awk (/alias/): New parsing rule.
1338 (/begin cpu/): Check that the cpu name hasn't been previously defined.
1339 (gen_comm_data): Print out CPU alias tables.
1340 (check_cpu): Match aliases when checking the CPU name.
1341 * config/arm/arm-protos.h (cpu_alias): New structure.
1342 (cpu_option): Add entry for aliases.
1343 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
1344 strongarm1100 and strongarm1110.
1345 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
1346 (config/arm/arm-generic.md): Remove redundant references to
1347 strongarm110, strongarm1100 and strongarm1110.
1348 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
1349 Scan aliases for additional hints.
1350 (arm_parse_cpu_option_name): Also match a cpu name against the list
1352 * config/arm/arm-tables.opt: Regenerated.
1353 * config/arm/arm-tune.md: Regenerated.
1355 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1357 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
1358 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
1359 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1360 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
1361 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1362 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
1363 * gengtype.c (open_base_files): Add omp-general.h.
1364 * gimple.c (gimple_build_omp_critical):
1365 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
1366 gimple_omp_taskgroup_set_clauses.
1367 (gimple_build_omp_atomic_load): Add mo argument, call
1368 gimple_omp_atomic_set_memory_order.
1369 (gimple_build_omp_atomic_store): Likewise.
1370 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
1371 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
1373 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
1374 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
1375 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
1376 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
1377 different value for GF_OMP_ATOMIC_NEED_VALUE.
1378 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
1380 (struct gimple_statement_omp_single_layout): And remove here.
1381 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
1382 than gimple_statement_omp_single_layout.
1383 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
1385 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
1386 (gimple_omp_subcode): Formatting fix.
1387 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
1388 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
1389 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
1390 gimple_omp_teams_host, gimple_omp_teams_set_host,
1391 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
1392 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
1393 gimple_omp_taskgroup_set_clauses): New inline functions.
1394 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
1395 (gimple_build_omp_atomic_store): Likewise.
1396 (gimple_omp_atomic_seq_cst_p): Remove.
1397 (gimple_omp_atomic_memory_order): New function.
1398 (gimple_omp_atomic_set_seq_cst): Remove.
1399 (gimple_omp_atomic_set_memory_order): New function.
1400 (gimple_build_omp_taskgroup): Add clauses argument.
1401 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
1402 (dump_gimple_omp_task): Print taskwait with depend clauses.
1403 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
1404 dump_omp_atomic_memory_order.
1405 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
1406 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
1407 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
1408 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
1409 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
1410 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
1411 ORT_UNTIED_TASKLOOP enumerators.
1412 (enum gimplify_defaultmap_kind): New.
1413 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
1414 target_map_pointers_as_0len_arrays members, add defaultmap.
1415 (new_omp_context): Initialize defaultmap member.
1416 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1417 (maybe_fold_stmt): Don't fold even in host teams regions.
1418 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
1419 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
1420 ctx->omp_firstprivatize_variable.
1421 (omp_add_variable): Don't add private/firstprivate for VLAs in
1423 (omp_default_clause): Print "taskloop" rather than "task" if
1425 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1426 Handle new defaultmap clause kinds.
1427 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
1428 iterator to be lastprivate or private. Fix up diagnostics if linear
1429 is used on collapse>1 simd iterator.
1430 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1431 (gimplify_omp_depend): New function.
1432 (gimplify_scan_omp_clauses): Add shared clause on parallel for
1433 combined parallel master taskloop{, simd} if taskloop has
1434 firstprivate, lastprivate or reduction clause. Handle
1435 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
1436 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
1437 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
1438 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
1439 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
1441 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
1442 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
1443 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
1444 OMP_CLAUSE_{TASK,IN}_REDUCTION.
1445 (gimplify_omp_task): Handle taskwait with depend clauses.
1446 (gimplify_omp_for): Add shared clause on parallel for combined
1447 parallel master taskloop{, simd} if taskloop has firstprivate,
1448 lastprivate or reduction clause. Use ORT_TASKLOOP or
1449 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
1450 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
1451 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
1452 __for_end and __for_range temporaries on OMP_PARALLEL for
1453 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
1454 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
1455 sandwiched in between two taskloops.
1456 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
1457 instead of ctx->omp_firstprivatize_variable.
1458 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
1459 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
1460 host teams, use gimplify_and_return_first etc. for body like
1461 for target or target data constructs, and at the end call
1462 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
1463 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
1464 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
1465 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
1466 gimple_omp_atomic_set_seq_cst calls.
1467 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
1468 case, handle taskgroup clauses.
1469 * lto-streamer-out.c (hash_tree): Handle
1470 OMP_CLAUSE_{TASK,IN}_REDUCTION.
1471 * Makefile.in (GTFILES): Add omp-general.h.
1472 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
1473 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1474 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1475 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
1476 BUILT_IN_GOMP_LOOP_DOACROSS_START,
1477 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
1478 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1479 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1480 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1481 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
1482 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
1483 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
1484 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1485 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1486 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
1487 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
1488 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
1489 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
1490 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
1491 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
1492 * omp-expand.c (workshare_safe_to_combine_p): Return false for
1493 non-worksharing loops.
1494 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
1495 (determine_parallel_type): Don't combine parallel with worksharing
1496 which has _reductemp_ clause.
1497 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
1498 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
1499 if there is nonmonotonic modifier or if there is no modifier and no
1500 ordered clause. For dynamic and guided schedule without monotonic
1501 and nonmonotonic modifier, default to nonmonotonic.
1502 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
1503 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
1505 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
1506 there are any reduction clauses.
1507 (expand_taskwait_call): New function.
1508 (expand_teams_call): New function.
1509 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
1510 expand_teams_call for it. Formatting fix. Handle taskwait with
1512 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
1513 of worksharing loops with task reductions.
1514 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
1515 expansion of worksharing loops with task reductions.
1516 (expand_omp_sections): Handle expansion of sections with task
1518 (expand_omp_synch): For host teams call expand_omp_taskreg.
1519 (omp_memory_order_to_memmodel): New function.
1520 (expand_omp_atomic_load, expand_omp_atomic_store,
1521 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
1522 instead of gimple_omp_atomic_seq_cst_p.
1523 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
1524 depend clauses as a standalone directive.
1525 * omp-general.c (enum omp_requires): New variable.
1526 (omp_extract_for_data): Initialize have_reductemp member. Allow
1527 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
1528 GT_EXPR loops depending on incr sign. Formatting fixes.
1529 * omp-general.h (struct omp_for_data): Add have_reductemp member.
1530 (enum omp_requires): New enum.
1531 (omp_requires_mask): Declare.
1532 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
1534 * omp-low.c (struct omp_context): Add task_reductions and
1535 task_reduction_map fields.
1536 (is_host_teams_ctx): New function.
1537 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
1538 (use_pointer_for_field): Use is_global_var instead of
1539 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
1541 (build_outer_var_ref): Ignore taskgroup outer contexts.
1542 (delete_omp_context): Release task_reductions and task_reduction_map.
1543 (scan_sharing_clauses): Don't add any fields for reduction clause on
1544 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
1545 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
1546 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
1547 Handle OMP_CLAUSE_NONTEMPORAL.
1548 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
1550 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
1551 clauses with task modifier.
1552 (scan_omp_task): Handle taskwait with depend clauses.
1553 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
1554 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
1555 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
1556 (scan_omp_for): Fix comment formatting.
1557 (scan_omp_teams): Handle host teams constructs.
1558 (check_omp_nesting_restrictions): Allow teams with no outer
1559 OpenMP context. Adjust diagnostics for teams strictly nested into
1560 some explicit OpenMP construct other than target. Allow OpenMP atomics
1561 inside of simd regions.
1562 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
1563 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
1564 taskreg_nesting_level while scanning host teams construct.
1565 (task_reduction_read): New function.
1566 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
1567 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
1568 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
1569 second argument create_tmp_var if it is NULL. Don't ignore shared
1570 clauses in is_host_teams_ctx contexts. Handle
1571 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
1573 (lower_reduction_clauses): Ignore reduction clauses with task
1574 modifier. Remove second argument create_tmp_var if it is NULL.
1575 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
1576 (lower_send_clauses): Ignore reduction clauses with task modifier.
1577 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
1578 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
1579 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
1580 rely that it is the last stmt in body so far. Ignore outer taskgroup
1582 (omp_task_reductions_find_first, omp_task_reduction_iterate,
1583 lower_omp_task_reductions): New functions.
1584 (lower_omp_sections): Handle reduction clauses with taskgroup
1585 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
1586 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
1587 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
1589 (lower_omp_taskgroup): Handle taskgroup reductions.
1590 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
1591 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
1592 (lower_depend_clauses): If there are any
1593 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1594 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
1595 seen, assume lowering is done already and return early. Set kind
1596 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
1597 (lower_omp_taskreg): Handle reduction clauses with task modifier on
1598 parallel construct. Handle reduction clause on taskloop construct.
1599 Handle taskwait with depend clauses.
1600 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
1601 for host teams constructs.
1602 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
1603 nontemporal and _reductemp_ clause entries.
1604 (omp_clause_code_name): Likewise.
1605 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
1606 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
1607 * tree-core.h (enum omp_clause_code): Add
1608 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
1609 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
1610 (struct tree_base): Add omp_atomic_memory_order field into union.
1611 Remove OMP_ATOMIC_SEQ_CST comment.
1612 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1613 and OMP_CLAUSE_DEPEND_DEPOBJ.
1614 (struct tree_omp_clause): Add subcode.defaultmap_kind.
1615 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
1616 OpenMP constructs with body and clauses operands.
1617 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
1618 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
1619 (OMP_TASKGROUP_CLAUSES): Define.
1620 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
1621 OMP_CLAUSE__LOOPTEMP_.
1622 (OMP_ATOMIC_SEQ_CST): Remove.
1623 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
1624 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
1625 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
1626 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
1627 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
1628 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
1629 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
1630 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
1631 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
1632 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
1634 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
1635 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1636 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
1637 (convert_local_omp_clauses): Likewise. Remove useless test.
1638 * tree-parloops.c (create_call_for_reduction_1): Pass
1639 OMP_MEMORY_ORDER_RELAXED as new argument to
1640 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
1641 * tree-pretty-print.c (dump_omp_iterators): New function.
1642 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
1643 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
1644 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
1645 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
1646 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
1647 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
1648 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
1649 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1650 (dump_omp_atomic_memory_order): New function.
1651 (dump_generic_node): Use it. Print taskgroup clauses. Print
1652 taskwait with depend clauses.
1653 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
1654 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
1655 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
1656 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
1657 write_ts_omp_clause_tree_pointers): Likewise.
1659 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1662 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
1663 "-missed", "-note", and "-all" sub-options.
1664 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
1666 (can_early_inline_edge_p): Likewise.
1667 (want_early_inline_function_p): Likewise.
1668 (want_inline_self_recursive_call_p): Likewise.
1669 (recursive_inlining): Likewise.
1670 (inline_small_functions): Likewise.
1671 (flatten_function): Likewise.
1672 (ipa_inline): Likewise.
1673 (inline_always_inline_functions): Likewise.
1674 (early_inline_small_functions): Likewise.
1675 (early_inliner): Likewise.
1676 * tree-inline.c (expand_call_inline): Likewise.
1678 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1680 * pretty-print.c (pp_format): Handle %f.
1681 (selftest::test_pp_format): Add test of %f.
1682 * pretty-print.h (pp_double): New macro.
1684 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1686 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
1687 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
1688 (dump_pretty_printer::decode_format): Implement "%C" for
1690 (selftest::test_capture_of_dump_calls): Rename "where" to
1691 "stmt_loc". Convert test_decl to a function decl and set its
1692 location. Add a symbol_table_test RAII instance and a
1693 cgraph_node, using it to test "%C" and dump_symtab_node.
1695 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
1698 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
1700 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1702 * cgraph.c: Include "selftest.h".
1703 (saved_symtab): New variable.
1704 (selftest::symbol_table_test::symbol_table_test): New ctor.
1705 (selftest::symbol_table_test::~symbol_table_test): New dtor.
1706 (selftest::test_symbol_table_test): New test.
1707 (selftest::cgraph_c_tests): New.
1708 * cgraph.h (saved_symtab): New decl.
1709 (selftest::symbol_table_test): New class.
1710 * selftest-run-tests.c (selftest::run_tests): Call
1711 selftest::cgraph_c_tests.
1712 * selftest.h (selftest::cgraph_c_tests): New decl.
1714 2018-11-08 Richard Biener <rguenther@suse.de>
1716 * tree-data-ref.h (lambda_int): New typedef.
1717 (lambda_vector_gcd): Adjust.
1718 (lambda_vector_new): Likewise.
1719 (lambda_matrix_new): Likewise.
1720 * tree-data-ref.c (print_lambda_vector): Adjust.
1722 2018-11-08 Richard Biener <rguenther@suse.de>
1724 PR tree-optimization/87929
1725 * tree-complex.c (expand_complex_comparison): Clean EH.
1727 2018-11-08 Martin Liska <mliska@suse.cz>
1729 * doc/extend.texi: Reword.
1730 * predict.c (expr_expected_value_1): Likewise.
1732 2018-11-08 Richard Biener <rguenther@suse.de>
1734 PR tree-optimization/87913
1735 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
1736 of extreme values to ordered comparisons.
1738 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1741 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
1743 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1745 * doc/invoke.texi: Remove leading dash from @opindex entries
1746 throughout the file.
1748 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1751 * doc/invoke.texi (Option Summary): Add -e and --entry.
1752 (Link Options): Likewise.
1754 2018-11-07 Nathan Sidwell <nathan@acm.org>
1757 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
1758 --disable-checking bootstrap.
1760 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
1762 * configure: Regenerated.
1764 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1767 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
1768 to the mode of the widest field iff the widest field has mode class
1769 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
1772 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
1774 * common.opt: Add -Wattribute-warning.
1775 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
1776 * expr.c (expand_expr_real_1): Add new attribute to warning_at
1777 call to allow user configure behavior of "warning" attribute.
1779 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
1781 * target.def: Put @: after every vs., e.g., and i.e. where it is
1782 followed by whitespace.
1783 * doc/extend.texi: Ditto.
1784 * doc/fragments.texi: Ditto.
1785 * doc/gimple.texi: Ditto.
1786 * doc/implement-c.texi: Ditto.
1787 * doc/install.texi: Ditto.
1788 * doc/invoke.texi: Ditto.
1789 * doc/md.texi: Ditto.
1790 * doc/plugins.texi: Ditto.
1791 * doc/rtl.texi: Ditto.
1792 * doc/sourcebuild.texi: Ditto.
1793 * doc/tm.texi.in: Ditto.
1794 * doc/ux.texi: Ditto.
1795 * doc/tm.texi: Regenerate.
1797 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1799 * config/arm/arm-cpus.in (ares): New entry.
1800 * config/arm/arm-tables.opt: Regenerate.
1801 * config/arm/arm-tune.md: Likewise.
1802 * doc/invoke.texi (ARM Options): Document ares.
1804 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1806 * config/aarch64/aarch64-cores.def (ares): Define.
1807 * config/aarch64/aarch64-tune.md: Regenerate.
1808 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
1810 2018-11-07 Jan Hubicka <jh@suse.cz>
1812 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
1813 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
1814 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
1817 2018-11-07 Richard Biener <rguenther@suse.de>
1819 PR tree-optimization/87914
1820 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
1822 (vectorizable_reduction): Handle shifts and rotates by dispatching
1823 to vectorizable_shift.
1824 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
1825 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
1827 (vectorizable_shift): Export and handle being called as
1829 (vect_analyze_stmt): Call vectorizable_shift after
1830 vectorizable_reduction.
1831 * tree-vectorizer.h (vectorizable_shift): Declare.
1833 2018-11-07 Jan Hubicka <jh@suse.cz>
1835 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
1836 than const decls in TREE_VALUE of enum.
1837 (dump_type_inheritance_graph): Improve duplicate dumping.
1838 (free_enum_values): New.
1839 (build_type_inheritance_graph): Use it.
1840 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
1841 which are not main variants or not ODR types.
1842 (verify_type_variant): Expect variants to have no TYPE_VALUES.
1844 2018-11-07 Richard Biener <rguenther@suse.de>
1846 * ipa-inline.c (want_inline_small_function_p): Compute
1847 big_speedup_p lazily and last.
1849 2018-11-07 Jan Hubicka <jh@suse.cz>
1851 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
1852 building incomplete variant of complete type.
1853 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
1854 variant of complete type.
1856 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1858 * config/mips/mips.c: Fix typo in documentation of
1859 mips_loongson_ext2_prefetch_cookie.
1860 (mips_option_override): fix brain twister logical.
1861 * config/mips/mips.h: Fix typo in documentation of
1862 ISA_HAS_CTZ_CTO and define pattern.
1863 * config/mips/mips.md (prefetch): Hoist EXT2 above
1865 (prefetch_indexed): Hoist EXT2 above the EXT block.
1867 2018-11-07 Jan Hubicka <jh@suse.cz>
1869 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
1870 return and parameter types of function and method types.
1871 (free_lang_data_in_cgraph): Update.
1873 2018-11-07 Martin Liska <mliska@suse.cz>
1875 PR rtl-optimization/87868
1876 * postreload-gcse.c (eliminate_partially_redundant_load): Set
1877 threshold to max_count if we would overflow.
1878 * profile-count.h: Make max_count a public constant.
1880 2018-11-07 Martin Liska <mliska@suse.cz>
1882 * mem-stats.h: Fix GNU coding style.
1884 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1886 * config/mips/gs264e.md: New.
1887 * config/mips/mips-cpus.def: Define gs264e.
1888 * config/mips/mips-tables.opt: Regenerate.
1889 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1891 (mips_issue_rate): Add support for gs264e.
1892 (mips_multipass_dfa_lookahead): Likewise.
1893 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
1894 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
1895 (MIPS_ASE_MSA_SPEC): New.
1896 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
1897 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
1898 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
1899 * config/mips/mips.md: Include gs264e.md.
1900 (processor): Add gs264e.
1901 * config/mips/mips.opt (MSA): Use Mask instead of Var.
1902 * doc/invoke.texi: Add gs264e to supported architectures.
1904 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1906 * config/mips/gs464e.md: New.
1907 * config/mips/mips-cpus.def: Define gs464e.
1908 * config/mips/mips-tables.opt: Regenerate.
1909 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1911 (mips_issue_rate): Add support for gs464e.
1912 (mips_multipass_dfa_lookahead): Likewise.
1913 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
1914 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
1915 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
1916 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
1917 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
1918 * config/mips/mips.md: Include gs464e.md.
1919 (processor): Add gs464e.
1920 * doc/invoke.texi: Add gs464e to supported architectures.
1922 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1924 * config/mips/loongson3a.md: Rename to ...
1925 * config/mips/gs464.md: ... here.
1926 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
1927 as an alias of gs464 processor.
1928 * config/mips/mips-tables.opt: Regenerate.
1929 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
1930 instead of PROCESSOR_LOONGSON_3A.
1931 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
1933 (mips_option_override): Enable MMI and EXT for gs464.
1934 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
1935 Rename TUNE_LOONGSON_3A to TUNE_GS464.
1936 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
1937 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
1938 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
1940 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
1941 (processor): Add gs464;
1942 * doc/invoke.texi: Add gs464 to supported architectures.
1944 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1946 * config/mips/mips-protos.h
1947 (mips_loongson_ext2_prefetch_cookie): New prototype.
1948 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
1949 (mips_option_override): Enable TARGET_LOONGSON_EXT when
1950 TARGET_LOONGSON_EXT2 is true.
1951 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
1952 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
1953 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
1954 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
1955 TARGET_LOONGSON_EXT2.
1956 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
1957 (define_insn "ctz<mode>2"): New insn pattern.
1958 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
1959 (define_insn "prefetch_indexed_<mode>"): Include
1960 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
1961 * config/mips/mips.opt (-mloongson-ext2): Add option.
1962 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
1964 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1966 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
1967 __mips_loongson_ext.
1968 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
1969 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
1971 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
1972 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
1973 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
1974 instead of TARGET_LOONGSON_3A.
1975 * config/mips/mips.opt (-mloongson-ext): Add option.
1976 * gcc/doc/invoke.texi (-mloongson-ext): Document.
1978 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1980 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
1981 * config/mips/loongson.md: Move to ...
1982 * config/mips/loongson-mmi.md: here; Adjustment.
1983 * config/mips/loongson.h: Move to ...
1984 State as deprecated. Include loongson-mmiintrin.h for back
1985 compatibility and warning.
1986 * config/mips/loongson-mmiintrin.h: ... here.
1987 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
1988 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
1989 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1990 (mips_option_override): Make sure MMI use hard float;
1991 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
1992 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
1993 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
1994 TARGET_LOONGSON_VECTORS.
1995 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
1996 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
1997 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
1998 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
2000 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
2001 TARGET_LOONGSON_VECTORS.
2002 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
2003 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2004 (Loongson MMI patterns): Include loongson-mmi.md instead of
2006 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
2007 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
2009 2018-11-07 Richard Biener <rguenther@suse.de>
2012 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
2013 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
2015 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
2017 PR rtl-optimization/87874
2018 * lra.c (lra_substitute_pseudo): Do not create a subreg for
2021 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
2023 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
2024 if not in indexed or indirect form.
2025 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
2026 (bswap<mode>2_store): Ditto.
2028 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
2030 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
2033 2018-11-06 Richard Biener <rguenther@suse.de>
2035 PR tree-optimization/86850
2036 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
2037 instead of src.m_vec.
2039 2018-11-06 Jan Hubicka <jh@suse.cz>
2041 * tree.c (fld_simplified_type_name): Break out form ...
2042 (free_lang_data_in_type): ... here.
2043 (fld_type_variant_equal_p): Use it.
2045 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2047 * config/default-d.c: Include memmodel.h.
2049 * config/sol2-d.c: New file.
2050 * config/t-sol2 (sol2-d.o): New rule.
2051 * config.gcc <*-*-solaris2*>: Set d_target_objs,
2052 target_has_targetdm.
2054 2018-11-06 Jan Hubicka <jh@suse.cz>
2056 * tree.c (fld_type_variant): Also copy alignment; be sure that
2057 new variant is equal.
2059 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
2062 * config/s390/s390.md: Add relative_long attribute.
2064 2018-11-06 Jan Hubicka <jh@suse.cz>
2066 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
2067 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
2068 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
2069 stream TYPE_NEEDS_CONSTRUCTING.
2070 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
2071 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
2073 2018-11-06 Richard Biener <rguenther@suse.de>
2075 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
2077 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
2079 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2081 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
2082 REG_CLASS_CONTENTS[GEN_REGS].
2083 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
2085 2018-11-06 Jan Hubicka <jh@suse.cz>
2087 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
2089 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2092 * config/sol2.h (ASAN_CC1_SPEC): Define.
2093 (LD_WHOLE_ARCHIVE_OPTION): Define.
2094 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
2095 (ASAN_REJECT_SPEC): Provide default.
2096 (LIBASAN_EARLY_SPEC): Define.
2097 (LIBTSAN_EARLY_SPEC): Define.
2098 (LIBLSAN_EARLY_SPEC): Define.
2099 * config/i386/sol2.h (CC1_SPEC): Redefine.
2100 (ASAN_REJECT_SPEC): Define.
2102 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
2103 (TARGET_ASAN_SHADOW_OFFSET): Define.
2104 (sparc_asan_shadow_offset): New function.
2105 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
2106 (ASAN_REJECT_SPEC): Define.
2108 2018-11-06 Jan Hubicka <jh@suse.cz>
2110 * tree.c (fld_type_variant): Copy canonical type.
2111 (fld_incomplete_type_of): Check that canonical types looks sane;
2112 copy canonical type.
2113 (verify_type): Accept when incomplete type has complete canonical type.
2115 2018-11-06 Jan Hubicka <jh@suse.cz>
2117 * tree.c (free_lang_data): Reset overwite_assembler_name,
2118 print_xnode, print_decl, print_type and print_identifier of
2121 2018-11-06 Richard Biener <rguenther@suse.de>
2123 PR tree-optimization/87889
2124 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2125 Do nothing if old and new arg are the same
2127 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
2130 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
2131 attributes for operands 3 and 4.
2133 2018-11-06 Richard Biener <rguenther@suse.de>
2136 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
2137 matching bitfield insertion.
2139 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
2141 * auto-inc-dec.c: Include valtrack.h. Improve comments.
2142 (reg_next_debug_use): New.
2143 (attempt_change): Propagate adjusted expression into affected
2145 (merge_in_block): Track uses in debug insns.
2146 (pass_inc_dec::execute): Allocate and release
2149 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
2151 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
2152 (_mm512_fixupimm_round_pd): Update parameters and builtin.
2153 (_mm512_maskz_fixupimm_round_pd): Ditto.
2154 (_mm512_fixupimm_round_ps): Ditto.
2155 (_mm512_maskz_fixupimm_round_ps): Ditto.
2156 (_mm_fixupimm_round_sd): Ditto.
2157 (_mm_maskz_fixupimm_round_sd): Ditto.
2158 (_mm_fixupimm_round_ss): Ditto.
2159 (_mm_maskz_fixupimm_round_ss): Ditto.
2160 (_mm512_fixupimm_pd): Ditto.
2161 (_mm512_maskz_fixupimm_pd): Ditto.
2162 (_mm512_fixupimm_ps): Ditto.
2163 (_mm512_maskz_fixupimm_ps): Ditto.
2164 (_mm_fixupimm_sd): Ditto.
2165 (_mm_maskz_fixupimm_sd): Ditto.
2166 (_mm_fixupimm_ss): Ditto.
2167 (_mm_maskz_fixupimm_ss): Ditto.
2168 (_mm512_mask_fixupimm_round_pd): Update builtin.
2169 (_mm512_mask_fixupimm_round_ps): Ditto.
2170 (_mm_mask_fixupimm_round_sd): Ditto.
2171 (_mm_mask_fixupimm_round_ss): Ditto.
2172 (_mm512_mask_fixupimm_pd): Ditto.
2173 (_mm512_mask_fixupimm_ps): Ditto.
2174 (_mm_mask_fixupimm_sd): Ditto.
2175 (_mm_mask_fixupimm_ss): Ditto.
2176 * config/i386/avx512vlintrin.h:
2177 (_mm256_fixupimm_pd): Update parameters and builtin.
2178 (_mm256_maskz_fixupimm_pd): Ditto.
2179 (_mm256_fixupimm_ps): Ditto.
2180 (_mm256_maskz_fixupimm_ps): Ditto.
2181 (_mm_fixupimm_pd): Ditto.
2182 (_mm_maskz_fixupimm_pd): Ditto.
2183 (_mm_fixupimm_ps): Ditto.
2184 (_mm_maskz_fixupimm_ps): Ditto.
2185 (_mm256_mask_fixupimm_pd): Update builtin.
2186 (_mm256_mask_fixupimm_ps): Ditto.
2187 (_mm_mask_fixupimm_pd): Ditto.
2188 (_mm_mask_fixupimm_ps): Ditto.
2189 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
2190 * config/i386/i386-builtin.def: Update builtin definitions.
2191 * config/i386/i386.c: Handle new builtin types and remove useless ones.
2192 * config/i386/sse.md: Update VFIXUPIMM* patterns.
2193 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2194 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2195 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
2196 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2197 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2198 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
2199 * config/i386/subst.md:
2200 (round_saeonly_sd_mask_operand4): Add new subst_attr.
2201 (round_saeonly_sd_mask_op4): Ditto.
2202 (round_saeonly_expand_operand5): Ditto.
2203 (round_saeonly_expand): Update.
2205 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
2207 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
2209 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
2211 PR rtl-optimization/87871
2212 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
2214 2018-11-05 Paul Koning <ni1d@arrl.net>
2216 * doc/sourcebuild.texi (target attributes): Document new "inf"
2217 effective target keyword.
2219 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2221 * config/s390/s390.c (s390_register_move_cost): Increase costs for
2222 moves involving the CC reg.
2224 2018-11-05 Richard Biener <rguenther@suse.de>
2226 PR tree-optimization/87873
2227 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
2229 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
2230 * tree-vect-loop.c (vect_transform_loop): When splitting the
2231 loop exit also create forwarder PHIs for constants.
2232 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2233 Handle constant to_arg, add extra checking we match up the correct
2236 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2238 * config/s390/s390.md: QImode and HImode for load on condition.
2240 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2242 * config/s390/predicates.md: Fix typo.
2243 * config/s390/s390.md: Allow immediates for load on condition.
2245 2018-11-05 Martin Liska <mliska@suse.cz>
2247 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
2248 * bitmap.h (struct bitmap_usage): Likewise.
2249 * ggc-common.c (SCALE): Remove.
2251 (struct ggc_usage): Use SIZE_AMOUNT. And update
2253 * ggc-page.c (SCALE): Remove.
2254 (STAT_LABEL): Remove.
2255 (ggc_print_statistics): Use SIZE_AMOUNT.
2256 * gimple.h (SCALE): Remove.
2258 * input.c (ONE_K): Remove.
2261 (STAT_LABEL): Likewise.
2262 (FORMAT_AMOUNT): Likewise.
2263 (dump_line_table_statistics): Use SIZE_AMOUNT.
2264 * mem-stats.h (struct mem_usage): Likewise.
2265 * rtl.c (dump_rtx_statistics): Likewise.
2266 (rtx_alloc_counts): Change type to size_t.
2267 (rtx_alloc_sizes): Likewise.
2268 (rtx_count_cmp): New.
2269 (dump_rtx_statistics): Sort first based on counts.
2270 * tree.c (tree_nodes_cmp): New.
2271 (tree_codes_cmp): New.
2272 (dump_tree_statistics): Sort first based on counts.
2273 * system.h (ONE_K): New.
2275 (SIZE_SCALE): Likewise.
2276 (SIZE_LABEL): Likewise.
2277 (SIZE_AMOUNT): Likewise.
2278 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
2279 * tree-dfa.c (dump_dfa_stats): Likewise.
2280 * tree-phinodes.c (phinodes_print_statistics): Likewise.
2281 * tree-ssanames.c (ssanames_print_statistics): Likewise.
2282 * tree.c (dump_tree_statistics): Likewise.
2283 * vec.c (struct vec_usage): Likewise.
2284 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
2285 trigger a -Werror=format-overflow with
2286 --enable-gather-detailed-stats.
2288 2018-11-05 Martin Liska <mliska@suse.cz>
2290 * mem-stats.h (mem_alloc_description::release_instance_overhead):
2292 * vec.c (struct vec_usage): Register m_element_size.
2293 (vec_prefix::register_overhead): New arguments: elements and
2295 (vec_prefix::release_overhead): Subtract elements.
2296 * vec.h (struct vec_prefix): Change signature.
2297 (va_heap::reserve): Pass proper arguments.
2298 (va_heap::release): Likewise.
2300 2018-11-05 Martin Liska <mliska@suse.cz>
2302 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
2306 2018-11-05 Richard Biener <rguenther@suse.de>
2308 * tree-scalar-evolution.h (final_value_replacement_loop): Update
2310 * tree-scalar-evolution.c (final_value_replacement_loop): Return
2311 whether anything was done.
2312 (scev_const_prop): Remove constant propagation part, fold
2314 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
2315 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
2318 2018-11-05 Jakub Jelinek <jakub@redhat.com>
2320 PR tree-optimization/87859
2321 * gimple-ssa-store-merging.c (struct merged_store_group): Add
2322 only_constants and first_nonmergeable_order members.
2323 (merged_store_group::merged_store_group): Initialize them.
2324 (merged_store_group::do_merge): Clear only_constants member if
2325 adding something other than INTEGER_CST store.
2326 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
2327 stores with order >= first_nonmergeable_order. Use
2328 merged_store->only_constants instead of always recomputing it.
2329 Set merged_store->first_nonmergeable_order if we've skipped any
2330 stores. Attempt to merge overlapping INTEGER_CST stores that
2331 we would otherwise skip.
2334 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2336 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
2339 * config/i386/emmintrin.h (__v16qs): New to cope with option
2341 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2342 (_mm_cmplt_epi8): Likewise.
2343 (_mm_cmpgt_epi8): Likewise.
2345 2018-11-05 Richard Biener <rguenther@suse.de>
2347 PR rtl-optimization/87852
2348 * fwprop.c (use_killed_between): Only consider single-defs of the
2349 use whose definition statement dominates the use.
2351 2018-11-05 Martin Liska <mliska@suse.cz>
2354 * doc/invoke.texi: Remove options that are
2355 not disabled with -Os.
2357 2018-11-05 Martin Liska <mliska@suse.cz>
2360 * doc/extend.texi: Update constrain about the last argument
2361 of __builtin_expect_with_probability.
2363 2018-11-05 Martin Liska <mliska@suse.cz>
2366 * predict.c (expr_expected_value_1): Verify
2367 that last argument is a real constants and emit
2370 2018-11-05 Martin Liska <mliska@suse.cz>
2372 PR gcov-profile/77698
2373 * ipa-profile.c (ipa_profile): Adjust hotness threshold
2376 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2378 PR tree-optimization/86572
2379 * builtins.c (c_strlen): Handle negative offsets in a safe way.
2381 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2383 PR tree-optimization/87672
2384 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
2385 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
2387 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
2390 * cfgexpand.c (pass_expand::execute): Move the call to
2391 finish_eh_generation in front of the call to expand_stack_alignment.
2393 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
2395 * common/config/i386/i386-common.c (processor_alias_table): Add
2397 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
2398 (case ${target}): Add znver2.
2399 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
2400 -march=native recognize znver2 processors.
2401 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
2402 * config/i386/i386.c (m_znver2): New definition.
2403 (m_ZNVER): New definition.
2404 (m_AMD_MULTIPLE): Includes m_znver2.
2405 (processor_cost_table): Add znver2 entry.
2406 (processor_target_table): Add znver2 entry.
2407 (get_builtin_code_for_version): Set priority for
2409 (processor_model): Add M_AMDFAM17H_ZNVER2.
2410 (arch_names_table): Ditto.
2411 (ix86_reassociation_width): Include znver2.
2412 * config/i386/i386.h (TARGET_znver2): New definition.
2413 (struct ix86_size_cost): Add TARGET_ZNVER2.
2414 (enum processor_type): Add PROCESSOR_ZNVER2.
2415 * config/i386/i386.md (define_attr "cpu"): Add znver2.
2416 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
2417 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
2418 (ix86_adjust_cost): Add znver2.
2419 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
2420 * gcc/doc/extend.texi: Add details about znver2.
2421 * gcc/doc/invoke.texi: Add details about znver2.
2423 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
2427 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
2430 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2432 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
2433 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
2435 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
2437 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
2438 shrink-wrapping when -mtrack-speculation.
2440 2018-11-02 Richard Biener <rguenther@suse.de>
2442 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
2443 (pop_cost_one_pair): Do not free pair.
2444 (pop_best_coalesce): Likewise.
2445 (create_coalesce_list): Initialize obstack.
2446 (delete_coalesce_list): Free obstack.
2447 (find_coalesce_pair): Obstack-allocate coalesce pairs.
2448 (add_cost_one_coalesce): Likewise.
2449 (struct live_track): Remove bitmap pointer indirections.
2450 (new_live_track): Adjust.
2451 (delete_live_track): Likewise.
2452 (live_track_remove_partition): Likewise.
2453 (live_track_add_partition): Likewise.
2454 (live_track_live_p): Likewise.
2455 (live_track_process_def): Likewise.
2456 (live_track_clear_base_vars): Likewise.
2458 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2460 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
2461 * configure: Regenerate.
2462 * config.in: Regenerate.
2463 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
2464 HAVE_AS_REGISTER_PSEUDO_OP guard.
2465 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
2466 !HAVE_AS_REGISTER_PSEUDO_OP support.
2467 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
2470 2018-11-02 Richard Biener <rguenther@suse.de>
2472 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
2475 2018-11-02 Richard Biener <rguenther@suse.de>
2477 PR tree-optimization/87776
2478 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
2479 executable when iterating but running into rpo-vn-max-loop-depth
2480 and not eliding the iteration.
2482 2018-11-30 Jan Hubicka <jh@suse.cz>
2484 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
2487 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
2489 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
2491 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
2492 Combine with rs6000_address_for_fpconvert.
2493 (rs6000_address_for_fpconvert): Combine with
2494 rs6000_force_indexed_or_indirect_mem.
2495 (rs6000_expand_vector_init): Change function call from
2496 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2497 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
2498 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2499 (floatsi<mode>2_lfiwax_mem): Ditto.
2500 (floatunssi<mode>2_lfiwzx): Ditto.
2501 (floatunssi<mode>2_lfiwzx_mem): Ditto.
2502 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
2503 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
2504 (fix_trunc<mode>si2_stfiwx): Ditto.
2505 (fixuns_trunc<mode>si2_stfiwx): Ditto.
2506 (float_<mode>si2_hw): Ditto.
2507 (floatuns_<mode>si2_hw): Ditto.
2508 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
2509 (vsx_splat_<mode>): Ditto.
2511 2018-11-01 Joseph Myers <joseph@codesourcery.com>
2513 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
2514 at end of assembler input text.
2515 * configure: Regenerate.
2517 2018-11-01 Jakub Jelinek <jakub@redhat.com>
2519 PR tree-optimization/87826
2520 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
2521 negative or larger or equal to type's precision.
2523 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
2525 * opts.c (default_options_table): Do not enable
2526 OPT_fdelayed_branch at -Og.
2527 * doc/invoke.texi (-fdelayed-branch): Document it.
2529 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2531 * optabs-libfuncs.c (build_libfunc_function_visibility):
2532 New, split out from...
2533 (build_libfunc_function): ... here.
2534 (init_one_libfunc_visibility): New, split out from ...
2535 (init_one_libfunc): ... here.
2537 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
2538 scratch register need not be early-clobber. Document the reason
2539 why we cannot use ST<OP>.
2541 2018-10-31 Joseph Myers <joseph@codesourcery.com>
2544 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
2545 line for second argument of AC_DEFINE_UNQUOTED.
2546 * doc/install.texi (Tools/packages necessary for modifying GCC):
2547 Update to autoconf 2.69 and automake 1.15.1.
2548 * aclocal.m4, config.in, configure: Regenerate.
2550 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
2552 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
2555 2018-10-31 Martin Liska <mliska@suse.cz>
2558 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
2559 Add new argument invalid_extension.
2560 (aarch64_get_all_extension_candidates): New function.
2561 (aarch64_rewrite_selected_cpu): Add NULL to function call.
2562 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
2564 (aarch64_get_all_extension_candidates): New function.
2565 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
2566 argument invalid_extension.
2567 (aarch64_parse_cpu): Likewise.
2568 (aarch64_print_hint_for_extensions): New function.
2569 (aarch64_validate_mcpu): Provide hint about invalid extension.
2570 (aarch64_validate_march): Likewise.
2571 (aarch64_handle_attr_arch): Pass new argument.
2572 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
2573 (aarch64_handle_attr_isa_flags): Likewise.
2575 2018-10-31 Richard Biener <rguenther@suse.de>
2579 * tree-outof-ssa.c (insert_backedge_copies): Restrict
2580 copy generation to useful cases. Place the copy before
2581 the definition of the backedge value when possible.
2583 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2585 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
2586 * config/arc/arc.c (arc_active_insn): New function.
2587 (check_store_cacheline_hazard): Likewise.
2588 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
2589 (arc_override_options): Disable delay slot scheduler for older
2591 (arc_store_addr_hazard_p): New implementation, old one renamed to
2593 (arc_store_addr_hazard_internal_p): Renamed.
2594 (arc_reorg): Don't combine into brcc instructions which are part
2595 of hardware hazard solution.
2596 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
2597 (tune_arc700): Likewise.
2598 * config/arc/arc.opt (arc7xx): New tune value.
2599 * config/arc/arc700.md: Improve A7 scheduler.
2601 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2603 * config/arc/arc.c (arc_override_options): Remove
2604 TARGET_COMPACT_CASESI.
2605 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
2606 (CASE_VECTOR_MODE): Likewise.
2607 (CASE_VECTOR_PC_RELATIVE): Likewise.
2608 (CASE_VECTOR_SHORTEN_MODE): Likewise.
2609 (CASE_VECTOR_SHORTEN_MODE1): Delete.
2610 (ADDR_VEC_ALIGN): Update.
2611 (ASM_OUTPUT_CASE_LABEL): Undefine.
2612 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
2613 (TARGET_BI_BIH): Define.
2614 (DEFAULT_BRANCH_INDEX): Likewise.
2615 * config/arc/arc.md (casesi): Rework to accept BI/BIH
2616 instructions, remove compact_casesi use case.
2617 (casesi_compact_jump): Remove.
2618 (casesi_dispatch): New pattern.
2619 * config/arc/arc.opt: Add mbranch-index option. Deprecate
2620 compact_casesi option.
2621 * doc/invoke.texi: Document mbranch-index option.
2623 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2625 * config/arc/arc.c (arc_get_tp): Remove function.
2626 (arc_emit_call_tls_get_addr): Likewise.
2627 (arc_call_tls_get_addr): New function.
2628 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
2629 * config/arc/arc.md (tls_load_tp_soft): Remove.
2630 (tls_gd_get_addr): Likewise.
2632 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2634 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
2635 (mulsi3_600_lib): Remove pattern.
2636 (umulsi3_highpart_600_lib_le): Likewise.
2637 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
2638 (umulsidi3): Remove call to umulsidi3_600_lib.
2639 (umulsidi3_600_lib): Remove pattern.
2640 (peephole2): Remove peephole using the above deprecated patterns.
2642 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2645 * config/arm/arm.c (arm_option_check_internal): Disable the combined
2646 use of -mslow-flash-data and -mword-relocations.
2647 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
2648 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
2650 * doc/invoke.texi (-mword-relocations): Mention conflict with
2652 (-mslow-flash-data): Reciprocally.
2654 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2656 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
2657 16-byte modes held in GP registers to use an even regno.
2659 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
2660 (aarch64_atomic_ldop_supported_p): Remove.
2661 (aarch64_gen_atomic_ldop): Remove.
2662 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
2663 Fully expand LSE operations here.
2664 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
2665 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
2666 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
2667 and use ATOMIC_LDOP instead; use register_operand for the input;
2668 drop the split and emit insns directly.
2669 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
2670 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
2671 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
2673 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
2674 (aarch64_gen_atomic_ldop): Don't call it.
2675 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
2676 Use aarch64_reg_or_zero.
2677 (aarch64_atomic_exchange<ALLI>): Likewise.
2678 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
2679 operand 0; use aarch64_reg_or_zero for input; merge ...
2680 (@aarch64_atomic_swp<ALLI>): ... this and remove.
2682 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
2683 (aarch64_split_compare_and_swap): Use it.
2684 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
2685 test oldval against the proper predicate.
2686 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
2687 Use nonmemory_operand for expected.
2688 (cas_short_expected_pred): New.
2689 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
2690 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
2691 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
2692 (aarch64_plushi_operand): New.
2694 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
2695 Force oldval into the rval register for TARGET_LSE; emit the compare
2696 during initial expansion so that it may be deleted if unused.
2697 (aarch64_gen_atomic_cas): Remove.
2698 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
2699 Change =&r to +r for operand 0; use match_dup for operand 2;
2700 remove is_weak and mod_f operands as unused. Drop the split
2702 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
2703 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
2704 (@aarch64_atomic_cas<GPI>): Similarly.
2706 2018-10-31 Richard Biener <rguenther@suse.de>
2708 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
2711 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2713 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
2714 * config/aarch64/aarch64.md: Include saphira.md
2715 * config/aarch64/saphira.md: New file for pipeline description.
2717 2018-10-30 Martin Sebor <msebor@redhat.com>
2720 * gimple-ssa-sprintf.c (format_directive): Use %G to include
2722 (sprintf_dom_walker::compute_format_length):
2723 Avoid setting POSUNDER4K here.
2724 (get_destination_size): Handle null argument values.
2725 (get_user_idx_format): New function.
2726 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
2727 functions, including user-defined with attribute format printf.
2728 Use %G to include inlining context.
2729 Set POSUNDER4K here.
2731 2018-10-30 Jan Hubicka <jh@suse.cz>
2733 * params.def (lto-partitions): Bump from 32 to 128.
2735 2018-10-30 Jan Hubicka <jh@suse.cz>
2738 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
2740 (free_lang_data_in_type): Forward declare.
2741 (fld_type_variant_equal_p): New function.
2742 (fld_type_variant): New function
2743 (fld_incomplete_types): New hash.
2744 (fld_incomplete_type_of): New function
2745 (fld_simplfied-type): New function.
2746 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
2747 (free_lang_data): Allocate and free fld_incomplete_type; update call
2748 of free_lang_data_in_decl.
2750 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
2752 * gcov.c (output_lines): Remove duplicate line.
2754 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
2756 * config/rs6000/rs6000.md (bswapdi2): Force address into register
2757 if not in indexed or indirect form.
2758 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
2759 (bswapdi2_store): Ditto.
2760 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
2762 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
2763 Prototype for helper function.
2765 2018-10-30 Martin Sebor <msebor@redhat.com>
2767 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
2768 (target, pragma GCC optimize, pragma GCC target): Ditto.
2770 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
2772 * doc/extend.texi: Fix prototype and description of
2773 __builtin_expect_with_probability.
2775 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2777 * cgraph.h (clone_function_name_1): Replaced by new
2778 clone_function_name_numbered that takes name as string; for
2779 privatize_symbol_name_1 use only.
2780 (clone_function_name): Renamed to
2781 clone_function_name_numbered to be explicit about numbering.
2782 (clone_function_name): New two-argument function that does
2783 not number its output.
2784 (clone_function_name): New three-argument function that
2785 takes a number to append to its output.
2786 * cgraphclones.c (duplicate_thunk_for_node):
2787 (clone_function_name_1): Renamed.
2788 (clone_function_name_numbered): Two new functions.
2789 (clone_function_name): Improved documentation.
2790 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
2791 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
2792 * final.c (final_scan_insn_1): Use the new clone_function_name
2794 * multiple_target.c (create_dispatcher_calls): Ditto.
2795 (create_target_clone): Ditto.
2796 * omp-expand.c (grid_expand_target_grid_body): Ditto.
2797 * omp-low.c (create_omp_child_function_name): Ditto.
2798 * omp-simd-clone.c (simd_clone_create): Ditto.
2799 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
2800 new clone_function_name without numbering.
2802 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
2804 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
2805 Assert that the allocation size is not zero.
2807 2018-10-30 Richard Biener <rguenther@suse.de>
2809 PR tree-optimization/87800
2810 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
2811 non-induction or reduction PHIs.
2813 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
2815 * config/aarch64/falkor-tag-collision-avoidance.c
2816 (execute_tag_collision_avoidance): Call df_note_add_problem.
2818 2018-10-30 Martin Liska <mliska@suse.cz>
2820 * doc/extend.texi: Fix typo in documentation
2821 of __builtin_expect_with_probability.
2823 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2826 * input.c (get_substring_ranges_for_loc): Detect if
2827 linemap_resolve_location gives us a NULL map, and reject
2830 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
2832 * config.gcc (xstormy16-*-elf): Set tm_d_file.
2834 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2835 Martin Sebor <msebor@redhat.com>
2836 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2838 * doc/ux.texi (Quoting): New subsection, adapted from material at
2839 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
2840 MartinSebor and ManuelLopezIbanez.
2841 (Fix-it hints): Note that fix-it hints shouldn't be marked for
2844 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
2847 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
2850 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
2852 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
2854 2018-10-29 Paul Koning <ni1d@arrl.net>
2856 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
2858 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
2860 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
2861 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
2862 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
2863 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
2864 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
2865 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
2866 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
2867 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
2868 Change 'vector' to '__vector'.
2869 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
2870 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
2871 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
2872 _mm_avg_pu16): Likewise. And, whitespace corrections.
2874 2018-10-29 Richard Biener <rguenther@suse.de>
2876 PR tree-optimization/87785
2877 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
2880 2018-10-29 Olivier Hainque <hainque@adacore.com>
2882 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
2884 2018-10-29 Olivier Hainque <hainque@adacore.com>
2886 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
2887 ports configuration macro, defaults to "gnu".
2888 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
2889 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
2891 2018-10-29 Olivier Hainque <hainque@adacore.com>
2893 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
2895 2018-10-29 Richard Biener <rguenther@suse.de>
2897 PR tree-optimization/87790
2898 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
2899 (vect_make_slp_decision): Adjust.
2900 (vect_slp_analyze_bb_1): Likewise.
2901 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
2904 2018-10-29 Richard Biener <rguenther@suse.de>
2906 PR tree-optimization/87785
2907 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
2909 (vect_build_slp_tree): Likewise.
2910 (vect_gather_slp_loads): New function.
2911 (vect_analyze_slp_instance): Gather loads separately from the
2914 2018-10-29 Martin Liska <mliska@suse.cz>
2916 * Makefile.in: Make dependency to json.o.
2917 * doc/gcov.texi: Document new JSON format, remove
2918 old intermediate format documentation.
2919 * gcov.c (struct function_info): Come up with m_name and
2921 (function_info::function_info): Initialize it.
2922 (function_info::~function_info): Release it.
2923 (main): Rename flag_intermediate_format to flag_json_format.
2924 (print_usage): Describe --json-format.
2925 (process_args): Set flag_json_format.
2926 (output_intermediate_line): Remove.
2927 (output_intermediate_json_line): Likewise.
2928 (get_gcov_intermediate_filename): Return new extension
2930 (output_intermediate_file): Implement JSON emission.
2931 (output_json_intermediate_file): Implement JSON emission.
2932 (generate_results): Use ::get_name for function name.
2933 Handle JSON output file.
2934 (read_graph_file): Use ::get_name instead of cplus_demangle.
2935 (read_count_file): Likewise.
2936 (solve_flow_graph): Likewise.
2937 (add_line_counts): Likewise.
2938 (accumulate_line_counts): Use new flag_json_format.
2939 (output_function_details): Use ::get_name instead of cplus_demangle.
2940 (output_lines): Likewise.
2941 * json.cc (test_writing_literals): Add new tests.
2942 * json.h (class literal): Add new boolean constructor.
2944 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
2946 PR rtl-optimization/87701
2947 PR rtl-optimization/87780
2948 * combine.c (make_more_copies): Rewrite.
2950 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
2952 * doc/generic.texi (ABSU_EXPR): Document.
2953 * match.pd (absu(x)*absu(x) -> x*x): Handle.
2954 (absu(absu(X)) -> absu(X)): Likewise.
2955 (absu(-X) -> absu(X)): Likewise.
2956 (absu(X) where X is nonnegative -> X): Likewise.
2958 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
2960 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
2961 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
2962 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
2963 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
2964 (s-tm-texi): Also check timestamp on d-target.def.
2965 (generated_files): Add TM_D_H and d-target-hooks-def.h.
2966 (build/genhooks.o): Also depend on D_TARGET_DEF.
2967 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
2969 * config/aarch64/aarch64-d.c: New file.
2970 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
2972 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
2974 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
2975 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
2976 * config/arm/arm-d.c: New file.
2977 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
2978 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
2979 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2980 * config/arm/t-arm (arm-d.o): New rule.
2981 * config/default-d.c: New file.
2982 * config/glibc-d.c: New file.
2983 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2984 * config/i386/i386-d.c: New file.
2985 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
2986 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
2987 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2988 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
2989 * config/i386/t-i386 (i386-d.o): New rule.
2990 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2991 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2992 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
2993 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2994 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2995 * config/mips/mips-d.c: New file.
2996 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
2997 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
2998 * config/mips/t-mips (mips-d.o): New rule.
2999 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3000 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3001 * config/powerpcspe/powerpcspe-d.c: New file.
3002 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
3004 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3005 Support GNU D by using 0 as the language type.
3006 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
3007 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
3008 * config/riscv/riscv-d.c: New file.
3009 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
3011 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
3012 * config/riscv/t-riscv (riscv-d.o): New rule.
3013 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3014 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3015 * config/rs6000/rs6000-d.c: New file.
3016 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
3018 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3019 Support GNU D by using 0 as the language type.
3020 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
3021 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
3022 * config/s390/s390-d.c: New file.
3023 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
3024 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
3025 * config/s390/t-s390 (s390-d.o): New rule.
3026 * config/sparc/sparc-d.c: New file.
3027 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
3029 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
3030 * config/sparc/t-sparc (sparc-d.o): New rule.
3031 * config/t-glibc (glibc-d.o): New rule.
3032 * configure: Regenerated.
3033 * configure.ac (tm_d_file): New variable.
3034 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
3035 * doc/contrib.texi (Contributors): Add self for the D frontend.
3036 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
3037 * doc/install.texi (Configuration): Mention libphobos as an option for
3038 --enable-shared. Mention d as an option for --enable-languages.
3039 (Testing): Mention check-d as a target.
3040 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
3041 name suffixes. Mention d as a -x option.
3042 * doc/sourcebuild.texi (Top Level): Mention libphobos.
3043 * doc/standards.texi (Standards): Add section on D language.
3044 * doc/tm.texi: Regenerated.
3045 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
3046 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
3047 * dwarf2out.c (is_dlang): New function.
3048 (gen_compile_unit_die): Use DW_LANG_D for D.
3049 (declare_in_namespace): Return module die for D, instead of adding
3050 extra declarations into the namespace.
3051 (gen_namespace_die): Generate DW_TAG_module for D.
3052 (gen_decl_die): Handle CONST_DECLSs for D.
3053 (dwarf2out_decl): Likewise.
3054 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
3055 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
3056 kinds of aggregates.
3057 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
3058 * genhooks.c: Include d/d-target.def.
3060 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
3063 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
3064 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
3065 (STACK_DYNAMIC_OFFSET): Likewise.
3067 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
3070 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
3073 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
3075 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
3076 return type and other typos.
3078 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3080 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
3081 a shorter sequence with fewer branches.
3082 (emit_final_str_compare_gpr): Ditto.
3084 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3086 * config/rs6000/tmmintrin.h: New file.
3087 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
3089 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3091 * config/rs6000/mmintrin.h: Enable 32bit compilation.
3092 * config/rs6000/xmmintrin.h: Likewise.
3094 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3096 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
3098 2018-10-26 Richard Biener <rguenther@suse.de>
3100 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
3102 (vect_mark_slp_stmts_relevant): Likewise.
3103 (vect_detect_hybrid_slp_stmts): Likewise.
3104 (vect_bb_slp_scalar_cost): Likewise.
3105 (vect_remove_slp_scalar_calls): Likewise.
3107 2018-10-26 Jan Hubicka <jh@suse.cz>
3109 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
3110 (warn_types_mismatch): Fix walk of DECL_NAME.
3111 (odr_types_equivalent_p): Fix overactive assert.
3113 2018-10-26 Richard Biener <rguenther@suse.de>
3115 PR tree-optimization/87105
3116 * tree-vectorizer.h (_slp_tree::refcnt): New member.
3117 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
3119 (vect_create_new_slp_node): Initialize refcnt to one.
3121 (scalar_stmts_set_t, bst_fail): Remove.
3122 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
3123 (vect_build_slp_tree): Add bst_map argument and lookup
3124 already created SLP nodes.
3125 (vect_print_slp_tree): Handle a SLP graph, print SLP node
3127 (vect_slp_rearrange_stmts): Handle a SLP graph.
3128 (vect_analyze_slp_instance): Adjust and free SLP nodes from
3129 the CSE map. Fix indenting.
3130 (vect_schedule_slp_instance): Add short-cut.
3132 2018-10-26 Martin Liska <mliska@suse.cz>
3135 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
3136 addr_expr and not with pointers.
3138 2018-10-26 Jan Hubicka <jh@suse.cz>
3140 * tree.c (free_lang_data_in_type): Only check main variants.
3141 * ipa-devirt.c (warn_odr): Make static.
3142 (types_same_for_odr): Drop strict variant.
3143 (types_odr_comparable): Likewise.
3144 (odr_or_derived_type_p): Look for main variants.
3145 (odr_name_hasher::equal): Cleanup comment.
3146 (odr_subtypes_equivalent): Add warn and warned arguments; check main
3148 (type_variants_equivalent_p): break out from ...
3149 (odr_types_equivalent): ... here; go for main variants where needed.
3150 (warn_odr): ... here; turn static.
3151 (warn_types_mismatch): Compare mangled names of main variants.
3152 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
3153 (type_with_linkage_p): Sanity check that we look at main variant.
3154 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
3155 * tree.h (types_same_for_odr): Drop strict argument.
3157 2018-10-26 Richard Biener <rguenther@suse.de>
3159 PR tree-optimization/87746
3160 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
3161 Simplify and fix WRT strided store groups with size not
3162 equal to step in element count.
3163 (vect_analyze_group_access_1): Dump the whole group.
3165 2018-10-25 Carl Love <cel@us.ibm.com>
3167 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
3168 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
3169 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
3170 precicion entry for each overloaded builtin.
3171 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
3172 VSCEDPUO): Rename overloaded name.
3173 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
3174 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
3175 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
3176 define_expand for xscmpexqp instruction.
3177 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
3179 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3180 Jinsong Ji <jji@us.ibm.com>
3182 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
3183 function with vec_sl.
3184 (_mm_slli_epi32): Likewise.
3185 (_mm_slli_epi64): Likewise.
3186 (_mm_srai_epi16): Replace deprecated function with vec_sra.
3187 (_mm_srai_epi32): Likewise.
3188 (_mm_srli_epi16): Replace deprecated function with vec_sr.
3189 (_mm_srli_epi32): Likewise.
3190 (_mm_srli_epi64): Likewise.
3191 (_mm_sll_epi16): Replace deprecated function with vec_sl.
3192 (_mm_sll_epi32): Likewise.
3193 (_mm_sll_epi64): Likewise.
3194 (_mm_sra_epi16): Replace deprecated function with vec_sra.
3195 (_mm_sra_epi32): Likewise.
3196 (_mm_srl_epi16): Replace deprecated function with vec_sr.
3197 (_mm_srl_epi32): Likewise.
3198 (_mm_srl_epi64): Likewise.
3200 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3201 Jinsong Ji <jji@us.ibm.com>
3203 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
3204 comparison operators with vec_cmp* for compatibility due to
3205 unfortunate history; clean up formatting and use types more
3207 (_mm_sll_epi32): Likewise.
3208 (_mm_sll_epi64): Likewise.
3209 (_mm_srl_epi16): Likewise.
3210 (_mm_srl_epi32): Likewise.
3211 (_mm_srl_epi64): Likewise.
3213 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3214 Jinsong Ji <jji@us.ibm.com>
3216 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
3217 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
3218 __vector __bool int. Use vec_cmpgt in preference to deprecated
3219 function vec_vcmpgtfp.
3220 (_mm_max_ps): Likewise.
3222 2018-10-25 Jeff Law <law@redhat.com>
3224 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
3227 2018-10-25 Martin Sebor <msebor@redhat.com>
3229 * doc/extend.texi (aligned): Expand attribute description.
3230 (Alignment): Rename section. Discuss function arguments.
3232 2018-10-25 Jan Hubicka <jh@suse.cz>
3234 * ipa-devirt.c (main_odr_variant): Remove.
3235 (hash_odr_name, types_same_for_odr, types_odr_comparable,
3236 odr_name_hasher::equal, odr_subtypes_equivalent_p):
3237 Drop use of main_odr_variant.
3238 (add_type_duplicate): Silence confused warnings on integer types.
3239 (get_odr_type): Always look for main variant.
3240 (register_odr_type): Simplify.
3242 2018-10-25 Richard Biener <rguenther@suse.de>
3244 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
3245 Initialize ng to silence error with release checking bootstrap.
3247 2018-10-25 Richard Biener <rguenther@suse.de>
3249 * tree-if-conv.c: Include tree-ssa-sccvn.h.
3250 (tree_if_conversion): Run CSE on the if-converted loop body.
3252 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3254 * config/s390/constraints.md (ZL): New constraint.
3255 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
3257 * config/s390/s390.md (movdi_larl): Remove.
3258 (movdi_64): Add the LARL alternative.
3260 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3263 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
3264 (RTX_CODE_HWINT_P): New macro.
3265 (rtx_code_size): Use RTX_CODE_HWINT_P ().
3267 2018-10-25 Jan Hubicka <jh@suse.cz>
3269 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
3272 2018-10-25 Richard Biener <rguenther@suse.de>
3274 PR tree-optimization/87665
3275 PR tree-optimization/87745
3276 * tree-vectorizer.h (get_earlier_stmt): Remove.
3277 (get_later_stmt): Pick up UID from the original non-pattern stmt.
3279 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
3281 * options.texi (Deprecated): Move list to Var section.
3283 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
3284 Jinsong Ji <jji@us.ibm.com>
3286 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
3287 __vector long to __vector long long.
3288 (_mm_cvtpd_ps): Likewise.
3289 (_mm_cvttpd_epi32): Likewise.
3290 (_mm_cvtpi32_pd): Likewise.
3291 (_mm_unpackhi_epi64): Likewise.
3292 (_mm_unpacklo_epi64): Likewise.
3294 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
3296 PR rtl-optimization/87720
3297 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
3299 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
3301 * gimple-ssa-isolate-paths.c
3302 (find_implicit_erroneous_behavior): Do not change code if the
3303 pass is running for warnings only.
3304 (find_explicit_erroneous_behavior): Likewise.
3306 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
3308 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
3309 Define as rs6000_mangle_decl_assembler_name.
3310 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
3311 long double to IEEE long double, switch the names of the long
3312 double built-in functions to be <func>f128 instead of <func>l.
3314 2018-10-24 Martin Sebor <msebor@redhat.com>
3316 * doc/extend.texi (nonnull): List no-argument form. Reference
3317 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
3319 2018-10-24 Richard Biener <rguenther@suse.de>
3321 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
3323 2018-10-24 Martin Liska <mliska@suse.cz>
3325 PR tree-optimization/84436
3326 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
3328 (switch_conversion::contains_linear_function_p): New.
3329 (switch_conversion::build_one_array): Support linear
3330 transformation on input.
3331 * tree-switch-conversion.h (struct switch_conversion): Add
3332 contains_linear_function_p declaration.
3334 2018-10-24 Richard Biener <rguenther@suse.de>
3336 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
3337 if its argument is CONSTANT_CLASS_P.
3339 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
3341 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
3342 it is wrong for forward declarations.
3344 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
3346 * config/s390/s390.c (s390_check_qrst_address): Add the missing
3347 SYMBOL_REF_P () check.
3349 2018-10-24 Richard Biener <rguenther@suse.de>
3351 PR tree-optimization/87105
3352 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
3353 dump classification.
3354 (vect_analyze_data_ref_accesses): Handle duplicate loads and
3355 stores by splitting the affected group after the fact.
3356 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
3357 fail the SLP build because of size constraints.
3359 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3361 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
3362 * configure: Regenerate.
3363 * config.in: Regenerate.
3364 * varasm.c (mergeable_string_section): Use readonly_data_section
3365 if linker doesn't support SHF_MERGE with alignment > 8.
3366 (mergeable_constant_section): Likewise.
3368 2018-10-24 Richard Biener <rguenther@suse.de>
3370 PR tree-optimization/84013
3371 * tree-ssa-structalias.c (struct msdi_data): New struct for
3372 marshalling data to walk_stmt_load_store_ops.
3373 (maybe_set_dependence_info): Refactor as callback for
3374 walk_stmt_load_store_ops.
3375 (compute_dependence_clique): Set restrict info on all stmt kinds.
3377 2018-10-24 Martin Liska <mliska@suse.cz>
3379 * cgraph.c (cgraph_node::dump):
3380 Remove reduntant dumps and make tp_first_run dump more compact.
3382 2018-10-24 Richard Biener <rguenther@suse.de>
3384 PR tree-optimization/87665
3385 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
3388 2018-10-12 Jeff Law <law@redhat.com>
3390 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
3393 2018-10-23 Richard Biener <rguenther@suse.de>
3395 * tree-vrp.c (add_assert_info): Guard dump_printf with
3397 * gimple-ssa-evrp-analyze.c
3398 (evrp_range_analyzer::record_ranges_from_incoming_edge):
3399 Use value_range::ignore_equivs_equal_p.
3401 2018-10-23 Richard Biener <rguenther@suse.de>
3403 PR tree-optimization/87105
3404 PR tree-optimization/87608
3405 * passes.def (pass_all_early_optimizations): Add early phi-opt
3407 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
3408 addition to debug stmts.
3409 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
3410 and abs replacement early.
3411 * tree-cfg.c (gimple_empty_block_p): Likewise.
3413 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
3416 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
3417 specified to configure.
3418 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
3420 2018-10-23 Richard Biener <rguenther@suse.de>
3422 PR tree-optimization/87700
3423 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
3425 2018-10-23 Jakub Jelinek <jakub@redhat.com>
3428 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
3429 second argument from __mmask16 to __mmask8.
3430 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
3431 _mm_mask_packs_epi32): Likewise.
3432 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
3434 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
3436 2018-10-23 Richard Biener <rguenther@suse.de>
3438 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
3440 2018-10-23 Richard Biener <rguenther@suse.de>
3442 PR tree-optimization/86144
3443 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
3444 over simd attribute.
3446 2018-10-23 Richard Biener <rguenther@suse.de>
3448 PR tree-optimization/87693
3449 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
3450 the case we do not find the taken edge.
3452 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
3453 Jinsong Ji <jji@us.ibm.com>
3455 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
3456 (_mm_store_pd): Use unaligned vector type for pointer cast.
3457 (_mm_maskmoveu_si128): Likewise.
3458 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
3459 (_mm_store_ps): Use unaligned vector type for pointer cast.
3461 2018-10-22 Paul Koning <ni1d@arrl.net>
3463 * symtab.c (symtab_node::increase_alignment): Correct max
3466 2018-10-22 Yury Gribov <tetra2005@gmail.com>
3468 PR tree-optimization/87633
3469 * match.pd: Do not generate unordered integer comparisons.
3471 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
3473 PR rtl-optimization/87600
3474 * combine.c: Add include of expr.h.
3475 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
3476 register to a pseudo.
3477 (make_more_copies): New function, add a copy to a new pseudo after
3478 the moves from hard registers into pseudos.
3479 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
3480 later. Call make_more_copies.
3482 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
3484 * lra-constraints.c (process_alt_operands): New local array,
3485 matching_early_clobber. Check matching_early_clobber before
3486 decrementing reject, and set matching_early_clobber after.
3488 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
3491 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
3492 call output_addr_const and hope for the best.
3494 2018-10-22 Richard Biener <rguenther@suse.de>
3496 * gimple-ssa-evrp-analyze.c
3497 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
3498 smarter about what ranges to use.
3499 * tree-vrp.c (add_assert_info): Dump here.
3500 (register_edge_assert_for_2): Instead of here at multiple but
3503 * gcc.dg/tree-ssa/evrp12.c: New testcase.
3504 * gcc.dg/predict-6.c: Adjust.
3505 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
3506 * gcc.dg/tree-ssa/vrp02.c: Likewise.
3507 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
3509 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
3510 Richard Biener <rguenther@suse.de>
3512 * bitmap.h: Update data structure documentation, including a
3513 description of bitmap views as either linked-lists or splay trees.
3514 (struct bitmap_element_def): Update comments for splay tree bitmaps.
3515 (struct bitmap_head_def): Likewise.
3516 (bitmap_list_view, bitmap_tree_view): New prototypes.
3517 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
3519 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
3520 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
3521 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
3522 released bitmap element here.
3523 (bitmap_element_free): Remove.
3524 (bitmap_elt_clear_from): Work on splay tree bitmaps.
3525 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
3526 this function similar ones such that linked-list bitmap implementation
3527 functions are grouped.
3528 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
3529 and moved for grouping.
3530 (bitmap_list_insert_element_after): Renamed from
3531 bitmap_elt_insert_after, and moved for grouping.
3532 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
3533 (bitmap_tree_link_left, bitmap_tree_link_right,
3534 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
3535 bitmap_tree_link_element, bitmap_tree_unlink_element,
3536 bitmap_tree_find_element): New functions for splay-tree bitmap
3538 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
3539 Renamed and moved, see above entries.
3540 (bitmap_tree_listify_from): New function to convert part of a splay
3541 tree bitmap to a linked-list bitmap.
3542 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
3543 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
3544 (bitmap_find_bit): Remove.
3545 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
3546 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
3547 Handle splay tree bitmaps.
3548 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
3549 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
3550 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
3551 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
3552 bitmap_intersect_compl_p, bitmap_ior_and_compl,
3553 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
3554 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
3555 corresponding changes to use linked-list specific bitmap_element
3556 manipulation functions as applicable for efficiency.
3557 (bitmap_tree_to_vec): New function.
3558 (debug_bitmap_elt_file): New function split out from ...
3559 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
3560 (bitmap_print): Likewise.
3562 PR tree-optimization/63155
3563 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
3565 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
3568 2018-10-22 Martin Liska <mliska@suse.cz>
3570 PR tree-optimization/87686
3572 2018-08-29 Martin Liska <mliska@suse.cz>
3574 * tree-switch-conversion.c (switch_conversion::expand):
3575 Strenghten assumption about gswitch statements.
3577 2018-10-22 Martin Liska <mliska@suse.cz>
3579 * ipa-icf.c (sem_item::compare_attributes): Remove.
3580 (sem_item::compare_referenced_symbol_properties): Use
3581 attribute_list_equal instead.
3582 (sem_function::equals_wpa): Likewise.
3583 * ipa-icf.h: Remove compare_attributes.
3585 2018-10-22 Richard Biener <rguenther@suse.de>
3588 * mem-stats.h (mem_usage::operator==): Fix pasto.
3590 2018-10-22 Richard Biener <rguenther@suse.de>
3592 PR tree-optimization/87640
3593 * tree-vrp.c (set_value_range_with_overflow): Decompose
3595 (extract_range_from_binary_expr_1): Adjust.
3597 2018-10-22 Martin Jambor <mjambor@suse.cz>
3599 * tree-eh.h (stmt_could_throw_p): Add function parameter.
3600 (stmt_can_throw_external): Likewise.
3601 (stmt_can_throw_internal): Likewise.
3602 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
3603 (lower_eh_constructs_2): Likewise.
3604 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
3605 (stmt_can_throw_external): Likewise.
3606 (stmt_can_throw_internal): Likewise.
3607 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
3608 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
3609 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
3610 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
3611 (pass_lower_eh_dispatch::execute): Pass cfun to
3612 stmt_can_throw_external.
3613 (cleanup_empty_eh): Likewise.
3614 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
3615 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
3616 stmt_can_throw_external instead of pushing it to cfun.
3617 (symbol_table::create_edge): Likewise.
3618 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
3619 stmt_can_throw_internal.
3620 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
3621 to stmt_could_throw_p.
3622 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
3623 stmt_can_throw_internal.
3624 (pass_store_merging::execute): Likewise.
3625 * gimple-ssa-strength-reduction.c
3626 (find_candidates_dom_walker::before_dom_children): Pass cfun to
3628 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
3629 stmt_can_throw_internal.
3630 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
3631 to stmt_can_throw_external.
3632 (check_stmt): Pass cfun to stmt_could_throw_p.
3633 (check_stmt): Pass cfun to stmt_can_throw_external.
3634 (pass_nothrow::execute): Likewise.
3635 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
3636 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
3637 stmt_can_throw_internal.
3638 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
3639 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
3640 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
3641 * tree-complex.c (expand_complex_libcall): Pass cfun to
3642 stmt_could_throw_p and to stmt_can_throw_internal.
3643 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
3644 * tree-inline.c (copy_edges_for_bb): Likewise.
3645 (maybe_move_debug_stmts_to_successors): Likewise.
3646 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
3648 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
3649 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
3650 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
3651 stmt_can_throw_internal.
3652 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
3653 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
3655 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
3656 stmt_can_throw_internal.
3657 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
3658 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
3660 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
3661 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
3662 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3663 (convert_mult_to_fma_1): Likewise.
3664 (convert_to_divmod): Likewise.
3665 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
3666 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
3667 * tree-ssa-propagate.c
3668 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
3669 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
3670 (maybe_optimize_range_tests): Likewise.
3671 (linearize_expr_tree): Likewise.
3672 (reassociate_bb): Likewise.
3673 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3674 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
3675 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
3676 (handle_char_store): Likewise.
3677 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
3678 stmt_can_throw_internal.
3679 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
3681 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3682 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
3683 (vectorizable_simd_clone_call): Likewise.
3684 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
3685 (gimple_stringop_fixed_value): Likewise.
3687 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
3689 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
3690 literal pool references.
3691 (s390_check_qrst_address): Adapt to the new behavior of
3692 s390_loadrelative_operand_p ().
3694 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3697 * config/i386/sse.md (*andnot<mode>3_bcst): New.
3699 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3702 * config/i386/sse.md (*<code><mode>3_bcst): New.
3704 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3707 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
3708 V4DI, V16SI and V8DI.
3709 (*sub<mode>3<mask_name>_bcst): New.
3710 (*add<mode>3<mask_name>_bcst): Likewise.
3712 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
3713 Jinsong Ji <jji@us.ibm.com>
3715 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
3716 __m64 with __vector unsigned long long for compatibility.
3717 (_mm_movemask_epi8): Likewise.
3718 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
3719 (_mm_cvttps_pi32): Likewise.
3720 (_mm_cvtpi32_ps): Likewise.
3721 (_mm_cvtps_pi16): Likewise.
3722 (_mm_loadh_pi): Likewise.
3723 (_mm_storeh_pi): Likewise.
3724 (_mm_movehl_ps): Likewise.
3725 (_mm_movelh_ps): Likewise.
3726 (_mm_loadl_pi): Likewise.
3727 (_mm_storel_pi): Likewise.
3728 (_mm_movemask_ps): Likewise.
3729 (_mm_shuffle_pi16): Likewise.
3731 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3734 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
3735 __builtin_ia32_vfnmsubpd512_mask.
3736 (_mm512_mask_fnmsub_round_pd): Likewise.
3737 (_mm512_fnmsub_pd): Likewise.
3738 (_mm512_mask_fnmsub_pd): Likewise.
3739 (_mm512_maskz_fnmsub_round_pd): Use
3740 __builtin_ia32_vfnmsubpd512_maskz.
3741 (_mm512_maskz_fnmsub_pd): Likewise.
3742 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
3743 (_mm512_mask_fnmsub_round_ps): Likewise.
3744 (_mm512_fnmsub_ps): Likewise.
3745 (_mm512_mask_fnmsub_ps): Likewise.
3746 (_mm512_maskz_fnmsub_round_ps): Use
3747 __builtin_ia32_vfnmsubps512_maskz.
3748 (_mm512_maskz_fnmsub_ps): Likewise.
3749 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
3750 __builtin_ia32_vfnmsubpd256_mask.
3751 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
3752 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3753 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
3754 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3755 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3756 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
3757 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
3758 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
3759 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
3760 __builtin_ia32_vfnmsubpd.
3761 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
3762 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
3763 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
3764 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
3765 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
3766 * config/i386/i386-builtin.def: Add
3767 __builtin_ia32_vfnmsubpd256_mask,
3768 __builtin_ia32_vfnmsubpd256_maskz,
3769 __builtin_ia32_vfnmsubpd128_mask,
3770 __builtin_ia32_vfnmsubpd128_maskz,
3771 __builtin_ia32_vfnmsubps256_mask,
3772 __builtin_ia32_vfnmsubps256_maskz,
3773 __builtin_ia32_vfnmsubps128_mask,
3774 __builtin_ia32_vfnmsubps128_maskz,
3775 __builtin_ia32_vfnmsubpd512_mask,
3776 __builtin_ia32_vfnmsubpd512_maskz,
3777 __builtin_ia32_vfnmsubps512_mask,
3778 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
3779 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
3780 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
3781 __builtin_ia32_vfnmsubpd256.
3782 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
3783 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
3784 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
3786 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
3788 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
3790 (fmai_vmfnmsub_<mode><round_name>): Likewise.
3792 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3795 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
3796 __builtin_ia32_vfnmaddpd512_mask.
3797 (_mm512_mask_fnmadd_round_pd): Likewise.
3798 (_mm512_fnmadd_pd): Likewise.
3799 (_mm512_mask_fnmadd_pd): Likewise.
3800 (_mm512_maskz_fnmadd_round_pd): Use
3801 __builtin_ia32_vfnmaddpd512_maskz.
3802 (_mm512_maskz_fnmadd_pd): Likewise.
3803 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
3804 (_mm512_mask_fnmadd_round_ps): Likewise.
3805 (_mm512_fnmadd_ps): Likewise.
3806 (_mm512_mask_fnmadd_ps): Likewise.
3807 (_mm512_maskz_fnmadd_round_ps): Use
3808 __builtin_ia32_vfnmaddps512_maskz.
3809 (_mm512_maskz_fnmadd_ps): Likewise.
3810 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
3811 __builtin_ia32_vfnmaddpd256_mask.
3812 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
3813 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
3814 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
3815 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3816 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3817 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
3818 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
3819 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
3820 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
3821 __builtin_ia32_vfnmaddpd.
3822 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
3823 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
3824 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
3825 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
3826 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
3827 * config/i386/i386-builtin.def: Add
3828 __builtin_ia32_vfnmaddpd256_mask,
3829 __builtin_ia32_vfnmaddpd256_maskz,
3830 __builtin_ia32_vfnmaddpd128_mask,
3831 __builtin_ia32_vfnmaddpd128_maskz,
3832 __builtin_ia32_vfnmaddps256_mask,
3833 __builtin_ia32_vfnmaddps256_maskz,
3834 __builtin_ia32_vfnmaddps128_mask,
3835 __builtin_ia32_vfnmaddps128_maskz,
3836 __builtin_ia32_vfnmaddpd512_mask,
3837 __builtin_ia32_vfnmaddpd512_maskz,
3838 __builtin_ia32_vfnmaddps512_mask,
3839 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
3840 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
3841 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
3842 __builtin_ia32_vfnmaddpd256.
3843 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
3844 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
3845 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
3847 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
3849 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
3851 (fmai_vmfnmadd_<mode><round_name>): Likewise.
3853 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3856 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
3857 __builtin_ia32_vfmsubpd512_mask.
3858 (_mm512_mask_fmsub_round_pd): Likewise.
3859 (_mm512_fmsub_pd): Likewise.
3860 (_mm512_mask_fmsub_pd): Likewise.
3861 (_mm512_maskz_fmsub_round_pd): Use
3862 __builtin_ia32_vfmsubpd512_maskz.
3863 (_mm512_maskz_fmsub_pd): Likewise.
3864 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
3865 (_mm512_mask_fmsub_round_ps): Likewise.
3866 (_mm512_fmsub_ps): Likewise.
3867 (_mm512_mask_fmsub_ps): Likewise.
3868 (_mm512_maskz_fmsub_round_ps): Use
3869 __builtin_ia32_vfmsubps512_maskz.
3870 (_mm512_maskz_fmsub_ps): Likewise.
3871 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
3872 __builtin_ia32_vfmsubpd256_mask.
3873 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
3874 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3875 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
3876 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3877 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3878 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
3879 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
3880 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
3881 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
3882 __builtin_ia32_vfmsubpd.
3883 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
3884 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
3885 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
3886 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
3887 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
3888 * config/i386/i386-builtin.def: Add
3889 __builtin_ia32_vfmsubpd256_mask,
3890 __builtin_ia32_vfmsubpd256_maskz,
3891 __builtin_ia32_vfmsubpd128_mask,
3892 __builtin_ia32_vfmsubpd128_maskz,
3893 __builtin_ia32_vfmsubps256_mask,
3894 __builtin_ia32_vfmsubps256_maskz,
3895 __builtin_ia32_vfmsubps128_mask,
3896 __builtin_ia32_vfmsubps128_maskz,
3897 __builtin_ia32_vfmsubpd512_mask,
3898 __builtin_ia32_vfmsubpd512_maskz,
3899 __builtin_ia32_vfmsubps512_mask,
3900 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
3901 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
3902 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
3903 __builtin_ia32_vfmsubpd256.
3904 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
3905 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
3906 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
3908 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
3910 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
3912 (fmai_vmfmsub_<mode><round_name>): Likewise.
3914 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3916 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
3917 Remove plus. Renamed to ...
3918 (*sub<mode>3<mask_name>_bcst): This.
3919 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
3920 (*add<mode>3<mask_name>_bcst): This.
3922 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3925 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
3927 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3930 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
3931 (_mm_or_epi32): Likewise.
3932 (_mm256_xor_epi32): Likewise.
3933 (_mm_xor_epi32): Likewise.
3934 (_mm256_or_epi64): Likewise.
3935 (_mm_or_epi64): Likewise.
3936 (_mm256_xor_epi64): Likewise.
3937 (_mm_xor_epi64): Likewise.
3939 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
3942 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
3944 2018-10-20 Jakub Jelinek <jakub@redhat.com>
3947 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
3949 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
3951 * doc/ux.texi: Move @section directly after @node.
3953 2018-10-19 Jakub Jelinek <jakub@redhat.com>
3957 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
3958 depend closely nested inside of loop with ordered clause with
3961 2018-10-19 David Malcolm <dmalcolm@redhat.com>
3963 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
3964 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
3965 * doc/ux.texi: New file.
3967 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
3969 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
3970 be the first CR field allocated.
3972 2018-10-19 Richard Biener <rguenther@suse.de>
3975 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
3976 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
3978 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
3981 * config/i386/sse.md
3982 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
3983 (*add<mode>3<mask_name>_bcst_2): Likewise.
3985 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
3987 * config/i386/sse.md
3988 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3989 Replace nonimmediate_operand with register_operand.
3990 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3992 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3995 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
3997 PR rtl-optimization/87596
3998 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
3999 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
4000 for instructions in FROM..TO range.
4002 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
4004 * cfgexpand.c (expand_one_var): Use specific wording in error message
4005 for non-local frame variables.
4006 * stor-layout.c (layout_decl): Do not issue a warning for them.
4008 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
4010 * haifa-sched.c (priority): Add force_recompute parameter.
4011 (apply_replacement): Call priority () with force_recompute = true.
4012 (restore_pattern): Likewise.
4014 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4016 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
4017 HOST_BITS_PER_WIDE_INT.
4018 (test_vector_ops_duplicate): Likewise.
4020 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4023 * config/i386/sse.md (VF_AVX512): New.
4024 (avx512bcst): Likewise.
4025 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4027 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4029 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4032 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
4034 * doc/invoke.texi (-dumpversion): Improve grammar.
4035 (-dumpfullversion): Make more consistent with -dumpversion.
4037 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
4039 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
4040 Set JUMP_LABEL to the jump insn.
4041 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
4042 Predict emitted jump and add label to jump insn.
4044 2018-10-18 David Malcolm <dmalcolm@redhat.com>
4046 PR tree-optimization/87562
4047 * input.c (get_substring_ranges_for_loc): Use
4048 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
4049 getting the linemap for the endpoint. Verify that it's either
4050 in the same linemap as the start point's spelling location, or
4051 at least in the same file.
4053 2018-10-18 Richard Biener <rguenther@suse.de>
4055 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
4056 feed width-specific load/store costs through ix86_vec_cost.
4057 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
4058 (k8_cost): Likewise.
4059 (bdver_cost): Likewise.
4060 (znver1_cost): Likewise.
4061 (btver1_cost): Likewise.
4062 (btver2_cost): Likewise.
4064 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4066 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
4067 to simplify subreg of vec_merge.
4069 2018-10-18 Richard Biener <rguenther@suse.de>
4071 * config/i386/i386.c: Fix costing of vector FMA.
4073 2018-10-18 Richard Biener <rguenther@suse.de>
4075 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
4077 (ix86_builtin_vectorization_cost): For vec_construct properly
4078 cost insertion into SSE regs.
4079 (...): Adjust calls to ix86_vec_cost.
4081 2018-10-18 Richard Biener <rguenther@suse.de>
4085 2018-02-07 Richard Biener <rguenther@suse.de>
4087 PR tree-optimization/84204
4088 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
4091 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4094 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
4096 (test_vector_ops_duplicate): Add test for a scalar subreg of a
4097 VEC_MERGE of a VEC_DUPLICATE.
4099 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4101 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
4102 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
4103 * doc/standards.texi (C Language): Document C2X.
4104 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
4105 (rl78_option_override): Handle "GNU C2X" language name.
4107 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4109 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
4110 Document C17 as published in 2018.
4112 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
4115 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
4116 bail out if both sides do not have the same storage order.
4118 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4120 * bitmap.c (bitmap_head::dump): New.
4121 * bitmap.h (bitmap_head): Add dump().
4122 * gimple-ssa-evrp-analyze.c
4123 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
4124 (evrp_range_analyzer::set_ssa_range_info): Same.
4125 (evrp_range_analyzer::record_ranges_from_phis): Same.
4126 (evrp_range_analyzer::record_ranges_from_stmt): Same.
4127 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
4128 * gimple-ssa-sprintf.c (get_int_range): Same.
4129 (format_integer): Same.
4130 (sprintf_dom_walker::handle_gimple_call): Same.
4131 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
4132 (ipcp_vr_lattice::top_p): Same.
4133 (ipcp_vr_lattice::bottom_p): Same.
4134 (ipcp_vr_lattice::set_to_bottom): Same.
4135 (ipa_vr_operation_and_type_effects): Same.
4136 (propagate_vr_across_jump_function): Same.
4137 (ipcp_store_vr_results): Same.
4138 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
4139 (ipa_print_node_jump_functions_for_edge): Same.
4140 (ipa_get_value_range): Same.
4141 (ipa_compute_jump_functions_for_edge): Same.
4142 (ipa_write_jump_function): Same.
4143 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
4144 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4146 * vr-values.c (set_value_range_to_nonnegative): Same.
4147 (set_value_range_to_truthvalue): Same.
4148 (vr_values::get_value_range): Same.
4149 (vr_values::set_defs_to_varying): Same.
4150 (vr_values::update_value_range): Same.
4151 (symbolic_range_based_on_p): Same.
4152 (vr_values::op_with_boolean_value_range_p): Same.
4153 (vr_values::extract_range_for_var_from_comparison_expr): Same.
4154 (vr_values::extract_range_from_ssa_name): Same.
4155 (vr_values::extract_range_from_binary_expr): Same.
4156 (vr_values::extract_range_from_unary_expr): Same.
4157 (vr_values::extract_range_from_cond_expr): Same.
4158 (vr_values::extract_range_from_comparison): Same.
4159 (vr_values::check_for_binary_op_overflow): Same.
4160 (vr_values::extract_range_basic): Same.
4161 (vr_values::extract_range_from_assignment): Same.
4162 (compare_ranges): Same.
4163 (compare_range_with_value): Same.
4164 (vr_values::adjust_range_with_scev): Same.
4165 (vrp_valueize): Same.
4166 (vrp_valueize_1): Same.
4167 (vr_values::get_vr_for_comparison): Same.
4168 (vr_values::compare_name_with_value): Same.
4169 (vr_values::compare_names): Same.
4170 (vr_values::vrp_evaluate_conditional): Same.
4171 (find_case_label_ranges): Same.
4172 (vr_values::vrp_visit_switch_stmt): Same.
4173 (vr_values::extract_range_from_phi_node): Same.
4174 (vr_values::simplify_div_or_mod_using_ranges): Same.
4175 (vr_values::simplify_bit_ops_using_ranges): Same.
4176 (test_for_singularity): Same.
4177 (range_fits_type_p): Same.
4178 (vr_values::simplify_cond_using_ranges_1): Same.
4179 (vr_values::simplify_switch_using_ranges): Same.
4180 (vr_values::simplify_float_conversion_using_ranges): Same.
4181 (vr_values::two_valued_val_range_p): Same.
4182 (vr_values::add_equivalence): Move to value_range::equiv_add.
4183 * vr-values.h (vr_values::add_equivalence): Remove.
4184 (VR_INITIALIZER): Remove.
4185 * tree-vrp.c (value_range::set): New.
4186 (value_range::equiv_add): New.
4187 (value_range::value_range): New.
4188 (value_range::deep_copy): New.
4189 (value_range::check): New.
4190 (value_range::equal_p): New.
4191 (value_range::ignore_equivs_equal_p): New.
4192 (value_range::operator==): New.
4193 (value_range::operator!=): New.
4194 (value_range::symbolic_p): New.
4195 (value_range::numeric_p): New.
4196 (value_range::set_undefined): New.
4197 (value_range::set_varying): New.
4198 (value_range::may_contain_p): New.
4199 (value_range::equiv_clear): New.
4200 (value_range::singleton_p): New.
4201 (value_range::intersect): New.
4202 (value_range::dump): New.
4203 (value_range::set_and_canonicalize): New.
4204 (set_value_range): Adjust for value_range API.
4205 (set_value_range_to_undefined): Same.
4206 (set_value_range_to_varying): Same.
4207 (set_and_canonicalize_value_range): Same.
4208 (set_value_range_to_nonnull): Same.
4209 (set_value_range_to_null): Same.
4210 (range_is_null): Same.
4211 (range_is_nonnull): Same.
4212 (range_int_cst_p): Same.
4213 (range_int_cst_singleton_p): Same.
4214 (symbolic_range_p): Same.
4215 (range_includes_zero_p): Same.
4216 (value_range_constant_singleton): Same.
4217 (vrp_set_zero_nonzero_bits): Same.
4218 (ranges_from_anti_range): Same.
4219 (extract_range_into_wide_ints): Same.
4220 (extract_range_from_multiplicative_op): Same.
4221 (set_value_range_with_overflow): Same.
4222 (extract_range_from_binary_expr_1): Same.
4223 (extract_range_from_unary_expr): Same.
4224 (dump_value_range): Same.
4225 (debug_value_range): Same.
4226 (vrp_prop::check_array_ref): Same.
4227 (vrp_prop::check_mem_ref): Same.
4228 (vrp_prop::vrp_initialize): Same.
4229 (vrp_prop::visit_stmt): Same.
4230 (intersect_ranges): Same.
4231 (vrp_prop::visit_phi): Same.
4232 (vrp_prop::vrp_finalize): Same.
4233 (determine_value_range_1): Same.
4234 (determine_value_range): Same.
4235 (vrp_intersect_ranges_1): Rename to...
4236 (vrp_intersect_1): this.
4237 (vrp_intersect_ranges): Rename to...
4238 (value_range::intersect_helper): ...this.
4239 (vrp_meet_1): Rename to...
4240 (value_range::union_helper): ...this.
4241 (vrp_meet): Rename to...
4242 (value_range::union_): ...this.
4243 (copy_value_range): Remove.
4244 * tree-vrp.h (struct value_range): Rewrite into a proper class.
4245 (value_range::vrtype): New.
4246 (value_range::type): New.
4247 (value_range::equiv): New.
4248 (value_range::min): New.
4249 (value_range::max): New.
4250 (value_range::varying_p): New.
4251 (value_range::undefined_p): New.
4252 (value_range::null_p): New.
4253 (value_range::equiv_add): New.
4254 (copy_value_range): Remove.
4256 2018-10-17 David Malcolm <dmalcolm@redhat.com>
4258 * Makefile.in (SELFTEST_TARGETS): New.
4259 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
4260 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4261 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
4263 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
4264 (selftest-c++-gdb, selftest-c++-valgrind): Move to
4266 * configure: Regenerate.
4267 * configure.ac (selftest_languages): New.
4269 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4271 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
4272 overflow wraps argument.
4273 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
4274 wide_int_range_multiplicative_op.
4275 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
4276 overflow wraps argument.
4277 (wide_int_range_multiplicative_op): Same.
4278 (wide_int_range_lshift): Same.
4279 (wide_int_range_div): Same.
4280 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
4281 (wide_int_range_lshift): Same.
4282 (wide_int_range_div): Same.
4284 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4286 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
4287 use sign as argument.
4288 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
4289 wide_int_range_shift_undefined_p.
4291 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4293 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
4295 (@despeculate_copy<ALLI_TI:mode>): ... This.
4296 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
4299 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4301 * config.gcc: Obsolete *-*-solaris2.10*.
4302 * doc/install.texi (Specific, *-*-solaris2*): Document it.
4304 2018-10-12 Jeff Law <law@redhat.com>
4306 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
4307 reg + sym +- const_int addressing modes.
4309 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4311 * common.opt (fdiagnostics-minimum-margin-width=): New option.
4312 * diagnostic-show-locus.c (layout::layout): Apply the minimum
4314 (layout::start_annotation_line): Only print up to 3 of the
4315 margin character, to avoid touching the left-hand side.
4316 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
4317 minimum margin width, as set by test_diagnostic_context's ctor.
4318 (selftest::test_fixit_insert_containing_newline): Likewise.
4319 (selftest::test_fixit_insert_containing_newline_2): Likewise.
4320 (selftest::test_line_numbers_multiline_range): Clear
4321 dc.min_margin_width.
4322 * diagnostic.c (diagnostic_initialize): Initialize
4324 * diagnostic.h (struct diagnostic_context): Add field
4326 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
4327 * opts.c (common_handle_option): Handle
4328 OPT_fdiagnostics_minimum_margin_width_.
4329 * selftest-diagnostic.c
4330 (selftest::test_diagnostic_context::test_diagnostic_context):
4331 Initialize min_margin_width to 6.
4332 * toplev.c (general_init): Initialize global_dc->min_margin_width.
4334 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4336 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
4337 Fix usage of "error_at_rich_loc" in the comment.
4339 2018-10-15 Renlin Li <renlin.li@arm.com>
4342 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
4343 if-conversioned loop when it contains ifn with types not
4344 supported by backend.
4345 * internal-fn.c (expand_direct_optab_fn): Add an assert.
4346 (direct_internal_fn_supported_p): New helper function.
4347 * internal-fn.h (direct_internal_fn_supported_p): Declare.
4349 2018-10-15 Jakub Jelinek <jakub@redhat.com>
4352 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4353 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4354 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4356 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
4358 PR tree-optimization/87022
4359 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
4360 bits in dist vector rather than the first one.
4362 2018-10-15 Richard Biener <rguenther@suse.de>
4365 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
4366 (visit_loadstore): When a used restrict tag escaped verify that
4367 the points-to solution of "other" pointers do not include
4369 (compute_dependence_clique): If a used restrict tag escaped
4370 communicated that down to visit_loadstore.
4372 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
4374 * config/s390/s390.c (s390_expand_vec_init): Force vector element
4375 into reg if it isn't a general operand.
4377 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4380 * config/i386/sse.md (*vec_dupv2di): Add register source to
4383 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4386 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4387 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
4388 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4389 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4391 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
4393 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
4394 (notice_args_size): Set it in the current trace if no insn that can
4395 throw internally has been seen yet.
4396 (connect_traces): When connecting args_size between traces, allow the
4397 incoming values not to match if there is an insn setting it before the
4398 first insn that can throw internally; in that case, force the creation
4399 of a CFI note on this latter insn.
4401 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
4403 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
4404 the base class, because using the injected-class-name was not clearly
4405 specified until DR 176.
4407 2018-10-12 Paul Koning <ni1d@arrl.net>
4409 * config/pdp11/pdp11.md (doloop_end): New expander.
4410 (doloop_end_insn): renamed from "doloop_end".
4411 (addqi3): New pattern.
4412 (subqi3): New pattern.
4413 * config/pdp11/predicates.md (incdec_operand): New predicate.
4415 2018-10-12 Yury Gribov <tetra2005@gmail.com>
4418 * real.c (format_helper::can_represent_integral_type_p): New function
4419 * real.h (format_helper::can_represent_integral_type_p): Ditto.
4420 * match.pd: New pattern.
4422 2018-10-12 Alexandre Oliva <oliva@adacore.com>
4424 * configure.ac: Introduce --enable-large-address-aware
4425 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
4426 * doc/install.texi: Document it.
4427 * configure, config.in: Rebuilt.
4428 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
4429 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
4430 (LINK_SPEC): Insert it.
4431 * config/i386/mingw-w64.h: Likewise.
4433 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
4435 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
4437 PR rtl-optimization/87600
4438 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
4440 2018-10-12 Paul Koning <ni1d@arrl.net>
4442 * doc/md.texi (doloop_end): Document that the pattern code may
4443 need to check operand mode.
4445 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
4447 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
4448 to zero-extend between int and floating-point registers.
4449 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
4450 ldp into floating-point registers. Add type and arch attributes.
4451 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
4452 Use f_loads for type attribute.
4454 2018-10-11 Martin Sebor <msebor@redhat.com>
4456 * doc/extend.texi (attribute packed): Correct typos.
4458 2018-10-11 Martin Sebor <msebor@redhat.com>
4460 * doc/extend.texi (attribute flatten): Mention interaction with
4463 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
4466 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
4467 Set new_decl virtual flag to zero.
4469 2018-10-11 Martin Sebor <msebor@redhat.com>
4472 * doc/extend.texi (attribute format_arg): Discuss using multiple
4473 attributes on a single function.
4475 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
4477 PR tree-optimization/86829
4478 * match.pd (sin (atan (x))): New simplification rules.
4479 (cos (atan (x))): Likewise.
4480 * real.c (build_sinatan_real): New function.
4481 * real.h (build_sinatan_real): Prototype.
4483 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
4485 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
4487 (fold_mergeeo_helper): New helper function.
4488 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
4489 intrinsics. Correct some whitespace indentation issues.
4491 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
4494 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
4495 Use HOST_WIDE_INT_1U for shift.
4497 2018-10-11 Doug Rupp <rupp@adacore.com>
4498 Olivier Hainque <hainque@adacore.com>
4500 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
4501 Pass --relax to the linker for RTPs.
4502 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
4504 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
4505 Jan Hubicka <jh@suse.cz>
4506 Martin Jambor <mjambor@suse.cz>
4508 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
4509 the same elements are repeated rather than printing all of them.
4510 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
4511 "repeated" elements.
4512 * read-rtl-function.c (test_loading_repeat): New function.
4513 (read_rtl_function_c_tests): Call test_loading_repeat.
4514 * rtl-tests.c (test_dumping_repeat): New function.
4515 (rtl_tests_c_tests): Call test_dumping_repeat.
4517 2018-10-11 Richard Biener <rguenther@suse.de>
4519 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
4520 bdver?_cost): Unify to ...
4521 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
4522 * config/i386/i386.c (processor_cost_table): Adjust.
4524 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
4527 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
4528 the thunk when expanding to GIMPLE.
4530 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
4532 * varasm.c (mergeable_string_section): Don't try to move zero-length
4533 strings to the merge section.
4535 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
4538 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
4540 2018-10-10 Jakub Jelinek <jakub@redhat.com>
4543 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
4544 to special_args set.
4546 2018-10-10 Richard Biener <rguenther@suse.de>
4548 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
4549 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
4550 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
4551 and recursing and pattern terminating the recursion on SSE
4552 vector width using ix86_expand_reduc.
4553 (reduc_sminmax_scal_<mode>): Split into part reducing to half
4554 width and recursing and SSE2 vector variant doing the final
4555 reduction with ix86_expand_reduc.
4556 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
4557 with terminating the recursion at AVX level, splitting that
4560 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4562 * genmatch.c (error_cb): Rename to...
4563 (diagnostic_cb): ...this, converting int params to enums.
4564 (fatal_at): Update for renaming.
4565 (warning_at): Likewise.
4567 * input.c (selftest::ebcdic_execution_charset::apply):
4568 Update for renaming of...
4569 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
4571 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
4572 converting level and reason to enums.
4573 (class selftest::lexer_error_sink): Rename to...
4574 (class selftest::lexer_test_options): ...this, renaming field
4575 "m_errors" to "m_diagnostics".
4576 (selftest::lexer_test_options::apply): Update for renaming of...
4577 (selftest::lexer_test_options::on_error): ...this, renaming to...
4578 (selftest::lexer_test_options::on_diagnostic): ...this
4579 converting level and reason to enums.
4580 (selftest::test_lexer_string_locations_raw_string_unterminated):
4581 Update for renamings.
4582 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
4585 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
4587 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
4588 * config/rs6000/pmmintrin.h: New file.
4590 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
4592 PR tree-optimization/86659
4593 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
4595 2018-10-09 Richard Biener <rguenther@suse.de>
4597 PR tree-optimization/63155
4598 * tree-ssa-structalias.c: Include tree-ssa.h.
4599 (get_constraint_for_ssa_var): For undefs return nothing_id.
4600 (find_func_aliases): Cleanup PHI handling.
4602 2018-10-09 Richard Biener <rguenther@suse.de>
4604 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
4607 2018-10-09 Martin Liska <mliska@suse.cz>
4609 * asan.c (asan_emit_stack_protection): If a stack variable
4610 is located in a same file as current function, then emit
4611 line info into variable definition string.
4613 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4615 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
4618 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4620 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
4623 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4625 PR tree-optimization/86659
4626 * gimple-match.h (struct gimple_match_op): Add reverse field.
4627 (gimple_match_op::set_op): New overloaded method.
4628 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
4629 the REF_REVERSE_STORAGE_ORDER flag on the value.
4630 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
4631 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
4633 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4636 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
4637 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
4639 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
4642 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
4643 Defined with __builtin_ia32_vfmaddsubpd512_mask.
4645 2018-10-08 Richard Biener <rguenther@suse.de>
4647 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
4648 cost the same as AVX128 ones.
4650 2018-10-08 Paul Koning <ni1d@arrl.net>
4652 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
4653 (expand_block_move): New function.
4654 * config/pdp11/pdp11.c (output_block_move): Remove.
4655 (expand_block_move): New function.
4656 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
4657 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
4658 (*movmemhi1): Remove.
4660 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
4662 * config/s390/2827.md: Increase latencies for some FP instructions.
4664 2018-10-08 Richard Biener <rguenther@suse.de>
4666 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
4668 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
4669 * tree-vectorizer.h (dump_stmt_cost): Adjust.
4670 (add_stmt_cost): Dump return value of the hook.
4672 2018-10-08 Richard Biener <rguenther@suse.de>
4674 PR tree-optimization/63155
4675 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
4676 (ssa_propagation_engine::ssa_propagate): Remove redundant
4677 bitmap bit clearing.
4679 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
4681 PR rtl-optimization/86939
4682 PR rtl-optimization/87479
4683 * ira.h (non_conflicting_reg_copy_p): New prototype.
4684 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
4685 (make_hard_regno_dead): Don't add conflicts for register
4686 ignore_reg_for_conflicts.
4687 (make_object_dead): Likewise.
4688 (non_conflicting_reg_copy_p): New function.
4689 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
4690 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
4691 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
4692 (make_hard_regno_dead): Don't add conflicts for register
4693 ignore_reg_for_conflicts. Remove special conflict handling of
4694 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
4695 check_pic_pseudo_p and update callers.
4696 (mark_pseudo_dead): Don't add conflicts for register
4697 ignore_reg_for_conflicts.
4698 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
4700 2018-10-05 Andrew Waterman <andrew@sifive.com>
4701 Jim Wilson <jimw@sifive.com>
4703 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
4704 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
4705 new pattern using HONOR_SNANS that emits one extra instruction.
4707 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
4709 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
4710 patterns): Merge SI and DI patterns to a GPR pattern.
4711 (unnamed define_insn and define_split for record form of that): Merge
4712 to a single define_insn_and_split pattern.
4714 2018-10-05 David Malcolm <dmalcolm@redhat.com>
4717 * input.c (expand_location_to_spelling_point): Add param "aspect"
4718 and use rather than hardcoding LOCATION_ASPECT_CARET.
4719 (get_substring_ranges_for_loc): Handle the case of a single token
4720 within a macro expansion.
4721 * input.h (expand_location_to_spelling_point): Add "aspect" param,
4722 defaulting to LOCATION_ASPECT_CARET.
4724 2018-10-05 Paul Koning <ni1d@arrl.net>
4726 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
4727 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
4728 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
4729 (pdp11_guard_type): New function.
4731 2018-10-05 Paul Koning <ni1d@arrl.net>
4733 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
4734 * config/pdp11/pdp11.opt (mfloat32): Remove.
4736 * doc/invoke.texi (pdp11 -mfloat32): Remove:
4737 (pdp11 -mfloat64): Remove.
4739 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4741 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
4742 (*cmp<mode>_cc_i387): Ditto.
4743 (*cmpu<mode>_cc_i387): Ditto.
4744 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4745 * config/i386/i386.c (ix86_expand_fp_compare): Remove
4747 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
4748 Emit x86_sahf_1 pattern.
4749 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
4750 (ix86_expand_carry_flag_compare): Ditto.
4752 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4754 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
4755 to reg_or_0_operand. Add "C" constraint.
4756 (*cmpxf_cc_i387): Ditto.
4757 (*cmp<mode>_i387): Change operand 2 predicate
4758 to nonimm_or_0_operand. Add "C" constraint.
4759 (*cmp<mode>_cc_i387): Ditto.
4760 (*cmp<mode>_0_i387): Remove insn pattern.
4761 (*cmp<mode>_0_cc_i387): Ditto.
4763 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4765 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
4766 * config/i386/predicates.md (nonimm_or_0_operand): Rename
4767 from vector_move_operand. Update all uses.
4769 2018-10-05 Martin Sebor <msebor@redhat.com>
4771 PR tree-optimization/87490
4772 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
4775 2018-10-05 Richard Biener <rguenther@suse.de>
4777 PR tree-optimization/63155
4778 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
4779 vertical space in dumpfiles.
4780 * tree-ssa-propagate.h
4781 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
4782 * tree-ssa-propagate.c (cfg_blocks_back): New global.
4783 (ssa_edge_worklist_back): Likewise.
4784 (curr_order): Likewise.
4785 (cfg_blocks_get): Remove abstraction.
4786 (cfg_blocks_add): Likewise.
4787 (cfg_blocks_empty_p): Likewise.
4788 (add_ssa_edge): Add to current or next worklist based on
4790 (add_control_edge): Likewise.
4791 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
4793 (ssa_propagation_engine::ssa_propagate): ... here. Unify
4794 iteration from CFG and SSA edge worklist so we process
4795 everything in RPO order, prioritizing forward progress
4797 (ssa_prop_init): Allocate new worklists, do not dump
4799 (ssa_prop_fini): Free new worklists.
4801 2018-10-05 Richard Biener <rguenther@suse.de>
4803 * tree-core.h (tree_block::abstract_flag): Remove.
4804 (tree_block::block_num): Make full 32bits.
4805 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
4806 * tree.h (BLOCK_ABSTRACT): Remove.
4807 * dwarf2out.c (gen_lexical_block_die): Remove dead code
4808 resulting from BLOCK_ABSTRACT being always false.
4809 (gen_inlined_subroutine_die): Likewise.
4810 (gen_block_die): Likewise.
4811 * tree.c (block_ultimate_origin): Likewise.
4812 * tree-pretty-print.c (dump_block_node): Remove code dealing
4813 with BLOCK_ABSTRACT.
4814 * tree-ssa-live.c (dump_scope_block): Likewise.
4815 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
4816 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
4818 2018-10-05 Richard Biener <rguenther@suse.de>
4820 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
4821 is asked for initialize mode to the component mode of the
4824 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
4827 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
4828 assembler for -mavx.
4829 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
4831 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
4834 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
4836 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
4837 to be DImode. When using mffscrn, force the operand to a register.
4839 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
4841 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
4842 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
4843 X87MODEF mode iterator.
4844 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
4845 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
4846 X87MODEF mode iterator.
4848 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4850 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
4851 -Wno-prio-ctor-dtor.
4853 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4855 * Makefile.in (OBJS): Add opt-problem.o.
4856 * dump-context.h: Include "selftest.h.
4857 (selftest::temp_dump_context): New forward decl.
4858 (class dump_context): Make friend of class
4859 selftest::temp_dump_context.
4860 (dump_context::dump_loc_immediate): New decl.
4861 (class dump_pretty_printer): Move here from dumpfile.c.
4862 (class temp_dump_context): Move to namespace selftest.
4863 (temp_dump_context::temp_dump_context): Add param
4864 "forcibly_enable_dumping".
4865 (selftest::verify_dumped_text):
4866 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
4867 (selftest::verify_item):
4868 (ASSERT_IS_TEXT): Move here from dumpfile.c.
4869 (ASSERT_IS_TREE): Likewise.
4870 (ASSERT_IS_GIMPLE): Likewise.
4871 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
4873 (dump_context::dump_loc_immediate): ...this new function.
4874 (class dump_pretty_printer): Move to dump-context.h.
4875 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
4876 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
4877 (temp_dump_context::temp_dump_context): Move to "selftest"
4878 namespace. Add param "forcibly_enable_dumping", and use it to
4879 conditionalize the use of m_pp;
4880 (selftest::verify_dumped_text): Make non-static.
4881 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
4882 (selftest::verify_item): Make non-static.
4883 (ASSERT_IS_TEXT): Move to dump-context.h.
4884 (ASSERT_IS_TREE): Likewise.
4885 (ASSERT_IS_GIMPLE): Likewise.
4886 (selftest::test_capture_of_dump_calls): Pass "true" for new
4887 param of temp_dump_context.
4888 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
4889 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
4891 * opt-problem.cc: New file.
4892 * opt-problem.h: New file.
4893 * optinfo-emit-json.cc
4894 (selftest::test_building_json_from_dump_calls): Pass "true" for
4895 new param of temp_dump_context.
4896 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
4897 (optinfo::emit_for_opt_problem): New function.
4898 (optinfo::emit): Clarity which emit_item is used.
4899 * optinfo.h (optinfo::get_dump_location): New accessor.
4900 (optinfo::emit_for_opt_problem): New decl.
4901 (optinfo::emit): Make const.
4902 * selftest-run-tests.c (selftest::run_tests): Call
4903 selftest::opt_problem_cc_tests.
4904 * selftest.h (selftest::opt_problem_cc_tests): New decl.
4905 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
4906 bool to opt_result, converting fprintf messages to
4907 opt_result::failure_at calls. Add "stmt" param for use by the
4909 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
4910 (runtime_alias_check_p): Convert return type from bool to
4911 opt_result, converting dump_printf calls to
4912 opt_result::failure_at, using the statement DDR_A for their
4914 (find_data_references_in_stmt): Convert return type from bool to
4915 opt_result, converting "return false" to opt_result::failure_at
4917 * tree-data-ref.h: Include "opt-problem.h".
4918 (dr_analyze_innermost): Convert return type from bool to opt_result,
4919 and add a const gimple * param.
4920 (find_data_references_in_stmt): Convert return type from bool to
4922 (runtime_alias_check_p): Likewise.
4923 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
4924 dr_analyze_innermost.
4925 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
4926 Convert return type from bool to opt_result, adding a message for
4927 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
4928 (vect_analyze_data_ref_dependence): Convert return type from bool
4929 to opt_result. Change sense of return type from "false"
4930 effectively meaning "no problems" to "false" meaning a problem,
4931 so that "return false" becomes "return opt_result::success".
4932 Convert "return true" calls to opt_result::failure_at, using
4933 the location of statement A rather than vect_location.
4934 (vect_analyze_data_ref_dependences): Convert return type from bool
4936 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
4937 calls to opt_result::failure_at, using the stmt location rather
4939 (vect_verify_datarefs_alignment): Convert return type from bool
4941 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
4942 into multiple more-tightly-scoped copies.
4943 (vect_analyze_data_refs_alignment): Convert return type from bool
4945 (vect_analyze_data_ref_accesses): Likewise, converting a
4946 "return false" to a "return opt_result::failure_at", adding a
4948 (vect_prune_runtime_alias_test_list): Convert return type from
4949 bool to opt_result, converting dump_printf_loc to
4950 opt_result::failure_at. Add a %G to show the pertinent statement,
4951 and use the stmt's location rather than vect_location.
4952 (vect_find_stmt_data_reference): Convert return type from
4953 bool to opt_result, converting dump_printf_loc to
4954 opt_result::failure_at, using stmt's location.
4955 (vect_analyze_data_refs): Convert return type from bool to
4956 opt_result. Convert "return false" to "return
4957 opt_result::failure_at", adding messages as needed.
4958 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
4959 type from bool to opt_result.
4960 (vect_determine_vf_for_stmt): Likewise.
4961 (vect_determine_vectorization_factor): Likewise, converting
4962 dump_printf_loc to opt_result::failure_at, using location of phi
4963 rather than vect_location.
4964 (vect_analyze_loop_form_1): Convert return type from bool to
4965 opt_result, converting dump_printf_loc calls, retaining the use of
4967 (vect_analyze_loop_form): Convert return type from loop_vec_info
4968 to opt_loop_vec_info.
4969 (vect_analyze_loop_operations): Convert return type from bool to
4970 opt_result, converting dump_printf_loc calls, using the location
4971 of phi/stmt rather than vect_location where available. Convert
4972 various "return false" to "return opt_result::failure_at" with
4973 "unsupported phi" messages.
4974 (vect_get_datarefs_in_loop): Convert return type from bool to
4975 opt_result. Add a message for the
4976 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
4977 (vect_analyze_loop_2): Convert return type from bool to
4978 opt_result. Ensure "ok" is set to a opt_result::failure_at before
4979 each "goto again;", adding new messages where needed.
4980 Add "unsupported grouped {store|load}" messages.
4981 (vect_analyze_loop): Convert return type from loop_vec_info to
4983 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
4985 * tree-vect-stmts.c (process_use): Likewise, converting
4986 dump_printf_loc call and using stmt location, rather than
4988 (vect_mark_stmts_to_be_vectorized): Likeise.
4989 (vect_analyze_stmt): Likewise, adding a %G.
4990 (vect_get_vector_types_for_stmt): Convert return type from bool to
4991 opt_result, converting dump_printf_loc calls and using stmt
4992 location, rather than vect_location.
4993 (vect_get_mask_type_for_stmt): Convert return type from tree to
4994 opt_tree, converting dump_printf_loc calls and using stmt location.
4995 * tree-vectorizer.c: Include "opt-problem.h.
4996 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
4997 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
4998 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
4999 enabled, use it to report at the top level "couldn't vectorize
5000 loop" followed by the problem.
5001 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
5002 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
5004 (vect_analyze_stmt): Likewise.
5005 (vect_get_vector_types_for_stmt): Likewise.
5006 (tree vect_get_mask_type_for_stmt): Likewise.
5007 (vect_analyze_data_ref_dependences): Likewise.
5008 (vect_enhance_data_refs_alignment): Likewise.
5009 (vect_analyze_data_refs_alignment): Likewise.
5010 (vect_verify_datarefs_alignment): Likewise.
5011 (vect_analyze_data_ref_accesses): Likewise.
5012 (vect_prune_runtime_alias_test_list): Likewise.
5013 (vect_find_stmt_data_reference): Likewise.
5014 (vect_analyze_data_refs): Likewise.
5015 (vect_analyze_loop): Convert return type from loop_vec_info to
5017 (vect_analyze_loop_form): Likewise.
5018 (vect_analyze_slp): Convert return type from bool to opt_result.
5020 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5022 * doc/invoke.texi (-fopt-info): Document new "internals"
5024 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
5025 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
5027 (optinfo_verbosity_options): Add "internals".
5028 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
5029 (dump_context::apply_dump_filter_p): New member function.
5030 (dump_context::dump_loc): Use apply_dump_filter_p rather than
5031 explicitly masking the dump_kind.
5032 (dump_context::begin_scope): Increment the scope depth first. Use
5033 apply_dump_filter_p rather than explicitly masking the dump_kind.
5034 (dump_context::emit_item): Use apply_dump_filter_p rather than
5035 explicitly masking the dump_kind.
5036 (dump_dec): Likewise.
5037 (dump_hex): Likewise.
5038 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
5039 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
5040 (opt_info_switch_p): Update handling of default
5041 MSG_OPTIMIZED_LOCATIONS to cope with default of
5042 MSG_PRIORITY_USER_FACING.
5043 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
5044 masking the dump_kind.
5045 (selftest::test_capture_of_dump_calls): Update test_dump_context
5046 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
5047 than MSG_ALL. Generalize scope test to be run at all four
5048 combinations of with/without MSG_PRIORITY_USER_FACING and
5049 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
5050 for each of the two values.
5051 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
5052 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
5053 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
5054 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
5055 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
5056 with MSG_PRIORITY_*.
5057 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
5058 dump messages as MSG_PRIORITY_USER_FACING.
5059 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
5060 about the interaction with MSG_PRIORITY_*.
5062 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
5064 * varasm.c (output_constant): Add new parameter merge_strings.
5065 Make strings properly zero terminated in merge string sections.
5066 (mergeable_string_section): Don't fail if the last char is non-zero.
5067 (assemble_variable_contents): Handle merge string sections.
5068 (assemble_variable): Likewise.
5069 (assemble_constant_contents): Likewise.
5070 (output_constant_def_contents): Likewise.
5071 (output_constructor_array_range,
5072 output_constructor_regular_field): Adjust call to output_constant.
5073 (output_object_block): Adjust call to assemble_constant_contents
5074 and assemble_variable_contents.
5076 2018-10-04 Martin Liska <mliska@suse.cz>
5079 * cgraphunit.c (process_function_and_variable_attributes):
5080 Warn about a function with alias attribute and a body.
5082 2018-10-04 Martin Liska <mliska@suse.cz>
5085 * multiple_target.c (redirect_to_specific_clone): New function.
5086 (ipa_target_clone): Use it.
5087 * tree-inline.c: Fix comment.
5089 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5091 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
5093 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
5094 (gcc::dump_manager::register_pass): New member function, adapted
5095 from loop body in gcc::pass_manager::register_pass, adding a
5096 call to update_dfi_for_opt_info.
5097 (gcc::dump_manager::opt_info_enable_passes): Store the
5098 -fopt-info options into the new fields. Move the loop
5100 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
5102 * dumpfile.h (struct opt_pass): New forward decl.
5103 (gcc::dump_manager::register_pass): New decl.
5104 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
5105 (class gcc::dump_manager): Add fields "m_optgroup_flags",
5106 "m_optinfo_flags", and "m_optinfo_filename".
5107 * passes.c (gcc::pass_manager::register_pass): Move all of the
5108 dump-handling code to gcc::dump_manager::register_pass.
5110 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
5112 PR rtl-optimization/87466
5113 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
5114 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
5115 * doc/tm.texi: Regenerate.
5116 * ira-lives.c (process_bb_node_lives): Use the new target hook.
5117 * lra-lives.c (process_bb_lives): Likewise.
5118 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
5121 2018-10-04 Tamar Christina <tamar.christina@arm.com>
5123 * params.c (add_params): Fix initialization.
5125 2018-10-04 Martin Liska <mliska@suse.cz>
5127 PR gcov-profile/84107
5128 * tree-profile.c (init_ic_make_global_vars):
5129 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
5130 Come up with new ic_tuple* variables. Emit
5131 __gcov_indirect_call{,_topn} variables.
5132 (gimple_gen_ic_profiler): Access the variable
5134 (gimple_gen_ic_func_profiler): Access
5135 __gcov_indirect_call.callee field.
5136 (gimple_init_gcov_profiler): Use ptr_type_node.
5137 * value-prof.c (gimple_ic): Use ptr_type_node.
5139 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5141 PR tree-optimization/85787
5142 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
5143 malloc_candidate_p into this function and add support for
5144 detecting multiple phis.
5145 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
5147 2018-10-04 Martin Liska <mliska@suse.cz>
5150 * ipa-inline.c (inline_to_all_callers_1):
5151 Call ultimate_alias_target for node being inlined.
5153 2018-10-03 Jeff Law <law@redhat.com>
5155 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
5157 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
5158 * tree.h (get_typenode_from_name): Prototype.
5160 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5162 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
5163 Change operand 2 predicate to nonimmediate_operand.
5164 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
5166 2018-10-03 Martin Sebor <msebor@redhat.com>
5167 Jeff Law <law@redhat.com>
5169 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
5171 (get_string_length): Detect unterminated arrays.
5172 (format_string): Same.
5173 (format_directive): Warn about unterminated arrays.
5174 (handle_gimple_call): Mark statements with no_warning as needed.
5176 2018-10-03 Jim Wilson <jimw@sifive.com>
5178 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
5179 also define __riscv_abi_rve. Delete trailing white space.
5181 2018-10-03 Paul Koning <ni1d@arrl.net>
5183 Enable LRA register allocator for PDP11.
5184 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
5187 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
5188 * config/pdp11/pdp11.opt (-mlra): New option.
5189 * doc/invoke.texi (PDP-11 Options): Document -mlra.
5191 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5193 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
5194 (*<absneg:code>extend<mode>xf2): Ditto.
5196 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
5198 PR tree-optimization/87415
5199 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
5202 2018-10-02 Jeff Law <law@redhat.com>
5204 * gimple-fold.c (get_range_strlen): Only set *nonstr when
5205 an unterminated string is discovered. Bubble up range
5206 even for unterminated strings.
5207 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
5208 indicates the string was not terminated via NONSTR.
5210 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
5212 * tree-vrp.c (extract_range_from_unary_expr): Special case all
5213 pointer conversions.
5214 Do not do anything special for anti-ranges.
5216 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
5218 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
5219 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
5221 2018-10-03 Martin Liska <mliska@suse.cz>
5223 PR gcov-profile/86109
5224 * coverage.c (coverage_begin_function): Do not
5225 mark lambdas as artificial.
5226 * tree-core.h (struct GTY): Remove tm_clone_flag
5227 and introduce new lambda_function.
5228 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
5230 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
5233 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
5234 P8_VECTOR and VSX are enabled.
5236 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
5238 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
5239 0x3907 as CPU model number.
5241 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
5243 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
5244 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
5245 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
5246 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
5247 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
5248 * config/s390/s390.md: Likewise. Rename also the cpu attribute
5249 value from arch12 to z14.
5251 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
5253 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
5255 (isinf<mode>2): Ditto.
5257 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
5259 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
5260 before emitting fxam. Perform calculations in XFmode.
5262 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5264 * match.pd (((X /[ex] A) +- B) * A): New transformation.
5266 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5269 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
5270 * tree.c (signed_or_unsigned_type_for): Handle complex.
5272 2018-10-02 Jeff Law <law@redhat.com>
5274 * gimple-fold.c (get_range_strlen): Remove dead code.
5276 2018-10-02 Martin Sebor <msebor@redhat.com>
5277 Jeff Law <law@redhat.com>
5279 * builtins.c (unterminated_array): Add new arguments.
5280 If argument is not terminated, bubble up size and exact
5282 (expand_builtin_strnlen): Detect, avoid expanding
5283 and diagnose unterminated arrays.
5284 (c_strlen): Fill in offset of start of unterminated strings.
5285 * builtins.h (unterminated_array): Update prototype.
5287 2018-10-02 Richard Biener <rguenther@suse.de>
5289 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
5290 of haddv4df, first reduce to SSE width and exploit the fact
5291 that we only need element zero with the reduction result.
5292 (reduc_plus_scal_v2df): Likewise.
5294 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5296 * dojump.h (do_jump): Delete.
5297 (do_jump_1): Likewise.
5298 (split_comparison): Move around.
5299 * dojump.c (do_jump): Make static.
5300 (do_jump_1): Likewise.
5301 (jumpifnot): Move around.
5302 (jumpifnot_1): Likewise.
5304 (jumpif_1): Likewise.
5305 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
5307 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5309 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
5310 insns in the delay slot and add_insn_after for the jump insn.
5312 2018-10-02 Richard Biener <rguenther@suse.de>
5314 * tree-inline.c (expand_call_inline): Use the location of
5315 the callee declaration for the inline-entry marker.
5316 * final.c (notice_source_line): Remove special-casing of
5317 NOTE_INSN_INLINE_ENTRY.
5319 2018-10-01 Carl Love <cel@us.ibm.com>
5322 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
5323 (__builtin_mtfsb0): New.
5324 (__builtin_mtfsb1): New.
5325 ( __builtin_set_fpscr_rn): New.
5326 (__builtin_set_fpscr_drn): New.
5327 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
5328 (rs6000_expand_set_fpscr_rn_builtin): Add.
5329 (rs6000_expand_set_fpscr_drn_builtin): Add.
5330 (rs6000_expand_builtin): Add case statement entries for
5331 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
5332 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
5333 RS6000_BUILTIN_MFFSL.
5334 (rs6000_init_builtins): Add ftype initialization and def_builtin
5335 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
5336 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
5337 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
5338 rs6000_mffscdrn): Add define_insn.
5339 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
5340 * doc/extend.texi: Add documentation for the builtins.
5342 2018-10-01 Richard Biener <rguenther@suse.de>
5344 PR tree-optimization/87465
5345 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
5346 causing branch miscounts.
5348 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5350 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
5351 aarch64_option_default_param): New.
5352 (params.h): Include.
5353 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
5354 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
5355 stack-clash protection validation code.
5357 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5359 * params.c (validate_param): New.
5360 (add_params): Use it.
5361 (set_param_value): Refactor param validation into validate_param.
5362 (diagnostic.h): Include.
5363 * diagnostic.h (diagnostic_ready_p): New.
5365 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5367 * params.c (set_param_value):
5368 Add index of parameter being validated.
5369 * common/common-target.def (option_validate_param): New.
5370 * common/common-targhooks.h (default_option_validate_param): New.
5371 * common/common-targhooks.c (default_option_validate_param): New.
5372 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
5373 * doc/tm.texi: Regenerate.
5375 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5378 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5379 Add validation for stack-clash parameters and set defaults.
5381 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5384 * configure.ac: Add stack-clash-protection-guard-size.
5385 * doc/install.texi: Document it.
5386 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
5387 * params.def: Update comment for guard-size.
5388 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
5389 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
5390 * configure: Regenerate.
5392 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5395 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
5396 STACK_DYNAMIC_OFFSET): New.
5397 * config/aarch64/aarch64.c (aarch64_layout_frame):
5398 Update outgoing args size.
5399 (aarch64_stack_clash_protection_alloca_probe_range,
5400 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5402 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5405 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
5407 * target.def (stack_clash_protection_alloca_probe_range): New.
5408 (stack_clash_protection_final_dynamic_probe): Remove.
5409 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
5410 (default_stack_clash_protection_final_dynamic_probe): Remove.
5411 * targhooks.c: Likewise.
5412 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5413 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
5414 * doc/tm.texi: Regenerate.
5416 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5419 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
5420 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
5421 aarch64_clamp_to_uimm12_shift): New.
5422 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
5423 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
5425 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5428 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
5430 2018-10-01 Jeff Law <law@redhat.com>
5431 Richard Sandiford <richard.sandiford@linaro.org>
5432 Tamar Christina <tamar.christina@arm.com>
5435 * config/aarch64/aarch64.md
5436 (probe_stack_range): Add k (SP) constraint.
5437 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
5438 STACK_CLASH_MAX_UNROLL_PAGES): New.
5439 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
5440 stack probes for stack clash.
5441 (aarch64_allocate_and_probe_stack_space): New.
5442 (aarch64_expand_prologue): Use it.
5443 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
5444 (aarch64_sub_sp): Add emit_move_imm optional param.
5446 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
5448 PR tree-optimization/87261
5449 * match.pd: Remove trailing whitespace.
5450 Add (x & y) | ~(x | y) -> ~(x ^ y),
5451 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
5453 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
5455 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
5457 (ashlsi3_insn): Update instruction constraints.
5458 (ashrsi3_insn): Likewise.
5459 (rotrsi3): Likewise.
5460 (add_shift): Likewise.
5461 * config/arc/constraints.md (Csz): New 32 bit constraint. It
5462 avoids placing in the limm field small constants which, otherwise,
5463 could end into a small instruction.
5465 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
5467 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
5468 destination register is not odd-even.
5469 (umaddsidi4_split): Likewise.
5471 2018-10-01 Richard Biener <rguenther@suse.de>
5473 * tree-inline.c (expand_call_inline): Store origin of fn
5474 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
5475 * tree.c (block_ultimate_origin): Simplify and do some
5478 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
5480 * config/i386/mmx.md (EMMS): New int iterator.
5481 (emms): New int attribute.
5482 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
5483 EMMS int iterator. Explicitly declare clobbers.
5484 (mmx_emms): Remove expander.
5486 * config/i386/predicates.md (emms_operation): Remove predicate.
5487 (vzeroall_pattern): New predicate.
5488 (vzeroupper_pattern): Rename from vzeroupper_operation.
5489 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
5490 vzeroupper_pattern and vzeroall_pattern predicates.
5492 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
5494 PR rtl-optimization/86939
5495 * ira-lives.c (make_hard_regno_born): Rename from this...
5496 (make_hard_regno_live): ... to this. Remove update to conflict
5497 information. Update function comment.
5498 (make_hard_regno_dead): Add conflict information update. Update
5500 (make_object_born): Rename from this...
5501 (make_object_live): ... to this. Remove update to conflict information.
5502 Update function comment.
5503 (make_object_dead): Add conflict information update. Update function
5505 (mark_pseudo_regno_live): Call make_object_live.
5506 (mark_pseudo_regno_subword_live): Likewise.
5507 (mark_hard_reg_dead): Update function comment.
5508 (mark_hard_reg_live): Call make_hard_regno_live.
5509 (process_bb_node_lives): Likewise.
5510 * lra-lives.c (make_hard_regno_born): Rename from this...
5511 (make_hard_regno_live): ... to this. Remove update to conflict
5512 information. Remove now uneeded check_pic_pseudo_p argument.
5513 Update function comment.
5514 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
5515 to conflict information. Update function comment.
5516 (mark_pseudo_live): Remove update to conflict information. Update
5518 (mark_pseudo_dead): Add conflict information update.
5519 (mark_regno_live): Call make_hard_regno_live.
5520 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
5521 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
5523 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
5526 * config/i386/i386.c (construct_container): Use TImode for
5527 BLKmode values in 2 integer registers.
5529 2018-09-29 Jeff Law <law@redhat.com>
5531 * builtins.c (unterminated_array): Pass in c_strlen_data * to
5532 c_strlen rather than just a tree *.
5533 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
5534 Update recursive calls appropriately. If caller did not provide a
5535 suitable data pointer, create a local one. When a non-terminated
5536 string is discovered, bubble up information about the string via the
5537 c_strlen_data object.
5538 * builtins.h (c_strlen): Update prototype.
5539 (c_strlen_data): New structure.
5540 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
5541 For a type 2 call, if c_strlen indicates a non-terminated string
5542 use the length of the non-terminated string.
5543 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
5545 2018-09-29 Jakub Jelinek <jakub@redhat.com>
5548 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
5549 __m512d type for __A argument rather than __m512.
5551 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
5553 * match.pd (simple_comparison): Don't optimize if either operand is
5554 a function pointer when target needs function pointer canonicalization.
5556 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5558 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
5559 power5 .. power9 to remove indirection.
5560 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
5561 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
5562 ASM_CPU_476_SPEC): Delete.
5563 (ASM_CPU_SPEC): Adjust.
5564 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
5565 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
5567 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5569 * config.in: Delete HAVE_AS_DCI.
5570 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
5571 * config/rs6000/rs6000.h: Ditto.
5572 * configure.ac: Delete HAVE_AS_DCI.
5573 * configure: Regenerate.
5575 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5577 * config.in (HAVE_AS_LWSYNC): Delete.
5578 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5579 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
5581 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5582 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
5584 * configure.ac: Delete HAVE_AS_LWSYNC.
5585 * configure: Regenerate.
5587 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
5588 Pierre-Marie de Rodat <derodat@adacore.com>
5590 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
5591 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
5592 (cgraph_node::create_thunk): Add indirect_offset parameter.
5593 (thunk_adjust): Likewise.
5594 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
5595 and initialize the corresponding field with it.
5596 (cgraph_node::dump): Dump indirect_offset field.
5597 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
5598 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
5599 (thunk_adjust): Add indirect_offset parameter and deal with it.
5600 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
5601 pass it to thunk_adjust. Do not call the target hook if it's non-zero
5602 or if the thunk is external or local. Fix formatting. Do not chain
5603 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
5604 if any, in the GIMPLE representation.
5605 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
5606 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
5607 (input_node): Read indirect_offset field.
5608 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
5609 call to thunk_adjust.
5610 * tree-nested.c (struct nesting_info): Add thunk_p field.
5611 (create_nesting_tree): Set it.
5612 (convert_all_function_calls): Copy static chain from targets to thunks.
5613 (finalize_nesting_tree_1): Return early for thunks.
5614 (unnest_nesting_tree_1): Do not finalize thunks.
5615 (gimplify_all_functions): Do not gimplify thunks.
5617 2018-09-28 David Malcolm <dmalcolm@redhat.com>
5619 * opt-suggestions.c (option_proposer::build_option_suggestions):
5620 Release "option_values".
5622 2018-09-28 David Malcolm <dmalcolm@redhat.com>
5624 * coverage.c (get_coverage_counts): Convert problem-reporting dump
5625 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
5626 * dumpfile.c (kind_as_string): New function.
5627 (dump_loc): Rather than a hardcoded prefix of "note: ", use
5628 kind_as_string to vary the prefix based on dump_kind.
5629 (selftest::test_capture_of_dump_calls): Update for above.
5631 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
5633 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
5634 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
5636 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
5638 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
5639 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
5640 INVALID_REGNUM instead of FPSR_REG.
5641 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
5642 * config/i386/i386.md: Update comment of FP compares.
5643 (fldenv): Do not clobber FPSR_REG.
5645 2018-09-28 Richard Biener <rguenther@suse.de>
5647 * tree.h (BLOCK_ORIGIN): New.
5648 * omp-expand.c (grid_expand_target_grid_body): Assign
5649 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
5650 * tree-inline.c (remap_block): Likewise.
5651 * auto-profile.c (get_function_decl_from_block): Simplify
5652 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
5653 * langhooks.c (lhd_print_error_function): Likewise.
5654 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
5656 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
5657 * tree.c (block_nonartificial_location): Likewise.
5658 (block_ultimate_origin): Likewise.
5659 * tree-pretty-print.c (percent_K_format): Likewise. Remove
5660 no longer needed LTO case.
5662 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
5663 Jan Hubicka <jh@suse.cz>
5664 Martin Jambor <mjambor@suse.cz>
5666 * simplify-rtx.c (simplify_merge_mask): New function.
5667 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
5668 same masks are used in op1 or op2.
5669 (test_vec_merge): New function.
5670 (test_vector_ops): Call test_vec_merge.
5672 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
5674 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
5675 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
5676 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
5677 (cypress_costs): Set it.
5678 (supersparc_costs): Likewise.
5679 (hypersparc_costs): Likewise.
5680 (leon_cost): Likewise.
5681 (leon3_costs): Likewise.
5682 (sparclet_costs): Likewise.
5683 (ultrasparc_costs): Likewise.
5684 (ultrasparc_costs): Likewise.
5685 (niagara_costs): Likewise.
5686 (niagara2_costs): Likewise.
5687 (niagara3_costs): Likewise.
5688 (niagara4_costs): Likewise.
5689 (niagara7_costs): Likewise.
5690 (m8_costs): Likewise.
5691 (TARGET_CAN_FOLLOW_JUMP): Define.
5692 (pass_work_around_errata::gate): Minor tweak.
5693 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
5694 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
5695 Automaitcally clear MASK_FSMULD mask for V7 processors.
5696 (sparc_can_follow_jump): New static function.
5697 (output_ubranch): Deal with CROSSING_JUMP_P.
5698 (sparc_use_sched_lookahead): Rewrite using switch statement.
5699 (sparc_issue_rate): Reorder.
5700 (sparc_branch_cost): New function.
5702 2018-09-27 Martin Sebor <msebor@redhat.com>
5704 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
5705 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
5706 (int_fits_type_p): Same.
5708 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
5710 * config/i386/i386.md (FPCR_REG): Remove.
5711 (UNSPEC_FLDCW): Remove.
5712 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
5713 (x86_fldcw_1): Remove insn pattern.
5714 (fnstenv): Do not clobber FPCR_REG.
5716 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
5717 (CALL_USED_REGISTERS): Ditto.
5718 (REG_ALLOC_ORDER): Ditto.
5719 (REG_CLASS_CONTENTS): Ditto.
5720 (HI_REGISTER_NAMES): Ditto.
5721 (ADDITIONAL_REGISTER_NAMES): Use defines instead
5722 of numerical constants.
5723 * config/i386/i386.c (regclass_map): Remove fpsr register.
5724 (dbx_register_map): Ditto.
5725 (dbx64_register_map): Ditto.
5726 (svr4_dbx_register_map): Ditto.
5727 (print_reg): Do not handle FPCR_REG.
5729 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
5732 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
5733 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
5734 Delete, always treat as true.
5735 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5736 Ditto. Simplify remaining code.
5737 * config/powerpcspe/powerpcspe.h: Ditto.
5738 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
5739 Simplify remaining code.
5740 (rs6000_expand_builtin): Ditto.
5741 * config/rs6000/rs6000.h: Ditto.
5742 * configure.ac: Ditto.
5743 * configure: Regenerate.
5745 2018-09-27 Martin Liska <mliska@suse.cz>
5747 * coverage.c (get_coverage_counts): Revert the formatting
5748 of missing profile opt info.
5750 2018-09-27 Richard Biener <rguenther@suse.de>
5754 * dwarf2out.c (set_block_origin_self): Do not mark outermost
5755 block as we do not output that.
5756 (gen_inlined_subroutine_die): Elide the originally outermost
5757 block, matching what we do for concrete instances.
5758 (decls_for_scope): Add parameter specifying whether to recurse
5761 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
5762 Tom de Vries <tom@codesourcery.com>
5766 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
5767 STORE_FLAG_VALUE == 1.
5769 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
5771 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
5772 constant definitions.
5773 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
5774 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
5775 ("speculation_barrier"): New expander definition.
5777 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
5779 PR gcov-profile/86957
5780 * common.opt: New warning option -Wmissing-profile.
5781 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
5782 * doc/invoke.texi: Document -Wmissing-profile.
5784 2018-09-26 Jim Wilson <jimw@sifive.com>
5786 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
5787 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
5789 2018-09-26 Martin Sebor <msebor@redhat.com>
5791 * tree.c (zerop): Change return type to bool.
5792 (integer_zerop, integer_onep, integer_each_onep): Same.
5793 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5794 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5795 (real_onep, real_minus_onep, chain_index): Same.
5796 (print_type_hash_statistics, type_list_equal): Same.
5797 * tree.h (zerop): Same.
5798 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
5799 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5800 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5801 (real_onep, real_minus_onep, chain_index): Same.
5802 (print_type_hash_statistics, type_list_equal): Same.
5804 2018-09-26 Jim Wilson <jimw@sifive.com>
5806 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
5808 2018-09-26 Jakub Jelinek <jakub@redhat.com>
5811 * config/i386/i386.c: Include debug.h and dwarf2out.h.
5812 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
5815 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
5817 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
5819 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
5821 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
5822 and FP_SECOND_SSE_REGS.
5823 (REG_CLASS_NAMES): Ditto.
5824 (REG_CLASS_CONTENTS): Ditto.
5825 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
5826 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
5827 (ix86_preferred_output_reload_class): Ditto.
5828 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
5829 clobber constraint to "=&f".
5830 (fix_truncdi_i387): Ditto.
5831 (lrintxfdi2): Ditto.
5832 (fistdi2_<rounding>): Ditto.
5833 (fpremxf4_i387): Change "=u" constraint to "=f".
5834 (fprem1xf4_i387): Ditto.
5836 (fptanxf4_i387): Ditto.
5837 (fxtractxf3_i387): Ditto.
5838 (fscalexf4_i387): Ditto.
5839 (atan2xf3): Change "u" constraint to "f".
5840 (fyl2xxf3_i387): Ditto.
5841 (fyl2xp1xf3_i387): Ditto.
5843 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
5846 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
5847 for removed I387_MASK_PM entity.
5850 2018-09-26 Jeff Law <law@redhat.com>
5852 2018-09-26 Alexey Neyman <stilor@att.net>
5854 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5855 headers are no longer pulled in by <isl/val.h>.
5857 2018-09-26 Richard Biener <rguenther@suse.de>
5860 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
5861 or concrete instance DIE to the tree. Create abstract origin
5862 attributes also for concrete instances.
5864 2018-09-26 Alexey Neyman <stilor@att.net>
5866 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5867 headers are no longer pulled in by <isl/val.h>.
5869 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
5871 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
5872 Use new helper functions.
5873 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
5874 Use new helper functions.
5875 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
5876 aarch_mm_needs_release): New declarations.
5877 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
5878 aarch_mm_needs_release): New.
5880 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
5882 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
5883 (arm32_output_mi_thunk): Deal with long calls.
5885 2018-09-26 Richard Biener <rguenther@suse.de>
5889 * tree-inline.c (expand_call_inline): When the location
5890 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
5891 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
5892 the inserted BLOCK to make inlined_function_outer_scope_p
5894 * dwarf2out.c (add_call_src_coords_attributes): Do not add
5895 coords for reserved locations.
5897 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5899 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
5900 (*call_indirect_nonlocal_sysv<mode>): Ditto.
5901 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
5902 (*sibcall_nonlocal_sysv<mode>): Ditto.
5903 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
5904 (<bd>_<mode>): Ditto.
5905 (<bd>tf_<mode>): Ditto.
5907 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5909 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
5910 control string as a list of templates instead of as C code.
5911 (*altivec_movti): Ditto.
5912 * config/rs6000/darwin.md (movdf_low_di): Ditto.
5914 2018-09-25 Jim Wilson <jimw@sifive.com>
5916 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
5917 when target symbol is weak.
5919 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5922 * builtins.c (unterminated_array): Simplify.
5923 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
5924 where pointer arithmetic is safe.
5926 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5929 * config/rs6000/altivec.md (altivec_vspltb): Use
5930 const_0_to_15_operand instead of u5bit_cint_operand.
5931 (*altivec_vspltb_internal): Ditto.
5932 (altivec_vspltb_direct): Ditto.
5933 (altivec_vsplth): Use const_0_to_7_operand instead of
5935 (*altivec_vsplth_internal): Ditto.
5936 (altivec_vsplth_direct): Ditto.
5937 (altivec_vspltw): Use const_0_to_3_operand instead of
5939 (*altivec_vspltw_internal): Ditto.
5940 (altivec_vspltw_direct): Ditto.
5941 (altivec_vspltsf): Ditto.
5942 (*altivec_vspltsf_internal): Ditto.
5943 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
5944 various splats with the proper size immediate. Reorder the various
5945 cases by ascending size of immediate, and put all such together.
5947 2018-09-25 Richard Biener <rguenther@suse.de>
5950 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
5952 (maybe_create_die_with_external_ref): Do not create
5953 DW_TAG_imported_unit here.
5954 (add_abstract_origin_attribute): Handle external BLOCK refs.
5955 (dwarf2out_abstract_function): Simplify LTO case.
5956 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
5957 rather than using maybe_create_die_with_external_ref.
5959 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
5962 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
5963 (frndintxf2_mask_pm_i387): Ditto.
5964 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
5965 Enable for !flag_trapping_math.
5966 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
5967 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
5968 Change operand 1 predicate to nonimmediate_operand.
5969 (attr "i387_cw"): Remove mask_pm.
5970 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
5971 (enum ix86_entity): Remove I387_MASK_PM.
5972 * config/i386/i386.c (ix86_i387_mode_needed): Do not
5973 handle I387_MASK_PM.
5974 (ix86_mode_needed): Ditto.
5975 (ix86_mode_after): Ditto.
5976 (ix86_mode_entry): Ditto.
5977 (ix86_mode_exit): Ditto.
5978 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
5980 2018-09-25 Jakub Jelinek <jakub@redhat.com>
5982 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
5983 to_update_switch_stmts to vNULL instead of calling create on them
5986 2018-09-25 Richard Biener <rguenther@suse.de>
5988 PR tree-optimization/87402
5989 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
5990 (visit_phi): Re-instantiate handling of supposed to be VARYING
5991 but non-VARYING backedge value.
5993 2018-09-25 Richard Biener <rguenther@suse.de>
5996 * dwarf2out.c (struct sym_off_pair): New.
5997 (external_die_map): New global.
5998 (lookup_decl_die): When in LTO create DIEs lazily from the
6000 (lookup_block_die): New function, create DIEs lazily in LTO.
6001 (equate_block_to_die): New function.
6002 (dwarf2out_die_ref_for_decl): During WPA get the association
6003 from the external DIE map.
6004 (dwarf2out_register_external_die): Record mapping into the
6006 (maybe_create_die_with_external_ref): New function split out from
6007 DIE generation part of old dwarf2out_register_external_die.
6008 (add_abstract_origin_attribute): Do not return the DIE. When
6009 in LTO reference externals directly.
6010 (dwarf2out_abstract_function): When in LTO ignore calls for
6011 decls with external DIEs (already present abstract instances).
6012 (gen_call_site_die): Adjust.
6013 (add_high_low_attributes): Likewise.
6014 (gen_lexical_block_die): Likewise.
6015 (gen_inlined_subroutine_die): Likewie.
6016 (gen_block_die): Likewise.
6017 (dwarf2out_inline_entry): Likewise.
6018 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
6021 2018-09-25 Martin Liska <mliska@suse.cz>
6023 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
6024 integers and not by a float value.
6026 2018-09-25 Martin Liska <mliska@suse.cz>
6029 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
6031 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
6032 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
6033 * godump.c (go_format_type): Remove extra parenthesis.
6035 2018-09-25 Martin Liska <mliska@suse.cz>
6037 * alias.c (set_dest_equal_p): Remove unused function.
6038 * config/i386/i386.c (def_builtin_pure2): Likewise.
6039 * diagnostic-show-locus.c (class layout): Remove
6041 (layout::layout): Likewise here.
6042 * dump-context.h (class temp_dump_context): Likewise.
6043 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
6044 (add_AT_loclistsptr): Likewise.
6045 (add_AT_offset): Likewise.
6046 (get_AT_hi_pc): Likewise.
6047 (is_comdat_die): Likewise.
6048 (type_is_enum): Likewise.
6049 (ceiling): Likewise.
6050 (add_AT_vms_delta): Likewise.
6051 (is_class_die): Likewise.
6052 * edit-context.c (class line_event): Remove unused field.
6053 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
6055 * ipa-cp.c (ipa_get_vr_lat): Likewise.
6056 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
6057 (ok_for_base_p_nonstrict): Likewise.
6058 * tree-chrec.c (is_not_constant_evolution): Likewise.
6059 (chrec_fold_poly_cst): Likewise.
6060 * tree-if-conv.c (has_pred_critical_p): Likewise.
6061 * tree-ssa-coalesce.c (print_exprs): Likewise.
6062 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
6063 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
6064 * tree-vrp.c (value_ranges_intersect_p): Likewise.
6065 (value_range_nonnegative_p): Likewise.
6067 2018-09-25 Martin Liska <mliska@suse.cz>
6069 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
6070 Do not handle "GNU Pascal".
6071 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
6073 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
6074 from documentation. Likewise.
6075 * dbxout.c (dbxout_range_type): Likewise.
6076 * doc/cpp.texi: Likewise.
6077 * doc/extend.texi: Likewise.
6078 * doc/frontends.texi: Likewise.
6079 * doc/invoke.texi: Remove Pascal entry.
6080 * tree.def (CLEANUP_POINT_EXPR): Likewise.
6081 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
6083 2018-09-25 Martin Liska <mliska@suse.cz>
6086 * doc/invoke.texi: Document all parameters and remove default
6089 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
6092 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
6093 contains HOST_WIDE_INTs when computing its size.
6095 2018-09-24 Jim Wilson <jimw@sifive.com>
6098 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
6100 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
6102 2018-09-24 Andrew Pinski <apinski@marvell.com>
6104 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
6105 access prev before checking it for NULLness in the
6106 AARCH64_FUSE_CMP_BRANCH case.
6108 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
6111 * config/i386/i386.c (rest_of_insert_endbranch): Set
6112 endbr_queued_at_entrance to true and don't insert ENDBR if
6113 x86_function_profiler will be called.
6114 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
6116 * config/i386/i386.h (machine_function): Add
6117 endbr_queued_at_entrance.
6119 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6121 * genattrtab.c (mk_attr_alt): Use alternative_mask.
6122 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
6124 (check_attr_test): Use alternative_mask.
6125 (get_attr_value): Likewise.
6126 (compute_alternative_mask): Use alternative_mask and XWINT.
6127 (make_alternative_compare): Use alternative_mask.
6128 (attr_alt_subset_p): Use XWINT.
6129 (attr_alt_subset_of_compl_p): Likewise.
6130 (attr_alt_intersection): Use alternative_mask and XWINT.
6131 (attr_alt_union): Likewise.
6132 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
6133 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
6134 (simplify_test_exp): Use alternative_mask and XWINT.
6135 (write_test_expr): Use alternative_mask and XWINT, adjust bit
6136 number calculation to support 64 bits. Generate code that
6137 checks 64-bit masks.
6138 (main): Use alternative_mask.
6139 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
6141 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6144 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
6145 RETURN+USE when returning via %r14.
6147 2018-09-24 Martin Liska <mliska@suse.cz>
6149 * gcov.c (output_lines): Print colorization legend
6150 for both flag_use_colors and flag_use_hotness_colors.
6153 2018-09-24 Martin Liska <mliska@suse.cz>
6155 * coverage.c (get_coverage_counts): Use warning_at
6156 with current_function_decl location. Use %qD in warning
6159 2018-09-24 Martin Liska <mliska@suse.cz>
6161 * memory-block.h (memory_block_pool::release): Annotate with
6162 valgrind that the memory is not accessible.
6164 2018-09-24 Martin Liska <mliska@suse.cz>
6167 * asan.c: Make asan_handled_variables extern.
6169 * cfgexpand.c (expand_stack_vars): Make sure
6170 a representative is unpoison if another
6171 variable in the partition is handled by
6172 use-after-scope sanitization.
6174 2018-09-24 Richard Biener <rguenther@suse.de>
6176 PR tree-optimization/63155
6177 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
6178 the worklist when the edge of the respective argument isn't
6181 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6183 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
6184 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
6185 (MASK_CLASS_P): Update for rename.
6186 (MAYBE_MASK_CLASS_P): Ditto.
6187 (REG_CLASS_NAMES): Update.
6188 (REG_CLASS_CONTENT): Update.
6189 * config/i386/i386.c (regclass_map): Update for MASK_REG
6190 and ALL_MASK_REGS rename.
6191 * config/i386/constraints.md (Yk): Update for rename.
6194 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6196 * config/i386/i386.h (enum reg_class): Remove
6197 EVEX_SSE_REGS and MOD4_SSE_REGS.
6198 (REG_CLASS_NAMES): Update.
6199 (REG_CLASS_CONTENT): Update.
6200 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
6201 registers as ALL_SSE_REGS.
6202 (ix86_additional_allocno_class_p): Remove.
6203 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
6204 (ix86_register_priority): Lower priority of EVEX SSE registers.
6205 Use IN_RANGE macro where appropriate.
6206 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
6207 AVX-5124VNNIW checks.
6208 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
6209 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
6210 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
6211 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
6212 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
6213 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
6214 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
6215 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
6216 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
6217 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
6218 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
6219 * config/i386/constraints.md (Yh): Remove.
6221 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6223 * config/i386/i386.c (regclass_map): Declare integer REX registers
6226 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
6228 * doc/service.texi (Service): Switch the fsf.org link to https.
6230 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
6233 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6234 Define to speculation_safe_value_not_needed.
6236 2018-09-21 Florian Weimer <fweimer@redhat.com>
6239 * doc/extend.texi (Common Function Attributes): Mention that
6240 noreturn suppresses tail call optimization.
6242 2018-09-21 Jeff Law <law@redhat.com>
6244 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
6245 vr_values::cleanup_edges_and_switches.
6246 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
6248 (identify_jump_threads): Remove EDGE_IGNORE handling.
6249 (execute_vrp): Move handling of to_remove_edges and
6250 to_update_switch_stmts into vr_values class member functions.
6251 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
6252 (to_update_switch_stmts): Likewise.
6253 * vr-values.c: Include cfghooks.h.
6254 (vr_values::vr_values): Initialize to_remove_edges and
6255 to_update_switch_stmts.
6256 (vr_values::~vr_values): Verify to_remove_edges and
6257 to_update_switch_stmts are empty.
6258 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
6259 (vr_values::cleanup_edges_and_switches): New member function.
6260 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
6261 function. Add new data members.
6263 2018-09-21 David Malcolm <dmalcolm@redhat.com>
6265 PR tree-optimization/87309
6266 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
6267 calls with pflags and alt_flags.
6268 (selftest::test_capture_of_dump_calls): Add test of interaction of
6269 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
6271 2018-09-21 Olivier Hainque <hainque@adacore.com>
6273 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
6275 2018-09-21 Olivier Hainque <hainque@adacore.com>
6277 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
6279 2018-09-21 Olivier Hainque <hainque@adacore.com>
6281 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
6282 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
6283 (VXWORKS_LIBS_RTP): Minor reordering.
6285 2018-09-21 Olivier Hainque <hainque@adacore.com>
6287 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
6288 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
6290 2018-09-21 Olivier Hainque <hainque@adacore.com>
6292 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
6293 (PTRDIFF_TYPE): Likewise.
6295 2018-09-21 Olivier Hainque <hainque@adacore.com>
6297 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
6298 triplet, similar to support for VxWorks7.
6299 * config/vxworks-dummy.h: Provide a default definition
6300 of TARGET_VXWORKS64 to 0.
6302 2018-09-21 Olivier Hainque <hainque@adacore.com>
6304 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
6305 * config/vxworks-dummy.h: here.
6307 2018-09-21 Olivier Hainque <hainque@adacore.com>
6309 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
6311 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
6312 Bo Zhou <zbo.zhou@hisilicon.com>
6314 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
6315 * config/aarch64/aarch64-tune.md: Regenerated.
6316 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
6317 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
6318 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
6320 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
6321 Julian Brown <julian@codesourcery.com>
6323 * builtins.c (get_builtin_sync_mem): Handle address spaces.
6325 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6327 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
6328 if the call takes a static chain.
6330 2018-09-21 Martin Liska <mliska@suse.cz>
6332 * auto-profile.c (autofdo_source_profile::read): Do not
6334 (read_profile): Do not add working sets.
6335 (read_autofdo_file): Remove sum_all.
6336 (afdo_callsite_hot_enough_for_early_inline): Remove const
6338 * coverage.c (struct counts_entry): Remove gcov_summary.
6339 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
6340 do not support GCOV_TAG_PROGRAM_SUMMARY.
6341 (get_coverage_counts): Remove summary and expected
6343 * coverage.h (get_coverage_counts): Likewise.
6344 * doc/gcov-dump.texi: Remove -w option.
6345 * gcov-dump.c (dump_working_sets): Remove.
6346 (main): Do not support '-w' option.
6347 (print_usage): Likewise.
6348 (tag_summary): Likewise.
6349 * gcov-io.c (gcov_write_summary): Do not dump
6351 (gcov_read_summary): Likewise.
6352 (gcov_histo_index): Remove.
6353 (gcov_histogram_merge): Likewise.
6354 (compute_working_sets): Likewise.
6355 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
6357 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
6358 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
6359 (GCOV_HISTOGRAM_SIZE): Remove.
6360 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
6361 (struct gcov_summary): Simplify rapidly just
6362 to runs and sum_max fields.
6363 (gcov_histo_index): Remove.
6364 (NUM_GCOV_WORKING_SETS): Likewise.
6365 (compute_working_sets): Likewise.
6366 * gcov-tool.c (print_overlap_usage_message): Remove
6367 trailing empty line.
6368 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
6369 (output_lines): Remove program related line.
6370 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
6371 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
6373 (input_profile_summary): Do not read it.
6374 (merge_profile_summaries): And do not merge it.
6375 (input_symtab): Do not call removed function.
6376 * modulo-sched.c (sms_schedule): Do not print sum_max.
6377 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
6378 removed when histogram method was invented.
6379 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
6381 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
6383 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
6384 and dump selected value.
6385 * profile.c (add_working_set): Remove.
6386 (get_working_sets): Likewise.
6387 (find_working_set): Likewise.
6388 (get_exec_counts): Do not work with working sets.
6389 (read_profile_edge_counts): Do not inform as sum_max is removed.
6390 (compute_branch_probabilities): Likewise.
6391 (compute_value_histograms): Remove argument for call of
6392 get_coverage_counts.
6393 * profile.h: Do not make gcov_summary const.
6395 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
6397 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
6399 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6401 PR tree-optimization/86990
6402 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
6403 Check that the entire merged store group is made of constants only for
6406 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
6408 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
6409 (VTABLE_VERIFICATION_SPEC): Likewise.
6410 (SANITIZER_EARLY_SPEC): Likewise.
6411 (SANITIZER_SPEC): Likewise.
6412 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
6413 * doc/invoke.texi (Link Options): Document -r.
6415 2018-09-20 Richard Biener <rguenther@suse.de>
6418 * gimplify.c (gimplify_expr): Retain alignment of
6419 addressable lvalue in dereference.
6421 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
6424 * configure.ac: Check for .loc is_stmt support.
6425 * configure, config.in: Rebuilt.
6426 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
6429 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6431 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
6432 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
6435 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6437 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6439 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
6442 2018-09-20 Marek Polacek <polacek@redhat.com>
6444 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
6446 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
6448 PR tree-optimization/87288
6449 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
6450 into account when determining PEELING_FOR_NITERS.
6452 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
6454 PR tree-optimization/86877
6455 * tree-vect-loop.c (vect_analyze_loop_2): Call
6456 vect_verify_datarefs_alignment.
6458 2018-09-19 Marek Polacek <polacek@redhat.com>
6460 * doc/invoke.texi: Document -Wclass-conversion.
6462 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
6464 * config/pa/pa.c (pa_adjust_priority): Delete.
6465 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
6467 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
6468 (atomic_storehi): Likewise.
6469 (atomic_storesi): Likewise.
6470 (atomic_loaddi): Restore compare and swap exchange loop code.
6472 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
6474 PR rtl-optimization/86902
6475 * combine.c (try_combine): When changing the CC mode used, don't change
6476 an unrelated mode in other_insn to that new CC mode.
6478 2018-09-19 David Malcolm <dmalcolm@redhat.com>
6480 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
6481 with %T in place of calls to dump_generic_expr.
6482 (prune_runtime_alias_test_list): Likewise.
6483 (create_runtime_alias_checks): Likewise.
6484 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
6485 (vect_analyze_data_ref_dependence): Likewise.
6486 (vect_slp_analyze_data_ref_dependence): Likewise.
6487 (vect_record_base_alignment): Likewise. Use %G in place of call
6488 to dump_gimple_stmt.
6489 (vect_compute_data_ref_alignment): Likewise.
6490 (verify_data_ref_alignment): Likewise.
6491 (vect_find_same_alignment_drs): Likewise.
6492 (vect_analyze_group_access_1): Likewise.
6493 (vect_analyze_data_ref_accesses): Likewise.
6494 (dependence_distance_ge_vf): Likewise.
6495 (dump_lower_bound): Likewise.
6496 (vect_prune_runtime_alias_test_list): Likewise.
6497 (vect_find_stmt_data_reference): Likewise.
6498 (vect_analyze_data_refs): Likewise.
6499 (vect_create_addr_base_for_vector_ref): Likewise.
6500 (vect_create_data_ref_ptr): Likewise.
6501 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
6502 (vect_can_advance_ivs_p): Likewise.
6503 (vect_update_ivs_after_vectorizer): Likewise.
6504 (vect_gen_prolog_loop_niters): Likewise.
6505 (vect_prepare_for_masked_peels): Likewise.
6506 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6507 (vect_determine_vectorization_factor): Likewise.
6508 (vect_is_simple_iv_evolution): Likewise.
6509 (vect_analyze_scalar_cycles_1): Likewise.
6510 (vect_analyze_loop_operations): Likewise.
6511 (report_vect_op): Likewise.
6512 (vect_is_slp_reduction): Likewise.
6513 (check_reduction_path): Likewise.
6514 (vect_is_simple_reduction): Likewise.
6515 (vect_create_epilog_for_reduction): Likewise.
6516 (vect_finalize_reduction:): Likewise.
6517 (vectorizable_induction): Likewise.
6518 (vect_transform_loop_stmt): Likewise.
6519 (vect_transform_loop): Likewise.
6520 (optimize_mask_stores): Likewise.
6521 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
6522 (vect_split_statement): Likewise.
6523 (vect_recog_over_widening_pattern): Likewise.
6524 (vect_recog_average_pattern): Likewise.
6525 (vect_determine_min_output_precision_1): Likewise.
6526 (vect_determine_precisions_from_range): Likewise.
6527 (vect_determine_precisions_from_users): Likewise.
6528 (vect_mark_pattern_stmts): Likewise.
6529 (vect_pattern_recog_1): Likewise.
6530 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6531 (vect_record_max_nunits): Likewise.
6532 (vect_build_slp_tree_1): Likewise.
6533 (vect_build_slp_tree_2): Likewise.
6534 (vect_print_slp_tree): Likewise.
6535 (vect_analyze_slp_instance): Likewise.
6536 (vect_detect_hybrid_slp_stmts): Likewise.
6537 (vect_detect_hybrid_slp_1): Likewise.
6538 (vect_slp_analyze_operations): Likewise.
6539 (vect_slp_analyze_bb_1): Likewise.
6540 (vect_transform_slp_perm_load): Likewise.
6541 (vect_schedule_slp_instance): Likewise.
6542 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6543 (vect_mark_stmts_to_be_vectorized): Likewise.
6544 (vect_init_vector_1): Likewise.
6545 (vect_get_vec_def_for_operand): Likewise.
6546 (vect_finish_stmt_generation_1): Likewise.
6547 (vect_check_load_store_mask): Likewise.
6548 (vectorizable_call): Likewise.
6549 (vectorizable_conversion): Likewise.
6550 (vectorizable_operation): Likewise.
6551 (vectorizable_load): Likewise.
6552 (vect_analyze_stmt): Likewise.
6553 (vect_is_simple_use): Likewise.
6554 (vect_get_vector_types_for_stmt): Likewise.
6555 (vect_get_mask_type_for_stmt): Likewise.
6556 * tree-vectorizer.c (increase_alignment): Likewise.
6558 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
6560 * doc/rtl.texi: Adjust vec_select description.
6561 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
6562 non-constant selectors.
6564 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
6566 * config/aarch64/aarch64-protos.h
6567 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
6568 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
6569 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
6570 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
6571 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
6572 (AARCH64_FL_PROFILE): Move index so flags are ordered.
6573 (AARCH64_ISA_RCPC8_4): New flag.
6574 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
6575 to aarch64_offset_9bit_signed_unscaled_p.
6576 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
6578 * config/aarch64/constraints.md (Ust): New constraint.
6579 * config/aarch64/predicates.md.
6580 (aarch64_9bit_offset_memory_operand): New predicate.
6581 (aarch64_rcpc_memory_operand): New predicate.
6583 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
6585 PR rtl-optimization/87361
6586 * rtlanal.c (nonzero_bits1): Revert accidental change.
6588 2018-09-19 Richard Biener <rguenther@suse.de>
6590 PR tree-optimization/87349
6591 PR tree-optimization/87342
6592 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
6594 2018-09-18 Marek Polacek <polacek@redhat.com>
6596 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
6597 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
6599 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
6601 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
6603 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
6605 PR rtl-optimization/86882
6606 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
6608 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
6610 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
6611 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
6613 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
6616 * doc/invoke.texi (Link Options): Fix formatting and grammar.
6618 2018-09-18 Richard Biener <rguenther@suse.de>
6621 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
6622 (compute_samebase_partition_bases): Likewise.
6623 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
6624 (gimple_can_coalesce_p): Simplify.
6626 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
6628 Handle a library implementation of ffs calling __builtin_ffs.
6629 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
6630 (mmix_init_libfuncs): New function: make __builtin_ffs expand
6633 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6635 * diagnostic-show-locus.c (class layout_range): Add field
6637 (layout_range::layout_range): Add "original_idx" param and use it
6638 to initialize new field.
6639 (make_range): Use 0 for original_idx.
6640 (layout::layout): Pass in index to calls to
6641 maybe_add_location_range.
6642 (layout::maybe_add_location_range): Add param "original_idx" and
6643 pass it on to layout_range.
6644 (layout::print_any_labels): Pass on range->m_original_idx to
6646 (gcc_rich_location::add_location_if_nearby): Use 0 for
6648 * gcc-rich-location.h (text_range_label::get_text): Update for new
6650 (range_label_for_type_mismatch::get_text): Likewise.
6652 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
6654 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
6656 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6658 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
6659 format_string_diagnostic_t.
6660 (fmtwarn_n): Likewise.
6661 * substring-locations.c
6662 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
6663 (format_warning_n_va): Convert to...
6664 (format_string_diagnostic_t::emit_warning_n_va): ...this.
6665 (format_warning_va): Convert to...
6666 (format_string_diagnostic_t::emit_warning_va): ...this.
6667 (format_warning_at_substring): Convert to...
6668 (format_string_diagnostic_t::emit_warning): ...this.
6669 (format_warning_at_substring_n): Convert to...
6670 (format_string_diagnostic_t::emit_warning_n): ...this.
6671 * substring-locations.h (class format_string_diagnostic_t): New
6673 (format_warning_va): Convert to
6674 format_string_diagnostic_t::emit_warning_va.
6675 (format_warning_n_va): Convert to
6676 format_string_diagnostic_t::emit_warning_n_va.
6677 (format_warning_at_substring): Convert to
6678 format_string_diagnostic_t::emit_warning.
6679 (format_warning_at_substring_n): Convert to
6680 format_string_diagnostic_t::emit_warning_n.
6682 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
6683 Bernd Schmidt <bernds_cb1@t-online.de>
6685 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
6688 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
6690 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
6691 operand 0 predicate to nonimmediate operand.
6692 (rint<mode>2_frndint): Remove insn pattern.
6693 (rint<mode>2): Change operand 1 predicate to general_operand.
6694 Extend operand 1 to XFmode and generate rintxf2 insn.
6695 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
6696 Do not use X87MODEF mode macro.
6697 (frndintxf2_<rounding>_i387): Rename from
6698 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
6699 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
6700 to XFmode and generate significandxf3 insn.
6702 2018-09-17 Richard Biener <rguenther@suse.de>
6704 PR tree-optimization/87328
6705 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
6706 visiting unexecutable backedges when not iterating.
6707 (do_rpo_vn): Mark all edges not executable even when not
6710 2018-09-17 Martin Jambor <mjambor@suse.cz>
6713 * doc/invoke.texi (Warning Options): Likewise.
6715 2018-09-17 Richard Biener <rguenther@suse.de>
6717 PR tree-optimization/87301
6718 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
6719 clean EH info from leftover copy assignments.
6721 2018-09-17 Martin Liska <mliska@suse.cz>
6723 PR gcov-profile/85871
6724 * gcov.c (output_intermediate_file): Fix out of bounds
6727 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
6729 * config/arc/arc.c: Object attributes for core4 not reflected
6731 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
6734 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
6736 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
6738 2018-09-17 Martin Liska <mliska@suse.cz>
6740 * doc/gcov.texi: Document new option --use-hotness-colors.
6741 * gcov.c (struct source_info): Declare new field.
6742 (source_info::source_info): Set default for maximum_count.
6743 (print_usage): Add new -q option.
6744 (process_args): Process it.
6745 (accumulate_line_info): Save src->maximum_count.
6746 (output_line_beginning): Make color line number if
6747 flag_use_hotness_colors is set.
6748 (output_line_details): Pass default argument value.
6749 (output_lines): Pass src->maximum_count.
6751 2018-09-17 Martin Liska <mliska@suse.cz>
6753 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
6754 Use processor_names table.
6755 * config/i386/i386.c (ix86_default_align): Use
6756 processor_cost_table for alignment values.
6757 (ix86_option_override_internal): Use processor_names.
6758 (ix86_function_specific_print): Likewise.
6759 * config/i386/i386.h (struct processor_costs):
6760 Add alignment values.
6761 (struct ptt): Remove and replace with const char *.
6762 * config/i386/x86-tune-costs.h (struct processor_costs):
6763 Declare default alignments for all costs.
6765 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
6767 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
6768 symbolics or VR_VARYING ranges for ABS_EXPR.
6769 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
6770 when range will wrap.
6772 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
6775 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
6776 before and after a JUMP_TABLE_DATA.
6778 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
6781 * dojump.c (do_compare_and_jump): Canonicalize function pointers
6782 when one operand is a function pointer. Use POINTER_TYPE_P and
6783 FUNC_OR_METHOD_TYPE_P.
6784 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
6785 * fold-const.c (build_range_check): Likewise.
6786 * match.pd (simple_comparison): Likewise.
6788 2018-09-14 David Malcolm <dmalcolm@redhat.com>
6791 * spellcheck.c (get_edit_distance_cutoff): New function.
6792 (selftest::test_edit_distance_unit_test_oneway): Rename to...
6793 (selftest::test_get_edit_distance_one_way): ...this.
6794 (selftest::test_get_edit_distance_unit): Rename to...
6795 (selftest::test_get_edit_distance_both_ways): ...this.
6796 (selftest::test_edit_distances): Move tests to this new function,
6797 and test some more pairs of strings. Update for above renaming.
6798 (selftest::get_old_cutoff): New function.
6799 (selftest::test_get_edit_distance_cutoff): New function.
6800 (selftest::assert_suggested_for): New function.
6801 (ASSERT_SUGGESTED_FOR): New macro.
6802 (selftest::assert_not_suggested_for): New function.
6803 (ASSERT_NOT_SUGGESTED_FOR): New macro.
6804 (selftest::test_suggestions): New function.
6805 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
6806 tests to selftest::test_edit_distances and call it. Add calls to
6807 selftest::test_get_edit_distance_cutoff and
6808 selftest::test_suggestions.
6809 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
6810 (best_match::consider): Replace hard-coded cutoff calculation with
6812 (best_match::get_cutoff): New declaration.
6813 (best_match::get_best_meaningful_candidate): Likewise.
6815 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6817 * builtins.c (fold_builtin_strlen): Remove TODO comment.
6819 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6822 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6824 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
6825 terminated string literal.
6827 2018-09-14 Martin Sebor <msebor@redhat.com>
6829 * builtins.c (unterminated_array): Handle ARRAY_REF.
6830 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
6831 * builtins.h (unterminated_array): Declare extern.
6832 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
6834 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
6837 2018-09-14 Martin Sebor <msebor@redhat.com>
6838 Jeff Law <law@redhat.com>
6840 * builtins.c (unterminated_array): New.
6841 (expand_builtin_strcpy): Adjust.
6842 (expand_builtin_strcpy_args): Detect unterminated arrays.
6843 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
6844 unterminated arrays.
6845 * gimple-fold.h (get_maxval_strlen): Add argument.
6846 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
6848 * gimple-fold.c (get_range_strlen): Add argument.
6849 (get_maxval_strlen): Adjust.
6850 * gimple-fold.h (get_range_strlen): Add argument.
6852 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
6854 * config/i386/movdirintrin.h: Fix copyright year.
6856 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
6858 * reg-stack.c: Include regs.h.
6859 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
6860 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
6861 FIRST_STACK_REG, not DFmode.
6862 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
6863 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
6864 (change stack): Default register mode to the reg_raw_mode of
6865 FIRST_STACK_REG, not DFmode.
6866 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
6867 (*swapxf): Rename from swapxf.
6869 2018-09-14 Carl Love <cel@us.ibm.com>
6871 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
6872 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
6874 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
6877 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
6880 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
6883 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
6885 2018-09-14 Jason Merrill <jason@redhat.com>
6887 Fix --enable-gather-detailed-mem-stats.
6888 * hash-table.c (hash_table_usage): Change from variable to function.
6889 * hash-table.h: Adjust.
6890 * Makefile.in: Add missing dependencies on hash-table.h.
6892 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6894 PR tree-optimization/87259
6896 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
6897 execute_cse_reciprocals_1 has tried transforming.
6899 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
6901 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
6902 VR_VARYING for PLUS/MINUS_EXPR.
6904 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
6906 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
6909 2018-09-14 Richard Biener <rguenther@suse.de>
6912 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
6913 bits for the merged partition.
6915 2018-09-13 Martin Sebor <msebor@redhat.com>
6916 Bernd Edlinger <bernd.edlinger@hotmail.de>
6918 * builtins.h (c_srlen): Add argument.
6919 * builtins.c (warn_string_no_nul): New function.
6920 (c_strlen): Add argument and use it. Update recursive calls.
6921 Pass DECL argument to string_constant to get info on non
6922 terminated strings. Update *NONSTR as needed.
6923 (fold_builtin_strlen): Add argument to calls to c_strlen.
6924 Warn for unterminated arrays.
6925 (warn_string_no_null): Add prototype.
6926 * expr.c (string_constant): Update arguments. Update recursive
6927 calls appropriately. Detect missing NUL terminator and outermost
6928 declaration its missing in.
6929 Improve checks for arrays with nonzero lower bound or elements
6930 that are not a single byte. Simplify offset computation.
6931 Simplify checks for non-NUL terminated strings.
6932 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
6933 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
6935 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
6937 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
6939 * fold-const.c (c_getstr): Fix function comment. Remove unused third
6940 argument. Fix range checks.
6941 * fold-const.h (c_getstr): Adjust protoype.
6942 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
6943 string is constant but contains no NUL byte.
6945 * expr.c (string_constant): Adjust function comment.
6946 Remove bogus check for zero termination.
6948 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
6950 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
6951 (get_constant_size): Don't make STRING_CSTs larger than they are.
6952 (check_string_literal): New check function for STRING_CSTs.
6953 (output_constant): Use it.
6955 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
6958 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
6960 2018-09-13 Richard Biener <rguenther@suse.de>
6962 PR tree-optimization/87263
6963 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
6964 (struct unwind_state): Add max_rpo field.
6965 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
6966 Compute max_rpo, the max RPO number a block can be backwards reached
6967 from. Re-write non-iterating mode to a RPO ordered worklist approach,
6968 separating it from the iterating mode.
6970 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
6972 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
6973 (rfs_decision): New scheduling decision.
6975 2018-09-13 Richard Biener <rguenther@suse.de>
6978 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
6979 (vn_nary_op_insert_pieces_predicated): Do not write useless
6980 valid_dominated_by_p entry outside of the allocated storage.
6982 2018-09-13 Omar Sandoval <osandov@osandov.com>
6983 Tom de Vries <tdevries@suse.de>
6986 * dwarf2out.c (is_c): New function.
6987 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
6989 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
6992 * config/aarch64/aarch64.md (*aarch64_bfxil):
6994 * config/aarch64/constraints.md (Ulc): Define.
6995 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
6997 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
7000 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
7002 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
7003 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
7004 aarch64_layout_frame call.
7005 (aarch64_expand_epilogue): Likewise.
7006 (aarch64_initial_elimination_offset): Likewise.
7007 (aarch64_get_separate_components): Likewise.
7008 (aarch64_use_return_insn_p): Likewise.
7009 (aarch64_layout_frame): Remove unneeded check.
7011 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7013 * configure.ac: Only append
7014 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
7015 gcc_config_arguments if it was never reconfigured or last reconfigure
7016 was with different arguments.
7017 * configure: Regenerated.
7019 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7020 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7023 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
7024 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
7026 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7028 PR tree-optimization/87287
7029 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
7030 X % C == 0 to X % (unsigned) C == 0 optimization to ...
7031 * match.pd (X % C == 0): ... here. New optimization.
7033 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7036 * expr.h (maybe_optimize_mod_cmp): Declare.
7037 * expr.c (mod_inv): New function.
7038 (maybe_optimize_mod_cmp): New function.
7039 (do_store_flag): Use it.
7040 * cfgexpand.c (expand_gimple_cond): Likewise.
7042 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
7043 Julian Brown <julian@codesourcery.com>
7046 * gimplify.c (gimplify_scan_omp_clauses): Set
7047 target_firstprivatize_array_bases in OpenACC parallel and kernels
7048 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
7049 OpenACC data regions.
7051 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
7053 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
7054 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
7056 2018-09-12 Richard Biener <rguenther@suse.de>
7058 PR tree-optimization/87280
7059 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
7060 edge but unreachable target.
7061 (do_rpo_vn): For conservatively handling a PHI only mark
7062 the backedge executable but not the block reachable.
7064 2018-09-12 Richard Biener <rguenther@suse.de>
7066 PR tree-optimization/87266
7067 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
7070 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
7072 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
7074 ("trunc<BFP:mode><DFP_ALL:mode>2")
7075 ("trunc<DFP_ALL:mode><BFP:mode>2")
7076 ("extend<BFP:mode><DFP_ALL:mode>2")
7077 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
7078 according to the target operand type.
7080 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7081 Andreas Krebbel <krebbel@linux.ibm.com>
7083 PR tree-optimization/86844
7084 * gimple-ssa-store-merging.c
7085 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
7086 there are any overlapping stores in between them, make sure they are
7087 also coalesced or we give up completely.
7089 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7092 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
7093 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
7095 2018-09-12 Tom de Vries <tdevries@suse.de>
7097 * common.opt (gdescribe-dies): Add option.
7098 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
7099 attribute for artifical and nameless decls.
7100 (dwarf2out_register_external_die): Add description attribute to
7101 external reference die.
7102 (add_desc_attribute): New functions.
7103 (gen_subprogram_die): Add description attribute to
7104 DW_TAG_call_site_parameter.
7105 * tree-pretty-print.c (print_generic_expr_to_str): New function.
7106 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
7107 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
7109 (@item -gdescribe-dies): Add.
7111 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7113 * tree-vrp.c (vrp_shift_undefined_p): Remove.
7114 (extract_range_from_binary_expr_1: Call
7115 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
7116 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
7119 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7121 * gimple-ssa-warn-alloca.c
7122 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
7123 field for ALLOCA_BOUND_*_LARGE.
7125 2018-09-11 Nathan Sidwell <nathan@acm.org>
7127 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
7129 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7131 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
7132 for clobbers. Remove obsolete comment.
7134 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7136 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
7137 mpxchk, mpxld and mpxst types.
7138 (define_attr length_immediate): Remove all processing of mpx types.
7139 (define_attr prefix_0f): Ditto.
7140 (define_attr memory): Ditto.
7142 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7144 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
7145 (log<mode>2): Change operand 1 predicate to general_operand.
7146 Extend operand 1 to XFmode and generate logxf3 insn.
7147 (log10<mode>2): Change operand 1 predicate to general_operand.
7148 Extend operand 1 to XFmode and generate log10xf3 insn.
7149 (log2<mode>2): Change operand 1 predicate to general_operand.
7150 Extend operand 1 to XFmode and generate log2xf3 insn.
7151 (fyl2xp1_extend<mode>xf3_i387): Remove.
7152 (log1p<mode>2): Change operand 1 predicate to general_operand.
7153 Extend operand 1 to XFmode and generate log1pxf3 insn.
7154 (fxtract_extend<mode>xf3_i387): Remove.
7155 (logb<mode>2): Change operand 1 predicate to general_operand.
7156 Extend operand 1 to XFmode and generate logbxf3 insn.
7157 (ilogb<mode>2): Change operand 1 predicate to general_operand.
7158 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
7159 (significand<mode>2): Change operand 1 predicate to general_operand.
7160 Extend operand 1 to XFmode and generate significandxf3 insn.
7162 2018-09-11 Nathan Sidwell <nathan@acm.org>
7164 * gcc.c (perror_with_name, pfatal_with_name): Delete.
7165 (load_specs): Use fatal_error.
7166 (DELETE_IF_ORDINARY, process_command): Use error.
7167 (execute, run_attempt): Use fatal_error.
7169 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
7171 * diagnostic-core.h (sorry_at): New prototype.
7172 * diagnostic.c (sorry_at): New function.
7174 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
7176 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
7177 by zero as VR_UNDEFINED.
7179 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7181 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
7182 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
7183 (<sincos>mode2): New expander.
7184 (sincos_extend<mode>xf3_i387): Remove insn pattern.
7185 (sincos -> sin, cos splitters): Remove splitter patterns.
7186 (sincos<mode>3): Change operand 2 predicate to general_operand.
7187 Extend operand 2 to XFmode and generate sincosxf3 insn.
7188 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
7189 Change operand 3 predicate to const1_operand.
7190 (fptan_extend<mode>xf4_i387): Remove insn pattern.
7191 (tanxf2): Update operands in the call to fptanxf4_i387.
7192 (tan<mode>2): Change operand 1 predicate to general_operand.
7193 Extend operand 1 to XFmode and generate tanxf3 insn.
7194 (atan2xf3): Rename from *fpatanxf3_i387.
7195 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
7196 (atan2xf3): Remove expander.
7197 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
7198 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
7199 (atan<mode>2): Change operand 1 predicate to general_operand.
7200 Extend operand 1 to XFmode and generate atanxf3 insn.
7202 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7204 * config/i386/i386.md (x87/SSE constant load splitter): Use
7205 memory_operand instead of nonimmediate_operand for input operand
7208 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
7210 * config/i386/i386.md (float partial SSE register stall splitter): Move
7211 splitter near its instruction pattern.
7212 (float_extend partial SSE register stall splitter): Ditto.
7213 (float_truncate partial SSE register stall splitter): Ditto.
7215 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
7218 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7219 to speculation_safe_value_not_needed.
7222 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
7223 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
7224 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
7225 leaf_function_p, instead use has_hard_reg_initial_val.
7227 2018-09-09 Nathan Sidwell <nathan@acm.org>
7229 * gcc.h (pfatal_with_name): Don't declare here.
7230 * gcc.c (pfatal_with_name): Make static.
7232 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
7234 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
7237 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
7239 PR rtl-optimization/85458
7240 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
7241 priority hook to reduce the priority of EXPR.
7243 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
7245 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
7246 DImode for x87 on 32bit targets. Conditionally disable x87 modes
7247 with X87_ENABLE_FLOAT. Remove preparation code.
7248 (*float<SWI48:mode><MODEF:mode>2): Rename from
7249 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
7250 math using "enabled" attribute.
7251 (*floatdi<MODEF:mode>2_i387): Rename from
7252 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
7253 enable for 32bit targets only.
7254 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
7256 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
7257 as operand 1 predicate. Rewrite as define_insn_and_split.
7258 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
7260 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7262 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
7263 to fallthru to FLOAT case.
7265 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7268 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
7269 around folding of vec_sl to handle out of range shift values.
7271 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7273 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
7274 Update callers to gen_fix_trunc<mode>_i387_fisttp
7275 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
7276 nonimmediate_operand.
7277 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
7278 and corresponding splitters.
7279 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
7280 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
7281 (fix_truncdi_i387_with_temp): Remove insn pattern
7282 and corresponding splitters.
7283 (fix_trunc<mode>_i387): Change operand 0 predicate to
7284 nonimmediate_operand.
7285 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
7286 and corresponding splitters.
7287 (*fistdi2_1): Remove.
7289 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
7290 (lrintxfdi2): Remove expander. Reimplement as define_insn.
7291 (*fist<mode>2_1): Remove.
7292 (fist<mode>2): Ditto.
7293 (fist<mode>2_with_temp): Remove insn pattern and corresponding
7295 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
7296 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
7297 (fistdi2_<rounding>): Change operand 0 predicate to
7298 nonimmediate_operand.
7299 (fistdi2_<rounding>_with_temp): Remove insn pattern
7300 and corresponding splitters.
7301 (fist<mode>2_<rounding>): Change operand 0 predicate to
7302 nonimmediate_operand.
7303 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
7304 and corresponding splitters.
7306 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
7308 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
7310 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
7313 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7315 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
7316 early gimple folding of vec_splat().
7317 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
7318 * gimple-fold.h: Add an extern define for tree_vec_extract().
7320 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7322 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
7323 wrappers around TREE_TYPE comparisons.
7325 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7328 * config/s390/predicates.md: Add nonsym_memory_operand.
7329 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
7330 contains a SYMBOL_REF, load it into an intermediate pseudo.
7331 (s390_emit_compare_and_swap): Legitimize operand.
7332 * config/s390/s390.md: Use the new nonsym_memory_operand
7333 with UNSPECV_CAS patterns.
7335 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7338 * config/s390/s390-passes.def: New file.
7339 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
7341 (make_pass_s390_early_mach): Add declaration.
7342 * config/s390/s390.c (make_pass_s390_early_mach):
7343 (s390_option_override): Remove dynamic registration.
7344 * config/s390/t-s390: Add s390-passes.def.
7346 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7348 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7349 Remove UNSPEC_LTREL_BASE check.
7350 (annotate_constant_pool_refs): Likewise.
7351 (find_constant_pool_ref): Likewise.
7352 (find_ltrel_base): Removed.
7353 (replace_ltrel_base): Removed.
7354 (s390_mainpool_finish): Remove replace_ltrel_base call.
7355 (s390_chunkify_start): Remove pending LTREL_BASE logic.
7356 (s390_chunkify_finish): Remove replace_ltrel_base call.
7357 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
7359 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
7362 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7363 to speculation_safe_value_not_needed.
7365 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
7366 Bernd Schmidt <bernds_cb1@t-online.de>
7368 * config/nvptx/nvptx-opts.h: New file.
7369 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
7370 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
7372 (TARGET_SM35): New macro.
7373 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
7375 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
7377 (misa=): New option.
7378 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
7380 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
7382 * config/i386/i386.md (truncdfsf2): Remove expander.
7383 (truncdfsf2_with_temp): Ditto.
7384 (truncxf<mode>2): Ditto.
7385 (*truncdfsf_fast_mixed): Remove insn pattern.
7386 (*truncdfsf_fast_i387): Ditto.
7387 (*truncdfsf_mixed): Ditto.
7388 (*truncdfsf_i387): Ditto.
7389 (*truncdfsf2_i387_1): Ditto.
7390 (*truncxfsf2_mixed): Ditto.
7391 (*truncxfdf2_mixed): Ditto.
7392 (*truncxf<mode>2_i387_noop): Ditto. Update callers
7393 to call gen_truncxf<mode>2 instead.
7394 (*truncxf<mode>2_i387): Remove.
7395 (reg->reg splitters): Remove splitter pattern.
7396 (reg->mem splitters): Ditto.
7398 (truncdfsf2): New insn pattern.
7399 (truncxf<mode>2): Ditto.
7401 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7403 * tree-ssa-math-opts.c (is_mult_by): New function.
7404 (is_square_of): Use the above.
7405 (optimize_recip_sqrt): New function.
7406 (pass_cse_reciprocals::execute): Use the above.
7408 2018-09-05 Richard Biener <rguenther@suse.de>
7411 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
7412 to zero-init the emplaced vec.
7414 2018-09-05 Martin Liska <mliska@suse.cz>
7416 PR tree-optimization/87205
7417 * tree-switch-conversion.c (pass_lower_switch::execute):
7418 Group cases for switch statements.
7420 2018-09-05 Richard Biener <rguenther@suse.de>
7422 PR tree-optimization/87217
7423 * tree-ssa-sccvn.c (vuse_valueize): New.
7424 (vn_reference_lookup_pieces): Use it.
7425 (vn_reference_lookup): Likewise.
7427 2018-09-05 Nathan Sidwell <nathan@acm.org>
7430 * stor-layout.c (place_field): Scan forwards to check last
7431 bitfield when ms_bitfield_placement is in effect.
7433 2018-09-05 Richard Biener <rguenther@suse.de>
7436 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
7439 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
7440 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
7442 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
7443 * config.gcc (extra_objs): Build it.
7444 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
7446 * config/aarch64/aarch64-passes.def
7447 (pass_tag_collision_avoidance): New pass.
7448 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
7449 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
7450 (aarch64_classify_address): Remove static qualifier.
7451 (aarch64_address_info, aarch64_address_type): Move to...
7452 * config/aarch64/aarch64-protos.h: ... here.
7453 (make_pass_tag_collision_avoidance): New function.
7454 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
7457 2018-09-05 Martin Liska <mliska@suse.cz>
7459 * doc/gcov.texi: Update documentation of humar
7461 * gcov.c (format_count): Print one decimal place, it provides
7462 more fine number of situations like '1G' vs. '1.4G'.
7464 2018-09-05 Martin Liska <mliska@suse.cz>
7467 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
7468 * optc-gen.awk: Allow 'Var' for Deprecated options in order
7469 to generate a MASK value.
7471 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
7474 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
7475 if frame pointer isn't used.
7476 (compute_frame_pointer_to_fb_displacement): Likewise.
7478 2018-09-04 Jakub Jelinek <jakub@redhat.com>
7481 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
7482 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
7483 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
7484 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
7485 and OPTION_MASK_ISA_XSAVEC_UNSET.
7487 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
7489 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
7490 XOR operations in NAND case.
7492 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
7494 * wide-int-range.cc (wide_int_range_convert): New.
7495 * wide-int-range.h (wide_int_range_convert): New.
7496 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
7497 code into wide_int_range_convert.
7498 (extract_range_into_wide_ints): Do not munge anti range constants
7499 into the entire domain. Just return the range back.
7501 2018-09-04 Martin Liska <mliska@suse.cz>
7503 * genmatch.c (output_line_directive): Add new argument
7505 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
7507 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
7509 * doc/invoke.texi (Option Summary): Add whitespace.
7511 * doc/invoke.texi (Option Summary): Add -Waligned-new.
7513 2018-09-04 Richard Biener <rguenther@suse.de>
7515 PR tree-optimization/87211
7516 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
7517 backedge value we're supposed to treat as VARYING also number
7518 the PHI to VARYING in case it got a different value-number already.
7520 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
7522 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
7523 (extract_range_from_binary_expr_1): Do not call
7524 vrp_can_optimize_bit_op.
7525 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
7527 (wide_int_range_get_mask_and_bounds): New.
7528 (wide_int_range_optimize_bit_op): New.
7529 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
7530 (wide_int_range_bit_and): Same.
7531 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
7532 (wide_int_range_optimize_bit_op): New.
7533 (wide_int_range_get_mask_and_bounds): New.
7535 2018-09-04 Richard Biener <rguenther@suse.de>
7537 PR tree-optimization/87176
7538 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
7539 variable. When value-numbering a virtual PHI node make sure
7540 to not value-number to the backedge value.
7542 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
7544 * doc/extend.texi (Long Long, Hex Floats): Document support for
7545 long long and hex floats in more recent versions of ISO C++.
7547 2018-09-03 Richard Biener <rguenther@suse.de>
7549 PR tree-optimization/87177
7550 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
7553 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7555 * bb-reorder.c (edge_order): Convert to C-qsort-style
7556 tri-state comparator.
7557 (reorder_basic_blocks_simple): Change std::stable_sort to
7560 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7562 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
7563 tri-state comparator.
7564 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
7566 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7568 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
7569 (mergesort): ... here as maximum count for using netsort.
7570 (gcc_qsort): Set nlim to 3 if stable sort is requested.
7571 (gcc_stablesort): New.
7572 * system.h (gcc_stablesort): Declare.
7574 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7576 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
7577 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
7578 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
7580 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
7582 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
7583 lxsdx and stxsdx alternatives.
7584 (*mov<mode>_hardfloat64): Ditto.
7585 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
7587 2018-09-03 Richard Biener <rguenther@suse.de>
7589 PR tree-optimization/87200
7590 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
7593 2018-09-03 Martin Liska <mliska@suse.cz>
7595 PR tree-optimization/87201
7596 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7597 Fix parenthesis in an expression.
7599 2018-09-03 Richard Biener <rguenther@suse.de>
7601 PR tree-optimization/87197
7602 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
7603 visited. CSE the VN_INFO hashtable lookup.
7605 PR tree-optimization/87169
7606 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
7607 iterating make sure there's no extra backedges from irreducible
7608 regions feeding the header. Mark the destination block
7611 2018-09-03 Martin Liska <mliska@suse.cz>
7614 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
7615 * common/common-targhooks.c (default_get_valid_option_values):
7617 * common/common-targhooks.h (default_get_valid_option_values):
7619 * common/config/i386/i386-common.c: Move processor_target_table
7621 (ix86_get_valid_option_values): New function.
7622 (TARGET_GET_VALID_OPTION_VALUES): New macro.
7623 * config/i386/i386.c (struct ptt): Move to i386-common.c.
7624 (PTA_*): Move all defined masks into i386-common.c.
7625 (ix86_function_specific_restore): Use new processor_cost_table.
7626 * config/i386/i386.h (struct ptt): Moved from i386.c.
7627 (struct pta): Likewise.
7628 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
7629 * doc/tm.texi.in: Likewise.
7630 * opt-suggestions.c (option_proposer::suggest_option):
7631 Pass prefix to build_option_suggestions.
7632 (option_proposer::get_completions): Likewise.
7633 (option_proposer::build_option_suggestions): Use the new target
7635 * opts.c (struct option_help_tuple): New struct.
7636 (print_filtered_help): Use the new target hook.
7638 2018-09-03 Martin Liska <mliska@suse.cz>
7641 * predict.c (set_even_probabilities): Add likely_edges
7642 argument and handle cases where we have precisely one
7644 (combine_predictions_for_bb): Catch also likely_edges.
7645 (tree_predict_by_opcode): Handle gswitch statements.
7646 * tree-cfg.h (find_case_label_for_value): New declaration.
7647 (find_taken_edge_switch_expr): Likewise.
7648 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7649 Find pivot in decision tree based on probabily, not by number of
7652 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
7654 * doc/standards.texi (Standards): Update Objective-C reference.
7656 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7658 * doc/install.texi (Prerequisites): Update link for MPC.
7660 2018-09-01 Michael Matz <matz@suse.de>
7662 PR tree-optimization/87074
7663 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
7664 PHIs for outer-loop uses.
7666 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7668 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
7669 * doc/invoke.texi (C Dialect Options): Ditto.
7671 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7673 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
7675 2018-08-31 Richard Biener <rguenther@suse.de>
7677 PR tree-optimization/87168
7678 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
7679 (rpo_elim::eliminate_avail): When OP was not visited it must
7682 2018-08-31 David Malcolm <dmalcolm@redhat.com>
7684 * tree-vrp.c (copy_value_range): Convert param "from" from
7685 "value_range *" to "const value_range *".
7686 (range_is_null): Likewise for param "vr".
7687 (range_int_cst_p): Likewise.
7688 (range_int_cst_singleton_p): Likewise.
7689 (symbolic_range_p): Likewise.
7690 (value_ranges_intersect_p): Likewise for both params.
7691 (value_range_nonnegative_p): Likewise for param "vr".
7692 (value_range_constant_singleton): Likewise.
7693 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
7694 (extract_range_into_wide_ints): Likewise for param "vr".
7695 (extract_range_from_multiplicative_op): Likewise for params "vr0"
7697 (vrp_can_optimize_bit_op): Likewise.
7698 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
7700 (extract_range_from_unary_expr): Likewise.
7701 (debug_value_range): Likewise for param "vr".
7702 (value_range::dump): Add "const" qualifier.
7703 (vrp_prop::check_array_ref): Convert local "vr" from
7704 "value_range *" to "const value_range *".
7705 (vrp_prop::check_mem_ref): Likewise.
7706 (vrp_prop::visit_stmt): Likewise for local "old_vr".
7707 (vrp_intersect_ranges_1): Likewise for param "vr_1".
7708 (vrp_intersect_ranges): Likewise.
7709 (simplify_stmt_for_jump_threading): Likewise for local "vr".
7710 (vrp_prop::vrp_finalize): Likewise.
7711 * tree-vrp.h (value_range::dump): Add "const" qualifier.
7712 (vrp_intersect_ranges): Add "const" qualifier to params as above.
7713 (extract_range_from_unary_expr): Likewise.
7714 (value_range_constant_singleton): Likewise.
7715 (symbolic_range_p): Likewise.
7716 (copy_value_range): Likewise.
7717 (extract_range_from_binary_expr_1): Likewise.
7718 (range_int_cst_p): Likewise.
7719 (vrp_set_zero_nonzero_bits): Likewise.
7720 (range_int_cst_singleton_p): Likewise.
7722 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
7724 * config/aarch64/arm_neon.h (vabsd_s64): New.
7725 (vnegd_s64): Likewise.
7727 2018-08-31 Martin Jambor <mjambor@suse.cz>
7729 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
7731 2018-08-31 Martin Liska <mliska@suse.cz>
7733 * ipa-icf.c (sem_item::add_type): Use
7734 sem_item::m_type_hash_cache.
7735 * ipa-icf.h: Move the cache from sem_item_optimizer
7738 2018-08-31 Nathan Sidwell <nathan@acm.org>
7740 * doc/extend.texi (Backwards Compatibility): Remove implicit
7741 extern C leeway of () being (...).
7743 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7745 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
7747 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
7751 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
7753 2018-08-31 Jakub Jelinek <jakub@redhat.com>
7756 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
7757 gen_int_mode. Formatting fixes.
7759 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
7761 * target.def (custom_function_descriptors): Improve documentation.
7762 * doc/tm.texi.in (Trampolines): Expand discussion of function
7763 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
7764 beginning of the section.
7765 * doc/tm.texi: Regenerated.
7767 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
7769 * cfg.h (class auto_edge_flag): Spell out the template-id of the
7770 base class in the initializer list. This is a workaround for
7771 building with older GCC.
7772 (class auto_bb_flag): Likewise.
7774 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
7776 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
7777 (altivec_vcmpequ<VI_char>_p): Remove star.
7778 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
7780 (expand_strncmp_vec_sequence): New function.
7781 (emit_final_str_compare_vec): New function.
7782 (expand_strn_compare): Add support for vector strncmp.
7783 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
7784 length specification to bytes.
7785 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
7786 (vcmpnezb_p): New pattern.
7787 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
7788 for option -mstring-compare-inline-limit.
7790 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
7792 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
7793 (PTA_SKYLAKE): Add PTA_AES.
7794 (PTA_GOLDMONT): Likewise.
7796 2018-08-29 Jan Hubicka <jh@suse.cz>
7799 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
7800 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
7802 2018-08-29 Jan Hubicka <jh@suse.cz>
7804 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
7806 (hash_tree): Do not visit TYPE_STUB_DECL.
7807 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
7808 stream TYPE_STUB_DECL.
7809 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
7810 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
7811 after free_lang_data.
7812 (type_in_anonymous_namespace_p): Likewise.
7814 2018-08-29 Jan Hubicka <jh@suse.cz>
7816 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7817 comment that it has to be even number.
7818 (class sreal): Change m_sig type to int32_t.
7819 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7820 int64_t for temporary calculations.
7821 (sreal_verify_basics): Drop one bit from minimum and maximum.
7823 2018-08-30 Richard Biener <rguenther@suse.de>
7825 PR tree-optimization/87147
7826 * tree-ssa-sccvn.c (SSA_VISITED): New function.
7827 (visit_phi): When the degenerate result is from the backedge and
7828 we didn't visit its definition yet drop to VARYING.
7829 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
7831 2018-08-29 Jan Hubicka <jh@suse.cz>
7833 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
7835 (hash_tree): Likewise.
7837 2018-08-29 Jan Hubicka <jh@suse.cz>
7839 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
7840 and TYPE_NEXT_REF_TO.
7842 2018-08-29 Jan Hubicka <jh@suse.cz>
7844 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7845 comment that it has to be even number.
7846 (class sreal): Change m_sig type to int32_t.
7847 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7848 int64_t for temporary calculations.
7849 (sreal_verify_basics): Drop one bit from minimum and maximum.
7851 2018-08-30 Tamar Christina <tamar.christina@arm.com>
7853 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
7855 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
7858 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
7859 if to_add is negative.
7861 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
7864 * builtins.c (c_strlen): Improve range checks.
7866 2018-08-29 Martin Sebor <msebor@redhat.com>
7867 Jeff Law <law@redhat.com>
7869 PR tree-optimization/86714
7870 PR tree-optimization/86711
7871 * builtins.c (c_strlen): Add arguments to call to string_constant.
7872 * expr.c (string_constant): Add argument. Detect missing nul
7873 terminator and outermost declaration it's missing in.
7874 * expr.h (string_constant): Add argument.
7875 * fold-const.c (read_from_constant_string): Add arguments to call to
7877 (c_getstr): Likewise.
7878 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7880 * tree-ssa-strlen.c (get_stridx): Likewise.
7882 2018-08-29 Jan Hubicka <jh@suse.cz>
7884 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
7885 Do not stream DECL_VINDEX.
7886 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
7887 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
7888 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
7890 2018-08-29 Richard Biener <rguenther@suse.de>
7892 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
7893 virtual operands that are not default defs to honor region
7895 (rpo_vn_valueize): Remove ineffective code here.
7897 2018-08-29 Richard Biener <rguenther@suse.de>
7899 PR tree-optimization/87132
7900 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
7901 when skipping defs reachable over backedges.
7903 2018-08-29 Richard Biener <rguenther@suse.de>
7905 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
7906 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
7907 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
7908 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
7909 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
7910 (vn_reference_lookup_3): Remove use of const_parms.
7911 (free_rpo_vn): Do not free const_parms.
7912 (do_rpo_vn): Do not call init_const_parms.
7913 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
7914 SSA_NAME_POINTS_TO_READONLY_MEMORY.
7915 (call_may_clobber_ref_p_1): Likewise.
7917 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
7920 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
7922 (-ftree-scev-cprop): Document.
7924 2018-08-29 Jan Hubicka <jh@suse.cz>
7926 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
7928 (sreal constructor): Update.
7929 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
7930 sreal:operator/): Update.
7932 2018-08-29 Martin Liska <mliska@suse.cz>
7934 * tree-switch-conversion.c (switch_conversion::expand):
7935 Strenghten assumption about gswitch statements.
7937 2018-08-29 Richard Biener <rguenther@suse.de>
7939 PR tree-optimization/87117
7940 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
7941 re-value-number released SSA VDEFs.
7943 2018-08-29 Richard Biener <rguenther@suse.de>
7945 PR tree-optimization/87126
7946 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
7948 2018-08-28 Jim Wilson <jimw@sifive.com>
7950 * config/riscv/pic.md: Rewrite.
7951 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
7953 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
7954 (SOFTF, default_load, softload, softstore): New.
7956 2018-08-28 Jeff Law <law@redhat.com>
7958 * fold-const.c (fold_binary_loc): Remove recently added assert.
7960 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
7962 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
7963 to OP parmeter of generated function.
7965 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
7967 PR tree-optimization/87009
7968 * match.pd: Add boolean optimizations.
7970 2018-08-28 Martin Sebor <msebor@redhat.com>
7973 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
7974 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
7975 (pass_walloca::gate): Use it.
7976 (alloca_call_type): Same.
7977 (pass_walloca::execute): Same.
7978 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
7980 2018-08-28 David Malcolm <dmalcolm@redhat.com>
7982 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
7983 GCC_VERSION for usage of "__gcc_dump_printf__" format from
7986 2018-08-28 Richard Biener <rguenther@suse.de>
7988 PR tree-optimization/87124
7989 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
7990 constants before looking up avail.
7992 2018-08-28 Jakub Jelinek <jakub@redhat.com>
7995 * calls.c (maybe_warn_nonstring_arg): Punt early if
7996 warn_stringop_overflow is zero. Don't call get_range_strlen
7997 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
7998 Swap comparison operands to have constants on rhs. Only use
7999 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
8000 increment lenrng[0].
8002 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
8004 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
8005 use of tree_to_shwi. Remove duplicated test for the size being
8006 a whole number of bytes.
8008 2018-08-28 Richard Biener <rguenther@suse.de>
8010 PR tree-optimization/87117
8011 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
8012 Handle removed stmt without LHS (GIMPLE_NOP).
8014 2018-08-28 Richard Biener <rguenther@suse.de>
8016 PR tree-optimization/87117
8017 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
8018 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
8020 2018-08-28 Richard Biener <rguenther@suse.de>
8022 PR tree-optimization/87117
8023 * tree-ssa-pre.c (compute_avail): Do not make expressions
8024 with predicated values available.
8025 (get_expr_value_id): Assert we do not run into predicated value
8028 2018-08-28 Richard Biener <rguenther@suse.de>
8030 PR tree-optimization/87117
8031 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
8032 get virtual operands.
8033 (get_expr_operands): Handle STRING_CST like other decls.
8035 2018-08-28 Martin Liska <mliska@suse.cz>
8037 * tree.h: Update documentation of fndecl_built_in_p
8041 2018-08-27 Jeff Law <law@redhat.com>
8042 PR tree-optimization/87110
8043 * tree-ssa-dse.c (compute_trims): Handle non-constant
8046 2018-08-27 Martin Sebor <msebor@redhat.com>
8048 PR tree-optimization/86914
8049 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
8051 2018-08-27 Martin Sebor <msebor@redhat.com>
8053 PR tree-optimization/87112
8054 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
8055 the type of the bound argument.
8057 2018-08-27 Jeff Law <law@redhat.com>
8059 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
8060 type does not have a TYPE_SIZE_UNIT.
8062 2018-08-27 Steve Ellcey <sellcey@cavium.com>
8064 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
8065 with include of backend.h.
8067 2018-08-27 Richard Biener <rguenther@suse.de>
8069 PR tree-optimization/86927
8070 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
8071 use const cond reduction code.
8073 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
8075 PR tree-optimization/85758
8076 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
8078 2018-08-27 David Malcolm <dmalcolm@redhat.com>
8081 * diagnostic-show-locus.c (class layout_range): Update for
8082 conversion of show_caret_p to a tri-state.
8083 (layout_range::layout_range): Likewise.
8084 (make_range): Likewise.
8085 (layout::maybe_add_location_range): Likewise.
8086 (layout::should_print_annotation_line_p): Don't show annotation
8087 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
8088 (layout::get_state_at_point): Update for conversion of
8089 show_caret_p to a tri-state. Bail out early for
8090 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
8091 underlining or source colorization.
8092 (gcc_rich_location::add_location_if_nearby): Update for conversion
8093 of show_caret_p to a tri-state.
8094 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
8095 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
8097 (selftest::test_one_liner_labels): Likewise.
8098 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
8099 conversion of show_caret_p to a tri-state.
8100 * pretty-print.c (text_info::set_location): Likewise.
8101 * pretty-print.h (text_info::set_location): Likewise.
8102 * substring-locations.c (format_warning_n_va): Likewise.
8103 * tree-diagnostic.c (default_tree_printer): Likewise.
8104 * tree-pretty-print.c (newline_and_indent): Likewise.
8106 2018-08-27 David Malcolm <dmalcolm@redhat.com>
8109 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
8110 line above for line-insertion fix-it hints.
8111 (selftest::test_fixit_insert_containing_newline): Update the
8112 expected results, and add a test with line-numbering enabled.
8114 2018-08-27 Martin Liska <mliska@suse.cz>
8117 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
8118 params with DECL_HAS_VALUE_EXPR_P.
8120 2018-08-27 Martin Liska <mliska@suse.cz>
8122 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
8123 selected expansion strategy.
8125 2018-08-27 Martin Liska <mliska@suse.cz>
8127 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
8128 * builtins.c (is_builtin_fn): Likewise.
8129 * attribs.c (diag_attr_exclusions): Use new function
8130 fndecl_built_in_p and remove check for FUNCTION_DECL if
8132 (builtin_mathfn_code): Likewise.
8133 (fold_builtin_expect): Likewise.
8134 (fold_call_expr): Likewise.
8135 (fold_builtin_call_array): Likewise.
8136 (fold_call_stmt): Likewise.
8137 (set_builtin_user_assembler_name): Likewise.
8138 (is_simple_builtin): Likewise.
8139 * calls.c (gimple_alloca_call_p): Likewise.
8140 (maybe_warn_nonstring_arg): Likewise.
8141 * cfgexpand.c (expand_call_stmt): Likewise.
8142 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
8143 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
8144 (cgraph_node::verify_node): Likewise.
8145 * cgraphclones.c (build_function_decl_skip_args): Likewise.
8146 (cgraph_node::create_clone): Likewise.
8147 * config/arm/arm.c (arm_insert_attributes): Likewise.
8148 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
8149 * dse.c (scan_insn): Likewise.
8150 * expr.c (expand_expr_real_1): Likewise.
8151 * fold-const.c (operand_equal_p): Likewise.
8152 (fold_binary_loc): Likewise.
8153 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
8154 * gimple-low.c (lower_stmt): Likewise.
8155 * gimple-pretty-print.c (dump_gimple_call): Likewise.
8156 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
8158 * gimple.c (gimple_build_call_from_tree): Likewise.
8159 (gimple_call_builtin_p): Likewise.
8160 (gimple_call_combined_fn): Likewise.
8161 * gimplify.c (gimplify_call_expr): Likewise.
8162 (gimple_boolify): Likewise.
8163 (gimplify_modify_expr): Likewise.
8164 (gimplify_addr_expr): Likewise.
8165 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
8166 * ipa-cp.c (determine_versionability): Likewise.
8167 * ipa-fnsummary.c (compute_fn_summary): Likewise.
8168 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
8169 * ipa-split.c (visit_bb): Likewise.
8170 (split_function): Likewise.
8171 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8172 * lto-cgraph.c (input_node): Likewise.
8173 * lto-streamer-out.c (write_symbol): Likewise.
8174 * omp-low.c (setjmp_or_longjmp_p): Likewise.
8175 (lower_omp_1): Likewise.
8176 * predict.c (strip_predict_hints): Likewise.
8177 * print-tree.c (print_node): Likewise.
8178 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
8179 * trans-mem.c (is_tm_irrevocable): Likewise.
8180 (is_tm_load): Likewise.
8181 (is_tm_simple_load): Likewise.
8182 (is_tm_store): Likewise.
8183 (is_tm_simple_store): Likewise.
8184 (is_tm_abort): Likewise.
8185 (tm_region_init_1): Likewise.
8186 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
8187 * tree-cfg.c (verify_gimple_call): Likewise.
8188 (move_stmt_r): Likewise.
8189 (stmt_can_terminate_bb_p): Likewise.
8190 * tree-eh.c (lower_eh_constructs_2): Likewise.
8191 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
8192 * tree-inline.c (remap_gimple_stmt): Likewise.
8193 (copy_bb): Likewise.
8194 (estimate_num_insns): Likewise.
8195 (fold_marked_statements): Likewise.
8196 * tree-sra.c (scan_function): Likewise.
8197 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
8198 (optimize_stack_restore): Likewise.
8199 (pass_fold_builtins::execute): Likewise.
8200 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
8201 (mark_all_reaching_defs_necessary_1): Likewise.
8202 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
8203 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8204 (pass_forwprop::execute): Likewise.
8205 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8206 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
8207 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
8208 * tree-ssa-strlen.c (get_string_length): Likewise.
8209 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
8210 (find_func_aliases_for_call): Likewise.
8211 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
8212 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
8213 * tree-tailcall.c (find_tail_calls): Likewise.
8214 * tree.c (need_assembler_name_p): Likewise.
8215 (free_lang_data_in_decl): Likewise.
8216 (get_call_combined_fn): Likewise.
8217 * ubsan.c (is_ubsan_builtin_p): Likewise.
8218 * varasm.c (incorporeal_function_p): Likewise.
8219 * tree.h (DECL_BUILT_IN): Remove and replace with
8221 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
8222 (fndecl_built_in_p): New.
8224 2018-08-27 Martin Liska <mliska@suse.cz>
8226 PR tree-optimization/86847
8227 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
8228 Dump also subtree probability.
8229 (switch_decision_tree::do_jump_if_equal): New function.
8230 (switch_decision_tree::emit_case_nodes): Handle special
8231 situations in balanced tree that can be emitted much simpler.
8232 Fix calculation of probabilities that happen in tree expansion.
8233 * tree-switch-conversion.h (struct cluster): Add
8235 (struct simple_cluster): Likewise.
8236 (struct case_tree_node): Add new function has_child.
8237 (do_jump_if_equal): New.
8239 2018-08-27 Martin Liska <mliska@suse.cz>
8241 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
8242 Add new argument to bit_test_cluster constructor.
8243 (bit_test_cluster::emit): Set bits really number of values
8245 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
8246 probability argument.
8247 * tree-switch-conversion.h (struct bit_test_cluster):
8248 Add m_handles_entire_switch.
8250 2018-08-27 Martin Liska <mliska@suse.cz>
8252 PR tree-optimization/86702
8253 * tree-switch-conversion.c (jump_table_cluster::emit):
8254 Make probabilities even for values in jump table
8255 according to number of cases handled.
8256 (switch_decision_tree::compute_cases_per_edge): Pass
8257 argument to reset_out_edges_aux function.
8258 (switch_decision_tree::analyze_switch_statement): Likewise.
8259 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
8262 2018-08-27 Martin Liska <mliska@suse.cz>
8264 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
8265 cfun argument explicitly.
8266 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
8267 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
8268 function gimple_switch_default_bb.
8269 (convert_switch_statements):
8271 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
8272 * stmt.c (label_to_block_fn): Use label_to_block and pass
8273 cfun argument explicitly and use gimple_switch_label_bb.
8274 (expand_case): Likewise.
8275 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
8276 cfun argument explicitly. Likewise.
8277 (make_edges_bb): Likewise.
8278 (make_cond_expr_edges): Likewise.
8279 (get_cases_for_edge): Likewise.
8280 (make_gimple_switch_edges): Likewise.
8281 (label_to_block_fn): Likewise.
8282 (label_to_block): Likewise.
8283 (make_goto_expr_edges): Likewise.
8284 (make_gimple_asm_edges): Likewise.
8285 (main_block_label): Likewise.
8286 (group_case_labels_stmt): Likewise.
8287 (find_taken_edge_computed_goto): Likewise.
8288 (find_taken_edge_switch_expr): Likewise.
8289 (gimple_verify_flow_info): Likewise.
8290 (gimple_redirect_edge_and_branch): Likewise.
8291 (gimple_switch_label_bb): New function.
8292 (gimple_switch_default_bb): Likewise.
8293 (gimple_switch_edge): Likewise.
8294 (gimple_switch_default_edge): Likewise.
8295 * tree-cfg.h (label_to_block_fn): Remove and replace ...
8296 (label_to_block): ... with this.
8297 (gimple_switch_label_bb): New.
8298 (gimple_switch_default_bb): Likewise.
8299 (gimple_switch_edge): Likewise.
8300 (gimple_switch_default_edge): Likewise.
8301 * tree-cfgcleanup.c (convert_single_case_switch): Use
8302 new gimple functions and pass new argument to label_to_block.
8303 (cleanup_control_flow_bb):
8304 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
8305 cfun argument explicitly.
8306 (make_eh_edges): Likewise.
8307 (redirect_eh_dispatch_edge): Likewise.
8308 (lower_resx): Likewise.
8309 (lower_eh_dispatch): Likewise.
8310 (maybe_remove_unreachable_handlers): Likewise.
8311 (unsplit_eh): Likewise.
8312 (cleanup_empty_eh): Likewise.
8313 (verify_eh_edges): Likewise.
8314 (verify_eh_dispatch_edge): Likewise.
8315 * tree-ssa-dom.c (record_edge_info): Likewise.
8316 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
8317 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
8318 (thread_through_normal_block): Likewise.
8319 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
8320 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
8321 * tree-switch-conversion.c (switch_conversion::collect): Use new
8323 (switch_conversion::check_final_bb): Likewise.
8324 (switch_conversion::gather_default_values): Pass new argument
8326 (switch_conversion::build_constructors): Likewise.
8327 (switch_decision_tree::compute_cases_per_edge): Use new
8328 gimple_switch_edge function.
8329 (switch_decision_tree::analyze_switch_statement): Pass new argument
8331 (switch_decision_tree::try_switch_expansion): Use
8332 gimple_switch_default_edge.
8333 * tree-vrp.c (find_switch_asserts): Pass new argument
8335 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
8336 (vr_values::simplify_switch_using_ranges): Likewise.
8338 2018-08-27 Richard Biener <rguenther@suse.de>
8340 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
8341 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
8343 * tree-ssa-sccvn.h (struct vn_pval): New structure.
8344 (struct vn_nary_op_s): Add unwind_to member. Add
8345 predicated_values flag and put result into a union together
8346 with a linked list of vn_pval.
8347 (struct vn_ssa_aux): Add name member to make maintaining
8348 a map of SSA name to vn_ssa_aux possible. Remove no longer
8349 needed info, dfsnum, low, visited, on_sccstack, use_processed
8350 and range_info_anti_range_p members.
8351 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
8352 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
8354 (vn_valueize): New global.
8355 (vn_context_bb): Likewise.
8356 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
8357 VN_INFO_PTR_INFO): Remove.
8358 * tree-ssa-sccvn.c: ... (rewrite)
8359 (pass_fre::execute): For -O2+ initialize loops and run
8360 RPO VN in optimistic mode (iterating). For -O1 and -Og
8361 run RPO VN in non-optimistic mode.
8362 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
8363 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
8364 * doc/invoke.texi (sccvn-max-scc-size): Remove.
8365 (rpo-vn-max-loop-depth): Document.
8366 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
8367 when valuezing the VUSE signals we walked out of the region.
8368 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
8369 (phi_translate): Set VN context block to use for availability
8371 (compute_avail): Likewise.
8372 (pre_valueize): New function.
8373 (pass_pre::execute): Adjust to the RPO VN API.
8375 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
8376 (propagate_constants_for_unrolling): Remove.
8377 (tree_unroll_loops_completely): Perform value-numbering
8378 on the unrolled bodies loop parent.
8380 2018-08-27 Richard Biener <rguenther@suse.de>
8382 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
8383 for partial antic compute.
8385 2018-08-27 Jakub Jelinek <jakub@redhat.com>
8387 PR rtl-optimization/87065
8388 * combine.c (simplify_if_then_else): Formatting fix.
8389 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
8391 (known_cond): Don't return const_true_rtx for vector modes. Use
8392 CONST0_RTX instead of const0_rtx. Formatting fixes.
8394 2018-08-27 Martin Liska <mliska@suse.cz>
8396 PR gcov-profile/87069
8397 * gcov.c (process_file): Record files already processed
8398 and warn about a file being processed multiple times.
8400 2018-08-27 Martin Liska <mliska@suse.cz>
8403 * config/aarch64/aarch64.c (aarch64_override_options_internal):
8404 Set default values for x_aarch64_*_string strings.
8405 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
8406 prefix. For -mabi do not print '=ABI' in help and use
8407 <option_value> format for -msve-vector-bits and -moverride
8410 2018-08-26 Jeff Law <law@redhat.com>
8412 * config/mips/frame-header-opt.c: Include "backend.h" rather than
8415 2018-08-26 Marek Polacek <polacek@redhat.com>
8417 PR c++/87029, Implement -Wredundant-move.
8418 * doc/invoke.texi: Document -Wredundant-move.
8420 2018-08-25 Martin Sebor <msebor@redhat.com>
8422 PR tree-optimization/87059
8423 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
8424 to the same type as the other.
8425 * fold-const.c (fold_binary_loc): Assert expectation.
8427 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
8429 * config/darwin.c (machopic_legitimize_pic_address): Clean up
8430 extraneous parentheses, dead code section and formatting.
8432 2018-08-24 David Malcolm <dmalcolm@redhat.com>
8435 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
8436 wide enough for jumps in the line-numbering to be visible.
8437 (layout::print_gap_in_line_numbering): New member function.
8438 (layout::calculate_line_spans): When using line numbering, merge
8439 line spans that are only 1 line apart.
8440 (diagnostic_show_locus): When printing line numbers, show gaps in
8441 line numbering directly, rather than printing headers.
8442 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
8443 line-numbering with multiple line spans.
8444 (selftest::test_fixit_insert_containing_newline_2): Add test of
8445 line-numbering, in which the spans are close enough to be merged.
8447 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
8449 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
8450 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
8451 * tree-vrp.c (range_is_nonnull): Remove.
8452 (range_includes_zero_p): Accept value_range instead of min/max.
8453 (extract_range_from_binary_expr_1): Do not early bail on
8455 Use range_includes_zero_p instead of range_is_nonnull.
8456 (extract_range_from_unary_expr): Use range_includes_zero_p instead
8457 of range_is_nonnull.
8458 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
8459 special case VR_ANTI_RANGE.
8460 (vrp_finalize): Same.
8461 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
8463 (range_is_nonnull): Remove.
8464 * vr-values.c (vrp_stmt_computes_nonzero): Use
8465 range_includes_zero_p instead of range_is_nonnull.
8466 (extract_range_basic): Pass value_range to range_includes_zero_p
8467 instead of range_is_nonnull.
8469 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
8471 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
8472 * emit-rtl.h (rtl_data): Remove return_bnd.
8473 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
8474 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
8475 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
8476 (POINTER_BOUNDS_MODE): Remove definition.
8477 (make_pointer_bounds_mode): Remove.
8478 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
8479 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
8480 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
8481 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
8482 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
8483 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
8484 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
8486 * config/i386/i386-modes.def (BND32, BND64): Remove.
8487 * config/i386/i386.c (dbx_register_map): Remove bound registers.
8488 (dbx64_register_map): Ditto.
8489 (svr4_dbx_register_map): Ditto.
8490 (indirect_thunk_bnd_needed): Remove.
8491 (indirect_thunks_bnd_used): Ditto.
8492 (indirect_return_bnd_needed): Ditto.
8493 (indirect_return_via_cx_bnd): Ditto.
8494 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
8495 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
8496 (output_indirect_thunk): Ditto. Remove need_prefix argument.
8497 (output_indirect_thunk_function): Remove handling of
8498 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
8499 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
8500 (ix86_save_reg): Remove handling of crtl->return_bnd.
8501 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
8502 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
8503 and UNSPEC_BNDLX_ADDR.
8504 (ix86_output_indirect_branch_via_reg): Remove handling of
8505 indirect_thunk_prefix_bnd.
8506 (ix86_output_indirect_branch_via_push): Ditto.
8507 (ix86_output_function_return): Ditto.
8508 (ix86_output_indirect_function_return): Ditto.
8509 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
8510 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
8511 (CALL_USED_REGISTERS): Ditto.
8512 (REG_ALLOC_ORDER): Update for removal of bound registers.
8513 (HI_REGISTER_NAMES): Ditto.
8514 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
8515 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
8516 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
8517 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
8518 (FIRST_PSEUDO_REG): Update.
8519 (BND): Remove mode iterator.
8520 * config/i386/predicates.md (bnd_mem_operator): Remove.
8522 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
8524 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
8527 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
8529 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
8530 the case in which the permute needs only a single element and
8531 repeats for every vector of the result. Extend that case to
8532 handle variable-length vectors.
8533 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8535 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
8538 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
8539 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
8541 2018-08-24 Richard Biener <rguenther@suse.de>
8543 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
8544 bb_flags_allocated members.
8545 (auto_flag): New RAII class for allocating flags.
8546 (auto_edge_flag): New RAII class for allocating edge flags.
8547 (auto_bb_flag): New RAII class for allocating bb flags.
8548 * cfgloop.c (verify_loop_structure): Allocate temporary edge
8550 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
8551 in favor of temporarily allocated BB flag.
8552 * hsa-brig.c: Re-order includes.
8553 * hsa-dump.c: Likewise.
8554 * hsa-regalloc.c: Likewise.
8555 * print-rtl.c: Likewise.
8556 * profile-count.c: Likewise.
8558 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
8561 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
8564 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
8567 * wide-int-range.cc (wide_int_range_div): Do not ignore result
8568 from wide_int_range_multiplicative_op.
8570 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8572 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
8575 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
8577 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
8580 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
8582 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
8583 full GENERIC expression used for replacement.
8585 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
8587 * tree-vrp.c (abs_extent_range): Remove.
8588 (extract_range_into_wide_ints): Pass wide ints by reference.
8589 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
8590 Pass wide ints by reference in all calls to
8591 extract_range_into_wide_ints.
8592 * wide-int-range.cc (wide_int_range_div): New.
8593 * wide-int-range.h (wide_int_range_div): New.
8594 (wide_int_range_includes_zero_p): New.
8595 (wide_int_range_zero_p): New.
8597 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
8599 * config/aarch64/aarch64.md (arches): New enum.
8600 (arch): New enum attr.
8601 (arch_enabled): New attr.
8602 (enabled): Now uses arch_enabled only.
8603 (simd, sve, fp16): Removed attribute.
8604 (fp): Attr now defined in terms of 'arch'.
8605 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
8606 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
8607 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
8608 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
8609 attributes into 'arch'.
8610 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
8611 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
8612 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
8613 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
8614 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
8615 'simd' attribute into 'arch'.
8616 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
8617 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
8618 Convert use of 'fp' attribute to 'arch'.
8619 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
8620 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
8622 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
8623 (different modes) Merge 'fp' and 'simd' into 'arch'.
8624 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
8627 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
8629 PR rtl-optimization/87026
8630 * expmed.c (canonicalize_comparison): If we can no longer create
8631 pseudoregisters, don't.
8633 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
8636 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
8638 * config/arm/arm.c (speculation_barrier_libfunc): New static
8640 (arm_init_libfuncs): Initialize it.
8641 (arm_emit_speculation_barrier): New function.
8642 * config/arm/arm.md (speculation_barrier): Call
8643 arm_emit_speculation_barrier for architectures that do not have
8645 (speculation_barrier_insn): Only match on Armv7 or later.
8647 2018-08-23 Richard Biener <rguenther@suse.de>
8650 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
8653 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
8655 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
8656 of single-vector TBLs.
8657 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
8660 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
8663 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
8664 aarch64_evpc_tbl guard.
8666 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
8668 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
8671 2018-08-22 Martin Sebor <msebor@redhat.com>
8674 * tree-pretty-print.c (pretty_print_string): Add argument.
8675 (dump_generic_node): Call to pretty_print_string with string size.
8677 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
8679 PR rtl-optimization/86771
8680 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
8681 of two SETs into those two SETs, one to be placed at i2, if that SETs
8682 destination is modified between i2 and i3.
8684 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8686 PR tree-optimization/86725
8687 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
8689 (vect_analyze_scalar_cycles_1): Check it.
8691 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8693 PR tree-optimization/86725
8694 * tree-vect-loop.c (vect_is_simple_reduction): When treating
8695 an outer loop phi as a double reduction, make sure that the
8696 single user of the phi result is an inner loop phi.
8698 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8700 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
8701 grouped stores with gaps to a strided group.
8703 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8705 * tree-vect-stmts.c (get_group_load_store_type)
8706 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
8707 first statement in a group.
8709 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8711 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
8712 the sequence used in gcc/gcc.c.
8714 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8717 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
8720 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8722 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
8723 Darwin10-specific unwinder-shim.
8724 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
8725 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
8726 New to cater for Darwin10 Rosetta.
8728 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8730 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
8731 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
8733 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8738 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
8739 (dwarf2out_switch_text_section): Generate a local label for the
8740 second function sub-section and apply it as the second FDE start
8742 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
8743 second sub-section start.
8745 2018-08-22 Richard Biener <rguenther@suse.de>
8747 PR tree-optimization/86988
8748 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
8750 2018-08-22 Richard Biener <rguenther@suse.de>
8752 PR tree-optimization/86945
8753 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
8755 2018-08-22 Alexandre Oliva <oliva@adacore.com>
8757 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
8758 a comment about how uses of r2 for .sdata2 come about.
8760 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
8762 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
8764 2018-08-21 Marek Polacek <polacek@redhat.com>
8766 PR c++/86981, Implement -Wpessimizing-move.
8767 * doc/invoke.texi: Document -Wpessimizing-move.
8769 2018-08-21 Jan Hubicka <jh@suse.cz>
8771 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
8772 * tree.h (is_redundant_typedef): Remove.
8773 * dwarf2out.c (is_redundant_typedef): Turn into static function.
8775 2018-08-21 Jan Hubicka <jh@suse.cz>
8777 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
8780 2018-08-21 Tamar Christina <tamar.christina@arm.com>
8782 * expmed.c (extract_low_bits): Reject invalid subregs early.
8784 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8787 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
8790 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8792 * config/vxworks.h: Guard vxworks_asm_out_constructor and
8793 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
8794 * config/vxworks.c: Likewise.
8796 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8798 * config/vxworks.c: Set targetm.have_ctors_dtors
8799 if HAVE_INITFINI_ARRAY_SUPPORT.
8800 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
8801 if HAVE_INITFINI_ARRAY_SUPPORT.
8803 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8805 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
8806 default search path for VxWorks < 7.
8808 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8810 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
8811 (get_format_string): Refer to c_getstr.
8813 2018-08-21 Tom de Vries <tdevries@suse.de>
8815 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8816 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8817 (debuginfo_early_stop): Declare.
8818 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8819 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8820 (debuginfo_early_stop): New function.
8821 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
8822 and debuginfo_early_stop.
8823 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
8824 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
8825 (general_init): Call debuginfo_early_init.
8826 (finalize): Call debuginfo_fini.
8827 (do_compile): Call debuginfo_init.
8828 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
8830 (@item -fdump-debug, @item -fdump-earlydebug): Add.
8832 2018-08-21 Tom de Vries <tdevries@suse.de>
8834 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
8835 flag_dump_noaddr and flag_dump_unnumbered.
8837 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
8839 * wide-int-range.cc (wide_int_range_abs): New.
8840 (wide_int_range_order_set): Rename from wide_int_range_min_max.
8841 * wide-int-range.h (wide_int_range_abs): New.
8842 (wide_int_range_min_max): New.
8843 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
8844 case to call wide_int_range_abs.
8845 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
8846 (extract_range_from_abs_expr): Delete.
8848 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
8851 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
8852 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
8855 2018-08-20 Nathan Sidwell <nathan@acm.org>
8856 Jeff Law <law@redhat.com>
8858 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
8859 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
8861 2018-08-20 David Malcolm <dmalcolm@redhat.com>
8864 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
8865 (decl_attributes): Likewise.
8866 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
8868 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8869 * diagnostic-core.h (class auto_diagnostic_group): New class.
8870 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
8871 (diagnostic_report_diagnostic): Handle the first diagnostics within
8873 (emit_diagnostic): Add auto_diagnostic_group instance.
8875 (inform_n): Likewise.
8876 (warning): Likewise.
8877 (warning_at): Likewise.
8878 (warning_n): Likewise.
8879 (pedwarn): Likewise.
8880 (permerror): Likewise.
8882 (error_n): Likewise.
8883 (error_at): Likewise.
8885 (fatal_error): Likewise.
8886 (internal_error): Likewise.
8887 (internal_error_no_backtrace): Likewise.
8888 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
8889 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
8890 * diagnostic.h (struct diagnostic_context): Add fields
8891 "diagnostic_group_nesting_depth",
8892 "diagnostic_group_emission_count", "begin_group_cb",
8894 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
8895 Add auto_diagnostic_group instance(s).
8896 (find_explicit_erroneous_behavior): Likewise.
8897 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
8898 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
8899 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
8900 (gimplify_va_arg_expr): Likewise.
8901 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
8902 (HSA_SORRY_AT): Likewise.
8903 * ipa-devirt.c (compare_virtual_tables): Likewise.
8904 (warn_odr): Likewise.
8905 * multiple_target.c (expand_target_clones): Likewise.
8906 * opts-common.c (cmdline_handle_error): Likewise.
8907 * reginfo.c (globalize_reg): Likewise.
8908 * substring-locations.c (format_warning_n_va): Likewise.
8909 * tree-inline.c (expand_call_inline): Likewise.
8910 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
8911 * tree-ssa-loop-niter.c
8912 (do_warn_aggressive_loop_optimizations): Likewise.
8913 * tree-ssa-uninit.c (warn_uninit): Likewise.
8914 * tree.c (warn_deprecated_use): Likewise.
8916 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
8919 * config/i386/i386.md (eh_return): Always update EH return
8920 address in word_mode.
8922 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
8924 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
8925 TARGET_SPLIT_COMPLEX_ARG is defined.
8927 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
8929 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
8931 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
8934 * expr.c (expand_assignment): Assert that bitpos is positive.
8935 (store_field): Likewise
8936 (expand_expr_real_1): Make sure that bitpos is positive.
8937 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
8940 2018-08-20 Nathan Sidwell <nathan@acm.org>
8942 * Makefile.in (CPP_ID_DATA_H): Delete.
8943 (CPP_INTERNAL_H): Don't add it.
8944 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
8945 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
8947 2018-08-20 Richard Biener <rguenther@suse.de>
8949 PR tree-optimization/78655
8950 * tree-vrp.c (extract_range_from_binary_expr_1): Make
8951 pointer + offset nonnull if either operand is nonnull work.
8953 2018-08-20 Tom de Vries <tdevries@suse.de>
8955 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
8956 unless the referenced die describes the added property using
8957 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
8958 Otherwise, add a DW_AT_location to the referenced die.
8960 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
8963 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
8964 register_operand when calling ix86_set_reg_reg_cost.
8965 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
8966 Set *total to 0 for operands that satisfy x86_64_immediate_operand
8967 predicate and to 1 otherwise.
8969 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
8971 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
8972 emit a diagnostic that it is not supported and reset the option.
8973 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
8974 supported and consume the option. (ASM_FINAL_SPEC): New.
8976 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
8978 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
8981 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
8983 C-SKY port: Documentation
8985 * doc/extend.texi (C-SKY Function Attributes): New section.
8986 * doc/invoke.texi (Option Summary): Add C-SKY options.
8987 (C-SKY Options): New section.
8988 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
8990 2018-08-17 Jojo <jijie_rong@c-sky.com>
8991 Huibin Wang <huibin_wang@c-sky.com>
8992 Sandra Loosemore <sandra@codesourcery.com>
8993 Chung-Lin Tang <cltang@codesourcery.com>
8995 C-SKY port: Backend implementation
8997 * config/csky/*: New.
8998 * common/config/csky/*: New.
9000 2018-08-17 Jojo <jijie_rong@c-sky.com>
9001 Huibin Wang <huibin_wang@c-sky.com>
9002 Sandra Loosemore <sandra@codesourcery.com>
9003 Chung-Lin Tang <cltang@codesourcery.com>
9004 Andrew Jenner <andrew@codesourcery.com>
9006 C-SKY port: Configury
9008 * config.gcc (csky-*-*): New.
9009 * configure.ac: Add csky to targets for dwarf2 debug_line support.
9010 * configure: Regenerated.
9012 2018-08-17 David Malcolm <dmalcolm@redhat.com>
9014 * dump-context.h: Include "dumpfile.h".
9015 (dump_context::dump_printf_va): Convert final param from va_list
9016 to va_list *. Convert from ATTRIBUTE_PRINTF to
9017 ATTRIBUTE_GCC_DUMP_PRINTF.
9018 (dump_context::dump_printf_loc_va): Likewise.
9019 * dumpfile.c: Include "stringpool.h".
9020 (make_item_for_dump_printf_va): Delete.
9021 (make_item_for_dump_printf): Delete.
9022 (class dump_pretty_printer): New class.
9023 (dump_pretty_printer::dump_pretty_printer): New ctor.
9024 (dump_pretty_printer::emit_items): New member function.
9025 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
9027 (dump_pretty_printer::emit_item): New member function.
9028 (dump_pretty_printer::stash_item): New member function.
9029 (dump_pretty_printer::format_decoder_cb): New member function.
9030 (dump_pretty_printer::decode_format): New member function.
9031 (dump_context::dump_printf_va): Reimplement in terms of
9032 dump_pretty_printer.
9033 (dump_context::dump_printf_loc_va): Convert final param from va_list
9035 (dump_context::begin_scope): Reimplement call to
9036 make_item_for_dump_printf.
9037 (dump_printf): Update for change to dump_printf_va.
9038 (dump_printf_loc): Likewise.
9039 (selftest::test_capture_of_dump_calls): Convert "stmt" from
9040 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
9041 with %T, %E, and %G.
9042 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
9043 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
9044 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
9045 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
9046 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
9047 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
9048 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
9049 within a dump_printf_loc call to "%wu".
9050 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
9051 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
9052 missing space after "=".
9053 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
9054 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
9055 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
9056 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
9057 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
9058 duplicate "vectorized" from message.
9060 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
9062 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
9063 polyNxK_t element's TYPE_STRING_FLAG.
9065 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
9067 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
9068 (they were unnamed before). Fix comments.
9070 2018-08-17 Nathan Sidwell <nathan@acm.org>
9072 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
9074 2018-08-17 Richard Biener <rguenther@suse.de>
9076 PR tree-optimization/86841
9077 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
9079 2018-08-17 Martin Liska <mliska@suse.cz>
9081 * common.opt: Remove Warn, Init and Report for options with
9082 Ignore/Deprecated flag. Warning is done automatically for
9084 * config/i386/i386.opt: Likewise.
9085 * config/ia64/ia64.opt: Likewise.
9086 * config/rs6000/rs6000.opt: Likewise.
9087 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
9088 Remove usage of flag_check_pointer_bounds.
9089 * lto-wrapper.c (merge_and_complain): Do not handle
9090 OPT_fcheck_pointer_bounds.
9091 (append_compiler_options): Likewise.
9092 * opt-functions.awk: Do not handle Deprecated.
9093 * optc-gen.awk: Check that Var, Report and Init are not
9094 used for an option with Ignore/Deprecated flag.
9095 * opts-common.c (decode_cmdline_option): Do not report
9097 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
9099 * opts.h (struct cl_option): Remove cl_deprecated flag.
9100 (CL_ERR_DEPRECATED): Remove error enum value.
9102 2018-08-17 Richard Biener <rguenther@suse.de>
9105 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
9106 across a va-arg-pack using call adjust its return value accordingly.
9108 2018-08-16 Martin Sebor <msebor@redhat.com>
9110 PR tree-optimization/86853
9111 * gimple-ssa-sprintf.c (struct format_result): Rename member.
9112 (struct fmtresult): Add member and initialize it in ctors.
9113 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
9114 (format_string): Handle %S the same as %ls. Set MAYFAIL.
9115 (format_directive): Set POSUNDER4K when MAYFAIL is set.
9116 (parse_directive): Handle %C same as %c.
9117 (sprintf_dom_walker::compute_format_length): Adjust.
9118 (is_call_safe): Adjust.
9120 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9122 * builtins.c (c_strlen): Add new parameter eltsize. Use it
9123 for determining how to count the elements.
9124 * builtins.h (c_strlen): Adjust prototype.
9125 * expr.c (string_constant): Add new parameter mem_size.
9126 Set *mem_size appropriately.
9127 * expr.h (string_constant): Adjust protoype.
9128 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
9129 * gimple-fold.h (get_range_strlen): Adjust prototype.
9130 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
9131 (format_string): Call get_string_length with eltsize.
9133 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9135 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
9136 to emit the span, rather than setting it as the prefix.
9138 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9140 * diagnostic-show-locus.c (layout::start_annotation_line): Add
9141 "margin_char" parameter, defaulting to space. Use it in place
9142 of pp_space for the initial part of the margin.
9143 (layout::print_leading_fixits): Use '+' when filling the margin
9144 of line-insertion fix-it hints.
9146 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9148 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
9151 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9153 * config/rs6000/altivec.md: Don't set length attribute to the default
9155 * config/rs6000/darwin.md: Ditto.
9156 * config/rs6000/dfp.md: Ditto.
9157 * config/rs6000/htm.md: Ditto.
9158 * config/rs6000/rs6000.md: Ditto.
9159 * config/rs6000/sync.md: Ditto.
9160 * config/rs6000/vsx.md: Ditto.
9162 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9164 * config/rs6000/altivec.md: Don't set length attribute to the default
9165 value, for branch instructions.
9166 * config/rs6000/darwin.md: Ditto.
9167 * config/rs6000/rs6000.md: Ditto.
9169 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9171 * config/rs6000/rs6000.md (length): Always define as const_int 4.
9172 (unnamed conditional branch define_insn): Set length to 4 or 8
9173 depending on offset.
9174 (<bd>_<mode>): Similar, for alternative 0.
9175 (<bd>tf_<mode>): Ditto.
9177 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9179 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
9181 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
9183 * doc/rtl.texi: Replace old RTX class names with new names.
9186 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
9188 * expmed.h (canonicalize_comparison): New declaration.
9189 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
9190 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
9191 * optabs.c (prepare_cmp_insn): Likewise.
9192 * rtl.h (unsigned_condition_p): New function which checks if a
9193 comparison operator is unsigned.
9195 2018-08-16 Nathan Sidwell <nathan@acm.org>
9197 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
9198 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
9200 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9203 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
9204 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
9205 (mov<mov>): ..this and enable unconditionally.
9207 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9209 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
9211 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
9213 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
9214 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
9215 "Common" with "Target".
9217 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
9219 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
9220 * doc/invoke.texi (mmitigate-rop): Remove.
9221 * config/i386/i386.c: Do not include "regrename.h".
9222 (ix86_rop_should_change_byte_p, reg_encoded_number)
9223 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
9225 (ix86_reorg): Remove call to ix86_mitigate_rop.
9226 * config/i386/i386.md (attr "modrm_class"): Remove.
9227 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
9228 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
9229 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
9231 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
9233 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
9234 allow folding of mergeh() and mergel() for the float and double types.
9235 (fold_mergehl_helper): Rework to handle building a permute tree
9238 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
9240 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
9243 2018-08-15 David Malcolm <dmalcolm@redhat.com>
9245 * common.opt (fdiagnostics-show-labels): New option.
9246 * diagnostic-show-locus.c (class layout_range): Add field
9248 (class layout): Add field "m_show_labels_p".
9249 (layout_range::layout_range): Add param "label" and use it to
9251 (make_range): Pass in NULL for new "label" param of layout_range's
9253 (layout::layout): Initialize m_show_labels_p.
9254 (layout::maybe_add_location_range): Pass in loc_range->m_label
9255 when constructing layout_range instances.
9256 (struct line_label): New struct.
9257 (layout::print_any_labels): New member function.
9258 (layout::print_line): Call it if label-printing is enabled.
9259 (selftest::test_one_liner_labels): New test.
9260 (selftest::test_diagnostic_show_locus_one_liner): Call it.
9261 * diagnostic.c (diagnostic_initialize): Initialize
9262 context->show_labels_p.
9263 * diagnostic.h (struct diagnostic_context): Add field
9265 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9266 -fno-diagnostics-show-labels.
9267 * dwarf2out.c (gen_producer_string): Add
9268 OPT_fdiagnostics_show_labels to the ignored options.
9269 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
9271 (gcc_rich_location::maybe_add_expr): Likewise.
9272 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
9273 label" param, defaulting to NULL.
9274 (gcc_rich_location::add_expr): Add "label" param.
9275 (gcc_rich_location::maybe_add_expr): Likewise.
9276 (class text_range_label): New class.
9277 (class range_label_for_type_mismatch): New class.
9278 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
9279 of format_warning_va.
9280 (fmtwarn_n): Likewise for new params of format_warning_n_va.
9281 * lto-wrapper.c (merge_and_complain): Add
9282 OPT_fdiagnostics_show_labels to the "pick one setting" options.
9283 (append_compiler_options): Likewise to the dropped options.
9284 (append_diag_options): Likewise to the passed-on options.
9285 * opts.c (common_handle_option): Handle the new option.
9286 * selftest-diagnostic.c
9287 (test_diagnostic_context::test_diagnostic_context): Enable
9289 * substring-locations.c: Include "gcc-rich-location.h".
9290 (format_warning_n_va): Add "fmt_label" and "param_label" params
9291 and use them as appropriate.
9292 (format_warning_va): Add "fmt_label" and "param_label" params,
9293 passing them on to format_warning_n_va.
9294 (format_warning_at_substring): Likewise.
9295 (format_warning_at_substring_n): Likewise.
9296 * substring-locations.h (format_warning_va): Add "fmt_label" and
9297 "param_label" params.
9298 (format_warning_n_va): Likewise.
9299 (format_warning_at_substring): Likewise.
9300 (format_warning_at_substring_n): Likewise.
9301 * toplev.c (general_init): Initialize global_dc->show_labels_p.
9303 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
9306 * builtins.c (expand_builtin_memcmp): Do not expand the call
9307 when overflow is detected.
9309 2018-08-15 Martin Sebor <msebor@redhat.com>
9311 PR tree-optimization/71625
9312 * config/aarch64/aarch64-builtins.c
9313 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
9315 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
9317 * config/s390/s390.c (s390_reorg): Remove loop.
9319 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9322 (darwin_function_switched_text_sections): Delete.
9323 * gcc/config/darwin.h
9324 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
9326 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9329 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
9330 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
9331 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
9333 2018-08-15 Martin Liska <mliska@suse.cz>
9335 PR tree-optimization/86925
9336 * predict.c (expr_expected_value_1): When taking
9337 later predictor, assign also probability.
9338 Use fold_build2_initializer_loc in order to fold
9339 the expression in -frounding-math.
9341 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
9343 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
9345 (expand_vec_perm_1): Try the new method.
9347 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
9350 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
9351 Check whether lra_live_max_point is 0 before dividing.
9353 2018-08-14 Martin Sebor <msebor@redhat.com>
9355 PR tree-optimization/86650
9356 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
9357 (vrp_prop::check_mem_ref): Same.
9359 2018-08-13 Liu Hao <lh_mouse@126.com>
9361 * pretty-print.c (eat_esc_sequence): Swap the foreground and
9362 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
9363 and clear it thereafter, as it only works for DBCS.
9365 2018-08-13 Liu Hao <lh_mouse@126.com>
9367 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
9368 handle returned by _get_osf_handle().
9370 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9372 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
9373 for folding vec_perm.
9375 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9377 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
9378 Add support for gimple-folding of vec_pack() and vec_unpack()
9381 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9383 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
9384 vec_xst variants to the list.
9385 (rs6000_gimple_fold_builtin): Add support for folding unaligned
9386 vector loads and stores.
9388 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
9390 * config.gcc (rs6000-ibm-aix4.x): Delete.
9391 (rs6000-ibm-aix5.1): Delete.
9392 (rs6000-ibm-aix5.2): Delete.
9393 (rs6000-ibm-aix5.3): Delete.
9394 * config/rs6000/aix43.h: Delete.
9395 * config/rs6000/aix51.h: Delete.
9396 * config/rs6000/aix52.h: Delete.
9397 * config/rs6000/t-aix43: Delete.
9399 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
9401 * config/s390/s390.c (s390_decompose_constant_pool_ref):
9403 (s390_decompose_address): Factor out constant pool ref
9406 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9408 * config/nds32/nds32-predicates.c
9409 (nds32_can_use_bclr_p): Change return type as bool.
9410 (nds32_can_use_bset_p): Ditto.
9411 (nds32_can_use_btgl_p): Ditto.
9412 (nds32_can_use_bitci_p): Ditto.
9413 * config/nds32/nds32-protos.h
9414 (nds32_can_use_bclr_p): Change declaration.
9415 (nds32_can_use_bset_p): Ditto.
9416 (nds32_can_use_btgl_p): Ditto.
9417 (nds32_can_use_bitci_p): Ditto.
9419 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9421 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
9422 Support -msched-prolog-epilog option.
9423 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
9425 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9427 * common/config/nds32/nds32-common.c
9428 (nds32_option_optimization_table): Enalbe -malways-align.
9430 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9432 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
9434 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
9435 OPT_misr_secure_ case.
9436 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
9437 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
9438 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
9440 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
9441 (nds32_isr_info): New field security_level.
9442 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
9443 * config/nds32/nds32.md (return_internal): Consider critical attribute.
9444 * config/nds32/nds32.opt (misr-secure): New option.
9445 * config/nds32/nds32_init.inc: New file.
9446 * config/nds32/nds32_isr.h: New file.
9448 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
9450 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
9451 Update comment for atomic instructions.
9452 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
9453 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
9455 (atomic_loaddi): Revise fence expansion to only emit fence prior to
9456 load for __ATOMIC_SEQ_CST model.
9457 (atomic_loaddi_1): Remove float register target.
9458 (atomic_storedi): Handle CONST_INT values.
9459 (atomic_storedi_1): Remove float register source. Add special case
9461 (memory_barrier): New expander and insn.
9463 2018-08-11 Jakub Jelinek <jakub@redhat.com>
9465 PR tree-optimization/86835
9466 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
9467 new_stmt after def_gsi, make sure to insert new_square_stmt after
9468 that stmt, not 2 stmts before it.
9470 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
9473 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
9476 2018-08-10 Martin Liska <mliska@suse.cz>
9479 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
9481 * builtins.c (expand_builtin_expect_with_probability):
9483 (expand_builtin_expect_with_probability): New function.
9484 (build_builtin_expect_predicate): Add new argumnet probability
9485 for BUILT_IN_EXPECT_WITH_PROBABILITY.
9486 (fold_builtin_expect):
9489 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
9490 * builtins.h (fold_builtin_expect): Set new argument.
9491 * doc/extend.texi: Document __builtin_expect_with_probability.
9492 * doc/invoke.texi: Likewise.
9493 * gimple-fold.c (gimple_fold_call): Pass new argument.
9494 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
9495 also BUILT_IN_EXPECT_WITH_PROBABILITY.
9496 * predict.c (get_predictor_value): New function.
9497 (expr_expected_value): Add new argument probability. Assume
9498 that predictor and probability are always non-null.
9499 (expr_expected_value_1): Likewise. For __builtin_expect and
9500 __builtin_expect_with_probability set probability. Handle
9501 combination in binary expressions.
9502 (tree_predict_by_opcode): Simplify code by simply calling
9503 get_predictor_value.
9504 (pass_strip_predict_hints::execute): Add handling of
9505 BUILT_IN_EXPECT_WITH_PROBABILITY.
9506 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
9508 * tree.h (DECL_BUILT_IN_P): New function.
9510 2018-08-10 Martin Liska <mliska@suse.cz>
9512 PR tree-optimization/85799
9513 * passes.def: Add argument for pass_strip_predict_hints.
9514 * predict.c (class pass_strip_predict_hints): Add new argument
9516 (strip_predictor_early): New function.
9517 (pass_strip_predict_hints::execute): Call the function to
9519 (strip_predict_hints): New function.
9520 * predict.def: Fix comment.
9522 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
9524 * Makefile.in: Clarify which tm.texi to copy over to assert the
9525 right to grant a GFDL license for all.
9527 2018-08-09 Jeff Law <law@redhat.com>
9529 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
9532 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
9534 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
9537 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9539 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
9540 reductions for variable-length vectors.
9542 2018-08-09 David Malcolm <dmalcolm@redhat.com>
9545 * common.opt (fdiagnostics-show-line-numbers): New option.
9546 * diagnostic-show-locus.c (class layout): Add fields
9547 "m_show_line_numbers_p" and "m_linenum_width";
9548 (num_digits): New function.
9549 (test_num_digits): New function.
9550 (layout::layout): Initialize new fields. Update m_x_offset
9551 logic to handle any left margin.
9552 (layout::print_source_line): Print line number when requested.
9553 (layout::start_annotation_line): New member function.
9554 (layout::print_annotation_line): Call it.
9555 (layout::print_leading_fixits): Likewise.
9556 (layout::print_trailing_fixits): Likewise. Update calls to
9557 move_to_column for new parameter.
9558 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
9559 it to potentially call start_annotation_line.
9560 (layout::show_ruler): Call start_annotation_line.
9561 (selftest::test_line_numbers_multiline_range): New selftest.
9562 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
9563 and selftest::test_line_numbers_multiline_range.
9564 * diagnostic.c (diagnostic_initialize): Initialize
9565 show_line_numbers_p.
9566 * diagnostic.h (struct diagnostic_context): Add field
9567 "show_line_numbers_p".
9568 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9569 -fno-diagnostics-show-line-numbers.
9570 * dwarf2out.c (gen_producer_string): Add
9571 OPT_fdiagnostics_show_line_numbers to the ignored options.
9572 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
9573 one setting" options.
9574 (append_compiler_options): Likewise to the dropped options.
9575 (append_diag_options): Likewise to the passed-on options.
9576 * opts.c (common_handle_option): Handle the new option.
9577 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
9579 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
9581 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
9582 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
9583 third argument of type "const signed char" to descriptions of
9584 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
9585 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
9586 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
9587 __builtin_bcdsub_ov functions.
9589 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9591 PR tree-optimization/86858
9592 * tree-vect-loop.c (vect_is_simple_reduction): Restore
9593 flow_bb_inside_loop_p calls.
9595 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9597 PR tree-optimization/86871
9598 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
9599 instead of gimple_assign_lhs.
9601 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
9604 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
9605 register constraint to operand 0.
9606 (add<mode>3_carryinC): Likewise.
9607 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
9609 2018-08-09 Martin Liska <mliska@suse.cz>
9612 * common.opt: Remove extra line.
9614 2018-08-09 Martin Liska <mliska@suse.cz>
9616 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
9617 at the end of a line, make first letter capital and end up
9618 a sentence with a dot.
9619 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
9620 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
9621 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
9622 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
9623 (PARAM_MAX_ISL_OPERATIONS): Likewise.
9624 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
9625 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
9626 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
9627 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
9628 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
9629 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
9630 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
9631 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
9632 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
9633 (PARAM_TREE_REASSOC_WIDTH): Likewise.
9634 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
9635 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
9636 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
9638 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
9641 * config/s390/s390.c (s390_option_override_internal): Reduce the
9642 stack-clash-protection-probe-interval param if it would be too big
9645 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
9648 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
9649 * config/m68k/m68k.c (handle_move_double): Don't call
9650 m68k_final_prescan_insn.
9651 (m68k_adjust_decorated_operand): Renamed from
9652 m68k_final_prescan_insn, remove first and third operand and
9654 (print_operand): Call it.
9655 (print_operand_address): Call it.
9657 2018-08-08 Nathan Sidwell <nathan@acm.org>
9659 * diagnostic.c (diagnostic_report_current_module): Use
9660 linemap_included_from & linemap_included_from_linemap.
9662 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
9664 * config/aarch64/aarch64-cores.def: Add phecda core.
9665 * config/aarch64/aarch64-tune.md: Regenerate.
9666 * doc/invoke.texi: Add phecda core.
9668 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
9671 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
9673 * config/s390/s390.md ("movti"): Add more alternatives for
9674 constant to GPR copies.
9676 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
9678 * config/s390/s390.c: Fix whitespace damage throughout the file.
9679 * config/s390/s390.h: Likewise.
9680 * config/s390/tpf.h: Likewise.
9682 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
9684 * config/s390/s390.c (s390_loadrelative_operand_p):
9685 Remove TARGET_CPU_ZARCH usages.
9686 (s390_rtx_costs): Likewise.
9687 (s390_legitimate_constant_p): Likewise.
9688 (s390_cannot_force_const_mem): Likewise.
9689 (legitimate_reload_constant_p): Likewise.
9690 (s390_preferred_reload_class): Likewise.
9691 (legitimize_pic_address): Likewise.
9692 (legitimize_tls_address): Likewise.
9693 (s390_split_branches): Removed.
9694 (s390_add_execute): Removed.
9695 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
9696 (s390_mainpool_start): Likewise.
9697 (s390_mainpool_finish): Likewise.
9698 (s390_mainpool_cancel): Removed.
9699 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
9700 (s390_chunkify_cancel): Likewise.
9701 (s390_return_addr_rtx): Likewise.
9702 (s390_register_info): Remove split_branches_pending_p uages.
9703 (s390_optimize_register_info): Likewise.
9704 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
9705 split_branches_pending_p usages.
9706 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
9707 (s390_load_got): Likewise.
9708 (s390_expand_split_stack_prologue): Likewise.
9709 (output_asm_nops): Likewise.
9710 (s390_function_profiler): Likewise.
9711 (s390_emit_call): Likewise.
9712 (s390_conditional_register_usage): Likewise.
9713 (s390_optimize_prologue): Likewise.
9714 (s390_reorg): Remove TARGET_CPU_ZARCH and
9715 split_branches_pending_p usages.
9716 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
9718 (s390_output_indirect_thunk_function): Likewise.
9719 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
9720 (TARGET_CPU_ZARCH_P): Removed.
9721 (struct machine_function): Remove split_branches_pending_p.
9722 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
9724 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
9726 * common/config/s390/s390-common.c (processor_flags_table):
9728 * config.gcc: Remove with_arch/with_tune support.
9729 * config/s390/2064.md: Remove cpu attribute comparisons.
9730 * config/s390/driver-native.c (s390_host_detect_local_cpu):
9732 * config/s390/linux.h (ASM_SPEC):
9733 Remove -march support.
9734 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
9735 Use a table to get an arch level.
9736 * config/s390/s390-opts.h (enum processor_type):
9738 * config/s390/s390.c
9739 (processor_table): Remove entries, add arch_level values.
9740 (s390_issue_rate): Remove cases.
9741 (s390_option_override): Adjust
9742 s390_option_override_internal() call.
9743 (s390_option_override_internal): Remove deprecation warning.
9744 (s390_valid_target_attribute_tree): Adjust
9745 s390_option_override_internal() call.
9746 * config/s390/s390.h (struct s390_processor):
9747 Share with s390-c.c, add arch_level field.
9748 * config/s390/s390.md:
9749 Remove occurrences in cpu attribute.
9750 * config/s390/s390.opt: Remove -march/-mtune support.
9751 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
9752 * doc/invoke.texi: Remove deprecation warning.
9754 2018-08-08 Luis Machado <luis.machado@linaro.org>
9756 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
9758 (qdf24xx_tunings): Set vector cost structure to
9759 qdf24xx_vector_cost.
9761 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
9762 <register_sextend>: Set to 3.
9764 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
9767 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
9768 * config/aarch64/aarch64-simd.md
9769 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
9770 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
9771 (aarch64_frecpx<mode>): ...this new pattern.
9772 * config/aarch64/aarch64-simd-builtins.def: Remove comment
9773 about aarch64_frecp<FRECP:frecp_suffix><mode>.
9775 2018-08-07 Martin Liska <mliska@suse.cz>
9778 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
9779 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
9780 * predict.def (PRED_MALLOC_NONNULL): New predictor.
9781 * doc/extend.texi: Document that malloc attribute adds
9784 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
9787 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9788 Define to speculation_safe_value_not_needed.
9790 2018-08-06 Jeff Law <law@redhat.com>
9792 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
9793 the vr_values instance to cprop_into_stmt.
9794 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
9795 (cprop_operand): Also query EVRP to determine if OP is a constant.
9797 2018-08-06 Nathan Sidwell <nathan@acm.org>
9799 * diagnostic.c (diagnostic_report_current_module): Reroll
9800 included-at loop. Translate text.
9802 2018-08-06 David Malcolm <dmalcolm@redhat.com>
9804 * function-tests.c (selftest::test_expansion_to_rtl): Call
9805 free_after_compilation.
9807 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9809 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
9811 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
9813 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
9814 loops with memory block operations from getting unrolled.
9816 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
9819 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9820 Define to speculation_safe_value_not_needed.
9822 2018-08-06 Jeff Law <law@redhat.com>
9824 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
9827 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9830 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
9831 with all enabled __intN types.
9833 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
9835 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9837 * alias.c (record_set): Check for clobber high.
9838 * cfgexpand.c (expand_gimple_stmt): Likewise.
9839 * combine-stack-adj.c (single_set_for_csa): Likewise.
9840 * combine.c (find_single_use_1): Likewise.
9841 (set_nonzero_bits_and_sign_copies): Likewise.
9842 (get_combine_src_dest): Likewise.
9843 (is_parallel_of_n_reg_sets): Likewise.
9844 (try_combine): Likewise.
9845 (record_dead_and_set_regs_1): Likewise.
9846 (reg_dead_at_p_1): Likewise.
9847 (reg_dead_at_p): Likewise.
9848 * dce.c (deletable_insn_p): Likewise.
9849 (mark_nonreg_stores_1): Likewise.
9850 (mark_nonreg_stores_2): Likewise.
9851 * df-scan.c (df_find_hard_reg_defs): Likewise.
9852 (df_uses_record): Likewise.
9853 (df_get_call_refs): Likewise.
9854 * dwarf2out.c (mem_loc_descriptor): Likewise.
9855 * haifa-sched.c (haifa_classify_rtx): Likewise.
9856 * ira-build.c (create_insn_allocnos): Likewise.
9857 * ira-costs.c (scan_one_insn): Likewise.
9858 * ira.c (equiv_init_movable_p): Likewise.
9859 (rtx_moveable_p): Likewise.
9860 (interesting_dest_for_shprep): Likewise.
9861 * jump.c (mark_jump_label_1): Likewise.
9862 * postreload-gcse.c (record_opr_changes): Likewise.
9863 * postreload.c (reload_cse_simplify): Likewise.
9864 (struct reg_use): Add source expr.
9865 (reload_combine): Check for clobber high.
9866 (reload_combine_note_use): Likewise.
9867 (reload_cse_move2add): Likewise.
9868 (move2add_note_store): Likewise.
9869 * print-rtl.c (print_pattern): Likewise.
9870 * recog.c (decode_asm_operands): Likewise.
9871 (store_data_bypass_p): Likewise.
9872 (if_test_bypass_p): Likewise.
9873 * regcprop.c (kill_clobbered_value): Likewise.
9874 (kill_set_value): Likewise.
9875 * reginfo.c (reg_scan_mark_refs): Likewise.
9876 * reload1.c (maybe_fix_stack_asms): Likewise.
9877 (eliminate_regs_1): Likewise.
9878 (elimination_effects): Likewise.
9879 (mark_not_eliminable): Likewise.
9880 (scan_paradoxical_subregs): Likewise.
9881 (forget_old_reloads_1): Likewise.
9882 * reorg.c (find_end_label): Likewise.
9883 (try_merge_delay_insns): Likewise.
9884 (redundant_insn): Likewise.
9885 (own_thread_p): Likewise.
9886 (fill_simple_delay_slots): Likewise.
9887 (fill_slots_from_thread): Likewise.
9888 (dbr_schedule): Likewise.
9889 * resource.c (update_live_status): Likewise.
9890 (mark_referenced_resources): Likewise.
9891 (mark_set_resources): Likewise.
9892 * rtl.c (copy_rtx): Likewise.
9893 * rtlanal.c (reg_referenced_p): Likewise.
9894 (single_set_2): Likewise.
9895 (noop_move_p): Likewise.
9896 (note_stores): Likewise.
9897 * sched-deps.c (sched_analyze_reg): Likewise.
9898 (sched_analyze_insn): Likewise.
9900 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9902 * cse.c (invalidate_reg): New function extracted from...
9903 (invalidate): ...here.
9904 (canonicalize_insn): Check for clobber high.
9905 (invalidate_from_clobbers): invalidate clobber highs.
9906 (invalidate_from_sets_and_clobbers): Likewise.
9907 (count_reg_usage): Check for clobber high.
9908 (insn_live_p): Likewise.
9909 * cselib.c (cselib_expand_value_rtx_1):Likewise.
9910 (cselib_invalidate_regno): Check for clobber in setter.
9911 (cselib_invalidate_rtx): Pass through setter.
9912 (cselib_invalidate_rtx_note_stores):
9913 (cselib_process_insn): Check for clobber high.
9914 * cselib.h (cselib_invalidate_rtx): Add operand.
9916 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9918 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
9919 (mark_not_eliminable): Likewise.
9920 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
9921 * lra-lives.c (process_bb_lives): Check for clobber high.
9922 * lra.c (new_insn_reg): Remember clobber highs.
9923 (collect_non_operand_hard_regs): Check for clobber high.
9924 (lra_set_insn_recog_data): Likewise.
9925 (add_regs_to_insn_regno_info): Likewise.
9926 (lra_update_insn_regno_info): Likewise.
9928 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9930 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
9931 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
9933 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9935 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
9936 (copy_insn_1): Likewise.
9937 (gen_hard_reg_clobber_high): New gen function.
9938 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
9939 * genemit.c (gen_exp): Likewise.
9940 (gen_emit_seq): Pass through info.
9941 (gen_insn): Check for CLOBBER_HIGH.
9942 (gen_expand): Pass through info.
9943 (gen_split): Likewise.
9944 (output_add_clobbers): Likewise.
9945 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
9946 (remove_clobbers): Likewise.
9947 * rtl.h (gen_hard_reg_clobber_high): New declaration.
9949 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9951 * doc/rtl.texi (clobber_high): Add.
9952 (parallel): Add in clobber high
9953 * rtl.c (rtl_check_failed_code3): Add function.
9954 * rtl.def (CLOBBER_HIGH): Add expression.
9955 * rtl.h (RTL_CHECKC3): Add macro.
9956 (rtl_check_failed_code3): Add declaration.
9957 (XC3EXP): Add macro.
9959 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
9962 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
9963 cfun->machine->max_used_stack_alignment if needed.
9965 2018-08-04 Martin Sebor <msebor@redhat.com>
9967 PR tree-optimization/86571
9968 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
9971 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
9974 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9977 2018-08-03 Jeff Law <law@redhat.com>
9980 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9981 Define to speculation_safe_value_not_needed.
9983 2018-08-03 David Malcolm <dmalcolm@redhat.com>
9985 * doc/gcov.texi (-x): Remove duplicate "to".
9986 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
9987 (-Wif-not-aligned): Remove duplicate "is".
9988 (-flto): Remove duplicate "the".
9989 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
9990 duplicate "v5.00.b".
9991 (MSP430 Options): Remove duplicate "and" from the description
9992 of "-mgprel-sec=regexp".
9993 (x86 Options): Remove duplicate copies of "vmldLog102" and
9994 vmlsLog104 from description of "-mveclibabi=type".
9996 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
9998 * internal-fn.h (first_commutative_argument): Declare.
9999 * internal-fn.c (first_commutative_argument): New function.
10000 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
10001 restrictions for pattern statements. Use first_commutative_argument
10002 to look for commutative operands in calls to internal functions.
10004 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
10006 * Makefile.in (wide-int-range.o): New.
10007 * tree-vrp.c: Move all the wide_int_* functions to...
10008 * wide-int-range.cc: ...here.
10009 * tree-vrp.h: Move all the wide_int_* prototypes to...
10010 * wide-int-range.h: ...here.
10012 2018-08-03 Tom de Vries <tdevries@suse.de>
10014 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
10016 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
10017 * except.c (output_function_exception_table): Do early exit if
10018 targetm_common.except_unwind_info (&global_options) == UI_NONE.
10020 2018-08-03 Martin Liska <mliska@suse.cz>
10022 * predict.c (dump_prediction): Change to 2 digits
10025 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
10027 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
10029 (falkor_am_1_gtov_gtov): ... a new insn reservation.
10031 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
10033 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
10034 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
10035 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
10036 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
10037 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
10039 2018-08-02 David Malcolm <dmalcolm@redhat.com>
10041 * diagnostic-show-locus.c (diagnostic_show_locus): Use
10042 pp_take_prefix when saving the existing prefix.
10043 * diagnostic.c (diagnostic_append_note): Likewise.
10044 * langhooks.c (lhd_print_error_function): Likewise.
10045 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
10046 param's type. Free the existing prefix.
10047 (pp_take_prefix): New function.
10048 (pretty_printer::pretty_printer): Drop the prefix parameter.
10049 Rename the length parameter to match the comment.
10050 (pretty_printer::~pretty_printer): Free the prefix.
10051 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
10053 (struct pretty_printer): Drop the "const" from "prefix" field's
10054 type and clarify memory management.
10055 (pp_set_prefix): Drop the "const" from the 2nd param.
10056 (pp_take_prefix): New decl.
10058 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
10060 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
10061 for word_mode_ok here instead of passing as argument.
10062 (expand_block_compare): Change select_block_compare_mode() call.
10063 (expand_strncmp_gpr_sequence): New function.
10064 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
10066 2018-08-02 Jeff Law <law@redhat.com>
10069 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10070 Define to speculation_safe_value_not_needed.
10073 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10074 Define to speculation_safe_value_not_needed.
10076 2018-08-02 Tom de Vries <tdevries@suse.de>
10079 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
10080 function. Return UI_TARGET unconditionally.
10081 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
10082 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
10084 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10086 * genemit.c (print_overload_test): Fix typo.
10088 2018-08-02 Richard Biener <rguenther@suse.de>
10090 PR tree-optimization/86816
10091 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
10092 which checks for value availability before querying it.
10093 (gvn_uses_equal): Use it.
10094 (same_succ_hash): Likewise.
10095 (gimple_equal_p): Likewise.
10097 2018-08-02 Nick Clifton <nickc@redhat.com>
10100 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10101 Define to speculation_safe_value_not_needed.
10104 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10105 Define to speculation_safe_value_not_needed.
10108 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10109 Define to speculation_safe_value_not_needed.
10112 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10113 Define to speculation_safe_value_not_needed.
10116 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10117 Define to speculation_safe_value_not_needed.
10120 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10121 Define to speculation_safe_value_not_needed.
10124 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10125 Define to speculation_safe_value_not_needed.
10128 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10129 Define to speculation_safe_value_not_needed.
10132 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10133 speculation_safe_value_not_needed.
10136 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
10137 to speculation_safe_value_not_needed.
10139 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10141 * doc/md.texi: Expand the documentation of instruction names
10142 to mention port-local uses. Document '@' in pattern names.
10143 * read-md.h (overloaded_instance, overloaded_name): New structs.
10144 (mapping): Declare.
10145 (md_reader::handle_overloaded_name): New member function.
10146 (md_reader::get_overloads): Likewise.
10147 (md_reader::m_first_overload): New member variable.
10148 (md_reader::m_next_overload_ptr): Likewise.
10149 (md_reader::m_overloads_htab): Likewise.
10150 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
10151 m_next_overload_ptr and m_overloads_htab.
10152 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
10153 (get_mode_token, get_code_token, get_int_token): New functions.
10154 (map_attr_string): Add an optional argument that passes back
10155 the associated iterator.
10156 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
10157 (md_reader::handle_overloaded_name, add_overload_instance): New
10159 (apply_iterators): Handle '@' names. Report an error if '@'
10160 is used without iterators.
10161 (initialize_iterators): Initialize the new iterator_group fields.
10162 * genopinit.c (handle_overloaded_code_for)
10163 (handle_overloaded_gen): New functions.
10164 (main): Use them to print declarations of maybe_code_for_* and
10165 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
10166 * genemit.c (print_overload_arguments, print_overload_test)
10167 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
10168 (main): Use it to print definitions of maybe_code_for_* and
10169 maybe_gen_* functions.
10170 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
10171 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
10172 instead of explicit mode checks.
10173 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
10174 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
10175 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
10176 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
10177 (aarch64_expand_compare_and_swap): Likewise
10178 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
10179 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
10180 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
10181 (aarch64_constant_pool_reload_icode): Delete.
10182 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
10183 instead of aarch64_constant_pool_reload_icode. Use
10184 code_for_aarch64_reload_mov instead of explicit mode checks.
10185 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
10186 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
10187 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
10188 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
10189 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
10190 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
10191 (aarch64_atomic_load_op_code): Delete.
10192 (aarch64_emit_atomic_load_op): Likewise.
10193 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
10194 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
10195 instead of aarch64_emit_atomic_load_op.
10196 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
10197 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
10198 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
10199 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
10200 character before the pattern name.
10201 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
10202 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
10203 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
10204 (aarch64_frecps<mode>): Likewise.
10205 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
10206 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
10207 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
10208 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
10209 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
10211 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10213 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
10214 Allow HFmode constants if TARGET_FP_F16INST.
10216 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
10219 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
10220 No longer check last store for clobber of address register.
10222 2018-08-02 Martin Liska <mliska@suse.cz>
10224 PR gcov-profile/86817
10225 * gcov.c (process_all_functions): New function.
10227 (process_file): Move functions processing to
10228 process_all_functions.
10230 2018-08-02 David Malcolm <dmalcolm@redhat.com>
10232 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
10233 "const" to the "gimple *" and "rtx_insn *" parameters.
10234 * dumpfile.h (dump_user_location_t::dump_user_location_t):
10236 (dump_location_t::dump_location_t): Likewise.
10238 2018-08-01 Martin Sebor <msebor@redhat.com>
10240 PR tree-optimization/86650
10241 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
10242 rather than a "gcall *". Directly pass the data of interest
10243 to percent_K_format, rather than building a temporary CALL_EXPR
10245 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
10246 (gimple_fold_builtin_strncat): Adjust.
10247 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
10248 gcall* argument with gimple*.
10249 * gimple-ssa-warn-restrict.c (check_call): Same.
10250 (wrestrict_dom_walker::before_dom_children): Same.
10251 (builtin_access::builtin_access): Same.
10252 (check_bounds_or_overlap): Same
10253 (maybe_diag_overlap): Same.
10254 (maybe_diag_offset_bounds): Same.
10255 * tree-diagnostic.c (default_tree_printer): Move usage of
10256 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
10258 * tree-pretty-print.c (percent_K_format): Add argument.
10259 * tree-pretty-print.h: Add argument.
10260 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
10261 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
10262 (maybe_diag_stxncpy_trunc): Same.
10263 (handle_builtin_stxncpy): Same.
10264 (handle_builtin_strcat): Same.
10266 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10268 * match.pd: Optimise pointer range checks.
10270 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10272 PR tree-optimization/86758
10273 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
10274 to remove pattern statements.
10276 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10278 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
10279 result of dfs_enumerate_from when constructing stmt_vec_infos,
10280 instead of additionally calling get_loop_body.
10282 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10284 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
10286 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
10287 When creating an iv, assert that the step is not known to be zero.
10288 (vect_setup_realignment): Update call accordingly.
10289 * tree-vect-stmts.c (vectorizable_store): Likewise.
10290 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
10292 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10294 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
10295 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
10296 (vectorizable_reduction): Likewise.
10297 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10298 (vect_detect_hybrid_slp_stmts): Likewise.
10299 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10301 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
10303 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
10304 (wide_int_set_zero_nonzero_bits): ...this.
10305 (zero_nonzero_bits_from_vr): Rename to...
10306 (vrp_set_zero_nonzero_bits): ...this.
10307 (extract_range_from_multiplicative_op_1): Abstract wide int
10309 (wide_int_range_multiplicative_op): ...here.
10310 (extract_range_from_binary_expr_1): Extract wide int binary
10311 operations into their own functions.
10312 (wide_int_range_lshift): New.
10313 (wide_int_range_can_optimize_bit_op): New.
10314 (wide_int_range_shift_undefined_p): New.
10315 (wide_int_range_bit_xor): New.
10316 (wide_int_range_bit_ior): New.
10317 (wide_int_range_bit_and): New.
10318 (wide_int_range_trunc_mod): New.
10319 (extract_range_into_wide_ints): New.
10320 (vrp_shift_undefined_p): New.
10321 (extract_range_from_multiplicative_op): New.
10322 (vrp_can_optimize_bit_op): New.
10323 * tree-vrp.h (value_range::dump): New.
10324 (wide_int_range_multiplicative_op): New.
10325 (wide_int_range_lshift):New.
10326 (wide_int_range_shift_undefined_p): New.
10327 (wide_int_range_bit_xor): New.
10328 (wide_int_range_bit_ior): New.
10329 (wide_int_range_bit_and): New.
10330 (wide_int_range_trunc_mod): New.
10331 (zero_nonzero_bits_from_bounds): Rename to...
10332 (wide_int_set_zero_nonzero_bits): ...this.
10333 (zero_nonzero_bits_from_vr): Rename to...
10334 (vrp_set_zero_nonzero_bits): ...this.
10335 (range_easy_mask_min_max): Rename to...
10336 (wide_int_range_can_optimize_bit_op): this.
10337 * vr-values.c (simplify_bit_ops_using_ranges): Rename
10338 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
10340 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10342 * tree-vectorizer.h (vect_orig_stmt): New function.
10343 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
10344 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
10345 (vect_create_epilog_for_reduction): Likewise.
10346 (vectorizable_live_operation): Likewise.
10347 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10348 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
10349 * tree-vect-stmts.c (vectorizable_call): Likewise.
10350 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
10352 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10354 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
10356 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
10357 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
10358 (vect_transform_loop): Likewise.
10359 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10361 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10363 * tree-vectorizer.h (vect_schedule_slp): Return void.
10364 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10365 (vect_schedule_slp): Likewise.
10367 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10369 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
10371 (vect_transform_loop): Update calls accordingly. Schedule SLP
10372 instances before the main loop, if any exist.
10374 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10376 PR tree-optimization/86749
10377 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
10378 If the lhs is used in a COND_EXPR, check that it is being used
10379 as the "then" or "else" value.
10381 2018-08-01 Tom de Vries <tdevries@suse.de>
10384 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10385 speculation_safe_value_not_needed.
10387 2018-08-01 Richard Biener <rguenther@suse.de>
10389 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
10390 as base and offset.
10392 2018-08-01 Martin Liska <mliska@suse.cz>
10394 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
10395 format how successful transformation is dumped.
10396 (gimple_mod_pow2_value_transform): Likewise.
10397 (gimple_mod_subtract_transform): Likewise.
10398 (gimple_stringops_transform): Likewise.
10400 2018-08-01 Martin Liska <mliska@suse.cz>
10402 PR value-prof/35543
10403 * value-prof.c (interesting_stringop_to_profile_p):
10404 Simplify the code and add BUILT_IN_MEMMOVE.
10405 (gimple_stringops_transform): Likewise.
10407 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
10409 * config/aarch64/aarch64-simd.md
10410 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
10411 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
10412 use GPI iterator instead of SI mode.
10414 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10416 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
10417 rs6000_speculation_barrier.
10418 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
10419 new barrier pattern name.
10421 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10423 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
10424 (speculation_barrier): New insn.
10426 2018-08-01 Richard Biener <rguenther@suse.de>
10429 * graphite.h: Include isl/id.h and isl/space.h to allow build
10432 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
10435 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10436 mode for COFF targets.
10437 * defaults.h (TARGET_COFF): Define.
10438 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
10439 TARGET_COFF): Define.
10440 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
10441 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
10442 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
10444 2018-07-31 Alexandre Oliva <oliva@adacore.com>
10446 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
10447 * gimple-streamer-out.c (output_bb): Save it.
10448 * lto-streamer-in.c (input_struct_function_base): Restore
10449 instance discriminator if available. Create map on demand.
10450 * lto-streamer-out.c (output_struct_function_base): Save it if
10452 * final.c (decl_to_instance_map): Document LTO strategy.
10454 2018-07-31 Alexandre Oliva <oliva@adacore.com>
10455 Olivier Hainque <hainque@adacore.com>
10457 * debug.h (decl_to_instance_map_t): New type.
10458 (decl_to_instance_map): Declare.
10459 (maybe_create_decl_to_instance_map): New inline function.
10460 * final.c (bb_discriminator, last_bb_discriminator): New statics,
10461 to track basic block discriminators.
10462 (final_start_function_1): Initialize them.
10463 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
10465 (decl_to_instance_map): New variable.
10466 (map_decl_to_instance, maybe_set_discriminator): New functions.
10467 (notice_source_line): Set discriminator.
10469 2018-07-31 Ian Lance Taylor <iant@golang.org>
10471 * targhooks.c (default_have_speculation_safe_value): Add
10474 2018-07-31 David Malcolm <dmalcolm@redhat.com>
10476 * dump-context.h: Include "pretty-print.h".
10477 (dump_context::refresh_dumps_are_enabled): New decl.
10478 (dump_context::emit_item): New decl.
10479 (class dump_context): Add fields "m_test_pp" and
10481 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10482 (temp_dump_context::get_dumped_text): New decl.
10483 (class temp_dump_context): Add field "m_pp".
10484 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
10485 (dump_context::refresh_dumps_are_enabled): ...and add a test for
10487 (set_dump_file): Update for above change.
10488 (set_alt_dump_file): Likewise.
10489 (dump_loc): New overload, taking a pretty_printer *.
10490 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
10491 to any test pretty-printer.
10492 (make_item_for_dump_gimple_stmt): New function, adapted from
10493 optinfo::add_gimple_stmt.
10494 (dump_context::dump_gimple_stmt): Call it, and use the result,
10495 eliminating the direct usage of dump_file and alt_dump_file in
10496 favor of indirectly using them via emit_item.
10497 (make_item_for_dump_gimple_expr): New function, adapted from
10498 optinfo::add_gimple_expr.
10499 (dump_context::dump_gimple_expr): Call it, and use the result,
10500 eliminating the direct usage of dump_file and alt_dump_file in
10501 favor of indirectly using them via emit_item.
10502 (make_item_for_dump_generic_expr): New function, adapted from
10504 (dump_context::dump_generic_expr): Call it, and use the result,
10505 eliminating the direct usage of dump_file and alt_dump_file in
10506 favor of indirectly using them via emit_item.
10507 (make_item_for_dump_printf_va): New function, adapted from
10508 optinfo::add_printf_va.
10509 (make_item_for_dump_printf): New function.
10510 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
10511 and use the result, eliminating the direct usage of dump_file and
10512 alt_dump_file in favor of indirectly using them via emit_item.
10513 (make_item_for_dump_dec): New function.
10514 (dump_context::dump_dec): Call it, and use the result,
10515 eliminating the direct usage of dump_file and alt_dump_file in
10516 favor of indirectly using them via emit_item.
10517 (make_item_for_dump_symtab_node): New function, adapted from
10518 optinfo::add_symtab_node.
10519 (dump_context::dump_symtab_node): Call it, and use the result,
10520 eliminating the direct usage of dump_file and alt_dump_file in
10521 favor of indirectly using them via emit_item.
10522 (dump_context::begin_scope): Reimplement, avoiding direct usage
10523 of dump_file and alt_dump_file in favor of indirectly using them
10525 (dump_context::emit_item): New member function.
10526 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10527 Set up test pretty-printer on the underlying context. Call
10528 refresh_dumps_are_enabled.
10529 (temp_dump_context::~temp_dump_context): Call
10530 refresh_dumps_are_enabled.
10531 (temp_dump_context::get_dumped_text): New member function.
10532 (selftest::verify_dumped_text): New function.
10533 (ASSERT_DUMPED_TEXT_EQ): New macro.
10534 (selftest::test_capture_of_dump_calls): Run all tests twice, with
10535 and then without optinfo enabled. Add uses of
10536 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
10537 * dumpfile.h: Update comment for the dump_* API.
10538 * optinfo-emit-json.cc
10539 (selftest::test_building_json_from_dump_calls): Update for new
10540 param for temp_dump_context ctor.
10541 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
10542 and "m_owned" field.
10543 (optinfo_item::~optinfo_item): Likewise.
10544 (optinfo::add_item): New member function.
10545 (optinfo::emit): Update comment.
10546 (optinfo::add_string): Delete.
10547 (optinfo::add_printf): Delete.
10548 (optinfo::add_printf_va): Delete.
10549 (optinfo::add_gimple_stmt): Delete.
10550 (optinfo::add_gimple_expr): Delete.
10551 (optinfo::add_tree): Delete.
10552 (optinfo::add_symtab_node): Delete.
10553 (optinfo::add_dec): Delete.
10554 * optinfo.h (class dump_context): New forward decl.
10555 (optinfo::add_item): New decl.
10556 (optinfo::add_string): Delete.
10557 (optinfo::add_printf): Delete.
10558 (optinfo::add_printf_va): Delete.
10559 (optinfo::add_gimple_stmt): Delete.
10560 (optinfo::add_gimple_expr): Delete.
10561 (optinfo::add_tree): Delete.
10562 (optinfo::add_symtab_node): Delete.
10563 (optinfo::add_dec): Delete.
10564 (optinfo::add_poly_int): Delete.
10565 (optinfo_item::optinfo_item): Remove "owned" param.
10566 (class optinfo_item): Remove field "m_owned".
10568 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10570 PR middle-end/86705
10571 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
10572 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
10573 requested variable alignment.
10574 (expand_one_ssa_partition): Likewise.
10575 (expand_one_var): Likewise.
10577 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10579 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
10580 to speculation_safe_value_not_needed.
10582 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10584 * targhooks.h (speculation_safe_value_not_needed): New prototype.
10585 * targhooks.c (speculation_safe_value_not_needed): New function.
10586 * target.def (have_speculation_safe_value): Update documentation.
10587 * doc/tm.texi: Regenerated.
10589 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10591 * config/aarch64/iterators.md (ALLI_TI): New iterator.
10592 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
10594 (despeculate_copy<ALLI:mode>_insn): New insn.
10595 (despeculate_copyti_insn): New insn.
10596 (despeculate_simple<ALLI:mode>): New insn
10597 (despeculate_simpleti): New insn.
10598 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
10600 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
10601 aarch64_speculation_safe_value.
10602 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
10604 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10606 * config/aarch64/aarch64-speculation.cc: New file.
10607 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
10608 before pass_reorder_blocks.
10609 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
10611 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
10612 X14 and X15 when tracking speculation.
10613 * config/aarch64/aarch64.md (register name constants): Add
10614 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
10615 (unspec): Add UNSPEC_SPECULATION_TRACKER.
10616 (speculation_barrier): New insn attribute.
10617 (cmp<mode>): Allow SP in comparisons.
10618 (speculation_tracker): New insn.
10619 (speculation_barrier): Add speculation_barrier attribute.
10620 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
10621 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
10622 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
10624 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10626 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
10627 aarch64_track_speculation is true.
10628 (tb<optab><mode>1): Likewise.
10629 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
10630 generate CB[N]Z when tracking speculation.
10631 (aarch64_split_compare_and_swap): Likewise.
10632 (aarch64_split_atomic_op): Likewise.
10634 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10636 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
10638 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10640 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
10641 (speculation_barrier): New insn.
10643 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10645 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
10646 * config/arm/arm.md (speculation_barrier): New expand.
10647 (speculation_barrier_insn): New pattern.
10649 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10651 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
10652 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
10653 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
10654 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
10656 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
10657 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
10658 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
10659 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
10660 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
10661 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
10662 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
10663 * builtins.c (expand_speculation_safe_value): New function.
10664 (expand_builtin): Call it.
10665 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
10666 * doc/extend.texi: Document __builtin_speculation_safe_value.
10667 * doc/md.texi: Document "speculation_barrier" pattern.
10668 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
10669 TARGET_HAVE_SPECULATION_SAFE_VALUE.
10670 * doc/tm.texi: Regenerated.
10671 * target.def (have_speculation_safe_value, speculation_safe_value): New
10673 * targhooks.c (default_have_speculation_safe_value): New function.
10674 (default_speculation_safe_value): New function.
10675 * targhooks.h (default_have_speculation_safe_value): Add prototype.
10676 (default_speculation_safe_value): Add prototype.
10678 2018-07-31 David Malcolm <dmalcolm@redhat.com>
10680 * dump-context.h (dump_context::dump_loc): New decl.
10681 * dumpfile.c (dump_context::dump_loc): New member function.
10682 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
10683 and dump_gimple_stmt.
10684 (dump_context::dump_gimple_expr_loc): Likewise, using
10686 (dump_context::dump_generic_expr_loc): Likewise, using
10688 (dump_context::dump_printf_loc_va): Likewise, using
10690 (dump_context::begin_scope): Explicitly using the global function
10691 "dump_loc", rather than the member function.
10693 2018-07-31 Martin Sebor <msebor@redhat.com>
10695 PR tree-optimization/86741
10696 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
10698 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
10700 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
10701 depend on whether prefetch instructions will be emitted or not.
10702 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
10703 will be emitted or not.
10704 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
10705 (TARGET_SETMEM_PFD): New macros.
10707 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10709 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
10710 (NULL_STMT_VEC_INFO): Delete.
10711 (stmt_vec_info::operator*): Likewise.
10712 (stmt_vec_info::operator gimple *): Likewise.
10713 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
10714 of NULL_STMT_VEC_INFO.
10715 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10716 (vect_reassociating_reduction_p): Likewise.
10717 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10718 (vectorizable_store): Likewise.
10719 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
10720 (vec_info::free_stmt_vec_infos): Likewise.
10722 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10724 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
10725 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
10727 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10729 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
10730 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10731 (vec_info::free_stmt_vec_info): New private member functions.
10732 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
10733 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
10734 * tree-parloops.c (gather_scalar_reductions): Remove calls to
10735 set_stmt_vec_info_vec and free_stmt_vec_infos.
10736 * tree-vect-loop.c (_loop_vec_info): Remove call to
10737 set_stmt_vec_info_vec.
10738 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
10739 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
10740 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
10741 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10742 (vec_info::free_stmt_vec_info): ...these new functions. Remove
10743 assignments in {vec_info::,}new_stmt_vec_info that are redundant
10744 with the clearing in the xcalloc.
10745 (stmt_vec_info_vec): Delete.
10746 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
10747 (vectorize_loops): Likewise.
10748 (vec_info::~vec_info): Remove argument from call to
10749 free_stmt_vec_infos.
10750 (vec_info::add_stmt): Remove vinfo argument from call to
10753 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10755 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
10756 rather than a gimple stmt.
10757 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
10758 information for pattern statements when passed the original
10759 statement; instead wait to be passed the pattern statement itself.
10760 Don't call set_vinfo_for_stmt here.
10761 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
10762 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
10763 stmt_vec_infos here.
10764 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
10765 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
10766 stmt_vec_infos entry.
10768 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10770 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
10771 * tree-vectorizer.c (vec_info::replace_stmt): New function.
10772 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
10773 * tree-vect-stmts.c (vectorizable_call): Likewise.
10774 (vectorizable_simd_clone_call): Likewise.
10776 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10778 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
10779 * tree-vectorizer.c (vec_info::remove_stmt): New function.
10780 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
10781 * tree-vect-loop.c (vect_transform_loop): Likewise.
10782 * tree-vect-slp.c (vect_schedule_slp): Likewise.
10783 * tree-vect-stmts.c (vect_remove_stores): Likewise.
10785 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10787 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
10788 (vect_dr_stmt): Delete.
10789 * tree-vectorizer.c (vec_info::lookup_dr): New function.
10790 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
10792 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
10793 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
10794 (vect_verify_datarefs_alignment, vect_peeling_supportable)
10795 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10796 (vect_analyze_data_refs): Likewise.
10797 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
10799 (vect_find_same_alignment_drs): Likewise.
10800 (vect_slp_analyze_node_dependences): Update calls accordingly.
10801 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
10802 instead of DR_VECT_AUX.
10803 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
10804 of a vector data references. Use vec_info::lookup_dr instead of
10806 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
10807 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
10808 instead of DR_VECT_AUX.
10810 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10812 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
10814 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10816 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10817 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10818 (vect_gen_prolog_loop_niters): Likewise.
10820 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10822 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
10823 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
10824 (vect_known_alignment_in_bytes, vect_dr_behavior)
10825 (vect_get_scalar_dr_size): Take references as dr_vec_infos
10826 instead of data_references. Update calls to other routines for
10827 which the same change has been made.
10828 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
10829 dr_vec_infos instead of stmt_vec_infos.
10830 (vect_analyze_data_ref_dependence): Update call accordingly.
10831 (vect_slp_analyze_data_ref_dependence)
10832 (vect_record_base_alignments): Use DR_VECT_AUX.
10833 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
10834 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
10835 (vector_alignment_reachable_p, vect_get_data_access_cost)
10836 (vect_peeling_supportable, vect_analyze_group_access_1)
10837 (vect_analyze_group_access, vect_analyze_data_ref_access)
10838 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
10839 (vect_compile_time_alias, vect_small_gap_p)
10840 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
10841 (vect_supportable_dr_alignment): Take references as dr_vec_infos
10842 instead of data_references. Update calls to other routines for
10843 which the same change has been made.
10844 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
10845 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10846 (vect_slp_analyze_and_verify_node_alignment)
10847 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10848 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10849 (vect_setup_realignment): Use dr_vec_infos. Update calls after
10851 (_vect_peel_info::dr): Replace with...
10852 (_vect_peel_info::dr_info): ...this new field.
10853 (vect_peeling_hash_get_most_frequent)
10854 (vect_peeling_hash_choose_best_peeling): Update accordingly.
10855 (vect_peeling_hash_get_lowest_cost):
10856 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
10857 routines for which the same change has been made.
10858 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
10860 * tree-vect-loop-manip.c (get_misalign_in_elems)
10861 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
10863 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10864 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
10865 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
10866 (get_group_load_store_type, get_negative_load_store_type)
10867 (vect_get_data_ptr_increment, vectorizable_store)
10868 (vectorizable_load): Likewise.
10869 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
10870 Update calls to other routines for which the same change has been made.
10872 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10874 * tree-vectorizer.h (vec_info::move_dr): New member function.
10875 (dataref_aux): Rename to...
10876 (dr_vec_info): ...this and add "dr" and "stmt" fields.
10877 (_stmt_vec_info::dr_aux): Update accordingly.
10878 (_stmt_vec_info::data_ref_info): Delete.
10879 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
10880 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
10881 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
10882 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
10884 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
10885 (STMT_VINFO_DR_INFO): New macro.
10886 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
10887 (set_dr_misalignment): Update after rename of dataref_aux.
10888 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
10889 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
10890 initialization of STMT_VINFO_DATA_REF.
10891 * tree-vectorizer.c (vec_info::move_dr): New function.
10892 * tree-vect-patterns.c (vect_recog_bool_pattern)
10893 (vect_recog_mask_conversion_pattern)
10894 (vect_recog_gather_scatter_pattern): Use it.
10895 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
10896 the "dr" and "stmt" fields of dr_vec_info instead of
10897 STMT_VINFO_DATA_REF.
10899 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10901 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
10902 (is_pattern_stmt_p): Use it.
10903 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
10904 on pattern statements.
10906 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10908 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
10909 original stmt as a stmt_vec_info rather than a gimple stmt.
10910 (vect_pattern_recog_1): Take the statement directly as a
10911 stmt_vec_info, rather than via a gimple_stmt_iterator.
10912 Update call to vect_mark_pattern_stmts.
10913 (vect_pattern_recog): Update calls accordingly.
10915 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10917 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
10918 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
10919 a vect_def_type for the first argument.
10920 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
10921 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
10922 operand if it isn't defined by a vectorized statement.
10923 (vect_build_gather_load_calls): Remove the mask_dt argument and
10924 update calls to vect_get_vec_def_for_stmt_copy.
10925 (vectorizable_bswap): Likewise the dt argument.
10926 (vectorizable_call): Update calls to vectorizable_bswap and
10927 vect_get_vec_def_for_stmt_copy.
10928 (vectorizable_simd_clone_call, vectorizable_assignment)
10929 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
10930 (vectorizable_comparison): Update calls to
10931 vect_get_vec_def_for_stmt_copy.
10932 (vectorizable_store): Likewise. Remove now-unnecessary calls to
10933 vect_is_simple_use.
10934 (vect_get_loop_based_defs): Remove dt argument and update call
10935 to vect_get_vec_def_for_stmt_copy.
10936 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
10937 and vect_get_vec_def_for_stmt_copy.
10938 (vectorizable_load): Update calls to vect_build_gather_load_calls
10939 and vect_get_vec_def_for_stmt_copy.
10940 * tree-vect-loop.c (vect_create_epilog_for_reduction)
10941 (vectorizable_reduction, vectorizable_live_operation): Update calls
10942 to vect_get_vec_def_for_stmt_copy.
10944 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10946 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
10947 and gimple stmt arguments with a stmt_vec_info.
10948 (vect_record_base_alignments): Update calls accordingly.
10949 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
10950 and gimple stmt arguments with a stmt_vec_info.
10951 (vect_build_slp_tree_1): Remove vinfo argument and update call
10952 to vect_record_max_nunits.
10953 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
10954 and vect_record_max_nunits.
10956 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10958 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
10959 file and take a stmt_vec_info instead of a gimple stmt.
10960 (supportable_widening_operation, vect_finish_replace_stmt)
10961 (vect_finish_stmt_generation, vect_get_store_rhs)
10962 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
10963 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
10964 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
10965 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
10966 (vect_create_data_ref_ptr, bump_vector_ptr)
10967 (vect_permute_store_chain, vect_setup_realignment)
10968 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
10969 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
10970 (vectorizable_reduction, vectorizable_induction)
10971 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
10972 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
10973 than gimple stmts as arguments.
10974 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
10975 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
10976 (can_group_stmts_p, vect_check_gather_scatter)
10977 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10978 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
10979 (vect_permute_load_chain, vect_shift_permute_load_chain)
10980 (vect_transform_grouped_load)
10981 (vect_record_grouped_load_vectors): Likewise.
10982 * tree-vect-loop.c (vect_fixup_reduc_chain)
10983 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
10984 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
10985 (vectorizable_reduction, vectorizable_induction)
10986 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
10987 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
10988 (vect_get_load_store_mask): Likewise.
10989 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
10990 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
10991 * tree-vect-stmts.c (vect_mark_relevant)
10992 (is_simple_and_all_uses_invariant)
10993 (exist_non_indexing_operands_for_use_p, process_use)
10994 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
10995 (vect_get_vec_def_for_operand, vect_get_vec_defs)
10996 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
10997 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
10998 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
10999 (get_negative_load_store_type, get_load_store_type)
11000 (vect_check_load_store_mask, vect_check_store_rhs)
11001 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
11002 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11003 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11004 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11005 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
11006 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
11007 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
11008 (supportable_widening_operation): Likewise.
11010 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11012 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
11013 a stmt_vec_info instead of a gcall.
11014 (vect_check_gather_scatter): Update call accordingly.
11015 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
11017 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
11018 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
11019 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
11020 instead of a gimple stmt.
11021 (vect_transform_loop): Update calls accordingly.
11022 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
11023 stmt_vec_infos instead of gimple stmts.
11024 (vect_analyze_slp_instance): Update use accordingly.
11025 * tree-vect-stmts.c (read_vector_array, write_vector_array)
11026 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
11027 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
11028 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
11029 (vect_gen_widened_results_half, vect_get_loop_based_defs)
11030 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
11031 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
11032 down to subroutines.
11034 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11036 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
11037 of the worklist from a vector of gimple stmts to a vector of
11039 * tree-vect-stmts.c (vect_mark_relevant, process_use)
11040 (vect_mark_stmts_to_be_vectorized): Likewise
11042 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11044 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
11045 statement before passing it to vect_analyze_stmt.
11046 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
11047 the chain of phi vector definitions. Track the exit phi via its
11049 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
11050 STMT_VINFO_REDUC_DEF.
11051 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
11052 stmt_vec_infos to handle the statement chains.
11053 (vect_get_slp_defs): Record the first statement in the node
11054 using a stmt_vec_info.
11055 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
11056 statements here and pass their stmt_vec_info down to subroutines.
11057 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
11058 down to vect_finish_stmt_generation.
11059 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
11060 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
11061 stmt_vec_infos to subroutines.
11062 (vect_remove_stores): Use stmt_vec_infos to handle the statement
11065 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11067 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
11068 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
11069 (vect_permute_store_chain, vect_setup_realignment)
11070 (vect_permute_load_chain, vect_shift_permute_load_chain)
11071 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
11072 stmts internally, and when passing values to other vectorizer routines.
11073 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11074 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
11075 (vect_analyze_loop_operations, get_initial_def_for_reduction)
11076 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
11077 (vectorizable_reduction, vectorizable_induction)
11078 (vectorizable_live_operation, vect_transform_loop_stmt)
11079 (vect_transform_loop): Likewise.
11080 * tree-vect-patterns.c (vect_reassociating_reduction_p)
11081 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
11082 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
11083 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11084 (vect_slp_analyze_node_operations_1): Likewise.
11085 * tree-vect-stmts.c (vect_mark_relevant, process_use)
11086 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
11087 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
11088 (vect_finish_stmt_generation_1, get_group_load_store_type)
11089 (get_load_store_type, vect_build_gather_load_calls)
11090 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11091 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11092 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11093 (vectorizable_store, vectorizable_load, vectorizable_condition)
11094 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
11095 (supportable_widening_operation): Likewise.
11096 (vect_get_vector_types_for_stmt): Likewise.
11097 * tree-vectorizer.h (vect_dr_behavior): Likewise.
11099 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11101 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11102 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
11103 (vect_permute_store_chain, vect_permute_load_chain)
11104 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
11105 repeated stmt_vec_info lookups.
11106 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11107 (vect_update_ivs_after_vectorizer): Likewise.
11108 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
11109 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11110 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
11111 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11112 (vect_bb_slp_scalar_cost): Likewise.
11113 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
11115 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11117 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
11118 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
11119 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
11120 to get gassigns and gcalls, rather than operating on generc gimple
11122 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
11123 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
11124 (vectorizable_load, vect_analyze_stmt): Likewise.
11125 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
11127 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11129 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
11130 return stmt_vec_infos rather than gimple stmts. Do not accept
11132 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
11134 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11135 Update use of get_later_stmt.
11136 (vect_get_constant_vectors): Update call accordingly.
11137 (vect_schedule_slp_instance): Likewise
11138 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
11139 (vect_slp_analyze_instance_dependence): Likewise.
11140 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
11142 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11144 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
11145 (stmt_info_for_cost::stmt_info): ...this new field.
11146 (add_stmt_costs): Update accordingly.
11147 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11148 (vect_get_known_peeling_cost): Likewise.
11149 (vect_estimate_min_profitable_iters): Likewise.
11150 * tree-vect-stmts.c (record_stmt_cost): Likewise.
11152 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11154 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
11155 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11156 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11158 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
11160 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11162 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
11163 a gimple stmt to a stmt_vec_info.
11164 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
11166 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11168 * tree-vectorizer.h (vec_info::grouped_stores): Change from
11169 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11170 (_loop_vec_info::reduction_chains): Likewise.
11171 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
11173 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11175 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11177 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
11178 a gimple stmt to a stmt_vec_info.
11179 (_stmt_vec_info::next_element): Likewise.
11180 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
11181 (vect_slp_analyze_and_verify_node_alignment)
11182 (vect_analyze_group_access_1, vect_analyze_group_access)
11183 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
11184 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
11185 (vect_supportable_dr_alignment): Update accordingly.
11186 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
11187 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
11188 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
11189 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11190 * tree-vect-slp.c (vect_build_slp_tree_1)
11191 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
11192 (vect_split_slp_store_group, vect_analyze_slp_instance)
11193 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
11194 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
11195 (get_group_load_store_type, get_load_store_type)
11196 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
11197 (vect_transform_stmt, vect_remove_stores): Likewise.
11199 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11201 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
11202 than a gimple stmt.
11203 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11204 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
11205 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
11206 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
11207 (vector_alignment_reachable_p, vect_get_data_access_cost)
11208 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
11209 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
11210 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11211 (vect_analyze_group_access_1, vect_analyze_group_access)
11212 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
11213 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
11214 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
11215 result of vect_dr_stmt and use the stmt_vec_info instead of
11216 the associated gimple stmt.
11217 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11218 (vect_gen_prolog_loop_niters): Likewise.
11219 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11221 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11223 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
11224 to a vec<stmt_vec_info>.
11225 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
11226 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
11227 vec<stmt_vec_info>.
11228 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
11229 to a vec<stmt_vec_info>.
11230 (bst_traits::value_type, bst_traits::value_type): Likewise.
11231 (bst_traits::hash): Update accordingly.
11232 (vect_get_and_check_slp_defs): Change the stmts parameter from
11233 a vec<gimple *> to a vec<stmt_vec_info>.
11234 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
11235 (vect_build_slp_tree): Likewise.
11236 (vect_build_slp_tree_2): Likewise. Update uses of
11237 SLP_TREE_SCALAR_STMTS.
11238 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
11239 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
11240 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
11241 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
11242 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
11243 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
11244 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
11245 (vect_get_constant_vectors, vect_get_slp_defs)
11246 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
11247 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
11248 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
11249 instead of gimple stmts.
11250 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
11251 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
11252 (vect_slp_analyze_instance_dependence): Update uses of
11253 SLP_TREE_SCALAR_STMTS.
11254 (vect_slp_analyze_and_verify_node_alignment): Likewise.
11255 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
11256 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
11257 (get_initial_defs_for_reduction): Likewise.
11258 (vect_create_epilog_for_reduction): Likewise.
11259 (vectorize_fold_left_reduction): Likewise.
11260 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
11261 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
11262 (can_vectorize_live_stmts): Likewise.
11264 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11266 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
11267 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11268 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
11270 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
11272 (gather_scalar_reductions): Update after above interface changes.
11273 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
11274 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
11276 (vect_force_simple_reduction): Likewise.
11277 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
11278 LOOP_VINFO_REDUCTIONS.
11279 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11281 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11283 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
11284 a gimple stmt to a stmt_vec_info.
11285 * tree-vect-loop.c (vect_active_double_reduction_p)
11286 (vect_force_simple_reduction, vectorizable_reduction): Update
11289 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11291 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
11292 vec<gimple *> to a vec<stmt_vec_info>.
11293 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
11294 the reduction_phis argument from a vec<gimple *> to a
11295 vec<stmt_vec_info>.
11296 (vectorizable_reduction): Likewise the phis local variable that
11297 is passed to vect_create_epilog_for_reduction. Update for new type
11298 of SLP_TREE_VEC_STMTS.
11299 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
11300 (vectorizable_live_operation): Likewise.
11301 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
11302 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
11304 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11306 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
11307 a gimple stmt to a stmt_vec_info.
11308 (vectorizable_condition, vectorizable_live_operation)
11309 (vectorizable_reduction, vectorizable_induction): Pass back the
11310 vectorized statement as a stmt_vec_info.
11311 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
11312 use of STMT_VINFO_VEC_STMT.
11313 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
11314 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
11315 as stmt_vec_infos rather than gimple stmts.
11316 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
11317 to a stmt_vec_info.
11318 (vectorizable_live_operation): Likewise.
11319 (vectorizable_reduction, vectorizable_induction): Likewise,
11320 updating use of STMT_VINFO_VEC_STMT.
11321 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
11322 of STMT_VINFO_VEC_STMT.
11323 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
11324 (vectorizable_simd_clone_call, vectorizable_conversion)
11325 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11326 (vectorizable_store, vectorizable_load, vectorizable_condition)
11327 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
11328 from a gimple stmt to a stmt_vec_info.
11329 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
11330 pointer to a stmt_vec_info to the vectorizable_* routines.
11332 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11334 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
11335 a gimple stmt to a stmt_vec_info.
11336 (is_pattern_stmt_p): Update accordingly.
11337 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
11338 (vect_record_grouped_load_vectors): Likewise.
11339 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
11340 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
11341 (vect_model_reduction_cost): Likewise.
11342 (vect_create_epilog_for_reduction): Likewise.
11343 (vectorizable_reduction, vectorizable_induction): Likewise.
11344 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11345 Return the stmt_vec_info for the pattern statement.
11346 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
11347 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
11348 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11349 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
11350 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
11351 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
11352 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
11353 (free_stmt_vec_info, vect_is_simple_use): Likewise.
11355 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11357 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
11358 (vect_finish_stmt_generation): Likewise.
11359 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11360 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
11361 (vect_build_gather_load_calls): Use the return value of the above
11362 functions instead of a separate call to vinfo_for_stmt. Use narrow
11363 scopes for the input gimple stmt and wider scopes for the associated
11364 stmt_vec_info. Use vec_info::lookup_def when setting these
11365 stmt_vec_infos from an SSA_NAME definition.
11366 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11367 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11368 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11369 (vectorizable_store, vectorizable_load, vectorizable_condition)
11370 (vectorizable_comparison): Likewise.
11371 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
11372 (vectorizable_reduction): Likewise.
11374 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11376 * tree-vectorizer.h (vect_is_simple_use): Add an optional
11377 stmt_vec_info * parameter before the optional gimple **.
11378 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11379 (process_use, vect_get_vec_def_for_operand_1): Update callers.
11380 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
11381 * tree-vect-loop.c (vectorizable_reduction): Likewise.
11382 (vectorizable_live_operation): Likewise.
11383 * tree-vect-patterns.c (type_conversion_p): Likewise.
11384 (vect_look_through_possible_promotion): Likewise.
11385 (vect_recog_rotate_pattern): Likewise.
11386 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11388 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11390 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
11391 a typedef to a wrapper class.
11392 (NULL_STMT_VEC_INFO): New macro.
11393 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
11394 (stmt_vec_info::operator*): New function.
11395 (stmt_vec_info::operator gimple *): Likewise.
11396 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
11397 (add_stmt_costs): Likewise.
11398 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
11399 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11400 (vect_get_known_peeling_cost): Likewise.
11401 (vect_estimate_min_profitable_iters): Likewise.
11402 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11403 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
11404 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11405 (vectorizable_store, free_stmt_vec_infos): Likewise.
11406 (new_stmt_vec_info): Change return type of xcalloc to
11409 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11411 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
11412 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
11413 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
11414 a single_imm_use-based sequence.
11415 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
11417 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11419 * tree-vectorizer.h (vec_info::lookup_def): Declare.
11420 * tree-vectorizer.c (vec_info::lookup_def): New function.
11421 * tree-vect-patterns.c (vect_get_internal_def): Use it.
11422 (vect_widened_op_tree): Likewise.
11423 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11424 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
11425 (vectorizable_reduction): Likewise.
11426 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
11428 (vect_is_slp_reduction): Update calls accordingly. Use
11429 vec_info::lookup_def.
11430 (vect_is_simple_reduction): Likewise
11431 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
11433 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11435 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
11436 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
11437 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
11439 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
11440 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
11441 (vect_update_vf_for_slp, vect_analyze_loop_operations)
11442 (vect_is_slp_reduction, vectorizable_induction)
11443 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
11444 * tree-vect-patterns.c (vect_init_pattern_stmt):
11445 (vect_determine_min_output_precision_1, vect_determine_precisions)
11446 (vect_pattern_recog): Likewise.
11447 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
11448 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
11449 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
11450 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11451 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
11452 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
11453 info field from a loop to a loop_vec_info.
11455 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11457 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
11458 (vec_info::add_stmt): Declare.
11459 * tree-vectorizer.c (vec_info::add_stmt): New function.
11460 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
11461 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
11462 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11463 (vectorizable_induction): Likewise.
11464 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
11465 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11466 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
11467 (vectorizable_load): Likewise.
11468 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11469 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
11470 (vect_recog_gather_scatter_pattern): Likewise.
11471 (append_pattern_def_seq): Likewise. Remove a check that is
11472 performed by add_stmt itself.
11474 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11476 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
11477 which make_ssa_name was called with new_stmt before new_stmt
11480 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11482 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
11484 (vect_is_slp_reduction): ...here...
11485 (vect_is_simple_reduction): ...and here. Remove repetition of tests
11486 that are already known to be false.
11488 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11490 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
11491 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
11492 STMT_VINFO_NUM_SLP_USES when it's true.
11493 (vect_free_slp_instance): Add a final_p parameter and pass it to
11494 vect_free_slp_tree.
11495 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
11496 (vect_analyze_slp_instance): Likewise.
11497 (vect_slp_analyze_operations): Likewise.
11498 (vect_slp_analyze_bb_1): Likewise.
11499 * tree-vectorizer.c (vec_info): Likewise.
11500 * tree-vect-loop.c (vect_transform_loop): Likewise.
11502 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11504 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11505 function is not called for second and subsequent members of
11508 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11510 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
11511 cases for nested loops from here to ...
11512 (vect_create_epilog_for_reduction): ...here. Only call
11513 vect_is_simple_use for inner-loop reductions.
11515 2018-07-31 Martin Liska <mliska@suse.cz>
11517 PR gcov-profile/85338
11518 PR gcov-profile/85350
11519 PR gcov-profile/85372
11520 * profile.c (struct location_triplet): New.
11521 (struct location_triplet_hash): Likewise.
11522 (output_location): Do not output a BB that
11523 is already recorded for a line.
11524 (branch_prob): Use streamed_locations.
11526 2018-07-31 Martin Liska <mliska@suse.cz>
11528 PR gcov-profile/85370
11529 * coverage.c (coverage_begin_function): Do not mark target
11530 clones as artificial functions.
11532 2018-07-31 Martin Liska <mliska@suse.cz>
11534 PR gcov-profile/83813
11535 PR gcov-profile/84758
11536 PR gcov-profile/85217
11537 PR gcov-profile/85332
11538 * profile.c (branch_prob): Do not record GOTO expressions
11539 for GIMPLE statements which locations are already streamed.
11541 2018-07-31 Olivier Hainque <hainque@adacore.com>
11543 * gcc.c (handle_spec_function): Accept a soft_matched_part
11544 argument, as do_spec_1. Pass it down to ...
11545 (eval_spec_function): Accept a soft_matched_part argument,
11546 and pass it down to ...
11547 (do_spec_2): Accept a soft_matched_part argument, and pass
11548 it down to do_spec_1.
11549 (do_spec_1): Pass soft_matched_part to handle_spec_function.
11550 (handle_braces): Update call to handle_spec_function.
11551 (driver::set_up_specs): Update calls to do_spec_2.
11552 (compare_debug_dump_opt_spec_function): Likewise.
11553 (compare_debug_self_opt_spec_function): Likewise.
11555 2018-07-31 Olivier Hainque <hainque@adacore.com>
11557 * common.opt (nolibc): New option.
11558 * doc/invoke.texi (Link Options): Document it.
11559 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
11560 * config/alpha/linux.h: Likewise.
11561 * config/arc/elf.h: Likewise.
11562 * config/arm/uclinux-elf.h: Likewise.
11563 * config/arm/unknown-elf.h: Likewise.
11564 * config/avr/avrlibc.h: Likewise.
11565 * config/bfin/bfin.h: Likewise.
11566 * config/bfin/linux.h: Likewise.
11567 * config/bfin/uclinux.h: Likewise.
11568 * config/darwin.h: Likewise.
11569 * config/darwin10.h: Likewise.
11570 * config/darwin12.h: Likewise.
11571 * config/gnu-user.h: Likewise.
11572 * config/lm32/uclinux-elf.h: Likewise.
11573 * config/pa/pa-hpux11.h: Likewise.
11574 * config/pa/pa64-hpux.h: Likewise.
11575 * config/sparc/sparc.h: Likewise.
11577 2018-07-31 Olivier Hainque <hainque@adacore.com>
11579 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
11580 undefined variables.
11582 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
11585 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
11586 instead of GEN_INT.
11588 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11590 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
11591 terminated string literal.
11593 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
11595 PR rtl-optimization/85160
11596 * combine.c (is_just_move): New function.
11597 (try_combine): Allow combining two instructions into two if neither of
11598 the original instructions was a move.
11600 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
11603 * doc/extend.texi (Global Register Variables): Discourage use of type
11605 (Local Register Variables): Likewise.
11607 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
11609 PR tree-optimization/86506
11610 * hwint.h (ceil_log2): Resync with hwint.c implementation.
11612 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
11615 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
11616 hard_regno, make sure no insn between `from` and `to` clobbers it.
11618 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
11619 Tom de Vries <tdevries@suse.de>
11621 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
11622 (PTX_DEFAULT_RUNTIME_DIM): ... this.
11623 (nvptx_goacc_validate_dims): Set default worker and gang dims to
11624 PTX_DEFAULT_RUNTIME_DIM.
11625 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
11627 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
11629 * config/pa/pa.c (pa_output_addr_vec): Align address table.
11630 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
11631 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
11633 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
11635 * config/rs6000/constraints.md (wG constraint): Delete, no longer
11637 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
11638 predicate to reflect toc fusion has been deleted.
11639 (toc_fusion_mem_raw): Delete, no longer used.
11640 (toc_fusion_mem_wrapped): Likewise.
11641 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
11643 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
11644 Delete, no longer used.
11645 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
11646 meant to be used for toc fusion.
11647 (rs6000_debug_print_mode): Delete toc fusion debugging.
11648 (rs6000_debug_reg_global): Likewise.
11649 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
11650 fusion and secondary reload support that were never used.
11651 (rs6000_option_override_internal): Delete TOC fusion, that was only
11652 partially defined, and it did not work unless you also used the
11654 (rs6000_legitimate_address_p): Delete TOC fusion support.
11655 (rs6000_opt_masks): Likewise.
11656 (fusion_wrap_memory_address): Delete function, no longer used.
11657 (fusion_split_address); Delete TOC fusion support.
11658 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
11659 longer used with toc fusion being deleted.
11660 (TARGET_TOC_FUSION_FP): Likewise.
11661 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
11663 (toc fusion spliter): Delete TOC fusion support.
11664 (toc_fusionload_<mode>): Likewise.
11665 (toc_fusionload_di): Likewise.
11666 (fusion_gpr_load_<mode>): Delete generator function, this insn no
11667 longer needs to be named. Rename predicate to delete TOC fusion.
11668 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11669 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11670 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11671 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11672 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
11674 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
11676 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
11677 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
11678 __int128 in built-in function prototypes.
11679 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
11680 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
11682 2018-07-27 Martin Sebor <msebor@redhat.com>
11684 PR tree-optimization/86696
11685 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
11686 types, including enums.
11687 (handle_char_store): Be prepared for the above function to fail.
11689 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
11691 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
11692 when optimization level is lower than 2 or optimize for size.
11694 2018-07-26 Martin Sebor <msebor@redhat.com>
11696 PR tree-optimization/86043
11697 PR tree-optimization/86042
11698 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
11699 (get_string_cst_length): Rename...
11700 (get_min_string_length): ...to this. Add argument.
11701 (handle_char_store): Extend to handle multi-character stores by
11703 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
11704 * tree.h (initializer_zerop): Add argument.
11706 2018-07-26 Jakub Jelinek <jakub@redhat.com>
11708 PR middle-end/86660
11709 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
11710 declare target to variables if they have always,{to,from,tofrom} map
11713 2018-07-26 Martin Liska <mliska@suse.cz>
11716 * lto-wrapper.c: Add linker_output as prefix
11717 for ltrans_output_file.
11719 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
11721 PR rtl-optimization/85805
11722 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
11723 value for hard registers if that was written in the same mode.
11725 2018-07-26 Martin Liska <mliska@suse.cz>
11727 PR gcov-profile/86536
11728 * gcov.c (format_gcov): Use printf format %.*f directly
11729 and do not handle special values.
11731 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11733 * common/config/arc/arc-common.c (arc_option_optimization_table):
11734 Update default optimizations for size.
11736 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11738 * config/arc/arc.md (movsf_insn): Add short instruction selection.
11739 * config/arc/constraints.md (CfZ): New constraint.
11740 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
11741 (subsf3_fpu): Likewise.
11742 (cmpsf_fpu): Likewise.
11743 (cmpsf_fpu_uneq): Likewise.
11745 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11747 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
11749 (arc_is_uncached_mem_p): uncached applies to both the variable and
11752 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11754 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
11757 2018-07-25 David Malcolm <dmalcolm@redhat.com>
11759 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
11760 field "m_scopes" from vec to auto_vec.
11762 2018-07-25 Martin Liska <mliska@suse.cz>
11764 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
11767 2018-07-25 Richard Biener <rguenther@suse.de>
11770 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
11771 special wrt context_die late.
11772 (gen_subprogram_die): Re-use DIEs in local scope.
11774 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
11776 PR tree-optimization/86644
11777 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
11779 2018-07-25 Martin Liska <mliska@suse.cz>
11781 PR middle-end/86645
11782 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
11783 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
11785 2018-07-25 Martin Liska <mliska@suse.cz>
11788 * params.def: Explain ASan abbreviation and provide
11789 a documentation link.
11791 2018-07-24 Martin Sebor <msebor@redhat.com>
11793 PR tree-optimization/86622
11794 PR tree-optimization/86532
11795 * builtins.h (string_length): Declare.
11796 * builtins.c (c_strlen): Correct handling of non-constant offsets.
11797 (check_access): Be prepared for non-constant length ranges.
11798 (string_length): Make extern.
11799 * expr.c (string_constant): Only handle the minor non-constant
11800 array index. Use string_constant to compute the length of
11801 a generic string constant.
11803 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
11805 PR tree-optimization/86618
11806 * tree-vect-stmts.c (vectorizable_call): Don't take the address
11807 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
11809 2018-07-24 David Malcolm <dmalcolm@redhat.com>
11811 PR tree-optimization/86636
11812 * json.cc (json::object::set): Fix comment. Add assertions.
11813 (json::array::append): Move here from json.h. Add comment and an
11815 (json::string::string): Likewise.
11816 * json.h (json::array::append): Move to json.cc.
11817 (json::string::string): Likewise.
11818 * optinfo-emit-json.cc
11819 (optrecord_json_writer::impl_location_to_json): Assert that we
11820 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
11821 wrapper around it. Expand the location once, rather than three
11823 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
11824 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
11826 (optrecord_json_writer::optinfo_to_json): Likewise, in four
11827 places. Fix some overlong lines.
11829 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
11831 * config/aarch64/aarch64-simd.md
11832 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
11833 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
11834 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
11835 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
11836 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
11837 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
11838 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
11839 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
11840 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
11842 2018-07-24 Jakub Jelinek <jakub@redhat.com>
11844 PR middle-end/86627
11845 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
11846 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
11847 and abs_d == d, do the power of two handling if profitable.
11849 2018-07-24 Richard Biener <rguenther@suse.de>
11851 * match.pd: Add BIT_FIELD_REF canonicalizations.
11853 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11856 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
11858 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11860 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
11861 terminated STRING_CST object.
11863 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11865 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
11867 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
11869 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
11870 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
11871 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
11872 the elements into a register.
11873 (rs6000_split_v4si_init_di_reg): Delete.
11874 (rs6000_split_v4si_init): Delete.
11875 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
11876 (vsx_init_v4si): Rewrite as a define_expand.
11878 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
11880 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
11881 zero_extend argument from memory): New.
11883 2018-07-22 Martin Sebor <msebor@redhat.com>
11886 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
11887 diagnosing calls with unknown arguments unless -Walloca-larger-than
11888 is restricted to less than PTRDIFF_MAX bytes.
11890 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
11892 * doc/gcov.texi (Invoking Gcov): Editorial changes.
11894 2018-07-20 David Malcolm <dmalcolm@redhat.com>
11896 * pretty-print.c (text_info::set_location): Remove redundant
11897 "line_table" parameter from call to rich_location::set_range.
11899 2018-07-20 Martin Sebor <msebor@redhat.com>
11901 PR middle-end/82063
11902 * builtins.c (expand_builtin_alloca): Adjust.
11903 * calls.c (alloc_max_size): Simplify.
11904 * cgraphunit.c (cgraph_node::expand): Adjust.
11905 * common.opt (larger_than_size, warn_frame_larger_than): Remove
11907 (frame_larger_than_size): Same.
11908 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
11909 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
11911 * doc/invoke.texi (GCC Command Options): Document option arguments.
11912 Explain byte-size arguments and suffixes.
11913 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
11914 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
11915 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
11916 * doc/options.texi (UInteger): Expand.
11917 (Host_Wide_Int, ByteSize): Document new properties.
11918 * final.c (final_start_function_1): Include sizes in an error message.
11919 * function.c (frame_offset_overflow): Same.
11920 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
11921 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
11922 Diagnose unbounded alloca calls only for limits of less than
11924 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
11925 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
11927 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
11928 only for limits of less than PTRDIFF_MAX.
11929 * langhooks-def.h (lhd_handle_option): Change function argument
11931 * langhooks.c (lhd_handle_option): Same.
11932 * langhooks.h (handle_option): Same.
11933 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
11935 (var_type, var_type_struct): Same.
11936 (var_set): Handle ByteSize flag.
11937 * optc-gen.awk: Add comments to output to ease debugging. Make
11938 use of HOST_WIDE_INT where appropriate.
11939 * opts-gen-save.awk: Use %lx to format unsigned long.
11940 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
11941 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
11942 arguments. Parse bytes-size suffixes.
11943 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
11944 (enum_value_to_arg): Same.
11945 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
11946 (handle_option): Adjust.
11947 (generate_option): Change function argument to HOST_WIDE_INT.
11948 (cmdline_handle_error): Adjust.
11949 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
11950 (set_option): Change function argument to HOST_WIDE_INT.
11951 (option_enabled): Handle cl_host_wide_int.
11952 (get_option_state): Handle CLVC_SIZE.
11953 (control_warning_option): Same.
11954 * opts.c (common_handle_option): Change function argument to
11955 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
11956 OPT_Wvla_larger_than_.
11957 * opts.h (enum cl_var_type): Add an enumerator.
11958 * stor-layout.c (layout_decl): Print a more meaningful warning.
11959 * toplev.c (output_stack_usage): Adjust.
11961 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
11963 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
11964 call to inline_expand_builtin_string_cmp.
11965 (expand_builtin_strcmp): Likewise.
11966 (expand_builtin_strncmp): Likewise.
11967 (inline_string_cmp): Delete the last parameter, change char_type_node
11968 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
11970 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
11971 the inlining expansion on target where the type of the call has same or
11972 narrower precision than unsigned char.
11974 2018-07-20 David Malcolm <dmalcolm@redhat.com>
11976 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
11977 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
11978 * common.opt (fsave-optimization-record): New option.
11979 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
11980 * doc/invoke.texi (-fsave-optimization-record): New option.
11981 * dumpfile.c: Include "optinfo-emit-json.h".
11982 (struct kv_pair): Move to coretypes.h.
11983 (optgroup_options): Make non-static.
11984 (dump_context::end_scope): Call
11985 optimization_records_maybe_pop_dump_scope.
11986 * dumpfile.h (optgroup_options): New decl.
11987 * json.cc: New file.
11988 * json.h: New file.
11989 * optinfo-emit-json.cc: New file.
11990 * optinfo-emit-json.h: New file.
11991 * optinfo.cc: Include "optinfo-emit-json.h".
11992 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
11993 (optinfo_enabled_p): Check optimization_records_enabled_p.
11994 (optinfo_wants_inlining_info_p): Likewise.
11995 * optinfo.h: Update comment.
11996 * profile-count.c (profile_quality_as_string): New function.
11997 * profile-count.h (profile_quality_as_string): New decl.
11998 (profile_count::quality): New accessor.
11999 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
12000 and optinfo_emit_json_cc_tests.
12001 * selftest.h (selftest::json_cc_tests): New decl.
12002 (selftest::optinfo_emit_json_cc_tests): New decl.
12003 * toplev.c: Include "optinfo-emit-json.h".
12004 (compile_file): Call optimization_records_finish.
12005 (do_compile): Call optimization_records_start.
12006 * tree-ssa-live.c: Include optinfo.h.
12007 (remove_unused_scope_block_p): Retain inlining information if
12008 optinfo_wants_inlining_info_p returns true.
12010 2018-07-20 Richard Biener <rguenther@suse.de>
12013 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
12014 to cover -flto-partition=none.
12016 2018-07-20 Martin Liska <mliska@suse.cz>
12018 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
12019 (get_decl_source_range): Remove unused function.
12021 2018-07-20 Richard Biener <rguenther@suse.de>
12023 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
12024 (struct vn_phi_s): Likewise.
12025 (struct vn_reference_s): Likewise.
12026 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
12027 for searching the slot of an entry known to be in the hash itself.
12028 (vn_phi_hasher::equal): Likewise.
12029 (vn_reference_hasher::equal): Likewise.
12030 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
12032 (optimistic_info, current_info): Remove, keeping only valid_info.
12033 (vn_reference_lookup_1): Remove fallback lookup.
12034 (vn_reference_lookup_2): Likewise.
12035 (vn_nary_op_lookup_1): Likewise.
12036 (vn_phi_lookup): Likewise.
12037 (vn_nary_build_or_lookup_1): Make sure to not chain the built
12039 (vn_reference_insert): Adjust, chain the inserted hash element
12040 at last_inserted_ref.
12041 (vn_reference_insert_pieces): Likewise.
12042 (visit_reference_op_call): Likewise.
12043 (vn_nary_op_insert_into): Chain the inserted hash element at
12044 last_inserted_nary.
12045 (vn_nary_op_insert_pieces): Adjust.
12046 (vn_nary_op_insert): Likewise.
12047 (vn_nary_op_insert_stmt): Likewise.
12048 (vn_phi_insert): Adjust, chain the inserted hash element at
12050 (process_scc): Remove clearing and copying the optimistic
12051 table. Instead remove elements inserted during an optimistic
12052 iteration from the single table we maintain.
12053 (init_scc_vn): Adjust.
12054 (free_scc_vn): Likewise.
12055 (sccvn_dom_walker::record_cond): Likewise.
12056 (sccvn_dom_walker::after_dom_children): Likewise.
12058 2018-07-19 Martin Sebor <msebor@redhat.com>
12060 PR tree-optimization/84047
12061 PR tree-optimization/83776
12062 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
12063 (check_array_bounds): Call it.
12065 2018-07-19 Martin Sebor <msebor@redhat.com>
12067 * align.h (align_flags): Use member initialization.
12069 2018-07-19 David Malcolm <dmalcolm@redhat.com>
12071 * Makefile.in (OBJS): Add optinfo.o.
12072 * coretypes.h (class symtab_node): New forward decl.
12073 (struct cgraph_node): New forward decl.
12074 (class varpool_node): New forward decl.
12075 * dump-context.h: New file.
12076 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
12078 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
12079 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
12080 (set_alt_dump_file): Likewise.
12081 (dump_context::~dump_context): New dtor.
12082 (dump_gimple_stmt): Move implementation to...
12083 (dump_context::dump_gimple_stmt): ...this new member function.
12084 Add the stmt to any pending optinfo, creating one if need be.
12085 (dump_gimple_stmt_loc): Move implementation to...
12086 (dump_context::dump_gimple_stmt_loc): ...this new member function.
12087 Start a new optinfo and add the stmt to it.
12088 (dump_gimple_expr): Move implementation to...
12089 (dump_context::dump_gimple_expr): ...this new member function.
12090 Add the stmt to any pending optinfo, creating one if need be.
12091 (dump_gimple_expr_loc): Move implementation to...
12092 (dump_context::dump_gimple_expr_loc): ...this new member function.
12093 Start a new optinfo and add the stmt to it.
12094 (dump_generic_expr): Move implementation to...
12095 (dump_context::dump_generic_expr): ...this new member function.
12096 Add the tree to any pending optinfo, creating one if need be.
12097 (dump_generic_expr_loc): Move implementation to...
12098 (dump_context::dump_generic_expr_loc): ...this new member
12099 function. Add the tree to any pending optinfo, creating one if
12101 (dump_printf): Move implementation to...
12102 (dump_context::dump_printf_va): ...this new member function. Add
12103 the text to any pending optinfo, creating one if need be.
12104 (dump_printf_loc): Move implementation to...
12105 (dump_context::dump_printf_loc_va): ...this new member function.
12106 Start a new optinfo and add the stmt to it.
12107 (dump_dec): Move implementation to...
12108 (dump_context::dump_dec): ...this new member function. Add the
12109 value to any pending optinfo, creating one if need be.
12110 (dump_context::dump_symtab_node): New member function.
12111 (dump_context::get_scope_depth): New member function.
12112 (dump_context::begin_scope): New member function.
12113 (dump_context::end_scope): New member function.
12114 (dump_context::ensure_pending_optinfo): New member function.
12115 (dump_context::begin_next_optinfo): New member function.
12116 (dump_context::end_any_optinfo): New member function.
12117 (dump_context::s_current): New global.
12118 (dump_context::s_default): New global.
12119 (dump_scope_depth): Delete global.
12120 (dumpfile_ensure_any_optinfo_are_flushed): New function.
12121 (dump_symtab_node): New function.
12122 (get_dump_scope_depth): Reimplement in terms of dump_context.
12123 (dump_begin_scope): Likewise.
12124 (dump_end_scope): Likewise.
12125 (selftest::temp_dump_context::temp_dump_context): New ctor.
12126 (selftest::temp_dump_context::~temp_dump_context): New dtor.
12127 (selftest::verify_item): New function.
12128 (ASSERT_IS_TEXT): New macro.
12129 (ASSERT_IS_TREE): New macro.
12130 (ASSERT_IS_GIMPLE): New macro.
12131 (selftest::test_capture_of_dump_calls): New test.
12132 (selftest::dumpfile_c_tests): Call it.
12133 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
12134 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
12135 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
12136 descriptive comment.
12137 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
12138 (dump_node, dump_bb): Move these unrelated decls.
12139 (class dump_manager): Add leading comment.
12140 * optinfo.cc: New file.
12141 * optinfo.h: New file.
12143 2018-07-19 Michael Collison <michael.collison@arm.com>
12144 Richard Henderson <rth@redhat.com>
12146 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
12147 (subti): Handle op1 zero.
12148 (subvti4, usub4ti4): New.
12149 (*sub<GPI>3_compare1_imm): New.
12150 (sub<GPI>3_carryinCV): New.
12151 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
12152 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
12154 2018-07-19 Michael Collison <michael.collison@arm.com>
12155 Richard Henderson <rth@redhat.com>
12157 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
12158 (addti3): Create simpler code if low part is already known to be 0.
12159 (addvti4, uaddvti4): New.
12160 (*add<GPI>3_compareC_cconly_imm): New.
12161 (*add<GPI>3_compareC_cconly): New.
12162 (*add<GPI>3_compareC_imm): New.
12163 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
12164 handle constants within this pattern..
12165 (*add<GPI>3_compareV_cconly_imm): New.
12166 (*add<GPI>3_compareV_cconly): New.
12167 (*add<GPI>3_compareV_imm): New.
12168 (add<GPI>3_compareV): New.
12169 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
12170 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
12171 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
12172 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
12173 with 'comparison' operator.
12174 (*add<GPI>3_compareV_cconly_imm): Ditto.
12175 (*add<GPI>3_compareV_cconly): Ditto.
12176 (*add<GPI>3_compareV_imm): Ditto.
12177 (add<GPI>3_compareV): Ditto.
12178 (add<mode>3_carryinC): Ditto.
12179 (*add<mode>3_carryinC_zero): Ditto.
12180 (*add<mode>3_carryinC): Ditto.
12181 (add<mode>3_carryinV): Ditto.
12182 (*add<mode>3_carryinV_zero): Ditto.
12183 (*add<mode>3_carryinV): Ditto.
12185 2018-07-19 Michael Collison <michael.collison@arm.com>
12186 Richard Henderson <rth@redhat.com>
12188 * config/aarch64/aarch64-modes.def (CC_V): New.
12189 * config/aarch64/aarch64-protos.h
12190 (aarch64_addti_scratch_regs): Declare
12191 (aarch64_subvti_scratch_regs): Declare.
12192 (aarch64_expand_subvti): Declare.
12193 (aarch64_gen_unlikely_cbranch): Declare
12194 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
12195 for signed overflow using CC_Vmode.
12196 (aarch64_get_condition_code_1): Handle CC_Vmode.
12197 (aarch64_gen_unlikely_cbranch): New function.
12198 (aarch64_addti_scratch_regs): New function.
12199 (aarch64_subvti_scratch_regs): New function.
12200 (aarch64_expand_subvti): New function.
12202 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12204 * config/aarch64/aarch64-option-extensions.def: New entry for profile
12206 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
12207 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
12210 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12213 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12214 address check not strict.
12216 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12218 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
12220 (store_pair_lanes<mode>): Likewise.
12221 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
12222 enum value 'ADDR_QUERY_LDP_STP_N'.
12223 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
12224 (aarch64_print_address_internal): Add declaration.
12225 (aarch64_print_ldpstp_address): Remove.
12226 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
12227 (aarch64_print_operand): Change printing of 'y'.
12228 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
12229 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
12230 'true' rather than '1'.
12231 * config/aarch64/constraints.md (Uml): Likewise.
12232 (Uml): Rename to Umn.
12235 2018-07-19 Richard Biener <rguenther@suse.de>
12237 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
12239 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
12240 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
12241 (vn_reference_hasher): Likewise.
12242 (struct vn_tables_s): Remove obstack and alloc-pool members.
12243 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
12244 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
12245 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
12246 (vn_reference_insert_pieces): Likewise.
12247 (alloc_vn_nary_op_noinit): Adjust.
12248 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
12249 (vn_phi_eq): Adjust.
12250 (shared_lookup_phiargs): Remove.
12251 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
12252 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
12253 (visit_reference_op_call): Likewise.
12254 (copy_nary, copy_phi, copy_reference): Remove.
12255 (process_scc): Rewind the obstack when iterating. Do not
12256 copy the elements to valid_info but just move them from one
12257 hashtable to the other.
12258 (allocate_vn_table): Adjust.
12259 (free_vn_table): Likewise.
12260 (init_scc_vn): Likewise.
12261 (free_scc_vn): Likewise.
12263 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
12266 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
12267 indirect_return as function type attribute.
12268 (ix86_attribute_table): Change indirect_return to function
12270 * doc/extend.texi: Update indirect_return attribute.
12272 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
12274 * wide-int.h (widest2_int): New.
12275 * gimple-fold.c (arith_overflowed_p): Use it.
12276 * tree.h (widest2_int_cst): New.
12277 * tree-vrp.c (wide_int_binop_overflow): Rename from
12278 vrp_int_const_binop.
12279 Rewrite to work on trees.
12280 (extract_range_from_multiplicative_op_1): Abstract code to...
12281 (wide_int_range_min_max): ...here.
12282 (wide_int_range_cross_product): ...and here.
12283 (extract_range_from_binary_expr_1): Abstract overflow code to...
12284 (wide_int_range_mult_wrapping): ...here.
12285 * tree-vrp.h (wide_int_range_cross_product): New.
12286 (wide_int_range_mult_wrapping): New.
12288 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
12289 Julia Koval <julia.koval@intel.com>
12291 * config/i386/x86-tune-costs.h (skylake_memcpy,
12292 skylake_memset): Replace rep_prefix with unrolling for size 512.
12294 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
12296 PR middle-end/86544
12297 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
12298 comparision with EQ_EXPR in last stmt.
12300 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
12302 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
12303 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
12304 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
12305 previously known as "PowerPC AltiVec Built-in Functions". Move
12306 some material to new subsubsections "PowerPC AltiVec Built-in
12307 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
12309 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
12310 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
12311 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
12312 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
12314 2018-07-18 Richard Biener <rguenther@suse.de>
12316 PR tree-optimization/86557
12317 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
12320 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
12322 * config/s390/s390.c (s390_function_profiler): Generate CFI.
12324 2018-07-17 Jeff Law <law@redhat.com>
12326 * config/arm/arm.c (get_label_padding): Update for recent
12327 changes to label_to_alignment.
12329 PR tree-optimization/86010
12330 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
12332 * config/mips/mips.c (vr4130_align_insns): Update for recent
12333 changes to label_to_alignment.
12335 * config/frv/frv.c (frv_label_align): Update for recent changes
12336 to label_to_alignment.
12338 * config/nios2/nios2.c (nios2_label_align): Update for recent
12339 changes which dropped ALIGN_LABELS_LOG.
12341 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
12343 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
12344 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
12346 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
12348 * config/arc/arc.c (arc_label_align): Use align_labels instead of
12349 deprecated align_labels_log.
12351 2018-07-17 Richard Biener <rguenther@suse.de>
12354 * dwarf2out.c (init_sections_and_labels): Always generate
12355 a debug_line_str_section for early LTO debug.
12356 (dwarf2out_finish): Reset debug_line_str_hash output early.
12357 Bump counter for extra dwarf5 .debug_loc labels to not conflict
12359 (dwarf2out_early_finish): Output debug_line_str.
12361 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12363 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
12364 index register on z196 or later.
12366 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12368 * config/s390/s390.c (s390_default_align): Set default function
12370 (s390_override_options_after_change): Call s390_default align.
12371 (s390_option_override_internal): Call s390_default_align.
12372 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
12374 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12376 PR middle-end/86542
12377 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
12378 to _looptemp_ clauses, other than the first two.
12380 2018-07-17 Martin Liska <mliska@suse.cz>
12382 * opts.c: Do not enable OPT_falign_* for -Os.
12384 2018-07-17 Martin Liska <mliska@suse.cz>
12386 * align.h (MAX_CODE_ALIGN): New.
12387 (MAX_CODE_ALIGN_VALUE): New.
12388 * common/config/i386/i386-common.c (ix86_handle_option):
12389 (MAX_CODE_ALIGN): Moved to align.h.
12390 * final.c (MAX_CODE_ALIGN): Likewise.
12391 * opts.c (parse_and_check_align_values):
12392 (MAX_CODE_ALIGN): Likewise.
12393 (MAX_CODE_ALIGN_VALUE): Likewise.
12395 2018-07-17 Martin Liska <mliska@suse.cz>
12397 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
12398 in order to fulfil coding style.
12399 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
12400 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12401 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12402 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
12403 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
12404 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
12405 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
12406 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
12407 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12409 2018-07-17 Martin Liska <mliska@suse.cz>
12411 * align.h: New file.
12412 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
12414 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
12415 align_flags of label_to_alignment.
12416 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
12418 * config/m68k/m68k.c: Do not use removed align_labels_value and
12420 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
12421 (LOOP_ALIGN): Likewise.
12422 (LABEL_ALIGN): Likewise.
12423 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12424 Remove not used macro.
12425 (rs6000_loop_align): Change return type to align_flags.
12426 (rs6000_loop_align_max_skip): Remove.
12427 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
12428 Change return type to align_flags.
12429 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12430 Remove not used macro.
12431 (rs6000_loop_align): Change return type to align_flags.
12432 (rs6000_loop_align_max_skip): Remove.
12433 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
12434 * config/rx/rx-protos.h (rx_align_for_label): Make it
12436 * config/rx/rx.c (rx_align_for_label): Change return type
12438 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
12440 into align_flags class.
12441 (LABEL_ALIGN): Likewise.
12442 (LOOP_ALIGN): Likewise.
12443 * config/s390/s390.c (s390_label_align): Use align_flags
12445 (s390_asm_output_function_label): Likewise.
12446 * config/sh/sh.c (sh_override_options_after_change):
12447 Use align_flags class directly without macros.
12448 (find_barrier): Likewise.
12449 (barrier_align): Likewise.
12450 (sh_loop_align): Likewise.
12451 * config/spu/spu.c (spu_option_override):
12452 Use align_flags_tuple::get_value instead of removed macros.
12453 (spu_sched_init): Likewise.
12454 * config/spu/spu.h (GTY): Likewise.
12455 * config/visium/visium.c (visium_option_override):
12456 Set "8" as default secondary alignment.
12457 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
12458 in order to guarantee secondary alignment of 8.
12459 * coretypes.h: Include align.h header file.
12460 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
12461 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
12462 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
12463 * doc/tm.texi.in: Likewise.
12464 * final.c (struct label_alignment): Remove not used structure.
12465 (LABEL_ALIGN): Change type to align_flags.
12466 (LOOP_ALIGN): Likewise.
12467 (JUMP_ALIGN): Likewise.
12468 (default_loop_align_max_skip): Remove.
12469 (default_label_align_max_skip): Likewise.
12470 (default_jump_align_max_skip): Likewise.
12471 (default_label_align_after_barrier_max_skip):
12472 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
12473 (LABEL_TO_MAX_SKIP): Remove.
12474 (label_to_alignment): Return align_flags type instead of integer.
12475 (label_to_max_skip): Remove.
12476 (align_fuzz): Use align_flags type.
12477 (compute_alignments): Use align_flags type and use align_flags::max
12478 to combine multiple alignments.
12479 (grow_label_align): Grow vec instead of C array.
12480 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
12481 (shorten_branches): Use align_flags type and use align_flags::max
12482 to combine multiple alignments.
12483 (final_scan_insn_1): Remove usage of secondary alignment that comes
12484 from label alignment, but instead use proper secondary alignment
12485 which is computed in grow_label_align.
12486 * flags.h (struct align_flags_tuple): Move to align.h.
12487 (struct align_flags): Likewise.
12488 (state_align_loops): Rename to align_loops.
12489 (state_align_jumps): Rename to align_jumps.
12490 (state_align_labels): Rename to align_labels.
12491 (state_align_functions): Rename to align_functions.
12492 (align_loops_log): Remove.
12493 (align_jumps_log): Remove.
12494 (align_labels_log): Remove.
12495 (align_functions_log): Remove.
12496 (align_loops_max_skip): Remove.
12497 (align_jumps_max_skip): Remove.
12498 (align_labels_max_skip): Remove.
12499 (align_functions_max_skip): Remove.
12500 (align_loops_value): Remove.
12501 (align_jumps_value): Remove.
12502 (align_labels_value): Remove.
12503 (align_functions_value): Remove.
12504 * output.h (label_to_alignment): Change return type to align_flags.
12505 (label_to_max_skip): Remove.
12506 * target.def: Remove loop_align_max_skip, label_align_max_skip,
12507 jump_align_max_skip macros.
12508 * targhooks.h (default_loop_align_max_skip): Remove.
12509 (default_label_align_max_skip): Likewise.
12510 (default_jump_align_max_skip): Likewise.
12511 (default_label_align_after_barrier_max_skip): Remove.
12512 * toplev.c (read_log_maxskip): Use ::normalize function.
12513 (parse_N_M): Remove not used argument and also call ::normalize.
12514 (parse_alignment_opts): Do not pass unused arguments.
12515 * varasm.c (assemble_start_function): Use directly align_functions
12516 instead of removed macros.
12517 * system.h: Do not poison removed macros.
12519 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12521 PR middle-end/86539
12522 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
12523 and cond temporaries don't have reference type if iterator has
12524 pointer type. For init use &for_pre_body instead of pre_p if
12525 for_pre_body is non-empty.
12527 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12529 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
12530 double-double modes to SFmode directly directly.
12531 (trunc<mode>sf2_fprs): Delete.
12533 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12535 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
12536 for conversions between IFmode and the decimal floating point modes.
12537 (init_float128_ieee): Use the correct names for conversions between
12538 KFmode and the decimal floating point modes.
12540 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12542 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
12543 for the conversions between TDmode and IFmode.
12544 (init_float128_ieee): Use more correct names for the conversions
12545 between TDmode and KFmode.
12547 2018-07-16 Jakub Jelinek <jakub@redhat.com>
12549 PR tree-optimization/86526
12550 * builtins.c (expand_builtin_memcmp): Formatting fixes.
12551 (inline_expand_builtin_string_cmp): Likewise.
12552 (inline_string_cmp): Likewise. Use c_readstr instead of
12553 builtin_memcpy_read_str. Add unit_mode temporary.
12555 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
12557 PR middle-end/86528
12558 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
12559 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
12561 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
12563 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
12564 Alphabetize prototypes of built-in functions, separating out
12565 built-in functions that are listed in this section but should be
12566 described elsewhere.
12568 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
12571 * expmed.c (emit_store_flag): Do not emit setcc followed by a
12572 conditional move when trapping comparison was split to a
12573 non-trapping one (and vice versa).
12575 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12577 * config/s390/s390.c (s390_function_profiler): Generate nops
12578 instead of profiler call sequences.
12579 * config/s390/s390.opt: Add the new option.
12581 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12583 * config/s390/s390.c (s390_function_profiler): Generate
12584 __mcount_loc section.
12585 * config/s390/s390.opt: Add the new option.
12587 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12589 * common.opt: Add the new warning.
12590 * config/s390/s390.c (s390_function_profiler): Emit "brasl
12591 %r0,__fentry__" when -mfentry is specified.
12592 (s390_option_override_internal): Disallow -mfentry for 31-bit
12594 * config/s390/s390.opt: Add the new option.
12596 2018-07-16 Richard Biener <rguenther@suse.de>
12599 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
12600 for function-local FUNCTION_DECL and RESULT_DECL immediately.
12602 2018-07-16 Martin Liska <mliska@suse.cz>
12605 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
12608 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
12610 * config/arc/arcHS.md: Update ARCHS scheduling rules.
12612 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
12614 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
12616 * config/arc/arc-cpus.def (hs4x): New cpu.
12618 * config/arc/arc-tables.opt: Regenerate.
12619 * config/arc/arc.c (arc_sched_issue_rate): New function.
12620 (TARGET_SCHED_ISSUE_RATE): Define.
12621 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
12622 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
12624 (attr tune): Add ARCHS4x tune values.
12625 (attr tune_dspmpy): Define.
12626 (*tst): Correct instruction type.
12627 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
12628 * config/arc/arcHS4x.md: New file.
12629 * config/arc/fpu.md: Update instruction type attributes.
12630 * config/arc/t-multilib: Regenerate.
12632 2018-07-16 Tom de Vries <tdevries@suse.de>
12635 * var-tracking.c (vt_initialize): Fix pre_dec handling.
12637 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12639 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
12642 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
12644 PR tree-optimization/86514
12645 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
12646 conversion to a boolean type from a type with greater precision.
12648 2018-07-16 Tom de Vries <tdevries@suse.de>
12650 * var-tracking.c (vt_initialize): Print adjusted insn slim if
12651 dump_flags request TDF_SLIM.
12653 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
12655 * fold-const.c (int_const_binop_1): Abstract...
12656 (wide_int_binop): ...wide int code here.
12657 (poly_int_binop): ...poly int code here.
12658 Abstract the rest of int_const_binop_1 into int_const_binop.
12659 * fold-const.h (wide_int_binop): New.
12660 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
12661 Remove useless PLUS/MINUS_EXPR case.
12662 (zero_nonzero_bits_from_vr): Move wide int code...
12663 (zero_nonzero_bits_from_bounds): ...here.
12664 (extract_range_from_binary_expr_1): Move mask optimization code...
12665 (range_easy_mask_min_max): ...here.
12666 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
12667 (range_easy_mask_min_max): New.
12669 2018-07-15 Jeff Law <law@redhat.com>
12672 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
12675 2018-07-14 Jim Wilson <jimw@sifive.com>
12677 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
12679 2018-07-14 Paul Koning <ni1d@arrl.net>
12681 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
12683 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
12685 * lto-streamer-out.c (copy_function_or_variable): Dump info about
12688 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
12689 Steve Munroe <munroesj52@gmail.com>
12691 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
12692 (_mm_andnot_si128): Likewise.
12693 (_mm_or_si128): Likewise.
12694 (_mm_xor_si128): Likewise.
12696 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
12698 PR middle-end/78809
12699 * builtins.c (expand_builtin_memcmp): Inline the calls first
12700 when result_eq is false.
12701 (expand_builtin_strcmp): Inline the calls first.
12702 (expand_builtin_strncmp): Likewise.
12703 (inline_string_cmp): New routine. Expand a string compare
12704 call by using a sequence of char comparison.
12705 (inline_expand_builtin_string_cmp): New routine. Inline expansion
12706 a call to str(n)cmp/memcmp.
12707 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
12709 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
12711 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
12713 * config/arm/driver-arm.c: Include arm-native.h.
12714 (host_detect_local_cpu): Use auto-generated data tables.
12715 (vendors, arm_cpu_table): Delete. Move part information to ...
12716 * config/arm/arm-cpus.in: ... here.
12717 * config/arm/parsecpu.awk (gen_native): New function.
12718 (vendor, part): New CPU fields.
12719 (END): Add support for building the native CPU detection tables.
12720 * config/arm/t-arm (arm-native.h): Add build rule.
12721 (driver-arm.o): Add dependency on arm-native.h.
12723 2018-07-13 Richard Biener <rguenther@suse.de>
12725 PR middle-end/85974
12726 * match.pd (addr1 - addr2): Allow either of the operand to
12729 2018-07-13 Tom de Vries <tdevries@suse.de>
12731 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
12734 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
12736 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
12737 arrays instead of numbered variables.
12739 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
12741 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
12742 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
12744 2018-07-13 Richard Biener <rguenther@suse.de>
12747 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
12748 instead of get_context_die.
12750 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
12751 Richard Biener <rguenther@suse.de>
12753 PR middle-end/86489
12754 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
12755 that the loop latch destination where phi is defined.
12757 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
12759 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
12760 (riscv_expand_epilogue): Add assertion to check interrupt mode.
12761 (riscv_set_current_function): Extract getting interrupt type to new
12763 (riscv_get_interrupt_type): New function.
12764 (riscv_merge_decl_attributes): New function, checking interrupt type is
12766 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
12768 2018-07-12 Paul Koning <ni1d@arrl.net>
12770 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
12773 2018-07-12 Paul Koning <ni1d@arrl.net>
12775 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
12776 zero reference, add doloop_end instead.
12777 * doc/md.texi (decrement_and_branch_until_zero): Remove.
12778 (Looping patterns): Remove decrement_and_branch_until_zero. Add
12779 detail for doloop_end.
12781 2018-07-12 Martin Sebor <msebor@redhat.com>
12784 * attribs.c (decl_attributes): Reject conflicting attributes before
12785 calling attribute handlers.
12787 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
12789 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
12791 (gcc::dump_manager::get_dump_file_name): likewise.
12792 (dump_begin): Likewise.
12793 * dumpfile.h (dump_begin): Update prototype.
12794 (gcc::dump_manager::get_dump_file_name,
12795 gcc::dump_manager::get_dump_file_name): Update prototype.
12797 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12799 * internal-fn.h (vectorizable_internal_fn_p): New function.
12800 * tree-vect-slp.c (compatible_calls_p): Likewise.
12801 (vect_build_slp_tree_1): Remove nops argument. Handle calls
12802 to internal functions.
12803 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
12805 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12807 * fold-const.h (inverse_conditions_p): Declare.
12808 * fold-const.c (inverse_conditions_p): New function.
12809 * match.pd: Use inverse_conditions_p. Add folds of view_converts
12810 that test the inverse condition of a conditional internal function.
12811 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
12812 * internal-fn.c (internal_fn_mask_index): Handle conditional
12813 internal functions.
12814 (vectorized_internal_fn_supported_p): New function.
12815 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
12816 (any_pred_load_store): Replace with...
12817 (need_to_predicate): ...this new variable.
12818 (redundant_ssa_names): New variable.
12819 (ifcvt_can_use_mask_load_store): Move initial checks to...
12820 (ifcvt_can_predicate): ...this new function. Handle tree codes
12821 for which a conditional internal function exists.
12822 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
12823 instead of ifcvt_can_use_mask_load_store. Update after variable
12825 (predicate_load_or_store): New function, split out from
12826 predicate_mem_writes.
12827 (check_redundant_cond_expr): New function.
12828 (value_available_p): Likewise.
12829 (predicate_rhs_code): Likewise.
12830 (predicate_mem_writes): Rename to...
12831 (predicate_statements): ...this. Use predicate_load_or_store
12832 and predicate_rhs_code.
12833 (combine_blocks, tree_if_conversion): Update after above name changes.
12834 (ifcvt_local_dce): Handle redundant_ssa_names.
12835 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
12836 general conditional functions.
12837 * tree-vect-stmts.c (vectorizable_call): Likewise.
12839 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12840 Alan Hayward <alan.hayward@arm.com>
12841 David Sherwood <david.sherwood@arm.com>
12843 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
12844 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
12845 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
12846 plus and minus and convert them into IFN_COND_FMA-based sequences.
12847 (convert_mult_to_fma): Handle conditional plus and minus.
12849 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12851 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
12852 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
12853 (cond_fnms_optab): New optabs.
12854 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
12855 internal functions.
12856 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
12857 * internal-fn.h (get_conditional_internal_fn): Declare.
12858 (get_unconditional_internal_fn): Likewise.
12859 * internal-fn.c (cond_ternary_direct): New macro.
12860 (expand_cond_ternary_optab_fn): Likewise.
12861 (direct_cond_ternary_optab_supported_p): Likewise.
12862 (FOR_EACH_COND_FN_PAIR): Likewise.
12863 (get_conditional_internal_fn): New function.
12864 (get_unconditional_internal_fn): Likewise.
12865 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
12866 (gimple_match_op::gimple_match_op): Add a new overload for 5
12868 (gimple_match_op::set_op): Likewise.
12869 (gimple_resimplify5): Declare.
12870 * genmatch.c (decision_tree::gen): Generate simplifications for
12872 * gimple-match-head.c (gimple_simplify): Define an overload for
12873 5 operands. Handle calls with 5 arguments in the top-level overload.
12874 (convert_conditional_op): Handle conversions from unconditional
12875 internal functions to conditional ones.
12876 (gimple_resimplify5): New function.
12877 (build_call_internal): Pass a fifth operand.
12878 (maybe_push_res_to_seq): Likewise.
12879 (try_conditional_simplification): Try converting conditional
12880 internal functions to unconditional internal functions.
12881 Handle 3-operand unconditional forms.
12882 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
12883 Define ternary equivalents of the current rules for binary conditional
12884 internal functions.
12885 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
12886 ternary operations.
12887 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
12888 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
12889 (optab): Handle them.
12890 (SVE_COND_FP_TERNARY): New int iterator.
12891 (sve_fmla_op, sve_fmad_op): New int attributes.
12892 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
12893 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
12894 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
12896 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12898 * target.def (preferred_else_value): New target hook.
12899 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
12900 * doc/tm.texi: Regenerate.
12901 * targhooks.h (default_preferred_else_value): Declare.
12902 * targhooks.c (default_preferred_else_value): New function.
12903 * internal-fn.h (conditional_internal_fn_code): Declare.
12904 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
12905 (get_conditional_internal_fn): Use it.
12906 (conditional_internal_fn_code): New function.
12907 * gimple-match.h (gimple_match_cond): New struct.
12908 (gimple_match_op): Add a cond member function.
12909 (gimple_match_op::gimple_match_op): Update all forms to take a
12911 * genmatch.c (expr::gen_transform): Use the same condition as res_op
12912 for the suboperation, but don't specify a particular else_value.
12913 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
12914 (visit_nary_op, visit_reference_op_load): Pass
12915 gimple_match_cond::UNCOND to the gimple_match_op constructor.
12916 * gimple-match-head.c: Include tree-eh.h
12917 (convert_conditional_op): New function.
12918 (maybe_resimplify_conditional_op): Likewise.
12919 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
12920 (gimple_resimplify2): Likewise.
12921 (gimple_resimplify3): Likewise.
12922 (gimple_resimplify4): Likewise.
12923 (maybe_push_res_to_seq): Return null for conditional operations.
12924 (try_conditional_simplification): New function.
12925 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
12927 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
12929 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
12931 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
12933 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
12935 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12937 (hash_tree): Do not hash DECL_FCONTEXT
12938 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
12939 Do not stream DECL_FCONTEXT.
12940 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
12941 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
12943 2018-07-12 Richard Biener <rguenther@suse.de>
12946 * dwarf2out.c (gen_block_die): Only output blocks when they have
12947 at least one !DECL_IGNORED_P variable.
12949 2018-07-12 Richard Biener <rguenther@suse.de>
12952 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
12953 Remove -mieee-fp handling.
12955 2018-07-12 Richard Biener <rguenther@suse.de>
12957 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
12958 left-over from last patch.
12960 2018-07-12 Jakub Jelinek <jakub@redhat.com>
12962 PR tree-optimization/86492
12963 * gimple-ssa-store-merging.c
12964 (imm_store_chain_info::coalesce_immediate_stores): Call
12965 check_no_overlap even for the merge_overlapping case. Formatting fix.
12967 2018-07-12 Richard Biener <rguenther@suse.de>
12969 PR middle-end/86479
12970 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
12971 move possibly trapping operations into the conditional.
12973 2018-07-12 Richard Biener <rguenther@suse.de>
12975 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
12976 (vn_lookup_simplify_result): Remove recursion limit applied
12978 (vn_nary_build_or_lookup_1): Adjust.
12979 (try_to_simplify): Likewise.
12980 * gimple-match-head.c (gimple_resimplify1): Instead apply one
12982 (gimple_resimplify2): Likewise.
12983 (gimple_resimplify3): Likewise.
12984 (gimple_resimplify4): Likewise.
12986 2018-07-11 Jakub Jelinek <jakub@redhat.com>
12988 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
12989 Use __mmask64 type instead of __mmask8 for __M argument.
12990 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
12991 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
12993 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
12994 __mmask16 for __M argument.
12995 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
12996 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
12997 to __mmask16 instead of __mmask8.
12998 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
12999 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
13000 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
13001 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
13002 instead of __mmask16 for __U argument.
13003 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
13004 __mmask16 instead of __mmask8 for __U argument.
13005 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
13007 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
13009 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
13011 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
13013 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
13015 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
13017 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
13019 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
13021 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
13023 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
13025 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
13026 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
13027 return type as well as __M argument type and all casts from __mmask8
13029 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
13030 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
13031 return type as well as __M argument type and all casts from __mmask8
13033 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
13034 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
13035 return type as well as __M argument type and all casts from __mmask8
13037 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
13038 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
13039 return type as well as __M argument type and all casts from __mmask8
13041 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
13042 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
13045 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
13047 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
13048 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
13051 2018-07-11 Paul Koning <ni1d@arrl.net>
13053 * doc/md.texi (define_subst): Document how multiple occurrences of
13054 the same argument in the replacement pattern are handled.
13056 2018-07-11 Paul Koning <ni1d@arrl.net>
13058 * doc/extend.texi (Common Variable Attributes): Move "mode" into
13059 alphabetical order.
13060 (Common Type Attributes): Add "mode" attribute.
13062 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
13064 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
13065 stream DECL_ORIGINAL_TYPE.
13066 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
13067 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
13068 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
13069 Do not walk original type.
13070 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
13072 (write_ts_decl_non_common_tree_pointers): Do not stream
13074 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
13075 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
13077 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
13079 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
13080 thread twice from the same starting edge.
13082 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
13084 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
13085 * gimple.c (gimple_call_nonnull_result_p): ...here...
13086 (gimple_call_nonnull_arg): ...and here.
13087 * gimple.h (gimple_call_nonnull_result_p): New.
13088 (gimple_call_nonnull_arg): New.
13090 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
13092 * config/arm/arm-cpus.in: Move information from fpu field of each
13093 cpu definition to the isa field.
13094 * config/arm/parsecpu.awk (fpu): Delete match rule.
13095 (gen_comm_data): Don't add bits from the CPU's FPU entry.
13097 2018-07-11 Richard Biener <rguenther@suse.de>
13100 * dwarf2out.c (init_sections_and_labels): Use
13101 output_asm_line_debug_info consistently.
13102 (dwarf2out_early_finish): Likewise.
13103 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
13106 2018-07-11 Richard Biener <rguenther@suse.de>
13108 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
13109 Rework father_bb setting in a way to avoid propagating constants
13110 multiple times on a loop body.
13112 2018-07-10 Mark Wielaard <mark@klomp.org>
13115 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
13117 2018-07-10 Richard Biener <rguenther@suse.de>
13119 * hash-map.h (hash_map::iterator::operator*): Return
13120 references to key and value.
13122 2018-07-10 Jakub Jelinek <jakub@redhat.com>
13125 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
13126 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
13127 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
13128 (gimplify_omp_for): For composite loops, move outer
13129 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
13130 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
13131 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
13132 TREE_LIST for both the original class iterator and the "last" helper
13133 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
13134 loop, remember has_decl_expr from outer composite loops for the
13135 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
13137 2018-07-09 Martin Sebor <msebor@redhat.com>
13139 PR middle-end/77357
13140 PR middle-end/86428
13141 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
13142 accessing implicitly initialized array elements.
13143 * expr.c (string_constant): Handle string initializers of
13144 character arrays within aggregates.
13145 * gimple-fold.c (fold_array_ctor_reference): Add argument.
13146 Store element offset. As a special case, handle zero size.
13147 (fold_nonarray_ctor_reference): Same.
13148 (fold_ctor_reference): Add argument. Store subobject offset.
13149 * gimple-fold.h (fold_ctor_reference): Add argument.
13151 2018-07-09 Paul Koning <ni1d@arrl.net>
13153 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
13154 (pdp11_insn_cost): New function.
13155 (pdp11_md_asm_adjust): New function.
13156 (TARGET_INVALID_WITHIN_DOLOOP): Define.
13157 (pdp11_rtx_costs): Update to match machine better.
13158 (output_addr_const_pdp11): Correct format mismatch warnings.
13159 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
13160 * config/pdp11/pdp11.md: General change to add base_cost and/or
13161 length attributes for use by new pdp11_insn_cost function.
13162 (MIN_BRANCH): Correct definition.
13164 (doloop_end): Use standard pattern name for looping pattern.
13165 (doloop_end_nocc): New.
13166 (movsf): Add another constraint alternative.
13167 (zero_extendqihi2): Add constraint alternatives for not in place
13169 (zero_extendhisi2): Remove.
13170 (shift patterns): Add CC handling variants.
13174 (define_peephole2): New peephole to recognize mov that sets CC for
13177 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13179 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
13180 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
13183 2018-07-09 Jakub Jelinek <jakub@redhat.com>
13186 * real.c (real_nextafter): Return true if result is denormal.
13188 2018-07-09 Martin Liska <mliska@suse.cz>
13190 * common.opt: Add back wrongly removed attribute.
13192 2018-07-09 Richard Biener <rguenther@suse.de>
13195 * dwarf2out.c (gen_block_die): For an early generated DIE
13196 always output high/low PC attributes.
13198 2018-07-09 Tom de Vries <tdevries@suse.de>
13200 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
13201 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
13202 onto VAR_DECL with abstract origin.
13204 2018-07-07 Jim Wilson <jimw@sifive.com>
13206 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
13208 2018-07-07 Tom de Vries <tdevries@suse.de>
13210 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
13212 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
13214 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
13216 (combine_bound): Use wide-int overflow calculation instead of
13218 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
13220 * fold-const.c (int_const_binop_2): Same.
13221 (extract_muldiv_1): Same.
13222 (fold_div_compare): Same.
13223 (fold_abs_const): Same.
13225 * poly-int.h (add): Same.
13229 * predict.c (predict_iv_comparison): Same.
13230 * profile-count.c (slow_safe_scale_64bit): Same.
13231 * simplify-rtx.c (simplify_const_binary_operation): Same.
13232 * tree-chrec.c (tree_fold_binomial): Same.
13233 * tree-data-ref.c (split_constant_offset_1): Same.
13234 * tree-if-conv.c (idx_within_array_bound): Same.
13235 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
13236 * tree-ssa-phiopt.c (minmax_replacement): Same.
13237 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
13238 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
13239 * vr-values.c (vr_values::adjust_range_with_scev): Same.
13240 * wide-int.cc (wi::add_large): Same.
13241 (wi::mul_internal): Same.
13242 (wi::sub_large): Same.
13243 (wi::divmod_internal): Same.
13244 * wide-int.h: Change overflow type to overflow_type for neg, add,
13245 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
13246 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
13247 mul_internal, divmod_internal.
13248 (overflow_type): New enum.
13249 (accumulate_overflow): New.
13251 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
13253 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
13254 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
13256 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13258 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
13259 argument is checked for zero before entering loop, avoid checking again.
13261 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13263 * gimplify.h (generic_expr_could_trap_p): Set as global function.
13264 * gimplify.h (generic_expr_could_trap_p): Likwise.
13265 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
13267 2018-07-06 Jakub Jelinek <jakub@redhat.com>
13269 PR tree-optimization/86401
13270 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
13271 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
13272 (fold_bit_and_mask): ... here. New helper function for match.pd.
13273 * fold-const.h (fold_bit_and_mask): Declare.
13274 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
13276 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
13279 * target.def (translate_mode_attribute): New hook.
13280 * targhooks.h (default_translate_mode_attribute): Declare.
13281 * targhooks.c (default_translate_mode_attribute): New function.
13282 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
13283 * doc/tm.texi: Regenerate.
13284 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
13285 (rs6000_translate_mode_attribute): New function.
13287 2018-07-06 Paul Koning <ni1d@arrl.net>
13289 * doc/md.texi (define_split): Document DONE and FAIL.
13290 (define_peephole2): Ditto.
13292 2018-07-05 Jeff Law <law@redhat.com>
13294 PR tree-optimization/86010
13295 * tree-ssa-dse.c (compute_trims): More aggressively trim at
13296 both the head and tail of mem* and str* calls.
13298 2018-07-05 Jim Wilson <jimw@sifive.com>
13300 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
13302 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
13304 * config/aarch64/aarch64-simd.md: correct flags text for
13305 MIN_EXPR replacement.
13307 2018-07-05 James Clarke <jrtc27@jrtc27.com>
13309 * configure: Regenerated.
13311 2018-07-05 Carl Love <cel@us.ibm.com>
13313 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
13314 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
13315 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
13316 VSX_BUILTIN_DOUBLEL_V4SF.
13318 2018-07-05 Martin Sebor <msebor@redhat.com>
13321 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
13322 than its domain to compute its the upper bound of a char array.
13324 2018-07-05 Nathan Sidwell <nathan@acm.org>
13326 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
13327 * doc/cpp.texi: Update comment.
13328 * doc/tm.texi: Rebuilt.
13329 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
13330 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
13331 * doc/extend.texi (Backwards Compatibility): Clarify it is system
13332 headers affected by extern "C".
13333 * system.h: Poison NO_IMPLICIT_EXTERN_C.
13334 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
13335 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
13336 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
13337 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
13338 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
13339 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
13340 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
13341 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
13342 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
13343 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
13344 config/sparc/sp64-elf.h, config/spu/spu.h,
13345 config/stormy16/stormy16.h, config/v850/v850.h,
13346 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
13347 define NO_IMPLICIT_EXTERN_C.
13348 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
13350 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13353 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13354 instead of GET_MODE_SIZE when comparing Units.
13356 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13359 * rtlanal.c (set_noop_p): Constrain on mode change,
13360 include hard-reg-set.h
13362 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13364 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
13366 2018-07-05 Jakub Jelinek <jakub@redhat.com>
13369 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13372 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13374 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13376 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13379 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13381 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13383 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
13385 PR middle-end/86380
13386 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
13388 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
13390 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
13391 neg_*_op* variables.
13393 2018-07-04 Martin Liska <mliska@suse.cz>
13395 * tree-switch-conversion.c: Define
13396 max_ratio_for_speed and max_ratio_for_size constants.
13398 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13399 Martin Liska <mliska@suse.cz>
13401 PR middle-end/66240
13404 * common.opt: Rename align options with 'str_' prefix.
13405 * common/config/i386/i386-common.c (set_malign_value): New
13407 (ix86_handle_option): Use it to set -falign-* options/
13408 * config/aarch64/aarch64-protos.h (struct tune_params): Change
13409 type from int to string.
13410 * config/aarch64/aarch64.c: Update default values from int
13412 * config/alpha/alpha.c (alpha_override_options_after_change):
13414 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
13415 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13416 max skip conditionally.
13417 * config/i386/freebsd.h (SUBALIGN_LOG): New.
13418 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13419 max skip conditionally.
13420 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13421 max skip conditionally.
13422 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
13423 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13424 max skip conditionally.
13425 * config/i386/i386.c (struct ptt): Change type from int to
13427 (ix86_default_align): Set default values.
13428 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
13429 max skip conditionally.
13430 * config/i386/iamcu.h (SUBALIGN_LOG): New.
13431 (ASM_OUTPUT_MAX_SKIP_ALIGN):
13432 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
13433 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13434 max skip conditionally.
13435 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
13436 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
13437 * config/i386/x86-64.h (SUBALIGN_LOG): New.
13438 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13439 max skip conditionally.
13440 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13441 * config/ia64/ia64.c (ia64_option_override): Set default values
13442 for alignment options.
13443 * config/m68k/m68k.c: Handle new str_align_* options.
13444 * config/mips/mips.c (mips_set_compression_mode): Change
13446 (mips_option_override): Set default values for options.
13447 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
13449 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13451 * config/rx/rx.c (rx_option_override): Likewise.
13452 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
13453 (LABEL_ALIGN): Use align_labels_log.
13454 (LOOP_ALIGN): Use align_loops_align.
13455 * config/s390/s390.c (s390_asm_output_function_label): Use new
13457 * config/sh/sh.c (sh_override_options_after_change):
13458 Change type of constants.
13459 * config/spu/spu.c (spu_sched_init): Likewise.
13460 * config/sparc/sparc.c (sparc_option_override): Set default
13461 values for options.
13462 * config/visium/visium.c (visium_option_override): Likewise.
13463 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
13464 emit p2align format with last argument if it's not needed.
13465 * doc/invoke.texi: Document extended format of -falign-*.
13466 * final.c: Use align_labels alignment.
13467 * flags.h (struct target_flag_state): Change type to use
13469 (struct align_flags_tuple): New.
13470 (struct align_flags): Likewise.
13471 (align_loops_log): Redefine macro to use new types.
13472 (align_loops_max_skip): Redefine macro to use new types.
13473 (align_jumps_log): Redefine macro to use new types.
13474 (align_jumps_max_skip): Redefine macro to use new types.
13475 (align_labels_log): Redefine macro to use new types.
13476 (align_labels_max_skip): Redefine macro to use new types.
13477 (align_functions_log): Redefine macro to use new types.
13478 (align_loops): Redefine macro to use new types.
13479 (align_jumps): Redefine macro to use new types.
13480 (align_labels): Redefine macro to use new types.
13481 (align_functions): Redefine macro to use new types.
13482 (align_functions_max_skip): Redefine macro to use new types.
13483 (align_loops_value): New macro.
13484 (align_jumps_value): New macro.
13485 (align_labels_value): New macro.
13486 (align_functions_value): New macro.
13487 * function.c (invoke_set_current_function_hook): Propagate
13488 alignment values from flags to global variables default in
13490 * ipa-icf.c (sem_function::equals_wpa): Use
13491 cl_optimization_option_eq instead of memcmp.
13492 * lto-streamer.h (cl_optimization_stream_out): Support streaming
13494 (cl_optimization_stream_in): Likewise.
13495 * optc-save-gen.awk: Support strings in cl_optimization.
13496 * opth-gen.awk: Likewise.
13497 * opts.c (finish_options): Remove error checking of invalid
13499 (MAX_CODE_ALIGN): Remove.
13500 (MAX_CODE_ALIGN_VALUE): Likewise.
13501 (parse_and_check_align_values): New function.
13502 (check_alignment_argument): Likewise.
13503 (common_handle_option): Use check_alignment_argument.
13504 * opts.h (parse_and_check_align_values): Declare.
13505 * toplev.c (init_alignments): Remove.
13506 (read_log_maxskip): New.
13507 (parse_N_M): Likewise.
13508 (parse_alignment_opts): Likewise.
13509 (backend_init_target): Remove usage of init_alignments.
13510 * toplev.h (parse_alignment_opts): Declare.
13511 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
13513 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
13514 * tree.c (cl_option_hasher::equal): New.
13515 * varasm.c: Use new global macros.
13517 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13519 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
13520 Use a simpler align directive also if MAXSKIP = ALIGN-1.
13521 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13522 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13523 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13524 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13525 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
13526 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
13527 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
13528 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13529 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13530 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13531 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13533 2018-07-04 Martin Liska <mliska@suse.cz>
13534 Jonathan Wakely <jwakely@redhat.com>
13536 * coverage.c: Use correct type.
13537 * doc/invoke.texi: Language correction.
13539 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
13542 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
13543 ENDBRANCH for non-tail call which may return via indirect branch.
13544 * doc/extend.texi: Document indirect_return attribute.
13546 2018-07-03 Martin Sebor <msebor@redhat.com>
13548 PR tree-optimization/86274
13549 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
13551 (format_floating): Correct handling of infinities and NaNs.
13553 2018-07-03 Martin Sebor <msebor@redhat.com>
13555 * print-tree.c (print_real_cst): New function.
13556 (print_node_brief): Call it.
13557 (print_node): Ditto.
13559 2018-07-03 Jeff Law <law@redhat.com>
13561 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
13562 into a single pattern.
13564 * config/h8300/h8300.md (ors code_iterator): New.
13565 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
13566 a single pattern and single splitter.
13567 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
13568 (iorqi3_1, xorqi3_1): Likewise.
13569 (iorqi3, xorqi3 expanders): Similarly.
13571 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
13572 (movmd_internal) into a single pattern using the P mode iterator.
13573 (movmd splitters): Similarly.
13574 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
13575 (movsd splitters): Similarly.
13577 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
13578 ADDB, ADDW and ADDL into a single ADD attribute which selects the
13579 right table based on the size of the operand.
13580 * config/h8300/h8300.md (length_table): Corresponding changes. All
13581 references to "addb", "addw" and "addl" changed to "add".
13582 (btst patterns): Merge two variants into a single pattern.
13583 (tstqi, tsthi): Likewise.
13584 (addhi3_incdec, addsi3_incdec): Likewise.
13585 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
13586 (mulhi3, mulsi3): Likewise.
13587 (udivhi3, udivsi3): Likewise.
13588 (divhi3, divsi3): Likewise.
13589 (andorqi3, andorhi3, andorsi3): Likewise.
13591 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
13594 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
13595 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
13597 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13599 PR tree-optimization/85694
13600 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
13601 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
13603 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
13604 (<u>avg<mode>3_ceil): New patterns.
13606 2018-07-03 David Malcolm <dmalcolm@redhat.com>
13608 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
13609 scan-tree-dump directive.
13610 * gcc.dg/vect/slp-perm-2.c: Likewise.
13611 * gcc.dg/vect/slp-perm-3.c: Likewise.
13612 * gcc.dg/vect/slp-perm-5.c: Likewise.
13613 * gcc.dg/vect/slp-perm-6.c: Likewise.
13614 * gcc.dg/vect/slp-perm-7.c: Likewise.
13615 * gcc.dg/vect/slp-perm-8.c: Likewise.
13617 2018-07-03 Marek Polacek <polacek@redhat.com>
13619 PR middle-end/86202
13620 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
13622 2018-07-03 Richard Biener <rguenther@suse.de>
13625 * tree-ssa-structalias.c (find_func_clobbers): Properly
13626 handle indirect calls.
13628 2018-07-03 Jeff Law <law@redhat.com>
13630 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
13631 (shifts): New code iterator.
13632 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
13633 expander. Fix HImode handling on H8/SX.
13634 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
13635 (subqi3, subhi3, subsi3 expanders): Likewise.
13636 (andqi3, andhi3, andsi3 expanders): Likewise.
13637 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
13638 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
13639 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
13640 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
13641 (zero_extendqihi2, zero_extendqisi2): Likewise.
13642 (extendqihi2, extendqisi2): Likewise.
13643 (rotlqi3, rotlhi3, rotlsi3): Likewise.
13644 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
13645 (rotlqi3_1, rotlhi3_1): Likewise.
13646 (logicalhi3_sn, logicalsi3_sn): Likewise.
13647 (logicalhi3, logicalsi3): Likewise.
13649 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13651 * tree-vect-patterns.c (vect_recog_rotate_pattern)
13652 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13653 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
13654 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
13655 type to append_pattern_def_seq instead of creating a stmt_vec_info
13657 (build_mask_conversion): Likewise. Remove vinfo argument.
13658 (vect_add_conversion_to_patterm): Likewise, renaming to...
13659 (vect_add_conversion_to_pattern): ...this.
13660 (vect_recog_mask_conversion_pattern): Update call to
13661 build_mask_conversion. Pass the vector type to
13662 append_pattern_def_seq here too.
13663 (vect_recog_gather_scatter_pattern): Update call to
13664 vect_add_conversion_to_pattern.
13666 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13668 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
13669 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13670 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
13671 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
13672 STMT_VINFO_PATTERN_DEF_SEQ to null here.
13673 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
13674 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
13675 append_pattern_def_seq instead of new_pattern_def_seq.
13676 (vect_recog_divmod_pattern): Do both of the above.
13677 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
13680 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13682 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
13683 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
13684 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
13685 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
13686 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
13687 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13688 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
13689 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13690 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13691 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
13692 parameter with a single stmt_vec_info.
13693 (vect_recog_func_ptr): Likewise.
13694 (vect_recog_gather_scatter_pattern): Likewise, folding in...
13695 (vect_try_gather_scatter_pattern): ...this.
13696 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
13697 the stmt_vec_info of the statement to be matched. Don't clear
13698 STMT_VINFO_RELATED_STMT.
13699 (vect_pattern_recog): Update call accordingly.
13701 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13703 PR tree-optimization/85694
13704 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
13705 (uavgM3_ceil): Document new optabs.
13706 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
13707 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
13709 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
13710 (savg_ceil_optab): New optabs.
13711 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
13712 (vect_vect_recog_func_ptrs): Add it.
13713 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
13714 constant directly from the associated lhs.
13716 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13718 * tree-vect-patterns.c (vect_split_statement): New function.
13719 (vect_convert_input): Use it to try to split an existing cast.
13721 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13723 * poly-int.h (print_hex): New function.
13724 * dumpfile.h (dump_dec, dump_hex): Declare.
13725 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
13726 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
13727 min_input_precision, operation_precision and operation_sign.
13728 * tree-vect-patterns.c (vect_get_range_info): New function.
13729 (vect_same_loop_or_bb_p, vect_single_imm_use)
13730 (vect_operation_fits_smaller_type): Delete.
13731 (vect_look_through_possible_promotion): Add an optional
13732 single_use_p parameter.
13733 (vect_recog_over_widening_pattern): Rewrite to use new
13734 stmt_vec_info infomration. Handle one operation at a time.
13735 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
13736 (vect_truncatable_operation_p, vect_set_operation_type)
13737 (vect_set_min_input_precision): New functions.
13738 (vect_determine_min_output_precision_1): Likewise.
13739 (vect_determine_min_output_precision): Likewise.
13740 (vect_determine_precisions_from_range): Likewise.
13741 (vect_determine_precisions_from_users): Likewise.
13742 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
13743 (vect_vect_recog_func_ptrs): Put over_widening first.
13745 (vect_pattern_recog): Call vect_determine_precisions.
13747 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13749 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
13750 statements that have been replaced by further pattern statements.
13751 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
13753 2018-07-03 Richard Biener <rguenther@suse.de>
13755 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
13756 always set *dt. Dump vectype in vectype overload.
13757 * dumpfile.h (dump_gimple_expr): New function.
13758 (dump_gimple_expr_loc): Likewise.
13759 * dumpfile.c (dump_gimple_expr): New function.
13760 (dump_gimple_expr_loc): Likewise.
13762 2018-07-02 Jeff Law <law@redhat.com>
13764 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
13765 the H8/300, H8/300H and H8/S variants into a single pattern.
13766 (movhi_h8300, movqi_h8300hs): Similarly.
13767 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
13768 (QHI mode iterator): New.
13770 * config/h8300/h8300.md: Remove trailing whitespace.
13772 2018-07-02 Jim Wilson <jimw@sifive.com>
13774 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
13775 instead of emit_insn for interrupt returns.
13776 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
13777 (riscv_sret, riscv_uret): Likewise.
13779 2018-07-02 David Malcolm <dmalcolm@redhat.com>
13781 * pretty-print.c (selftest::test_pp_format): Move save and restore
13782 of quotes to class auto_fix_quotes, and add an instance.
13783 * selftest.c: Include "intl.h".
13784 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
13785 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
13786 * selftest.h (selftest::auto_fix_quotes): New class.
13788 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
13790 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
13791 (aarch64_sve_prepare_conditional_op): Remove.
13792 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
13793 Allow aarch64_simd_reg_or_zero as select operand; remove
13794 the aarch64_sve_prepare_conditional_op call.
13795 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
13796 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13797 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
13798 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
13799 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
13800 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
13801 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
13802 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
13803 and a splitters to match all of the *_any patterns.
13804 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
13806 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
13807 (SVE_COND_FP_BINARY_REV): Remove.
13808 (sve_int_op_rev, sve_fp_op_rev): New.
13809 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
13810 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
13811 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
13812 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
13813 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
13814 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
13815 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
13816 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
13817 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
13819 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
13820 Remove match_dup 1 from the inner unspec.
13821 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13823 * config/aarch64/aarch64.md (movprfx): New attr.
13824 (length): Default movprfx to 8.
13825 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
13826 (*madd<SVE_I>, *msub<SVE_I): Likewise.
13827 (*<su>mul<SVE_I>3_highpart): Likewise.
13828 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
13829 (*v<ASHIFT><SVE_I>3): Likewise.
13830 (*<su><MAXMIN><SVE_I>3): Likewise.
13831 (*<su><MAXMIN><SVE_F>3): Likewise.
13832 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
13833 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
13834 (*div<SVE_F>4): Likewise.
13836 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
13838 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
13841 2018-07-02 Richard Biener <rguenther@suse.de>
13843 PR tree-optimization/86363
13844 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
13845 memset argument refers to a non-variable address.
13847 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
13849 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
13850 {PLUS,MINUS}_EXPR code to...
13851 (adjust_symbolic_bound): ...here,
13852 (combine_bound): ...here,
13853 (set_value_range_with_overflow): ...and here.
13855 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
13857 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
13859 (extract_range_from_abs_expr): ...here.
13861 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
13863 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
13864 -fno-omit-frame-pointer when not optimizing.
13866 2018-07-02 Martin Liska <mliska@suse.cz>
13869 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
13870 (propagate_nothrow): Likewise.
13872 2018-07-02 Martin Liska <mliska@suse.cz>
13875 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
13877 2018-07-02 David Malcolm <dmalcolm@redhat.com>
13879 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
13880 function in r262149, changing "loc" param from source_location to
13881 const dump_location_t &.
13882 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
13883 declaration, as above.
13885 2018-07-01 Paul Koning <ni1d@arrl.net>
13887 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13888 -munit-asm, -mgnu-asm, -mdec-asm.
13889 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
13890 (pdp11_output_labelref): New.
13891 (pdp11_output_def): New.
13892 (pdp11_output_addr_vec_elt): New.
13893 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
13894 %# and %@ format codes.
13895 (pdp11_option_override): New.
13896 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
13897 (pdp11_output_ident): New.
13898 (pdp11_asm_named_section): New.
13899 (pdp11_asm_init_sections): New.
13900 (pdp11_file_start): New.
13901 (pdp11_file_end): New.
13902 (output_ascii): Use .ascii/.asciz for -mdec-asm.
13903 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
13904 %o, like %c but octal.
13905 (pdp11_option_override): New.
13906 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
13908 (DATA_SECTION_ASM_OP): Ditto.
13909 (READONLY_DATA_SECTION_ASM_OP): New.
13910 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
13911 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
13912 (ASM_OUTPUT_LABELREF): Ditto.
13913 (ASM_OUTPUT_DEF): Ditto.
13914 (ASM_OUTPUT_EXTERNAL): New.
13915 (ASM_OUTPUT_SOURCE_FILENAME): New.
13916 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
13917 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
13918 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
13919 %# and %@ format codes.
13920 * config/pdp11/pdp11.opt (mgnu-asm): New.
13921 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
13922 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
13923 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
13925 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
13927 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
13928 dereferencing path[] beyond its length.
13930 (debug_all_paths): New.
13931 (rewire_first_differing_edge): New.
13932 (adjust_paths_after_duplication): New.
13933 (duplicate_thread_path): Call adjust_paths_after_duplication.
13935 (thread_through_all_blocks): Add new argument to
13936 duplicate_thread_path.
13938 2018-06-30 Jim Wilson <jimw@sifive.com>
13940 * config/riscv/predicates.md (p2m1_shift_operand): New.
13941 (high_mask_shift_operand): New.
13942 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
13943 pattern using p2m1_shift_operand.
13944 (lshsi3_zero_extend_3+2): New combiner pattern using
13945 high_mask_shift_operand.
13947 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13949 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
13951 (vect_recog_rotate_pattern): ...here.
13952 (vect_convert_input): Try to insert casts of invariants in the
13954 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
13955 preheader to be empty.
13957 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13959 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
13960 vector type. If given, install it in the new statement's
13961 STMT_VINFO_VECTYPE.
13962 (vect_element_precision): New function.
13963 (vect_unpromoted_value): New struct.
13964 (vect_unpromoted_value::vect_unpromoted_value): New function.
13965 (vect_unpromoted_value::set_op): Likewise.
13966 (vect_look_through_possible_promotion): Likewise.
13967 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
13968 (vect_widened_op_tree, vect_convert_input): Likewise.
13969 (vect_convert_inputs, vect_convert_output): Likewise.
13970 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
13971 to handle the optional cast of the multiplication result and
13972 vect_widened_op_tree to detect the widened multiplication itself.
13973 Do not require the input and output of promotion casts to have
13974 the same sign, but base the signedness of the operation on the
13975 input rather than the result. If the pattern includes two
13976 promotions, check that those promotions have the same sign.
13977 Do not restrict the MULT_EXPR handling to a double-width result;
13978 handle quadruple-width results and wider. Use vect_convert_inputs
13979 to convert the inputs to the common type.
13980 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
13981 to handle the optional cast of the ABS result. Also allow a sign
13982 change or a sign extension between the ABS and MINUS.
13983 Use vect_widened_op_tree to detect the widened subtraction and use
13984 vect_convert_inputs to convert the inputs to the common type.
13985 (vect_handle_widen_op_by_const): Delete.
13986 (vect_recog_widen_op_pattern): New function.
13987 (vect_recog_widen_mult_pattern): Use it.
13988 (vect_recog_widen_shift_pattern): Likewise.
13989 (vect_recog_widen_sum_pattern): Use
13990 vect_look_through_possible_promotion to handle the promoted
13993 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13995 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
13996 the containing gimple_seq *.
13997 * gimple-iterator.h (gsi_for_stmt): Declare it.
13998 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
13999 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
14000 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
14001 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
14002 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
14004 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
14006 (vect_mark_pattern_stmts): ...here. Handle cases in which the
14007 statement being replaced is part of an existing pattern
14008 definition sequence, inserting the new pattern statements before
14010 (vect_pattern_recog_1): Don't return a bool. If the statement
14011 is already part of a pattern, instead apply pattern matching
14012 to the pattern definition statements. Don't clear the
14013 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
14014 (vect_pattern_recog): Don't break after the first match;
14015 continue processing the pattern definition statements instead.
14016 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
14018 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14020 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14021 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14022 (vect_recog_widen_sum_pattern): Use it.
14024 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14026 * tree-vect-loop.c (vectorizable_reduction): Assert that the
14027 phi is not a pattern statement and has not been replaced by
14028 a pattern statement.
14029 * tree-vect-patterns.c (type_conversion_p): Don't check
14030 STMT_VINFO_IN_PATTERN_P.
14031 (vect_recog_vector_vector_shift_pattern): Likewise.
14032 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
14033 the pattern statement rather than the original statement; check
14034 directly for a WIDEN_MULT_EXPR here.
14035 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
14036 vect_is_simple_use to return the pattern statement rather
14037 than the original statement; use is_pattern_stmt_p to check
14038 for such a pattern statement.
14039 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
14040 to return the pattern statement rather than the original statement;
14041 don't do the same transformation here.
14042 (vect_is_simple_use): If the defining statement has been replaced
14043 by a pattern statement, return the pattern statement instead.
14044 Remove the corresponding (local) transformation from the vectype
14047 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14049 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
14050 end and default to null.
14051 * tree-vect-loop.c (vect_create_epilog_for_reduction)
14052 (vectorizable_reduction): Update calls accordingly, dropping the
14053 gimple ** argument if the passed-back statement isn't needed.
14054 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
14055 (vect_recog_rotate_pattern): Likewise.
14056 (vect_recog_mask_conversion_pattern): Likewise.
14057 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
14058 (vect_mask_constant_operand_p): Likewise.
14059 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
14060 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
14061 (get_group_load_store_type, get_load_store_type): Likewise.
14062 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
14063 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
14064 (vectorizable_conversion, vectorizable_assignment): Likewise.
14065 (vectorizable_shift, vectorizable_operation): Likewise.
14066 (vectorizable_store, vect_is_simple_cond): Likewise.
14067 (vectorizable_condition, vectorizable_comparison): Likewise.
14068 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
14069 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
14070 and move it to the end. Cope with null def_stmt_outs.
14072 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
14074 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
14076 2018-06-29 Jeff Law <law@redhat.com>
14078 * config/v850/v850.c (v850_legitimate_address_p): Handle large
14079 displacements for TARGET_V850E2V3 and newer.
14080 (TARGET_LRA_P): Remove. Defaults to LRA now.
14081 * config/v850/v850.md (sign23byte_load): Remove.
14082 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
14083 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
14085 2018-06-29 Martin Liska <mliska@suse.cz>
14088 * coverage.c (coverage_init): Mangle full path name.
14089 * doc/invoke.texi: Document the change.
14090 * gcov-io.c (mangle_path): New.
14091 * gcov-io.h (mangle_path): Likewise.
14092 * gcov.c (mangle_name): Use mangle_path for path mangling.
14094 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14096 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
14097 if starting source register is not even.
14099 2018-06-29 Martin Liska <mliska@suse.cz>
14101 PR tree-optimization/86263
14102 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
14103 Make edge redirection.
14105 2018-06-29 David Malcolm <dmalcolm@redhat.com>
14107 * dumpfile.c (dump_loc): Add indentation based on scope depth.
14108 (dump_scope_depth): New variable.
14109 (get_dump_scope_depth): New function.
14110 (dump_begin_scope): New function.
14111 (dump_end_scope): New function.
14112 * dumpfile.h (get_dump_scope_depth): New declaration.
14113 (dump_begin_scope): New declaration.
14114 (dump_end_scope): New declaration.
14115 (class auto_dump_scope): New class.
14116 (AUTO_DUMP_SCOPE): New macro.
14117 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
14120 2018-06-29 Richard Biener <rguenther@suse.de>
14122 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
14123 compute_all_dependences succeeds.
14124 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
14125 exceed --param loop-max-datarefs-for-datadeps.
14127 2018-06-29 Jakub Jelinek <jakub@redhat.com>
14129 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
14131 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
14134 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
14135 alternative 0 in preferred_for_speed attribute.
14137 2018-06-28 Paul Koning <ni1d@arrl.net>
14139 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
14140 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
14141 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
14142 * config/pdp11/pdp11.md: Correct "length" attribute calculation
14143 for shift insn patterns.
14145 2018-06-28 David Malcolm <dmalcolm@redhat.com>
14147 * cgraph.c (cgraph_node::get_body): Replace assignments to
14148 "dump_file" with calls to set_dump_file.
14149 * dumpfile.c (alt_dump_file): Make static, and group with...
14150 (alt_flags): ...this definition.
14151 (dumps_are_enabled): New variable.
14152 (refresh_dumps_are_enabled): New function.
14153 (set_dump_file): New function.
14154 (set_alt_dump_file): New function.
14155 (gcc::dump_manager::dump_start): Replace assignments to
14156 "dump_file" and "alt_dump_file" with calls to set_dump_file and
14158 (gcc::dump_manager::dump_finish): Likewise.
14159 * dumpfile.h (alt_dump_file): Delete decl.
14160 (dumps_are_enabled): New variable decl.
14161 (set_dump_file): New function decl.
14162 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
14164 * tree-nested.c (lower_nested_functions): Replace assignments to
14165 "dump_file" with calls to set_dump_file.
14167 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14169 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
14170 goto_locus of each outgoing edge of each basic block.
14172 2018-06-28 Richard Biener <rguenther@suse.de>
14174 * dwarf2out.c (decl_scope_table): Remove.
14175 (push_decl_scope): Likewise.
14176 (pop_decl_scope): Likewise.
14177 (gen_type_die_for_member): Do not call push/pop_decl_scope.
14178 (gen_struct_or_union_type_die): Likewise.
14179 (gen_tagged_type_die): Likewise.
14180 (dwarf2out_init): Do not initialize decl_scope_table.
14181 (dwarf2out_c_finalize): Do not free it.
14183 2018-06-28 Richard Biener <rguenther@suse.de>
14185 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
14186 deciding whether to not re-use a DIE.
14188 2018-06-28 Richard Biener <rguenther@suse.de>
14190 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
14191 DW_AT_abstract_origin attribute.
14193 2018-06-28 Martin Liska <mliska@suse.cz>
14195 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14196 Use newly introduced constants.
14197 * tree-switch-conversion.h (struct jump_table_cluster):
14198 Define max_ratio_for_size and max_ratio_for_speed.
14200 2018-06-28 Martin Liska <mliska@suse.cz>
14202 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14203 Add new checking assert to catch invalid state.
14204 (jump_table_cluster::can_be_handled): Handle single case
14206 (jump_table_cluster::is_beneficial): Bail out for such case.
14207 (bit_test_cluster::find_bit_tests):
14208 Add new checking assert to catch invalid state.
14209 (bit_test_cluster::can_be_handled): Handle single case
14211 (bit_test_cluster::is_beneficial): Bail out for such case.
14212 (switch_decision_tree::analyze_switch_statement):
14215 2018-06-28 Martin Liska <mliska@suse.cz>
14217 * common.opt: Introduce -completion option.
14218 * gcc.c (driver_handle_option): Handle it.
14219 (driver::main): Print completions if completion
14221 * opt-suggestions.c (option_proposer::get_completions):
14223 (option_proposer::suggest_completion): Likewise.
14224 (option_proposer::find_param_completions): Likewise.
14225 (verify_autocompletions): Likewise.
14226 (test_completion_valid_options): Likewise.
14227 (test_completion_valid_params): Likewise.
14228 (in_completion_p): Likewise.
14229 (empty_completion_p): Likewise.
14230 (test_completion_partial_match): Likewise.
14231 (test_completion_garbage): Likewise.
14232 (opt_proposer_c_tests): Likewise.
14233 * opt-suggestions.h: Declare new functions.
14234 * opts.c (common_handle_option): Handle OPT__completion_.
14235 * selftest-run-tests.c (selftest::run_tests): Add
14236 opt_proposer_c_tests.
14237 * selftest.c (assert_str_startswith): New.
14238 * selftest.h (assert_str_startswith): Likewise.
14239 (opt_proposer_c_tests): New.
14240 (ASSERT_STR_STARTSWITH): Likewise.
14242 2018-06-28 Martin Liska <mliska@suse.cz>
14244 * Makefile.in: Add opt-suggestions.o.
14245 * gcc-main.c: Include opt-suggestions.h.
14246 * gcc.c (driver::driver): Likewise.
14247 (driver::~driver): Remove m_option_suggestions.
14248 (driver::build_option_suggestions): Moved to option_proposer.
14249 (driver::suggest_option): Likewise.
14250 (driver::handle_unrecognized_options): Use option_proposer.
14251 * gcc.h (class driver): Add new memver m_option_proposer.
14252 * opt-suggestions.c: New file.
14253 * opt-suggestions.h: New file.
14255 2018-06-28 Martin Liska <mliska@suse.cz>
14257 * vec.h (class auto_string_vec): New (moved from auto_argvec).
14258 (auto_string_vec::~auto_string_vec): Likewise.
14260 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14262 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
14263 prevent_decl_creation_for_types fields up and add reset_location field.
14264 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
14265 statement if id->reset_location is true.
14266 (copy_edges_for_bb): Do not set goto_locus on the new edges if
14267 id->reset_location is true.
14268 (copy_phis_for_bb): Force input_location on the arguments if
14269 id->reset_location is true.
14270 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
14271 is set on the function to be inlined.
14273 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
14275 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
14277 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
14279 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
14280 registers for Pmode.
14281 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
14282 hard registers for the clobbered pseudo.
14284 2018-06-27 Paul Koning <ni1d@arrl.net>
14286 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14287 mutually exclusive options.
14288 * config/pdp11/constraints.md (h): New constraint.
14289 (O): Update definition to match shift code generation.
14290 (D): New constraint.
14291 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
14293 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
14295 (output_jump): Change arguments.
14296 (pdp11_fixed_cc_regs): New function.
14297 (pdp11_cc_mode): Ditto.
14298 (pdp11_expand_shift): Ditto.
14299 (pdp11_assemble_shift): Ditto.
14300 (pdp11_small_shift): Ditto.
14301 (pdp11_branch_cost): Remove.
14302 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
14304 (pdp11_register_move_cost): Update for CC registers.
14305 (pdp11_rtx_costs): Add case for LSHIFTRT.
14306 (pdp11_output_jump): Add CCNZ mode conditional branches.
14307 (notice_update_cc_on_set): Remove.
14308 (pdp11_cc_mode): New function.
14309 (simple_memory_operand): Correct pre/post decrement case.
14310 (no_side_effect_operand): New function.
14311 (pdp11_regno_reg_class): Add CC_REGS class.
14312 (pdp11_fixed_cc_regs): New function.
14313 (pdp11_small_shift): New function.
14314 (pdp11_expand_shift): New function to expand shift insns.
14315 (pdp11_assemble_shift): New function to output shifts.
14316 (pdp11_branch_cost): Remove.
14317 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
14318 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
14319 (WCHAR_TYPE): Ditto.
14320 (PTRDIFF_TYPE): Ditto.
14321 (ADJUST_INSN_LENGTH): New macro.
14322 (FIXED_REGISTERS): Add CC registers.
14323 (CALL_USED_REGISTERS): Ditto.
14324 (reg_class): Ditto.
14325 (REG_CLASS_NAMES): Ditto.
14326 (REG_CLASS_CONTENTS): Ditto.
14327 (SELECT_CC_MODE): Use new function.
14328 (TARGET_FLAGS_REGNUM): New macro.
14329 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
14330 (cc0_reg_rtx): Remove.
14331 (CC_STATUS_MDEP): Remove.
14332 (CC_STATUS_MDEFP_INIT): Remove.
14333 (CC_IN_FPU): Remove.
14334 (NOTICE_UPDATE_CC): Remove.
14335 (REGISTER_NAMES): Add CC registers.
14336 (BRANCH_COST): Change to constant 1.
14337 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
14339 * config/pdp11/pdp11.opt (mbcopy): Remove.
14340 (mbcopy-builtin): Remove.
14341 (mbranch-cheap): Remove.
14342 (mbranch-expensive): Remove.
14343 * config/pdp11/predicates.md (expand_shift_operand): Update to
14344 match shift code generation.
14345 (ccnz_operator): New predicate.
14346 * doc/invoke.texi (PDP-11 Options): Remove deleted options
14347 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
14348 Remove non-existent option -mabshi, -mno-abshi. Document mutually
14350 * doc/md.texi (PDP-11): Document new D and h constraints. Update
14351 description of O constraint.
14353 2018-06-27 Jeff Law <law@redhat.com>
14354 Austin Law <austinklaw@gmail.com>
14356 * config/v850/v850.md (addsi3_set_flags): New pattern.
14357 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
14358 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
14359 (zero_extendhisi2_v850_set_flags): Likewise.
14360 (zero_extendqisi2_v850_set_flags): Likewise.
14361 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
14362 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
14363 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
14365 * config/v850/v850-protos.h (notice_update_cc): Remove.
14366 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
14367 (v850_print_operand): Handle 'D' and "d".
14368 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
14369 Add handling of arithmetic/logical operations compared against zero.
14370 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
14371 Do not look at v850_compare_op, instead get mode from last argument.
14372 (v850_gen_compare): Remove
14373 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
14374 after reload for prologue insns.
14375 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
14377 (construct_save_jarl): Likewise.
14378 (TARGET_FLAGS_REGNUM): Define.
14379 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
14380 (NOTICE_UPDATE_CC): Remove.
14381 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
14382 than cc0. Conditionalize on reload_completed.
14383 (cmpsi_insn, setfcc_insn): Likewise.
14384 (tst1 splitter): Turn into define_and_split which sets the flags
14386 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
14387 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
14388 (cstoresf4, cstoredf4): Clobber the flags.
14389 (cmpsi, cmpsf, cmpdf): Remove expanders.
14390 (setf_insn): Remove pattern.
14391 (addsi3): Turn into define_and_split which clobbers the flags after
14392 reload and a suitable pattern (addsi3_clobber_flags) for use after
14394 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
14395 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
14396 (ashrsi3, ashrsi3_v850e2): Likewise.
14397 (bins): Clobber the flags.
14398 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
14399 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
14400 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
14401 (call_value_internal_short, call_value_internal_long): Likewise.
14402 (callt_save_interrupt, callt_return_interrupt): Likewise.
14403 (save_interrupt, return_interrupt): Likewise.
14404 (callt_save_all_interrupt, save_all_interrupt): Likewise.
14405 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
14406 (restore_all_interrupt, _restore_all_interrupt): Likewise.
14407 (All FP comparisons): Only allow after reload has completed.
14409 (divh, divhu): Tweak output template.
14410 (branch_z_normal, branch_z_invert): Remove
14411 (branch_nz_normal, branch_nz_invert): Likewise.
14412 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
14414 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
14415 * config/v850/v850.c (notice_update_cc): Remove.
14416 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
14417 (CC_NO_CARRY): Likewise.
14418 (NOTICE_UPDATE_CC): Define to nothing.
14419 * config/v850/v850.md: Remove block comment on cc0 handling
14420 Remove "cc" attribute from all patterns. Remove cc_status handling
14421 from all patterns. Minor formatting fixes.
14423 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14425 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
14426 (cortex-a76.cortex-a55): Likewise.
14427 * config/aarch64/aarch64-tune.md: Regenerate.
14428 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
14429 cortex-a76.cortex-a55.
14431 2018-06-27 Jeff Law <law@redhat.com>
14433 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
14434 (MULTILIB_DIRNAMES): Similarly.
14436 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
14438 * gimple.h (gimple_return_retbnd): Delete.
14439 (gimple_return_set_retbnd): Likewise.
14440 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
14441 gimple_return_set_retbnd.
14442 * gimple-pretty-print.c (dump_gimple_return): Remove call to
14443 gimple_return_retbnd and adjust.
14444 * tree-inline.h (struct copy_body_data): Remove retbnd field.
14445 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
14446 Explicitly return NULL in a couple more cases. Move assertion
14447 on debug statements and remove unreachable code.
14448 (reset_debug_binding): Do not test id->retbnd.
14449 (expand_call_inline): Do not set it.
14451 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
14453 * configure.ac: Add --disable-gcov option.
14454 * configure: Regenerate.
14455 * Makefile.in: Honour @enable_gcov@.
14456 * doc/install.texi: Document --disable-gcov.
14458 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14460 * config/arm/arm-cpus.in (cortex-a76): New entry.
14461 (cortex-a76.cortex-a55): Likewise.
14462 * config/arm/arm-tables.opt: Regenerate.
14463 * config/arm/arm-tune.md: Likewise.
14464 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
14465 * doc/invoke.texi (ARM Options): Document cortex-a76 and
14466 cortex-a76.cortex-a55.
14468 2018-06-27 Tamar Christina <tamar.christina@arm.com>
14471 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
14473 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
14475 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
14477 (EPILOGUE_USES): Likewise.
14479 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
14481 * tree-inline.c (remap_location): New function extracted from...
14482 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
14483 (copy_phis_for_bb): ...here. Call remap_location.
14484 (copy_cfg_body): Adjust call to copy_edges_for_bb.
14486 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
14488 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
14489 unaligned vsx for 16B memset.
14491 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
14494 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
14495 ieee128_float_type_node to long_double_type_node unless
14496 TARGET_LONG_DOUBLE_128 is set.
14498 2018-06-26 David Malcolm <dmalcolm@redhat.com>
14500 * cfgloop.c (get_loop_location): Convert return type from
14501 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
14502 by implicit construction from rtx_insn *, and using
14503 dump_user_location_t::from_function_decl for the fallback case.
14504 * cfgloop.h (get_loop_location): Convert return type from
14505 location_t to dump_user_location_t.
14506 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
14507 dump_printf_loc to pass in a dump_location_t rather than a
14508 location_t, via the gimple stmt.
14509 * coverage.c (get_coverage_counts): Update calls to
14510 dump_printf_loc to pass in dump_location_t rather than a
14512 * doc/optinfo.texi (Dump types): Convert example of
14513 dump_printf_loc from taking "locus" to taking "insn". Update
14514 description of the "_loc" calls to cover dump_location_t.
14515 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
14517 (dump_user_location_t::dump_user_location_t): New constructors,
14518 from gimple *stmt and rtx_insn *.
14519 (dump_user_location_t::from_function_decl): New function.
14520 (dump_loc): Make static.
14521 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
14522 const dump_location_t &.
14523 (dump_generic_expr_loc): Delete.
14524 (dump_printf_loc): Convert param "loc" from location_t to
14525 const dump_location_t &.
14526 (selftest::test_impl_location): New function.
14527 (selftest::dumpfile_c_tests): New function.
14528 * dumpfile.h: Include "profile-count.h".
14529 (class dump_user_location_t): New class.
14530 (struct dump_impl_location_t): New struct.
14531 (class dump_location_t): New class.
14532 (dump_printf_loc): Convert 2nd param from source_location to
14533 const dump_location_t &.
14534 (dump_generic_expr_loc): Delete.
14535 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
14536 const dump_location_t &.
14537 * gimple-fold.c (fold_gimple_assign): Update call to
14538 dump_printf_loc to pass in a dump_location_t rather than a
14539 location_t, via the gimple stmt.
14540 (gimple_fold_call): Likewise.
14541 * gimple-loop-interchange.cc
14542 (loop_cand::analyze_iloop_reduction_var): Update for change to
14543 check_reduction_path.
14544 (tree_loop_interchange::interchange): Update for change to
14545 find_loop_location.
14546 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
14547 change in return-type of find_loop_location.
14548 (graphite_regenerate_ast_isl): Likewise.
14549 * graphite-optimize-isl.c (optimize_isl): Likewise.
14550 * graphite.c (graphite_transform_loops): Likewise.
14551 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
14552 pass in a dump_location_t rather than a location_t, via the
14554 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14555 * ipa.c (walk_polymorphic_call_targets): Likewise.
14556 * loop-unroll.c (report_unroll): Convert "locus" param from
14557 location_t to dump_location_t.
14558 (decide_unrolling): Update for change to get_loop_location's
14560 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
14561 location_t to dump_user_location_t.
14562 (grid_find_single_omp_among_assignments_1): Updates calls to
14563 dump_printf_loc to pass in a dump_location_t rather than a
14564 location_t, via the gimple stmt.
14565 (grid_parallel_clauses_gridifiable): Convert "tloc" from
14566 location_t to dump_location_t. Updates calls to dump_printf_loc
14567 to pass in a dump_location_t rather than a location_t, via the
14569 (grid_inner_loop_gridifiable_p): Likewise.
14570 (grid_dist_follows_simple_pattern): Likewise.
14571 (grid_gfor_follows_tiling_pattern): Likewise.
14572 (grid_target_follows_gridifiable_pattern): Likewise.
14573 (grid_attempt_target_gridification): Convert initialization
14574 of local "grid" from memset to zero-initialization; FIXME: does
14575 this require C++11? Update call to dump_printf_loc to pass in a
14576 optinfo_location rather than a location_t, via the gimple stmt.
14577 * profile.c (read_profile_edge_counts): Updates call to
14578 dump_printf_loc to pass in a dump_location_t rather than a
14580 (compute_branch_probabilities): Likewise.
14581 * selftest-run-tests.c (selftest::run_tests): Call
14583 * selftest.h (dumpfile_c_tests): New decl.
14584 * tree-loop-distribution.c (pass_loop_distribution::execute):
14585 Update for change in return type of find_loop_location.
14586 * tree-parloops.c (parallelize_loops): Likewise.
14587 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
14588 "locus" from location_t to dump_user_location_t.
14589 (canonicalize_loop_induction_variables): Likewise.
14590 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
14591 for change in return type of find_loop_location.
14592 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
14593 to dump_printf_loc to pass in a dump_location_t rather than a
14594 location_t, via the stmt.
14595 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
14597 * tree-vect-loop-manip.c (find_loop_location): Convert return
14598 type from source_location to dump_user_location_t.
14599 (vect_do_peeling): Update for above change.
14600 (vect_loop_versioning): Update for change in type of
14602 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
14603 from location_t to dump_user_location_t.
14604 (vect_estimate_min_profitable_iters): Update for change in type
14606 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
14607 location_t to dump_location_t.
14608 (vect_slp_bb): Update for change in type of vect_location.
14609 * tree-vectorizer.c (vect_location): Convert from source_location
14610 to dump_user_location_t.
14611 (try_vectorize_loop_1): Update for change in vect_location's type.
14612 (vectorize_loops): Likewise.
14613 (increase_alignment): Likewise.
14614 * tree-vectorizer.h (vect_location): Convert from source_location
14615 to dump_user_location_t.
14616 (find_loop_location): Convert return type from source_location to
14617 dump_user_location_t.
14618 (check_reduction_path): Convert 1st param from location_t to
14619 dump_user_location_t.
14620 * value-prof.c (check_counter): Update call to dump_printf_loc to
14621 pass in a dump_user_location_t rather than a location_t; update
14622 call to error_at for change in type of "locus".
14623 (check_ic_target): Update call to dump_printf_loc to
14624 pass in a dump_user_location_t rather than a location_t, via the
14627 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
14629 * config/s390/s390.h (enum processor_flags): Do not use
14630 default tune parameter when -march was specified.
14632 2018-06-26 Jakub Jelinek <jakub@redhat.com>
14635 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
14636 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
14639 2018-06-26 Richard Biener <rguenther@suse.de>
14641 PR tree-optimization/86287
14643 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
14644 (vect_analyze_loop): Initialize n_stmts.
14646 2018-06-26 Richard Biener <rguenther@suse.de>
14648 PR middle-end/86271
14649 * fold-const.c (fold_convertible_p): Pointer extension
14652 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
14655 * dwarf2out.c (loc_list_has_views): Adjust comments.
14656 (dw_loc_list): Split single cross-partition range with
14659 2018-06-25 Jeff Law <law@redhat.com>
14661 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
14662 on -mbig-switch by default.
14664 * config/v850/predicates.md (const_float_1_operand): Fix match_code
14666 (const_float_0_operand): Remove unused predicate.
14667 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
14668 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
14669 (recipsf2): New expander. Original pattern now called
14671 (recipdf2, recipdf2_insn): Similarly.
14672 (rsqrtsf2, rsqrtsf2_insn): Similarly
14673 (rsqrtdf2, rsqrtdf2_insn): Similarly
14675 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
14677 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
14678 Simplify logic for FreeBSD (twice).
14680 2018-06-25 Martin Sebor <msebor@redhat.com>
14682 PR tree-optimization/86204
14683 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
14684 a strnlen result if it's less than the length of the string.
14686 2018-06-25 Martin Sebor <msebor@redhat.com>
14688 PR tree-optimization/85700
14689 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
14690 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
14691 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
14693 2018-06-25 Martin Sebor <msebor@redhat.com>
14695 * doc/extend.texi (Zero-length arrays): Update and clarify.
14697 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
14699 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
14700 added IEEE/IBM long double multilib support on PowerPC little
14701 endian Linux systems.
14702 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
14703 (MULTILIB_DEFAULTS): Likewise.
14704 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14706 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
14707 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
14708 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
14710 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
14712 PR middle-end/86311
14713 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
14714 (REORDER_45): Likewise.
14716 2018-06-25 Jeff Law <law@redhat.com>
14718 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
14719 dividend to 32 bits. Adjust length.
14720 (udivmodhi4): Cleanup output template. Fix length.
14722 2018-06-25 Carl Love <cel@us.ibm.com>
14724 * config/rs6000/vsx.md: Change word selector to prefered location.
14726 2018-06-25 Richard Biener <rguenther@suse.de>
14728 PR tree-optimization/86304
14729 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
14730 epilogue-if-converted loops as well.
14732 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
14734 * lto-section-out.c (lto_begin_section): Do not print section
14735 name for noaddr and unnumbered dumps.
14737 2018-06-25 Richard Biener <rguenther@suse.de>
14739 * tree-vectorizer.h (struct vec_info_shared): New structure
14740 with parts split out from struct vec_info and loop_nest from
14741 struct _loop_vec_info.
14742 (struct vec_info): Adjust accordingly.
14743 (struct _loop_vec_info): Likewise.
14744 (LOOP_VINFO_LOOP_NEST): Adjust.
14745 (LOOP_VINFO_DATAREFS): Likewise.
14746 (LOOP_VINFO_DDRS): Likewise.
14747 (struct _bb_vec_info): Likewise.
14748 (BB_VINFO_DATAREFS): Likewise.
14749 (BB_VINFO_DDRS): Likewise.
14750 (struct _stmt_vec_info): Add dr_aux member.
14751 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
14752 (DR_MISALIGNMENT_UNINITIALIZED): New.
14753 (set_dr_misalignment): Adjust.
14754 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
14755 (vect_analyze_loop): Adjust prototype.
14756 (vect_analyze_loop_form): Likewise.
14757 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14758 Compute dependences lazily.
14759 (vect_record_base_alignments): Use shared datarefs/ddrs.
14760 (vect_verify_datarefs_alignment): Likewise.
14761 (vect_analyze_data_refs_alignment): Likewise.
14762 (vect_analyze_data_ref_accesses): Likewise.
14763 (vect_analyze_data_refs): Likewise.
14764 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
14765 constructor parameter for shared part.
14766 (vect_analyze_loop_form): Pass in shared part and adjust.
14767 (vect_analyze_loop_2): Pass in storage for the number of
14768 stmts. Move loop nest finding to the caller. Compute
14770 (vect_analyze_loop): Pass in shared part.
14771 (vect_transform_loop): Verify shared datarefs are unchanged.
14772 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
14773 constructor parameter for shared part.
14774 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
14775 (vect_slp_bb): Verify shared datarefs are unchanged before
14777 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
14779 (new_stmt_vec_info): Initialize DR_AUX misalignment to
14780 DR_MISALIGNMENT_UNINITIALIZED.
14781 * tree-vectorizer.c (vec_info::vec_info): Add constructor
14782 parameter for shared part.
14783 (vec_info::~vec_info): Adjust.
14784 (vec_info_shared::vec_info_shared): New.
14785 (vec_info_shared::~vec_info_shared): Likewise.
14786 (vec_info_shared::save_datarefs): Likewise.
14787 (vec_info_shared::check_datarefs): Likewise.
14788 (try_vectorize_loop_1): Construct shared part live for analyses
14789 of a single loop for multiple vector sizes.
14790 * tree-parloops.c (gather_scalar_reductions): Adjust.
14792 2018-06-25 Richard Biener <rguenther@suse.de>
14794 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
14795 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
14796 (vect_analyze_data_refs): Remove similar code from here and
14797 simplify accordingly.
14799 2018-06-25 Richard Biener <rguenther@suse.de>
14801 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
14802 for reverse storage order accesses rather than asserting
14803 they cannot happen here.
14805 2018-06-25 Tom de Vries <tdevries@suse.de>
14808 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
14809 Use data16 instead of .byte for insn prefix.
14811 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
14814 * parser.c (make_char_string_pack): Pass this literal chars
14815 through cpp_interpret_string.
14816 (cp_parser_userdef_numeric_literal): Check the result of
14817 make_char_string_pack.
14819 2018-06-24 Maya Rashish <coypu@sdf.org>
14821 * ginclude/stddef.h: Simplify conditions around avoiding
14822 re-definition of __size_t.
14824 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14826 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
14827 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
14829 2018-06-22 Maya Rashish <coypu@sdf.org>
14831 * doc/invoke.texi (mno-fancy-math-387): Update for changes
14832 made to OpenBSD and NetBSD through the years.
14834 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14836 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14837 behavior of vec_pack (vector double, vector double) to match
14838 behavior of vec_float2 (vector double, vector double).
14840 2018-06-22 Olivier Hainque <hainque@adacore.com>
14842 * gimplify.c (gimplify_function_tree): Prevent creation
14843 of a trampoline for the address of the current function
14844 passed to entry/exit instrumentation hooks.
14846 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
14849 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
14852 2018-06-22 Martin Liska <mliska@suse.cz>
14854 PR tree-optimization/86263
14855 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14856 Bail out if is_enabled is false.
14857 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
14859 (jump_table_cluster::is_enabled): New function.
14861 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14863 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14864 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
14865 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
14866 (lto_input_ts_binfo_tree_pointers): Likewise.
14867 * tree-streamer-out.c (streamer_write_tree_bitfields,
14868 write_ts_binfo_tree_pointers): Likewise.
14869 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
14871 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14873 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
14875 2018-06-22 Martin Liska <mliska@suse.cz>
14877 * symbol-summary.h (get): Make it pure and inline move
14878 functionality from ::get function.
14879 (get): Remove and inline into ::get and ::get_create.
14880 (get_create): Move code from ::get function.
14882 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14885 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
14886 -x assembler-with-cpp.
14888 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14890 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
14891 _FILE_OFFSET_BITS=64 for C++.
14893 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
14895 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
14896 conversion insn that shows up when pr85657-3.c is compiled using
14897 IEEE 128-bit long double.
14898 (neg<mode>2_internal): Use the correct mode to check whether the
14899 mode is IBM extended.
14900 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
14901 multiply and divide external functions from being created more
14904 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14906 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
14908 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
14909 the edge can be forwarded.
14910 (cfg_layout_merge_blocks): Likewise.
14912 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14914 * except.c (finish_eh_generation): Commit edge insertions only after
14915 the EH edges have been redirected from post-landing to landing pads.
14917 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14919 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
14920 create_tmp_var_for to create the FRAME decl.
14921 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
14923 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14925 * tree-inline.c (copy_edges_for_bb): Minor tweak.
14926 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
14927 debug statement when resetting its value.
14928 (expand_call_inline): Copy the locus of the call onto the assignment
14929 of the return value, if any. Use local variable in more cases.
14931 2018-06-21 Martin Liska <mliska@suse.cz>
14933 * ipa-pure-const.c (propagate_nothrow): Use
14934 funct_state_summaries->get.
14935 (dump_malloc_lattice): Likewise.
14936 (propagate_malloc): Likewise.
14938 2018-06-21 Richard Biener <rguenther@suse.de>
14940 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
14941 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
14942 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
14944 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
14945 BLOCK_ABSTRACT_ORIGIN unconditionally.
14947 2018-06-21 David Malcolm <dmalcolm@redhat.com>
14949 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
14951 * ipa-reference.c (ipa_reference_c_finalize): Delete
14952 ipa_ref_opt_sum_summaries and set it to NULL.
14954 2018-06-21 Tom de Vries <tdevries@suse.de>
14956 PR tree-optimization/85859
14957 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
14958 test with comment from bb_no_side_effects_p.
14960 2018-06-21 Richard Biener <rguenther@suse.de>
14962 PR tree-optimization/86232
14963 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
14964 max for constant niter.
14966 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
14968 * config/aarch64/aarch64-simd.md
14969 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
14971 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
14973 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
14974 Make opernads of the unspec commutative.
14976 2018-06-21 Richard Biener <rguenther@suse.de>
14978 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
14979 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
14980 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
14981 (vect_analyze_data_ref_dependence): Re-order checks to deal with
14983 (vect_record_base_alignments): Do not record base alignment
14984 for gathers or scatters.
14985 (vect_compute_data_ref_alignment): Drop return value that is always
14986 true. Bail out early for gathers or scatters.
14987 (vect_enhance_data_refs_alignment): Bail out early for gathers
14989 (vect_find_same_alignment_drs): Likewise.
14990 (vect_analyze_data_refs_alignment): Remove dead code.
14991 (vect_slp_analyze_and_verify_node_alignment): Likewise.
14992 (vect_analyze_data_refs): For possible gathers or scatters do
14993 not create an alternate DR, just check their possible validity
14994 and mark them. Adjust DECL_NONALIASED handling to not rely
14995 on DR_BASE_ADDRESS.
14996 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
14997 update inits of gathers or scatters.
14998 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
14999 Also copy gather/scatter flag to pattern vinfo.
15001 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
15003 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15004 behavior of vec_packsu (vector unsigned long long, vector unsigned
15005 long long) to match behavior of vec_packs with same signature.
15007 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
15008 Thomas Schwinge <thomas@codesourcery.com>
15009 Cesar Philippidis <cesar@codesourcery.com>
15011 * gimplify.c (gimplify_scan_omp_clauses): Add support for
15012 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15013 (gimplify_adjust_omp_clauses): Likewise.
15014 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
15015 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
15016 (gimplify_omp_target_update): Update handling of acc update and
15018 * omp-low.c (install_var_field): Remove unused parameter
15019 base_pointers_restrict.
15020 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
15021 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
15023 (omp_target_base_pointers_restrict_p): Delete.
15024 (scan_omp_target): Update call to scan_sharing_clauses.
15025 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
15027 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
15028 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15029 (convert_local_omp_clauses): Likewise.
15030 * tree-pretty-print.c (dump_omp_clause): Likewise.
15031 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
15033 (omp_clause_code_name): Likewise.
15035 2018-06-20 Jakub Jelinek <jakub@redhat.com>
15038 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
15041 PR tree-optimization/86231
15042 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
15043 anti-range don't overwrite *vr0min before using it to compute *vr0max.
15045 2018-06-20 Tom de Vries <tdevries@suse.de>
15047 PR tree-optimization/86097
15048 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
15049 iv type if signedness of iv type is not the same as that of *nit.
15051 2018-06-20 Jakub Jelinek <jakub@redhat.com>
15053 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
15054 EDGE_EH edges, verify they are all EDGE_EH.
15056 2018-06-20 Maya Rashish <coypu@sdf.org>
15058 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
15060 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15062 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
15063 * config/aarch64/aarch64.c (xgene1_tunings): Add
15064 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
15065 (aarch64_mode_valid_for_sched_fusion_p):
15066 Allow 16-byte modes.
15067 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
15068 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
15070 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
15072 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
15073 * config/aarch64/iterators.md (VQ2): New mode iterator.
15075 2018-06-20 Martin Liska <mliska@suse.cz>
15077 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15078 Change default ratio from 10 to 8.
15080 2018-06-20 Martin Liska <mliska@suse.cz>
15082 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15084 (bit_test_cluster::find_bit_tests): Likewise.
15085 (switch_decision_tree::analyze_switch_statement): Find clusters.
15086 * tree-switch-conversion.h (struct jump_table_cluster): Document
15089 2018-06-20 Martin Liska <mliska@suse.cz>
15091 * tree-switch-conversion.c (switch_conversion::collect):
15092 Record m_uniq property.
15093 (switch_conversion::expand): Bail out for special conditions.
15094 (group_cluster::~group_cluster): New.
15095 (group_cluster::group_cluster): Likewise.
15096 (group_cluster::dump): Likewise.
15097 (jump_table_cluster::emit): New.
15098 (switch_decision_tree::fix_phi_operands_for_edges): New.
15099 (struct case_node): Remove struct.
15100 (jump_table_cluster::can_be_handled): New.
15101 (case_values_threshold): Moved to header.
15102 (reset_out_edges_aux): Likewise.
15103 (jump_table_cluster::is_beneficial): New.
15104 (bit_test_cluster::can_be_handled): Likewise.
15105 (add_case_node): Remove.
15106 (bit_test_cluster::is_beneficial): New.
15107 (case_bit_test::cmp): New.
15108 (bit_test_cluster::emit): New.
15109 (expand_switch_as_decision_tree_p): Remove.
15110 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
15111 (fix_phi_operands_for_edge): Likewise.
15112 (switch_decision_tree::analyze_switch_statement): New.
15113 (compute_cases_per_edge): Move ...
15114 (switch_decision_tree::compute_cases_per_edge): ... here.
15115 (try_switch_expansion): Likewise.
15116 (switch_decision_tree::try_switch_expansion): Likewise.
15117 (record_phi_operand_mapping): Likewise.
15118 (switch_decision_tree::record_phi_operand_mapping): Likewise.
15119 (emit_case_decision_tree): Likewise.
15120 (switch_decision_tree::emit): Likewise.
15121 (balance_case_nodes): Likewise.
15122 (switch_decision_tree::balance_case_nodes): Likewise.
15123 (dump_case_nodes): Likewise.
15124 (switch_decision_tree::dump_case_nodes): Likewise.
15125 (emit_jump): Likewise.
15126 (switch_decision_tree::emit_jump): Likewise.
15127 (emit_cmp_and_jump_insns): Likewise.
15128 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
15129 (emit_case_nodes): Likewise.
15130 (switch_decision_tree::emit_case_nodes): Likewise.
15131 (conditional_probability): Remove.
15132 * tree-switch-conversion.h (enum cluster_type): New.
15134 (struct cluster): Likewise.
15135 (cluster::cluster): Likewise.
15136 (struct simple_cluster): Likewise.
15137 (simple_cluster::simple_cluster): Likewise.
15138 (struct group_cluster): Likewise.
15139 (struct jump_table_cluster): Likewise.
15140 (struct bit_test_cluster): Likewise.
15141 (struct min_cluster_item): Likewise.
15142 (struct case_tree_node): Likewise.
15143 (case_tree_node::case_tree_node): Likewise.
15144 (jump_table_cluster::case_values_threshold): Likewise.
15145 (struct case_bit_test): Likewise.
15146 (struct switch_decision_tree): Likewise.
15147 (struct switch_conversion): Likewise.
15148 (switch_decision_tree::reset_out_edges_aux): Likewise.
15150 2018-06-20 Martin Liska <mliska@suse.cz>
15152 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
15153 (hoist_edge_and_branch_if_true): Likewise.
15154 (expand_switch_using_bit_tests_p): Likewise.
15155 (struct case_bit_test): Likewise.
15156 (case_bit_test_cmp): Likewise.
15157 (emit_case_bit_tests): Likewise.
15158 (switch_conversion::switch_conversion): New class.
15159 (struct switch_conv_info): Remove old struct.
15160 (collect_switch_conv_info): More to ...
15161 (switch_conversion::collect): ... this.
15162 (check_range): Likewise.
15163 (switch_conversion::check_range): Likewise.
15164 (check_all_empty_except_final): Likewise.
15165 (switch_conversion::check_all_empty_except_final): Likewise.
15166 (check_final_bb): Likewise.
15167 (switch_conversion::check_final_bb): Likewise.
15168 (create_temp_arrays): Likewise.
15169 (switch_conversion::create_temp_arrays): Likewise.
15170 (free_temp_arrays): Likewise.
15171 (gather_default_values): Likewise.
15172 (switch_conversion::gather_default_values): Likewise.
15173 (build_constructors): Likewise.
15174 (switch_conversion::build_constructors): Likewise.
15175 (constructor_contains_same_values_p): Likewise.
15176 (switch_conversion::contains_same_values_p): Likewise.
15177 (array_value_type): Likewise.
15178 (switch_conversion::array_value_type): Likewise.
15179 (build_one_array): Likewise.
15180 (switch_conversion::build_one_array): Likewise.
15181 (build_arrays): Likewise.
15182 (switch_conversion::build_arrays): Likewise.
15183 (gen_def_assigns): Likewise.
15184 (switch_conversion::gen_def_assigns): Likewise.
15185 (prune_bbs): Likewise.
15186 (switch_conversion::prune_bbs): Likewise.
15187 (fix_phi_nodes): Likewise.
15188 (switch_conversion::fix_phi_nodes): Likewise.
15189 (gen_inbound_check): Likewise.
15190 (switch_conversion::gen_inbound_check): Likewise.
15191 (process_switch): Use the newly created class.
15192 (switch_conversion::expand): New.
15193 (switch_conversion::~switch_conversion): New.
15194 * tree-switch-conversion.h: New file.
15196 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15198 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
15199 tree-vect-patterns.c.
15200 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
15201 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
15202 (vect_recog_sad_pattern): Likewise.
15203 (vect_recog_widen_sum_pattern): Likewise.
15204 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
15205 (vect_recog_widen_shift_pattern): Remove the type_in argument.
15206 (vect_recog_rotate_pattern): Likewise.
15207 (vect_recog_mult_pattern): Likewise.
15208 (vect_recog_vector_vector_shift_pattern): Likewise.
15209 (vect_recog_divmod_pattern): Likewise.
15210 (vect_recog_mixed_size_cond_pattern): Likewise.
15211 (vect_recog_bool_pattern): Likewise.
15212 (vect_recog_mask_conversion_pattern): Likewise.
15213 (vect_try_gather_scatter_pattern): Likewise.
15214 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
15215 (vect_recog_over_widening_pattern): Likewise.
15216 (vect_recog_gather_scatter_pattern): Likewise.
15217 (vect_recog_func_ptr): Move from tree-vectorizer.h
15218 (vect_vect_recog_func_ptrs): Move further down the file.
15219 (vect_recog_func): Likewise. Remove the third argument.
15220 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
15221 (vect_pattern_recog_1): Expect the pattern function to do any
15222 necessary target tests. Also expect it to provide a vector type.
15223 Remove the type_in handling.
15225 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15227 * tree-vect-patterns.c (vect_pattern_detected): New function.
15228 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
15229 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
15230 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
15231 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
15232 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
15233 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
15234 (vect_recog_mask_conversion_pattern)
15235 (vect_try_gather_scatter_pattern): Likewise.
15237 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15239 * tree-vect-patterns.c (vect_get_internal_def): New function.
15240 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15241 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
15242 (search_type_for_mask_1): Use it.
15244 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15246 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15247 redundant WIDEN_SUM_EXPR handling.
15248 (vect_recog_sad_pattern): Likewise.
15250 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15252 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15253 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
15254 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
15255 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
15256 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
15258 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15260 * tree-vect-stmts.c (vectorizable_call): Make sure that we
15261 use the stmt_vec_info of the original bb statement for the
15262 new zero assignment, even if the call is part of a pattern.
15264 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15266 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
15267 that the sequence is attached to the original statement rather
15268 than the pattern statement.
15269 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
15270 PATTERN_DEF_SEQ from the original statement rather than
15271 the main pattern statement.
15272 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
15273 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
15274 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
15276 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15278 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
15279 definition statements before the early exit for statements that aren't
15281 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
15283 (vect_transform_loop): ...here. Process pattern definition
15284 statements without first checking whether the main pattern
15285 statement is live or relevant.
15287 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15289 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
15290 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
15292 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
15294 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
15295 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
15296 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
15297 (expand_block_compare): Change select_block_compare_mode call.
15298 (expand_strncmp_align_check): Use new functions, fix comment.
15299 (emit_final_str_compare_gpr): New function.
15300 (expand_strn_compare): Refactor and clean up code.
15301 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
15303 2018-06-19 Tony Reix <tony.reix@atos.com>
15304 Damien Bergamini <damien.bergamini@atos.com>
15305 David Edelsohn <dje.gcc@gmail.com>
15307 * collect2.c (static_obj): New variable.
15308 (static_libs): New variable.
15309 (is_in_list): Uncomment declaration.
15310 (main): Track AIX libraries linked statically.
15311 (is_in_list): Uncomment definition.
15312 (scan_prog_file): Don't add AIX shared libraries initializer
15313 to constructor list if linking statically.
15315 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
15317 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
15319 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
15321 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
15323 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
15326 2018-06-19 Martin Liska <mliska@suse.cz>
15328 * config/i386/i386.c (ix86_can_inline_p): Do not use
15329 ipa_fn_summaries::get_create.
15330 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
15332 (devirtualization_time_bonus): Likewise.
15333 (ipcp_propagate_stage): Likewise.
15334 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15335 (edge_set_predicate): Likewise.
15336 (evaluate_conditions_for_known_args): Likewise.
15337 (evaluate_properties_for_edge): Likewise.
15338 (ipa_call_summary::reset): Tranform to ...
15339 (ipa_call_summary::~ipa_call_summary): ... this.
15340 (ipa_fn_summary::reset): Transform to ...
15341 (ipa_fn_summary::~ipa_fn_summary): ... this.
15342 (ipa_fn_summary_t::remove): Rename to ...
15343 (ipa_fn_summary_t::remove_callees): ... this.
15344 (ipa_fn_summary_t::duplicate): Use placement new
15345 instead of memory copy.
15346 (ipa_call_summary_t::duplicate): Likewise.
15347 (ipa_call_summary_t::remove): Remove.
15348 (dump_ipa_call_summary): Change get_create to get.
15349 (ipa_dump_fn_summary): Dump only when summary exists.
15350 (analyze_function_body): Use symbol_summary::get instead
15352 (compute_fn_summary): Likewise.
15353 (estimate_edge_devirt_benefit): Likewise.
15354 (estimate_edge_size_and_time): Likewise.
15355 (inline_update_callee_summaries): Likewise.
15356 (remap_edge_change_prob): Likewise.
15357 (remap_edge_summaries): Likewise.
15358 (ipa_merge_fn_summary_after_inlining): Likewise.
15359 (write_ipa_call_summary): Likewise.
15360 (ipa_fn_summary_write): Likewise.
15361 (ipa_free_fn_summary): Likewise.
15362 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
15363 (struct ipa_call_summary): Likewise.
15364 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
15366 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
15367 (estimate_size_after_inlining): Likewise.
15368 (estimate_growth): Likewise.
15369 (growth_likely_positive): Likewise.
15370 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15371 (inline_call): Likewise.
15372 * ipa-inline.c (caller_growth_limits): Likewise.
15373 (can_inline_edge_p): Likewise.
15374 (can_inline_edge_by_limits_p): Likewise.
15375 (compute_uninlined_call_time): Likewise.
15376 (compute_inlined_call_time): Likewise.
15377 (want_inline_small_function_p): Likewise.
15378 (edge_badness): Likewise.
15379 (update_caller_keys): Likewise.
15380 (update_callee_keys): Likewise.
15381 (inline_small_functions): Likewise.
15382 (inline_to_all_callers_1): Likewise.
15383 (dump_overall_stats): Likewise.
15384 (early_inline_small_functions): Likewise.
15385 (early_inliner): Likewise.
15386 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15387 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15388 * ipa-pure-const.c (malloc_candidate_p): Likewise.
15389 * ipa-split.c (execute_split_functions): Likewise.
15390 * symbol-summary.h: Likewise.
15391 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15393 2018-06-19 Richard Biener <rguenther@suse.de>
15395 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
15396 (vectorize_loops): ... here. Fix dbgcnt handling.
15397 (try_vectorize_loop): Wrap try_vectorize_loop_1.
15399 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
15402 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
15403 ieee128 argument takes up only one (vector) register, not two (floating
15406 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15408 * gimplify.c (gimplify_init_constructor): Really never clear for an
15409 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
15411 2018-06-19 Richard Biener <rguenther@suse.de>
15413 PR tree-optimization/86179
15414 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
15415 after failed recognition.
15417 2018-06-18 Martin Sebor <msebor@redhat.com>
15419 PR middle-end/85602
15420 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
15421 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
15422 Handle integer subtraction.
15423 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
15424 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
15426 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15428 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
15429 param from rtx to rtx_insn *.
15430 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
15432 (frv_ifcvt_modify_insn): Likwise.
15433 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
15434 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
15435 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
15436 as_a <rtx_insn *> cast to local "unprotected_region" once
15437 it's been established that it's not NULL or pc_rtx.
15438 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
15439 param "sethi" from rtx to rtx_insn *.
15440 (nds32_group_float_insns): Likewise for param "insn".
15441 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
15443 (vax_output_int_subtract): Likewise.
15444 * config/vax/vax.c (vax_output_int_add): Likewise for param
15446 (vax_output_int_subtract): Likewise.
15447 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
15448 (emit_pattern_after): Likewise for param "after".
15449 (emit_insn_after): Likewise.
15450 (emit_jump_insn_after): Likewise.
15451 (emit_call_insn_after): Likewise.
15452 (emit_debug_insn_after): Likewise.
15453 (emit_pattern_before): Likewise for param "before".
15454 (emit_insn_before): Likewise.
15455 (emit_jump_insn_before): Likewise.
15456 * final.c (get_insn_template): Likewise for param "insn", removing
15458 * output.h (get_insn_template): Likewise for 2nd param.
15459 * rtl.h (emit_insn_before): Likewise.
15460 (emit_jump_insn_before): Likewise.
15461 (emit_debug_insn_before_noloc): Likewise.
15462 (emit_insn_after): Likewise.
15463 (emit_jump_insn_after): Likewise.
15464 (emit_call_insn_after): Likewise.
15465 (emit_debug_insn_after): Likewise.
15466 (set_insn_deleted): Likewise for param.
15468 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
15471 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
15472 floating point modes, so that IFmode is numerically greater than
15473 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
15474 to declare the ordering. This prevents IFmode from being
15475 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
15476 machine. Include rs6000-modes.h to share the fractional values
15477 between genmodes* and the rest of the compiler.
15478 (IFmode): Likewise.
15479 (KFmode): Likewise.
15480 (TFmode): Likewise.
15481 * config/rs6000/rs6000-modes.h: New file.
15482 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
15483 meaning of rs6000_long_double_size so that 126..128 selects an
15484 appropriate 128-bit floating point type.
15485 (rs6000_option_override_internal): Likewise.
15486 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
15487 (TARGET_LONG_DOUBLE_128): Change the meaning of
15488 rs6000_long_double_size so that 126..128 selects an appropriate
15489 128-bit floating point type.
15490 (LONG_DOUBLE_TYPE_SIZE): Update comment.
15491 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
15492 source and destination to match the standard usage.
15493 (truncifkf2): Likewise.
15494 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
15495 ISA 2.07 to use an explicit clobber, instead of passing in a
15497 (copysign<mode>3_soft): Likewise.
15499 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15501 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15502 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
15503 (vect_slp_analyze_instance_dependence): Likewise.
15504 (vect_enhance_data_refs_alignment): Likewise.
15505 (vect_analyze_data_refs_alignment): Likewise.
15506 (vect_slp_analyze_and_verify_instance_alignment
15507 (vect_analyze_data_ref_accesses): Likewise.
15508 (vect_prune_runtime_alias_test_list): Likewise.
15509 (vect_analyze_data_refs): Likewise.
15510 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
15511 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
15512 (vect_analyze_scalar_cycles_1): Likewise.
15513 (vect_get_loop_niters): Likewise.
15514 (vect_analyze_loop_form_1): Likewise.
15515 (vect_update_vf_for_slp): Likewise.
15516 (vect_analyze_loop_operations): Likewise.
15517 (vect_analyze_loop): Likewise.
15518 (vectorizable_induction): Likewise.
15519 (vect_transform_loop): Likewise.
15520 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
15521 * tree-vect-slp.c (vect_analyze_slp): Likewise.
15522 (vect_make_slp_decision): Likewise.
15523 (vect_detect_hybrid_slp): Likewise.
15524 (vect_slp_analyze_operations): Likewise.
15525 (vect_slp_bb): Likewise.
15526 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
15527 (vectorizable_bswap): Likewise.
15528 (vectorizable_call): Likewise.
15529 (vectorizable_simd_clone_call): Likewise.
15530 (vectorizable_conversion): Likewise.
15531 (vectorizable_assignment): Likewise.
15532 (vectorizable_shift): Likewise.
15533 (vectorizable_operation): Likewise.
15534 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
15536 2018-06-18 Martin Sebor <msebor@redhat.com>
15538 PR tree-optimization/81384
15539 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
15540 * builtins.c (expand_builtin_strnlen): New function.
15541 (expand_builtin): Call it.
15542 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
15543 * builtins.def (BUILT_IN_STRNLEN): New.
15544 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
15545 Warn for bounds in excess of maximum object size.
15546 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
15547 single-value ranges. Handle strnlen.
15548 (handle_builtin_strlen): Handle strnlen.
15549 (strlen_check_and_optimize_stmt): Same.
15550 * doc/extend.texi (Other Builtins): Document strnlen.
15552 2018-06-18 Maya Rashish <coypu@sdf.org>
15554 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
15555 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
15556 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
15558 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
15560 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
15562 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15564 * tree.c (escaped_string::escape): Replace cast to char * by
15565 const_cast<char *> (unescaped).
15567 2018-06-18 Nick Clifton <nickc@redhat.com>
15570 * tree.c (escaped_string): New class. Converts an unescaped
15571 string into its escaped equivalent.
15572 (warn_deprecated_use): Use the new class to convert the
15573 deprecation message, if present.
15574 (test_escaped_strings): New self test.
15575 (test_c_tests): Add test_escaped_strings.
15576 * doc/extend.texi (deprecated): Add a note that the
15577 deprecation message is affected by the -fmessage-length
15578 option, and that control characters will be escaped.
15579 (#pragma GCC error): Document this pragma.
15580 (#pragma GCC warning): Likewise.
15581 * doc/invoke.texi (-fmessage-length): Document this option's
15582 effect on the #warning and #error preprocessor directives and
15583 the deprecated attribute.
15585 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
15587 * tree.c (decl_value_expr_lookup): Revert latest change.
15588 (decl_value_expr_insert): Likewise.
15590 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
15592 * gimplify.c (nonlocal_vlas): Delete.
15593 (nonlocal_vla_vars): Likewise.
15594 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
15596 (gimplify_body): Do not create and destroy nonlocal_vlas.
15597 * tree-nested.c: Include diagnostic.h.
15598 (use_pointer_in_frame): Tweak.
15599 (lookup_field_for_decl): Add assertion and declare the transformation.
15600 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
15601 internal error when the reference is in a wrong context. Do not
15602 create a debug decl by default.
15603 (note_nonlocal_block_vlas): Delete.
15604 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
15605 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
15606 create a debug decl by default.
15607 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
15608 call is in a wrong context.
15609 (fixup_vla_decls): New function.
15610 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
15611 debug variables were created.
15612 * tree.c (decl_value_expr_lookup): Add checking assertion.
15613 (decl_value_expr_insert): Likewise.
15615 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
15617 PR middle-end/82479
15618 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
15619 * tree-scalar-evolution.c (interpret_expr): Likewise.
15620 (expression_expensive_p): Likewise.
15621 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
15622 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
15623 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
15624 (ssa_defined_by_minus_one_stmt_p): New.
15626 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
15628 PR middle-end/64946
15629 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
15630 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
15631 * dojump.c (do_jump): Likewise.
15632 * expr.c (expand_expr_real_2): Check operand type's sign.
15633 * fold-const.c (const_unop): Handle ABSU_EXPR.
15634 (fold_abs_const): Likewise.
15635 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
15636 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
15637 (strip_sign_op_1): Likesise.
15638 * match.pd: Add new pattern to generate ABSU_EXPR.
15639 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
15640 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15641 * tree-eh.c (operation_could_trap_helper_p): Likewise.
15642 * tree-inline.c (estimate_operator_cost): Likewise.
15643 * tree-pretty-print.c (dump_generic_node): Likewise.
15644 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
15645 * tree.def (ABSU_EXPR): New.
15647 2018-06-16 Jakub Jelinek <jakub@redhat.com>
15649 PR middle-end/86095
15650 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
15651 documented as preserved for backward compatibility only.
15652 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
15654 PR rtl-optimization/86108
15655 * bb-reorder.c (create_forwarder_block): Renamed to ...
15656 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
15657 jump from new landing pad to the second part.
15658 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
15661 2018-06-15 Jakub Jelinek <jakub@redhat.com>
15663 PR middle-end/85878
15664 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
15665 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
15666 Only call store_expr for halves if the mode is the same.
15668 PR middle-end/86123
15669 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
15670 Fix up comment formatting.
15672 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
15674 * typed-splay-tree.h (typed_splay_tree::remove): New function.
15675 (typed_splay_tree::closure,
15676 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
15677 (typed_splay_tree::typed_splay_tree,
15678 typed_splay_tree::operator =): Declared private.
15679 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
15680 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
15681 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
15682 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
15683 typed_splay_tree::splay_tree_splay,
15684 typed_splay_tree::splay_tree_foreach_helper,
15685 typed_splay_tree::splay_tree_insert,
15686 typed_splay_tree::splay_tree_remove,
15687 typed_splay_tree::splay_tree_lookup,
15688 typed_splay_tree::splay_tree_predecessor,
15689 typed_splay_tree::splay_tree_successor,
15690 typed_splay_tree::splay_tree_min,
15691 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
15692 (typed_splay_tree::root, typed_splay_tree::comp,
15693 typed_splay_tree::delete_key,
15694 typed_splay_tree::delete_value): New data members.
15695 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
15696 typed_splay_tree::remove.
15698 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
15700 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
15701 -mginv and -mno-ginv to the assembler.
15702 * config/mips/mips.opt (-mcrc): New option.
15703 (-mginv): Likewise.
15704 * doc/invoke.text (-mcrc): Document.
15705 (-mginv): Likewise.
15707 2018-06-15 Nick Clifton <nickc@redhat.com>
15710 * tree.c (escaped_string): New class. Converts an unescaped
15711 string into its escaped equivalent.
15712 (warn_deprecated_use): Use the new class to convert the
15713 deprecation message, if present.
15714 (test_escaped_strings): New self test.
15715 (test_c_tests): Add test_escaped_strings.
15716 * doc/extend.texi (deprecated): Add a note that the
15717 deprecation message is affected by the -fmessage-length
15718 option, and that control characters will be escaped.
15719 (#pragma GCC error): Document this pragma.
15720 (#pragma GCC warning): Likewise.
15721 * doc/invoke.texi (-fmessage-length): Document this option's
15722 effect on the #warning and #error preprocessor directives and
15723 the deprecated attribute.
15725 2018-06-15 Richard Biener <rguenther@suse.de>
15727 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
15728 here, also noting vector size used.
15729 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
15730 size used in MSG_OPTIMIZED_LOCATIONS dump.
15731 (pass_slp_vectorize::execute): Adjust.
15733 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
15736 * config/arc/arc.c (arc_return_address_register): Fix
15739 2018-06-15 Richard Biener <rguenther@suse.de>
15741 PR middle-end/86159
15742 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
15743 leave useless conversion stripping to force_gimple_operand_gsi.
15744 (gimplify_build2): Likewise.
15745 (gimplify_build1): Likewise.
15747 2018-06-15 Richard Biener <rguenther@suse.de>
15749 PR middle-end/86076
15750 * tree-cfg.c (move_stmt_op): unshare invariant addresses
15751 before adjusting their block.
15753 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
15755 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
15756 multilibs for *-*-rtems*.
15757 * config/riscv/t-rtems: New file.
15759 2018-06-14 Jakub Jelinek <jakub@redhat.com>
15761 PR middle-end/86122
15762 * match.pd ((A +- CST1) +- CST2): Punt if last resort
15763 unsigned_type_for returns NULL.
15766 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
15767 subregs of multi-word pseudos unless the float mode has word size.
15769 2018-06-14 Richard Biener <rguenther@suse.de>
15771 PR middle-end/86139
15772 * tree-vect-generic.c (build_word_mode_vector_type): Remove
15773 duplicate and harmful type_hash_canon.
15774 * tree.c (type_hash_canon): Assert we didn't find ourselves.
15776 2018-06-14 Richard Biener <rguenther@suse.de>
15779 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
15782 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
15784 * config/rtems.h (STDINT_LONG32): Define.
15786 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
15787 Prachi Godbole <prachi.godbole@imgtec.com>
15789 * config/mips/mips-cpus.def: Define P6600.
15790 * config/mips/mips-tables.opt: Regenerate.
15791 * config/mips/mips.c (mips_ucbranch_type): New enum.
15792 (mips_rtx_cost_data): Add support for P6600.
15793 (mips_issue_rate): Likewise.
15794 (mips_multipass_dfa_lookahead): Likewise.
15795 (mips_avoid_hazard): Likewise.
15796 (mips_reorg_process_insns): Likewise.
15797 (mips_classify_branch_p6600): New function.
15798 * config/mips/mips.h (TUNE_P6600): New define.
15799 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
15800 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
15801 * config/mips/mips.md: Include p6600.md.
15802 (processor): Add p6600.
15803 * config/mips/p6600.md: New file.
15804 * doc/invoke.texi: Add p6600 to supported architectures.
15806 2018-06-13 Martin Sebor <msebor@redhat.com>
15808 PR tree-optimization/86114
15809 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
15811 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
15813 2018-06-13 Richard Biener <rguenther@suse.de>
15815 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
15816 Properly set vector type of the intermediate stmt.
15817 * tree-vect-stmts.c (vectorizable_operation): The destination
15818 var always has vectype_out type.
15820 2018-06-13 Jeff Law <law@redhat.com>
15822 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
15823 integer 0 for argument to print_rtl_with_bb.
15824 (rl78_reorg): Likewise.
15826 2018-06-13 David Malcolm <dmalcolm@redhat.com>
15828 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
15829 from rtx to rtx_insn *.
15830 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
15832 (add_sched_insns_for_speculation): Likewise for local "target",
15833 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15834 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
15835 from rtx_insn ** to rtx_code_label **.
15836 (reorg_emit_nops): Likewise.
15837 (c6x_reorg): Likewise for local "call_labels".
15838 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
15840 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
15841 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
15842 the loops over LABEL_REFS.
15843 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
15845 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15846 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
15847 (split_branches): Strengthen local "olabel" from rtx to
15848 rtx_insn *, adding a safe_as_a cast.
15849 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
15851 (add_insn_after): Likewise for first two params.
15852 (add_insn_before): Likewise.
15853 (remove_insn): Likewise for param.
15854 (emit_pattern_before_noloc): Likewise for second and third params.
15855 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
15856 (emit_call_insn_before_noloc): Likewise.
15857 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
15859 (emit_barrier_before): Likewise.
15860 (emit_label_before): Strengthen "label" param from "rtx" to
15861 "rtx_code_label *". Strengthen "before" param from "rtx" to
15863 (emit_insn_after_1): Strengthen "after" param from "rtx" to
15865 (emit_pattern_after_noloc): Likewise.
15866 (emit_insn_after_noloc): Likewise.
15867 (emit_jump_insn_after_noloc): Likewise.
15868 (emit_call_insn_after_noloc): Likewise.
15869 (emit_debug_insn_after_noloc): Likewise.
15870 (emit_barrier_after): Likewise.
15871 (emit_label_after): Likewise for both params.
15872 (emit_pattern_after_setloc): Likewise for "after" param. Convert
15873 "loc" param from "int" to "location_t".
15874 (emit_insn_after_setloc): Likewise.
15875 (emit_jump_insn_after_setloc): Likewise.
15876 (emit_call_insn_after_setloc): Likewise.
15877 (emit_debug_insn_after_setloc): Likewise.
15878 (emit_pattern_before_setloc): Likewise for "before" param. Convert
15879 "loc" param from "int" to "location_t".
15880 (emit_pattern_before): Convert NULL_RTX to NULL.
15881 (emit_insn_before_setloc): Convert "loc" param from "int" to
15883 (emit_jump_insn_before_setloc): Likewise.
15884 (emit_call_insn_before_setloc): Likewise.
15885 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
15886 rtx_insn *. Convert "loc" param from "int" to "location_t".
15887 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
15888 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
15889 Convert 3rd param from "int" to "location_t".
15890 (emit_barrier_before, emit_barrier_after, next_real_insn):
15891 Strengthen param from rtx to rtx_insn *.
15892 (emit_label_before): Strengthen 1st param from "rtx" to
15893 "rtx_code_label *". Strengthen 2nd param from "rtx" to
15895 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
15896 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
15897 Strengthen 2nd param from "rtx" to "rtx_insn *".
15898 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
15899 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
15900 Likewise. Convert 3rd param from "int" to "location_t".
15901 (emit_label_after): Strengthen 1st param from "rtx" to
15902 "rtx_code_label *".
15903 (next_real_insn, remove_insn): Strengthen param from "rtx" to
15905 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
15906 from "rtx" to "rtx_insn *".
15908 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
15910 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
15911 bodies streamed in with -Q.
15912 * dumpfile.c (dump_files): Add lto-stream-out dump file.
15913 * dumpfile.h (tree_dump_index): Add lto_stream_out.
15914 * gimple-streamer-out.c: Include gimple-pretty-print.h
15915 (output_bb): Dump stmts streamed.
15916 * lto-section-out.c: Include print-tree.h
15917 (lto_begin_section): Dump sections created.
15918 (lto_output_decl_index): Dump decl encoded.
15919 * lto-streamer-out.c: Include print-tree.h
15920 (create_output_block): Dump output block created.
15921 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
15922 (output_function): Dump function output.
15923 (output_constructor): Dump constructor streamed.
15924 (write_global_stream): Output indexes encoded.
15925 (produce_asm_for_decls): Dump streams encoded.
15926 * lto-streamer.c (streamer_dump_file): New global var.
15927 * lto-streamer.h (streamer_dump_file): Declare.
15928 * passes.c (ipa_write_summaries): Initialize streamer dump.
15929 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
15932 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
15935 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
15936 offsets for register save directives. Emit a second batch of save
15937 directives, if need be, when the function accesses prior frames.
15939 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15941 * config/arc/fpu.md (fmasf4): Force operand to register.
15942 (fnmasf4): Likewise.
15944 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15946 * config/arc/arc-protos.h (arc_pad_return): Remove.
15947 * config/arc/arc.c (machine_function): Remove force_short_suffix
15949 (arc_print_operand): Adjust printing of '&'.
15950 (arc_verify_short): Remove conditional printing of short suffix.
15951 (arc_final_prescan_insn): Remove reference to size_reason.
15952 (pad_return): New function.
15953 (arc_reorg): Call pad_return.
15954 (arc_pad_return): Remove.
15955 (arc_init_machine_status): Remove reference to force_short_suffix.
15956 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
15957 (attr length): When attribute iscompact is true force to 2
15958 regardless; in the case of maybe check if we want to force the
15959 instruction to have 4 bytes length.
15960 (nopv): Change it to generate 4 byte long nop as well.
15961 (blockage): New pattern.
15962 (simple_return): Remove call to arc_pad_return.
15963 (p_return_i): Likewise.
15965 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15967 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
15969 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15971 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
15974 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15976 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
15977 for ARC700 and ARCv2.
15979 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
15982 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
15983 operands[2] instead of operands[1].
15986 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
15988 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
15989 case, check whether the outer register overlaps an unallocatable
15990 register, not just whether it fits the required class.
15992 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
15994 * poly-int.h (can_div_trunc_p): Add new overload in which all values
15996 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
15997 (memrefs_conflict_p): Likewise.
15998 (init_alias_analysis): Likewise.
15999 * cfgexpand.c (expand_debug_expr): Likewise.
16000 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
16001 * cse.c (fold_rtx): Likewise.
16002 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
16003 * expr.c (emit_block_move_hints): Likewise.
16004 (clear_storage_hints, push_block, emit_push_insn): Likewise.
16005 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
16006 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
16007 (emit_group_store): Likewise.
16008 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
16009 to read the PRE/POST_MODIFY increment.
16010 * calls.c (store_one_arg): Use strip_offset.
16011 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
16013 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
16015 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
16016 (simplify_binary_operation_1): Extend CONST_INT handling to
16018 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
16019 than a HOST_WIDE_INT.
16020 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
16022 (adjust_mems, add_stores): Update accodingly.
16023 (vt_canonicalize_addr): Track polynomial offsets.
16024 (emit_note_insn_var_location): Likewise.
16025 (vt_add_function_parameter): Likewise.
16026 (vt_initialize): Likewise.
16028 2018-06-12 Jeff Law <law@redhat.com>
16030 * config.gcc (alpha*-*-freebsd*): Remove.
16031 * config/alpha/freebsd.h: Remove.
16033 2018-06-12 David Malcolm <dmalcolm@redhat.com>
16036 * spellcheck-tree.c (levenshtein_distance): Rename to...
16037 (get_edit_distance): ...this, and update for underlying renaming.
16038 * spellcheck-tree.h (levenshtein_distance): Rename to...
16039 (get_edit_distance): ...this.
16040 * spellcheck.c (levenshtein_distance): Rename to...
16041 (get_edit_distance): ...this. Convert from Levenshtein distance
16042 to Damerau-Levenshtein distance by supporting transpositions of
16043 adjacent characters. Rename "v1" to "v_next" and "v0" to
16045 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
16046 (selftest::test_edit_distance_unit_test_oneway): ...this, and
16047 update for underlying renaming.
16048 (selftest::levenshtein_distance_unit_test): Rename to...
16049 (selftest::test_get_edit_distance_unit): ...this, and update for
16050 underlying renaming.
16051 (selftest::test_find_closest_string): Add example from PR 69968
16052 where transposition helps
16053 (selftest::test_metric_conditions): Update for renaming.
16054 (selftest::test_metric_conditions): Likewise.
16055 (selftest::spellcheck_c_tests): Likewise.
16056 * spellcheck.h (levenshtein_distance): Rename both overloads to...
16057 (get_edit_distance): ...this.
16058 (best_match::consider): Update for renaming.
16060 2018-06-12 Martin Sebor <msebor@redhat.com>
16062 PR tree-optimization/85259
16063 * builtins.c (compute_objsize): Handle constant offsets.
16064 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
16065 true iff a warning has been issued.
16066 * gimple.h (gimple_nonartificial_location): New function.
16067 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
16068 gimple_nonartificial_location and handle -Wno-system-headers.
16069 (handle_builtin_stxncpy): Same.
16071 2018-06-12 Martin Sebor <msebor@redhat.com>
16074 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
16076 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
16078 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
16079 BUILTIN_VEC_XST entries for pointer to double and long long.
16081 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
16084 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16086 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16089 2018-06-12 Martin Liska <mliska@suse.cz>
16091 * doc/options.texi: Document IntegerRange.
16093 2018-06-12 Martin Liska <mliska@suse.cz>
16095 * config/i386/i386.opt: Make MPX-related options as Deprecated.
16096 * opt-functions.awk: Handle Deprecated flag.
16097 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
16099 (read_cmdline_option): Report warning for a deprecated option.
16100 * opts.h (struct cl_option): Add new field cl_deprecated.
16101 (CL_ERR_DEPRECATED): New.
16103 2018-06-12 Martin Liska <mliska@suse.cz>
16105 * doc/options.texi: Document Deprecated option flag.
16107 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16109 * config/arc/arc-arch.h (arc_extras): New enum.
16110 (arc_cpu_t):Add field extra.
16111 (arc_cpu_types): Consider the extras.
16112 * config/arc/arc-cpus.def: Add extras info.
16113 * config/arc/arc-opts.h (processor_type): Consider extra field.
16114 * config/arc/arc.c (arc_override_options): Handle extra field.
16116 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16118 * config/arc/arc-arch.h: Update ARC_OPTX macro.
16119 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
16121 * config/arc/arc.c (arc_init): Update pic warning.
16122 (irq_range): Update irq range parsing warnings.
16123 (arc_override_options): Update various warning messages.
16124 (arc_handle_aux_attribute): Likewise.
16126 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
16128 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
16130 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16132 * doc/sourcebuild.texi: Document usage of line number 0 in verify
16133 compiler messages directives.
16135 2018-06-12 Matthew Fortune <mfortune@gmail.com>
16137 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
16138 * config/mips/mips-tables.opt: Regenerate.
16139 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
16141 * doc/invoke.texi: Document -march=i6500.
16143 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
16145 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
16146 (i6400_gpmul): Add cpu_unit.
16147 (i6400_gpdiv): Likewise.
16148 (i6400_msa_add_d): Update reservations.
16149 (i6400_msa_int_add) Likewise.
16150 (i6400_msa_short_logic3) Likewise.
16151 (i6400_msa_short_logic2) Likewise.
16152 (i6400_msa_short_logic) Likewise.
16153 (i6400_msa_move) Likewise.
16154 (i6400_msa_cmp) Likewise.
16155 (i6400_msa_short_float2) Likewise.
16156 (i6400_msa_div_d) Likewise.
16157 (i6400_msa_long_logic1) Likewise.
16158 (i6400_msa_long_logic2) Likewise.
16159 (i6400_msa_mult) Likewise.
16160 (i6400_msa_long_float2) Likewise.
16161 (i6400_msa_long_float4) Likewise.
16162 (i6400_msa_long_float5) Likewise.
16163 (i6400_msa_long_float8) Likewise.
16164 (i6400_fpu_fadd): Include frint type.
16165 (i6400_fpu_store): New define_insn_reservation.
16166 (i6400_fpu_load): Likewise.
16167 (i6400_fpu_move): Likewise.
16168 (i6400_fpu_fcmp): Likewise.
16169 (i6400_fpu_fmadd): Likewise.
16170 (i6400_int_mult): Include imul3nc type and update reservation.
16171 (i6400_int_div): Include idiv3 type and update reservation.
16172 (i6400_int_load): Update to check type not move_type.
16173 (i6400_int_store): Likewise.
16174 (i6400_int_prefetch): Set zero latency.
16176 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
16178 * gcc.c: Document new %@{...} sequence.
16179 (LINK_COMMAND_SPEC): Use it for the -L switches.
16180 (cpp_unique_options): Use it for the -I switches.
16181 (at_file_argbuf): New global variable.
16182 (in_at_file): Likewise.
16183 (alloc_args): Create at_file_argbuf.
16184 (clear_args): Truncate at_file_argbuf.
16185 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
16186 (open_at_file): New function.
16187 (close_at_file): Likewise.
16188 (create_at_file): Delete.
16189 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
16192 (validate_switches_from_spec): Deal with %@{...} sequence.
16193 (validate_switches): Likewise.
16194 (driver::finalize): Call clear_args.
16196 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
16198 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
16200 2018-06-11 Martin Sebor <msebor@redhat.com>
16202 * doc/invoke.texi (-Wall): List -Wc++17-compat.
16203 (Wno-class-memaccess): Add @opindex.
16204 (Wno-templates, Wno-multiple-inheritance): Same.
16205 (Wno-virtual-inheritance, Wno-namespaces): Same.
16206 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
16207 (Wno-format-overflow, Wno-format-truncation): Same.
16208 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
16209 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
16210 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
16211 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
16212 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
16213 (Wno-misspelled-isr): Same.
16215 2018-06-11 Martin Sebor <msebor@redhat.com>
16217 * PR tree-optimization/86083
16218 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
16220 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
16222 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
16224 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
16227 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
16228 on the correct operand.
16229 (*movdi_internal64): Ditto.
16231 2018-06-11 Martin Liska <mliska@suse.cz>
16233 PR tree-optimization/86089
16234 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
16236 2018-06-11 Julia Koval <julia.koval@intel.com>
16238 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
16239 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
16240 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
16242 2018-06-11 Olivier Hainque <hainque@adacore.com>
16244 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
16245 for Ada with strict dwarf2.
16247 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
16250 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
16253 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
16255 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
16257 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
16259 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
16262 2018-06-08 Martin Liska <mliska@suse.cz>
16264 * tree-cfg.h (debug_function): Fix argument type to match
16267 2018-06-08 Martin Liska <mliska@suse.cz>
16269 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
16270 Remove usage of MPX-related (and removed) fields.
16271 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
16273 2018-06-08 David Malcolm <dmalcolm@redhat.com>
16275 * cfg.c (debug): Use TDF_NONE rather than 0.
16276 * cfghooks.c (debug): Likewise.
16277 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
16278 (struct dump_option_value_info): Convert to...
16279 (struct kv_pair): ...this template type.
16280 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
16282 (optinfo_verbosity_options): Likewise.
16283 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
16285 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
16286 than int for "optgroup_flags" param.
16287 (dump_generic_expr_loc): Use dump_flags_t rather than int for
16289 (dump_dec): Likewise.
16290 (dump_finish): Use TDF_NONE rather than 0.
16291 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
16292 rather than int for "optgroup_flags" param. Use TDF_NONE rather
16293 than 0. Update for change to option_ptr.
16294 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
16295 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
16296 0. Update for changes to optinfo_verbosity_options and
16298 (opt_info_switch_p): Convert optgroup_flags from int to
16300 (dump_basic_block): Use dump_flags_t rather than int
16301 for "dump_kind" param.
16302 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
16303 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
16304 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
16305 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
16306 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
16307 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
16308 TDF_NONE): Convert from macros to...
16309 (enum dump_flag): ...this new enum.
16310 (dump_flags_t): Update to use enum.
16311 (operator|, operator&, operator~, operator|=, operator&=):
16312 Implement for dump_flags_t.
16313 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
16314 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
16315 Convert from macros to...
16316 (enum optgroup_flag): ...this new enum.
16317 (optgroup_flags_t): New typedef.
16318 (operator|, operator|=): Implement for optgroup_flags_t.
16319 (struct dump_file_info): Convert field "alt_flags" to
16320 dump_flags_t. Convert field "optgroup_flags" to
16322 (dump_basic_block): Use dump_flags_t rather than int for param.
16323 (dump_generic_expr_loc): Likewise.
16324 (dump_dec): Likewise.
16325 (dump_register): Convert param "optgroup_flags" to
16327 (opt_info_enable_passes): Likewise.
16328 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
16330 * gimple-pretty-print.c (debug): Likewise.
16331 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
16332 (merged_store_group::apply_stores): Likewise.
16333 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
16334 * gimple.c (verify_gimple_pp): Likewise.
16335 * graphite-poly.c (print_pbb_body): Likewise.
16336 * passes.c (pass_manager::register_one_dump_file): Convert
16337 local "optgroup_flags" to optgroup_flags_t.
16338 * print-tree.c (print_node): Use TDF_NONE rather than 0.
16340 (debug_body): Likewise.
16341 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
16342 to optgroup_flags_t.
16343 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
16345 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
16346 (convert_mult_to_fma): Likewise.
16347 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
16348 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
16349 * tree-vect-data-refs.c (dump_lower_bound): Convert param
16350 "dump_kind" to dump_flags_t.
16352 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16354 * config/rs6000/rs6000.c (min, max): Delete.
16356 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16358 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
16359 -mabi=spe and -mabi=no-spe.
16361 2018-06-08 Martin Liska <mliska@suse.cz>
16363 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
16364 where we expect an existing summary.
16366 2018-06-08 Martin Liska <mliska@suse.cz>
16368 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
16369 * ipa-inline.h (estimate_edge_growth): Likewise.
16371 2018-06-08 Martin Liska <mliska@suse.cz>
16373 * cgraph.c (function_version_hasher::hash): Use
16374 cgraph_node::get_uid ().
16375 (function_version_hasher::equal):
16376 * cgraph.h (cgraph_node::get_uid): New method.
16377 * ipa-inline.c (update_caller_keys): Use
16378 cgraph_node::get_uid ().
16379 (update_callee_keys): Likewise.
16380 * ipa-utils.c (searchc): Likewise.
16381 (ipa_reduced_postorder): Likewise.
16382 * lto-cgraph.c (input_node): Likewise.
16383 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
16384 * symbol-summary.h (symtab_insertion): Likewise.
16385 (symtab_removal): Likewise.
16386 (symtab_duplication): Likewise.
16387 * tree-pretty-print.c (dump_function_header): Likewise.
16388 * tree-sra.c (convert_callers_for_node): Likewise.
16390 2018-06-08 Martin Liska <mliska@suse.cz>
16392 * cgraph.c (symbol_table::create_edge): Always assign a new
16394 (symbol_table::free_edge): Do not recycle numbers.
16395 * cgraph.h (cgraph_edge::get): New method.
16396 * symbol-summary.h (symtab_removal): Use it.
16397 (symtab_duplication): Likewise.
16398 (call_summary::hashable_uid): Remove.
16400 2018-06-08 Martin Liska <mliska@suse.cz>
16402 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
16403 (initialize_growth_caches): Remove.
16404 (free_growth_caches): Likewise.
16405 (do_estimate_edge_time): Use edge_growth_cache.
16406 (do_estimate_edge_size): Likewise.
16407 (do_estimate_edge_hints): Likewise.
16408 * ipa-inline.c (reset_edge_caches): Likewise.
16409 (recursive_inlining): Likewise.
16410 (inline_small_functions): Likewise.
16411 * ipa-inline.h (initialize_growth_caches): Remove.
16412 (estimate_edge_size): Likewise.
16413 (estimate_edge_time): Likewise.
16414 (estimate_edge_hints): Likewise.
16415 (reset_edge_growth_cache): Likewise.
16416 * symbol-summary.h (call_summary::remove): New method.
16418 2018-06-08 Martin Liska <mliska@suse.cz>
16420 * ipa-cp.c (class edge_clone_summary): New summary.
16421 (grow_edge_clone_vectors): Remove.
16422 (ipcp_edge_duplication_hook): Remove.
16423 (class edge_clone_summary_t): New call_summary class.
16424 (ipcp_edge_removal_hook): Remove.
16425 (edge_clone_summary_t::duplicate): New function.
16426 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
16427 (create_specialized_node): Likewise.
16428 (ipcp_driver): Initialize edge_clone_summaries and do not
16431 2018-06-08 Martin Liska <mliska@suse.cz>
16433 * symbol-summary.h (get): New function.
16434 (call_summary::m_initialize_when_cloning): New class member.
16436 2018-06-08 Martin Liska <mliska@suse.cz>
16438 * cgraph.c (cgraph_node::remove): Do not recycle uid.
16439 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
16440 (symbol_table::allocate_cgraph_symbol): Do not set uid.
16441 * passes.c (uid_hash_t): Record removed_nodes by their uids.
16442 (remove_cgraph_node_from_order): Use the removed_nodes set.
16443 (do_per_function_toporder): Likwise.
16444 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
16445 instead of summary_uid.
16446 (symtab_removal): Likewise.
16447 (symtab_duplication): Likewise.
16449 2018-06-08 Martin Liska <mliska@suse.cz>
16451 * ipa-cp.c (ipcp_store_bits_results): Use
16452 ipcp_transformation_sum.
16453 (ipcp_store_vr_results): Likewise.
16454 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
16456 (ipcp_transformation_initialize): ... this.
16457 (ipa_set_node_agg_value_chain):
16458 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
16459 (write_ipcp_transformation_info): Likewise.
16460 (read_ipcp_transformation_info): Likewise.
16461 (ipcp_update_bits): Likewise.
16462 (ipcp_update_vr): Likewise.
16463 (ipcp_transform_function): Likewise.
16464 * ipa-prop.h: Rename ipcp_transformation_summary to
16465 ipcp_transformation.
16466 (class ipcp_transformation_t): New function summary.
16467 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
16468 (ipa_get_agg_replacements_for_node): Likewise.
16470 2018-06-08 Martin Liska <mliska@suse.cz>
16472 * ipa-pure-const.c (struct funct_state_d): Do it class instead
16474 (class funct_state_summary_t): New function_summary class.
16475 (has_function_state): Remove.
16476 (get_function_state): Likewise.
16477 (set_function_state): Likewise.
16478 (add_new_function): Likewise.
16479 (funct_state_summary_t::insert): New function.
16480 (duplicate_node_data): Remove.
16481 (remove_node_data): Remove.
16482 (funct_state_summary_t::duplicate): New function.
16483 (register_hooks): Create new funct_state_summaries.
16484 (pure_const_generate_summary): Use it.
16485 (pure_const_write_summary): Likewise.
16486 (pure_const_read_summary): Likewise.
16487 (propagate_pure_const): Likewise.
16488 (propagate_nothrow): Likewise.
16489 (dump_malloc_lattice): Likewise.
16490 (propagate_malloc): Likewise.
16491 (execute): Do not register hooks, just remove summary
16493 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
16496 2018-06-08 Martin Liska <mliska@suse.cz>
16498 * ipa-reference.c (remove_node_data): Remove.
16499 (duplicate_node_data): Likewise.
16500 (class ipa_ref_var_info_summary_t): New class.
16501 (class ipa_ref_opt_summary_t): Likewise.
16502 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
16503 (get_reference_optimization_summary): Use
16504 ipa_ref_opt_sum_summaries.
16505 (set_reference_vars_info): Remove.
16506 (set_reference_optimization_summary): Likewise.
16507 (ipa_init): Create summaries.
16508 (init_function_info): Use function summary.
16509 (ipa_ref_opt_summary_t::duplicate): New function.
16510 (ipa_ref_opt_summary_t::remove): New function.
16511 (get_read_write_all_from_node): Fix GNU coding style.
16512 (propagate): Use function summary.
16513 (write_node_summary_p): Fix GNU coding style.
16514 (stream_out_bitmap): Likewise.
16515 (ipa_reference_read_optimization_summary): Use function summary.
16516 (ipa_reference_c_finalize): Do not release hooks.
16518 2018-06-08 Martin Liska <mliska@suse.cz>
16520 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
16521 (analyze_function_body): Extract multiple calls of get_create.
16522 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16523 * ipa-inline.c (recursive_inlining): Use ::get method.
16524 * ipa-inline.h (estimate_edge_growth): Likewise.
16526 2018-06-08 Martin Liska <mliska@suse.cz>
16528 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
16530 (hsa_function_summary::hsa_function_summary): Use the new enum
16532 (hsa_gpu_implementation_p): Use hsa_summaries::get.
16533 * hsa-gen.c (hsa_get_host_function): Likewise.
16534 (get_brig_function_name): Likewise.
16535 * ipa-hsa.c (process_hsa_functions): Likewise.
16536 (ipa_hsa_write_summary): Likewise.
16537 * symbol-summary.h (symtab_duplication): Use ::get function/
16538 (get): New function.
16540 2018-06-08 Martin Liska <mliska@suse.cz>
16542 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
16544 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
16545 (hsa_register_kernel): Likewise.
16546 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
16547 * hsa-gen.c (hsa_get_host_function): Likewise.
16548 (get_brig_function_name): Likewise.
16549 (generate_hsa): Likewise.
16550 (pass_gen_hsail::execute): Likewise.
16551 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
16552 (devirtualization_time_bonus): Likewise.
16553 (ipcp_propagate_stage): Likewise.
16554 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16555 (edge_set_predicate): Likewise.
16556 (evaluate_conditions_for_known_args): Likewise.
16557 (evaluate_properties_for_edge): Likewise.
16558 (ipa_fn_summary::reset): Likewise.
16559 (ipa_fn_summary_t::duplicate): Likewise.
16560 (dump_ipa_call_summary): Likewise.
16561 (ipa_dump_fn_summary): Likewise.
16562 (analyze_function_body): Likewise.
16563 (compute_fn_summary): Likewise.
16564 (estimate_edge_devirt_benefit): Likewise.
16565 (estimate_edge_size_and_time): Likewise.
16566 (estimate_calls_size_and_time): Likewise.
16567 (estimate_node_size_and_time): Likewise.
16568 (inline_update_callee_summaries): Likewise.
16569 (remap_edge_change_prob): Likewise.
16570 (remap_edge_summaries): Likewise.
16571 (ipa_merge_fn_summary_after_inlining): Likewise.
16572 (ipa_update_overall_fn_summary): Likewise.
16573 (read_ipa_call_summary): Likewise.
16574 (inline_read_section): Likewise.
16575 (write_ipa_call_summary): Likewise.
16576 (ipa_fn_summary_write): Likewise.
16577 (ipa_free_fn_summary): Likewise.
16578 * ipa-hsa.c (process_hsa_functions): Likewise.
16579 (ipa_hsa_write_summary): Likewise.
16580 (ipa_hsa_read_section): Likewise.
16581 * ipa-icf.c (sem_function::merge): Likewise.
16582 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16583 (do_estimate_edge_time): Likewise.
16584 (estimate_size_after_inlining): Likewise.
16585 (estimate_growth): Likewise.
16586 (growth_likely_positive): Likewise.
16587 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16588 (inline_call): Likewise.
16589 * ipa-inline.c (caller_growth_limits): Likewise.
16590 (can_inline_edge_p): Likewise.
16591 (can_inline_edge_by_limits_p): Likewise.
16592 (compute_uninlined_call_time): Likewise.
16593 (compute_inlined_call_time): Likewise.
16594 (want_inline_small_function_p): Likewise.
16595 (edge_badness): Likewise.
16596 (update_caller_keys): Likewise.
16597 (update_callee_keys): Likewise.
16598 (recursive_inlining): Likewise.
16599 (inline_small_functions): Likewise.
16600 (inline_to_all_callers_1): Likewise.
16601 (dump_overall_stats): Likewise.
16602 (early_inline_small_functions): Likewise.
16603 (early_inliner): Likewise.
16604 * ipa-inline.h (estimate_edge_growth): Likewise.
16605 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16606 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16607 * ipa-prop.h (IPA_NODE_REF): Likewise.
16608 (IPA_EDGE_REF): Likewise.
16609 * ipa-pure-const.c (malloc_candidate_p): Likewise.
16610 (propagate_malloc): Likewise.
16611 * ipa-split.c (execute_split_functions): Likewise.
16612 * symbol-summary.h: Rename get to get_create.
16614 (get_create): Likewise.
16615 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16617 2018-06-08 Martin Liska <mliska@suse.cz>
16619 * symbol-summary.h (release): Move definition out of class
16621 (symtab_removal): Likewise.
16622 (symtab_duplication): Likewise.
16624 2018-06-08 Martin Liska <mliska@suse.cz>
16626 * symbol-summary.h (function_summary): Move constructor
16627 implementation out of class declaration.
16628 (release): Likewise.
16629 (symtab_insertion): Likewise.
16630 (symtab_removal): Likewise.
16631 (symtab_duplication): Likewise.
16634 2018-06-08 Martin Liska <mliska@suse.cz>
16636 * Makefile.in: Remove support for MPX (macros, related functions,
16637 fields in cgraph_node, ...).
16638 * builtin-types.def (BT_BND): Likewise.
16639 (BT_FN_BND_CONST_PTR): Likewise.
16640 (BT_FN_CONST_PTR_BND): Likewise.
16641 (BT_FN_VOID_PTR_BND): Likewise.
16642 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
16643 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
16644 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
16645 (expand_builtin_mempcpy_with_bounds): Likewise.
16646 (expand_builtin_memset_with_bounds): Likewise.
16647 (expand_builtin_memset_args): Likewise.
16648 (std_expand_builtin_va_start): Likewise.
16649 (expand_builtin): Likewise.
16650 (expand_builtin_with_bounds): Likewise.
16651 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
16652 (DEF_LIB_BUILTIN_CHKP): Likewise.
16653 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
16654 (DEF_CHKP_BUILTIN): Likewise.
16655 (BUILT_IN_MEMCPY): Likewise.
16656 (BUILT_IN_MEMMOVE): Likewise.
16657 (BUILT_IN_MEMPCPY): Likewise.
16658 (BUILT_IN_MEMSET): Likewise.
16659 (BUILT_IN_STPCPY): Likewise.
16660 (BUILT_IN_STRCAT): Likewise.
16661 (BUILT_IN_STRCHR): Likewise.
16662 (BUILT_IN_STRCPY): Likewise.
16663 (BUILT_IN_STRLEN): Likewise.
16664 (BUILT_IN_MEMCPY_CHK): Likewise.
16665 (BUILT_IN_MEMMOVE_CHK): Likewise.
16666 (BUILT_IN_MEMPCPY_CHK): Likewise.
16667 (BUILT_IN_MEMSET_CHK): Likewise.
16668 (BUILT_IN_STPCPY_CHK): Likewise.
16669 (BUILT_IN_STRCAT_CHK): Likewise.
16670 (BUILT_IN_STRCPY_CHK): Likewise.
16671 * calls.c (store_bounds): Likewise.
16672 (emit_call_1): Likewise.
16673 (special_function_p): Likewise.
16674 (maybe_warn_nonstring_arg): Likewise.
16675 (initialize_argument_information): Likewise.
16676 (finalize_must_preallocate): Likewise.
16677 (compute_argument_addresses): Likewise.
16678 (expand_call): Likewise.
16679 * cfgexpand.c (expand_call_stmt): Likewise.
16680 (expand_return): Likewise.
16681 (expand_gimple_stmt_1): Likewise.
16682 (pass_expand::execute): Likewise.
16683 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
16684 (cgraph_node::remove): Likewise.
16685 (cgraph_node::dump): Likewise.
16686 (cgraph_node::verify_node): Likewise.
16687 * cgraph.h (chkp_function_instrumented_p): Likewise.
16688 (symtab_node::get_alias_target): Likewise.
16689 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
16690 (cgraph_local_p): Likewise.
16691 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
16692 (cgraph_edge::rebuild_references): Likewise.
16693 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
16694 (walk_polymorphic_call_targets): Likewise.
16695 (cgraph_node::expand_thunk): Likewise.
16696 (symbol_table::output_weakrefs): Likewise.
16697 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
16698 (ix86_handle_option): Likewise.
16699 * config/i386/constraints.md: Likewise.
16700 * config/i386/i386-builtin-types.def (BND): Likewise.
16704 * config/i386/i386-builtin.def (BDESC_END): Likewise.
16705 (BDESC_FIRST): Likewise.
16707 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
16708 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
16709 * config/i386/i386.c (enum reg_class): Likewise.
16710 (ix86_target_string): Likewise.
16711 (ix86_option_override_internal): Likewise.
16712 (ix86_conditional_register_usage): Likewise.
16713 (ix86_valid_target_attribute_inner_p): Likewise.
16714 (ix86_set_indirect_branch_type): Likewise.
16715 (ix86_set_current_function): Likewise.
16716 (ix86_function_arg_regno_p): Likewise.
16717 (init_cumulative_args): Likewise.
16718 (ix86_function_arg_advance): Likewise.
16719 (ix86_function_arg): Likewise.
16720 (ix86_pass_by_reference): Likewise.
16721 (ix86_function_value_regno_p): Likewise.
16722 (ix86_function_value_1): Likewise.
16723 (ix86_function_value_bounds): Likewise.
16724 (ix86_return_in_memory): Likewise.
16725 (ix86_setup_incoming_vararg_bounds): Likewise.
16726 (ix86_va_start): Likewise.
16727 (indirect_thunk_need_prefix): Likewise.
16728 (print_reg): Likewise.
16729 (ix86_print_operand): Likewise.
16730 (ix86_expand_call): Likewise.
16731 (ix86_output_function_return): Likewise.
16732 (reg_encoded_number): Likewise.
16733 (BDESC_VERIFYS): Likewise.
16734 (ix86_init_mpx_builtins): Likewise.
16735 (ix86_init_builtins): Likewise.
16736 (ix86_emit_cmove): Likewise.
16737 (ix86_emit_move_max): Likewise.
16738 (ix86_expand_builtin): Likewise.
16739 (ix86_builtin_mpx_function): Likewise.
16740 (ix86_get_arg_address_for_bt): Likewise.
16741 (ix86_load_bounds): Likewise.
16742 (ix86_store_bounds): Likewise.
16743 (ix86_load_returned_bounds): Likewise.
16744 (ix86_store_returned_bounds): Likewise.
16745 (ix86_class_likely_spilled_p): Likewise.
16746 (ix86_hard_regno_mode_ok): Likewise.
16747 (x86_order_regs_for_local_alloc): Likewise.
16748 (ix86_mitigate_rop): Likewise.
16749 (ix86_bnd_prefixed_insn_p): Likewise.
16750 (ix86_mpx_bound_mode): Likewise.
16751 (ix86_make_bounds_constant): Likewise.
16752 (ix86_initialize_bounds): Likewise.
16753 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
16754 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
16755 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
16756 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
16757 (TARGET_CHKP_BOUND_MODE): Likewise.
16758 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
16759 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
16760 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
16761 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
16762 * config/i386/i386.h (TARGET_MPX): Likewise.
16763 (TARGET_MPX_P): Likewise.
16764 (VALID_BND_REG_MODE): Likewise.
16765 (FIRST_BND_REG): Likewise.
16766 (LAST_BND_REG): Likewise.
16767 (enum reg_class): Likewise.
16768 (BND_REG_P): Likewise.
16769 (BND_REGNO_P): Likewise.
16770 (BNDmode): Likewise.
16771 (ADJUST_INSN_LENGTH): Likewise.
16772 * config/i386/i386.md: Likewise.
16773 * config/i386/i386.opt: Likewise.
16774 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
16775 (defined): Likewise.
16776 (LINK_MPX): Likewise.
16777 (MPX_SPEC): Likewise.
16778 (LIBMPX_SPEC): Likewise.
16779 (LIBMPXWRAPPERS_SPEC): Likewise.
16780 (CHKP_SPEC): Likewise.
16781 * config/i386/predicates.md: Likewise.
16782 * dbxout.c (dbxout_type): Likewise.
16783 * doc/extend.texi: Likewise.
16784 * doc/invoke.texi: Likewise.
16785 * doc/md.texi: Likewise.
16786 * doc/tm.texi: Likewise.
16787 * doc/tm.texi.in: Likewise.
16788 * dwarf2out.c (is_base_type): Likewise.
16789 (gen_formal_types_die): Likewise.
16790 (gen_subprogram_die): Likewise.
16791 (gen_type_die_with_usage): Likewise.
16792 (gen_decl_die): Likewise.
16793 (dwarf2out_late_global_decl): Likewise.
16794 * expr.c (expand_assignment): Likewise.
16795 (emit_storent_insn): Likewise.
16796 (store_expr_with_bounds): Likewise.
16797 (store_expr): Likewise.
16798 (expand_expr_real_1): Likewise.
16799 * expr.h (store_expr_with_bounds): Likewise.
16800 * function.c (use_register_for_decl): Likewise.
16801 (struct bounds_parm_data): Likewise.
16802 (assign_parms_augmented_arg_list): Likewise.
16803 (assign_parm_find_entry_rtl): Likewise.
16804 (assign_parm_is_stack_parm): Likewise.
16805 (assign_parm_load_bounds): Likewise.
16806 (assign_bounds): Likewise.
16807 (assign_parms): Likewise.
16808 (expand_function_start): Likewise.
16809 * gcc.c (CHKP_SPEC): Likewise.
16810 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
16811 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
16812 (wrestrict_dom_walker::check_call): Likewise.
16813 * gimple.c (gimple_build_call_from_tree): Likewise.
16814 * gimple.h (enum gf_mask): Likewise.
16815 (gimple_call_with_bounds_p): Likewise.
16816 (gimple_call_set_with_bounds): Likewise.
16817 * gimplify.c (gimplify_init_constructor): Likewise.
16818 * ipa-cp.c (initialize_node_lattices): Likewise.
16819 (propagate_constants_across_call): Likewise.
16820 (find_more_scalar_values_for_callers_subset): Likewise.
16821 * ipa-hsa.c (process_hsa_functions): Likewise.
16822 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
16823 * ipa-icf.c (sem_function::merge): Likewise.
16824 * ipa-inline.c (early_inliner): Likewise.
16825 * ipa-pure-const.c (warn_function_noreturn): Likewise.
16826 (warn_function_cold): Likewise.
16827 (propagate_pure_const): Likewise.
16828 * ipa-ref.h (enum GTY): Likewise.
16829 * ipa-split.c (find_retbnd): Likewise.
16830 (consider_split): Likewise.
16831 (split_function): Likewise.
16832 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
16833 * ipa.c (walk_polymorphic_call_targets): Likewise.
16834 (symbol_table::remove_unreachable_nodes): Likewise.
16835 (process_references): Likewise.
16836 (cgraph_build_static_cdtor_1): Likewise.
16837 * lto-cgraph.c (lto_output_node): Likewise.
16838 (output_refs): Likewise.
16839 (compute_ltrans_boundary): Likewise.
16840 (input_overwrite_node): Likewise.
16841 (input_node): Likewise.
16842 (input_cgraph_1): Likewise.
16843 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
16844 * passes.c (pass_manager::execute_early_local_passes): Likewise.
16845 (class pass_chkp_instrumentation_passes): Likewise.
16846 (make_pass_chkp_instrumentation_passes): Likewise.
16847 * passes.def: Likewise.
16848 * rtl.h (struct GTY): Likewise.
16849 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
16850 * stor-layout.c (layout_type): Likewise.
16851 * symtab.c: Likewise.
16852 * target.def: Likewise.
16853 * targhooks.c (default_chkp_bound_type): Likewise.
16854 (default_chkp_bound_mode): Likewise.
16855 (default_builtin_chkp_function): Likewise.
16856 (default_chkp_function_value_bounds): Likewise.
16857 (default_chkp_make_bounds_constant): Likewise.
16858 (default_chkp_initialize_bounds): Likewise.
16859 * targhooks.h (default_chkp_bound_type): Likewise.
16860 (default_chkp_bound_mode): Likewise.
16861 (default_builtin_chkp_function): Likewise.
16862 (default_chkp_function_value_bounds): Likewise.
16863 (default_chkp_make_bounds_constant): Likewise.
16864 (default_chkp_initialize_bounds): Likewise.
16865 * toplev.c (compile_file): Likewise.
16866 (process_options): Likewise.
16867 * tree-core.h (DEF_BUILTIN): Likewise.
16868 (DEF_BUILTIN_CHKP): Likewise.
16869 * tree-inline.c (declare_return_variable): Likewise.
16870 (remap_gimple_stmt): Likewise.
16871 (copy_bb): Likewise.
16872 (initialize_inlined_parameters): Likewise.
16873 (expand_call_inline): Likewise.
16874 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
16875 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
16876 (make_pass_ipa_chkp_produce_thunks): Likewise.
16877 (make_pass_chkp): Likewise.
16878 (make_pass_chkp_opt): Likewise.
16879 (make_pass_chkp_instrumentation_passes): Likewise.
16880 * tree-pretty-print.c (dump_generic_node): Likewise.
16881 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
16882 * tree-ssa-dce.c (propagate_necessity): Likewise.
16883 (eliminate_unnecessary_stmts): Likewise.
16884 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
16885 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
16886 * tree-ssa-sccvn.h: Likewise.
16887 * tree-ssa-strlen.c (get_string_length): Likewise.
16888 (valid_builtin_call): Likewise.
16889 (adjust_last_stmt): Likewise.
16890 (handle_builtin_strchr): Likewise.
16891 (handle_builtin_strcpy): Likewise.
16892 (handle_builtin_stxncpy): Likewise.
16893 (handle_builtin_memcpy): Likewise.
16894 (handle_builtin_strcat): Likewise.
16895 (strlen_check_and_optimize_stmt): Likewise.
16896 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
16897 * tree-streamer-in.c: Likewise.
16898 * tree-streamer.c (record_common_node): Likewise.
16899 * tree.c (tree_code_size): Likewise.
16900 (wide_int_to_tree_1): Likewise.
16901 (type_contains_placeholder_1): Likewise.
16902 (build_common_tree_nodes): Likewise.
16903 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
16904 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
16905 (POINTER_BOUNDS_P): Likewise.
16906 (BOUNDED_TYPE_P): Likewise.
16907 (BOUNDED_P): Likewise.
16908 (CALL_WITH_BOUNDS_P): Likewise.
16909 (pointer_bounds_type_node): Likewise.
16910 * value-prof.c (gimple_ic): Likewise.
16911 * var-tracking.c (vt_add_function_parameters): Likewise.
16912 * varasm.c (make_decl_rtl): Likewise.
16913 (assemble_start_function): Likewise.
16914 (output_constant): Likewise.
16915 (maybe_assemble_visibility): Likewise.
16916 * varpool.c (ctor_for_folding): Likewise.
16917 * chkp-builtins.def: Remove.
16918 * ipa-chkp.c: Remove.
16919 * ipa-chkp.h: Remove.
16920 * rtl-chkp.c: Remove.
16921 * rtl-chkp.h: Remove.
16922 * tree-chkp-opt.c: Remove.
16923 * tree-chkp.c: Remove.
16924 * tree-chkp.h: Remove.
16926 2018-06-07 Carl Love <cel@us.ibm.com>
16928 * config/rs6000/vsx.md (vextract_fp_from_shorth,
16929 vextract_fp_from_shortl): Add BE support.
16931 2018-06-07 Paul Koning <ni1d@arrl.net>
16933 * compare-elim.c (try_merge_compare): Don't merge compare if
16934 address contains a side effect.
16935 (try_eliminate_compare): Likewise.
16937 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
16939 * config.gcc: Support "tremont".
16940 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
16941 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16943 * config/i386/i386.c (m_TREMONT): Define.
16944 (processor_target_table): Add "tremont".
16945 (PTA_TREMONT): Define.
16946 (ix86_lea_outperforms): Add TARGET_TREMONT.
16947 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
16948 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
16949 and M_INTEL_GOLDMONT_PLUS.
16950 (fold_builtin_cpu): Add "tremont".
16951 (ix86_add_stmt_cost): Add TARGET_TREMONT.
16952 (ix86_option_override_internal): Add "tremont".
16953 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
16954 (processor_type): Add PROCESSOR_TREMONT.
16955 * config/i386/x86-tune.def: Add m_TREMONT.
16956 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
16958 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16960 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
16961 symbol defined for msp430i* devices to be lower case.
16963 2018-06-07 Richard Biener <rguenther@suse.de>
16965 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
16966 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
16967 Properly wrap signed arithmetic if overflow wraps.
16969 2018-06-07 Jakub Jelinek <jakub@redhat.com>
16971 PR tree-optimization/69615
16972 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
16973 of a cast from a same precision integral SSA_NAME in a bb dominated
16974 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
16975 cast to utype if rhs2 has already a compatible type.
16977 2018-06-07 Richard Biener <rguenther@suse.de>
16979 PR tree-optimization/85935
16980 * graphite-scop-detection.c (find_params_in_bb): Analyze
16981 condition operands with respect to the correct loop. Assert
16982 the analysis doesn't fail.
16984 2018-06-04 Carl Love <cel@us.ibm.com>
16986 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
16987 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
16988 as it is slightly cheaper.
16989 (first_match_or_eos_index_<mode>):
16990 Calculate index using natural element order.
16991 (first_match_index_<mode>):
16992 Calculate index using natural element order.
16993 (first_match_or_eos_index_<mode>):
16994 Calculate index using natural order.
16995 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
16996 for BE and LE modes.
16997 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
16998 P9V_BUILTIN_VCLZLSBB_V16QI.
16999 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
17002 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
17004 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
17005 indentation and line wrap for many prototypes. Add missing
17006 @smallexample directives around block of prototypes for vec_xl and
17009 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
17011 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
17012 track if we pass or return IEEE 128-bit floating point.
17013 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
17014 C++ mangling that is compatible with GCC 8.1.
17015 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
17016 (init_cumulative_args): Note if we pass or return IEEE 128-bit
17017 floating point types.
17018 (rs6000_function_arg_advance_1): Likewise.
17019 (rs6000_mangle_type): Optionally generate mangled names that match
17020 what GCC 8.1 generated for IEEE 128-bit floating point types.
17021 (rs6000_globalize_decl_name): If we have an external function that
17022 passes or returns IEEE 128-bit types, generate a weak reference
17023 from the mangled name used in GCC 8.1 to the current mangled
17025 (rs6000_init_builtins): Make __ibm128 use the long double type if
17026 long double is IBM extended double. Make __float128 use the long
17027 double type if long double is IEEE 128-bit.
17030 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
17031 macro for __ibm128 built-in functions.
17032 (PACK_IF): Add __ibm128 pack/unpack functions.
17033 (UNPACK_IF): Likewise.
17034 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
17035 enable long double built-in functions if long double is IEEE
17036 128-bit floating point.
17037 (rs6000_invalid_builtin): Update long double built-in function
17039 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
17040 functions, adjust the built-in function to use the long double
17041 built-in function if __ibm128 and long double are the same type.
17042 * doc/extend.texi (PowerPC builtins): Update documention for
17043 __builtin_{,un}pack_longdouble. Add documentation for
17044 __builtin_{,un}pack_ibm128.
17046 2018-06-06 Jim Wilson <jimw@sifive.com>
17048 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
17049 (struct machine_function): New field interrupt_mode.
17050 (riscv_handle_type_attribute): New function. Add forward declaration.
17051 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
17052 (riscv_expand_epilogue): Check interrupt_mode field.
17053 (riscv_set_current_function): Check interrupt attribute args and
17054 set interrupt_mode field.
17055 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
17056 (riscv_sret, riscv_uret): New.
17057 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
17058 new arguments to interrupt attribute.
17060 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
17063 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
17064 Don't handle -mcpu=power8 if -mpower9-vector is also used.
17066 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
17068 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
17069 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
17070 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17071 several redundant entries.
17073 2018-06-06 David Malcolm <dmalcolm@redhat.com>
17075 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
17076 type from "rtx" to "rtx_insn *".
17077 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
17078 for local "call_insn", removing cast.
17079 (ix86_expand_call): Likewise, introducing a "call_insn" local.
17081 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
17083 PR tree-optimization/86066
17084 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
17085 for BIT_INSERT_EXPR stores.
17087 2018-06-06 Richard Biener <rguenther@suse.de>
17089 PR tree-optimization/86062
17090 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17091 component refs ontop
17092 of to be offsetted base.
17094 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17096 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
17097 to be static and remove check on interrupt attribute name.
17099 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
17101 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17102 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
17104 2018-06-05 Steve Ellcey <sellcey@cavium.com>
17107 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
17109 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
17110 Remove second argument, change how error is called.
17111 (aarch64_layout_arg): Remove second argument from
17112 aarch64_err_no_fpadvsimd call.
17113 (aarch64_init_cumulative_args): Ditto.
17114 (aarch64_gimplify_va_arg_expr): Ditto.
17115 * config/aarch64/aarch64.md (mov<mode>): Ditto.
17117 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
17119 * config/i386/i386.md (simple_return_indirect_internal): New expander.
17120 (*simple_return_indirect_internal<mode>): Rename from
17121 simple_return_indirect_internal. Use W mode iterator.
17122 (rstorssp): New expander.
17123 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
17124 (clrssbsy): New expander.
17125 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
17127 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
17129 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
17131 (cmse_check_pointed_object): Likewise.
17133 2018-06-05 Martin Liska <mliska@suse.cz>
17135 PR gcov-profile/47618
17136 * doc/invoke.texi: Document how -fprofile-dir format
17139 2018-06-05 Richard Biener <rguenther@suse.de>
17141 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
17142 removal pretend DOM info isn't available so we do not update
17143 it and only remove edges, not dominated blocks. Actually free
17144 DOM info in case we removed something. Remove unreachable blocks.
17145 (mfb_keep_latches): Work with either DOM info or marked backedges.
17146 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
17147 first. Mark backedges if DOM info isn't available.
17148 (Re-)compute DOM info after cleanup_control_flow_pre.
17150 2018-06-05 Richard Biener <rguenther@suse.de>
17152 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
17153 (locus_discrim_hasher::hash): Adjust.
17154 (locus_discrim_hasher::equal): Likewise.
17155 (next_discriminator_for_locus): Work on line directly.
17156 (same_line_p): Pass in expanded locus1 as well.
17157 (assign_discriminators): Avoid redundant location expansions.
17159 2018-06-05 Richard Biener <rguenther@suse.de>
17161 PR tree-optimization/86046
17162 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
17163 if required after clearing TREE_ADDRESSABLE.
17165 2018-06-05 Richard Biener <rguenther@suse.de>
17167 PR tree-optimization/86047
17168 * tree-ssa-loop.c (for_each_index): Glob handling of all
17169 decls and constants and really handle all of them.
17171 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17174 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
17175 qualifier_void_pointer and qualifier_const_void_pointer.
17176 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
17177 (arm_init_builtins): Handle the above.
17178 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
17179 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
17180 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
17183 2018-06-05 Martin Liska <mliska@suse.cz>
17185 * auto-profile.c (read_autofdo_file): Do not use
17186 gcov_ctr_summary struct.
17187 (afdo_callsite_hot_enough_for_early_inline): Likewise.
17188 * coverage.c (struct counts_entry): Likewise.
17189 (read_counts_file): Read just single summary entry.
17190 (get_coverage_counts): Use gcov_summary struct.
17191 * coverage.h (get_coverage_counts): Likewise.
17192 * gcov-dump.c (dump_working_sets): Likewise.
17193 (tag_summary): Dump just single summary.
17194 * gcov-io.c (gcov_write_summary): Write just histogram
17196 (gcov_read_summary): Read just single summary.
17197 (compute_working_sets): Use gcov_summary struct.
17198 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
17199 of GCOV_COUNTERS_SUMMABLE.
17200 (GCOV_COUNTERS_SUMMABLE): Remove.
17201 (GCOV_FIRST_VALUE_COUNTER): Replace with
17202 GCOV_COUNTER_V_INTERVAL.
17203 (struct gcov_ctr_summary): Remove.
17204 (struct gcov_summary): Directly use fields of former
17206 (compute_working_sets): Use gcov_summary struct.
17207 * gcov.c (read_count_file): Do not use ctrs fields.
17208 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
17210 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
17212 * profile.c: Likewise.
17213 * profile.h: Likewise.
17215 2018-06-05 Martin Liska <mliska@suse.cz>
17217 PR gcov-profile/84846
17218 * gcov.c (output_lines): Print working directory only
17219 in intermediate format.
17221 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
17223 * config/s390/s390-builtin-types.def: Add void function type.
17224 * config/s390/s390-builtins.def: Use the function type for the
17227 2018-06-04 Jim Wilson <jimw@sifive.com>
17229 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
17231 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
17232 and maybe_eh_return. Change regno to unsigned int. Use new args to
17233 handle EH_RETURN_DATA_REGNO registers properly.
17234 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
17235 (riscv_expand_epilogue): Update comment. Change argument name and
17236 type. Update code to use new name and type. Pass new args to
17237 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
17239 * config/riscv/riscv.md (NORMAL_RETURN): New.
17240 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
17241 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
17242 (eh_return): Call gen_eh_return_internal and emit barrier.
17243 (eh_return_internal): Call riscv_expand_epilogue.
17245 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
17247 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
17248 bit_insertion field and declare can_be_merged_into method.
17249 (merged_store_group::can_be_merged_into): New method.
17250 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
17251 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
17252 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
17254 2018-06-04 Richard Biener <rguenther@suse.de>
17256 PR tree-optimization/85955
17257 * builtins.c (fold_builtin_sincos): Convert pointers to
17258 destination to appropriate type before dereferencing.
17260 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
17262 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
17264 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
17266 * expr.c (expand_expr_real_1): Force the operand into memory if
17267 its TYPE_MODE is BLKmode and if there is no integer mode for
17268 the number of bits being extracted.
17270 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17274 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17275 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
17277 2018-06-04 Richard Biener <rguenther@suse.de>
17279 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
17280 (cleanup_tree_cfg_noloop): ... single caller. Do
17281 start_recording_case_labels later.
17283 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
17285 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
17286 to _IMMINTRIN_H_INCLUDED.
17287 * config/i386/pconfigintrin.h: Ditto.
17288 * config/i386/waitpkgintrin.h: Ditto.
17289 * config/i386/immintrin.h: Add includes for sgxintrin.h,
17290 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
17291 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
17292 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
17293 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
17294 waitpkgintrin.h and cldemoteintrin.h.
17296 2018-06-04 Richard Biener <rguenther@suse.de>
17298 PR tree-optimization/86038
17299 * tracer.c (find_best_successor): Check probability for
17300 being initialized, bail out if not.
17302 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
17305 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
17306 of bits to ignore when comparing architectures.
17308 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17310 PR tree-optimization/69615
17311 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
17312 maximum or minimum of the type, try to merge it also as if
17313 range1 is + [-, x - 1] or + [x + 1, -].
17316 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
17318 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
17320 PR tree-optimization/86034
17321 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
17322 the unsigned bitfield type in a bit insertion sequence if it does not
17323 have a larger precision than the bitfield size.
17324 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
17326 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
17328 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
17330 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17332 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
17333 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
17334 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
17335 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
17337 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17339 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
17340 Disable -fdelete-null-pointer-checks for ELF toolchain.
17342 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17343 Kito Cheng <kito.cheng@gmail.com>
17345 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
17346 (nds32le-*-*, nds32be-*-*): Integrate checking process.
17347 (nds32*-*-*): Add glibc and uclibc conditions.
17348 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
17349 (TARGET_EXCEPT_UNWIND_INFO): Define.
17350 * config/nds32/elf.h: New file.
17351 * config/nds32/linux.h: New file.
17352 * config/nds32/nds32-elf.opt: New file.
17353 * config/nds32/nds32-linux.opt: New file.
17354 * config/nds32/nds32-fp-as-gp.c
17355 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
17356 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
17358 (nds32_asm_file_end): Ditto.
17359 (nds32_print_operand): Ditto.
17360 (nds32_insert_attributes): Ditto.
17361 (nds32_init_libfuncs): New function.
17362 (TARGET_HAVE_TLS): Define.
17363 (TARGET_INIT_LIBFUNCS): Define.
17364 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
17366 (TARGET_ELF): Apply different mcmodel setting.
17367 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
17368 been migrated into elf.h and linux.h files.
17369 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
17370 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
17371 (mcmodel): The content has been migrated into nds32-elf.opt and
17372 nds32-linux.opt files.
17373 * config/nds32/t-elf: New file.
17374 * config/nds32/t-linux: New file.
17376 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17377 Shiva Chen <shiva0217@gmail.com>
17379 * config/nds32/constants.md (unspec_volatile_element): Add
17380 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
17381 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
17383 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
17384 (make_pass_nds32_fp_as_gp): Declare.
17385 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
17387 (nds32_asm_function_end_prologue): Remove unused asm output.
17388 (nds32_asm_function_begin_epilogue): Remove unused asm output.
17389 (nds32_asm_file_start): Output necessary fp_as_gp information.
17390 (nds32_option_override): Adjust register usage.
17391 (nds32_expand_prologue): Consider fp_as_gp situation.
17392 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
17393 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
17396 (simple_return): Ditto.
17397 (omit_fp_begin): Output special directive for fp_as_gp.
17398 (omit_fp_end): Output special directive for fp_as_gp.
17399 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
17400 mforbid-fp-as-gp): New options.
17402 2018-06-01 Mark Wielaard <mark@klomp.org>
17404 * dwarf2out.c (dwarf2out_finish): Remove generation of
17405 DW_AT_loclists_base.
17407 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
17409 * gimple-ssa-store-merging.c: Include gimple-fold.h.
17410 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
17411 (struct merged_store_group): Add bit_insertion field.
17412 (dump_char_array): Use standard hexadecimal format.
17413 (merged_store_group::merged_store_group): Set bit_insertion to false.
17414 (merged_store_group::apply_stores): Use optimal buffer size. Deal
17415 with BIT_INSERT_EXPR stores. Move up code updating the mask and
17416 also print the mask in the dump file.
17417 (pass_store_merging::gate): Minor tweak.
17418 (imm_store_chain_info::coalesce_immediate): Fix wrong association
17419 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
17420 stores with INTEGER_CST stores.
17421 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
17422 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
17423 and use it throughout. Generate bit insertion sequences if need be.
17424 (pass_store_merging::process_store): Remove redundant condition.
17425 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
17427 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
17429 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
17430 the 128-bit floating point types. Fix function comment.
17432 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17434 * config/aarch64/aarch64-simd.md
17435 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
17437 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
17440 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
17442 PR tree-optimization/85989
17443 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
17445 (backprop::intersect_uses): Check it when deciding whether this
17446 is a backedge reference.
17447 (backprop::process_block): Add each phi to m_visited_phis
17448 after visiting it, then clear it at the end.
17450 2018-06-01 Richard Biener <rguenther@suse.de>
17452 * tree-vectorizer.h (vect_dr_stmt): New function.
17453 (vect_get_load_cost): Adjust.
17454 (vect_get_store_cost): Likewise.
17455 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
17456 Use vect_dr_stmt instead of DR_SMTT.
17457 (vect_record_base_alignments): Likewise.
17458 (vect_calculate_target_alignment): Likewise.
17459 (vect_compute_data_ref_alignment): Likewise and make static.
17460 (vect_update_misalignment_for_peel): Likewise.
17461 (vect_verify_datarefs_alignment): Likewise.
17462 (vector_alignment_reachable_p): Likewise.
17463 (vect_get_data_access_cost): Likewise. Pass down
17464 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
17465 (vect_get_peeling_costs_all_drs): Likewise.
17466 (vect_peeling_hash_get_lowest_cost): Likewise.
17467 (vect_enhance_data_refs_alignment): Likewise.
17468 (vect_find_same_alignment_drs): Likewise.
17469 (vect_analyze_data_refs_alignment): Likewise.
17470 (vect_analyze_group_access_1): Likewise.
17471 (vect_analyze_group_access): Likewise.
17472 (vect_analyze_data_ref_access): Likewise.
17473 (vect_analyze_data_ref_accesses): Likewise.
17474 (vect_vfa_segment_size): Likewise.
17475 (vect_small_gap_p): Likewise.
17476 (vectorizable_with_step_bound_p): Likewise.
17477 (vect_prune_runtime_alias_test_list): Likewise.
17478 (vect_analyze_data_refs): Likewise.
17479 (vect_supportable_dr_alignment): Likewise.
17480 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
17481 (vect_gen_prolog_loop_niters): Likewise.
17482 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
17483 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
17485 (vect_recog_mask_conversion_pattern): Likewise.
17486 (vect_try_gather_scatter_pattern): Likewise.
17487 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
17488 to vect_get_store_cost.
17489 (vect_get_store_cost): Get stmt_info instead of DR.
17490 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
17491 (vect_get_load_cost): Get stmt_info instead of DR.
17493 2018-06-01 Richard Biener <rguenther@suse.de>
17495 PR middle-end/86017
17496 * gimple-fold.c (var_decl_component_p): Also allow offsetted
17497 vars wrapped in MEM_REFs.
17499 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
17501 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17502 Fix subreg tests so that we only return a choice between
17503 GENERAL_REGS and FP_REGS if the original classes included both.
17505 2018-06-01 Richard Biener <rguenther@suse.de>
17508 * tree-ssa-structalias.c (get_function_part_constraint):
17509 Handle NULL fi->decl.
17510 (find_func_aliases_for_call): Properly handle indirect
17511 fi from direct call.
17512 (find_func_clobbers): Likewise.
17513 (ipa_pta_execute): Likewise.
17514 (create_variable_info_for): For functions that are ifunc_resolver
17515 resolve to a varinfo that contains the result of the resolver call.
17516 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
17519 2018-05-31 Michael Collison <michael.collison@arm.com>
17521 * config/aarch64/aarch64.md:
17522 (*fix_to_zero_extenddfdi2): New pattern.
17523 * gcc.target/aarch64/fix_extend1.c: New testcase.
17525 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
17527 PR middle-end/78809
17528 PR middle-end/83026
17529 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
17530 and BUILT_IN_STRNCMP_EQ.
17531 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
17532 BUILT_IN_STRNCMP_EQ.
17533 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
17534 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17535 (gimple_fold_builtin): Likewise.
17536 * tree-ssa-strlen.c (compute_string_length): New function.
17537 (determine_min_obsize): New function.
17538 (handle_builtin_string_cmp): New function to handle calls to
17539 string compare functions.
17540 (strlen_optimize_stmt): Add handling to builtin string compare
17542 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
17543 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17544 * tree.c (build_common_builtin_nodes): Add new defines of
17545 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
17547 2018-05-31 Jakub Jelinek <jakub@redhat.com>
17550 * bb-reorder.c (pass_partition_blocks::gate): Return false for
17551 functions with naked attribute.
17553 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
17555 * config/i386/sse.md (avx_vec_concat<mode>):
17556 Substitute concat_tg_mode mode attribute with xtg_mode.
17557 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
17558 (concat_tg_mode): Remove mode attribute.
17560 2018-05-31 Martin Sebor <msebor@redhat.com>
17563 * calls.c (alloc_max_size): Correct a logic error/typo.
17564 Treat excessive arguments as infinite. Warn for invalid arguments.
17565 * doc/invoke.texi (-Walloc-size-larger-than): Update.
17567 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
17570 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
17571 and movx for Haswell.
17573 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
17574 Cesar Philippidis <cesar@codesourcery.com>
17576 PR middle-end/85879
17577 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
17578 when emitting error on private/firstprivate reductions.
17579 * omp-low.c (lower_omp_target): Avoid reference-type processing
17580 on pointers for firstprivate clause.
17582 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
17584 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
17587 * config/aarch64/aarch64-simd.md
17588 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
17589 (aarch64_ld1_x3_<mode>): Likewise
17590 (aarch64_st1x2<VALLDIF:mode>): Likewise
17591 (aarch64_st1_x2_<mode>): Likewise
17592 (aarch64_st1x3<VALLDIF:mode>): Likewise
17593 (aarch64_st1_x3_<mode>): Likewise
17594 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
17595 (vld1_s8_x3): Likewise.
17596 (vld1_u16_x3): Likewise.
17597 (vld1_s16_x3): Likewise.
17598 (vld1_u32_x3): Likewise.
17599 (vld1_s32_x3): Likewise.
17600 (vld1_u64_x3): Likewise.
17601 (vld1_s64_x3): Likewise.
17602 (vld1_f16_x3): Likewise.
17603 (vld1_f32_x3): Likewise.
17604 (vld1_f64_x3): Likewise.
17605 (vld1_p8_x3): Likewise.
17606 (vld1_p16_x3): Likewise.
17607 (vld1_p64_x3): Likewise.
17608 (vld1q_u8_x3): Likewise.
17609 (vld1q_s8_x3): Likewise.
17610 (vld1q_u16_x3): Likewise.
17611 (vld1q_s16_x3): Likewise.
17612 (vld1q_u32_x3): Likewise.
17613 (vld1q_s32_x3): Likewise.
17614 (vld1q_u64_x3): Likewise.
17615 (vld1q_s64_x3): Likewise.
17616 (vld1q_f16_x3): Likewise.
17617 (vld1q_f32_x3): Likewise.
17618 (vld1q_f64_x3): Likewise.
17619 (vld1q_p8_x3): Likewise.
17620 (vld1q_p16_x3): Likewise.
17621 (vld1q_p64_x3): Likewise.
17622 (vst1_s64_x2): Likewise.
17623 (vst1_u64_x2): Likewise.
17624 (vst1_f64_x2): Likewise.
17625 (vst1_s8_x2): Likewise.
17626 (vst1_p8_x2): Likewise.
17627 (vst1_s16_x2): Likewise.
17628 (vst1_p16_x2): Likewise.
17629 (vst1_s32_x2): Likewise.
17630 (vst1_u8_x2): Likewise.
17631 (vst1_u16_x2): Likewise.
17632 (vst1_u32_x2): Likewise.
17633 (vst1_f16_x2): Likewise.
17634 (vst1_f32_x2): Likewise.
17635 (vst1_p64_x2): Likewise.
17636 (vst1q_s8_x2): Likewise.
17637 (vst1q_p8_x2): Likewise.
17638 (vst1q_s16_x2): Likewise.
17639 (vst1q_p16_x2): Likewise.
17640 (vst1q_s32_x2): Likewise.
17641 (vst1q_s64_x2): Likewise.
17642 (vst1q_u8_x2): Likewise.
17643 (vst1q_u16_x2): Likewise.
17644 (vst1q_u32_x2): Likewise.
17645 (vst1q_u64_x2): Likewise.
17646 (vst1q_f16_x2): Likewise.
17647 (vst1q_f32_x2): Likewise.
17648 (vst1q_f64_x2): Likewise.
17649 (vst1q_p64_x2): Likewise.
17650 (vst1_s64_x3): Likewise.
17651 (vst1_u64_x3): Likewise.
17652 (vst1_f64_x3): Likewise.
17653 (vst1_s8_x3): Likewise.
17654 (vst1_p8_x3): Likewise.
17655 (vst1_s16_x3): Likewise.
17656 (vst1_p16_x3): Likewise.
17657 (vst1_s32_x3): Likewise.
17658 (vst1_u8_x3): Likewise.
17659 (vst1_u16_x3): Likewise.
17660 (vst1_u32_x3): Likewise.
17661 (vst1_f16_x3): Likewise.
17662 (vst1_f32_x3): Likewise.
17663 (vst1_p64_x3): Likewise.
17664 (vst1q_s8_x3): Likewise.
17665 (vst1q_p8_x3): Likewise.
17666 (vst1q_s16_x3): Likewise.
17667 (vst1q_p16_x3): Likewise.
17668 (vst1q_s32_x3): Likewise.
17669 (vst1q_s64_x3): Likewise.
17670 (vst1q_u8_x3): Likewise.
17671 (vst1q_u16_x3): Likewise.
17672 (vst1q_u32_x3): Likewise.
17673 (vst1q_u64_x3): Likewise.
17674 (vst1q_f16_x3): Likewise.
17675 (vst1q_f32_x3): Likewise.
17676 (vst1q_f64_x3): Likewise.
17677 (vst1q_p64_x3): Likewise.
17679 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17681 * config/msp430/msp430.c (msp430_output_labelref): Prepend
17682 user_label_prefix to name.
17684 * tree-core.h: Update comment about the format of NAME string
17685 passed to handler in attribute_spec.
17687 * config/msp430/msp430.md: Remove erroneous subreg expression from
17688 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
17689 zero_extend{q,h}isi2.
17691 2018-05-30 Borislav Petkov <bp@suse.de>
17693 * doc/extend.texi: Document some architecture specific
17694 constraints and sort entries.
17696 2018-05-30 Martin Sebor <msebor@redhat.com>
17698 PR middle-end/85369
17699 * builtins.c (expand_builtin_stpcpy_1): New function.
17700 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
17701 only if the former succeeds.
17703 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
17705 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
17708 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17710 * doc/invoke.texi (-flinker-output): Document
17712 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17714 * passes.c (ipa_write_summaries): Only modify statements if body
17716 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
17717 incrementally linking.
17718 (ipa_passes): Likewise.
17719 * lto-cgraph.c (lto_output_node): When incrementally linking do not
17720 pass down resolution info.
17721 * common.opt (flag_incremental_link): Update info.
17722 * gcc.c (plugin specs): Turn flinker-output=* to
17723 -plugin-opt=-linker-output-known
17724 * toplev.c (compile_file): Also cut compilation when doing incremental
17726 * flag-types. (enum lto_partition_model): Add
17727 LTO_LINKER_OUTPUT_NOLTOREL.
17728 (invoke.texi): Add -flinker-output docs.
17729 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
17730 link same way as WPA; do not stream in dead initializers.
17732 * dwarf2out.c (dwarf2out_die_ref_for_decl,
17733 darf2out_register_external_decl): Support incremental link.
17735 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17737 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
17739 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17741 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
17742 it down to simple_object_copy_lto_debug_sections.
17743 (run_gcc): Determine incremental LTO link time and configure
17744 lto1 into non-wpa mode, disable renaming of debug sections.
17746 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
17748 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17749 descriptions of various incorrectly documented functions.
17751 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
17754 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17755 address check not strict.
17757 2018-05-30 Richard Biener <rguenther@suse.de>
17759 PR tree-optimization/85964
17760 * tracer.c (better_p): Drop initialized count check, we only
17761 call the function with initialized counts now.
17762 (find_best_successor): Do find a best edge if one
17763 has uninitialized count.
17764 (find_best_predecessor): Likewise. Do BB frequency check only
17765 if count is initialized.
17767 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
17769 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
17770 (aarch64_ldrstr_offset_compare): New.
17771 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
17772 load/store orderings.
17773 (aarch64_gen_adjusted_ldpstp): Likewise.
17775 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
17777 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17778 Check for subset of GENERAL_REGS and FP_REGS.
17779 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
17782 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
17784 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
17785 and wi::to_poly_offset. Add the current offset and then check
17786 whether the sum fits, rather than using an unchecked addition of
17787 a checked term. Check for a shwi rather than a uhwi.
17788 * expr.c (get_bit_range): Use tree_to_poly_uint64.
17789 (store_constructor): Use poly_int_tree_p.
17790 (expand_expr_real_1): Likewise.
17791 * function.c (assign_temp): Likewise.
17792 * fold-const.c (const_binop): Use poly_int_tree_p and
17793 wi::to_poly_offset.
17794 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
17796 * ipa-icf-gimple.c (func_checker::compare_operand): Use
17797 to_poly_offset for MEM offsets.
17798 * ipa-icf.c (sem_variable::equals): Likewise.
17799 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
17800 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
17801 wi::to_poly_offset for BIT_FIELD_REF offsets.
17802 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
17803 wi::to_poly_offset.
17804 * var-tracking.c (emit_note_insn_var_location): Use
17805 tree_to_poly_uint64.
17807 2018-05-29 Jim Wilson <jimw@sifive.com>
17809 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
17811 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
17814 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
17815 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
17817 (sse4_1_round<mode>2): Use nonimmediate_operand
17818 for operand 1 predicate.
17820 2018-05-29 Martin Sebor <msebor@redhat.com>
17821 Richard Biener <rguenther@suse.de>
17824 * calls.c (get_size_range): Call determine_value_range instead
17825 of get_value_range..
17826 * tree-vrp.h (determine_value_range): Declared new function.
17827 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
17829 2018-05-29 Richard Biener <rguenther@suse.de>
17831 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
17832 sure to use non-pattern stmts for get_earlier_stmt arguments.
17833 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
17834 called on pattern stmts.
17835 (get_later_stmt): Likewise.
17837 2018-05-29 Martin Liska <mliska@suse.cz>
17839 PR gcov-profile/85759
17840 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
17843 2018-05-29 Jakub Jelinek <jakub@redhat.com>
17845 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
17847 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
17851 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17852 VEC_PACK_FLOAT_EXPR): New tree codes.
17853 * tree-pretty-print.c (op_code_prio): Handle
17854 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17855 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17856 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17857 * tree-inline.c (estimate_operator_cost): Likewise.
17858 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
17859 * fold-const.c (const_binop): Likewise.
17860 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
17861 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17862 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17863 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
17864 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17865 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17866 * expr.c (expand_expr_real_2): Likewise.
17867 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
17868 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
17869 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
17871 * optabs.c (expand_widen_pattern_expr): For
17872 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
17873 sign from result type rather than operand's type.
17874 (expand_binop_directly): For vec_packu_float_optab and
17875 vec_packs_float_optab allow result type to be different from operand's
17877 * optabs-tree.c (optab_for_tree_code): Handle
17878 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17879 VEC_PACK_FLOAT_EXPR. Formatting fixes.
17880 * tree-vect-generic.c (expand_vector_operations_1): Handle
17881 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17882 VEC_PACK_FLOAT_EXPR.
17883 * tree-vect-stmts.c (supportable_widening_operation): Handle
17885 (supportable_narrowing_operation): Handle FLOAT_EXPR.
17886 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
17887 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
17888 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
17889 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
17891 (vec_pack<floatprefix>_float_<mode>): New expander.
17892 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
17894 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
17895 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
17896 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
17897 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
17898 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
17900 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
17901 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
17902 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17903 VEC_PACK_FLOAT_EXPR): Document.
17905 2018-05-29 Richard Biener <rguenther@suse.de>
17907 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
17909 (stmt_vec_info_vec): Make pointer.
17910 (init_stmt_vec_info_vec): Remove.
17911 (free_stmt_vec_info_vec): Likewise.
17912 (set_stmt_vec_info_vec): New function.
17913 (free_stmt_vec_infos): Likewise.
17914 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
17915 (set_vinfo_for_stmt): Likewise.
17916 (get_earlier_stmt): Likewise.
17917 (get_later_stmt): Likewise.
17918 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
17919 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
17920 (vec_info::~vec_info): Free stmt_vec_infos.
17921 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
17922 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
17923 (pass_slp_vectorize::execute): Likewise.
17924 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
17925 (free_stmt_vec_info_vec): Likewise.
17926 (set_stmt_vec_info_vec): New function.
17927 (free_stmt_vec_infos): Likewise.
17928 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
17929 the global stmt_vec_info_vec.
17930 * tree-parloops.c (gather_scalar_reductions): Use
17931 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
17934 2018-05-29 Richard Biener <rguenther@suse.de>
17936 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
17938 2018-05-29 Martin Liska <mliska@suse.cz>
17939 David Malcolm <dmalcolm@redhat.com>
17941 * vec.c (test_reverse): New.
17942 (vec_c_tests): Add new test.
17943 * vec.h (vl_ptr>::reverse): New function.
17945 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
17947 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
17949 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
17952 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
17954 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
17956 2018-05-28 Richard Biener <rguenther@suse.de>
17958 PR tree-optimization/85933
17959 * tree-vect-data-refs.c (vect_record_base_alignments): Only
17960 look at stmts marked as vectorizable.
17962 2018-05-28 Richard Biener <rguenther@suse.de>
17964 PR tree-optimization/85934
17965 * tree-vect-generic.c (expand_vector_operations_1): Hoist
17966 vector boolean check before scalar optimization.
17968 2018-05-28 Jakub Jelinek <jakub@redhat.com>
17970 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
17973 2018-05-28 Mark Wielaard <mark@klomp.org>
17975 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
17976 if it is an expression containing a minus sign.
17978 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
17980 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
17982 2018-05-27 Paul Koning <ni1d@arrl.net>
17984 * config/pdp11/pdp11.md (truncsihi2): Remove.
17986 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
17987 Chung-Ju Wu <jasonwucj@gmail.com>
17989 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
17991 (unaligned_store_dw): Ditto.
17992 * config/nds32/nds32-memory-manipulation.c
17993 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
17994 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
17995 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
17996 (emit_setmem_word_loop): Rename to ...
17997 (emit_setmem_doubleword_loop): ... this.
17998 (nds32_gen_dup_4_byte_to_word_value): New function.
17999 (nds32_gen_dup_8_byte_to_double_word_value): New function.
18000 (nds32_expand_setmem_loop): Refine implementation.
18001 (nds32_expand_setmem_loop_v3m): Ditto.
18002 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
18005 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
18007 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
18009 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
18011 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
18012 (nds32_init_machine_status): Initialize machine->attr_naked_p and
18013 machine->attr_no_prologue_p.
18014 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
18015 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
18016 (nds32_expand_epilogue): Consider attr_naked_p.
18017 (nds32_expand_epilogue_v3pop): Likewise.
18018 (nds32_can_use_return_insn): Likewise.
18019 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
18020 attr_no_prologue_p fields.
18021 * config/nds32/nds32.opt (mret-in-naked-func): New option.
18023 2018-05-27 Jakub Jelinek <jakub@redhat.com>
18026 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
18028 * config/i386/sse.md
18029 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
18031 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
18033 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
18035 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
18037 (*<floatsuffix>floatv2div2sf2): Rename to ...
18038 (*float<floatunssuffix>v2div2sf2): ... this.
18039 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
18040 (float<floatunssuffix>v2div2sf2_mask): ... this.
18041 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
18042 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
18043 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
18045 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
18047 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18049 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18051 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18053 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18055 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
18056 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
18057 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
18058 gen_ufix_truncv8dfv8si2.
18059 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
18060 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
18061 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
18062 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
18063 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
18064 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
18065 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
18066 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
18068 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18072 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
18074 2018-05-25 Jim Wilson <jimw@sifive.com>
18076 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
18077 * config/riscv/riscv.c (struct machine_function): Add
18078 interrupt_handler_p and attribute_checked_p fields.
18079 (riscv_attribute_table): Add interrupt.
18080 (riscv_interrupt_type_p): New.
18081 (riscv_save_reg_p): Save extra regs for interrupt handler.
18082 (riscv_use_save_libcall): Return false for interrupt handler.
18083 (riscv_first_stack_step): Add forward declaration.
18084 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
18085 for interrupt handler with large frame. Use it for saved reg list.
18086 (riscv_expand_prologue): Move flag_stack_usage_info support to
18087 eliminate duplication.
18088 (riscv_expand_epilogue): Generate mret for interrupt handler.
18089 (riscv_epilogue_uses): New.
18090 (riscv_can_use_return_insn): Return false for interrupt handler.
18091 (riscv_function_ok_for_sibcall): Likewise.
18092 (riscv_set_current_function): Add interrupt handler support.
18093 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
18094 * config/riscv/riscv.md (UNSPECV_MRET): New.
18096 (riscv_frflags, riscv_fsflags): Use tab after opcode.
18098 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
18100 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
18102 PR tree-optimization/85712
18103 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
18104 this candidate has already been replaced in-situ by a copy.
18106 2018-05-25 Jason Merrill <jason@redhat.com>
18108 PR c++/80485 - inline function non-zero address.
18109 * symtab.c (nonzero_address): Check DECL_COMDAT.
18111 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
18114 * config/alpha/alpha.md (ashlsi3): New insn pattern.
18115 (*ashlsi_se): Rename from *ashldi_se. Define as sign
18116 extension of SImode operation. Use const123_operand predicate.
18117 (*saddsi_1): Remove.
18118 (*saddl_se_1): Ditto.
18119 (*ssubsi_1): Ditto.
18120 (*ssubl_se_1): Ditto.
18121 * config/alpha/predicates.md (const123_operand): New predicate.
18122 * config/alpha/constraints.md (P): Use IN_RANGE.
18124 2018-05-25 Richard Biener <rguenther@suse.de>
18126 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
18128 (ref_maybe_used_by_stmt_p): Likewise.
18129 (stmt_may_clobber_ref_p): Likewise.
18130 (stmt_may_clobber_ref_p_1): Likewise.
18131 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
18133 (ref_maybe_used_by_stmt_p): Likewise.
18134 (stmt_may_clobber_ref_p): Likewise.
18135 (stmt_may_clobber_ref_p_1): Likewise.
18136 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
18137 the alias oracle to disambiguate DRs with stmts DR analysis
18139 (vect_analyze_data_refs): Do not give up on not analyzable
18140 DRs for BB vectorization. Remove code truncating the dataref
18143 2018-05-25 Jakub Jelinek <jakub@redhat.com>
18146 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18147 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
18148 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
18150 2018-05-25 Richard Biener <rguenther@suse.de>
18152 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
18153 function, combining stmt data ref gathering and fatal analysis
18155 (vect_analyze_data_refs): Remove now redudnant code and simplify.
18156 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
18157 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
18158 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
18159 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
18161 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18163 PR tree-optimization/85720
18164 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
18165 SCC if all partitions are builtins.
18166 (version_loop_by_alias_check): New parameter. Generate cancelable
18167 runtime alias check if all partitions are builtins.
18168 (distribute_loop): Update call to above function.
18170 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18172 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
18173 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
18174 (parm_default_def_partition_arg): Ditto.
18175 (set_parm_default_def_partition): Ditto.
18176 (get_parm_default_def_partitions): Ditto and make it static.
18177 (get_undefined_value_partitions): Ditto and make it static.
18178 (remove_ssa_form): Refactor call to init_var_map here.
18179 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
18180 computation for loop region.
18181 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
18182 (register_default_def): Delete.
18183 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
18184 (parm_default_def_partition_arg): Ditto.
18185 (set_parm_default_def_partition): Ditto.
18186 (get_parm_default_def_partitions): Ditto and make it static.
18187 (get_undefined_value_partitions): Ditto and make it static.
18188 (coalesce_with_default, coalesce_with_default): Update comment.
18189 (create_coalesce_list_for_region): New func factored out from
18190 create_outofssa_var_map.
18191 (populate_coalesce_list_for_outofssa): New func factored out from
18192 create_outofssa_var_map and coalesce_ssa_name.
18193 (create_outofssa_var_map): Delete.
18194 (coalesce_ssa_name): Refactor to support live range computation.
18195 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
18196 (get_parm_default_def_partitions): Delete.
18197 (get_undefined_value_partitions): Ditto.
18198 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
18199 computation for loop region.
18200 (new_tree_live_info, loe_visit_block): Ditto.
18201 (live_worklist, set_var_live_on_entry): Ditto.
18202 (calculate_live_on_exit, verify_live_on_entry): Ditto.
18203 * tree-ssa-live.h (struct _var_map): New fields.
18204 (init_var_map): Change decl.
18205 (region_contains_p): New.
18207 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18209 * tree-ssa-live.h (live_merge_and_clear): Delete.
18211 2018-05-25 Richard Biener <rguenther@suse.de>
18214 * tree-dump.c (dequeue_and_dump): Remove access to removed
18215 operand 2 of a SWITCH_EXPR.
18217 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18219 * doc/sourcebuild.texi (vect_double_cond_arith): Include
18220 multiplication and division.
18221 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
18222 (cond_udiv@var{m}, cond_umod@var{m}): Document.
18223 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
18224 (cond_udiv_optab, cond_umod_optab): New optabs.
18225 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
18226 (IFN_COND_RDIV): New internal functions.
18227 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
18228 TRUNC_MOD_EXPR and RDIV_EXPR.
18229 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
18230 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
18232 (SVE_INT_BINARY): Include mult.
18233 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
18234 (optab, sve_int_op): Handle mult.
18235 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
18237 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
18238 for SVE_INT_BINARY_SD.
18240 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18242 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
18243 (optab, sve_int_op): Handle div and udiv.
18244 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
18245 for SVE_INT_BINARY_SD.
18246 (*<optab><mode>3): New insn for the same.
18248 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18250 * tree-vect-patterns.c: Include predict.h.
18251 (vect_recog_divmod_pattern): Restrict check for division support
18252 to when optimizing for size.
18254 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18256 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
18257 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
18258 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
18259 (gimple_match_op::set_op): Likewise.
18260 (gimple_resimplify4): Declare.
18261 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
18262 (expr::gen_transform): Likewise.
18263 (decision_tree::gen): Generate a simplification routine for 4 operands.
18264 * gimple-match-head.c (gimple_simplify): Add an overload for
18265 4 operands. In the top-level function, handle up to 4 call
18266 arguments and call gimple_resimplify4.
18267 (gimple_resimplify4): New function.
18268 (build_call_internal): Pass a fourth operand.
18269 (maybe_push_to_seq): Likewise.
18270 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
18271 Fold VEC_COND_EXPRs of an operation and a default value into
18272 an IFN_COND_* function if possible.
18273 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
18275 (SVE_COND_FP_BINARY): Include them.
18276 (optab, sve_fp_op): Handle them.
18277 (SVE_INT_BINARY_REV): New code iterator.
18278 (SVE_COND_FP_BINARY_REV): New int iterator.
18279 (commutative): New int attribute.
18280 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
18282 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
18284 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
18285 (*cond_<optab><mode>): New patterns for reversed operands.
18287 2018-05-25 Richard Biener <rguenther@suse.de>
18289 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
18290 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
18291 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
18292 (STMT_VINFO_GROUPED_ACCESS): Adjust.
18293 * tree-vect-data-refs.c (everywhere): Adjust users.
18294 * tree-vect-loop.c (everywhere): Likewise.
18295 * tree-vect-slp.c (everywhere): Likewise.
18296 * tree-vect-stmts.c (everywhere): Likewise.
18297 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
18299 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18301 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
18303 (gcc_cv_as_section_exclude): ... this.
18304 Try Solaris as #exclude syntax.
18305 * configure: Regenerate.
18306 * config.in: Regenerate.
18307 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
18309 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
18310 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
18312 * varasm.c (default_elf_asm_named_section): Don't check if
18313 HAVE_GAS_SECTION_EXCLUDE is defined.
18315 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18317 * doc/md.texi: Update the documentation of the cond_* optabs
18318 to mention the new final operand. Fix GET_MODE_NUNITS call.
18319 Describe the scalar case too.
18320 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
18321 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
18323 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
18324 (get_conditional_internal_fn): Update comment.
18325 * tree-vect-loop.c (vectorizable_reduction): Pass the original
18326 accumulator value as a final argument to conditional functions.
18327 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
18328 a define_expand and add an "else" operand. Assert for now that
18329 the else operand is equal to operand 2. Use SVE_INT_BINARY and
18330 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
18331 (*cond_<optab><mode>): New patterns.
18332 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
18333 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18334 (UNSPEC_COND_EOR): Delete.
18335 (optab): Remove associated mappings.
18336 (SVE_INT_BINARY): New code iterator.
18337 (sve_int_op): Remove int attribute and add "minus" to the code
18339 (SVE_COND_INT_OP): Delete.
18340 (SVE_COND_FP_OP): Rename to...
18341 (SVE_COND_FP_BINARY): ...this.
18343 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18345 * optabs.c (can_reuse_operands_p): New function.
18346 (maybe_legitimize_operands): Try to reuse the results for
18349 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18351 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
18352 Add {q} suffix to insn mnemonic.
18354 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18356 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
18357 (msp430_warn_func_return): New.
18359 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
18361 * fold-const.c (tree_nonzero_bits): New function.
18362 * fold-const.h (tree_nonzero_bits): Likewise.
18363 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
18364 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
18366 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18370 * varasm.c (assemble_alias): Check ifunc_resolver only on
18373 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18376 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
18377 when memory input operand is handled.
18379 2018-05-24 Luis Machado <luis.machado@linaro.org>
18381 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
18383 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
18385 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18387 * match.pd: Delay FMA folds until after vectorization.
18389 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
18392 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18393 address check not strict.
18395 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18397 * gimple-match.h (gimple_match_op): New class.
18398 (mprts_hook): Replace parameters with a gimple_match_op *.
18399 (maybe_build_generic_op): Likewise.
18400 (gimple_simplified_result_is_gimple_val): Replace parameters with
18401 a const gimple_match_op *.
18402 (gimple_simplify): Replace code_helper * and tree * parameters with
18403 a gimple_match_op * parameter.
18404 (gimple_resimplify1): Replace code_helper *, tree and tree *
18405 parameters with a gimple_match_op * parameter.
18406 (gimple_resimplify2): Likewise.
18407 (gimple_resimplify3): Likewise.
18408 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
18409 parameters with a gimple_match_op * parameter.
18410 * gimple-match-head.c (gimple_simplify): Change prototypes of
18411 auto-generated functions to take a gimple_match_op * instead of
18412 separate code_helper * and tree * parameters. Make the same
18413 change in the top-level overload and update calls to the
18414 gimple_resimplify routines. Update calls to the auto-generated
18415 functions and to maybe_push_res_to_seq in the publicly-facing
18416 operation-specific gimple_simplify overloads.
18417 (gimple_match_op::MAX_NUM_OPS): Define.
18418 (gimple_resimplify1): Replace rcode and ops with a single res_op
18419 parameter. Update call to gimple_simplify.
18420 (gimple_resimplify2): Likewise.
18421 (gimple_resimplify3): Likewise.
18422 (mprts_hook): Replace parameters with a gimple_match_op *.
18423 (maybe_build_generic_op): Likewise.
18424 (build_call_internal): Replace type, nargs and ops with
18425 a gimple_match_op *.
18426 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
18427 with a single gimple_match_op *. Update calls to mprts_hook,
18428 build_call_internal and gimple_simplified_result_is_gimple_val.
18429 Factor out code that is common to the tree_code and combined_fn cases.
18430 * genmatch.c (expr::gen_transform): Replace tem_code and
18431 tem_ops with a gimple_match_op called tem_op. Update calls
18432 to the gimple_resimplify functions and maybe_push_res_to_seq.
18433 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
18434 res_ops. Update call to the gimple_resimplify functions.
18435 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
18436 (decision_tree::gen): Make the functions take a gimple_match_op *
18437 called res_op instead of separate res_code and res_ops parameters.
18438 Update call accordingly.
18439 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
18440 and ops with a single res_op parameter. Update calls to
18441 maybe_build_generic_op and maybe_push_res_to_seq.
18442 (fold_stmt_1): Update calls to gimple_simplify and
18443 replace_stmt_with_simplification.
18444 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
18445 and gimple_simplified_result_is_gimple_val.
18446 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
18448 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
18449 with a gimple_match_op *.
18450 (vn_nary_build_or_lookup): Likewise. Update call to
18451 vn_nary_build_or_lookup_1.
18452 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
18453 gimple_match_op *. Update calls to the gimple_resimplify routines
18454 and to gimple_simplified_result_is_gimple_val.
18455 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
18456 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
18457 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
18458 (visit_nary_op): Likewise.
18459 (visit_reference_op_load): Likewise.
18461 2018-05-23 Luis Machado <luis.machado@linaro.org>
18463 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
18464 modifier for printing the step amount.
18466 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
18469 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
18472 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
18474 * doc/sourcebuild.texi (Endianness): New subsubsection.
18476 2018-05-23 Luis Machado <luis.machado@linaro.org>
18478 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18479 <prefetch_dynamic_strides>: New const bool field.
18480 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18481 prefetch_dynamic_strides.
18482 (exynosm1_prefetch_tune): Likewise.
18483 (thunderxt88_prefetch_tune): Likewise.
18484 (thunderx_prefetch_tune): Likewise.
18485 (thunderx2t99_prefetch_tune): Likewise.
18486 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
18488 (aarch64_override_options_internal): Update to set
18489 PARAM_PREFETCH_DYNAMIC_STRIDES.
18490 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18491 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18492 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18493 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18494 prefetch-dynamic-strides setting.
18496 2018-05-23 Luis Machado <luis.machado@linaro.org>
18498 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18499 <minimum_stride>: New const int field.
18500 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18501 minimum_stride field defaulting to -1.
18502 (exynosm1_prefetch_tune): Likewise.
18503 (thunderxt88_prefetch_tune): Likewise.
18504 (thunderx_prefetch_tune): Likewise.
18505 (thunderx2t99_prefetch_tune): Likewise.
18506 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
18507 <default_opt_level>: Set to 3.
18508 (aarch64_override_options_internal): Update to set
18509 PARAM_PREFETCH_MINIMUM_STRIDE.
18510 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18511 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18512 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18513 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18514 stride is constant and is below the minimum stride threshold.
18516 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18518 * config/arm/arm-cpus.in (mode26): Delete.
18519 (armv4): Delete mode26 reference.
18520 * config/arm/arm.c (arm_configure_build_target): Delete use of
18523 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
18525 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
18527 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
18528 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
18530 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
18531 (floatunsdidf2): Ditto.
18533 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
18535 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
18536 (fixuns_trunc<mode>si2_avx512f): Ditto.
18537 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
18538 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
18539 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
18541 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
18543 PR rtl-optimization/79985
18544 * df-scan.c (df_insn_refs_collect): Remove special case for
18545 global registers and asm statements.
18547 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
18549 * extend.texi (Global Register Variables): Rewrite the bullet list.
18550 Note that the register is available for allocation. Note that access
18551 via inline asm must use constraints. Add note about async-signal
18552 handlers. Remove paragraph about automagic register selection.
18554 2018-05-23 Richard Biener <rguenther@suse.de>
18556 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
18557 of fixed offset from memset VN.
18559 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
18561 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
18562 first_interp field.
18563 (alloc_cand_and_find_basis): Initialize first_interp field.
18564 (slsr_process_mul): Modify first_interp field.
18565 (slsr_process_add): Likewise.
18566 (slsr_process_cast): Modify first_interp field for each new
18568 (slsr_process_copy): Likewise.
18569 (dump_candidate): Dump first_interp field.
18570 (replace_mult_candidate): Process all interpretations, not just
18572 (replace_rhs_if_not_dup): Likewise.
18573 (replace_one_candidate): Likewise.
18575 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
18577 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
18579 (aarch64_needs_frame_chain): New function.
18580 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
18582 2018-05-23 Sudakshina Das <sudi.das@arm.com>
18585 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
18586 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
18587 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
18588 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
18589 as true for strict-align.
18590 (aarch64_can_inline_p): Perform checks even when callee has no
18591 attributes to check for strict alignment.
18592 * doc/extend.texi (AArch64 Function Attributes): Document
18594 * doc/invoke.texi: (AArch64 Options): Likewise.
18596 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
18598 PR tree-optimization/85853
18599 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
18600 the handling of the root of the node to...
18601 (vect_slp_analyze_node_operations_1): ...this new function,
18602 and run the whole thing with the child nodes' def types
18603 set according to their SLP node's def type.
18605 2018-05-23 Richard Biener <rguenther@suse.de>
18607 PR middle-end/85874
18608 * tree-data-ref.c (create_runtime_alias_checks): Defer
18609 and ignore overflow warnings.
18611 2018-05-23 Yury Gribov <tetra2005@gmail.com>
18613 PR tree-optimization/85822
18614 * tree-vrp.c (is_masked_range_test): Fix handling of negative
18617 2018-05-23 Richard Biener <rguenther@suse.de>
18619 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18620 memset constants via native_interpret_expr.
18622 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
18625 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
18627 (cgraph_node::create_alias): Likewise.
18628 (cgraph_node::get_availability): Check ifunc_resolver instead
18629 of looking up ifunc attribute.
18630 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
18631 * varasm.c (do_assemble_alias): Likewise.
18632 (assemble_alias): Likewise.
18633 (default_binds_local_p_3): Likewise.
18634 * cgraph.h (cgraph_node): Add ifunc_resolver.
18635 (cgraph_node::only_called_directly_or_aliased_p): Return false
18636 for IFUNC resolver.
18637 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
18639 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
18640 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
18641 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
18642 instead of looking up ifunc attribute.
18644 2018-05-22 Luis Machado <luis.machado@linaro.org>
18646 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
18648 2018-05-22 Martin Sebor <msebor@redhat.com>
18650 PR middle-end/85359
18651 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
18652 only when expasion succeeds.
18653 (expand_builtin_strcmp): Same.
18654 (expand_builtin_strncmp): Same.
18656 2018-05-22 Martin Sebor <msebor@redhat.com>
18658 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
18660 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
18661 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18663 * config/aarch64/aarch64-ldpstp.md: Replace uses of
18664 aarch64_mem_pair_operand with memory_operand and delete operand swapping
18666 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18667 Add check for legitimate_address.
18668 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
18669 (aarch64_swap_ldrstr_operands): New.
18670 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
18673 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
18674 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18676 * config/aarch64/aarch64.md: New patterns to generate stp
18678 (store_pair_sw, store_pair_dw): New patterns to generate stp for
18679 single words and double words.
18680 (load_pair_sw, load_pair_dw): Likewise.
18681 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
18683 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
18685 * config/aarch64/aarch64-ldpstp.md: Modify peephole
18686 for different mode ldpstp and add peephole for merged zero stores.
18687 Likewise for loads.
18688 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18690 (aarch64_gen_store_pair): Rename calls to match new patterns.
18691 (aarch64_gen_load_pair): Rename calls to match new patterns.
18692 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
18693 (load_pair<DREG:mode><DREG2:mode>): ... This.
18694 (store_pair<mode>): Rename to...
18695 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
18696 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
18697 New mode iterators.
18698 (V_INT_EQUIV): Handle SImode.
18699 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
18702 2018-05-22 Martin Sebor <msebor@redhat.com>
18705 * calls.c (maybe_warn_nonstring_arg): Use string length to set
18706 or ajust the presumed bound on an operation to avoid unnecessary
18709 2018-05-22 Martin Sebor <msebor@redhat.com>
18711 PR tree-optimization/85826
18712 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
18713 assuming that a DECL necesarily has a constant size.
18715 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
18717 PR middle-end/85862
18718 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
18720 2018-05-22 Richard Biener <rguenther@suse.de>
18722 PR tree-optimization/85834
18723 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
18724 non-constant and non-zero memset arguments.
18726 2018-05-22 Martin Liska <mliska@suse.cz>
18729 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
18731 2018-05-22 Richard Biener <rguenther@suse.de>
18733 PR tree-optimization/85863
18734 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
18735 comparisons when vectype is specified.
18736 (vectorizable_condition): Do not specify vectype for
18737 vect_is_simple_cond when SLP vectorizing.
18739 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
18742 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
18743 define __ibm128 as long double.
18744 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
18745 as a distinct type when IEEE 128-bit support is enabled.
18746 (init_float128_ieee): Fix up conversions between IFmode and IEEE
18747 128-bit types to use the correct functions.
18748 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
18749 convert between 128-bit floating point types that have different
18750 modes but the same representation, instead of using gen_lowpart to
18752 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
18754 (IFKF_reg): New attributes to give the register constraints for
18756 (extend<mode>tf2_internal): New insns to mark an explicit
18757 conversion between 128-bit floating point types that have a
18758 different mode but share the same representation.
18760 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
18762 PR tree-optimization/85814
18763 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
18764 a null return from get_strinfo when unsharing the next
18765 strinfo in the chain.
18767 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
18770 * varasm.c (weak_finish): Clean up weak_decls.
18772 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18774 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
18775 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
18776 UNSPEC_UADALP values.
18777 * config/aarch64/iterators.md (ABAL): New int iterator.
18780 (sur): Add mappings for the above.
18781 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
18783 (aarch64_<sur>abal<mode>_4): Likewise.
18784 (aarch64_<sur>adalp<mode>_3): Likewise.
18785 (<sur>sadv16qi): New define_expand.
18787 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
18789 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
18790 (*movdf_internal): Ditto.
18791 (*rcpsf2_sse): Ditto.
18792 (*rsqrtsf2_sse): Ditto.
18793 (*sqrt<mode>2_sse): Ditto.
18795 2018-05-21 Tamar Christina <tamar.christina@arm.com>
18797 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
18799 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
18800 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
18801 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
18802 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
18804 * config/aarch64/arm_neon.h: Likewise.
18805 * config/aarch64/iterators.md (VQ_I): New.
18807 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
18809 * config.gcc: Add arc/t-multilib-linux to tmake_file for
18811 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
18814 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
18816 * config/nds32/constraints.md (S): New constraint.
18817 * config/nds32/nds32.md (call_internal): Use constraint S.
18818 (call_value_internal): Likewise.
18819 (sibcall_internal): Likewise.
18820 (sibcall_value_internal): Likewise.
18822 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
18823 Chung-Ju Wu <jasonwucj@gmail.com>
18825 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
18826 into consideration.
18828 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
18829 Chung-Ju Wu <jasonwucj@gmail.com>
18831 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
18832 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
18833 (nds32_rtx_costs_impl): Simplify.
18834 (nds32_address_cost_impl): Simplify.
18835 (nds32_init_rtx_costs): New function.
18836 (nds32_rtx_costs_speed_prefer): Likewise.
18837 (nds32_rtx_costs_size_prefer): Likewise.
18838 (nds32_address_cost_speed_prefer): Likewise.
18839 (nds32_address_cost_speed_fwprop): Likewise.
18840 (nds32_address_cost_size_prefer): Likewise.
18841 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
18842 * config/nds32/nds32.c (nds32_option_override): Use
18843 nds32_init_rtx_costs function.
18845 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
18847 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
18848 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
18849 (TARGET_PIPELINE_N8): Likewise.
18850 (TARGET_PIPELINE_N10): Likewise.
18851 (TARGET_PIPELINE_N13): Likewise.
18852 (TARGET_PIPELINE_GRAYWOLF): Likewise.
18854 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
18856 * config/nds32/nds32-fpu.md: Update copyright year.
18858 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18860 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
18862 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18864 * config/nds32/nds32.c
18865 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
18866 * config/nds32/nds32.opt (minline-asm-r15): New option.
18868 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18870 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
18872 * config/nds32/nds32.md (abssi2): New pattern.
18874 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
18876 * config/i386/i386.md (rex64namesuffix): New mode attribute.
18877 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
18878 Merge insn pattern from sse_cvtsi2ss<round_name> and
18879 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
18880 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
18881 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
18882 using SWI48 mode iterator.
18883 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
18884 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
18885 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
18886 pattern from sse_cvttss2si<round_saeonly_name>
18887 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
18888 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
18889 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
18890 using SWI48 mode iterator.
18891 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
18892 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
18893 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
18894 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
18895 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
18896 using SWI48 mode iterator.
18897 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
18898 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
18899 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
18900 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
18901 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
18902 SWI48 mode iterator.
18903 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
18904 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
18905 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
18906 pattern from sse_cvttsd2si<round_saeonly_name>
18907 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
18909 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18911 * config/nds32/nds32-md-auxiliary.c
18912 (nds32_valid_smw_lwm_base_p): Refine.
18913 (nds32_output_smw_single_word): Refine.
18914 (nds32_output_smw_double_word): New.
18915 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
18917 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18919 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
18920 (nds32_output_stack_pop): Refine.
18921 (nds32_expand_unaligned_load): Refine.
18922 (nds32_expand_unaligned_store): Refine.
18924 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18925 Chung-Ju Wu <jasonwucj@gmail.com>
18927 * config/nds32/constants.md: Add TP_REGNUM constant.
18928 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
18929 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
18931 * config/nds32/nds32-doubleword.md: Consider flag_pic.
18932 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
18933 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
18934 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
18935 and PIC code generation.
18936 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
18938 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
18940 * config/nds32/nds32.md: Support TLS and PIC.
18941 * config/nds32/nds32.c: Support TLS and PIC.
18942 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
18943 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
18946 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18948 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
18949 mode with E_ prefix.
18951 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18952 Chung-Ju Wu <jasonwucj@gmail.com>
18954 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
18955 * config/nds32/nds32-md-auxiliary.c
18956 (symbolic_reference_mentioned_p): New.
18957 (nds32_legitimize_ict_address): New.
18958 (nds32_expand_ict_move): New.
18959 (nds32_indirect_call_referenced_p): New.
18960 (nds32_symbol_binds_local_p): Delete.
18961 (nds32_long_call_p): Modify.
18962 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
18963 * config/nds32/nds32-protos.h
18964 (symbolic_reference_mentioned_p): Declare.
18965 (nds32_legitimize_ict_address): Declare.
18966 (nds32_expand_ict_move): Declare.
18967 (nds32_indirect_call_referenced_p): Declare.
18968 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
18969 (nds32_relax_group): Use nds32_ict_const_p as condition.
18970 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
18971 (nds32_asm_file_start): Output ict_model directive in asm code.
18972 (nds32_legitimate_address_p): Consider indirect call.
18973 (nds32_print_operand): Consider indirect call.
18974 (nds32_print_operand_address): Consider indirect call.
18975 (nds32_insert_attributes): Handle "indirect_call" attribute.
18976 (TARGET_LEGITIMATE_ADDRESS_P): Define.
18977 (TARGET_LEGITIMATE_CONSTANT_P): Define.
18978 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
18979 (TARGET_DELEGITIMIZE_ADDRESS): Define.
18980 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
18981 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
18982 (TARGET_ICT_MODEL_SMALL): Define.
18983 (TARGET_ICT_MODEL_LARGE): Define.
18984 * config/nds32/nds32.md (movsi): Consider ict model.
18985 (call, call_value): Consider ict model.
18986 (sibcall, sibcall_value): Consider ict model.
18987 * config/nds32/nds32.opt (mict-model): New option.
18988 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
18991 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
18992 Monk Chiang <sh.chiang04@gmail.com>
18993 Jim Wilson <jimw@sifive.com>
18995 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
18996 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
18997 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
18998 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
18999 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
19000 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
19001 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
19002 compute save_libcall_adjustment properly.
19003 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
19004 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
19005 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
19006 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
19007 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
19008 (ABI_SPEC): Handle mabi=ilp32e.
19009 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
19010 (RVE): Add RVE mask.
19011 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
19012 <-march>: Add rv32e as an example.
19014 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
19017 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
19018 (intra_create_variable_infos): Handle C++ constructors.
19020 2018-05-18 Martin Liska <mliska@suse.cz>
19022 * passes.def: Remove a redundant pass.
19024 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
19027 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
19029 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19031 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
19033 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
19035 (armv2, armv2a, armv3, armv3m): Delete architectures.
19036 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
19037 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
19038 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
19040 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
19041 (*mulsidi3adddi): Likewise.
19042 (mulsidi3): Likewise.
19043 (*mulsidi3_nov6): Likewise.
19044 (umulsidi3): Likewise.
19045 (umulsidi3_nov6): Likewise.
19046 (umaddsidi4): Likewise.
19047 (*umulsidi3adddi): Likewise.
19048 (smulsi3_highpart): Likewise.
19049 (*smulsi3_highpart_nov6): Likewise.
19050 (umulsi3_highpart): Likewise.
19051 (*umulsi3_highpart_nov6): Likewise.
19052 * config/arm/arm.h (arm_arch3m): Delete.
19053 * config/arm/arm.c (arm_arch3m): Delete.
19054 (arm_option_override_internal): Update armv3-related comment.
19055 (arm_configure_build_target): Delete use of isa_bit_mode32.
19056 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
19057 (arm_rtx_costs_internal): Delete check of arm_arch3m.
19058 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
19059 (mulsa3): Likewise.
19060 (mulusa3): Likewise.
19061 * config/arm/arm-protos.h (arm_arch3m): Delete.
19062 * config/arm/arm-tables.opt: Regenerate.
19063 * config/arm/arm-tune.md: Likewise.
19064 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
19065 deleted architectures.
19067 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19069 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
19070 (armv5t, armv5te): New features.
19071 (ARMv5, ARMv5e): Delete fgroups.
19072 (ARMv5t, ARMv5te): Adjust for above changes.
19073 (ARMv6m): Likewise.
19074 (armv5, armv5e): Delete arches.
19075 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
19077 (*call_reg_arm): Likewise.
19078 (*call_value_reg_armv5): Likewise.
19079 (*call_value_reg_arm): Likewise.
19080 (*call_symbol): Likewise.
19081 (*call_value_symbol): Likewise.
19082 (*sibcall_insn): Likewise.
19083 (*sibcall_value_insn): Likewise.
19084 (clzsi2): Likewise.
19085 (prefetch): Likewise.
19086 (define_split and define_peephole2 dependent on arm_arch5):
19088 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
19090 (TARGET_ARM_QBIT): Likewise.
19091 (TARGET_DSP_MULTIPLY): Likewise.
19092 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
19093 (arm_arch5, arm_arch5e): Delete.
19094 (arm_arch5t, arm_arch5te): Declare.
19095 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
19096 (arm_arch5t): Declare.
19097 (arm_option_reconfigure_globals): Update for the above.
19098 (arm_options_perform_arch_sanity_checks): Update comment, replace
19099 use of arm_arch5 with arm_arch5t.
19100 (use_return_insn): Likewise.
19101 (arm_emit_call_insn): Likewise.
19102 (output_return_instruction): Likewise.
19103 (arm_final_prescan_insn): Likewise.
19104 (arm_coproc_builtin_available): Likewise.
19105 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
19106 arm_arch5e with arm_arch5t and arm_arch5te.
19107 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
19108 (arm_arch5t, arm_arch5te): Declare.
19109 * config/arm/arm-tables.opt: Regenerate.
19110 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
19111 * config/arm/t-multilib: Likewise.
19112 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
19113 instead of arm_arch5.
19114 (*call_reg_thumb1): Likewise.
19115 (*call_value_reg_thumb1_v5): Likewise.
19116 (*call_value_reg_thumb1): Likewise.
19117 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
19119 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
19121 2018-05-18 Martin Liska <mliska@suse.cz>
19123 PR gcov-profile/84846
19124 * doc/gcov.texi: Document -t option of gcov tool.
19126 2018-05-18 Martin Liska <mliska@suse.cz>
19128 PR gcov-profile/84846
19129 * gcov.c (print_usage): Add new -t option.
19130 (process_args): Handle the option.
19131 (generate_results): Use stdout as output when requested by
19134 2018-05-18 Martin Liska <mliska@suse.cz>
19136 PR gcov-profile/84846
19137 * coverage.c (coverage_init): Write PWD to .gcno file.
19138 * doc/gcov.texi: Document how working directory is printed.
19139 * gcov-dump.c (dump_gcov_file): Print PWD.
19140 * gcov.c (output_intermediate_file): Likewise.
19141 (read_graph_file): Read PWD string.
19142 (output_lines): Print PWD.
19144 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19146 PR middle-end/85817
19147 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
19148 for retval and return false if all args to phi are zero.
19150 2018-05-18 Richard Biener <rguenther@suse.de>
19152 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
19154 (evrp_dom_walker::before_dom_children): Call it.
19156 2018-05-18 Richard Biener <rguenther@suse.de>
19158 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
19159 results when processing array refs with variable index.
19161 2018-05-18 Toon Moene <toon@moene.org>
19163 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
19164 directly after that of -floop-interchange. Indicate that both
19165 options are enabled by default when specifying -O3.
19167 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19169 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
19170 iterator. Delete separate integer-mode vec_set<mode> expander.
19171 (aarch64_simd_vec_setv2di): Delete.
19172 (vec_setv2di): Delete.
19173 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
19174 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
19175 the "w, r" alternative.
19177 2018-05-18 Martin Liska <mliska@suse.cz>
19179 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
19180 * tree-pass.h (make_pass_lower_switch_O0): New function.
19181 * tree-switch-conversion.c (node_has_low_bound): Remove.
19182 (node_has_high_bound): Likewise.
19183 (node_is_bounded): Likewise.
19184 (class pass_lower_switch): Make it a template type and create
19186 (pass_lower_switch::execute): Add template argument.
19187 (make_pass_lower_switch): New function.
19188 (make_pass_lower_switch_O0): New function.
19189 (do_jump_if_equal): Remove.
19190 (emit_case_nodes): Simplify to just handle all 3 cases and leave
19191 all the hard work to tree optimization passes.
19193 2018-05-18 Martin Liska <mliska@suse.cz>
19195 * dbgcnt.c (limit_low): Renamed from limit.
19196 (limit_high): New variable.
19197 (dbg_cnt_is_enabled): Check for upper limit.
19198 (dbg_cnt): Adjust dumping.
19199 (dbg_cnt_set_limit_by_index): Add new argument for high
19201 (dbg_cnt_set_limit_by_name): Likewise.
19202 (dbg_cnt_process_single_pair): Parse new format.
19203 (dbg_cnt_process_opt): Use strtok.
19204 (dbg_cnt_list_all_counters): Remove 'value' and add
19206 * doc/invoke.texi: Document changes.
19208 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
19210 * doc/sourcebuild.texi (scalar_all_fma): Document.
19211 * tree.def (FMA_EXPR): Delete.
19212 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
19213 * internal-fn.c (ternary_direct): New macro.
19214 (expand_ternary_optab_fn): Likewise.
19215 (direct_ternary_optab_supported_p): Likewise.
19216 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
19217 * builtins.c (fold_builtin_fma): Delete.
19218 (fold_builtin_3): Don't call it.
19219 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
19220 * expr.c (expand_expr_real_2): Likewise.
19221 * fold-const.c (operand_equal_p): Likewise.
19222 (fold_ternary_loc): Likewise.
19223 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
19224 * gimple.c (DEFTREECODE): Likewise.
19225 * gimplify.c (gimplify_expr): Likewise.
19226 * optabs-tree.c (optab_for_tree_code): Likewise.
19227 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
19228 * tree-eh.c (operation_could_trap_p): Likewise.
19229 (stmt_could_throw_1_p): Likewise.
19230 * tree-inline.c (estimate_operator_cost): Likewise.
19231 * tree-pretty-print.c (dump_generic_node): Likewise.
19232 (op_code_prio): Likewise.
19233 * tree-ssa-loop-im.c (stmt_cost): Likewise.
19234 * tree-ssa-operands.c (get_expr_operands): Likewise.
19235 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
19236 * fold-const-call.h (fold_fma): Delete.
19237 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
19238 CFN_FNMA and CFN_FNMS.
19239 (fold_fma): Delete.
19240 * genmatch.c (combined_fn): New enum.
19241 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
19242 (commutative_op): New function.
19243 (commutate): Use it. Handle more than 2 operands.
19244 (dt_operand::gen_gimple_expr): Use commutative_op.
19245 (parser::parse_expr): Allow :c to be used with non-binary
19246 operators if the commutative operand is known.
19247 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
19248 CFN_FMS, CFN_FNMA and CFN_FNMS.
19249 (backprop::process_assign_use): Remove FMA_EXPR handling.
19250 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
19251 (gen_hsa_fma): New function.
19252 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
19253 IFN_FNMA and IFN_FNMS.
19254 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
19255 * gimple-fold.h (follow_all_ssa_edges): Declare.
19256 * gimple-fold.c (follow_all_ssa_edges): New function.
19257 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
19258 gimple_build interface and use follow_all_ssa_edges to fold the result.
19259 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
19260 instead of checking for optabs directly.
19261 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
19262 rather than FMA_EXPRs.
19263 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
19264 call to IFN_FMA instead of an FMA_EXPR.
19266 2018-05-17 Jim Wilson <jimw@sifive.com>
19268 * expr.c (do_tablejump): When converting index to Pmode, if we have a
19269 sign extended promoted subreg, and the range does not have the sign bit
19270 set, then do a sign extend.
19272 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
19273 test, check for sign extended subreg and/or constant operands, and
19274 do a sign extend in that case.
19276 2018-05-17 Steve Ellcey <sellcey@cavium.com>
19278 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
19279 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
19281 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
19282 Change logics_shift_reg to logics_shift_imm.
19283 (thunderx2t99_fp_loadpair_basic): Delete.
19284 (thunderx2t99_fp_storepair_basic): Delete.
19285 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
19286 (thunderx2t99_asimd_polynomial): Delete.
19287 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
19288 and neon_fp_mul_d_scalar_q.
19289 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
19290 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
19291 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
19292 (thunderx2t99_asimd_lut): Add missing tbl types.
19293 (thunderx2t99_asimd_ext): Delete.
19294 (thunderx2t99_asimd_load1_1_mult): Delete.
19295 (thunderx2t99_asimd_load1_2_mult): Delete.
19296 (thunderx2t99_asimd_load1_ldp): New.
19297 (thunderx2t99_asimd_load1): New.
19298 (thunderx2t99_asimd_load2): Add missing *load2* types.
19299 (thunderx2t99_asimd_load3): New.
19300 (thunderx2t99_asimd_load4): New.
19301 (thunderx2t99_asimd_store1_1_mult): Delete.
19302 (thunderx2t99_asimd_store1_2_mult): Delete.
19303 (thunderx2t99_asimd_store2_mult): Delete.
19304 (thunderx2t99_asimd_store2_onelane): Delete.
19305 (thunderx2t99_asimd_store_stp): New.
19306 (thunderx2t99_asimd_store1): New.
19307 (thunderx2t99_asimd_store2): New.
19308 (thunderx2t99_asimd_store3): New.
19309 (thunderx2t99_asimd_store4): New.
19311 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
19313 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
19314 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
19316 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
19317 Segher Boessenkool <segher@kernel.crashing.org>
19320 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
19323 2018-05-17 Richard Biener <rguenther@suse.de>
19325 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
19326 for pruning loop and prune defs feeding only already visited PHIs.
19328 2018-05-17 Richard Biener <rguenther@suse.de>
19330 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
19332 2018-05-17 Bin Cheng <bin.cheng@arm.com>
19333 Richard Biener <rguenther@suse.de>
19335 PR tree-optimization/85793
19336 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
19337 for VMAT_ELEMENTWISE.
19339 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19341 * internal-fn.h (lookup_internal_fn): Declare
19342 * internal-fn.c (lookup_internal_fn): New function.
19343 * gimple.c (gimple_build_call_from_tree): Handle calls to
19344 internal functions.
19345 * gimple-pretty-print.c (dump_gimple_call): Print "." before
19346 internal function names.
19347 * tree-pretty-print.c (dump_generic_node): Likewise.
19348 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
19350 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19352 * gimple-fold.h (gimple_build): Make the function forms take
19353 combined_fn rather than built_in_function.
19354 (gimple_simplify): Likewise.
19355 * gimple-match-head.c (gimple_simplify): Likewise.
19356 * gimple-fold.c (gimple_build): Likewise.
19357 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
19358 rather than gimple_build_call_internal.
19359 (get_initial_defs_for_reduction): Likewise.
19360 (vect_create_epilog_for_reduction): Likewise.
19361 (vectorizable_live_operation): Likewise.
19363 2018-05-17 Martin Liska <mliska@suse.cz>
19365 * gimple-ssa-sprintf.c (format_directive): Do not use
19366 space in between 'G_' and '('.
19368 2018-05-17 Jakub Jelinek <jakub@redhat.com>
19371 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
19372 even if the mask is not all ones.
19375 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
19377 (ix86_gimple_fold_builtin): Likewise.
19380 * config/i386/i386.c: Include tree-vector-builder.h.
19381 (ix86_vector_shift_count): New function.
19382 (ix86_fold_builtin): Fold shift builtins by scalar count.
19383 (ix86_gimple_fold_builtin): Likewise.
19385 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
19386 _mm512_setzero): New intrinsics.
19388 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
19389 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19391 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
19392 code generation for cases where splatting a value is not useful.
19393 * simplify-rtx.c (simplify_ternary_operation): Simplify
19394 vec_merge across a vec_duplicate and a paradoxical subreg forming
19395 a vector mode to a vec_concat.
19397 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
19399 * config.gcc: Support "goldmont-plus".
19400 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19402 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19403 PROCESSOR_GOLDMONT_PLUS.
19404 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
19405 (processor_target_table): Add "goldmont-plus".
19406 (PTA_GOLDMONT_PLUS): Define.
19407 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
19408 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
19409 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
19410 (fold_builtin_cpu): Add "goldmont-plus".
19411 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
19412 (ix86_option_override_internal): Add "goldmont-plus".
19413 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
19414 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
19415 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
19416 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
19418 2018-05-17 Richard Biener <rguenther@suse.de>
19420 PR tree-optimization/85757
19421 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
19422 remove defs that only feed that PHI from further processing.
19424 2018-05-16 Jim Wilson <jimw@sifive.com>
19426 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
19428 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
19430 2018-05-16 Mark Wielaard <mark@klomp.org>
19432 * dwarf2out.c (count_index_strings): New function.
19433 (output_indirect_strings): Call count_index_strings and generate
19434 header for dwarf_version >= 5.
19436 2018-05-16 Mark Wielaard <mark@klomp.org>
19438 * dwarf2out.c (dwarf_FORM): New function.
19439 (set_indirect_string): Use dwarf_FORM.
19440 (reset_indirect_string): Likewise.
19441 (size_of_die): Likewise.
19442 (value_format): Likewise.
19443 (output_die): Likewise.
19444 (add_skeleton_AT_string): Likewise.
19445 (output_macinfo_op): Likewise.
19446 (index_string): Likewise.
19447 (output_index_string_offset): Likewise.
19448 (output_index_string): Likewise.
19449 (count_index_strings): Likewise.
19451 2018-05-16 Carl Love <cel@us.ibm.com>
19453 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19454 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
19456 2018-05-16 Martin Jambor <mjambor@suse.cz>
19458 * ipa-prop.c (ipa_free_all_edge_args): Remove.
19459 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
19461 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
19463 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
19464 (fnma<mode>4): Likewise.
19465 (fms<mode>4): Likewise.
19466 (fnms<mode>4): Likewise.
19467 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
19468 (aarch64_fnma<mode>4): Likewise.
19469 (aarch64_fms<mode>4): Likewise.
19470 (aarch64_fnms<mode>4): Likewise.
19471 (aarch64_fnmadd<mode>4): Likewise.
19473 2018-05-16 Jason Merrill <jason@redhat.com>
19475 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
19477 2018-05-16 Richard Biener <rguenther@suse.de>
19479 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
19480 (dump_stmt_cost): Declare.
19481 (add_stmt_cost): Dump cost we add.
19482 (add_stmt_costs): New function.
19483 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
19484 No longer exported.
19485 (vect_analyze_stmt): Adjust prototype.
19486 (vectorizable_condition): Likewise.
19487 (vectorizable_live_operation): Likewise.
19488 (vectorizable_reduction): Likewise.
19489 (vectorizable_induction): Likewise.
19490 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
19491 cost vector to pass to vectorizable_ and record afterwards.
19492 (vect_model_reduction_cost): Take cost vector argument and adjust.
19493 (vect_model_induction_cost): Likewise.
19494 (vectorizable_reduction): Likewise.
19495 (vectorizable_induction): Likewise.
19496 (vectorizable_live_operation): Likewise.
19497 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
19498 SLP_TREE_NUMBER_OF_VEC_STMTS.
19499 (vect_analyze_slp_cost_1): Remove.
19500 (vect_analyze_slp_cost): Likewise.
19501 (vect_slp_analyze_node_operations): Take visited args and
19502 a target cost vector. Avoid processing already visited stmt sets.
19503 (vect_slp_analyze_operations): Use a local cost vector to gather
19504 costs and register those of non-discarded instances.
19505 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
19506 (vect_schedule_slp_instance): Remove copying of
19507 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
19509 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
19510 adding cost. Record cost entry location.
19511 (vect_prologue_cost_for_slp_op): Function to compute cost of
19512 a constant or invariant generated for SLP vect in the prologue,
19513 split out from vect_analyze_slp_cost_1.
19514 (vect_model_simple_cost): Make static. Adjust for SLP costing.
19515 (vect_model_promotion_demotion_cost): Likewise.
19516 (vect_model_store_cost): Likewise, make static.
19517 (vect_model_load_cost): Likewise.
19518 (vectorizable_bswap): Add cost vector arg and adjust.
19519 (vectorizable_call): Likewise.
19520 (vectorizable_simd_clone_call): Likewise.
19521 (vectorizable_conversion): Likewise.
19522 (vectorizable_assignment): Likewise.
19523 (vectorizable_shift): Likewise.
19524 (vectorizable_operation): Likewise.
19525 (vectorizable_store): Likewise.
19526 (vectorizable_load): Likewise.
19527 (vectorizable_condition): Likewise.
19528 (vectorizable_comparison): Likewise.
19529 (can_vectorize_live_stmts): Likewise.
19530 (vect_analyze_stmt): Likewise.
19531 (vect_transform_stmt): Adjust calls to vectorizable_*.
19532 * tree-vectorizer.c: Include gimple-pretty-print.h.
19533 (dump_stmt_cost): New function.
19535 2018-05-16 Richard Biener <rguenther@suse.de>
19537 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
19538 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
19539 * tree-ssa-dse.c: Include tree-ssa-loop.h.
19540 (check_name): New callback.
19541 (dse_classify_store): Track cycles via a visited bitmap of PHI
19542 defs and simplify handling of in-loop and across loop dead stores
19543 and properly fail for loop-variant refs. Handle byte-tracking with
19544 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
19547 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
19549 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
19550 (vect_get_mask_type_for_stmt): Likewise.
19551 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
19553 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
19554 to determine the statement's vector type and the vector type that
19555 should be used for calculating nunits. Deal with cases in which
19556 the type has to be deferred.
19557 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
19558 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
19559 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
19560 (vect_determine_vf_for_stmt): New functions, split out from...
19561 (vect_determine_vectorization_factor): ...here.
19562 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
19563 (vect_get_mask_type_for_stmt): New functions, split out from
19564 vect_determine_vectorization_factor.
19566 2018-05-16 Richard Biener <rguenther@suse.de>
19568 * tree-cfg.c (verify_gimple_assign_ternary): Properly
19569 verify the [VEC_]COND_EXPR embedded comparison.
19571 2018-05-15 Martin Sebor <msebor@redhat.com>
19573 PR tree-optimization/85753
19574 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
19575 RECORD_TYPE in addition to ARRAY_TYPE.
19577 2018-05-15 Martin Sebor <msebor@redhat.com>
19579 PR middle-end/85643
19580 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
19582 2018-05-15 Richard Biener <rguenther@suse.de>
19584 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
19585 add by_clobber_p one. Change algorithm to collect all defs
19586 representing uses we need to walk and try reducing them to
19587 a single one before failing.
19588 (dse_dom_walker::dse_optimize_stmt): Adjust.
19590 2018-05-13 Mark Wielaard <mark@klomp.org>
19592 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
19593 (size_of_loc_descr): Likewise.
19594 (output_loc_operands): Likewise.
19595 (output_loc_operands_raw): Likewise.
19596 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
19597 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
19598 (hash_loc_operands): Likewise.
19599 (compare_loc_operands): Likewise.
19601 2018-05-14 Mark Wielaard <mark@klomp.org>
19603 * dwarf2out.c (count_index_addrs): New function.
19604 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
19606 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19608 PR tree-optimization/83648
19609 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
19610 return value as malloc candidate.
19612 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19615 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
19616 param as true in call to suggest_attribute.
19618 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
19620 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
19621 -mreadonly-in-sdata.
19623 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19625 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
19627 (aarch64_crypto_aesd_fused): Likewise.
19629 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
19631 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
19632 (movsi_aarch64): Likewise.
19633 (load_pairsi): Likewise.
19634 (load_pairdi): Likewise.
19635 (store_pairsi): Likewise.
19636 (store_pairdi): Likewise.
19637 (load_pairsf): Likewise.
19638 (load_pairdf): Likewise.
19639 (store_pairsf): Likewise.
19640 (store_pairdf): Likewise.
19641 (zero_extend): Likewise.
19642 (trunc): Swap alternatives.
19643 (fcvt_target): Add '?' to prefer w over r.
19645 2018-05-14 Jakub Jelinek <jakub@redhat.com>
19648 * config/i386/i386.md: Disallow non-commutative arithmetics in
19649 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
19650 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
19651 in the peephole2 before it.
19653 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
19655 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
19656 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
19657 (ix86_handle_option): Handle -mcldemote.
19658 * config.gcc: New header.
19659 * config/i386/cldemoteintrin.h: New file.
19660 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
19661 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19663 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19664 OPTION_MASK_ISA_CLDEMOTE.
19665 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
19666 (ix86_valid_target_attribute_inner_p): Ditto.
19667 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
19668 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
19669 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
19670 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
19671 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
19673 * config/i386/i386.opt: Add -mcldemote.
19674 * config/i386/x86intrin.h: New header.
19675 * doc/invoke.texi: Add -mcldemote.
19677 2018-05-14 Richard Biener <rguenther@suse.de>
19679 * doc/match-and-simplify.texi: Adjust :s documentation.
19681 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
19683 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
19684 intended memcpy size.
19685 (REORDER_45): Likewise.
19687 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
19689 * sort.cc: New file.
19690 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
19691 * vec.c (qsort_chk): Use gcc_qsort.
19692 * Makefile.in (OBJS-libcommon): Add sort.o.
19693 (build/sort.o): New target. Use it...
19694 (BUILD_RTL): ... here, and...
19695 (build/gencfn-macros): ... here, and...
19696 (build/genmatch): ... here.
19698 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19699 Chung-Ju Wu <jasonwucj@gmail.com>
19701 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
19702 * config/nds32/nds32-graywolf.md: New file.
19703 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
19704 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
19706 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
19707 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
19708 * config/nds32/nds32.md (pipeline_model): Add graywolf.
19709 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
19710 * config/nds32/pipelines.md: Include n15 settings.
19712 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19713 Chung-Ju Wu <jasonwucj@gmail.com>
19715 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
19716 * config/nds32/nds32-n13.md: New file.
19717 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
19718 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
19720 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
19721 * config/nds32/nds32.md (pipeline_model): Add n13.
19722 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
19723 * config/nds32/pipelines.md: Include n13 settings.
19725 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19726 Chung-Ju Wu <jasonwucj@gmail.com>
19728 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
19729 * config/nds32/nds32-n10.md: New file.
19730 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
19731 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
19733 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
19734 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
19735 * config/nds32/nds32.md (pipeline_model): Add n10.
19736 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
19737 * config/nds32/pipelines.md: Include n10 settings.
19739 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
19740 Kito Cheng <kito.cheng@gmail.com>
19741 Chung-Ju Wu <jasonwucj@gmail.com>
19743 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
19744 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19745 Add enum values for DSP extension instructions.
19746 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
19748 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
19749 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
19750 New code iterators.
19751 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
19752 * config/nds32/nds32-dspext.md: New file for DSP implementation.
19753 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
19754 * config/nds32/nds32-intrinsic.md: Likewise.
19755 * config/nds32/nds32_intrinsic.h: Likewise.
19756 * config/nds32/nds32-md-auxiliary.c: Likewise.
19757 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
19758 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
19759 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
19760 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
19761 * config/nds32/nds32-protos.h: New declarations for DSP extension.
19762 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
19763 TYPE_DMAC in switch statement.
19764 * config/nds32/nds32.c: New checking and implementation for DSP
19765 extension instructions.
19766 * config/nds32/nds32.h: Likewise.
19767 * config/nds32/nds32.md: Likewise.
19768 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
19769 * config/nds32/predicates.md: Implement new predicates for DSP
19772 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19774 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
19775 Reformat alternatives and attributes so it is easier to identify
19776 which constraints/attributes go with which instruction.
19777 (mov<mode>_hardfloat32, FMOVE64): Likewise.
19778 (mov<mode>_softfloat32, FMOVE64): Likewise.
19779 (mov<mode>_hardfloat64, FMOVE64): Likewise.
19780 (mov<mode>_softfloat64, FMOVE64): Likewise.
19782 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
19784 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19786 (Basic PowerPC Built-in Functions): The new name of the
19787 subsection previously known as "PowerPC Built-in Functions".
19788 (Basic PowerPC Built-in Functions Available on all Configurations):
19790 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
19791 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
19792 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
19793 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
19795 2018-05-11 Martin Jambor <mjambor@suse.cz>
19798 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
19801 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
19804 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
19806 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
19808 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
19809 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
19810 (ix86_handle_option): Handle -mwaitpkg.
19811 * config.gcc: New header.
19812 * config/i386/cpuid.h (bit_WAITPKG): New bit.
19813 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
19814 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
19816 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19817 OPTION_MASK_ISA_WAITPKG.
19818 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
19819 (ix86_option_override_internal): Add PTA_WAITPKG.
19820 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
19821 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
19822 IX86_BUILTIN_TPAUSE.
19823 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
19824 __builtin_ia32_umwait and __builtin_ia32_tpause.
19825 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
19826 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
19827 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
19828 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
19829 UNSPECV_TPAUSE): New.
19830 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
19831 * config/i386/i386.opt: Add -mwaitpkg.
19832 * config/i386/waitpkgintrin.h: New file.
19833 * config/i386/x86intrin.h: New header.
19834 * doc/invoke.texi: Add -mwaitpkg.
19836 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
19839 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
19841 (cortex-m0): Use armv6s-m isa.
19842 (cortex-m0plus): Likewise.
19843 (cortex-m1): Likewise.
19844 (cortex-m0.small-multiply): Likewise.
19845 (cortex-m0plus.small-multiply): Likewise.
19846 (cortex-m1.small-multiply): Likewise.
19848 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
19849 Jakub Jelinek <jakub@redhat.com>
19851 PR tree-optimization/85692
19852 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
19853 source permute as well.
19855 2018-05-11 Martin Liska <mliska@suse.cz>
19858 * doc/extend.texi: Document LLVM style format for no_sanitize
19861 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19863 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
19864 mode_supports_vsx_dform_quad to mode_supports_dq_form.
19865 (mode_supports_vsx_dform_quad): Likewise.
19866 (mode_supports_vmx_dform): Move these functions to be next to the
19867 other mode_supports functions.
19868 (mode_supports_dq_form): Likewise.
19869 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
19870 mode_supports_dq_form.
19871 (reg_offset_addressing_ok_p): Likewise.
19872 (offsettable_ok_by_alignment): Likewise.
19873 (rs6000_legitimate_offset_address_p): Likewise.
19874 (legitimate_lo_sum_address_p): Likewise.
19875 (rs6000_legitimize_address): Likewise.
19876 (rs6000_legitimize_reload_address): Likewise.
19877 (rs6000_secondary_reload_inner): Likewise.
19878 (rs6000_preferred_reload_class): Likewise.
19879 (rs6000_output_move_128bit): Likewise.
19881 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
19883 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
19884 Generate SImode target register for null target.
19885 <case IX86_BUILTIN_XGETBV>: Ditto.
19886 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
19887 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
19889 2018-05-10 Carl Love <cel@us.ibm.com>
19891 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19892 dcbtt and dcbtstt if operands[2] is 0.
19894 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
19897 * config/i386/sse.md (usadv64qi): New expander.
19899 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
19901 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
19902 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
19903 -maltivec=be support.
19904 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
19905 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
19906 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
19907 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
19908 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
19909 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
19910 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
19911 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
19912 altivec_vsumsws): Adjust.
19913 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
19914 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
19915 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
19917 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
19918 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
19919 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
19920 (altivec_lve<VI_char>x): Delete expand.
19921 (*altivec_lve<VI_char>x_internal): Rename to...
19922 (altivec_lve<VI_char>x): ... this.
19923 (altivec_lvxl_<mode>): Delete expand.
19924 (*altivec_lvxl_<mode>_internal): Rename to ...
19925 (altivec_lvxl_<mode>): ... this.
19926 (altivec_stvxl_<mode>): Delete expand.
19927 (*altivec_stvxl_<mode>_internal): Rename to ...
19928 (altivec_stvxl_<mode>): ... this.
19929 (altivec_stve<VI_char>x): Delete expand.
19930 (*altivec_stve<VI_char>x_internal): Rename to ...
19931 (altivec_stve<VI_char>x): ... this.
19932 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
19933 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
19934 reduc_plus_scal_<mode>): Adjust.
19935 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
19937 (rs6000_cpu_cpp_builtins): Adjust.
19938 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
19939 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
19940 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
19941 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
19942 -maltivec=be support.
19943 (rs6000_split_vec_extract_var): Adjust.
19944 (rs6000_split_v4si_init): Adjust.
19945 (swap_selector_for_mode): Delete.
19946 (altivec_expand_lvx_be, altivec_expand_stvx_be,
19947 altivec_expand_stvex_be): Delete.
19948 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
19949 -maltivec=be support.
19950 (rs6000_gimple_fold_builtin): Ditto.
19951 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
19953 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
19954 (TARGET_DIRECT_MOVE_64BIT): Adjust.
19955 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
19956 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
19957 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
19958 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
19959 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
19960 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
19961 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
19962 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
19963 anonymous split): Adjust.
19964 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
19965 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
19967 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
19969 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
19970 when --with-gxx-include-dir is also specified.
19971 * configure: Regenerate.
19973 2018-05-09 Jim Wilson <jimw@sifive.com>
19976 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
19977 * config/riscv/t-withmultilib: New.
19978 * config/riscv/withmultilib.h: New.
19979 * doc/install.texi: Document RISC-V --with-multilib-list support.
19981 2018-05-09 Richard Biener <rguenther@suse.de>
19983 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
19985 (vect_bb_vectorization_profitable_p): Adjust. Compute
19986 actual scalar cost using the cost vector and the add_stmt_cost
19989 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19991 PR rtl-optimization/85645
19992 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
19993 in the REG_CFA_REGISTER note for LR, don't leave it empty.
19995 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19997 PR rtl-optimization/85645
19998 * shrink-wrap.c (spread_components): Return a boolean saying if
19999 anything was changed.
20000 (try_shrink_wrapping_separate): Iterate spread_components until
20001 nothing changes anymore.
20003 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20005 PR rtl-optimization/85645
20006 * regrename.c (build_def_use): Also kill the chains that include the
20007 destination of a REG_CFA_REGISTER note.
20009 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20011 PR rtl-optimization/85645
20012 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
20013 insn that has a REG_CFA_REGISTER note.
20015 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
20017 * cfgexpand.c (expand_clobber): New function.
20018 (expand_gimple_stmt_1): Use it.
20019 * tree-vect-stmts.c (vect_clobber_variable): New function,
20021 (vectorizable_simd_clone_call): ...here.
20022 (vectorizable_store): Emit a clobber either side of an
20023 IFN_STORE_LANES sequence.
20024 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
20026 2018-05-09 Tom de Vries <tom@codesourcery.com>
20029 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
20030 (define_insn "trap_if_false"): Add exit after trap.
20032 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
20034 PR rtl-optimization/85638
20035 * bb-reorder.c: Include common/common-target.h.
20036 (create_forwarder_block): New function extracted from...
20037 (fix_up_crossing_landing_pad): ...here. Rename into...
20038 (dw2_fix_up_crossing_landing_pad): ...this.
20039 (sjlj_fix_up_crossing_landing_pad): New function.
20040 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
20041 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
20042 from both partitions and exit the loop after one iteration.
20044 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
20047 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20049 (Basic PowerPC Built-in Functions): The new name of the
20050 subsection previously known as "PowerPC Built-in Functions".
20051 (Basic PowerPC Built-in Functions Available on all Configurations):
20053 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20055 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20057 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20059 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20062 2018-05-08 Jim Wilson <jimw@sifive.com>
20064 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
20065 (LD_EMUL_SUFFIX): New.
20066 (LINK_SPEC): Use it.
20068 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
20070 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20072 (Basic PowerPC Built-in Functions): The new name of the
20073 subsection previously known as "PowerPC Built-in Functions".
20074 (Basic PowerPC Built-in Functions Available on all Configurations):
20076 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20078 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20080 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20082 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20085 2018-05-08 Jakub Jelinek <jakub@redhat.com>
20088 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
20089 after cmpelim optimization.
20091 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
20093 * config.gcc: Support "goldmont".
20094 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
20095 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20096 PROCESSOR_GOLDMONT.
20097 * config/i386/i386.c (m_GOLDMONT): Define.
20098 (processor_target_table): Add "goldmont".
20099 (PTA_GOLDMONT): Define.
20100 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
20101 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
20102 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
20103 (fold_builtin_cpu): Add "goldmont".
20104 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
20105 (ix86_option_override_internal): Add "goldmont".
20106 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
20107 (processor_type): Add PROCESSOR_GOLDMONT.
20108 * config/i386/i386.md: Add CPU "glm".
20109 * config/i386/glm.md: New file.
20110 * config/i386/x86-tune.def: Add m_GOLDMONT.
20111 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
20113 2018-05-08 Jakub Jelinek <jakub@redhat.com>
20116 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
20118 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
20119 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
20120 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
20123 * config/i386/i386.c (ix86_fold_builtin): Handle
20124 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
20127 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
20128 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
20130 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
20133 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
20134 (check_arch): Likewise.
20135 (check_fpu): Return the result rather than printing it.
20136 (end arch): Fix operator precedence.
20137 (end cpu): Likewise.
20138 (END): Print the result from check_fpu.
20140 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20141 Alan Hayward <alan.hayward@arm.com>
20142 David Sherwood <david.sherwood@arm.com>
20144 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
20145 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
20146 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
20147 (*fcmuo<mode>_and): New patterns.
20149 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20151 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
20152 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
20153 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
20154 (cmp_op, sve_imm_con): New code attributes.
20155 (SVE_COND_INT_CMP, imm_con): Delete.
20156 (cmp_op): Remove above unspecs from int attribute.
20157 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
20159 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
20160 comparison-specific unspecs.
20161 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
20162 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
20163 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
20164 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
20165 (*vec_fcm<cmp_op><mode>): Rename to...
20166 (*fcm<cmp_op><mode>): ...this and adjust likewise.
20167 (*vec_fcmuo<mode>): Rename to...
20168 (*fcmuo<mode>): ...this and adjust likewise.
20169 (*pred_fcm<cmp_op><mode>): New pattern.
20170 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
20171 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
20173 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
20175 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
20176 (aarch64_emit_sve_predicated_cond): New function.
20177 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
20178 (aarch64_emit_unspec_cond_or): Replace with...
20179 (aarch64_emit_sve_or_conds): ...this new function. Use
20180 aarch64_emit_sve_ptrue_op for the individual comparisons and
20181 aarch64_emit_binop to OR them together.
20182 (aarch64_emit_inverted_unspec_cond): Replace with...
20183 (aarch64_emit_sve_inverted_cond): ...this new function. Use
20184 aarch64_emit_sve_ptrue_op for the comparison and
20185 aarch64_emit_unop to invert the result.
20186 (aarch64_expand_sve_vec_cmp_float): Update after the above
20187 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
20189 2018-05-07 Nathan Sidwell <nathan@acm.org>
20191 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
20192 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
20193 (Backwards Compatibility): Likewise.
20195 2018-05-07 Luis Machado <luis.machado@linaro.org>
20199 2018-05-07 Luis Machado <luis.machado@linaro.org>
20201 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20202 <prefetch_dynamic_strides>: New const bool field.
20203 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20204 prefetch_dynamic_strides.
20205 (exynosm1_prefetch_tune): Likewise.
20206 (thunderxt88_prefetch_tune): Likewise.
20207 (thunderx_prefetch_tune): Likewise.
20208 (thunderx2t99_prefetch_tune): Likewise.
20209 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20211 (aarch64_override_options_internal): Update to set
20212 PARAM_PREFETCH_DYNAMIC_STRIDES.
20213 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20214 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20215 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20216 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20217 prefetch-dynamic-strides setting.
20219 2018-05-07 Luis Machado <luis.machado@linaro.org>
20221 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20222 <minimum_stride>: New const int field.
20223 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20224 minimum_stride field.
20225 (exynosm1_prefetch_tune): Likewise.
20226 (thunderxt88_prefetch_tune): Likewise.
20227 (thunderx_prefetch_tune): Likewise.
20228 (thunderx2t99_prefetch_tune): Likewise.
20229 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20230 (aarch64_override_options_internal): Update to set
20231 PARAM_PREFETCH_MINIMUM_STRIDE.
20232 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20233 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20234 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20235 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20236 stride is constant and is below the minimum stride threshold.
20238 2018-05-07 Luis Machado <luis.machado@linaro.org>
20240 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
20243 2018-05-07 Luis Machado <luis.machado@linaro.org>
20245 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20246 <prefetch_dynamic_strides>: New const bool field.
20247 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20248 prefetch_dynamic_strides.
20249 (exynosm1_prefetch_tune): Likewise.
20250 (thunderxt88_prefetch_tune): Likewise.
20251 (thunderx_prefetch_tune): Likewise.
20252 (thunderx2t99_prefetch_tune): Likewise.
20253 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20255 (aarch64_override_options_internal): Update to set
20256 PARAM_PREFETCH_DYNAMIC_STRIDES.
20257 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20258 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20259 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20260 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20261 prefetch-dynamic-strides setting.
20263 2018-05-07 Luis Machado <luis.machado@linaro.org>
20265 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20266 <minimum_stride>: New const int field.
20267 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20268 minimum_stride field.
20269 (exynosm1_prefetch_tune): Likewise.
20270 (thunderxt88_prefetch_tune): Likewise.
20271 (thunderx_prefetch_tune): Likewise.
20272 (thunderx2t99_prefetch_tune): Likewise.
20273 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20274 (aarch64_override_options_internal): Update to set
20275 PARAM_PREFETCH_MINIMUM_STRIDE.
20276 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20277 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20278 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20279 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20280 stride is constant and is below the minimum stride threshold.
20282 2018-05-06 Jakub Jelinek <jakub@redhat.com>
20285 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
20286 the type is addressable. Don't force op into register if it has
20289 2018-05-05 Roland McGrath <mcgrathr@google.com>
20292 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
20293 any section for which we don't know a specific type it should have,
20294 regardless of name. Previously this was done only for the exact
20295 names ".init_array", ".fini_array", and ".preinit_array".
20296 (default_elf_asm_named_section): Add comment about
20297 relationship with default_section_type_flags and SECTION_NOTYPE.
20298 (get_section): Don't consider it a type conflict if one side has
20299 SECTION_NOTYPE and the other doesn't, as long as neither has the
20300 SECTION_BSS et al used in the default_section_type_flags logic.
20302 2018-05-05 Tom de Vries <tom@codesourcery.com>
20305 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
20306 (workaround_barsyncs): New function.
20307 (nvptx_reorg): Use workaround_barsyncs.
20308 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20309 (define_expand "nvptx_membar_cta"): New define_expand.
20310 (define_insn "*nvptx_membar_cta"): New insn.
20312 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
20314 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
20315 To improve optimization opportunities.
20316 * builtin-types.def: The new needed builtin types for the above.
20318 2018-05-04 Richard Biener <rguenther@suse.de>
20320 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
20321 * gimple-ssa-store-merging.c
20322 (imm_store_chain_info::output_merged_store): Remove redundant create,
20323 release split_store vector contents on failure.
20324 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
20325 scalar stmt vector on cache hit.
20327 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
20329 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
20331 * config.gcc (powerpc-xilinx-eabi*): Remove.
20332 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
20334 (fusion_addis_mem_combo_load): Ditto.
20335 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
20337 (rs6000_cpu_cpp_builtins): Ditto.
20338 * config/rs6000/rs6000-linux.c
20339 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
20340 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
20341 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
20343 (rs6000_setup_reg_addr_masks): Ditto.
20344 (rs6000_init_hard_regno_mode_ok): Ditto.
20345 (rs6000_option_override_internal): Ditto.
20346 (legitimate_lo_sum_address_p): Ditto.
20347 (rs6000_legitimize_address): Ditto.
20348 (rs6000_legitimize_reload_address): Ditto.
20349 (rs6000_legitimate_address_p): Ditto.
20350 (abi_v4_pass_in_fpr): Ditto.
20351 (setup_incoming_varargs): Ditto.
20352 (rs6000_gimplify_va_arg): Ditto.
20353 (rs6000_split_multireg_move): Ditto.
20354 (rs6000_savres_strategy): Ditto.
20355 (rs6000_emit_prologue_components): Ditto.
20356 (rs6000_emit_epilogue_components): Ditto.
20357 (rs6000_emit_prologue): Ditto.
20358 (rs6000_emit_epilogue): Ditto.
20359 (rs6000_elf_file_end): Ditto.
20360 (rs6000_function_value): Ditto.
20361 (rs6000_libcall_value): Ditto.
20362 * config/rs6000/rs6000.h: Ditto.
20363 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
20364 (TARGET_MINMAX): ... this. New.
20365 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
20366 * config/rs6000/rs6000.md: Remove Xilinx FP support.
20367 (*movsi_internal1_single): Delete.
20368 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
20369 mfpu=, mxilinx-fpu): Delete.
20370 * config/rs6000/singlefp.h: Delete.
20371 * config/rs6000/sysv4.h: Remove Xilinx FP support.
20372 * config/rs6000/t-rs6000: Ditto.
20373 * config/rs6000/t-xilinx: Delete.
20374 * config/rs6000/titan.md: Adjust for fp_type removal.
20375 * config/rs6000/vsx.md: Remove Xilinx FP support.
20376 (VStype_simple): Delete.
20377 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
20378 * config/rs6000/xfpu.h: Delete.
20379 * config/rs6000/xfpu.md: Delete.
20380 * config/rs6000/xilinx.h: Delete.
20381 * config/rs6000/xilinx.opt: Delete.
20382 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
20383 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
20385 2018-05-04 Tom de Vries <tom@codesourcery.com>
20388 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
20391 2018-05-04 Richard Biener <rguenther@suse.de>
20393 PR middle-end/85627
20394 * tree-complex.c (update_complex_assignment): We are always in SSA form.
20395 (expand_complex_div_wide): Likewise.
20396 (expand_complex_operations_1): Likewise.
20397 (expand_complex_libcall): Preserve EH info of the original stmt.
20398 (tree_lower_complex): Handle removed blocks.
20399 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
20400 on complex multiplication and division libcall builtins.
20402 2018-05-04 Richard Biener <rguenther@suse.de>
20404 PR middle-end/85574
20405 * fold-const.c (negate_expr_p): Restrict negation of operand
20406 zero of a division to when we know that can happen without
20408 (fold_negate_expr_1): Likewise.
20410 2018-05-04 Jakub Jelinek <jakub@redhat.com>
20413 * real.h (real_nextafter): Declare.
20414 * real.c (real_nextafter): New function.
20415 * fold-const-call.c (fold_const_nextafter): New function.
20416 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
20417 CASE_CFN_NEXTTOWARD.
20418 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
20419 even when arg1_mode is different from arg0_mode.
20421 2018-05-03 Nathan Sidwell <nathan@acm.org>
20423 * doc/extend.texi (Deprecated Features): Remove
20424 -ffriend-injection.
20425 (Backwards Compatibility): Likewise.
20426 * doc/invoke.texi (C++ Language Options): Likewise.
20427 (C++ Dialect Options): Likewise.
20429 2018-05-03 Jakub Jelinek <jakub@redhat.com>
20432 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
20433 _mm512_mask_mullox_epi64): New intrinsics.
20435 2018-05-03 Tom de Vries <tom@codesourcery.com>
20438 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20439 dump files): Add offload-tree.
20441 2018-05-03 Richard Biener <rguenther@suse.de>
20443 PR tree-optimization/85615
20444 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
20445 to loops not nested in BBs loop father to avoid creating multi-entry
20448 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20450 PR tree-optimization/70291
20451 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
20452 arguments. Change return type to tree. Emit libcall as a new
20453 statement rather than replacing existing one when inplace_p is true.
20454 (expand_complex_multiplication_components): New function.
20455 (expand_complex_multiplication): Expand floating-point complex
20456 multiplication using the above.
20457 (expand_complex_division): Rename inner_type parameter to type.
20458 Update expand_complex_libcall call-site.
20459 (expand_complex_operations_1): Update expand_complex_multiplication
20460 and expand_complex_division call-sites.
20462 2018-05-02 Jakub Jelinek <jakub@redhat.com>
20465 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20466 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20467 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
20468 the highest significant bit of the shift count mask is clear. In
20469 check whether and[sq]i3 is needed verify that all significant bits
20470 of the shift count other than the highest are set.
20472 2018-05-02 Tom de Vries <tom@codesourcery.com>
20475 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
20476 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
20477 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
20478 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
20479 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
20480 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
20481 __builtin_goacc_parlevel_size.
20483 2018-05-02 Richard Biener <rguenther@suse.de>
20485 PR tree-optimization/85597
20486 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
20487 do not use split vect_get_vec_defs call but call vect_get_slp_defs
20490 2018-05-02 Tom de Vries <tom@codesourcery.com>
20493 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20494 dump files): Add ltrans-tree.
20496 2018-05-02 Tom de Vries <tom@codesourcery.com>
20499 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20500 dump files): Add wpa-ipa.
20502 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
20504 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
20505 powerpc*-*-linux*paired* target.
20506 * config/rs6000/750cl.h: Delete.
20507 * config/rs6000/paired.h: Delete.
20508 * config/rs6000/paired.md: Delete.
20509 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
20511 * config/rs6000/rs6000-builtin.def: Remove paired float support.
20512 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
20513 comment. Remove paired float support.
20514 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
20515 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
20517 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
20518 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
20520 * config/rs6000/rs6000.c: Remove paired float support.
20521 (paired_expand_vector_init, paired_expand_vector_move,
20522 paired_emit_vector_compare, paired_emit_vector_cond_expr,
20523 (paired_expand_lv_builtin, paired_expand_stv_builtin,
20524 paired_expand_builtin, paired_expand_predicate_builtin,
20525 paired_init_builtins): Delete.
20526 * config/rs6000/rs6000.h: Remove paired float support.
20527 * config/rs6000/rs6000.md: Remove paired float support.
20528 (move_from_CR_ov_bit): Delete.
20529 * config/rs6000/rs6000.opt (mpaired): Delete.
20530 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
20531 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
20533 2018-05-02 Richard Biener <rguenther@suse.de>
20535 PR middle-end/85567
20536 * gimplify.c (gimplify_save_expr): When in SSA form allow
20537 SAVE_EXPRs to compute to SSA vars.
20539 2018-05-02 Jakub Jelinek <jakub@redhat.com>
20542 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20543 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20544 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
20545 clobber operands[2], instead use a new pseudo. Formatting fixes.
20547 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
20549 PR tree-optimization/85586
20550 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
20551 exit early for statements in the same group if the accesses are
20554 2018-05-02 Tom de Vries <tom@codesourcery.com>
20557 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
20560 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
20562 PR tree-optimization/85143
20563 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
20565 2018-05-01 Tom de Vries <tom@codesourcery.com>
20568 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
20569 not found" error message.
20571 2018-05-01 Tom de Vries <tom@codesourcery.com>
20574 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
20575 * vec.c (test_ordered_remove_if): New function.
20576 (vec_c_tests): Call test_ordered_remove_if.
20577 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
20578 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
20579 * tree-vect-patterns.c (vect_pattern_recog_1): Use
20580 VEC_ORDERED_REMOVE_IF.
20582 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20584 PR tree-optimization/82665
20585 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
20586 pointer subtraction where arguments come from a memchr call.
20588 2018-05-01 Jakub Jelinek <jakub@redhat.com>
20590 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
20591 --push-state --as-needed and --pop-state instead of --as-needed and
20592 --no-as-needed if ld supports it.
20593 * configure: Regenerated.
20596 * doc/install.texi2html: Replace _002d with - and _002a with * in
20597 generated html files using sed.
20599 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20602 * gcc-rich-location.c (blank_line_before_p): New function.
20603 (use_new_line): New function.
20604 (gcc_rich_location::add_fixit_insert_formatted): New function.
20605 * gcc-rich-location.h
20606 (gcc_rich_location::add_fixit_insert_formatted): New function.
20608 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20610 * selftest.c (assert_streq): Rename "expected" and "actual" to
20611 "val1" and "val2". Extend NULL-handling to cover both inputs
20612 symmetrically, while still requiring both to be non-NULL for a pass.
20613 * selftest.h (assert_streq): Rename "expected" and "actual" to
20615 (ASSERT_EQ): Likewise.
20616 (ASSERT_EQ_AT): Likewise.
20617 (ASSERT_KNOWN_EQ): Likewise.
20618 (ASSERT_KNOWN_EQ_AT): Likewise.
20619 (ASSERT_NE): Likewise.
20620 (ASSERT_MAYBE_NE): Likewise.
20621 (ASSERT_MAYBE_NE_AT): Likewise.
20622 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
20623 the assertion to pass.
20624 (ASSERT_STREQ_AT): Likewise.
20626 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20628 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
20629 interaction with -pie.
20631 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20633 * selftest.h: Fix alphabetization of per-source-file selftest
20636 2018-04-30 Jason Merrill <jason@redhat.com>
20638 PR c++/61982 - dead stores to destroyed objects.
20639 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
20642 2018-04-30 Jason Merrill <jason@redhat.com>
20644 * tree.c (build_clobber): New.
20645 * tree.h: Declare it.
20646 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
20648 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20650 * diagnostic-show-locus.c (layout::layout): Update for
20651 location_get_source_line returning a char_span.
20652 (struct char_span): Move to input.h.
20653 (struct correction): Update for fields in char_span becoming
20655 (struct source_line): Update for location_get_source_line
20656 returning a char_span.
20657 (layout::print_line): Likewise.
20658 * edit-context.c (edited_file::print_content): Likewise.
20659 (edited_file::print_diff_hunk): Likewise.
20660 (edited_file::print_run_of_changed_lines): Likewise.
20661 (edited_file::get_num_lines): Likewise.
20662 (edited_line::edited_line): Likewise.
20663 * final.c (asm_show_source): Likewise.
20664 * input.c (location_get_source_line): Convert return type
20665 from const char * to char_span, losing the final "line_len"
20667 (dump_location_info): Update for the above.
20668 (get_substring_ranges_for_loc): Likewise. Use a char_span
20669 when handling the literal within the line.
20670 (test_reading_source_line): Update for location_get_source_line
20671 returning a char_span.
20672 * input.h (class char_span): Move here from
20673 diagnostic-show-locus.c, converting from a struct to a class.
20674 Make data members private.
20675 (char_span::operator bool): New.
20676 (char_span::length): New.
20677 (char_span::get_buffer): New.
20678 (char_span::operator[]): New.
20679 (char_span::subspan): Make const.
20680 (char_span::xstrdup): New.
20681 (location_get_source_line): Convert return type from const char *
20682 to char_span, losing the final "line_size" param.
20684 2018-04-30 Jan Hubicka <jh@suse.cz>
20686 * lto-wrapper.c (ltrans_priorities): New static var.
20687 (cmp_priority): New.
20688 (run_gcc): Read priorities and if doing parallel build order
20689 the Makefile by them.
20691 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20693 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
20695 2018-04-30 Richard Biener <rguenther@suse.de>
20697 * tree-cfg.c (verify_address): Remove base argument, add
20698 flag whether to check TREE_ADDRESSABLE and do that.
20699 (verify_expr): Remove.
20700 (verify_types_in_gimple_reference): Add pieces from verify_expr.
20701 (verify_gimple_assign_single): Likewise.
20702 (verify_gimple_switch): Likewise.
20703 (verify_expr_location_1): Dereference tp once. Add (disabled)
20704 piece from verify_expr.
20705 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
20707 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20709 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
20711 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20713 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
20714 (small_data_pattern): Likewise.
20715 (arc_rewrite_small_data): Likewise.
20716 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
20717 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
20718 (get_symbol_alignment): New function.
20719 (legitimate_small_data_address_p): Likewise.
20720 (legitimate_scaled_address): Update, call
20721 legitimate_small_data_address_p.
20722 (output_sdata): New static variable.
20723 (arc_print_operand): Update how we handle small data operands.
20724 (arc_print_operand_address): Likewise.
20725 (arc_legitimate_address_p): Update, use
20726 legitimate_small_data_address_p.
20727 (arc_rewrite_small_data_p): Remove.
20728 (arc_rewrite_small_data_1): Likewise.
20729 (arc_rewrite_small_data): Likewise.
20730 (small_data_pattern): Likewise.
20731 (compact_sda_memory_operand): Update to use
20732 legitimate_small_data_address_p and get_symbol_alignment.
20733 (prepare_move_operands): Don't rewite sdata pattern.
20734 (prepare_extend_operands): Remove.
20735 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
20737 (zero_extendqisi2): Likewise.
20738 (zero_extendhisi2): Likewise.
20739 (extendqihi2): Likewise.
20740 (extendqisi2): Likewise.
20741 (extendhisi2): Likewise.
20742 (addsi3): Likewise.
20743 (subsi3): Likewise.
20744 (andsi3): Likewise.
20745 * config/arc/constraints.md (Usd): Change it to memory constraint.
20747 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20749 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
20750 as source of std instructions.
20751 * config/arc/arc.md (movsi_insn): Update pattern predicate to
20752 allow 6-bit constants as source for store instructions.
20753 (movdi_insn): Update instruction pattern to allow 6-bit constants
20754 as source for store instructions.
20756 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20758 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
20760 2018-04-30 Nathan Sidwell <nathan@acm.org>
20761 Sandra Loosemore <sandra@codesourcery.com>
20763 * dumpfile.c (dump_open): Allow '-' for stdout.
20764 * doc/invoke.texi (Developer Options): Document dump filename
20765 determination early. Document stdin/stdout selection.
20767 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
20769 Microblaze Target: PIC data text relative
20771 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
20772 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
20774 * config/microblaze/microblaze.h (microblaze_constant_address_p):
20775 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
20776 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
20777 New addressing mode for data-text relative position indepenedent code.
20778 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
20779 'ADDRESS_SYMBOLIC_TXT_REL'.
20780 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
20781 (microblaze_legitimate_pic_operand): Exclude function calls from
20782 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
20783 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
20785 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20786 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20787 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
20788 for 'address + offset'.
20789 (microblaze_expand_prologue): Add new function prologue call for
20791 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
20792 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
20793 table in case of TARGET_PIC_DATA_TEXT_REL.
20794 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
20795 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
20796 Add new macros 'UNSPEC_TEXT',
20797 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
20798 + exclude function calls from 'UNSPEC_PLT' in case of data text
20800 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20801 new target hook for generating address diff vector tables in case of
20803 * doc/tm.texi : Regenerate.
20804 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
20805 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
20806 of addr diff vector generation.
20807 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20808 target hook definition.
20809 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
20810 Add default function for generate_pic_addr_diff_vec -> flag_pic.
20811 * doc/invoke.texi (Add new pic option): Add new microblaze pic
20812 option for data text relative.
20814 2018-04-30 Richard Biener <rguenther@suse.de>
20816 * tree-chrec.h (evolution_function_is_constant_p): Remove
20818 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
20820 2018-04-30 Richard Biener <rguenther@suse.de>
20823 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
20825 2018-04-30 Richard Biener <rguenther@suse.de>
20827 PR tree-optimization/28364
20828 PR tree-optimization/85275
20829 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
20830 copying first exit test.
20832 2018-04-28 Mark Wielaard <mark@klomp.org>
20834 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
20835 dwarf_version >= 5.
20836 (dwarf_AT): Handle DW_AT_addr_base.
20837 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
20839 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
20842 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
20843 (*ashl<dwi>3_doubleword_mask_1): Ditto.
20844 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
20845 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
20847 2018-04-28 Richard Biener <rguenther@suse.de>
20849 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
20850 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
20851 to reflect use. Only add interesting stmts.
20853 2018-04-27 Martin Jambor <mjambor@suse.cz>
20856 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
20857 the jump function allows for passing through aggregate values.
20859 2018-04-27 David Malcolm <dmalcolm@redhat.com>
20861 * input.h (in_system_header_at): Convert from macro to inline
20863 (from_macro_expansion_at): Likewise.
20864 (from_macro_definition_at): Likewise.
20866 2018-04-27 Jeff Law <law@redhat.com>
20868 * config.gcc: Mark tile* targets as deprecated/obsolete.
20870 2018-04-27 Richard Biener <rguenther@suse.de>
20872 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
20875 2018-04-27 Richard Biener <rguenther@suse.de>
20877 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
20879 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
20881 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
20882 with Yd constraint. Set "preferred_for_speed" attribute from
20883 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
20884 with Yd constraint.
20885 (*movdi_internal): Ditto.
20886 (movti_interunit splitters): Remove
20887 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
20888 (movdi_interunit splitters): Ditto.
20889 * config/i386/constraints.md (Ye): Remove.
20890 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
20892 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20895 * config/aarch64/constraints.md (Usg): Limit to 31.
20896 (Usj): Limit to 63.
20898 2018-04-27 Jakub Jelinek <jakub@redhat.com>
20900 PR tree-optimization/85529
20901 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
20902 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
20903 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
20904 zero extension or masking of the MSB bit.
20905 (optimize_range_tests): Add FIRST_BB argument, pass it through
20906 to optimize_range_tests_var_bound.
20907 (maybe_optimize_range_tests, reassociate_bb): Adjust
20908 optimize_range_tests callers.
20910 2018-04-26 Richard Biener <rguenther@suse.de>
20911 Jakub Jelinek <jakub@redhat.com>
20913 * cgraph.h (symbol_table): Just declare debug method here.
20914 * symtab.c (symbol_table::debug): Define.
20916 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
20918 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
20920 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
20922 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
20923 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
20924 (*movdi_internal): Substitute Yi and Yj constraint with x
20925 and Ym and Yn constraint with y constraint. Update "isa"
20926 attribute and set "preferred_for_speed" attribute from
20927 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
20928 (*movsi_internal): Ditto.
20929 (*movdf_internal): Ditto.
20930 (*movsf_internal): Ditto.
20931 (*zero_extendsidi2): Ditto.
20932 * config/i386/sse.md (vec_set<mode>_0): Ditto.
20933 (sse2_loadld): Ditto.
20934 (*vec_extract<ssevecmodelower>_0): Ditto.
20935 (*vec_extractv4si_0_zext_sse4): Ditto.
20936 (vec_concatv2di): Ditto.
20937 (*vec_dup<mode>): Ditto.
20938 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
20939 * config/i386/constraints.md (Yi): Remove.
20944 2018-04-26 Nathan Sidwell <nathan@acm.org>
20946 * dumpfile.c (dump_open): New.
20947 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
20948 (dump_finish): Detect stdio/stderr by value not name.
20950 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
20952 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
20954 2018-04-26 Tom de Vries <tom@codesourcery.com>
20957 * config/nvptx/nvptx.c (verify_neutering_jumps)
20958 (verify_neutering_labels): New function
20959 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
20961 2018-04-26 Tom de Vries <tom@codesourcery.com>
20964 * config/nvptx/nvptx.c (needs_neutering_p): New function.
20965 (nvptx_single): Use needs_neutering_p to skip over insns that do not
20968 2018-04-26 Richard Biener <rguenther@suse.de>
20969 Tom de Vries <tom@codesourcery.com>
20972 * lto-streamer-out.c (output_function): Fixup loops if required to match
20973 discovery done in the reader.
20975 2018-04-26 Richard Biener <rguenther@suse.de>
20977 PR tree-optimization/85116
20978 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
20979 have a loop exit from the single latch predecessor. Remove
20980 case of header with just condition.
20981 (ch_base::copy_headers): Exclude infinite loops from any
20983 (pass_ch::execute): Record exits.
20985 2018-04-26 Richard Biener <rguenther@suse.de>
20987 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
20988 prologue cost vector and pass it to vect_get_load_cost.
20989 (vect_get_peeling_costs_all_drs): Likewise.
20990 (vect_peeling_hash_get_lowest_cost): Likewise.
20991 (vect_enhance_data_refs_alignment): Likewise.
20993 2018-04-26 Richard Biener <rguenther@suse.de>
20995 PR middle-end/85450
20996 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
20997 checking of integer<->pointer conversions.
20998 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
20999 sign-/zero-extending pointer types.
21000 (expand_omp_for_static_chunk): Likewise.
21002 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
21003 Jean Lee <xiaoyur347@gmail.com>
21005 * config/mips/mips.c (mips_asan_shadow_offset): New function.
21006 (TARGET_ASAN_SHADOW_OFFSET): Define.
21007 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
21008 true for -fsanitize=address.
21010 2018-04-25 Mark Wielaard <mark@klomp.org>
21012 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
21015 2018-04-25 Jakub Jelinek <jakub@redhat.com>
21017 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
21018 than "alu", remove explicit "memory" and "imm_disp" attributes.
21019 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
21021 PR middle-end/85414
21022 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
21023 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
21024 gen_lowpart_no_emit.
21026 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
21029 * config/i386/i386.c (ix86_expand_builtin): Change memory
21030 operand to XI, extend p0 to Pmode.
21031 * config/i386/i386.md: Change unspec volatile and operand
21032 1 mode to XI, change operand 0 mode to P.
21034 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21036 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
21037 GET_MODE_MASK before any checking.
21038 (nds32_can_use_bset_p): Likewise.
21039 (nds32_can_use_btgl_p): Likewise.
21041 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21043 * config/nds32/nds32-doubleword.md: New define_split pattern for
21044 illegal register number.
21046 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21048 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
21050 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21052 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
21054 2018-04-25 Richard Biener <rguenther@suse.de>
21056 * lto-streamer.h (LTO_major_version): Bump to 8.
21058 2018-04-25 Jakub Jelinek <jakub@redhat.com>
21060 * BASE-VER: Set to 9.0.0.
21062 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
21064 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
21065 in __abskf2 and __powikf2.
21067 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21070 * config/aarch64/constraints.md (Usg, Usj): New constraints.
21071 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
21072 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
21073 Use the above on operand 2. Reindent.
21074 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
21076 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
21079 * common/config/i386/i386-common.c (ix86_handle_option): Don't
21081 * config/i386/i386.opt (mcet): Removed.
21082 * doc/install.texi: Remove -mcet documentation.
21083 * doc/invoke.texi: Likewise.
21085 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
21088 * doc/install.texi: Remove -mcet from bootstrap-cet.
21090 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21093 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
21094 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
21098 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
21099 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
21100 containing a CONST_VECTOR.
21102 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
21104 * doc/install.texi: Update newlib dependency for nvptx.
21106 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21109 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
21110 instead of INTVAL when shifting x left.
21112 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
21114 PR tree-optimization/85478
21115 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
21116 vect_grouped_store_supported for single element vectors.
21118 2018-04-24 Richard Biener <rguenther@suse.de>
21121 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
21122 load cost increase to the case of non-constant step.
21124 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21127 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
21128 destination if any_malformed_asm.
21130 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
21132 PR middle-end/85496
21133 * expr.c (store_field): In the bitfield case, if the value comes from
21134 a function call and is returned in registers by means of a PARALLEL,
21135 do not change the mode of the temporary unless BLKmode and VOIDmode.
21137 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
21139 PR rtl-optimization/85423
21140 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
21141 dependencies to debug insns when the previous insn is non-debug.
21143 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21145 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
21146 enums into a single definition.
21147 (fls): Fix predicates and printing.
21150 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21152 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
21153 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
21154 and short u6 immediate.
21155 (check_if_valid_sleep_operand): Remove.
21156 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
21158 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21160 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
21161 flag_always_save_lp condition.
21162 * config/nds32/nds32.opt (malways-save-lp): New option.
21164 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21166 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
21167 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
21168 * config/nds32/nds32.h
21169 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
21170 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
21172 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21174 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
21175 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
21177 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21178 Chung-Ju Wu <jasonwucj@gmail.com>
21180 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
21182 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
21183 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
21185 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21187 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
21189 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21191 * config/nds32/nds32-protos.h (nds32_data_alignment,
21192 nds32_local_alignment): Declare.
21193 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
21194 nds32_local_alignment): New functions.
21195 (TARGET_CONSTANT_ALIGNMENT): Define.
21196 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
21198 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21200 * config/nds32/nds32.c
21201 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
21202 (TARGET_MODES_TIEABLE_P): Likewise.
21204 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21206 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
21207 level Ofast and Og.
21209 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
21210 Chung-Ju Wu <jasonwucj@gmail.com>
21212 * config/nds32/constants.md (unspec_volatile_element): Add enum values
21213 for unaligned access.
21214 * config/nds32/nds32-intrinsic.c: Implementation of expanding
21216 * config/nds32/nds32-intrinsic.md: Likewise.
21217 * config/nds32/nds32_intrinsic.h: Likewise.
21218 * config/nds32/nds32.h (nds32_builtins): Likewise.
21219 * config/nds32/nds32.opt (munaligned-access): New option.
21220 * config/nds32/nds32.c (nds32_asm_file_start): Display
21221 flag_unaligned_access status.
21223 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
21225 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
21226 -mno-relax is present.
21227 * config/riscv/linux.h (LINK_SPEC): Ditto.
21229 2018-04-20 Martin Sebor <msebor@redhat.com>
21232 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
21234 (gimple_fold_builtin_stxcpy_chk): Same.
21235 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
21237 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
21240 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
21241 __powikf2 when long double is IEEE 128-bit.
21243 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
21245 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
21246 step to make sure stack always aligned.
21248 2018-04-20 Carl Love <cel@us.ibm.com>
21251 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
21252 size check for arg0.
21254 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
21255 Tom de Vries <tom@codesourcery.com>
21258 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
21259 Emit insns for calls too.
21260 (nvptx_find_par): Always look for worker-level predecessor insn.
21261 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
21263 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
21264 (nvptx_process_pars): Propagate frames for calls.
21266 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
21269 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
21271 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
21272 (ix86_handle_option): Don't handle OPT_mibt.
21273 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
21275 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
21277 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
21278 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
21279 (ix86_target_macros): Define __CET__ with flag_cf_protection
21280 for -fcf-protection.
21281 * config/i386/i386.c (isa2_opts): Remove -mibt.
21282 * config/i386/i386.h (TARGET_IBT): Removed.
21283 (TARGET_IBT_P): Likewise.
21284 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
21285 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
21286 * config/i386/i386.opt (mcet): Update help message.
21287 (mshstk): Likewise.
21289 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
21290 -mcet as an alias for -mshstk.
21292 2018-04-20 Richard Biener <rguenther@suse.de>
21294 PR middle-end/85475
21295 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
21296 complexity by forcing a single use of the multiply operand.
21298 2018-04-20 Martin Jambor <mjambor@suse.cz>
21301 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
21302 recursion dependency to only apply to non-clones.
21304 2018-04-20 Martin Jambor <mjambor@suse.cz>
21307 * ipa-cp.c (create_specialized_node): Check that clones of
21308 self-recursive edges exist during IPA-CP.
21310 2018-04-19 Toon Moene <toon@moene.org>
21312 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
21315 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21317 PR tree-optimization/85467
21318 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
21319 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
21320 VECTOR_CST element to type.
21322 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21325 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
21326 * config/i386/i386.md (builtin_setjmp_setup): Removed.
21327 (builtin_longjmp): Likewise.
21328 (save_stack_nonlocal): New pattern.
21329 (restore_stack_nonlocal): Likewise.
21331 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21334 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21335 Replace ASM_OUTPUT_LABEL with fprintf.
21337 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21340 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21341 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
21342 * config/i386/i386-c.c (ix86_target_macros_internal): Also
21343 define __IBT__ and __SHSTK__ for -fcf-protection.
21344 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
21346 (ix86_trampoline_init): Likewise.
21347 (x86_output_mi_thunk): Likewise.
21348 (ix86_notrack_prefixed_insn_p): Likewise.
21349 (ix86_option_override_internal): Don't disallow -fcf-protection.
21350 * config/i386/i386.md (rdssp<mode>): Also enable for
21352 (incssp<mode>): Likewise.
21353 (nop_endbr): Likewise.
21354 * config/i386/i386.opt (mcet): Change help message to built-in
21357 (mshstk): Likewise.
21358 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
21359 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
21360 enable CET built-in functions.
21362 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
21364 * common/config/i386/i386-common.c
21365 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
21366 OPTION_MASK_ISA_MOVDIRI_UNSET,
21367 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
21368 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
21369 * config.gcc (movdirintrin.h): New header.
21370 * config/i386/cpuid.h (bit_MOVDIRI,
21371 bit_MOVDIR64B): New bits.
21372 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
21374 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
21375 (VOID, PVOID, PCVOID)): New function types.
21376 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
21377 __builtin_ia32_directstoreu_u64,
21378 __builtin_ia32_movdir64b): New builtins.
21379 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
21380 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
21382 (ix86_valid_target_attribute_inner_p): Ditto.
21383 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
21384 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
21385 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
21386 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
21387 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
21388 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
21389 (movdiri<mode>, movdir64b_<mode>): New.
21390 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
21391 * config/i386/immintrin.h: Include movdirintrin.h.
21392 * config/i386/movdirintrin.h: New file.
21393 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
21395 2018-04-19 Richard Biener <rguenther@suse.de>
21397 PR middle-end/85455
21398 * cfg.c (clear_bb_flags): When loop state says we have
21399 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
21401 2018-04-19 Richard Biener <rguenther@suse.de>
21403 PR tree-optimization/84737
21404 * tree-vect-data-refs.c (vect_copy_ref_info): New function
21405 copying restrict info.
21406 (vect_setup_realignment): Use it.
21407 * tree-vectorizer.h (vect_copy_ref_info): Declare.
21408 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
21409 the first DR to all generated stores.
21410 (vectorizable_load): Likewise for loads.
21412 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21414 PR tree-optimization/85446
21415 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
21416 the integral and pointer types to have the same precision.
21418 * doc/install.texi: Document --disable-cet being the default and
21421 2018-04-18 Martin Liska <mliska@suse.cz>
21423 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
21426 2018-04-18 Martin Liska <mliska@suse.cz>
21429 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
21432 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21433 arguments if they are comparable.
21435 2018-04-18 Martin Liska <mliska@suse.cz>
21438 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21441 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21444 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
21447 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
21448 ENDBR after calling __morestack.
21450 2018-04-18 David Malcolm <dmalcolm@redhat.com>
21453 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
21454 by using gcc_base_ver to generate a gcc_driver_version, and use
21455 it when generating GCC_DRIVER_NAME.
21456 * configure: Regenerate.
21458 2018-04-18 Jakub Jelinek <jakub@redhat.com>
21461 * config.gcc: Obsolete powerpc*-*-*spe*.
21463 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21466 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
21467 (stabstr_D): Change type of unum from unsigned int to
21468 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
21471 2018-04-17 Jim Wilson <jimw@sifive.com>
21474 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
21475 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
21476 Set arg_pointer_offset after using pretend_args_size.
21478 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21480 PR rtl-optimization/85431
21481 * dse.c (record_store): Ignore zero width stores.
21484 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
21485 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
21486 __builtin_stack_restore rather than after it.
21487 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
21488 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
21489 argument instead of virtual_dynamic_stack_rtx.
21491 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
21493 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
21495 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
21496 Add note to error message to explain internal mapping of overloaded
21497 built-in function name to non-overloaded built-in function name.
21498 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
21501 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21504 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
21505 where the inputs overlap with the output.
21507 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21509 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
21510 (=v, v) alternative and explicit "memory" attribute.
21511 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
21512 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21514 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
21515 "sselog1" type instead of "sselog".
21516 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
21517 "sselog". Remove explicit "memory" attribute.
21518 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
21519 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21521 (vec_extract_hi_v32hi): Merge all alternatives into one, use
21522 "sselog1" type instead of "sselog". Remove explicit "memory"
21524 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
21525 use "sselog1" type instead of "sselog". Remove explicit "memory"
21527 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
21528 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21530 (vec_extract_hi_v64qi): Merge all alternatives into one, use
21531 "sselog1" type instead of "sselog". Remove explicit "memory"
21533 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
21534 use "sselog1" type instead of "sselog". Remove explicit "memory"
21538 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
21540 PR middle-end/85414
21541 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
21544 2018-04-17 Martin Jambor <mjambor@suse.cz>
21547 * ipa-cp.c (create_specialized_node): Call
21548 expand_all_artificial_thunks if necessary.
21550 2018-04-17 Martin Liska <mliska@suse.cz>
21553 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
21554 in message, remote space in between '_G' and '('.
21556 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21559 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
21560 avx512f_vmcmp<mode>3<round_saeonly_name>,
21561 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
21562 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
21563 avx512f_rndscale<mode><round_saeonly_name>,
21564 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
21565 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
21566 Use %<iptr>2 instead of %2 for -masm=intel.
21567 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
21568 avx512f_vcvttss2usi<round_saeonly_name>,
21569 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
21571 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
21572 avx512f_vcvttsd2usi<round_saeonly_name>,
21573 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
21574 Use %q1 instead of %1 for -masm=intel.
21575 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
21576 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
21577 of %3 for -masm=intel.
21578 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
21580 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
21582 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
21584 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
21585 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
21587 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
21589 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
21590 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
21591 %g1 and one with %0 and %1.
21592 (avx512er_vmrcp28<mode><round_saeonly_name>,
21593 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
21594 %1 for -masm=intel.
21595 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
21596 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
21597 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
21598 of %0 and %{%4%} for -masm=intel.
21599 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
21600 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
21601 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
21602 order of %0 and %{%5%}%{z%} for -masm=intel.
21604 2018-04-17 Jan Hubicka <jh@suse.cz>
21607 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
21609 2018-04-17 Martin Liska <mliska@suse.cz>
21612 * multiple_target.c (create_dispatcher_calls): Set apostrophes
21613 for target_clone error message. Make default implementation
21614 clone to be a local declaration.
21615 (separate_attrs): Add new argument and check for an empty
21617 (expand_target_clones): Handle it.
21618 (ipa_target_clone): Make redirection just for target_clones
21621 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
21622 Tom de Vries <tom@codesourcery.com>
21624 PR middle-end/84955
21625 * omp-expand.c (expand_oacc_for): Add dummy false branch for
21626 tiled basic blocks without omp continue statements.
21628 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
21631 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
21632 vec_extract expression as having side effects to make sure it gets
21635 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
21638 * config/i386/i386.c (get_builtin_code_for_version): Check
21641 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
21644 * config.gcc: Support "skylake".
21645 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21647 * config/i386/i386.c (m_SKYLAKE): Define.
21648 (processor_target_table): Add "skylake".
21649 (ix86_option_override_internal): Add "skylake".
21650 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
21651 PROCESSOR_CANNONLAKE.
21652 (get_builtin_code_for_version): Fix priority for
21653 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
21654 PROCESSOR_SKYLAKE-AVX512.
21655 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
21656 (processor_type): Add PROCESSOR_SKYLAKE.
21658 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
21659 Jason Merrill <jason@redhat.com>
21662 * convert.c (convert_to_integer_1): Use direct recursion for
21663 enumeral types and types with a precision less than the number
21664 of bits in their mode.
21666 2018-04-16 Julia Koval <julia.koval@intel.com>
21669 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
21670 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
21672 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
21675 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
21676 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
21677 and -mno-direct-move.
21679 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
21682 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
21683 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
21684 Ensure negative shifts result in {0}.
21686 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
21688 PR rtl-optimization/79916
21689 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
21690 regs (if any) to define how to gnerate SD moves when LRA is in
21693 2018-04-13 Jakub Jelinek <jakub@redhat.com>
21695 PR rtl-optimization/85393
21696 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
21697 * except.c (expand_dw2_landing_pad_for_region): Make static.
21698 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
21699 a label and unconditional jump to old_bb, rather than
21700 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
21703 PR rtl-optimization/85376
21704 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
21705 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
21706 instead of a specific value.
21708 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
21709 Bin Cheng <bin.cheng@arm.com>
21711 PR tree-optimization/82965
21712 PR tree-optimization/83991
21713 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
21714 by_profile_only parameter.
21715 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
21716 information if the loop was predicted to iterate too many times.
21717 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
21719 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
21722 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
21725 2018-04-13 Martin Liska <mliska@suse.cz>
21726 Jakub Jelinek <jakub@redhat.com>
21728 PR middle-end/81657
21729 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
21730 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
21731 * builtins.c (expand_builtin_memory_copy_args): Use
21732 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
21733 handle dest_addr == pc_rtx.
21735 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
21738 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
21739 asked to not generate direct moves.
21740 (fix_trunc<mode>si2_stfiwx): Similar.
21741 (fix_trunc<mode>si2_internal): Similar.
21743 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21746 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
21747 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
21748 lookup if dest in some wider mode is known to be const0_rtx and
21749 if so, record permanent equivalence for it to be ZERO_EXTEND of
21750 the narrower mode destination.
21752 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21754 * lto-streamer-out.c (output_function): Revert 259346.
21755 * omp-expand.c (expand_oacc_for): Likewise.
21757 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
21759 PR rtl-optimization/85354
21760 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
21761 * sel-sched.c (sel_global_init): ... here.
21763 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
21766 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
21767 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
21768 mode for PE-COFF targets.
21769 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
21770 (i386_pe_asm_lto_end): Likewise.
21771 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
21772 (TARGET_ASM_LTO_END): Likewise.
21773 * config/i386/winnt.c (saved_debug_info_level): New static variable.
21774 (i386_pe_asm_lto_start): New function.
21775 (i386_pe_asm_lto_end): Likewise.
21777 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21778 Richard Biener <rguenther@suse.de>
21780 PR middle-end/84955
21781 * lto-streamer-out.c (output_function): Fix CFG loop state before
21783 * omp-expand.c (expand_oacc_for): Handle calls to internal
21784 functions like regular functions.
21786 2018-04-12 Richard Biener <rguenther@suse.de>
21789 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
21790 for the early LTO debug to properly generate references to it
21791 during DIE emission. Do not re-use that for the skeleton for
21793 (dwarf2out_early_finish): Likewise.
21795 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21798 * config/i386/sse.md
21799 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
21800 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
21801 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
21802 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
21803 and output is a reg, avoid creating invalid lowpart subreg, but
21804 instead split into a 512-bit move. Don't split if not AVX512VL,
21805 input is xmm16+ reg and output is a mem.
21806 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
21807 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
21808 xmm16+ reg and output is a mem.
21810 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21812 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
21813 also for flag_dwarf2_cfi_asm.
21815 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21817 PR rtl-optimization/85342
21818 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
21819 a bool scalar var inside of the loop instead. Don't try to update
21820 recog_data.operand after failed apply_change_group.
21822 2018-04-12 Tom de Vries <tom@codesourcery.com>
21825 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
21826 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
21827 array with flexible array member as array without given dimension.
21828 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
21829 argument for undefined param to true.
21831 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
21834 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21835 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
21836 from PowerPC section.
21837 * config/rs6000/sysv4.opt (mcall-): Improve help text.
21838 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
21839 help text that is too long.
21840 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
21841 help text that is too long.
21842 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
21843 help text that is too long.
21845 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
21847 * config/alpha/alpha.md (stack_probe_internal): Rename
21848 from "probe_stack". Update all callers.
21850 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21852 PR rtl-optimization/84566
21853 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
21854 sched_macro_fuse_insns.
21856 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21859 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
21860 (compute_block_dependences): ... from here.
21862 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21864 PR tree-optimization/85331
21865 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
21866 from int to HOST_WIDE_INT.
21868 2018-04-11 Martin Jambor <mjambor@suse.cz>
21871 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
21872 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
21873 not the same as the source val.
21874 (cgraph_edge_brings_value_p): New parameter.
21875 (gather_edges_for_value): Pass destination value to
21876 cgraph_edge_brings_value_p.
21877 (perhaps_add_new_callers): Likewise.
21878 (get_info_about_necessary_edges): Likewise and exclude values brought
21879 only by self-recursive edges.
21880 (create_specialized_node): Redirect only clones of self-calling edges.
21881 (+self_recursive_pass_through_p): New function.
21882 (find_more_scalar_values_for_callers_subset): Use it.
21883 (find_aggregate_values_for_callers_subset): Likewise.
21884 (known_aggs_to_agg_replacement_list): Removed.
21885 (decide_whether_version_node): Re-calculate known constants for all
21886 remaining context clones.
21888 2018-04-11 Richard Biener <rguenther@suse.de>
21891 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
21892 from early DWARF output.
21893 (dwarf2out_early_finish): Output line info unconditionally into
21894 early DWARF and add reference to it.
21896 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21899 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
21900 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
21901 other than V2DFmode using iptr mode attribute.
21902 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
21904 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21906 PR rtl-optimization/84659
21907 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
21909 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21912 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
21914 (output_loc_list): Pass address of a dummy size variable even in the
21915 locview handling loop.
21916 (index_location_lists): Add comment on why skip_loc_list_entry can't
21919 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
21922 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
21925 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
21928 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21929 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
21930 and -mstring-compare-inline-limit.
21932 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21935 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
21936 for stack clash protection in a register whenever we need it to be in
21939 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21941 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
21942 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
21944 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21947 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
21949 (mlong-double-): Ditto.
21950 * config/rs6000/sysv4.opt (msdata=): Ditto.
21951 (mtls-size=): Ditto.
21953 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21955 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
21956 erroneous entries for
21957 "vector int vec_ldl (int, long int *)", and
21958 "vector unsigned int vec_ldl (int, unsigned long int *)".
21959 Add comments and entries for
21960 "vector bool char vec_ldl (int, bool char *)",
21961 "vector bool short vec_ldl (int, bool short *)",
21962 "vector bool int vec_ldl (int, bool int *)",
21963 "vector bool long long vec_ldl (int, bool long long *)",
21964 "vector pixel vec_ldl (int, pixel *)",
21965 "vector long long vec_ldl (int, long long *)",
21966 "vector unsigned long long vec_ldl (int, unsigned long long *)".
21967 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
21968 type tree bool_long_long_type_node and correct definition of
21969 bool_V2DI_type_node to make reference to this new type tree.
21970 (rs6000_mangle_type): Replace erroneous reference to
21971 bool_long_type_node with bool_long_long_type_node.
21972 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
21973 comments to emphasize sign distinctions for char and int types and
21974 replace RS6000_BTI_bool_long constant with
21975 RS6000_BTI_bool_long_long constant. Also add comment to restrict
21976 use of RS6000_BTI_pixel.
21977 (bool_long_type_node): Remove this macro definition.
21978 (bool_long_long_type_node): New macro definition
21980 2018-04-10 Jakub Jelinek <jakub@redhat.com>
21982 PR rtl-optimization/85300
21983 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
21984 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
21985 simplify_unary_operation fails.
21987 2018-04-10 Martin Liska <mliska@suse.cz>
21989 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
21990 cgraph_edge and ipa_ref.
21992 2018-04-10 Jakub Jelinek <jakub@redhat.com>
21996 * config/i386/sse.md
21997 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
21998 computation of the VEC_MERGE selector from mask.
21999 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
22000 Fix decoding of the VEC_MERGE selector into mask.
22002 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
22004 PR tree-optimization/85286
22005 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
22007 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
22009 * final.c (final_1): Set insn_last_address as well as
22010 insn_current_address.
22012 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22015 * explow.c (emit_stack_probe): Call validize_mem on memory location
22016 before passing it to gen_probe_stack. Create address operand and
22017 legitimize it for the probe_stack_address case.
22019 2018-04-09 Jan Hubicka <jh@suse.cz>
22022 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
22023 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
22024 * tree.c (free_lang_data_in_type): Fix handling of binfos;
22026 (free_lang_data): Rebuild type inheritance graph.
22028 2018-04-09 Martin Sebor <msebor@redhat.com>
22030 * invoke.texi (-finline-small-functions): Mention other optimization
22032 (-findirect-inlining, -fpartial-inlining): Same.
22033 (-finline-functions-called-once): Same.
22034 (-freorder-blocks-and-partition): Same.
22036 2018-04-09 Jan Hubicka <jh@suse.cz>
22039 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
22040 jumps; choose last target that matches the criteria (i.e.
22041 no partition changes for non-crossing jumps).
22042 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
22043 support for redirecting crossing jumps to non-crossing.
22045 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
22047 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
22048 also for naked functions.
22050 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
22052 * config/arc/arc.md (add_shift): New pattern.
22053 (add_shift2): Likewise.
22054 (sub_shift): Likewise.
22055 (sub_shift_cmp0_noout): Likewise.
22056 (compare_si_ashiftsi): Likewise.
22057 (xbfu_cmp0_noout): New combine pattern.
22058 (xbfu_cmp0"): Likewise.
22059 (movsi_set_cc_insn): Place the predicable variant first.
22060 (commutative_binary_cmp0_noout): Remove clobber.
22061 (commutative_binary_cmp0): New pattern.
22062 (noncommutative_binary_cmp0): Likewise.
22063 (noncommutative_binary_cmp0_noout): Likewise.
22064 (noncommutative_binary_comparison_result_used): Removed.
22065 (rsub_cmp0): New pattern.
22066 (rsub_cmp0_noout): Likewise.
22067 (extzvsi): Changed, keep only meaningful variants.
22068 (SQH, SEZ): New iterators.
22069 (SQH_postfix): New mode attribute.
22070 (SEZ_prefix): New code attribute.
22071 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
22072 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
22073 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
22074 of numerical value.
22075 (noncommutative_operator): Check the availability of barrel
22078 2018-04-09 Richard Biener <rguenther@suse.de>
22080 PR tree-optimization/85284
22081 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
22082 Only use the niter constraining form of simple_iv when the exit
22083 is always executed.
22085 2018-04-09 Tom de Vries <tom@codesourcery.com>
22088 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22089 (define_expand "*memory_barrier"): New define_expand.
22090 (define_insn "memory_barrier"): New insn.
22092 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22094 PR rtl-optimization/80463
22095 PR rtl-optimization/83972
22096 PR rtl-optimization/83480
22098 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
22099 correct producer for the insn.
22100 (tidy_control_flow): Fixup seqnos in case of debug insns.
22102 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22104 PR rtl-optimization/83913
22106 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
22107 different sched-times when merging exprs.
22109 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22111 PR rtl-optimization/83962
22113 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
22114 tidy_fallthru_edge and tidy_control_flow.
22116 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22118 PR rtl-optimization/83530
22120 * sel-sched.c (force_next_insn): New global variable.
22121 (remove_insn_for_debug): When force_next_insn is true, also leave only
22122 next insn in the ready list.
22123 (sel_sched_region): When the region wasn't scheduled, make another pass
22124 over it with force_next_insn set to 1.
22126 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22128 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
22130 * config/nds32/constants.md (unspec_volatile_element): Add enum values
22131 for interrupt control.
22132 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22133 functions for interrupt control.
22134 * config/nds32/nds32-intrinsic.md: Likewise.
22135 * config/nds32/nds32_intrinsic.h: Likewise.
22136 * config/nds32/nds32.h (nds32_builtins): Likewise.
22138 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22140 * config/nds32/nds32.c (nds32_init_machine_status,
22141 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
22142 strict_aligned_p field.
22143 (nds32_expand_to_rtl_hook): New function.
22144 (TARGET_EXPAND_TO_RTL_HOOK): Define.
22145 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
22147 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22148 Chung-Ju Wu <jasonwucj@gmail.com>
22150 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
22151 * config/nds32/nds32-n7.md: New file.
22152 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
22153 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
22155 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
22156 * config/nds32/nds32.md (pipeline_model): Add n7.
22157 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
22158 * config/nds32/pipelines.md: Include n7 settings.
22160 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22161 Chung-Ju Wu <jasonwucj@gmail.com>
22163 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
22164 * config/nds32/nds32-e8.md: New file.
22165 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
22166 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
22168 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
22169 * config/nds32/nds32.md (pipeline_model): Add e8.
22170 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
22171 * config/nds32/pipelines.md: Include e8 settings.
22173 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22174 Chung-Ju Wu <jasonwucj@gmail.com>
22176 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
22177 * config/nds32/nds32-n8.md: New file.
22178 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
22179 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
22181 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
22182 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
22183 * config/nds32/nds32.md (pipeline_model): Add n8.
22184 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
22185 * config/nds32/pipelines.md: Include n8 settings.
22187 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22188 Chung-Ju Wu <jasonwucj@gmail.com>
22190 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
22191 * config/nds32/nds32-n9-2r1w.md: New file.
22192 * config/nds32/nds32-n9-3r2w.md: New file.
22193 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
22194 nds32_register_ports): New or modify for cpu n9.
22195 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
22197 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
22198 * config/nds32/nds32-utils.c: New file.
22199 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
22200 TARGET_MUL_SLOW): Define.
22201 * config/nds32/nds32.md (pipeline_model): New attribute.
22202 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
22203 New options that support cpu n9.
22204 * config/nds32/pipelines.md: Include n9 settings.
22205 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
22207 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22209 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
22210 information if necessary.
22211 (output_cond_branch_compare_zero): Likewise.
22212 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
22213 (nds32_target_alignment): Refine for alignment.
22214 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
22215 (FUNCTION_BOUNDARY): Modify.
22216 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
22218 * config/nds32/nds32.opt (malways-align, malign-functions): New.
22220 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22222 * config/nds32/constants.md (unspec_volatile_element): Add values for
22223 TLB operation and data prefetch.
22224 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22225 functions for TLB operation and data prefetch.
22226 * config/nds32/nds32-intrinsic.md: Likewise.
22227 * config/nds32/nds32_intrinsic.h: Likewise.
22228 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
22229 (nds32_print_operand): Likewise.
22230 * config/nds32/nds32.h (nds32_builtins): Likewise.
22232 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
22233 Andrew Pinski <pinsika@gcc.gnu.org>
22235 PR middle-end/82976
22236 * match.pd: Use constant_boolean_node of correct type instead of
22237 boolean_true_node or boolean_false_node for simplifying
22238 pointer comparisons to zero.
22240 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22242 PR tree-optimization/80021
22243 * tree.c (verify_type_variant): Make error call in verify_variant_match
22244 translatable and remove final full stop.
22246 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22248 * config/nds32/constants.md (unspec_volatile_element): Add
22249 UNSPEC_VOLATILE_EH_RETURN.
22250 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
22251 nds32_output_stack_pop): Support dwarf exception handling process.
22252 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
22253 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
22254 exception handling process.
22255 (nds32_compute_stack_frame): Likewise.
22256 (nds32_return_addr_rtx): Likewise.
22257 (nds32_initial_elimination_offset): Likewise.
22258 (nds32_expand_prologue): Likewise.
22259 (nds32_expand_epilogue): Likewise.
22260 (nds32_dynamic_chain_address): New function.
22261 * config/nds32/nds32.h (machine_function): Add fields for dwarf
22262 exception handling.
22263 (DYNAMIC_CHAIN_ADDRESS): Define.
22264 (EH_RETURN_DATA_REGNO): Define.
22265 (EH_RETURN_STACKADJ_RTX): Define.
22266 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
22267 patterns for dwarf exception handling.
22269 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22271 * config/nds32/nds32.h: Clean up obsolete macros.
22273 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22275 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22276 Add enum values for particular instructions.
22277 * config/nds32/nds32-intrinsic.c: Implementation of expanding
22278 particular intrinsic functions.
22279 * config/nds32/nds32-intrinsic.md: Likewise.
22280 * config/nds32/nds32_intrinsic.h: Likewise.
22281 * config/nds32/nds32.h (nds32_builtins): Likewise.
22282 * config/nds32/nds32.md (type): Add pbsad and pbsada.
22283 (btst, ave): New patterns for particular instructions.
22285 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22287 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22288 Add enum values for atomic load/store and memory sync.
22289 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
22291 * config/nds32/nds32-intrinsic.md: Likewise.
22292 * config/nds32/nds32_intrinsic.h: Likewise.
22293 * config/nds32/nds32.h (nds32_builtins): Likewise.
22295 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22297 PR tree-optimization/85257
22298 * fold-const.c (native_encode_vector): If not all elts could fit
22299 and off is -1, return 0 rather than offset.
22300 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
22301 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
22302 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
22303 adjust buffer in native_interpret_expr call.
22305 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22307 * config/nds32/constants.md (unspec_volatile_element): Add cache
22308 control enum values.
22309 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
22310 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
22311 * config/nds32/nds32.c (nds32_cctl_names): New.
22312 (nds32_print_operand): Handle cache control register names.
22313 * config/nds32/nds32.h (nds32_builtins): New enum values.
22314 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
22316 * config/nds32/nds32.md (type): Add mmu.
22317 * config/nds32/pipelines.md (simple_insn): Add mmu.
22319 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22321 * config/nds32/nds32.md (type): Remove call.
22322 * config/nds32/pipelines.md (simple_insn): Likewise.
22324 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22326 * config/nds32/constants.md (unspec_volatile_element): Add
22327 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
22328 UNSPEC_VOLATILE_FMFCFG.
22329 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
22330 description for fmfcfg and fmfcsr.
22331 (bdesc_1arg): Add fmtcsr.
22332 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
22333 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
22334 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
22335 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
22336 unspec_fmfcfg): New patterns.
22337 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
22338 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
22339 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
22340 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
22341 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
22342 __nds32__fmfcfg): Define.
22344 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22346 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
22347 intrinsic register names.
22348 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
22349 intrinsic register enum values and macros.
22351 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22353 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
22354 for load/store addressing form.
22355 (nds32_print_operand_address): Likewise.
22357 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
22360 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
22361 based on LABEL_REF. Remove useless assertion.
22362 (pic_address_needs_scratch): Fix formatting.
22363 (sparc_legitimize_pic_address): Minor tweaks.
22364 (sparc_delegitimize_address): Adjust assertion accordingly.
22365 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
22366 into symbolic_operand.
22367 (movsi_high_pic_label_ref): Likewise.
22368 (movsi_lo_sum_pic_label_ref): Likewise.
22369 (movdi_pic_label_ref): Likewise.
22370 (movdi_high_pic_label_ref): Likewise.
22371 (movdi_lo_sum_pic_label_ref): Likewise.
22373 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
22375 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
22376 custom LIB_SPEC setup.
22378 2018-04-06 Ruslan Bukin <br@bsdpad.com>
22379 Kito Cheng <kito.cheng@gmail.com>
22381 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
22382 * config/riscv/freebsd.h: New.
22384 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22386 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
22387 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
22390 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22391 Kito Cheng <kito.cheng@gmail.com>
22393 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
22394 nds32_output_call, nds32_symbol_binds_local_p): New functions.
22395 * config/nds32/nds32-protos.h (nds32_output_call,
22396 nds32_output_return): Declare.
22397 * config/nds32/nds32.md: Refine all the call and return patterns.
22399 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22402 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
22403 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
22405 PR rtl-optimization/84872
22406 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
22407 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
22408 EDGE_CROSSING edge.
22410 2018-04-06 Tamar Christina <tamar.christina@arm.com>
22412 * expr.c (copy_blkmode_to_reg): Revert 254862.
22413 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
22415 2018-04-06 Richard Biener <rguenther@suse.de>
22417 PR middle-end/85244
22418 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
22419 after seeing a component reference with an adjacent field. Treat
22420 refs to arrays at struct end of external decls similar to
22421 refs to unconstrained commons.
22423 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22426 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
22427 look through SAVE_EXPRs with non-side-effects argument. Adjust
22429 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
22432 2018-04-06 Richard Biener <rguenther@suse.de>
22434 PR middle-end/85180
22435 * alias.c (find_base_term): New wrapper around find_base_term
22436 unwinding CSELIB_VAL_PTR changes.
22437 (find_base_term): Do not restore CSELIB_VAL_PTR during the
22440 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22442 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
22444 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
22445 constant definitions.
22446 ("nop"): lr 0,0 -> nopr r0
22447 ("nop_lr0", "nop_lr1"): New insn definitions.
22449 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22451 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
22452 NDS32_V3PUSH_AVAILABLE_P macro.
22454 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
22455 Chung-Ju Wu <jasonwucj@gmail.com>
22457 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
22458 (nds32*-*-*): Add float and fpu_config into supported_defaults.
22459 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
22460 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
22461 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
22462 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
22463 * config/nds32/constraints.md: New constraints and checking for hard
22464 float configuration.
22465 * config/nds32/iterators.md: New mode iterator and attribute for hard
22466 float configuration.
22467 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
22469 * config/nds32/nds32-fpu.md: New file.
22470 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
22471 deal with hard float code generation.
22472 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
22474 (abi_type, float_reg_number): New enum type.
22475 * config/nds32/nds32-predicates.c: New predicates for hard float.
22476 * config/nds32/nds32-protos.h: Declare functions for hard float.
22477 * config/nds32/nds32.c: Implementation for hard float configuration.
22478 * config/nds32/nds32.h: Definitions for hard float configuration.
22479 * config/nds32/nds32.md: Include hard float machine description and
22480 modify patterns for hard float configuration.
22481 * config/nds32/nds32.opt: New options for hard float configuration.
22482 * config/nds32/predicates.md: New predicates for hard float
22485 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22487 * common/config/nds32/nds32-common.c
22488 (nds32_option_optimization_table): Enable -mreleax-hint by default.
22490 2018-04-05 Jakub Jelinek <jakub@redhat.com>
22492 PR middle-end/85195
22493 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
22494 CONSTRUCTOR_ELT (ctor, ...)->value.
22496 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
22499 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
22501 2018-04-05 Tom de Vries <tom@codesourcery.com>
22504 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
22507 2018-04-05 Shiva Chen <shiva0217@gmail.com>
22508 Kito Cheng <kito.cheng@gmail.com>
22510 * config/nds32/constraints.md (U33): Fine-tune checking condition.
22511 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
22512 * config/nds32/nds32.h (nds32_16bit_address_type): Add
22513 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
22515 2018-04-05 Shiva Chen <shiva0217@gmail.com>
22516 Kito Cheng <kito.cheng@gmail.com>
22518 * config/nds32/constraints.md (Ufe): New memory constraint.
22519 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
22520 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
22521 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
22523 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
22524 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
22526 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22528 * config/nds32/nds32.md: Use optimize_size in the condition for
22529 alu-shift instructions.
22531 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22533 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
22535 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22537 * config/nds32/nds32.md (negsi2): Refine pattern.
22539 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
22540 Chung-Ju Wu <jasonwucj@gmail.com>
22542 * config/nds32/iterators.md (shift_rotate): New code iterator.
22543 (shift): New code attribute.
22544 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
22545 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
22546 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
22547 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
22548 bit-wise operations.
22549 (andsi3, *andsi3): Ditto.
22550 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
22551 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
22552 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
22553 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
22554 nds32_ior_operand, nds32_xor_operand): New predicates.
22556 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22558 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
22559 (addsi3, subsi3): ... this.
22561 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22563 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
22565 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22567 * config/nds32/nds32.md: Adjust indention.
22569 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
22571 * config/nds32/nds32.md (feature): New attribute.
22573 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22575 * config/nds32/nds32.md (subtype): New attribute.
22577 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
22580 * config/arm/arm-builtins.c (arm_expand_builtin): Change
22581 expansion to perform a bitwise AND of the argument followed by a
22582 boolean negation of the result.
22584 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
22586 PR rtl-optimization/84878
22587 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
22588 the basic block. Assert the use reference is not artificial and that
22589 it has an associated insn.
22591 2018-04-04 Michael Matz <matz@suse.de>
22593 * builtins.c (compute_objsize): Pass correct operand
22594 to array_at_struct_end_p.
22596 2018-04-04 Richard Biener <rguenther@suse.de>
22599 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
22600 from contexts for DINFO_LEVEL_TERSE and below.
22602 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22604 * config/nds32/nds32-doubleword.md (move_<mode>): Require
22605 resiter_operand condition.
22606 * config/nds32/nds32.md (*move<mode>): Ditto.
22608 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22609 Monk Chiang <sh.chiang04@gmail.com>
22611 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
22613 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22615 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
22617 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22618 Kito Cheng <kito.cheng@gmail.com>
22620 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
22621 nds32_cond_code_str, output_cond_branch,
22622 output_cond_branch_compare_zero, nds32_expand_cbranch,
22623 nds32_expand_cstore, nds32_expand_movcc,
22624 nds32_output_cbranchsi4_equality_zero,
22625 nds32_output_cbranchsi4_equality_reg,
22626 nds32_output_cbranchsi4_equality_reg_or_const_int,
22627 nds32_output_cbranchsi4_greater_less_zero: New functions.
22628 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
22629 nds32_expand_cstore, nds32_expand_movcc,
22630 nds32_output_cbranchsi4_equality_zero,
22631 nds32_output_cbranchsi4_equality_reg,
22632 nds32_output_cbranchsi4_equality_reg_or_const_int,
22633 nds32_output_cbranchsi4_greater_less_zero): Declare.
22634 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
22635 nds32_rimm11s_operand): New predicates.
22636 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
22637 * config/nds32/nds32.md: Rewrite all the branch and conditional move
22640 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22642 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
22643 * config/nds32/nds32.md: Ditto.
22644 * config/nds32/pipelines.md: Ditto.
22646 2018-04-04 Richard Biener <rguenther@suse.de>
22648 PR tree-optimization/85168
22649 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
22650 propagating abnormals.
22652 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22654 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
22656 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22657 Kito Cheng <kito.cheng@gmail.com>
22659 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
22660 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
22661 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
22662 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
22663 * config/nds32/nds32.md (sibcall_internal): New.
22664 (sibcall_register): Remove.
22665 (sibcall_immediate): Remove.
22666 (sibcall_value_internal): New.
22667 (sibcall_value_register): Remove.
22668 (sibcall_value_immediate): Remove.
22669 * config/nds32/predicates.md (nds32_general_register_operand): New.
22670 (nds32_call_address_operand): New.
22672 2018-04-03 Jakub Jelinek <jakub@redhat.com>
22674 PR rtl-optimization/85167
22675 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
22676 bb_defs if *split_p, instead preinitialize it to NULL.
22678 PR tree-optimization/85156
22679 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
22680 evaluating the argument multiple times.
22682 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
22684 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
22686 (_mm_cvtpd_ps): Likewise.
22687 (_mm_cvttpd_epi32): Likewise.
22688 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
22689 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
22690 vector, pixel, and bool following altivec.h include.
22692 2018-04-03 Martin Sebor <msebor@redhat.com>
22694 * doc/extend.texi (Common Function Attributes): Clarify.
22695 (const attribute): Likewise.
22696 (pure attribute): Likewise.
22698 2018-04-03 Jakub Jelinek <jakub@redhat.com>
22701 * config/i386/i386.c (ix86_expand_vector_set): Use
22702 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
22704 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
22706 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
22707 instructions when changing rounding bits to preserve precision bits
22708 in the x87 control word.
22710 2018-04-03 Martin Liska <mliska@suse.cz>
22712 PR tree-optimization/82491
22713 * rtl.h (strip_offset_and_add): Replace += suboffset with
22714 poly_uint64 () + suboffset.
22716 2018-03-29 Martin Liska <mliska@suse.cz>
22717 Martin Jambor <mjambor@suse.cz>
22720 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
22721 param_type is not an integral or pointer type.
22723 2018-04-03 Richard Biener <rguenther@suse.de>
22725 * sese.h (recompute_all_dominators): Remove.
22727 2018-04-02 Martin Sebor <msebor@redhat.com>
22729 * doc/invoke.texi (-Wrestrict): Fix typos.
22731 2018-04-02 Jim Wilson <jimw@sifive.com>
22733 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
22734 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
22735 (<optab>di3, <optab>si3_extend): Likewise.
22736 (<optab>si3_mask, <optab>si3_mask_1): New.
22737 (<optab>di3_mask, <optab>di3_mask_1): New.
22738 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
22739 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
22740 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
22742 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
22744 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
22747 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
22749 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
22750 (nds32_canonicalize_comparison): New function.
22752 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22753 Kito Cheng <kito.cheng@gmail.com>
22754 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22756 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
22757 * config/nds32/constants.md (unspec_volatile_element): Add
22758 UNSPEC_VOLATILE_RELAX_GROUP.
22759 * config/nds32/nds32-relax-opt.c: New file.
22760 * config/nds32/nds32-predicates.c
22761 (nds32_symbol_load_store_p): New function.
22762 * config/nds32/nds32-protos.h
22763 (nds32_symbol_load_store_p): Declare function.
22764 (make_pass_nds32_relax_opt): Declare new rtl pass function.
22765 * config/nds32/nds32.c
22766 (nds32_register_pass): New function to register pass.
22767 (nds32_register_passes): New function to register passes.
22768 * config/nds32/nds32.md (relax_group): New pattern.
22769 * config/nds32/nds32.opt (mrelax-hint): New option.
22770 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
22772 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
22774 * config/nds32/t-nds32: Modify files dependency.
22776 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22778 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
22779 (PROFILE_HOOK): Define its implementation.
22781 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22783 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
22784 type and 32-bit size.
22786 2018-04-01 Jakub Jelinek <jakub@redhat.com>
22788 PR middle-end/85090
22789 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
22790 (V_128_256): New mode iterator.
22791 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
22792 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
22793 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
22795 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
22796 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
22798 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
22801 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
22802 NaN inputs correctly.
22804 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
22807 * config/rs6000/vsx.md (??r): New mode attribute.
22808 (*vsx_mov<mode>_64bit): Use it.
22809 (*vsx_mov<mode>_32bit): Likewise.
22811 2018-03-30 Martin Sebor <msebor@redhat.com>
22813 PR tree-optimization/84818
22814 * builtins.c (check_access): Use warning_n.
22816 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22819 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
22821 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
22824 2018-03-30 Julia Koval <julia.koval@intel.com>
22827 * x86-tune.def (movx, partial_reg_dependency): Enable for
22830 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
22832 PR inline-asm/84985
22833 * lra-constraints.c (process_alt_operands): Move setting
22834 this_alternative_matches below.
22836 2018-03-29 Martin Liska <mliska@suse.cz>
22839 * doc/invoke.texi: Document how LTO works with debug info.
22840 Describe auto-load support of binutils. Mention 'x86-64'
22841 as valid option value of -march option.
22843 2018-03-29 Jakub Jelinek <jakub@redhat.com>
22845 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
22848 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
22849 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
22850 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
22853 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
22856 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
22857 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
22858 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
22859 for RS6000_BTM_POWERPC64.
22860 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
22861 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
22862 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
22865 (DIVDEU): Likewise.
22867 2018-03-28 Carl Love <cel@us.ibm.com>
22870 2017-09-27 Carl Love <cel@us.ibm.com>
22872 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
22873 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
22874 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
22877 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22879 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
22880 instead of __vector bool.
22881 (_mm_max_pu8): Likewise.
22882 (_mm_min_pi16): Likewise.
22884 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
22887 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
22888 (DIVWEUO): Likewise.
22889 (DIVDEO): Likewise.
22890 (DIVDEUO): Likewise.
22891 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
22892 DIVWEUO and DIVDEUO.
22893 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
22894 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
22895 (div_extend): Likewise.
22896 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
22898 (__builtin_divweuo): Likewise.
22899 (__builtin_divdeo): Likewise.
22900 (__builtin_divdeuo): Likewise.
22902 2018-03-28 Jakub Jelinek <jakub@redhat.com>
22905 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
22906 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
22908 PR tree-optimization/82004
22909 * gimple-match-head.c (optimize_pow_to_exp): New function.
22910 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
22911 Don't fold to exp if optimize_pow_to_exp is false.
22913 2018-03-28 Martin Liska <mliska@suse.cz>
22916 * calls.c (initialize_argument_information): Fix trailing space.
22917 * common.opt: Fix typo and provide better explanation for
22918 -fsanitize-coverage option.
22919 * config/i386/i386.opt: Fix typo.
22921 2018-03-28 Jakub Jelinek <jakub@redhat.com>
22922 Martin Liska <mliska@suse.cz>
22925 * gimplify.c (asan_poison_variable): Don't do the check for
22926 gimplify_omp_ctxp here.
22927 (gimplify_decl_expr): Do it here.
22928 (gimplify_target_expr): Likewise.
22930 2018-03-28 Martin Liska <mliska@suse.cz>
22933 * config/i386/i386.c (ix86_function_arg_advance): Do not call
22934 chkp_type_bounds_count if MPX is not enabled.
22936 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
22938 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
22940 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
22943 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
22944 function to create the function decl for complex long double
22945 multiply and divide for -mabi=ieeelongdouble.
22946 (init_float128_ieee): Call it.
22948 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
22951 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
22952 -fcf-protection=branch -mibt.
22953 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
22955 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22958 * config/arm/arm.c (arm_valid_symbolic_address): Handle
22959 arm_word_relocations.
22961 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
22964 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
22965 extern array declarations.
22967 2018-03-27 Richard Biener <rguenther@suse.de>
22969 PR middle-end/84067
22970 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
22971 explicit single_use checks.
22973 2018-03-27 Richard Biener <rguenther@suse.de>
22975 PR tree-optimization/85082
22976 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
22979 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22981 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
22982 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
22983 Turn on fasynchronous-unwind-tables and funwind-tables.
22985 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
22988 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
22989 (*bmi_blsr_<mode>_ccz): Ditto.
22991 2018-03-26 Tom de Vries <tom@codesourcery.com>
22993 PR tree-optimization/85063
22994 * omp-general.c (offloading_function_p): New function. Factor out
22996 * omp-offload.c (pass_omp_target_link::gate): ... here.
22997 * omp-general.h (offloading_function_p): Declare.
22998 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
22999 with attribute omp declare target for offloading functions.
23001 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
23003 PR tree-optimization/84005
23004 * tree-data-ref.h (get_base_for_alignment): Declare.
23005 * tree-data-ref.c (get_base_for_alignment_1): New function.
23006 (get_base_for_alignment): Likewise.
23007 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
23008 get_base_for_alignment to find a suitable base object, instead
23009 of always using drb->base_address.
23011 2018-03-23 Jakub Jelinek <jakub@redhat.com>
23013 PR inline-asm/85022
23014 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
23015 known size by default.
23017 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
23019 PR inline-asm/85030
23020 * lra-constraints.c (process_alt_operands): Don't match BLKmode
23021 and non BLKmode operands.
23023 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23026 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
23027 Clean up attributes.
23029 2018-03-23 Richard Biener <rguenther@suse.de>
23032 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
23033 we are going to emit early debug for LTO.
23035 2018-03-23 Jakub Jelinek <jakub@redhat.com>
23037 PR inline-asm/85034
23038 * function.c (match_asm_constraints_1): Don't optimize if input
23039 doesn't satisfy general_operand predicate for output's mode.
23041 PR inline-asm/85022
23042 * alias.c (write_dependence_p): Don't require for x_canonicalized
23043 non-VOIDmode if x has VOIDmode.
23046 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
23047 just don't try to optimize it rather than assert it never happens.
23049 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
23051 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
23052 macro expansions for definition of ST_INTERNAL_<mode> and
23053 LD_INTERNAL_<mode> builtins.
23054 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
23056 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
23058 (altivec_expand_st_builtin): Likewise.
23059 (altivec_expand_builtin): Remove calls to deleted functions.
23060 (rs6000_address_for_altivec): Delete this function.
23061 * config/rs6000/vector.md: Remove expands for
23062 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
23064 2018-03-22 Sudakshina Das <sudi.das@arm.com>
23067 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
23068 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
23069 re-computing once computed.
23070 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
23071 (arm_init_machine_status): Initialize
23072 machine->static_chain_stack_bytes.
23074 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
23077 * doc/extend.texi: Add four new prototypes for vec_ld.
23078 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
23079 definitions for more logical presentation.
23080 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
23081 entries for V1TI variants of __builtin_altivec_ld builtin.
23082 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
23083 handling of V1TI variant of LVX icode pattern.
23084 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
23085 (rs6000_gimple_fold_builtin): Likewise.
23086 (altivec_init_builtins): Add code to define
23087 __builtin_altivec_lvx_v1ti function.
23089 2018-03-22 Jakub Jelinek <jakub@redhat.com>
23091 PR inline-asm/84941
23092 * function.c (match_asm_constraints_1): Don't do the optimization
23093 if input isn't a REG, SUBREG, MEM or constant.
23095 2018-03-22 Tom de Vries <tom@codesourcery.com>
23097 PR tree-optimization/84956
23098 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
23099 bb_has_abnormal_pred.
23101 2018-03-22 Jakub Jelinek <jakub@redhat.com>
23104 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
23105 DECL_INITIAL (decl) to decl at the end.
23106 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
23107 adjust the comment.
23109 2018-03-21 Joseph Myers <joseph@codesourcery.com>
23111 * doc/extend.texi (__builtin_tgmath): Document when complex
23112 integer types are treated as _Complex _Float64.
23114 2018-03-21 Tom de Vries <tom@codesourcery.com>
23116 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
23118 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23120 PR tree-optimization/84960
23121 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
23122 if it is ENTRY block, move them into single succ of ENTRY in that case.
23124 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
23126 PR tree-optimization/84811
23127 * poly-int.h (poly_span_traits): Remove the T3 parameter and
23128 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
23129 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
23130 (known_subrange_p): Update accordingly. Cast each value involved
23131 in the size comparison, rather than casting the result of the
23134 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23136 PR tree-optimization/84982
23137 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
23138 by flipping the least significant bit rather than all bits from
23139 bitpos to bitpos + bitsize - 1.
23141 2018-03-21 Nathan Sidwell <nathan@acm.org>
23143 * doc/extend.texi (Deprecated Features): Remove mention of
23144 long-deleted deprecations.
23146 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23149 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
23150 * configure: Regenerate.
23152 2018-03-21 Tom de Vries <tom@codesourcery.com>
23154 PR tree-optimization/83126
23155 * tree-parloops.c (num_phis): New function.
23156 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
23158 2018-03-21 Nathan Sidwell <nathan@acm.org>
23160 * doc/extend.texi (Deprecated Features): Update deprecated flags,
23161 mention anon-struct/union members and trailing attributes.
23163 2018-03-21 Bin Cheng <bin.cheng@arm.com>
23165 PR tree-optimization/84969
23166 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
23167 builtin memset partitions if they set different rhs values.
23169 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23171 PR rtl-optimization/84989
23172 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
23173 VEC_DUPLICATE with scalar result mode.
23175 2018-03-21 Martin Liska <mliska@suse.cz>
23178 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
23179 not intended return statement.
23181 2018-03-21 Martin Liska <mliska@suse.cz>
23184 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
23185 (chkp_find_bound_slots_1): Limit number of iterations.
23187 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
23190 * Minor grammar fixes for x86 options.
23192 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23195 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
23196 holding REG_CFA_RESTORE notes, instead turn them into a USE.
23198 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
23201 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
23202 (altivec_lvx_<mode>_1op): Likewise.
23203 (altivec_stvx_<mode>_2op): Likewise.
23204 (altivec_stvx_<mode>_1op): Likewise.
23205 (altivec_lvx_<VM2:mode>): New define_expand.
23206 (altivec_stvx_<VM2:mode>): Likewise.
23207 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
23208 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23209 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
23210 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23211 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
23212 (rs6000_gen_lvx): Likewise.
23213 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
23214 (altivec_expand_stv_builtin): Likewise.
23215 (altivec_expand_builtin): Likewise.
23216 * config/rs6000/vector.md: Likewise.
23218 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23221 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
23224 2018-03-20 Richard Biener <rguenther@suse.de>
23227 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
23228 sign-conversions as zero, fall back to standard scalar_stmt
23231 2018-03-20 Martin Liska <mliska@suse.cz>
23234 * predict.c (rebuild_frequencies): Handle case when we have
23235 PROFILE_ABSENT, but flag_guess_branch_prob is false.
23237 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23240 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
23241 flag_section_anchors.
23242 * varasm.c (use_blocks_for_decl_p): Remove hack for
23243 dw2_force_const_mem.
23246 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
23248 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
23249 be created, use lowpart_subreg of operands[0] rather than operands[0]
23251 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
23252 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
23253 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
23254 and n constraint instead of aarch64_shift_imm_di and Usd.
23255 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
23256 (*aarch64_<optab>_reg_minus<mode>3): ... this.
23258 2018-03-20 Sudakshina Das <sudi.das@arm.com>
23261 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
23262 to favor GPR over NEON registers.
23263 (<shift>di3_neon): Likewise.
23265 2018-03-20 Tom de Vries <tom@codesourcery.com>
23268 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
23269 (nvptx_process_pars): Emit bar.sync asap and alap.
23271 2018-03-20 Tom de Vries <tom@codesourcery.com>
23274 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
23275 seen_label if seen_label is already set.
23277 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23280 * config/i386/i386.c (fold_builtin_cpu): For features above 31
23281 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
23282 Use 1U instead of 1. Formatting fixes.
23285 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
23286 instead of TREE_TYPE (s1) for the return value.
23288 2018-03-19 Jakub Jelinek <jakub@redhat.com>
23290 PR tree-optimization/84946
23291 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
23292 bitsize + bitsize in poly_uint64 rather than poly_int64.
23295 * dwarf2asm.c: Include fold-const.c.
23296 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
23297 of decl rather than decl itself.
23299 PR rtl-optimization/84643
23300 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
23302 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
23305 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
23306 calling assemble_variable.
23308 2018-03-19 Sudakshina Das <sudi.das@arm.com>
23311 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
23312 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
23314 2018-03-19 Jim Wilson <jimw@sifive.com>
23317 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
23318 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
23319 (riscv_first_stack_step): Likewise.
23320 (riscv_option_override): Use STACK_BOUNDARY instead of
23321 MIN_STACK_BOUNDARY.
23322 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
23323 MIN_STACK_BOUNDARY.
23324 (BIGGEST_ALIGNMENT): Set to 128.
23325 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
23326 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
23329 2018-03-19 Richard Biener <rguenther@suse.de>
23331 PR tree-optimization/84933
23332 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
23333 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
23335 2018-03-19 Richard Biener <rguenther@suse.de>
23337 PR tree-optimization/84859
23338 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
23339 (cond_if_else_store_replacement): Perform sinking operation on
23340 single-store BBs regardless of MAX_STORES_TO_SINK setting.
23341 Generalize what a BB with a single eligible store is.
23343 2018-03-19 Richard Biener <rguenther@suse.de>
23345 PR tree-optimization/84929
23346 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
23347 chrec_is_positive against non-chrec arg.
23349 2018-03-19 Tamar Christina <tamar.christina@arm.com>
23352 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
23354 2018-03-18 Martin Liska <mliska@suse.cz>
23356 PR rtl-optimization/84635
23357 * regrename.c (build_def_use): Use matches_mode only when
23360 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
23362 PR tree-optimization/84913
23363 * tree-vect-loop.c (vectorizable_reduction): Don't try to
23364 vectorize chains of COND_EXPRs.
23366 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23368 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
23370 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23372 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
23374 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23376 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
23378 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23379 Kito Cheng <kito.cheng@gmail.com>
23381 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
23382 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
23383 (nds32_adjust_reg_alloc_order): New function.
23384 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
23386 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
23388 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
23389 nds32_print_operand, nds32_print_operand_address): Use
23390 HOST_WIDE_INT_PRINT_DEC instead.
23392 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23394 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
23396 2018-03-17 Jakub Jelinek <jakub@redhat.com>
23399 * config/i386/i386.c (initial_ix86_tune_features,
23400 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
23401 unsigned long long.
23402 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
23403 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
23404 rather than 1u << ix86_tune. Formatting fix.
23405 (ix86_option_override_internal): Change ix86_arch_mask from
23406 unsigned int to unsigned HOST_WIDE_INT, initialize to
23407 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
23408 (ix86_function_specific_restore): Likewise.
23410 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23413 * postreload.c (reload_combine_recognize_pattern): Perform
23414 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
23415 truncate_int_for_mode the result for the destination's mode.
23418 * hsa-gen.c (mem_type_for_type): Fix comment typo.
23419 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
23421 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23424 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
23427 * lra-assigns.c (lra_split_hard_reg_for): Don't use
23428 regno_allocno_class_array and sorted_pseudos.
23429 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
23430 insns where regno is used.
23432 2018-03-16 Martin Liska <mliska@suse.cz>
23435 * multiple_target.c (create_dispatcher_calls): Redirect
23436 reference in the symbol table.
23438 2018-03-16 Martin Liska <mliska@suse.cz>
23441 * multiple_target.c (create_dispatcher_calls): Redirect also
23444 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23448 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
23449 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
23450 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
23452 2018-03-16 Julia Koval <julia.koval@intel.com>
23454 * doc/invoke.texi (Skylake Server): Add CLWB.
23455 Cannonlake): Remove CLWB.
23457 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23459 PR tree-optimization/84841
23460 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
23462 (FLOAT_ONE_CONST_TYPE): Define.
23463 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
23464 (sort_by_operand_rank): Put entries with higher constant_type last
23465 rather than first to match comments.
23467 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
23469 * config/nios2/nios2.md (movsi_internal): Fix thinko in
23472 2018-03-15 Jakub Jelinek <jakub@redhat.com>
23475 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
23476 check and use address of target always.
23478 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
23481 * config/i386/i386.c (indirect_thunk_needed): Update comments.
23482 (indirect_thunk_bnd_needed): Likewise.
23483 (indirect_thunks_used): Likewise.
23484 (indirect_thunks_bnd_used): Likewise.
23485 (indirect_return_needed): New.
23486 (indirect_return_bnd_needed): Likewise.
23487 (output_indirect_thunk_function): Add a bool argument for
23489 (output_indirect_thunk_function): Don't generate alias for
23490 function return thunk.
23491 (ix86_code_end): Call output_indirect_thunk_function to generate
23492 function return thunks.
23493 (ix86_output_function_return): Set indirect_return_bnd_needed
23494 and indirect_return_needed instead of indirect_thunk_bnd_needed
23495 and indirect_thunk_needed.
23497 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
23499 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
23500 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
23501 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
23503 2018-03-15 David Malcolm <dmalcolm@redhat.com>
23504 Paul Hua <paul.hua.gm@gmail.com>
23507 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
23509 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
23511 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
23512 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
23513 resp. SFmode cases.
23515 2018-03-15 Tamar Christina <tamar.christina@arm.com>
23518 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
23519 instead of GET_MODE_SIZE when comparing Units.
23521 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
23524 * varasm.c (hash_section): Return an unchangeble hash value
23525 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
23526 Return !aarch64_can_use_per_function_literal_pools_p ().
23528 2018-03-15 Jakub Jelinek <jakub@redhat.com>
23531 * optabs.c (emit_conditional_move): Pass address of cmode's copy
23532 rather than address of cmode as last argument to prepare_cmp_insn.
23534 2018-03-15 Julia Koval <julia.koval@intel.com>
23536 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
23537 F_AVX512VNNI, F_AVX512BITALG): New.
23539 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
23542 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
23543 insn for floating-point loads and stores.
23545 2018-03-14 Carl Love <cel@us.ibm.com>
23547 * config/rs6000/rs6000-c.c: Add macro definitions for
23548 ALTIVEC_BUILTIN_VEC_PERMXOR.
23549 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
23550 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
23551 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
23552 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
23554 * config/doc/extend.texi: Add prototypes for vec_permxor.
23556 2018-03-14 David Malcolm <dmalcolm@redhat.com>
23559 * diagnostic-show-locus.c (class layout_point): Convert m_line
23560 from int to linenum_type.
23561 (line_span::comparator): Use linenum "compare" function when
23562 comparing line numbers.
23563 (test_line_span): New function.
23564 (layout_range::contains_point): Convert param "row" from int to
23566 (layout_range::intersects_line_p): Likewise.
23567 (layout::will_show_line_p): Likewise.
23568 (layout::print_source_line): Likewise.
23569 (layout::should_print_annotation_line_p): Likewise.
23570 (layout::print_annotation_line): Likewise.
23571 (layout::print_leading_fixits): Likewise.
23572 (layout::annotation_line_showed_range_p): Likewise.
23573 (struct line_corrections): Likewise for field m_row.
23574 (line_corrections::line_corrections): Likewise for param "row".
23575 (layout::print_trailing_fixits): Likewise.
23576 (layout::get_state_at_point): Likewise.
23577 (layout::get_x_bound_for_row): Likewise.
23578 (layout::print_line): Likewise.
23579 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
23580 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
23581 * input.c (selftest::test_linenum_comparisons): New function.
23582 (selftest::input_c_tests): Call it.
23583 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
23584 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
23585 * selftest.h (ASSERT_GT): New macro.
23586 (ASSERT_GT_AT): New macro.
23587 (ASSERT_LT): New macro.
23588 (ASSERT_LT_AT): New macro.
23590 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
23592 PR rtl-optimization/84780
23593 * combine.c (distribute_links): Don't make a link based on pc_rtx.
23595 2018-03-14 Martin Liska <mliska@suse.cz>
23597 * tree.c (record_node_allocation_statistics): Use
23598 get_stats_node_kind.
23599 (get_stats_node_kind): New function extracted from
23600 record_node_allocation_statistics.
23601 (free_node): Use get_stats_node_kind.
23603 2018-03-14 Richard Biener <rguenther@suse.de>
23605 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
23606 that the value-set of ANTIC_IN doesn't grow.
23609 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23611 (BB_VISITED_WITH_VISITED_SUCCS): New define.
23612 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23614 2018-03-14 Julia Koval <julia.koval@intel.com>
23616 * config.gcc (icelake-client, icelake-server): New.
23618 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
23619 (initial_ix86_arch_features): Ditto.
23620 (PTA_SKYLAKE): Add SGX.
23621 (PTA_ICELAKE): Remove.
23622 (PTA_ICELAKE_CLIENT): New.
23623 (PTA_ICELAKE_SERVER): New.
23624 (ix86_option_override_internal): Split up icelake on icelake client and
23626 (get_builtin_code_for_version): Ditto.
23627 (fold_builtin_cpu): Ditto.
23628 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
23629 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
23630 * config/i386/i386.h (processor_type): Ditto.
23631 * doc/invoke.texi: Ditto.
23633 2018-03-14 Jakub Jelinek <jakub@redhat.com>
23636 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
23637 INTEGER_CST offset, add it together with bitpos / 8 and
23638 sign extend based on POINTER_SIZE.
23642 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
23645 * config/i386/constraints.md (Yc): New register constraint.
23646 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
23647 Use Yc constraint for alternative 2 of operand 0. Remove
23648 preferred_for_speed attribute.
23650 2018-03-14 Richard Biener <rguenther@suse.de>
23652 PR tree-optimization/84830
23653 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
23654 with the old one to avoid oscillations.
23656 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
23659 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
23661 (assign_by_spills): Return a flag of reload assignment failure.
23662 Do not process the reload assignment failures. Do not spill other
23663 reload pseudos if they has the same reg class. Update n if
23665 (lra_assign): Add a return arg. Set up from the result of
23666 assign_by_spills call.
23667 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23668 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23669 usage_insns if it is not NULL.
23670 (spill_hard_reg_in_range): New function.
23671 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23672 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23673 function prototypes.
23674 (lra_assign): Change prototype.
23675 * lra.c (lra): Add code to deal with fails by splitting hard reg
23678 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
23680 * config/riscv/riscv.opt (mrelax): New option.
23681 * config/riscv/riscv.c (riscv_file_start): Emit ".option
23682 "norelax" when riscv_mrelax is disabled.
23683 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
23685 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23688 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
23689 reassociation for int modes.
23691 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23693 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
23694 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
23696 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
23697 * config/aarch64/aarch64-sve.md
23698 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
23699 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
23700 (*extend<mode><Vwide>2): Rename to...
23701 (aarch64_sve_extend<mode><Vwide>2): ...this.
23702 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
23703 renaming the old pattern to...
23704 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
23706 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
23707 define_expand, renaming the old pattern to...
23708 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
23709 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
23710 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
23711 account when deciding which SVE instruction the optab should use.
23712 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
23714 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23716 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
23717 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
23718 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
23719 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
23720 (tlsdesc_small_<mode>): Turn a define_expand and use
23721 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
23722 (tlsdesc_small_advsimd_<mode>): ...this.
23723 (tlsdesc_small_sve_<mode>): New pattern.
23725 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23727 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
23728 (UNSPEC_UMUL_HIGHPART): New constants.
23729 (MUL_HIGHPART): New int iteraor.
23730 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
23731 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
23733 (*<su>mul<mode>3_highpart): New define_insn.
23735 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
23738 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23741 2018-03-13 Martin Liska <mliska@suse.cz>
23744 * (sem_item_optimizer::sem_item_optimizer): Initialize new
23746 (sem_item_optimizer::~sem_item_optimizer): Release it.
23747 (sem_item_optimizer::merge_classes): Register variable aliases.
23748 (sem_item_optimizer::fixup_pt_set): New function.
23749 (sem_item_optimizer::fixup_points_to_sets): Likewise.
23750 * ipa-icf.h: Declare new variables and functions.
23752 2018-03-13 Jakub Jelinek <jakub@redhat.com>
23754 PR middle-end/84834
23755 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
23756 integer_pow2p@2 and test integer_pow2p in condition.
23757 (A < 0 ? C : 0): Similarly for @1.
23759 PR middle-end/84831
23760 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
23761 characters starting at p contain '\0' character, don't look beyond
23765 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
23766 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
23769 * reg-stack.c (change_stack): Change update_end var from int to
23770 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
23771 also call set_block_for_insn on the newly added insns and rescan.
23774 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
23775 on the last operand.
23778 * tree.c (stabilize_reference_1): Return save_expr (e) for
23779 STATEMENT_LIST even if it doesn't have side-effects.
23781 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
23783 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
23785 2018-03-12 Renlin Li <renlin.li@arm.com>
23787 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
23788 aarch64_output_scalar_simd_mov_immediate.
23790 2018-03-12 Martin Sebor <msebor@redhat.com>
23792 PR tree-optimization/83456
23793 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
23794 for perfectly overlapping calls to memcpy.
23795 (gimple_fold_builtin_memory_chk): Same.
23796 (gimple_fold_builtin_strcpy): Handle no-warning.
23797 (gimple_fold_builtin_stxcpy_chk): Same.
23798 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
23800 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
23802 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
23803 parameter. Use it for SFmode.
23804 (rs6000_function_arg_advance_1): Adjust.
23805 (rs6000_function_arg): Adjust.
23806 (rs6000_gimplify_va_arg): Pass false for that new parameter.
23808 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
23810 PR rtl-optimization/84169
23811 PR rtl-optimization/84780
23812 * combine.c (can_combine_p): Check for a 2-insn combination whether
23813 the destination register is used between the two insns, too.
23815 2018-03-12 Richard Biener <rguenther@suse.de>
23817 PR tree-optimization/84803
23818 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
23819 for refs DR analysis didn't process.
23821 2018-03-12 Richard Biener <rguenther@suse.de>
23823 PR tree-optimization/84777
23824 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
23825 force-vectorize loops ignore whether we are optimizing for size.
23827 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
23829 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
23830 (TARGET_MD_ASM_ADJUST): Define.
23832 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
23833 Kito Cheng <kito.cheng@gmail.com>
23834 Chung-Ju Wu <jasonwucj@gmail.com>
23836 * config/nds32/nds32.c (nds32_compute_stack_frame,
23837 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
23838 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
23839 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
23840 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
23841 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
23842 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
23843 * config/nds32/nds32.md (prologue, epilogue): Use macro
23844 NDS32_V3PUSH_AVAILABLE_P to do checking.
23846 2018-03-11 Jakub Jelinek <jakub@redhat.com>
23849 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
23850 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
23851 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
23852 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
23853 addition of most attributes on !orig_type_die or the attribute not
23854 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
23856 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23857 Chung-Ju Wu <jasonwucj@gmail.com>
23859 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
23860 __NDS32_VH__ macro.
23861 * config/nds32/nds32.opt (mvh): New option.
23863 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23864 Chung-Ju Wu <jasonwucj@gmail.com>
23866 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
23868 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
23869 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
23872 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23873 Chung-Ju Wu <jasonwucj@gmail.com>
23875 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
23877 * config/nds32/nds32-multiple.md (strlensi): New pattern.
23878 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
23880 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
23881 Kito Cheng <kito.cheng@gmail.com>
23882 Chung-Ju Wu <jasonwucj@gmail.com>
23884 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
23885 UNSPEC_FFMISM and UNSPEC_FLMISM.
23886 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
23887 for ffb, ffmism and flmism.
23888 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
23889 (unspec_ffmism): Ditto.
23890 (unspec_flmism): Ditto.
23891 (nds32_expand_builtin_impl): Check if string extension is available.
23892 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
23893 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
23895 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
23898 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
23901 * lra-assigns.c (assign_by_spills): Return a flag of reload
23902 assignment failure. Do not process the reload assignment
23903 failures. Do not spill other reload pseudos if they has the same
23905 (lra_assign): Add a return arg. Set up from the result of
23906 assign_by_spills call.
23907 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23908 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23909 usage_insns if it is not NULL.
23910 (spill_hard_reg_in_range): New function.
23911 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23912 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23913 function prototypes.
23914 (lra_assign): Change prototype.
23915 * lra.c (lra): Add code to deal with fails by splitting hard reg
23918 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
23921 * config/i386/i386.opt: Replace Enforcment with Enforcement.
23923 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
23926 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
23927 (dw_val_node): Add val_symbolic_view.
23928 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
23929 (symview_upper_bound): New.
23930 (new_line_info_table): Initialize symviews_since_reset.
23931 (dwarf2out_source_line): Count symviews_since_reset and set
23932 symview_upper_bound.
23933 (dw_val_equal_p): Handle symview.
23934 (add_AT_symview): New.
23935 (print_dw_val): Handle symview.
23936 (attr_checksum, attr_checksum_ordered): Likewise.
23937 (same_dw_val_p, size_of_die): Likewise.
23938 (value_format, output_die): Likewise.
23939 (add_high_low_attributes): Use add_AT_symview for entry_view.
23940 (dwarf2out_finish): Reset symview_upper_bound, clear
23943 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
23946 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
23947 Add strict argument and use it.
23948 (rs6000_split_multireg_move): Update for new strict argument.
23949 (mem_operand_gpr): Disallow all non-offsettable addresses.
23950 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
23952 2018-03-09 Jakub Jelinek <jakub@redhat.com>
23955 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
23956 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
23957 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
23960 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
23961 decl, use remap_type if we want to use the type.
23963 2018-03-09 Martin Sebor <msebor@redhat.com>
23965 PR tree-optimization/84526
23966 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23968 (builtin_access::generic_overlap): Be prepared to handle non-array
23971 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
23973 PR rtl-optimization/84682
23974 * lra-constraints.c (process_address_1): Check is_address flag
23975 for address constraints.
23976 (process_alt_operands): Likewise.
23977 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
23978 preprocess_constraints.
23979 * recog.h (preprocess_constraints): Add oploc parameter.
23981 * recog.c (preprocess_constraints): Test address_operand for
23982 CT_ADDRESS constraints.
23984 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
23987 * lra-assigns.c (assign_by_spills): Return a flag of reload
23988 assignment failure. Do not process the reload assignment
23989 failures. Do not spill other reload pseudos if they has the same
23991 (lra_assign): Add a return arg. Set up from the result of
23992 assign_by_spills call.
23993 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23994 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23995 usage_insns if it is not NULL.
23996 (spill_hard_reg_in_range): New function.
23997 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23998 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23999 function prototypes.
24000 (lra_assign): Change prototype.
24001 * lra.c (lra): Add code to deal with fails by splitting hard reg
24004 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24007 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
24008 Accept complain bool parameter. Only emit errors if it is true.
24009 (arm_parse_cpu_option_name): Likewise.
24010 (arm_target_thumb_only): Adjust callers of the above.
24011 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
24012 prototype to take a default true bool parameter.
24013 (arm_parse_arch_option_name): Likewise.
24015 2018-03-09 David Malcolm <dmalcolm@redhat.com>
24016 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
24020 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
24021 * configure: Regenerate.
24022 * configure.ac ("linker --version-script option"): New.
24023 ("linker soname option"): New.
24025 2018-03-09 Richard Biener <rguenther@suse.de>
24027 PR tree-optimization/84775
24028 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
24029 immediate uses of predicate stmts and mark them modified.
24032 PR tree-optimization/84178
24033 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24035 (version_loop_for_if_conversion): Delay update_ssa call.
24036 (tree_if_conversion): Delay update_ssa until after predicate
24039 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
24042 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
24043 when the function accesses prior frames.
24045 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24048 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
24049 gen_llsym, otherwise call maybe_gen_llsym.
24051 PR inline-asm/84742
24052 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
24053 has ',' character inside of it.
24055 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24058 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
24059 as clobbering CC_REGNUM.
24061 2018-03-08 Richard Biener <rguenther@suse.de>
24063 PR middle-end/84552
24064 * tree-scalar-evolution.c: Include tree-into-ssa.h.
24065 (follow_copies_to_constant): Do not follow SSA names registered
24068 2018-03-08 Richard Biener <rguenther@suse.de>
24070 PR tree-optimization/84178
24071 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24073 (version_loop_for_if_conversion): Delay update_ssa call.
24074 (tree_if_conversion): Delay update_ssa until after predicate
24077 2018-03-08 David Malcolm <dmalcolm@redhat.com>
24079 PR tree-optimization/84178
24080 * tree-if-conv.c (release_bb_predicate): Remove the
24081 the assertion that the stmts have NULL use_ops.
24082 Discard the statements, asserting that they haven't
24083 yet been added to a BB.
24085 2018-03-08 Richard Biener <rguenther@suse.de>
24087 PR tree-optimization/84746
24088 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
24089 (phi_translate): Pass in destination ANTIC_OUT set.
24090 (phi_translate_1): Likewise. For a simplified result lookup
24091 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
24092 (phi_translate_set): Adjust.
24093 (do_pre_regular_insertion): Likewise.
24094 (do_pre_partial_partial_insertion): Likewise.
24096 2018-03-08 Martin Liska <mliska@suse.cz>
24098 PR gcov-profile/84735
24099 * doc/gcov.texi: Document usage of profile files.
24100 * gcov-io.h: Document changes in the format.
24102 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
24106 * dwarf2out.c (struct dw_line_info_table): Update comments for
24108 (FORCE_RESET_NEXT_VIEW): New.
24109 (FORCE_RESETTING_VIEW_P): New.
24110 (RESETTING_VIEW_P): Check for -1 too.
24111 (ZERO_VIEW_P): Likewise.
24112 (new_line_info_table): Force-reset next view.
24113 (dwarf2out_begin_function): Likewise.
24114 (dwarf2out_source_line): Simplify zero_view_p initialization.
24115 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
24116 view directly. Omit view when omitting .loc at line 0.
24118 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24120 PR tree-optimization/84740
24121 * tree-switch-conversion.c (process_switch): Call build_constructors
24122 only if info.phi_count is non-zero.
24124 PR tree-optimization/84739
24125 * tree-tailcall.c (find_tail_calls): Check call arguments against
24126 DECL_ARGUMENTS (current_function_decl) rather than
24127 DECL_ARGUMENTS (func) when checking for tail recursion.
24129 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24131 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
24132 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
24133 Volker Reichelt's entry and add entries for people that perform
24134 GCC fuzzy testing and report numerous bugs.
24136 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
24139 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
24140 readonly data in sdata, if that is disabled.
24141 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
24142 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
24143 -mreadonly-in-sdata option.
24145 2018-03-07 Martin Sebor <msebor@redhat.com>
24147 PR tree-optimization/84468
24148 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
24149 basic block when looking for nul assignment.
24151 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
24154 * except.h (output_function_exception_table): Adjust prototype.
24155 * except.c (output_function_exception_table): Remove FNNAME parameter
24156 and add SECTION parameter. Ouput one part of the table at a time.
24157 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
24158 the first part of the exception table and emit unwind directives.
24159 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
24160 (i386_pe_seh_cold_init): Likewise.
24161 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
24162 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
24163 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
24164 (ix86_output_call_insn): Emit a nop in one more case for SEH.
24165 * config/i386/winnt.c: Include except.h.
24166 (struct seh_frame_state): Add reg_offset, after_prologue and
24167 in_cold_section fields.
24168 (i386_pe_seh_end_prologue): Set seh->after_prologue.
24169 (i386_pe_seh_cold_init): New function.
24170 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
24171 to seh->in_cold_section.
24172 (seh_emit_push): Record the offset of the push.
24173 (seh_emit_save): Record the offet of the save.
24174 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
24175 Test seh->after_prologue to disregard the epilogue.
24176 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
24177 (i386_pe_end_cold_function): New function.
24179 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24182 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
24183 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
24186 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
24188 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
24189 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
24191 PR middle-end/84723
24192 * multiple_target.c: Include tree-inline.h and intl.h.
24193 (expand_target_clones): Diagnose and fail if node->definition and
24194 !tree_versionable_function_p (node->decl).
24196 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
24198 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
24200 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
24201 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
24202 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
24204 2018-03-06 Jakub Jelinek <jakub@redhat.com>
24207 * combine.c (try_combine): Use reg_or_subregno instead of handling
24208 just paradoxical SUBREGs and REGs.
24210 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
24212 * config/arc/arc.c (arc_finalize_pic): Remove function.
24213 (arc_must_save_register): We use single base PIC register, remove
24214 checks to save/restore the PIC register.
24215 (arc_expand_prologue): Likewise.
24216 * config/arc/arc-protos.h (arc_set_default_type_attributes):
24218 (arc_verify_short): Likewise.
24219 (arc_attr_type): Likewise.
24220 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
24221 (walk_stores): Likewise.
24222 (arc_address_cost): Make it static.
24223 (arc_verify_short): Likewise.
24224 (branch_dest): Likewise.
24225 (arc_attr_type): Likewise.
24226 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
24227 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
24228 (arc_final_prescan_insn): Remove inserting the nops due to
24229 hardware hazards. It is done in reorg step.
24230 (insn_length_variant_t): Remove.
24231 (insn_length_parameters_t): Likewise.
24232 (arc_insn_length_parameters): Likewise.
24233 (arc_get_insn_variants): Likewise.
24234 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
24236 2018-03-06 Jakub Jelinek <jakub@redhat.com>
24238 PR inline-asm/84683
24239 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
24242 PR tree-optimization/84687
24243 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
24245 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
24247 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24249 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
24250 Rename to ppc_speculation_barrier.
24251 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
24252 __builtin_ppc_speculation_barrier.
24254 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24257 * combine.c (combine_simplify_rtx): Don't try to simplify if
24258 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
24261 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
24263 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
24264 to 32 bytes when compiling for POWER9.
24266 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24269 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
24270 regparm >= 3 with no arg reg available also for calls with
24271 flag_force_indirect_call. Pass decl to ix86_function_regparm.
24274 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
24276 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
24278 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
24281 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
24283 2018-03-05 Richard Biener <rguenther@suse.de>
24285 PR tree-optimization/84486
24286 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
24287 When inserting a __builtin_assume_aligned call set the LHS
24288 SSA name alignment info accordingly.
24290 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
24292 PR tree-optimization/84114
24293 * config/aarch64/aarch64.c (aarch64_reassociation_width)
24294 Avoid reassociation of FLOAT_MODE addition.
24296 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
24298 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
24299 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
24300 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
24301 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
24302 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
24303 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
24304 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
24306 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
24307 __builtin_ia32_wbinvd): New builtins.
24308 (SPECIAL_ARGS2): New.
24309 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
24310 (SPECIAL_ARGS2): New.
24311 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
24312 (ix86_valid_target_attribute_inner_p): Ditto.
24313 (ix86_init_mmx_sse_builtins): Add special_args2.
24314 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
24315 TARGET_WBNOINVD_P): New.
24316 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
24317 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
24318 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
24319 * config/i386/immintrin.h (_wbinvd): New intrinsic.
24320 * config/i386/pconfigintrin.h: New file.
24321 * config/i386/wbnoinvdintrin.h: Ditto.
24322 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
24324 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
24326 2018-03-05 Richard Biener <rguenther@suse.de>
24328 PR tree-optimization/84670
24329 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24331 (BB_VISITED_WITH_VISITED_SUCCS): New define.
24332 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24333 (compute_antic_aux): Only assert the number of values in ANTIC_IN
24334 doesn't grow if all successors (recursively) were visited at least
24337 2018-03-05 Richard Biener <rguenther@suse.de>
24339 PR tree-optimization/84650
24340 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
24341 if executed in the loop pipeline.
24343 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
24345 * doc/configfiles.texi (Configuration Files): Move info about
24346 conditionalizing $target-protos.h to...
24347 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
24348 differs from $target-protos.h.
24350 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
24351 Chung-Ju Wu <jasonwucj@gmail.com>
24353 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
24354 * config/nds32/nds32-multiple.md (setmemsi): Define.
24355 * config/nds32/nds32-memory-manipulation.c
24356 (nds32_gen_dup_4_byte_to_word_value): New.
24357 (emit_setmem_word_loop): New.
24358 (emit_setmem_byte_loop): New.
24359 (nds32_expand_setmem_loop): New.
24360 (nds32_expand_setmem_loop_v3m): New.
24361 (nds32_expand_setmem_unroll): New.
24362 (nds32_expand_setmem): New.
24364 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24365 Chung-Ju Wu <jasonwucj@gmail.com>
24367 * config/nds32/nds32-memory-manipulation.c
24368 (nds32_emit_load_store): New.
24369 (nds32_emit_post_inc_load_store): New.
24370 (nds32_emit_mem_move): New.
24371 (nds32_emit_mem_move_block): New.
24372 (nds32_expand_movmemsi_loop_unknown_size): New.
24373 (nds32_expand_movmemsi_loop_known_size): New.
24374 (nds32_expand_movmemsi_loop): New.
24375 (nds32_expand_movmemsi_unroll): New.
24376 (nds32_expand_movmemqi): Rename ...
24377 (nds32_expand_movmemsi): ... to this.
24378 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
24379 (movmemsi): ... to this.
24380 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
24381 (nds32_expand_movmemsi): ... to this.
24383 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24384 Monk Chiang <sh.chiang04@gmail.com>
24385 Chung-Ju Wu <jasonwucj@gmail.com>
24387 * config/nds32/nds32-protos.h
24388 (nds32_expand_load_multiple): New arguments.
24389 (nds32_expand_store_multiple): Ditto.
24390 (nds32_valid_multiple_load_store): Rename ...
24391 (nds32_valid_multiple_load_store_p): ... to this.
24392 * config/nds32/nds32-memory-manipulation.c
24393 (nds32_expand_load_multiple): Refine implementation.
24394 (nds32_expand_store_multiple): Ditto.
24395 * config/nds32/nds32-multiple.md
24396 (load_multiple): Update nds32_expand_load_multiple interface.
24397 (store_multiple): Update nds32_expand_store_multiple interface.
24398 * config/nds32/nds32-predicates.c
24399 (nds32_valid_multiple_load_store): Rename ...
24400 (nds32_valid_multiple_load_store_p): ... to this and refine
24402 * config/nds32/predicates.md
24403 (nds32_load_multiple_and_update_address_operation): New predicate.
24404 (nds32_store_multiple_and_update_address_operation): New predicate.
24406 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24407 Chung-Ju Wu <jasonwucj@gmail.com>
24409 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
24410 (combo): New attribute.
24411 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
24413 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
24415 * config/nds32/nds32.opt: Change -mcmodel= default value.
24417 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
24418 Monk Chiang <sh.chiang04@gmail.com>
24419 Chung-Ju Wu <jasonwucj@gmail.com>
24421 * config/nds32/constants.md (unspec_element): New enum.
24422 * config/nds32/constraints.md (Umw): New constraint.
24423 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
24424 * config/nds32/nds32-intrinsic.md: Likewise.
24425 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
24426 (nds32_valid_smw_lwm_base_p): New.
24427 (nds32_output_smw_single_word): New.
24428 (nds32_output_lmw_single_word): New.
24429 (nds32_expand_unaligned_load): New.
24430 (nds32_expand_unaligned_store): New.
24431 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
24432 (nds32_output_smw_single_word): Declare.
24433 (nds32_output_lmw_single_word): Declare.
24434 (nds32_expand_unaligned_load): Declare.
24435 (nds32_expand_unaligned_store): Declare.
24436 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
24437 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
24438 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
24439 NDS32_BUILTIN_UASTORE_DW.
24440 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
24443 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
24444 Kito Cheng <kito.cheng@gmail.com>
24445 Chung-Ju Wu <jasonwucj@gmail.com>
24447 * config/nds32/nds32-intrinsic.c
24448 (nds32_expand_builtin_null_ftype_reg): Delete.
24449 (nds32_expand_builtin_reg_ftype_imm): Ditto.
24450 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
24451 (nds32_read_argument): New.
24452 (nds32_legitimize_target): Ditto.
24453 (nds32_legitimize_argument): Ditto.
24454 (nds32_check_constant_argument): Ditto.
24455 (nds32_expand_unop_builtin): Ditto.
24456 (nds32_expand_unopimm_builtin): Ditto.
24457 (nds32_expand_binop_builtin): Ditto.
24458 (nds32_builtin_decl_impl): Ditto.
24459 (builtin_description): Ditto.
24460 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
24461 (nds32_init_builtins_impl): Ditto.
24462 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
24463 (nds32_builtin_decl): New.
24464 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
24465 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
24467 2018-03-02 Jeff Law <law@redhat.com>
24469 * reorg.c (stop_search_p): Handle DEBUG_INSN.
24470 (redundant_insn, fill_simple_delay_slots): Likewise.
24471 (fill_slots_from_thread): Likewise.
24472 * resource.c (mark_referenced_resources): Likewise.
24473 (mark_set_resources, find_dead_or_set_registers): Likewise.
24475 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24477 * substring-locations.h (format_warning_va): Formatting fix for
24478 ATTRIBUTE_GCC_DIAG.
24479 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
24481 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
24482 * substring-locations.c: Include intl.h.
24483 (format_warning_va): Turned into small wrapper around
24484 format_warning_n_va, renamed to ...
24485 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
24486 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
24488 (format_warning_at_substring_n): New function.
24489 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
24490 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
24491 format_warning_at_substring with just a shorter name instead of
24492 const function pointer.
24493 (fmtwarn_n): New function.
24494 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
24495 appropriate, get rid of all the fmtstr temporaries, move conditionals
24496 with G_() wrapped string literals directly into fmtwarn arguments,
24497 cast dir.len to (int), formatting fixes.
24499 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
24501 * doc/invoke.texi: Remove "Cilk Plus" references.
24503 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24504 Richard Biener <rguenther@suse.de>
24507 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
24508 for error or warning attributes if CALL_FROM_THUNK_P is set.
24511 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24514 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
24515 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
24518 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
24519 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
24521 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
24522 instead of -1U in last predictors element's probability member.
24524 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
24527 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
24528 arguments if they are comparable.
24530 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
24532 PR tree-optimization/84634
24533 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
24534 masks and masked_loop_p with a single loop_masks, making sure it's
24535 null for bb vectorization.
24537 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
24539 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
24540 (vect_analyze_data_ref_access): Use loop->safe_len rather than
24541 loop->force_vectorize to check whether there is no alias.
24543 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24546 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
24548 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
24550 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
24551 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
24552 instead of a loop around prev_real_insn.
24553 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
24556 PR inline-asm/84625
24557 * config/i386/i386.c (ix86_print_operand): Use conditional
24558 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
24561 2018-03-02 Richard Biener <rguenther@suse.de>
24563 PR tree-optimization/84427
24564 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
24565 (bitmap_set_subtract_values): Rewrite to handle multiple
24568 (prune_clobbered_mems): Likewise.
24569 (phi_translate): Take edge instead of pred/phiblock.
24570 (phi_translate_1): Likewise.
24571 (phi_translate_set): Likewise. Insert all translated
24572 exprs for a value into the set, keeping possibly multiple
24573 expressions per value.
24574 (compute_antic_aux): Adjust for phi_translate changes.
24575 When intersecting union the expressions and prune those
24576 not in the final value set, keeping possibly multiple
24577 expressions per value. Do not use value-insertion
24578 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
24579 all expressions. Add verification that the value-sets
24580 only shrink during iteration.
24581 (compute_partial_antic_aux): Adjust for the phi_translate changes.
24582 (do_pre_regular_insertion): Likewise.
24583 (do_pre_partial_partial_insertion): Likewise.
24585 2018-03-02 Richard Biener <rguenther@suse.de>
24588 * config/darwin.c (saved_debug_info_level): New static global.
24589 (darwin_asm_lto_start): Disable debug info generation for LTO out.
24590 (darwin_asm_lto_end): Restore debug info generation settings.
24592 2018-03-01 Martin Liska <mliska@suse.cz>
24595 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
24596 volatile arguments.
24598 2018-03-01 Richard Biener <rguenther@suse.de>
24601 * dwarf2out.c (gen_variable_die): Properly handle late VLA
24602 type annotation with LTO when debug was disabled at compile-time.
24604 2018-03-01 Matthew Fortune <mfortune@gmail.com>
24606 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
24608 (mips_final_postscan_insn): Likewise.
24610 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
24612 PR rtl-optimization/84528
24613 * alias.c (init_alias_target): Add commentary.
24614 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
24615 a unique base value if the frame pointer is not eliminated
24616 to the stack pointer.
24618 2018-03-01 Tom de Vries <tom@codesourcery.com>
24620 PR rtl-optimization/83327
24621 * lra-int.h (hard_regs_spilled_into): Declare.
24622 * lra.c (hard_regs_spilled_into): Define.
24623 (init_reg_info): Init hard_regs_spilled_into.
24624 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
24625 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
24626 (process_bb_lives): Handle hard_regs_spilled_into.
24627 (lra_create_live_ranges_1): Before doing liveness propagation, clear
24628 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
24630 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
24632 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
24633 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
24634 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
24635 * config/rs6000/aix72.h: New file.
24637 2018-02-28 Jakub Jelinek <jakub@redhat.com>
24639 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
24640 instead of warning_at with conditional singular and plural messages
24644 * stor-layout.c (update_alignment_for_field): For
24645 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
24646 && !DECL_PACKED (field), do the alignment update, just use
24647 only desired_align instead of MAX (type_align, desired_align)
24649 (place_field): Don't do known_align < desired_align handling
24650 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
24651 is non-NULL, instead do it after rli->prev_field handling and
24652 only if not within a bitfield word. For DECL_PACKED (field)
24653 use type_align of BITS_PER_UNIT.
24655 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
24657 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
24658 superfluous parentheses and trailing spaces.
24660 2018-02-28 Richard Biener <rguenther@suse.de>
24662 PR tree-optimization/84584
24663 * graphite-scop-detection.c (scop_detection::add_scop): Discard
24664 SCoPs with fake exit edge.
24666 2018-02-28 Martin Liska <mliska@suse.cz>
24669 * timevar.c (timer::print): Fix format to properly print 100%
24672 2018-02-28 Richard Biener <rguenther@suse.de>
24674 PR middle-end/84607
24675 * genmatch.c (capture_info::walk_match): Do not mark
24676 captured expressions without operands as expr_p given
24677 they act more like predicates and should be subject to
24678 "lost tail" side-effect preserving.
24680 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
24682 PR rtl-optimization/81611
24683 * auto-inc-dec.c (attempt_change): Move dead note from
24684 mem_insn if it's the next use of regno
24685 (find_address): Take address use of reg holding
24686 non-incremented value. Add parm to limit search to the named
24688 (merge_in_block): Attempt to use a mem insn that is the next
24689 use of the original regno.
24691 2018-02-27 Martin Sebor <msebor@redhat.com>
24694 * doc/invoke.texi (-Wmissing-attributes): New option.
24695 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
24697 2018-02-27 Martin Sebor <msebor@redhat.com>
24699 PR translation/84207
24700 * diagnostic-core.h (warning_n, error_n, inform_n): Change
24701 n argument to unsigned HOST_WIDE_INT.
24702 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
24703 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
24704 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
24705 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
24707 2018-02-27 Richard Biener <rguenther@suse.de>
24709 PR tree-optimization/84512
24710 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
24711 Do not use the estimate returned from record_stmt_cost for
24712 the scalar iteration cost but sum properly using add_stmt_cost.
24714 2018-02-27 Richard Biener <rguenther@suse.de>
24716 PR tree-optimization/84466
24717 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24718 Adjust last change to less strictly validate use operands.
24720 2018-02-27 Martin Liska <mliska@suse.cz>
24722 PR gcov-profile/84548
24723 * gcov.c (process_file): Allow partial overlap and consider it
24724 also as group functions.
24725 (output_lines): Properly calculate range of lines for a group.
24727 2018-02-27 Martin Liska <mliska@suse.cz>
24729 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
24730 'ggc' suffixes. Change first column width.
24731 (timer::print): Fix formatting of the column.
24733 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
24735 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
24736 preserve inline entry blocks for the sake of debug inline
24737 entry point markers alone.
24738 (remove_unused_locals): Suggest in comments a better place to
24739 force the preservation of inline entry blocks that are
24740 otherwise unused, but do not preserve them.
24742 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24744 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
24746 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24749 * config/i386/constraints.md (Bs): Replace
24750 ix86_indirect_branch_register with
24751 TARGET_INDIRECT_BRANCH_REGISTER.
24753 * config/i386/i386.md (indirect_jump): Likewise.
24754 (tablejump): Likewise.
24755 (*sibcall_memory): Likewise.
24756 (*sibcall_value_memory): Likewise.
24757 Peepholes of indirect call and jump via memory: Likewise.
24758 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
24759 (*sibcall_value_GOT_32): Likewise.
24760 * config/i386/predicates.md (indirect_branch_operand): Likewise.
24761 (GOT_memory_operand): Likewise.
24762 (call_insn_operand): Likewise.
24763 (sibcall_insn_operand): Likewise.
24764 (GOT32_symbol_operand): Likewise.
24765 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
24767 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24769 PR rtl-optimization/83496
24770 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
24771 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
24772 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
24773 redundant insn, if any.
24774 (relax_delay_slots): Likewise.
24775 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
24777 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
24779 PR tree-optimization/83965
24780 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
24781 that grouped statements are part of a reduction chain. Return
24782 true if the statement is not marked as a reduction itself but
24783 is part of a group.
24784 (vect_recog_dot_prod_pattern): Don't check whether the statement
24785 is part of a group here.
24786 (vect_recog_sad_pattern): Likewise.
24787 (vect_recog_widen_sum_pattern): Likewise.
24789 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24792 * final.c (rest_of_clean_state): Also look for calls inside sequences.
24794 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24797 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
24799 (ix86_output_indirect_function_return): New prototype.
24800 (ix86_split_simple_return_pop_internal): Likewise.
24801 * config/i386/i386.c (indirect_return_via_cx): New.
24802 (indirect_return_via_cx_bnd): Likewise.
24803 (indirect_thunk_name): Handle return va CX_REG.
24804 (output_indirect_thunk_function): Create alias for
24805 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
24806 (ix86_output_indirect_jmp): Remove the bool argument.
24807 (ix86_output_indirect_function_return): New function.
24808 (ix86_split_simple_return_pop_internal): Likewise.
24809 * config/i386/i386.md (*indirect_jump): Don't pass false
24810 to ix86_output_indirect_jmp.
24811 (*tablejump_1): Likewise.
24812 (simple_return_pop_internal): Change it to define_insn_and_split.
24813 Call ix86_split_simple_return_pop_internal to split it for
24814 -mfunction-return=.
24815 (simple_return_indirect_internal): Call
24816 ix86_output_indirect_function_return instead of
24817 ix86_output_indirect_jmp.
24819 2018-02-26 Jakub Jelinek <jakub@redhat.com>
24822 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
24823 memset and value initialization afterwards.
24825 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
24827 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
24829 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
24832 * common/config/aarch64/aarch64-common.c
24833 (aarch_option_optimization_table[]): Switch
24834 off fomit-frame-pointer
24836 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
24837 Chung-Ju Wu <jasonwucj@gmail.com>
24839 * config/nds32/nds32-multiple.md (load_multiple): Disallow
24841 (store_multiple): Ditto.
24843 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
24845 * config.gcc: Add --with-cpu support for nds32 target.
24846 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
24847 * config/nds32/nds32.opt: Add -mcpu= option.
24849 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
24851 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
24852 isel=yes): Warn for these deprecated options.
24854 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
24856 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
24857 ISA_2_5_MASKS_EMBEDDED.
24859 2018-02-23 Jakub Jelinek <jakub@redhat.com>
24861 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
24862 p->max as pointers rather than using iterative_hash_expr.
24864 2018-02-23 Carl Love <cel@us.ibm.com>
24866 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
24867 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
24869 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
24870 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
24871 P8V_BUILTIN_VEC_VUNSIGNED2.
24873 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
24876 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
24877 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
24879 * lra-constraints.c (curr_insn_transform): Set up
24880 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
24882 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
24883 * lra-eliminations.c (spill_pseudos): Ditto.
24884 (process_insn_for_elimination): Ditto.
24885 * lra-lives.c (reg_early_clobber_p): Use the new macros.
24886 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
24887 LRA_NON_CLOBBERED_ALT.
24889 2018-02-22 Martin Sebor <msebor@redhat.com>
24891 PR tree-optimization/84480
24892 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
24893 to maybe_diag_stxncpy_trunc. Call it.
24894 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
24895 from gimple_fold_builtin_strcpy. Print inlining stack.
24896 (handle_builtin_stxncpy): Print inlining stack.
24897 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
24899 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
24902 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
24903 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
24904 and -fcheck-pointer-bounds are used together.
24905 (indirect_thunk_prefix): New enum.
24906 (indirect_thunk_need_prefix): New function.
24907 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
24908 "_nt" instead of "_bnd" for NOTRACK prefix.
24909 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
24910 (output_indirect_thunk_function): Likewise.
24912 (ix86_code_end): Update output_indirect_thunk_function calls.
24913 (ix86_output_indirect_branch_via_reg): Replace
24914 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
24915 (ix86_output_indirect_branch_via_push): Likewise.
24916 (ix86_output_function_return): Likewise.
24917 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
24918 incompatible with -fcf-protection=branch and
24919 -fcheck-pointer-bounds.
24921 2018-02-22 Steve Ellcey <sellcey@cavium.com>
24924 * config/aarch64/aarch64.c (aarch64_print_address_internal):
24925 Change gcc_assert call to output_operand_lossage.
24927 2018-02-22 Steve Ellcey <sellcey@cavium.com>
24929 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
24931 2018-02-22 DJ Delorie <dj@redhat.com>
24932 Sebastian Perta <sebastian.perta@renesas.com>
24933 Oleg Endo <olegendo@gcc.gnu.org>
24935 * config/rx/rx.c (rx_rtx_costs): New function.
24936 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
24938 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
24940 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
24942 2018-02-22 Martin Liska <mliska@suse.cz>
24945 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
24946 Add "native" as a possible value.
24948 2018-02-22 Martin Liska <mliska@suse.cz>
24951 * config/i386/i386.c (ix86_option_override_internal):
24952 Add "native" as a possible value for -march and -mtune.
24954 2018-02-22 Jakub Jelinek <jakub@redhat.com>
24957 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
24958 to all type variants.
24960 PR tree-optimization/84503
24961 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
24962 width as info->bitpos + info->bitsize - start.
24963 (merged_store_group::merge_overlapping): Simplify width computation.
24964 (check_no_overlap): New function.
24965 (imm_store_chain_info::try_coalesce_bswap): Compute expected
24966 start + width and last_order of the group, fail if check_no_overlap
24968 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
24969 to group if check_no_overlap fails.
24971 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
24973 * config/rs6000/altivec.md: Delete contraint arguments to
24974 define_expand, define_split, and define_peephole2, and in
24975 define_insn_and_split if always unused.
24976 * config/rs6000/darwin.md: Ditto.
24977 * config/rs6000/dfp.md: Ditto.
24978 * config/rs6000/rs6000.md: Ditto.
24979 * config/rs6000/sync.md: Ditto.
24980 * config/rs6000/vector.md: Ditto.
24981 * config/rs6000/vsx.md: Ditto.
24983 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
24985 * config/rs6000/altivec.md: Write output control strings as braced
24986 blocks instead of double-quoted strings.
24987 * config/rs6000/darwin.md: Ditto.
24988 * config/rs6000/rs6000.md: Ditto.
24989 * config/rs6000/vector.md: Ditto.
24990 * config/rs6000/vsx.md: Ditto.
24992 2018-02-21 Jason Merrill <jason@redhat.com>
24994 PR c++/84314 - ICE with templates and fastcall attribute.
24995 * attribs.c (build_type_attribute_qual_variant): Remove assert.
24997 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
24999 * ipa-cp.c (determine_versionability): Fix comment typos.
25001 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
25004 * ipa-cp.c (determine_versionability): Do not version functions caling
25007 2018-02-21 Martin Liska <mliska@suse.cz>
25010 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
25011 Add "native" as a possible value.
25012 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
25013 the macro when native cpu detection is available.
25015 2018-02-21 Martin Liska <mliska@suse.cz>
25018 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
25019 Add "native" as a possible value.
25020 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
25021 when native cpu detection is available.
25023 2018-02-21 Jakub Jelinek <jakub@redhat.com>
25024 Martin Sebor <msebor@redhat.com>
25026 PR tree-optimization/84478
25027 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
25029 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
25030 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
25031 support which is conservatively correct, for 2 only stay conservative
25032 for maxlen. Formatting and comment capitalization fixes. Add STRICT
25033 argument to the 2 argument get_range_strlen, adjust 6 arg
25034 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
25036 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
25037 (gimple_fold_builtin_strlen): Pass true as last argument to
25040 2018-02-20 Martin Sebor <msebor@redhat.com>
25042 PR middle-end/84095
25043 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
25044 (builtin_memref::set_base_and_offset): Same. Handle inner references.
25045 (builtin_memref::builtin_memref): Factor out parts into
25046 set_base_and_offset and call it.
25048 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
25050 PR middle-end/84406
25051 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
25052 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
25053 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
25054 search at the associated MODE_INT.
25056 2018-02-20 Jeff Law <law@redhat.com>
25058 PR middle-end/82123
25059 PR tree-optimization/81592
25060 PR middle-end/79257
25061 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
25062 for range data rather than using global data.
25063 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
25064 range data rather than using global data.
25065 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
25066 pass it to children as needed.
25067 (struct directive::fmtresult): Similarly.
25068 (struct directive::set_width): Similarly.
25069 (struct directive::set_precision): Similarly.
25070 (format_integer, format_directive, parse_directive): Similarly.
25071 (format_none): Accept unnamed vr_values parameter.
25072 (format_percent, format_floating, format_character): Similarly.
25073 (format_string, format_plain): Similarly.
25074 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
25075 the EVRP range analyzer for range data rather than using global data.
25076 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
25077 gimple-ssa-evrp-analyze.h
25078 (class sprintf_dom_walker): Add after_dom_children member function.
25079 Add evrp_range_analyzer member.
25080 (sprintf_dom_walker::before_dom_children): Call into the EVRP
25081 range analyzer as needed.
25082 (sprintf_dom_walker::after_dom_children): New member function.
25083 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
25085 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
25086 (evrp_range_analyzer::pop_to_marker): Likewise.
25088 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
25090 PR tree-optimization/84419
25091 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
25092 with the required type if its current type is compatible but
25095 2018-02-20 Jakub Jelinek <jakub@redhat.com>
25097 PR middle-end/82004
25098 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
25099 after vectorization.
25101 2018-02-20 Martin Liska <mliska@suse.cz>
25104 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
25105 possible values if we don't have a hint.
25107 2018-02-20 Martin Liska <mliska@suse.cz>
25111 * final.c (shorten_branches): Build align_tab array with one
25113 * opts.c (finish_options): Add alignment option limit check.
25114 (MAX_CODE_ALIGN): Likewise.
25115 (MAX_CODE_ALIGN_VALUE): Likewise.
25116 * doc/invoke.texi: Document maximum allowed option value for
25117 all -falign-* options.
25119 2018-02-19 Jakub Jelinek <jakub@redhat.com>
25122 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
25123 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
25124 * var-tracking.c (emit_note_insn_var_location): Remove all references
25125 to NOTE_INSN_CALL_ARG_LOCATION.
25126 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
25127 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
25128 Use copy_rtx_if_shared.
25129 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
25130 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
25131 (dwarf2out_var_location): Remove handling of
25132 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
25134 * final.c (final_scan_insn): Remove all references to
25135 NOTE_INSN_CALL_ARG_LOCATION.
25136 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
25137 before dumping final insns.
25138 * except.c (emit_note_eh_region_end): Remove all references to
25139 NOTE_INSN_CALL_ARG_LOCATION.
25140 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
25141 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
25142 * config/arc/arc.c (hwloop_optimize): Likewise.
25143 * config/arm/arm.c (create_fix_barrier): Likewise.
25144 * config/s390/s390.c (s390_chunkify_start): Likewise.
25145 * config/sh/sh.c (find_barrier): Likewise.
25146 * config/i386/i386.c (rest_of_insert_endbranch,
25147 ix86_seh_fixup_eh_fallthru): Likewise.
25148 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
25149 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
25150 * config/frv/frv.c (frv_function_prologue): Likewise.
25151 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
25153 (note_outside_basic_block_p): Remove all references to
25154 NOTE_INSN_CALL_ARG_LOCATION.
25155 * gengtype.c (adjust_field_rtx_def): Likewise.
25156 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
25158 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
25159 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
25162 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
25165 PR tree-optimization/84452
25166 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
25167 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
25170 2018-02-19 Martin Liska <mliska@suse.cz>
25173 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
25175 2018-02-19 Martin Liska <mliska@suse.cz>
25176 Richard Sandiford <richard.sandiford@linaro.org>
25178 PR tree-optimization/82491
25179 * gimple-fold.c (get_base_constructor): Make earlier bail out
25182 2018-02-19 Carl Love <cel@us.ibm.com>
25184 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
25185 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
25187 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
25188 P8V_BUILTIN_VEC_NEG.
25190 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
25192 * config/rl78/rl78.md (movdf): New define expand.
25194 2018-02-19 Martin Liska <mliska@suse.cz>
25197 * doc/invoke.texi: Fix typo.
25198 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
25200 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
25202 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
25203 handle rs6000_single_float and rs6000_double_float specially for
25206 2018-02-16 Jeff Law <law@redhat.com>
25208 * config/rx/rx.c (add_pop_cfi_notes): New function.;
25209 (pop_regs): Use it.
25211 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25214 * ipa-inline.c (inline_small_functions): Fix a typo.
25216 2018-02-16 Nathan Sidwell <nathan@acm.org>
25218 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
25220 2018-02-16 Carl Love <cel@us.ibm.com>
25222 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
25223 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
25224 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
25225 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
25226 expansion to P8V_BUILTIN_VEC_FLOAT2.
25228 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
25230 PR rtl-optimization/70023
25231 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
25232 src_regno into account.
25234 2018-02-16 Carl Love <cel@us.ibm.com>
25236 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
25237 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
25238 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
25239 * config/rs6000/rs6000.c: Remove case statements for
25240 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
25241 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
25242 and P9V_BUILTIN_VEC_VINSERT4B.
25243 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
25244 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
25245 * config/rs6000/vsx.md:
25246 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
25249 2018-02-16 Carl Love <cel@us.ibm.com>
25251 * config/rs6000/altivec.h: Add builtin names vec_extract4b
25253 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
25255 * config/rs6000/rs6000-c.c: Add the definitions for
25256 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
25257 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
25258 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
25259 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
25260 definition for insert4b and define insn *insert3b_internal.
25261 * doc/extend.texi: Add documentation for vec_extract4b.
25263 2018-02-16 Nathan Sidwell <nathan@acm.org>
25265 * doc/extend.texi (Backwards Compatibility): Mention friend
25266 injection. Note for-scope is deprecated.
25267 * doc/invoke.texi (-ffriend-injection): Deprecate.
25269 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
25271 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
25272 that moved to I2, also allow destinations that are a paradoxical
25273 subreg (instead of a normal reg).
25275 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
25278 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
25281 2018-02-16 Richard Biener <rguenther@suse.de>
25283 PR tree-optimization/84037
25284 PR tree-optimization/84016
25286 * config/i386/i386.c (ix86_builtin_vectorization_cost):
25287 Adjust vec_construct for the fact we need additional higher latency
25288 128bit inserts for AVX256 and AVX512 vector builds.
25289 (ix86_add_stmt_cost): Scale vector construction cost for
25292 2018-02-16 Richard Biener <rguenther@suse.de>
25294 PR tree-optimization/84417
25295 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
25296 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
25297 (non_rewritable_lvalue_p): Likewise, use poly-ints.
25299 2018-02-16 Martin Liska <mliska@suse.cz>
25302 * internal-fn.def (ASAN_CHECK): Set proper flags.
25303 (ASAN_MARK): Likewise.
25305 2018-02-16 Julia Koval <julia.koval@intel.com>
25307 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
25308 from PTA_CANNONLAKE.
25310 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25313 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
25314 Use ++iter rather than iter++ for std::list iterators.
25315 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
25316 defer deleting them until all nodes in the forest are processed. Do
25317 free even leaf nodes. Change to_process into auto_vec.
25320 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
25321 * vec.h (vec_default_construct): Use memset instead of placement new
25322 if BROKEN_VALUE_INITIALIZATION is defined.
25323 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
25324 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
25327 PR rtl-optimization/83723
25328 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
25329 * lra.c (lra_substitute_pseudo): Likewise. If true, use
25330 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
25332 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
25334 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
25336 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
25338 PR rtl-optimization/81443
25339 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
25340 from inner REGs to paradoxical SUBREGs.
25342 2018-02-16 Richard Biener <rguenther@suse.de>
25344 PR tree-optimization/84399
25345 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25346 For operands we can analyze at their definition make sure we can
25347 analyze them at each use as well.
25349 2018-02-16 Richard Biener <rguenther@suse.de>
25351 PR tree-optimization/84190
25352 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
25353 volatile accesses if the decl isn't volatile.
25355 2018-02-15 Jason Merrill <jason@redhat.com>
25357 PR c++/84314 - ICE with templates and fastcall attribute.
25358 * attribs.c (build_type_attribute_qual_variant): Don't clobber
25359 TYPE_CANONICAL on an existing type.
25361 2018-02-15 Jakub Jelinek <jakub@redhat.com>
25363 PR tree-optimization/84383
25364 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
25365 dstoff nor call operand_equal_p if dstbase is NULL.
25367 PR tree-optimization/84334
25368 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
25369 also a CONSTANT_CLASS_P, punt.
25371 2018-02-14 Jim Wilson <jimw@sifive.com>
25373 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
25374 first SMALL_OPERAND check. New local min_second_step. Move assert
25375 to where locals are set. Add TARGET_RVC support.
25376 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
25378 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
25380 * doc/invoke.texi: Correct -Wformat-overflow code sample.
25382 2018-02-14 Martin Sebor <msebor@redhat.com>
25384 PR tree-optimization/83698
25385 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
25386 arrays constrain the offset range to their bounds.
25387 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
25388 (builtin_access::overlap): Avoid setting the size of overlap if it's
25390 (maybe_diag_overlap): Also consider arrays when deciding what values
25391 of offsets to include in diagnostics.
25393 2018-02-14 Martin Sebor <msebor@redhat.com>
25396 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
25397 that correspond to the kind of a declaration.
25399 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
25402 * config/pa/pa.md: Load address of PIC label using the linkage table
25403 if the label is nonlocal.
25405 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
25407 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
25408 warning message if user requests -maltivec=be.
25409 * doc/invoke.texi: Document deprecation of -maltivec=be.
25411 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
25414 * config/rs6000/rs6000-c.c: Update definitions for
25415 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
25416 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
25418 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25421 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
25422 add _get_ssp intrinsics. Remove argument from
25423 __builtin_ia32_rdssp[d|q].
25424 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
25425 * config/i386/i386-builtin.def: Remove argument from
25426 __builtin_ia32_rdssp[d|q].
25427 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
25428 ix86_expand_special_args_builtin for _rdssp[d|q].
25429 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
25430 Clear register before usage.
25431 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
25432 Add documentation for new _get_ssp and _inc_ssp intrinsics.
25434 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
25436 PR tree-optimization/84357
25437 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
25438 operand 1 of an ARRAY_REF too.
25440 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
25443 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
25444 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25446 (set_of_reg): New struct.
25447 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
25448 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
25449 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25451 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
25452 Split into bitclr, bitset, bitinvert patterns if appropriate.
25453 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
25454 use rx_fuse_in_memory_bitop.
25455 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
25456 to named insn, correct maximum insn length.
25458 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
25461 * machmode.def: Define a complex mode for PARTIAL_INT.
25462 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
25464 * doc/rtl.texi: Document CSPImode.
25465 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
25467 (msp430_hard_regno_nregs_with_padding): Likewise.
25469 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
25472 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
25474 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
25476 PR rtl-optimization/84169
25477 * combine.c (try_combine): New variable split_i2i3. Set it to true if
25478 we generated a parallel as new i3 and we split that to new i2 and i3
25479 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
25480 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
25481 those to i2, not i1. Partially rewrite this scan code.
25483 2018-02-13 Jakub Jelinek <jakub@redhat.com>
25486 * stor-layout.c (place_field): For variable length fields, adjust
25487 offset_align afterwards not just based on the field's alignment,
25488 but also on the size.
25490 PR middle-end/84309
25491 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
25492 of exps and logs in the use_exp2 case.
25494 2018-02-13 Jeff Law <law@redhat.com>
25496 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
25497 entry for "vector".
25499 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
25502 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
25506 * common.opt (gas-loc-support, gas-locview-support): New.
25507 (ginline-points, ginternal-reset-location-views): New.
25508 * doc/invoke.texi: Document them. Use @itemx where intended.
25509 (gvariable-location-views): Adjust.
25510 * target.def (reset_location_view): New.
25511 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
25512 (TARGET_RESET_LOCATION_VIEW): New.
25513 * doc/tm.texi: Rebuilt.
25514 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
25515 (dwarf2out_default_as_locview_support): New.
25516 (output_asm_line_debug_info): Use option variables.
25517 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
25518 (output_loc_list): Likewise.
25519 (add_high_low_attributes): Check option variables.
25520 Don't output entry view attribute in strict mode.
25521 (gen_inlined_subroutine_die): Check option variables.
25522 (dwarf2out_inline_entry): Likewise.
25523 (init_sections_and_labels): Likewise.
25524 (dwarf2out_early_finish): Likewise.
25525 (maybe_reset_location_view): New, from...
25526 (dwarf2out_var_location): ... here. Call it.
25527 * debug.h (dwarf2out_default_as_loc_support): Declare.
25528 (dwarf2out_default_as_locview_support): Declare.
25529 * hooks.c (hook_int_rtx_insn_0): New.
25530 * hooks.h (hook_int_rtx_insn_0): Declare.
25531 * toplev.c (process_options): Take -gas-loc-support and
25532 -gas-locview-support from dwarf2out. Enable
25533 -gvariable-location-views by default only with locview
25534 assembler support. Enable -ginternal-reset-location-views by
25535 default only if the target defines the corresponding hook.
25536 Enable -ginline-points by default if location views are
25537 enabled; force it disabled if statement frontiers are
25539 * tree-inline.c (expand_call_inline): Check option variables.
25540 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
25542 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
25544 PR tree-optimization/84321
25545 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
25546 handling. Also check whether the anti-range contains any values
25547 that satisfy the mask; switch to a VR_RANGE if not.
25549 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
25552 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
25554 2018-02-13 Martin Jambor <mjambor@suse.cz>
25557 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
25558 of call statements, also set location of a load to a temporary.
25560 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
25562 * config/rl78/rl78.c (add_vector_labels): New function.
25563 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
25564 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
25565 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
25566 which checks that no arguments are passed.
25567 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
25568 * doc/extend.texi: Documentation for the new attribute.
25570 2018-02-13 Andreas Schwab <schwab@suse.de>
25572 * config/riscv/linux.h (CPP_SPEC): Define.
25574 2018-02-13 Jakub Jelinek <jakub@redhat.com>
25577 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
25578 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
25579 OPTION_MASK_ISA_AES as first argument to def_builtin_const
25580 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
25581 instead of OPTION_MASK_ISA_PCLMUL as first argument to
25582 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
25583 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
25584 temporarily for AES and PCLMUL builtins.
25586 PR tree-optimization/84339
25587 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
25588 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
25591 PR middle-end/84309
25592 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
25593 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
25594 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
25596 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
25598 * omp-simd-clone.h: New file.
25599 * omp-simd-clone.c: Include omp-simd-clone.h.
25600 (expand_simd_clones): No longer static.
25601 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
25602 cgraph.h and omp-simd-clone.h.
25603 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
25604 (vect_recog_widen_shift_pattern): Formatting fix.
25605 (vect_pattern_recog_1): Don't check optab for calls.
25608 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
25609 operands[2] into a REG before using gen_lowpart on it.
25611 2018-02-12 Jeff Law <law@redhat.com>
25614 * config/sh/sh.c (find_barrier): Consider a sibling call
25617 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
25618 successfully back substituting a reg.
25620 2018-02-12 Richard Biener <rguenther@suse.de>
25622 PR tree-optimization/84037
25623 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
25624 parameter, move visited init to caller.
25625 (vect_slp_analyze_operations): Separate cost from validity
25626 check, initialize visited once for all instances.
25627 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
25629 * tree-vect-stmts.c (vect_model_simple_cost): Make early
25631 (vect_model_promotion_demotion_cost): Likewise.
25632 (vectorizable_bswap): Guard cost modeling with !slp_node
25633 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
25635 (vectorizable_call): Likewise.
25636 (vectorizable_conversion): Likewise.
25637 (vectorizable_assignment): Likewise.
25638 (vectorizable_shift): Likewise.
25639 (vectorizable_operation): Likewise.
25640 (vectorizable_store): Likewise.
25641 (vectorizable_load): Likewise.
25642 (vectorizable_condition): Likewise.
25643 (vectorizable_comparison): Likewise.
25645 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
25648 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
25649 (ASAN_MARK): Fix fnspec to account for return value, change pointer
25650 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
25652 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
25654 PR middle-end/83665
25655 * params.def (inline-min-speedup): Increase from 8 to 15.
25656 (max-inline-insns-auto): Decrease from 40 to 30.
25657 * ipa-split.c (consider_split): Add some buffer for function to
25658 be considered inlining candidate.
25659 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
25662 2018-02-12 Richard Biener <rguenther@suse.de>
25664 PR tree-optimization/84037
25665 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
25666 matched stmts if we cannot swap the non-matched ones.
25668 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
25670 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
25671 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
25672 _mm_maskz_scalef_round_ss): New intrinsics.
25673 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
25674 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
25675 __builtin_ia32_scalefss_round): Remove.
25676 (__builtin_ia32_scalefsd_mask_round,
25677 __builtin_ia32_scalefss_mask_round): New intrinsics.
25678 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
25679 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
25680 ((match_operand:VF_128 2 "<round_nimm_predicate>"
25681 "<round_constraint>")): Changed to ...
25682 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
25683 "<round_scalar_constraint>")): ... this.
25684 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
25685 %0, %1, %2<round_op3>}"): Changed to ...
25686 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
25687 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
25688 %2<round_scalar_mask_op3>}"): ... this.
25689 * config/i386/subst.md (round_scalar_nimm_predicate): New.
25691 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
25693 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
25694 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
25695 (_mm_maskz_sqrt_round_ss): New intrinsics.
25696 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
25697 (__builtin_ia32_sqrtsd_mask_round)
25698 (__builtin_ia32_sqrtss_mask_round): New builtins.
25699 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
25700 (__builtin_ia32_sqrtss_round): Remove.
25701 (__builtin_ia32_sqrtsd_mask_round)
25702 (__builtin_ia32_sqrtss_mask_round): New builtins.
25703 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
25704 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
25705 ((match_operand:VF_128 1 "vector_operand"
25706 "xBm,<round_constraint>")): Changed to ...
25707 ((match_operand:VF_128 1 "vector_operand"
25708 "xBm,<round_scalar_constraint>")): ... this.
25709 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
25710 %0, %2, %<iptr>1<round_op3>}): Changed to ...
25711 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
25712 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
25713 %<iptr>1<round_scalar_mask_op3>}): ... this.
25714 ((set_attr "prefix" "<round_prefix>")): Changed to ...
25715 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
25717 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
25720 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
25721 Cast vec_cmpeq result to correct type.
25722 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
25723 Cast vec_cmpgt result to correct type.
25725 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
25727 * final.c (final_scan_insn_1): Renamed from...
25728 (final_scan_insn): ... this. New wrapper, to recover
25729 seen from the outermost call in recursive ones.
25730 * config/sparc/sparc.c (output_return): Drop seen from call.
25731 (output_sibcall): Likewise.
25732 * config/visium/visium.c (output_branch): Likewise.
25734 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
25736 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
25739 2018-02-10 Alan Modra <amodra@gmail.com>
25742 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
25743 Specify LR as an input.
25745 2018-02-10 Jakub Jelinek <jakub@redhat.com>
25748 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
25749 remove_member_access_dummy_vars): New functions.
25750 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
25751 lower_omp_1, execute_lower_omp): Use them.
25753 PR rtl-optimization/84308
25754 * shrink-wrap.c (spread_components): Release todo vector.
25756 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
25758 PR rtl-optimization/57193
25759 * ira-color.c (struct allocno_color_data): Add member
25760 conflict_allocno_hard_prefs.
25761 (update_conflict_allocno_hard_prefs): New.
25762 (bucket_allocno_compare_func): Add a preference based on
25763 conflict_allocno_hard_prefs.
25764 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
25765 (color_allocnos): Remove a dead code. Initiate
25766 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
25768 2018-02-09 Jakub Jelinek <jakub@redhat.com>
25771 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
25772 constraint from =wa to wa. Avoid a subreg on the output operand,
25773 instead use a pseudo and subreg it in a move.
25774 (p9_xxbrd_<mode>): Changed to ...
25775 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
25776 (p9_xxbrd_v2df): New expander.
25777 (p9_xxbrw_<mode>): Changed to ...
25778 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
25779 (p9_xxbrw_v4sf): New expander.
25781 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25783 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
25785 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
25788 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
25789 multiply in 32-bit mode.
25790 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
25791 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
25794 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25796 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
25797 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
25798 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
25799 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
25801 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
25804 * dwarf2out.c (is_trivial_indirect_ref): New function.
25805 (dwarf2out_late_global_decl): Do not generate a location
25806 attribute for variables that have a non-trivial DECL_VALUE_EXPR
25807 and that are not defined in the current unit.
25809 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
25811 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
25812 instead of a libcall for UNORDERED.
25814 2018-02-09 Tamar Christina <tamar.christina@arm.com>
25817 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
25818 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
25820 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25823 * config/s390/s390.c (s390_set_current_function): Invoke
25824 s390_indirect_branch_settings also if fndecl didn't change.
25826 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
25828 * config/rs6000/rs6000.md (blockage): Set length to zero.
25830 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
25832 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
25834 2018-02-09 Jakub Jelinek <jakub@redhat.com>
25837 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
25838 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
25842 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
25843 PARALLEL incoming that failed vt_get_decl_and_offset check.
25845 PR middle-end/84237
25846 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
25847 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
25849 (get_variable_section): For decls in named .bss* sections pass true as
25850 second argument to bss_initializer_p.
25852 2018-02-09 Marek Polacek <polacek@redhat.com>
25853 Jakub Jelinek <jakub@redhat.com>
25856 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
25857 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
25858 Sync some changes from cxx_fold_indirect_ref.
25860 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
25862 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
25864 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
25865 (BLOCK_INLINE_ENTRY_LABEL): New.
25866 (dwarf2out_var_location): Disregard inline entry markers.
25867 (inline_entry_data): New struct.
25868 (inline_entry_data_hasher): New hashtable type.
25869 (inline_entry_data_hasher::hash): New.
25870 (inline_entry_data_hasher::equal): New.
25871 (inline_entry_data_table): New variable.
25872 (add_high_low_attributes): Add DW_AT_entry_pc and
25873 DW_AT_GNU_entry_view attributes if a pending entry is found
25874 in inline_entry_data_table. Add old entry_pc attribute only
25875 if debug nonbinding markers are disabled.
25876 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
25877 markers are enabled.
25878 (block_within_block_p, dwarf2out_inline_entry): New.
25879 (dwarf2out_finish): Check that no entries remained in
25880 inline_entry_data_table.
25881 * final.c (reemit_insn_block_notes): Handle inline entry notes.
25882 (final_scan_insn, notice_source_line): Likewise.
25883 (rest_of_clean_state): Skip inline entry markers.
25884 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
25886 * gimple.c (gimple_build_debug_inline_entry): New.
25887 * gimple.h (enum gimple_debug_subcode): Add
25888 GIMPLE_DEBUG_INLINE_ENTRY.
25889 (gimple_build_debug_inline_entry): Declare.
25890 (gimple_debug_inline_entry_p): New.
25891 (gimple_debug_nonbind_marker_p): Adjust.
25892 * insn-notes.def (INLINE_ENTRY): New.
25893 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
25894 inline entry marker notes.
25895 (print_insn): Likewise.
25896 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
25897 (INSN_DEBUG_MARKER_KIND): Likewise.
25898 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
25899 * tree-inline.c (expand_call_inline): Build and insert
25900 debug_inline_entry stmt.
25901 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
25902 inline entry blocks early, if nonbind markers are enabled.
25903 (dump_scope_block): Dump fragment info.
25904 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
25905 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
25906 (gimple_build_debug_inline_entry): New.
25907 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
25908 Enable/disable inline entry points too.
25909 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
25910 (DEBUG_INSN): Describe inline entry markers.
25912 * common.opt (gvariable-location-views): New.
25913 (gvariable-location-views=incompat5): New.
25914 * config.in: Rebuilt.
25915 * configure: Rebuilt.
25916 * configure.ac: Test assembler for view support.
25917 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
25918 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
25919 * dwarf2out.c (var_loc_view): New typedef.
25920 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
25921 (dwarf2out_locviews_in_attribute): New.
25922 (dwarf2out_locviews_in_loclist): New.
25923 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
25924 (enum dw_line_info_opcode): Add LI_adv_address.
25925 (struct dw_line_info_table): Add view.
25926 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
25927 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
25928 (zero_view_p): New variable.
25929 (ZERO_VIEW_P): New macro.
25930 (output_asm_line_debug_info): New.
25931 (struct var_loc_node): Add view.
25932 (add_AT_view_list, AT_loc_list): New.
25933 (add_var_loc_to_decl): Add view param. Test it against last.
25934 (new_loc_list): Add view params. Record them.
25935 (AT_loc_list_ptr): Handle loc and view lists.
25936 (view_list_to_loc_list_val_node): New.
25937 (print_dw_val): Handle dw_val_class_view_list.
25938 (size_of_die): Likewise.
25939 (value_format): Likewise.
25940 (loc_list_has_views): New.
25941 (gen_llsym): Set vl_symbol too.
25942 (maybe_gen_llsym, skip_loc_list_entry): New.
25943 (dwarf2out_maybe_output_loclist_view_pair): New.
25944 (output_loc_list): Output view list or entries too.
25945 (output_view_list_offset): New.
25946 (output_die): Handle dw_val_class_view_list.
25947 (output_dwarf_version): New.
25948 (output_compilation_unit_header): Use it.
25949 (output_skeleton_debug_sections): Likewise.
25950 (output_rnglists, output_line_info): Likewise.
25951 (output_pubnames, output_aranges): Update version comments.
25952 (output_one_line_info_table): Output view numbers in asm comments.
25953 (dw_loc_list): Determine current endview, pass it to new_loc_list.
25954 Call maybe_gen_llsym.
25955 (loc_list_from_tree_1): Adjust.
25956 (add_AT_location_description): Create view list attribute if
25957 needed, check it's absent otherwise.
25958 (convert_cfa_to_fb_loc_list): Adjust.
25959 (maybe_emit_file): Call output_asm_line_debug_info for test.
25960 (dwarf2out_var_location): Reset views as needed. Precompute
25961 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
25962 attribute. Set view.
25963 (new_line_info_table): Reset next view.
25964 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
25965 (dwarf2out_source_line): Likewise. Output view resets and labels to
25966 the assembler, or select appropriate line info opcodes.
25967 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
25968 (optimize_string_length): Catch it. Adjust.
25969 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
25970 dw_val_class_view_list, and remove it if no longer needed.
25971 (hash_loc_list): Hash view numbers.
25972 (loc_list_hasher::equal): Compare them.
25973 (optimize_location_lists): Check whether a view list symbol is
25974 needed, and whether the locview attribute is present, and
25975 whether they match. Remove the locview attribute if no longer
25977 (index_location_lists): Call skip_loc_list_entry for test.
25978 (dwarf2out_finish): Call output_asm_line_debug_info for test.
25979 Use output_dwarf_version.
25980 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
25981 (struct dw_val_node): Add val_view_list.
25982 * final.c (SEEN_NEXT_VIEW): New.
25983 (set_next_view_needed): New.
25984 (clear_next_view_needed): New.
25985 (maybe_output_next_view): New.
25986 (final_start_function): Rename to...
25987 (final_start_function_1): ... this. Take pointer to FIRST,
25988 add SEEN parameter. Emit param bindings in the initial view.
25989 (final_start_function): Reintroduce SEEN-less interface.
25990 (final): Rename to...
25991 (final_1): ... this. Take SEEN parameter. Output final pending
25992 next view at the end.
25993 (final): Reintroduce seen-less interface.
25994 (final_scan_insn): Output pending next view before switching
25995 sections or ending a block. Mark the next view as needed when
25996 outputting variable locations. Notify debug backend of section
25997 changes, and of location view changes.
25998 (rest_of_handle_final): Adjust.
25999 * toplev.c (process_options): Autodetect value for debug variable
26000 location views option. Warn on incompat5 without -gdwarf-5.
26001 * doc/invoke.texi (gvariable-location-views): New.
26002 (gvariable-location-views=incompat5): New.
26003 (gno-variable-location-views): New.
26005 2018-02-08 David Malcolm <dmalcolm@redhat.com>
26007 PR tree-optimization/84136
26008 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
26009 that the result of find_edge is non-NULL.
26011 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
26014 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
26015 storing integer register in SImode. Fix cost of 256 and 512
26016 byte aligned SSE register store.
26018 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
26020 * config/i386/i386.c (ix86_multiplication_cost): Fix
26021 multiplication cost for TARGET_AVX512DQ.
26023 2018-02-08 Marek Polacek <polacek@redhat.com>
26025 PR tree-optimization/84238
26026 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
26029 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26031 PR tree-optimization/84265
26032 * tree-vect-stmts.c (vectorizable_store): Don't treat
26033 VMAT_CONTIGUOUS accesses as grouped.
26034 (vectorizable_load): Likewise.
26036 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26038 PR tree-optimization/81635
26039 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
26040 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
26041 (test_round_for_mask): New functions.
26042 (wide_int_cc_tests): Call test_round_for_mask.
26043 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
26044 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
26045 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
26046 range returned by get_range_info.
26048 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
26051 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
26052 * symtab.c: Include builtins.h
26053 (symtab_node::output_to_lto_symbol_table_p): Move here
26054 from lto-streamer-out.c:output_symbol_p.
26055 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
26056 (output_symbol_p): Move all logic to symtab.c
26057 (produce_symtab): Update.
26059 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26061 * config/s390/s390-opts.h (enum indirect_branch): Define.
26062 * config/s390/s390-protos.h (s390_return_addr_from_memory)
26063 (s390_indirect_branch_via_thunk)
26064 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
26065 (enum s390_indirect_branch_type): Define.
26066 * config/s390/s390.c (struct s390_frame_layout, struct
26067 machine_function): Remove.
26068 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
26069 (indirect_branch_table_label_no, indirect_branch_table_name):
26071 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
26072 (enum s390_indirect_branch_option): Define.
26073 (s390_return_addr_from_memory): New function.
26074 (s390_handle_string_attribute): New function.
26075 (s390_attribute_table): Add new attribute handler.
26076 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
26077 (s390_indirect_branch_via_thunk): New function.
26078 (s390_indirect_branch_via_inline_thunk): New function.
26079 (s390_function_ok_for_sibcall): When jumping via thunk disallow
26080 sibling call optimization for non z10 compiles.
26081 (s390_emit_call): Force indirect branch target to be a single
26082 register. Add r1 clobber for non-z10 compiles.
26083 (s390_emit_epilogue): Emit return jump via return_use expander.
26084 (s390_reorg): Handle JUMP_INSNs as execute targets.
26085 (s390_option_override_internal): Perform validity checks for the
26086 new command line options.
26087 (s390_indirect_branch_attrvalue): New function.
26088 (s390_indirect_branch_settings): New function.
26089 (s390_set_current_function): Invoke s390_indirect_branch_settings.
26090 (s390_output_indirect_thunk_function): New function.
26091 (s390_code_end): Implement target hook.
26092 (s390_case_values_threshold): Implement target hook.
26093 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
26095 * config/s390/s390.h (struct s390_frame_layout)
26096 (struct machine_function): Move here from s390.c.
26097 (TARGET_INDIRECT_BRANCH_NOBP_RET)
26098 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
26099 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
26100 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
26101 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
26102 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
26103 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
26104 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
26105 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
26106 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
26107 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
26108 (mnemonic attribute): Add values which aren't recognized
26110 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
26111 pattern for branch conversion. Fix mnemonic attribute.
26112 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
26113 indirect branch via thunk if requested.
26114 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
26115 ("*indirect_jump"): Disable for branch conversion using out of
26117 ("indirect_jump_via_thunk<mode>_z10")
26118 ("indirect_jump_via_thunk<mode>")
26119 ("indirect_jump_via_inlinethunk<mode>_z10")
26120 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
26121 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
26122 ("casesi_jump_via_inlinethunk<mode>_z10")
26123 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
26124 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
26125 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
26126 ("*indirect2_jump"): Disable for branch conversion.
26127 ("casesi_jump"): Turn into expander and expand patterns for branch
26129 ("return_use"): New expander.
26130 ("*return"): Emit return via thunk and rename it to ...
26131 ("*return<mode>"): ... this one.
26132 * config/s390/s390.opt: Add new options and and enum for the
26135 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26137 * lra-constraints.c (match_reload): Unconditionally use
26138 gen_lowpart_SUBREG, rather than selecting between that
26139 and equivalent gen_rtx_SUBREG code.
26141 2018-02-08 Richard Biener <rguenther@suse.de>
26143 PR tree-optimization/84233
26144 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
26145 changed flag instead of boguously re-using phi_inserted.
26147 2018-02-08 Martin Jambor <mjambor@suse.cz>
26149 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
26150 static local variables.
26152 2018-02-08 Richard Biener <rguenther@suse.de>
26154 PR tree-optimization/84278
26155 * tree-vect-stmts.c (vectorizable_store): When looking for
26156 smaller vector types to perform grouped strided loads/stores
26157 make sure the mode is supported by the target.
26158 (vectorizable_load): Likewise.
26160 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26162 * config/aarch64/aarch64.c (aarch64_components_for_bb):
26163 Increase LDP/STP opportunities by adding adjacent callee-saves.
26165 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26167 PR rtl-optimization/84068
26168 PR rtl-optimization/83459
26169 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
26171 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
26173 PR tree-optimization/84224
26174 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
26175 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
26176 non-zero arguments.
26178 2018-02-07 Iain Sandoe <iain@codesourcery.com>
26181 * config/rs6000/altivec.md (*restore_world): Remove LR use.
26182 * config/rs6000/predicates.md (restore_world_operation): Adjust op
26183 count, remove one USE.
26185 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
26187 * doc/install.texi (Configuration): Document the
26188 --with-long-double-format={ibm,ieee} PowerPC configuration
26192 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
26193 Convert from define_expand to be define_insn_and_split. Rework
26194 float/double/_Float128 conversions to QI/HI/SImode to work with
26195 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
26196 conversions to QI/HImode types did a store and then a load to
26197 truncate the value. For conversions to VSX registers, don't split
26198 the insn, instead emit the code directly. Use the code iterator
26199 any_fix to combine signed and unsigned conversions.
26200 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
26201 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
26202 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26203 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
26204 (fix_<mode>di2_hw): Likewise.
26205 (fixuns_<mode>di2_hw): Likewise.
26206 (fix_<mode>si2_hw): Likewise.
26207 (fixuns_<mode>si2_hw): Likewise.
26208 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
26209 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26210 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
26211 fix<uns>_trunc<SFDF:mode>si2_p8.
26212 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
26213 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
26214 (fix<uns>_<mode>_mem): Likewise.
26215 (fctiw<u>z_<mode>_mem): Likewise.
26216 (fix<uns>_<mode>_mem): Likewise.
26217 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
26218 the register allocator from doing a direct move to the GPRs to do
26219 a store, and instead use the ISA 3.0 store byte/half-word from
26220 vector register instruction. For IEEE 128-bit floating point,
26221 also optimize stores of 32-bit ints.
26222 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
26224 2018-02-07 Alan Hayward <alan.hayward@arm.com>
26226 * genextract.c (push_pathstr_operand): New function to support
26228 (walk_rtx): Call push_pathstr_operand.
26229 (print_path): Support [a-zA-Z].
26231 2018-02-07 Richard Biener <rguenther@suse.de>
26233 PR tree-optimization/84037
26234 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
26235 (cse_and_gimplify_to_preheader): Declare.
26236 (vect_get_place_in_interleaving_chain): Likewise.
26237 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26239 (_loop_vec_info::~_loop_vec_info): Delete it.
26240 (cse_and_gimplify_to_preheader): New function.
26241 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
26242 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
26243 (vectorizable_load): Likewise. For grouped stores always base
26244 the IV on the first element.
26245 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
26246 condition before gimplifying.
26248 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26250 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
26251 *DIV_EXPR and *MOD_EXPR.
26253 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
26256 * config/i386/i386.c (ix86_option_override_internal): Mask out
26257 the CF_SET bit when checking -fcf-protection.
26259 2018-02-07 Tom de Vries <tom@codesourcery.com>
26262 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
26265 2018-02-07 Richard Biener <rguenther@suse.de>
26267 PR tree-optimization/84204
26268 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
26271 PR tree-optimization/84205
26272 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
26273 special-case isl_ast_op_zdiv_r.
26275 PR tree-optimization/84223
26276 * graphite-scop-detection.c (gather_bbs::before_dom_children):
26277 Only add conditions from within the region.
26278 (gather_bbs::after_dom_children): Adjust.
26280 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
26283 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
26284 * config/avr/avr.md: Only post-reload split REG-REG moves if
26285 either register is GENERAL_REG_P.
26287 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26289 PR tree-optimization/84235
26290 * tree-ssa-scopedtables.c
26291 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
26292 if the subtraction is performed in floating point type where NaNs are
26293 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
26294 build 1. Formatting fix.
26296 2018-02-06 Jakub Jelinek <jakub@redhat.com>
26299 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
26300 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
26301 and skip it regardless of bb boundaries. Use CALL_P macro,
26302 don't test INSN_P (insn) together with CALL_P or JUMP_P check
26303 unnecessarily, formatting fix.
26305 2018-02-06 Michael Collison <michael.collison@arm.com>
26307 * config/arm/thumb2.md:
26308 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
26309 (*thumb_mov_notscc): Ditto.
26311 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
26314 * config/rs6000/rs6000.md (su code attribute): Use "u" for
26315 unsigned_fix, not "s".
26317 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26319 * configure.ac (gcc_fn_eh_frame_ro): New function.
26320 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
26321 correct .eh_frame permissions.
26322 * configure: Regenerate.
26324 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
26326 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
26327 irrelevant options.
26329 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26331 * config/rs6000/rs6000.c (rs6000_option_override_internal):
26332 Display warning message for -mno-speculate-indirect-jumps.
26334 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
26336 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
26338 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
26340 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
26342 PR tree-optimization/84225
26343 * tree-eh.c (find_trapping_overflow): Only call
26344 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
26346 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26349 * config/i386/i386.c: Reimplement the check of possible options
26350 -mibt/-mshstk conbination. Change error messages.
26351 * doc/invoke.texi: Fix a typo: remove extra '='.
26353 2018-02-06 Marek Polacek <polacek@redhat.com>
26355 PR tree-optimization/84228
26356 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
26358 2018-02-06 Tamar Christina <tamar.christina@arm.com>
26361 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
26362 emitted arch directives.
26363 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
26364 __ARM_FEATURE_COPROC before changing architectures.
26366 2018-02-06 Richard Biener <rguenther@suse.de>
26368 * config/i386/i386.c (print_reg): Fix typo.
26369 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
26371 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
26373 * configure: Regenerate.
26375 2018-02-05 Martin Sebor <msebor@redhat.com>
26377 PR tree-optimization/83369
26378 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
26381 2018-02-05 Martin Liska <mliska@suse.cz>
26383 * doc/invoke.texi: Cherry-pick upstream r323995.
26385 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
26387 * ira.c (ira_init_register_move_cost): Adjust comment.
26389 2018-02-05 Martin Liska <mliska@suse.cz>
26391 PR gcov-profile/84137
26392 * doc/gcov.texi: Fix typo in documentation.
26394 2018-02-05 Martin Liska <mliska@suse.cz>
26396 PR gcov-profile/83879
26397 * doc/gcov.texi: Document necessity of --dynamic-list-data when
26398 using dlopen functionality.
26400 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
26402 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
26403 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
26404 _mm_maskz_range_ss, _mm_mask_range_round_ss,
26405 _mm_maskz_range_round_ss): New intrinsics.
26406 (__builtin_ia32_rangesd128_round)
26407 (__builtin_ia32_rangess128_round): Remove.
26408 (__builtin_ia32_rangesd128_mask_round,
26409 __builtin_ia32_rangess128_mask_round): New builtins.
26410 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
26411 __builtin_ia32_rangess128_round): Remove.
26412 (__builtin_ia32_rangesd128_mask_round,
26413 __builtin_ia32_rangess128_mask_round): New builtins.
26414 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
26415 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
26416 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
26417 "<round_saeonly_constraint>")): Changed to ...
26418 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
26419 "<round_saeonly_scalar_constraint>")): ... this.
26420 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
26421 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
26422 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
26423 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
26424 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
26426 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
26428 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
26430 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
26431 Remove all values except native, 8540 and 8548.
26433 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
26435 * config/i386/i386.c (ix86_output_function_return): Pass
26436 INVALID_REGNUM, instead of -1, as invalid register number to
26437 indirect_thunk_name and output_indirect_thunk.
26439 2018-02-02 Julia Koval <julia.koval@intel.com>
26441 * config.gcc: Add -march=icelake.
26442 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
26443 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
26444 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
26445 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
26446 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
26447 (processor_target_table): Add icelake.
26448 (ix86_option_override_internal): Handle new PTAs.
26449 (get_builtin_code_for_version): Handle icelake.
26450 (M_INTEL_COREI7_ICELAKE): New.
26451 (fold_builtin_cpu): Handle icelake.
26452 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
26453 * doc/invoke.texi: Add -march=icelake.
26455 2018-02-02 Julia Koval <julia.koval@intel.com>
26457 * config/i386/i386.c (ix86_option_override_internal): Change flags type
26458 to wide_int_bitmask.
26459 * wide-int-bitmask.h: New.
26461 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26464 * config/i386/i386.md: Replace Pmode with word_mode in
26465 builtin_setjmp_setup and builtin_longjmp to support x32.
26467 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
26471 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
26473 (rs6000_supported_cpu_names): New static variable.
26474 (linux_cpu_translation_table): Likewise.
26475 (elf_platform) <cpu>: Define new static variable and use it.
26476 Translate kernel AT_PLATFORM name to canonical name if needed.
26477 Error if platform name is unknown.
26479 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
26482 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
26484 2018-02-01 Jeff Law <law@redhat.com>
26487 * config/i386/i386.c (release_scratch_register_on_entry): Add new
26488 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
26489 the scratch if RELEASE_VIA_POP is false.
26490 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
26491 If we have to save a temporary register, decrement SIZE appropriately.
26492 Pass new arguments to release_scratch_register_on_entry.
26493 (ix86_adjust_stack_and_probe): Likewise.
26494 (ix86_emit_probe_stack_range): Pass new arguments to
26495 release_scratch_register_on_entry.
26497 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
26499 PR rtl-optimization/84157
26500 * combine.c (change_zero_ext): Use REG_P predicate in
26501 front of HARD_REGISTER_P predicate.
26503 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
26505 * config/avr/avr.c (avr_option_override): Move disabling of
26506 -fdelete-null-pointer-checks to...
26507 * common/config/avr/avr-common.c (avr_option_optimization_table):
26510 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26512 PR tree-optimization/81635
26513 * tree-data-ref.c (split_constant_offset_1): For types that
26514 wrap on overflow, try to use range info to prove that wrapping
26517 2018-02-01 Renlin Li <renlin.li@arm.com>
26520 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
26521 TAILCALL_ADDR_REGS.
26522 (aarch64_register_move_cost): Likewise.
26523 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
26524 TAILCALL_ADDR_REGS.
26525 (REG_CLASS_NAMES): Likewise.
26526 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
26527 TAILCALL_ADDR_REGS. Remove IP registers.
26528 * config/aarch64/aarch64.md (Ucs): Update register constraint.
26530 2018-02-01 Richard Biener <rguenther@suse.de>
26532 * domwalk.h (dom_walker::dom_walker): Add additional constructor
26533 for specifying RPO order and allow NULL for that.
26534 * domwalk.c (dom_walker::dom_walker): Likewise.
26535 (dom_walker::walk): Handle NULL RPO order.
26536 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
26538 (rewrite_update_dom_walker): Likewise.
26539 (mark_def_dom_walker): Likewise.
26541 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26543 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
26544 (aarch64_maybe_expand_sve_subreg_move): Declare.
26545 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
26546 * config/aarch64/predicates.md (aarch64_any_register_operand): New
26548 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
26549 that are semantically a reverse operation.
26550 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
26551 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
26552 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
26554 (aarch64_can_change_mode_class): For big-endian, forbid changes
26555 between two SVE modes if they have different element sizes.
26557 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26559 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
26560 the TImode handling for big-endian targets.
26562 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26564 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
26565 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
26567 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
26568 Remove BSWAP handing for big-endian targets and use the form of
26569 LD1RQ appropariate for the mode.
26571 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26573 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
26574 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
26575 duplicated element.
26577 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26580 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
26581 check for operands that need to go through aarch64_sve_reload_be.
26583 2018-02-01 Jakub Jelinek <jakub@redhat.com>
26585 PR tree-optimization/81661
26586 PR tree-optimization/84117
26587 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
26588 * tree-eh.c: Include gimplify.h.
26589 (find_trapping_overflow, replace_trapping_overflow,
26590 rewrite_to_non_trapping_overflow): New functions.
26591 * tree-vect-loop.c: Include tree-eh.h.
26592 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
26593 * tree-data-ref.c: Include tree-eh.h.
26594 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
26596 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
26598 PR rtl-optimization/84123
26599 * combine.c (change_zero_ext): Check if hard register satisfies
26600 can_change_dest_mode before calling gen_lowpart_SUBREG.
26602 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
26605 * ira.c (ira_init_register_move_cost): Remove assert.
26607 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26609 PR rtl-optimization/84071
26610 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
26611 * doc/tm.texi: Regenerate.
26613 2018-01-31 Richard Biener <rguenther@suse.de>
26615 PR tree-optimization/84132
26616 * tree-data-ref.c (analyze_miv_subscript): Properly
26617 check whether evolution_function_is_affine_multivariate_p
26618 before calling gcd_of_steps_may_divide_p.
26620 2018-01-31 Julia Koval <julia.koval@intel.com>
26623 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
26624 * config/i386/i386.md (rdpid_rex64) New.
26625 (rdpid): Make 32bit only.
26627 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
26630 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
26631 an IDENTIFIER_NODE for FUNCTION_TYPE's.
26633 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26636 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26638 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26640 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26642 PR rtl-optimization/84071
26643 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
26644 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
26646 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
26648 * config/arc/arc.c (arc_handle_aux_attribute): New function.
26649 (arc_attribute_table): Add 'aux' attribute.
26650 (arc_in_small_data_p): Consider aux like variables.
26651 (arc_is_aux_reg_p): New function.
26652 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
26653 (arc_get_aux_arg): New function.
26654 (prepare_move_operands): Handle aux-register access.
26655 (arc_handle_aux_attribute): New function.
26656 * doc/extend.texi (ARC Variable attributes): Add subsection.
26658 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
26660 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
26661 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
26662 (arc_attribute_table): Add 'uncached' attribute.
26663 (arc_print_operand): Print '.di' flag for uncached memory
26665 (arc_in_small_data_p): Do not consider for small data the uncached
26667 (arc_is_uncached_mem_p): New function.
26668 * config/arc/predicates.md (compact_store_memory_operand): Check
26669 for uncached memory accesses.
26670 (nonvol_nonimm_operand): Likewise.
26671 * doc/extend.texi (ARC Type Attribute): New subsection.
26673 2018-01-31 Jakub Jelinek <jakub@redhat.com>
26676 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
26677 falign-loops=): Add Optimization flag.
26679 2018-01-30 Jeff Law <law@redhat.com>
26682 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
26683 INT_REGISTERS_SAVED. Check it prior to calling
26684 get_scratch_register_on_entry.
26685 (ix86_adjust_stack_and_probe): Similarly.
26686 (ix86_emit_probe_stack_range): Similarly.
26687 (ix86_expand_prologue): Corresponding changes.
26689 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26692 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
26693 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
26695 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
26698 * lra-constraints.c (curr_insn_transform): Process AND in the
26701 2018-01-30 Jakub Jelinek <jakub@redhat.com>
26703 PR rtl-optimization/83986
26704 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
26705 dependence against last_pending_memory_flush in addition to
26706 pending_jump_insns.
26708 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
26710 PR tree-optimization/81611
26711 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
26714 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26717 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
26720 2018-01-30 Richard Biener <rguenther@suse.de>
26721 Jakub Jelinek <jakub@redhat.com>
26723 PR tree-optimization/84111
26724 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
26725 inner loops added during recursion, as they don't have up-to-date
26728 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26731 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
26732 (can_inline_edge_by_limits_p): ... here.
26733 (can_early_inline_edge_p, check_callers,
26734 update_caller_keys, update_callee_keys, recursive_inlining,
26735 add_new_edges_to_heap, speculation_useful_p,
26736 inline_small_functions,
26737 inline_small_functions, flatten_function,
26738 inline_to_all_callers_1): Update.
26740 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26742 * profile-count.c (profile_count::combine_with_ipa_count): Handle
26745 2018-01-30 Richard Biener <rguenther@suse.de>
26747 PR tree-optimization/83008
26748 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
26749 invariant and constant vector uses in stmts when they need
26750 more than one stmt.
26752 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26755 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
26756 * configure: Regenerate.
26758 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26760 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
26762 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
26763 Use gen_rtx_REG rather than gen_lowpart.
26765 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26767 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
26768 rather than 0 when creating partial subregs.
26770 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26772 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
26775 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
26778 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
26779 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
26780 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
26781 flags. This restores the settings used before the 2017-07-24.
26782 Turning off pre increment/decrement/modify allows IVOPTS to
26783 optimize DF/SF loops where the index is an int.
26785 2018-01-29 Richard Biener <rguenther@suse.de>
26786 Kelvin Nilsen <kelvin@gcc.gnu.org>
26789 * tree-vect-stmts.c (vectorizable_call): Don't call
26790 targetm.vectorize_builtin_md_vectorized_function if callee is
26793 2018-01-22 Carl Love <cel@us.ibm.com>
26795 * doc/extend.tex: Fix typo in second arg in
26796 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
26798 2018-01-29 Richard Biener <rguenther@suse.de>
26800 PR tree-optimization/84086
26801 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
26802 (flush_ssaname_freelist): When SSA names were released reset
26803 the SCEV hash table.
26805 2018-01-29 Richard Biener <rguenther@suse.de>
26807 PR tree-optimization/84057
26808 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
26809 removed paths when removing edges.
26811 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
26813 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
26814 -mfunction-return=@var{choice}.
26816 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
26818 PR diagnostic/84034
26819 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
26820 Handle CR like TAB.
26821 (layout::print_source_line): Likewise.
26822 (test_get_line_width_without_trailing_whitespace): Add test cases.
26824 2018-01-27 Jakub Jelinek <jakub@redhat.com>
26826 PR middle-end/84040
26827 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
26830 2018-01-26 Jim Wilson <jimw@sifive.com>
26832 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
26834 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
26837 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26839 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
26840 and CMP + SUB-immediate -> SUBS.
26842 2018-01-26 Martin Sebor <msebor@redhat.com>
26844 PR tree-optimization/83896
26845 * tree-ssa-strlen.c (get_string_len): Rename...
26846 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
26847 Avoid assuming length is constant.
26848 (handle_char_store): Use HOST_WIDE_INT for string length.
26850 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
26853 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
26854 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
26856 2018-01-26 Richard Biener <rguenther@suse.de>
26858 PR rtl-optimization/84003
26859 * dse.c (record_store): Only record redundant stores when
26860 the earlier store aliases at least all accesses the later one does.
26862 2018-01-26 Jakub Jelinek <jakub@redhat.com>
26864 PR rtl-optimization/83985
26865 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
26866 REG_CFA_RESTORE insns.
26867 (delete_unmarked_insns): Don't ignore separate shrink wrapping
26868 REG_CFA_RESTORE insns here.
26871 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
26872 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
26874 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26876 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
26877 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
26878 (arc_init): Likewise.
26879 (arc_override_options): Likewise.
26880 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
26882 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
26884 * config/arc/arc.h (TARGET_DBNZ): Define.
26885 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
26886 properly set the tune attribute.
26887 (dbnz): Use TARGET_DBNZ guard.
26888 * config/arc/arc.opt (mtune): Add core3 option.
26890 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26892 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
26893 recognize new pic like addresses.
26894 (arc_delegitimize_address): Clean up.
26896 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26898 * config/arc/arc-arches.def: Option mrf16 valid for all
26900 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
26901 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
26902 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
26903 * config/arc/arc-tables.opt: Regenerate.
26904 * config/arc/arc.c (arc_conditional_register_usage): Handle
26905 reduced register file case.
26906 (arc_file_start): Set must have build attributes.
26907 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
26908 mrf16 option value.
26909 * config/arc/arc.opt (mrf16): Add new option.
26910 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
26911 * config/arc/genmultilib.awk: Handle new mrf16 option.
26912 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
26913 * config/arc/t-multilib: Regenerate.
26914 * doc/invoke.texi (ARC Options): Document mrf16 option.
26916 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26918 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
26919 * config/arc/arc.c (arc_handle_secure_attribute): New function.
26920 (arc_attribute_table): Add 'secure_call' attribute.
26921 (arc_print_operand): Print secure call operand.
26922 (arc_function_ok_for_sibcall): Don't optimize tail calls when
26924 (arc_is_secure_call_p): New function. * config/arc/arc.md
26925 (call_i): Add support for sjli instruction.
26926 (call_value_i): Likewise.
26927 * config/arc/constraints.md (Csc): New constraint.
26929 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26930 John Eric Martin <John.Martin@emmicro-us.com>
26932 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
26933 * config/arc/arc.c (_arc_jli_section): New struct.
26934 (arc_jli_section): New type.
26935 (rc_jli_sections): New static variable.
26936 (arc_handle_jli_attribute): New function.
26937 (arc_attribute_table): Add jli_always and jli_fixed attribute.
26938 (arc_file_end): New function.
26939 (TARGET_ASM_FILE_END): Define.
26940 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
26941 (arc_add_jli_section): New function.
26942 (jli_call_scan): Likewise.
26943 (arc_reorg): Call jli_call_scan.
26944 (arc_output_addsi): Remove 'S' from printing asm operand.
26945 (arc_is_jli_call_p): New function.
26946 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
26948 (movhi_insn): Likewise.
26949 (movsi_insn): Likewise.
26950 (movsi_set_cc_insn): Likewise.
26951 (loadqi_update): Likewise.
26952 (load_zeroextendqisi_update): Likewise.
26953 (load_signextendqisi_update): Likewise.
26954 (loadhi_update): Likewise.
26955 (load_zeroextendhisi_update): Likewise.
26956 (load_signextendhisi_update): Likewise.
26957 (loadsi_update): Likewise.
26958 (loadsf_update): Likewise.
26959 (movsicc_insn): Likewise.
26960 (bset_insn): Likewise.
26961 (bxor_insn): Likewise.
26962 (bclr_insn): Likewise.
26963 (bmsk_insn): Likewise.
26964 (bicsi3_insn): Likewise.
26965 (cmpsi_cc_c_insn): Likewise.
26966 (movsi_ne): Likewise.
26967 (movsi_cond_exec): Likewise.
26968 (clrsbsi2): Likewise.
26969 (norm_f): Likewise.
26979 (call_i): Remove 'S' asm letter, add jli instruction.
26980 (call_value_i): Likewise.
26981 * config/arc/arc.op (mjli-always): New option.
26982 * config/arc/constraints.md (Cji): New constraint.
26983 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
26985 (subsf3_fpx): Likewise.
26986 (mulsf3_fpx): Likewise.
26987 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
26989 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
26990 function attrbutes.
26991 * doc/invoke.texi (ARC): Document mjli-always option.
26993 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
26995 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
26996 avoid addition with 0 and use incw and decw where possible.
26998 2018-01-26 Richard Biener <rguenther@suse.de>
27000 PR tree-optimization/81082
27001 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
27002 association if it requires casting to unsigned.
27003 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
27004 from fold_plusminus_mult_expr to catch important cases late when
27005 range info is available.
27007 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27009 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
27010 * configure.ac (hidden_linkonce): New test.
27011 * configure: Regenerate.
27012 * config.in: Regenerate.
27014 2018-01-26 Julia Koval <julia.koval@intel.com>
27016 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
27017 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
27018 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
27019 _mm_mask_bitshuffle_epi64_mask): Fix type.
27020 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
27021 USI_FTYPE_V4DI_V4DI_USI): Remove.
27022 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
27023 __builtin_ia32_vpshufbitqmb256_mask,
27024 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
27025 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
27026 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
27028 2018-01-26 Alan Modra <amodra@gmail.com>
27031 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
27032 UNSPEC_VBPERMQ. Sort other unspecs.
27034 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
27036 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
27038 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
27040 PR middle-end/83055
27041 * predict.c (drop_profile): Do not push/pop cfun; update also
27043 (handle_missing_profiles): Fix logic looking for zero profiles.
27045 2018-01-25 Jakub Jelinek <jakub@redhat.com>
27047 PR middle-end/83977
27048 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
27049 on functions with #pragma omp declare simd or functions with simd
27051 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
27052 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
27053 Remove trailing \n from warning_at calls.
27055 2018-01-25 Tom de Vries <tom@codesourcery.com>
27058 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27059 for neutered workers.
27061 2018-01-24 Joseph Myers <joseph@codesourcery.com>
27064 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
27065 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
27067 2018-01-24 Jeff Law <law@redhat.com>
27070 * i386.c (get_probe_interval): Move to earlier point.
27071 (ix86_compute_frame_layout): If -fstack-clash-protection and
27072 the frame is larger than the probe interval, then use pushes
27073 to save registers rather than reg->mem moves.
27074 (ix86_expand_prologue): Remove conditional for int_registers_saved
27077 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
27080 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
27081 min/max for never referenced object.
27083 2018-01-24 Jakub Jelinek <jakub@redhat.com>
27085 PR middle-end/83977
27086 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
27088 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
27089 attributes from DECL_ATTRIBUTES (decl) without affecting
27090 DECL_ATTRIBUTES (current_function_decl).
27091 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
27092 functions with non-NULL DECL_ABSTRACT_ORIGIN.
27094 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
27096 PR tree-optimization/83979
27097 * fold-const.c (fold_comparison): Use constant_boolean_node
27098 instead of boolean_{true,false}_node.
27100 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
27102 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
27105 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27107 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27108 Simplify the clause that sets the length attribute.
27109 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27110 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
27111 clause that sets the length attribute.
27112 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27114 2018-01-24 Tom de Vries <tom@codesourcery.com>
27117 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
27118 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
27119 Add strict parameter.
27120 (prevent_branch_around_nothing): Insert dummy insn between branch to
27121 label and label with no ptx insn inbetween.
27122 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
27124 2018-01-24 Tom de Vries <tom@codesourcery.com>
27127 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27128 for neutered threads in warp.
27129 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
27131 2018-01-24 Richard Biener <rguenther@suse.de>
27133 PR tree-optimization/83176
27134 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
27137 2018-01-24 Richard Biener <rguenther@suse.de>
27139 PR tree-optimization/82819
27140 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
27141 code generating pluses that are no-ops in the target precision.
27143 2018-01-24 Richard Biener <rguenther@suse.de>
27145 PR middle-end/84000
27146 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
27148 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27150 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
27151 to merge probabilities.
27152 * predict.c (probably_never_executed): Also mark as cold functions
27153 with global 0 profile and guessed local profile.
27154 * profile-count.c (profile_probability::combine_with_count): New
27156 * profile-count.h (profile_probability::operator*,
27157 profile_probability::operator*=, profile_probability::operator/,
27158 profile_probability::operator/=): Reduce precision to adjusted
27159 and set value to guessed on contradictory divisions.
27160 (profile_probability::combine_with_freq): Remove.
27161 (profile_probability::combine_wiht_count): Declare.
27162 (profile_count::force_nonzero):: Set to adjusted.
27163 (profile_count::probability_in):: Set quality to adjusted.
27164 * tree-ssa-tail-merge.c (replace_block_by): Use
27165 combine_with_count.
27167 2018-01-23 Andrew Waterman <andrew@sifive.com>
27168 Jim Wilson <jimw@sifive.com>
27170 * config/riscv/riscv.c (riscv_stack_boundary): New.
27171 (riscv_option_override): Set riscv_stack_boundary. Handle
27172 riscv_preferred_stack_boundary_arg.
27173 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
27174 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
27175 (STACK_BOUNDARY): Set to riscv_stack_boundary.
27176 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
27177 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
27178 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
27180 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
27183 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
27184 of struct ix86_frame.
27185 (ix86_expand_epilogue): Likewise. Add a local variable for
27186 the reg_save_offset field in struct ix86_frame.
27188 2018-01-23 Bin Cheng <bin.cheng@arm.com>
27190 PR tree-optimization/82604
27191 * tree-loop-distribution.c (enum partition_kind): New enum item
27192 PKIND_PARTIAL_MEMSET.
27193 (partition_builtin_p): Support above new enum item.
27194 (generate_code_for_partition): Ditto.
27195 (compute_access_range): Differentiate cases that equality can be
27196 proven at all loops, the innermost loops or no loops.
27197 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
27198 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
27199 (finalize_partitions, distribute_loop): Don't fuse partition of
27200 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
27201 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
27202 parloop is enabled.
27204 2018-01-23 Martin Liska <mliska@suse.cz>
27206 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
27207 order to ignore the predictor.
27208 (PRED_POLYMORPHIC_CALL): Likewise.
27209 (PRED_RECURSIVE_CALL): Likewise.
27211 2018-01-23 Martin Liska <mliska@suse.cz>
27213 * tree-profile.c (tree_profiling): Print function header to
27214 aware reader which function we are working on.
27215 * value-prof.c (gimple_find_values_to_profile): Do not print
27216 not interesting value histograms.
27218 2018-01-23 Martin Liska <mliska@suse.cz>
27220 * profile-count.h (enum profile_quality): Add
27221 profile_uninitialized as the first value. Do not number values
27222 as they are zero based.
27223 (profile_count::verify): Update sanity check.
27224 (profile_probability::verify): Likewise.
27226 2018-01-23 Nathan Sidwell <nathan@acm.org>
27228 * doc/invoke.texi (ffor-scope): Deprecate.
27230 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27232 PR tree-optimization/83510
27233 * domwalk.c (set_all_edges_as_executable): New function.
27234 (dom_walker::dom_walker): Convert bool param
27235 "skip_unreachable_blocks" to enum reachability. Move setup of
27236 edge flags to set_all_edges_as_executable and only do it when
27237 reachability is REACHABLE_BLOCKS.
27238 * domwalk.h (enum dom_walker::reachability): New enum.
27239 (dom_walker::dom_walker): Convert bool param
27240 "skip_unreachable_blocks" to enum reachability.
27241 (set_all_edges_as_executable): New decl.
27242 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
27243 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
27245 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
27246 but converting true to REACHABLE_BLOCKS.
27247 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
27249 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
27250 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
27251 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
27253 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
27254 if check_all_array_refs will be called.
27256 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27258 * tree.c (selftest::test_location_wrappers): Add more test
27261 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27263 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
27264 (selftest::test_bit_in_range): Likewise.
27266 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27269 * doc/sourcebuild.texi (vect_float): Say that the selector
27270 only describes the situation when -funsafe-math-optimizations is on.
27271 (vect_float_strict): Document.
27273 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27275 PR tree-optimization/83965
27276 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
27277 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
27278 instead of checking only for a reduction.
27279 (vect_recog_widen_sum_pattern): Likewise.
27281 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27283 * predict.c (probably_never_executed): Only use precise profile info.
27284 (compute_function_frequency): Skip after inlining hack since we now
27285 have quality checking.
27287 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27289 * profile-count.h (profile_probability::very_unlikely,
27290 profile_probability::unlikely, profile_probability::even): Set
27291 precision to guessed.
27293 2018-01-23 Richard Biener <rguenther@suse.de>
27295 PR tree-optimization/83963
27296 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
27297 Properly terminate dominator walk when crossing the exit edge not
27298 when visiting its source block.
27300 2018-01-23 Jakub Jelinek <jakub@redhat.com>
27303 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
27304 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
27306 2018-01-22 Jakub Jelinek <jakub@redhat.com>
27308 PR tree-optimization/83957
27309 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
27310 semicolon after for body surrounded by braces.
27312 PR tree-optimization/83081
27313 * profile-count.h (profile_probability::split): New method.
27314 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
27315 Use profile_probability::split.
27316 (do_compare_rtx_and_jump): Fix adjustment of probabilities
27317 when splitting a single conditional jump into 2.
27319 2018-01-22 David Malcolm <dmalcolm@redhat.com>
27321 PR tree-optimization/69452
27322 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
27325 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27327 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
27328 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
27329 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
27331 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27333 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
27335 * config/rl78/rl78.md (movdi): New define_expand.
27336 * config/rl78/rl78.c (rl78_split_movdi): New function.
27338 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
27341 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
27343 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
27344 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
27345 128-bit to produce an UNSPEC move to get the double word with the
27346 signbit and then a shift directly to do signbit.
27347 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
27348 implementation with a new version that just does either a direct
27349 move or a regular move. Move memory interface to separate insns.
27350 Move insns so they are next to the expander.
27351 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
27352 with signbit move. Split big and little endian case.
27353 (signbit<mode>2_dm_mem_le): Likewise.
27354 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
27355 (signbit<mode>2_dm2): Likewise.
27357 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27359 * config/rl78/rl78.md (anddi3): New define_expand.
27361 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27363 * config/rl78/rl78.md (umindi3): New define_expand.
27365 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27367 * config/rl78/rl78.md (smindi3): New define_expand.
27369 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27371 * config/rl78/rl78.md (smaxdi3): New define_expand.
27373 2018-01-22 Carl Love <cel@us.ibm.com>
27375 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
27376 LVX_V1TI): Add macro expansion.
27377 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
27378 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
27379 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
27380 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
27381 Change check to determine if the instruction is a byte reversing
27382 entry. Fix typo in comment.
27383 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
27384 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
27385 Add def_builtin calls for new builtins.
27386 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
27387 Add define_insn expansion.
27389 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27391 * config/rl78/rl78.md (umaxdi3): New define_expand.
27393 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27395 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
27396 for non-QImode registers.
27398 2018-01-22 Richard Biener <rguenther@suse.de>
27400 PR tree-optimization/83963
27401 * graphite-scop-detection.c (scop_detection::get_sese): Delay
27402 including the loop exit block.
27403 (scop_detection::merge_sese): Likewise.
27404 (scop_detection::add_scop): Do it here instead.
27406 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27408 * doc/sourcebuild.texi (arm_softfloat): Document.
27410 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
27413 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
27414 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
27415 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
27417 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27418 David Edelsohn <dje.gcc@gmail.com>
27421 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27422 Change "crset eq" to "crset 2".
27423 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27424 (*call_indirect_aix<mode>_nospec): Likewise.
27425 (*call_value_indirect_aix<mode>_nospec): Likewise.
27426 (*call_indirect_elfv2<mode>_nospec): Likewise.
27427 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
27428 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
27429 change assembly output from . to $.
27430 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27431 (indirect_jump<mode>_nospec): Change assembly output from . to $.
27432 (*tablejump<mode>_internal1_nospec): Likewise.
27434 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
27437 * config/sh/sh_optimize_sett_clrt.cc:
27438 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
27440 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
27442 PR tree-optimization/83940
27443 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
27444 offset_dt to vect_constant_def rather than vect_unknown_def_type.
27445 (vect_check_load_store_mask): Add a mask_dt_out parameter and
27446 use it to pass back the definition type.
27447 (vect_check_store_rhs): Likewise rhs_dt_out.
27448 (vect_build_gather_load_calls): Add a mask_dt argument and use
27449 it instead of a call to vect_is_simple_use.
27450 (vectorizable_store): Update calls to vect_check_load_store_mask
27451 and vect_check_store_rhs. Use the dt returned by the latter instead
27452 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
27453 instead of calls to vect_is_simple_use. Pass the scalar rather
27454 than the vector operand to vect_is_simple_use when handling
27455 second and subsequent copies of an rhs value.
27456 (vectorizable_load): Update calls to vect_check_load_store_mask
27457 and vect_build_gather_load_calls. Use the cached mask_dt and
27458 gs_info.offset_dt instead of calls to vect_is_simple_use.
27460 2018-01-20 Jakub Jelinek <jakub@redhat.com>
27462 PR middle-end/83945
27463 * tree-emutls.c: Include gimplify.h.
27464 (lower_emutls_2): New function.
27465 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
27466 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
27467 it before further processing.
27470 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
27471 UINTVAL (trueop1) instead of INTVAL (op1).
27473 2018-01-19 Jakub Jelinek <jakub@redhat.com>
27477 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
27478 INCOMING_FRAME_SP_OFFSET if not defined.
27479 (scan_trace): Add ENTRY argument. If true and
27480 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
27481 emit a note to adjust the CFA offset.
27482 (create_cfi_notes): Adjust scan_trace callers.
27483 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
27484 INCOMING_FRAME_SP_OFFSET in the CIE.
27485 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
27486 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
27488 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
27489 * doc/tm.texi: Regenerated.
27491 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
27493 PR rtl-optimization/83147
27494 * lra-constraints.c (remove_inheritance_pseudos): Use
27495 lra_substitute_pseudo_within_insn.
27497 2018-01-19 Tom de Vries <tom@codesourcery.com>
27498 Cesar Philippidis <cesar@codesourcery.com>
27501 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
27503 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
27506 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
27507 spaces for function labels.
27509 2018-01-19 Martin Liska <mliska@suse.cz>
27511 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
27512 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
27513 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
27514 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
27515 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
27516 (PRED_CONST_RETURN): Change from 69 to 65.
27517 (PRED_NULL_RETURN): Change from 91 to 71.
27518 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
27519 (PRED_LOOP_GUARD): Change from 66 to 73.
27521 2018-01-19 Martin Liska <mliska@suse.cz>
27523 * predict.c (predict_insn_def): Add new assert.
27524 (struct branch_predictor): Change type to signed integer.
27525 (test_prediction_value_range): Amend test to cover
27526 PROB_UNINITIALIZED.
27527 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
27528 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
27529 (PRED_LOOP_ITERATIONS_MAX): Likewise.
27530 (PRED_LOOP_IV_COMPARE): Likewise.
27531 * predict.h (PROB_UNINITIALIZED): Define new constant.
27533 2018-01-19 Martin Liska <mliska@suse.cz>
27535 * predict.c (dump_prediction): Add new format for
27536 analyze_brprob.py script which is enabled with -details
27538 * profile-count.h (precise_p): New function.
27540 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
27542 PR tree-optimization/83922
27543 * tree-vect-loop.c (vect_verify_full_masking): Return false if
27544 there are no statements that need masking.
27545 (vect_active_double_reduction_p): New function.
27546 (vect_analyze_loop_operations): Use it when handling phis that
27547 are not in the loop header.
27549 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
27551 PR tree-optimization/83914
27552 * tree-vect-loop.c (vectorizable_induction): Don't convert
27553 init_expr or apply the peeling adjustment for inductions
27554 that are nested within the vectorized loop.
27556 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27558 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
27561 2018-01-18 Jakub Jelinek <jakub@redhat.com>
27565 * function.h (gimplify_parameters): Add gimple_seq * argument.
27566 * function.c: Include gimple.h and options.h.
27567 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
27568 for the added local temporaries if needed.
27569 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
27570 if there are any parameter cleanups, wrap whole body into a
27571 try/finally with the cleanups.
27573 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
27576 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
27577 Use GET_MODE_CLASS for scalar floating point.
27579 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
27583 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
27584 Fix call of call_cgraph_insertion_hooks.
27586 2018-01-18 Martin Sebor <msebor@redhat.com>
27588 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
27590 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
27593 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
27596 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
27599 * common.opt: (-ffile-prefix-map): New option.
27600 * opts.c (common_handle_option): Defer it.
27601 * opts-global.c (handle_common_deferred_options): Handle it.
27602 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
27603 * file-prefix-map.h: New file.
27604 (remap_debug_filename, add_debug_prefix_map): ...here.
27605 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
27606 * final.c (debug_prefix_map, add_debug_prefix_map
27607 remap_debug_filename): Move to...
27608 * file-prefix-map.c: New file.
27609 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
27610 generalize, get rid of alloca(), use strrchr() instead of strchr().
27611 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
27612 Implement in terms of add_prefix_map().
27613 (remap_macro_filename, remap_debug_filename): Implement in term of
27615 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
27616 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
27617 * dbxout.c: Include file-prefix-map.h.
27618 * varasm.c: Likewise.
27619 * vmsdbgout.c: Likewise.
27620 * xcoffout.c: Likewise.
27621 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
27622 * doc/cppopts.texi (-fmacro-prefix-map): Document.
27623 * doc/invoke.texi (-ffile-prefix-map): Document.
27624 (-fdebug-prefix-map): Update description.
27626 2018-01-18 Martin Liska <mliska@suse.cz>
27628 * config/i386/i386.c (indirect_thunk_name): Document that also
27630 (output_indirect_thunk): Document why both instructions
27631 (pause and lfence) are generated.
27633 2018-01-18 Richard Biener <rguenther@suse.de>
27635 PR tree-optimization/83887
27636 * graphite-scop-detection.c
27637 (scop_detection::get_nearest_dom_with_single_entry): Remove.
27638 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
27639 (scop_detection::merge_sese): Re-implement with a flood-fill
27640 algorithm that properly finds a SESE region if it exists.
27642 2018-01-18 Jakub Jelinek <jakub@redhat.com>
27645 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
27646 pointer_diff optimizations use view_convert instead of convert.
27648 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27650 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27651 Generate different code for -mno-speculate-indirect-jumps.
27652 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27653 (*call_indirect_aix<mode>): Disable for
27654 -mno-speculate-indirect-jumps.
27655 (*call_indirect_aix<mode>_nospec): New define_insn.
27656 (*call_value_indirect_aix<mode>): Disable for
27657 -mno-speculate-indirect-jumps.
27658 (*call_value_indirect_aix<mode>_nospec): New define_insn.
27659 (*sibcall_nonlocal_sysv<mode>): Generate different code for
27660 -mno-speculate-indirect-jumps.
27661 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27663 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
27665 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
27666 long double type, set the flags for noting the default long double
27667 type, even if we don't pass or return a long double type.
27669 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
27672 * ipa-inline.c (flatten_function): Do not overwrite final inlining
27675 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
27677 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
27678 support for merge[hl].
27679 (fold_mergehl_helper): New helper function.
27680 (tree-vector-builder.h): New #include for tree_vector_builder usage.
27681 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
27682 (altivec_vmrglw_direct): Add xxmrglw insn.
27684 2018-01-17 Andrew Waterman <andrew@sifive.com>
27686 * config/riscv/riscv.c (riscv_conditional_register_usage): If
27687 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
27689 2018-01-17 David Malcolm <dmalcolm@redhat.com>
27692 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
27693 call the lto_location_cache before reading the
27694 DECL_SOURCE_LOCATION of the types.
27696 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
27697 Richard Sandiford <richard.sandiford@linaro.org>
27699 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
27700 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
27701 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
27702 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
27703 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
27705 * config/aarch64/constraints.md (aarch64_movti_operand):
27707 * config/aarch64/predicates.md (Uti): Add new constraint.
27709 2018-01-17 Carl Love <cel@us.ibm.com>
27711 * config/rs6000/vsx.md (define_expand xl_len_r,
27712 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
27713 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
27715 (define_expand, define_insn): Move the shift left from the
27716 define_insn to the define_expand for lxvl and stxvl instructions.
27717 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
27718 and XL_LEN_R definitions to PURE.
27720 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
27722 * config/i386/i386.c (indirect_thunk_name): Declare regno
27723 as unsigned int. Compare regno with INVALID_REGNUM.
27724 (output_indirect_thunk): Ditto.
27725 (output_indirect_thunk_function): Ditto.
27726 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
27727 in the call to output_indirect_thunk_function.
27729 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
27731 PR middle-end/83884
27732 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
27733 rather than the size of inner_type to determine the stack slot size
27734 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
27736 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
27739 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
27742 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
27744 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
27745 endian Linux systems to optionally enable multilibs for selecting
27746 the long double type if the user configured an explicit type.
27747 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
27748 have no long double multilibs if not defined.
27749 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
27750 warn if the user used -mabi={ieee,ibm}longdouble and we built
27751 multilibs for long double.
27752 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
27753 appropriate multilib option.
27754 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
27756 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
27757 for building long double multilibs.
27758 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
27760 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
27762 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
27765 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
27767 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
27770 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
27773 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
27776 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27778 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
27779 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
27781 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
27783 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
27784 different rtl trees depending on TARGET_64BIT.
27785 (rs6000_gen_lvx): Likewise.
27787 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27789 * config/visium/visium.md (nop): Tweak comment.
27790 (hazard_nop): Likewise.
27792 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27794 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
27795 -mspeculate-indirect-jumps.
27796 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
27797 for -mno-speculate-indirect-jumps.
27798 (*call_indirect_elfv2<mode>_nospec): New define_insn.
27799 (*call_value_indirect_elfv2<mode>): Disable for
27800 -mno-speculate-indirect-jumps.
27801 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
27802 (indirect_jump): Emit different RTL for
27803 -mno-speculate-indirect-jumps.
27804 (*indirect_jump<mode>): Disable for
27805 -mno-speculate-indirect-jumps.
27806 (*indirect_jump<mode>_nospec): New define_insn.
27807 (tablejump): Emit different RTL for
27808 -mno-speculate-indirect-jumps.
27809 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
27810 (tablejumpsi_nospec): New define_expand.
27811 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
27812 (tablejumpdi_nospec): New define_expand.
27813 (*tablejump<mode>_internal1): Disable for
27814 -mno-speculate-indirect-jumps.
27815 (*tablejump<mode>_internal1_nospec): New define_insn.
27816 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
27819 2018-01-16 Artyom Skrobov tyomitch@gmail.com
27821 * caller-save.c (insert_save): Drop unnecessary parameter. All
27824 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27825 Richard Biener <rguenth@suse.de>
27828 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
27829 return early, inline manually is_gimple_sizepos. Make sure if we
27830 call gimplify_expr we don't end up with a gimple constant.
27831 * tree.c (variably_modified_type_p): Don't return true for
27832 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
27833 * gimplify.h (is_gimple_sizepos): Remove.
27835 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27837 PR tree-optimization/83857
27838 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
27839 vectorizable_live_operation for pure SLP statements.
27840 (vectorizable_live_operation): Handle PHIs.
27842 2018-01-16 Richard Biener <rguenther@suse.de>
27844 PR tree-optimization/83867
27845 * tree-vect-stmts.c (vect_transform_stmt): Precompute
27846 nested_in_vect_loop_p since the scalar stmt may get invalidated.
27848 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27851 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
27852 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
27853 If off is not INTEGER_CST, issue a may not be aligned warning
27854 rather than isn't aligned. Use isn%'t rather than isn't.
27855 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
27857 <case MULT_EXPR>: Improve the case when bottom and one of the
27858 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
27859 operand, in that case check if the other operand is multiple of
27860 bottom divided by the INTEGER_CST operand.
27862 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27865 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
27866 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
27867 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
27868 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
27869 * config/pa/pa.c (pa_function_arg_advance): Likewise.
27870 (pa_function_arg, pa_arg_partial_bytes): Likewise.
27871 (pa_function_arg_size): New function.
27873 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27875 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
27876 in a separate statement.
27878 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27880 PR tree-optimization/83847
27881 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
27882 group gathers and scatters.
27884 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27886 PR rtl-optimization/86620
27887 * params.def (max-sched-ready-insns): Bump minimum value to 1.
27889 PR rtl-optimization/83213
27890 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
27891 to last if both are JUMP_INSNs.
27893 PR tree-optimization/83843
27894 * gimple-ssa-store-merging.c
27895 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
27896 store_immediate_info for bswap/nop orig_stores.
27898 2018-01-15 Andrew Waterman <andrew@sifive.com>
27900 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
27902 <UDIV>: Increase cost if !TARGET_DIV.
27904 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
27906 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
27907 (define_attr "cr_logical_3op"): New.
27908 (cceq_ior_compare): Adjust.
27909 (cceq_ior_compare_complement): Adjust.
27910 (*cceq_rev_compare): Adjust.
27911 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
27912 (is_cracked_insn): Adjust.
27913 (insn_must_be_first_in_group): Adjust.
27914 * config/rs6000/40x.md: Adjust.
27915 * config/rs6000/440.md: Adjust.
27916 * config/rs6000/476.md: Adjust.
27917 * config/rs6000/601.md: Adjust.
27918 * config/rs6000/603.md: Adjust.
27919 * config/rs6000/6xx.md: Adjust.
27920 * config/rs6000/7450.md: Adjust.
27921 * config/rs6000/7xx.md: Adjust.
27922 * config/rs6000/8540.md: Adjust.
27923 * config/rs6000/cell.md: Adjust.
27924 * config/rs6000/e300c2c3.md: Adjust.
27925 * config/rs6000/e500mc.md: Adjust.
27926 * config/rs6000/e500mc64.md: Adjust.
27927 * config/rs6000/e5500.md: Adjust.
27928 * config/rs6000/e6500.md: Adjust.
27929 * config/rs6000/mpc.md: Adjust.
27930 * config/rs6000/power4.md: Adjust.
27931 * config/rs6000/power5.md: Adjust.
27932 * config/rs6000/power6.md: Adjust.
27933 * config/rs6000/power7.md: Adjust.
27934 * config/rs6000/power8.md: Adjust.
27935 * config/rs6000/power9.md: Adjust.
27936 * config/rs6000/rs64.md: Adjust.
27937 * config/rs6000/titan.md: Adjust.
27939 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27941 * config/i386/predicates.md (indirect_branch_operand): Rewrite
27942 ix86_indirect_branch_register logic.
27944 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27946 * config/i386/constraints.md (Bs): Update
27947 ix86_indirect_branch_register check. Don't check
27948 ix86_indirect_branch_register with GOT_memory_operand.
27950 * config/i386/predicates.md (GOT_memory_operand): Don't check
27951 ix86_indirect_branch_register here.
27952 (GOT32_symbol_operand): Likewise.
27954 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27956 * config/i386/predicates.md (constant_call_address_operand):
27957 Rewrite ix86_indirect_branch_register logic.
27958 (sibcall_insn_operand): Likewise.
27960 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27962 * config/i386/constraints.md (Bs): Replace
27963 ix86_indirect_branch_thunk_register with
27964 ix86_indirect_branch_register.
27966 * config/i386/i386.md (indirect_jump): Likewise.
27967 (tablejump): Likewise.
27968 (*sibcall_memory): Likewise.
27969 (*sibcall_value_memory): Likewise.
27970 Peepholes of indirect call and jump via memory: Likewise.
27971 * config/i386/i386.opt: Likewise.
27972 * config/i386/predicates.md (indirect_branch_operand): Likewise.
27973 (GOT_memory_operand): Likewise.
27974 (call_insn_operand): Likewise.
27975 (sibcall_insn_operand): Likewise.
27976 (GOT32_symbol_operand): Likewise.
27978 2018-01-15 Jakub Jelinek <jakub@redhat.com>
27980 PR middle-end/83837
27981 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
27982 type rather than type addr's type points to.
27983 (expand_omp_atomic_mutex): Likewise.
27984 (expand_omp_atomic): Likewise.
27986 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27989 * config/i386/i386.c (output_indirect_thunk_function): Use
27990 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
27991 for __x86_return_thunk.
27993 2018-01-15 Richard Biener <rguenther@suse.de>
27995 PR middle-end/83850
27996 * expmed.c (extract_bit_field_1): Fix typo.
27998 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28001 * config/arm/iterators.md (VF): New mode iterator.
28002 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
28003 Remove integer-related logic from pattern.
28004 (neon_vabd<mode>_3): Likewise.
28006 2018-01-15 Jakub Jelinek <jakub@redhat.com>
28008 PR middle-end/82694
28009 * common.opt (fstrict-overflow): No longer an alias.
28010 (fwrapv-pointer): New option.
28011 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
28012 also for pointer types based on flag_wrapv_pointer.
28013 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
28014 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
28015 opts->x_flag_wrapv got set.
28016 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
28017 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
28018 POINTER_TYPE_OVERFLOW_UNDEFINED.
28019 * match.pd: Likewise in address comparison pattern.
28020 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
28022 2018-01-15 Richard Biener <rguenther@suse.de>
28025 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
28026 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
28027 Reset type names to their identifier if their TYPE_DECL doesn't
28028 have linkage (and thus is used for ODR and devirt).
28029 (save_debug_info_for_decl): Remove.
28030 (save_debug_info_for_type): Likewise.
28031 (add_tree_to_fld_list): Adjust.
28032 * tree-pretty-print.c (dump_generic_node): Make dumping of
28033 type names more robust.
28035 2018-01-15 Richard Biener <rguenther@suse.de>
28037 * BASE-VER: Bump to 8.0.1.
28039 2018-01-14 Martin Sebor <msebor@redhat.com>
28042 * builtins.c (check_access): Avoid warning when the no-warning bit
28045 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
28047 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
28048 * ira-color (allocno_hard_regs_compare): Likewise.
28050 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
28053 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
28054 Use .pushsection/.popsection.
28056 2018-01-14 Martin Sebor <msebor@redhat.com>
28059 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
28061 2018-01-14 Jakub Jelinek <jakub@redhat.com>
28063 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
28064 entry from extra_headers.
28065 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
28066 extra_headers, make the list bitwise identical to the i?86-*-* one.
28068 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28070 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
28071 -mcmodel=large with -mindirect-branch=thunk,
28072 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
28073 -mfunction-return=thunk-extern.
28074 * doc/invoke.texi: Document -mcmodel=large is incompatible with
28075 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
28076 -mfunction-return=thunk and -mfunction-return=thunk-extern.
28078 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28080 * config/i386/i386.c (print_reg): Print the name of the full
28081 integer register without '%'.
28082 (ix86_print_operand): Handle 'V'.
28083 * doc/extend.texi: Document 'V' modifier.
28085 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28087 * config/i386/constraints.md (Bs): Disallow memory operand for
28088 -mindirect-branch-register.
28090 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28091 (GOT_memory_operand): Likewise.
28092 (call_insn_operand): Likewise.
28093 (sibcall_insn_operand): Likewise.
28094 (GOT32_symbol_operand): Likewise.
28095 * config/i386/i386.md (indirect_jump): Call convert_memory_address
28096 for -mindirect-branch-register.
28097 (tablejump): Likewise.
28098 (*sibcall_memory): Likewise.
28099 (*sibcall_value_memory): Likewise.
28100 Disallow peepholes of indirect call and jump via memory for
28101 -mindirect-branch-register.
28102 (*call_pop): Replace m with Bw.
28103 (*call_value_pop): Likewise.
28104 (*sibcall_pop_memory): Replace m with Bs.
28105 * config/i386/i386.opt (mindirect-branch-register): New option.
28106 * doc/invoke.texi: Document -mindirect-branch-register option.
28108 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28110 * config/i386/i386-protos.h (ix86_output_function_return): New.
28111 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
28112 set function_return_type.
28113 (indirect_thunk_name): Add ret_p to indicate thunk for function
28115 (output_indirect_thunk_function): Pass false to
28116 indirect_thunk_name.
28117 (ix86_output_indirect_branch_via_reg): Likewise.
28118 (ix86_output_indirect_branch_via_push): Likewise.
28119 (output_indirect_thunk_function): Create alias for function
28120 return thunk if regno < 0.
28121 (ix86_output_function_return): New function.
28122 (ix86_handle_fndecl_attribute): Handle function_return.
28123 (ix86_attribute_table): Add function_return.
28124 * config/i386/i386.h (machine_function): Add
28125 function_return_type.
28126 * config/i386/i386.md (simple_return_internal): Use
28127 ix86_output_function_return.
28128 (simple_return_internal_long): Likewise.
28129 * config/i386/i386.opt (mfunction-return=): New option.
28130 (indirect_branch): Mention -mfunction-return=.
28131 * doc/extend.texi: Document function_return function attribute.
28132 * doc/invoke.texi: Document -mfunction-return= option.
28134 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28136 * config/i386/i386-opts.h (indirect_branch): New.
28137 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
28138 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
28139 with local indirect jump when converting indirect call and jump.
28140 (ix86_set_indirect_branch_type): New.
28141 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
28142 (indirectlabelno): New.
28143 (indirect_thunk_needed): Likewise.
28144 (indirect_thunk_bnd_needed): Likewise.
28145 (indirect_thunks_used): Likewise.
28146 (indirect_thunks_bnd_used): Likewise.
28147 (INDIRECT_LABEL): Likewise.
28148 (indirect_thunk_name): Likewise.
28149 (output_indirect_thunk): Likewise.
28150 (output_indirect_thunk_function): Likewise.
28151 (ix86_output_indirect_branch_via_reg): Likewise.
28152 (ix86_output_indirect_branch_via_push): Likewise.
28153 (ix86_output_indirect_branch): Likewise.
28154 (ix86_output_indirect_jmp): Likewise.
28155 (ix86_code_end): Call output_indirect_thunk_function if needed.
28156 (ix86_output_call_insn): Call ix86_output_indirect_branch if
28158 (ix86_handle_fndecl_attribute): Handle indirect_branch.
28159 (ix86_attribute_table): Add indirect_branch.
28160 * config/i386/i386.h (machine_function): Add indirect_branch_type
28161 and has_local_indirect_jump.
28162 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
28164 (tablejump): Likewise.
28165 (*indirect_jump): Use ix86_output_indirect_jmp.
28166 (*tablejump_1): Likewise.
28167 (simple_return_indirect_internal): Likewise.
28168 * config/i386/i386.opt (mindirect-branch=): New option.
28169 (indirect_branch): New.
28172 (thunk-inline): Likewise.
28173 (thunk-extern): Likewise.
28174 * doc/extend.texi: Document indirect_branch function attribute.
28175 * doc/invoke.texi: Document -mindirect-branch= option.
28177 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
28180 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
28182 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
28184 * ipa-inline.c (want_inline_small_function_p): Return false if
28185 inlining has already failed with CIF_FINAL_ERROR.
28186 (update_caller_keys): Call want_inline_small_function_p before
28188 (update_callee_keys): Likewise.
28190 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
28192 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
28194 (rs6000_quadword_masked_address_p): Likewise.
28195 (quad_aligned_load_p): Likewise.
28196 (quad_aligned_store_p): Likewise.
28197 (const_load_sequence_p): Add comment to describe the outer-most loop.
28198 (mimic_memory_attributes_and_flags): New function.
28199 (rs6000_gen_stvx): Likewise.
28200 (replace_swapped_aligned_store): Likewise.
28201 (rs6000_gen_lvx): Likewise.
28202 (replace_swapped_aligned_load): Likewise.
28203 (replace_swapped_load_constant): Capitalize argument name in
28204 comment describing this function.
28205 (rs6000_analyze_swaps): Add a third pass to search for vector loads
28206 and stores that access quad-word aligned addresses and replace
28207 with stvx or lvx instructions when appropriate.
28208 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
28209 New function prototype.
28210 (rs6000_quadword_masked_address_p): Likewise.
28211 (rs6000_gen_lvx): Likewise.
28212 (rs6000_gen_stvx): Likewise.
28213 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
28214 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
28215 when memory address is aligned.
28216 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
28217 this split to select lvx instruction when memory address is aligned.
28218 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
28219 instruction when memory address is aligned.
28220 (*vsx_le_perm_load_v16qi): Likewise.
28221 (four unnamed splitters): Modify to select the stvx instruction
28222 when memory is aligned.
28224 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
28226 * predict.c (determine_unlikely_bbs): Handle correctly BBs
28227 which appears in the queue multiple times.
28229 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28230 Alan Hayward <alan.hayward@arm.com>
28231 David Sherwood <david.sherwood@arm.com>
28233 * tree-vectorizer.h (vec_lower_bound): New structure.
28234 (_loop_vec_info): Add check_nonzero and lower_bounds.
28235 (LOOP_VINFO_CHECK_NONZERO): New macro.
28236 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
28237 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
28238 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
28239 fields. Make seg_len the distance travelled, not including the
28241 (dr_direction_indicator): Declare.
28242 (dr_zero_step_indicator): Likewise.
28243 (dr_known_forward_stride_p): Likewise.
28244 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
28246 (runtime_alias_check_p): Allow runtime alias checks with
28248 (operator ==): Compare access_size and align.
28249 (prune_runtime_alias_test_list): Rework for new distinction between
28250 the access_size and seg_len.
28251 (create_intersect_range_checks_index): Likewise. Cope with polynomial
28253 (get_segment_min_max): New function.
28254 (create_intersect_range_checks): Use it.
28255 (dr_step_indicator): New function.
28256 (dr_direction_indicator): Likewise.
28257 (dr_zero_step_indicator): Likewise.
28258 (dr_known_forward_stride_p): Likewise.
28259 * tree-loop-distribution.c (data_ref_segment_size): Return
28260 DR_STEP * (niters - 1).
28261 (compute_alias_check_pairs): Update call to the dr_with_seg_len
28263 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
28264 (vect_preserves_scalar_order_p): New function, split out from...
28265 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
28266 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
28267 (vect_vfa_access_size): New function.
28268 (vect_vfa_align): Likewise.
28269 (vect_compile_time_alias): Take access_size_a and access_b arguments.
28270 (dump_lower_bound): New function.
28271 (vect_check_lower_bound): Likewise.
28272 (vect_small_gap_p): Likewise.
28273 (vectorizable_with_step_bound_p): Likewise.
28274 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
28275 depencies if the vectorization factor is 1. Convert the checks
28276 for nonzero steps into checks on the bounds of DR_STEP. Try using
28277 a bunds check for variable steps if the minimum required step is
28278 relatively small. Update calls to the dr_with_seg_len
28279 constructor and to vect_compile_time_alias.
28280 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
28282 (vect_loop_versioning): Call it.
28283 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
28285 (vect_estimate_min_profitable_iters): Account for any bounds checks.
28287 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28288 Alan Hayward <alan.hayward@arm.com>
28289 David Sherwood <david.sherwood@arm.com>
28291 * doc/sourcebuild.texi (vect_scatter_store): Document.
28292 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
28294 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
28296 * genopinit.c (main): Add supports_vec_scatter_store and
28297 supports_vec_scatter_store_cached to target_optabs.
28298 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
28299 IFN_MASK_SCATTER_STORE.
28300 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
28302 * internal-fn.h (internal_store_fn_p): Declare.
28303 (internal_fn_stored_value_index): Likewise.
28304 * internal-fn.c (scatter_store_direct): New macro.
28305 (expand_scatter_store_optab_fn): New function.
28306 (direct_scatter_store_optab_supported_p): New macro.
28307 (internal_store_fn_p): New function.
28308 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
28309 IFN_MASK_SCATTER_STORE.
28310 (internal_fn_mask_index): Likewise.
28311 (internal_fn_stored_value_index): New function.
28312 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
28313 for scatter stores.
28314 * optabs-query.h (supports_vec_scatter_store_p): Declare.
28315 * optabs-query.c (supports_vec_scatter_store_p): New function.
28316 * tree-vectorizer.h (vect_get_store_rhs): Declare.
28317 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
28318 true for scatter stores.
28319 (vect_gather_scatter_fn_p): Handle scatter stores too.
28320 (vect_check_gather_scatter): Consider using scatter stores if
28321 supports_vec_scatter_store_p.
28322 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
28323 scatter stores too.
28324 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28325 internal_fn_stored_value_index.
28326 (check_load_store_masking): Handle scatter stores too.
28327 (vect_get_store_rhs): Make public.
28328 (vectorizable_call): Use internal_store_fn_p.
28329 (vectorizable_store): Handle scatter store internal functions.
28330 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
28331 when deciding whether the end of the group has been reached.
28332 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
28333 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
28334 (mask_scatter_store<mode>): New insns.
28336 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28337 Alan Hayward <alan.hayward@arm.com>
28338 David Sherwood <david.sherwood@arm.com>
28340 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
28341 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
28342 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
28344 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
28345 Use vect_truncate_gather_scatter_offset if we can't treat the
28346 operation as a normal gather load or scatter store.
28347 (get_group_load_store_type): Take the gather_scatter_info
28348 as argument. Try using a gather load or scatter store for
28349 single-element groups.
28350 (get_load_store_type): Update calls to get_group_load_store_type
28351 and vect_use_strided_gather_scatters_p.
28353 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28354 Alan Hayward <alan.hayward@arm.com>
28355 David Sherwood <david.sherwood@arm.com>
28357 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
28358 optional tree argument.
28359 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
28361 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
28362 but continue to use the current value as a fallback.
28363 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
28364 to compare the updates.
28365 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
28366 (get_load_store_type): Use it when handling a strided access.
28367 (vect_get_strided_load_store_ops): New function.
28368 (vect_get_data_ptr_increment): Likewise.
28369 (vectorizable_load): Handle strided gather loads. Always pass
28370 a step to vect_create_data_ref_ptr and bump_vector_ptr.
28372 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28373 Alan Hayward <alan.hayward@arm.com>
28374 David Sherwood <david.sherwood@arm.com>
28376 * doc/md.texi (gather_load@var{m}): Document.
28377 (mask_gather_load@var{m}): Likewise.
28378 * genopinit.c (main): Add supports_vec_gather_load and
28379 supports_vec_gather_load_cached to target_optabs.
28380 * optabs-tree.c (init_tree_optimization_optabs): Use
28381 ggc_cleared_alloc to allocate target_optabs.
28382 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
28383 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
28385 * internal-fn.h (internal_load_fn_p): Declare.
28386 (internal_gather_scatter_fn_p): Likewise.
28387 (internal_fn_mask_index): Likewise.
28388 (internal_gather_scatter_fn_supported_p): Likewise.
28389 * internal-fn.c (gather_load_direct): New macro.
28390 (expand_gather_load_optab_fn): New function.
28391 (direct_gather_load_optab_supported_p): New macro.
28392 (direct_internal_fn_optab): New function.
28393 (internal_load_fn_p): Likewise.
28394 (internal_gather_scatter_fn_p): Likewise.
28395 (internal_fn_mask_index): Likewise.
28396 (internal_gather_scatter_fn_supported_p): Likewise.
28397 * optabs-query.c (supports_at_least_one_mode_p): New function.
28398 (supports_vec_gather_load_p): Likewise.
28399 * optabs-query.h (supports_vec_gather_load_p): Declare.
28400 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
28401 and memory_type field.
28402 (NUM_PATTERNS): Bump to 15.
28403 * tree-vect-data-refs.c: Include internal-fn.h.
28404 (vect_gather_scatter_fn_p): New function.
28405 (vect_describe_gather_scatter_call): Likewise.
28406 (vect_check_gather_scatter): Try using internal functions for
28407 gather loads. Recognize existing calls to a gather load function.
28408 (vect_analyze_data_refs): Consider using gather loads if
28409 supports_vec_gather_load_p.
28410 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
28411 (vect_get_gather_scatter_offset_type): Likewise.
28412 (vect_convert_mask_for_vectype): Likewise.
28413 (vect_add_conversion_to_patterm): Likewise.
28414 (vect_try_gather_scatter_pattern): Likewise.
28415 (vect_recog_gather_scatter_pattern): New pattern recognizer.
28416 (vect_vect_recog_func_ptrs): Add it.
28417 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28418 internal_fn_mask_index and internal_gather_scatter_fn_p.
28419 (check_load_store_masking): Take the gather_scatter_info as an
28420 argument and handle gather loads.
28421 (vect_get_gather_scatter_ops): New function.
28422 (vectorizable_call): Check internal_load_fn_p.
28423 (vectorizable_load): Likewise. Handle gather load internal
28425 (vectorizable_store): Update call to check_load_store_masking.
28426 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
28427 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
28428 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
28429 (aarch64_gather_scale_operand_d): New predicates.
28430 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
28431 (mask_gather_load<mode>): New insns.
28433 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28434 Alan Hayward <alan.hayward@arm.com>
28435 David Sherwood <david.sherwood@arm.com>
28437 * optabs.def (fold_left_plus_optab): New optab.
28438 * doc/md.texi (fold_left_plus_@var{m}): Document.
28439 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
28440 * internal-fn.c (fold_left_direct): Define.
28441 (expand_fold_left_optab_fn): Likewise.
28442 (direct_fold_left_optab_supported_p): Likewise.
28443 * fold-const-call.c (fold_const_fold_left): New function.
28444 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
28445 * tree-parloops.c (valid_reduction_p): New function.
28446 (gather_scalar_reductions): Use it.
28447 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
28448 (vect_finish_replace_stmt): Declare.
28449 * tree-vect-loop.c (fold_left_reduction_fn): New function.
28450 (needs_fold_left_reduction_p): New function, split out from...
28451 (vect_is_simple_reduction): ...here. Accept reductions that
28452 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
28453 (vect_force_simple_reduction): Also store the reduction type in
28454 the assignment's STMT_VINFO_REDUC_TYPE.
28455 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
28456 (merge_with_identity): New function.
28457 (vect_expand_fold_left): Likewise.
28458 (vectorize_fold_left_reduction): Likewise.
28459 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
28460 scalar phi in place for it. Check for target support and reject
28461 cases that would reassociate the operation. Defer the transform
28462 phase to vectorize_fold_left_reduction.
28463 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
28464 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
28465 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
28467 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28469 * tree-if-conv.c (predicate_mem_writes): Remove redundant
28470 call to ifc_temp_var.
28472 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28473 Alan Hayward <alan.hayward@arm.com>
28474 David Sherwood <david.sherwood@arm.com>
28476 * target.def (legitimize_address_displacement): Take the original
28477 offset as a poly_int.
28478 * targhooks.h (default_legitimize_address_displacement): Update
28480 * targhooks.c (default_legitimize_address_displacement): Likewise.
28481 * doc/tm.texi: Regenerate.
28482 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
28483 as an argument, moving assert of ad->disp == ad->disp_term to...
28484 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
28485 Try calling targetm.legitimize_address_displacement before expanding
28486 the address rather than afterwards, and adjust for the new interface.
28487 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
28488 Match the new hook interface. Handle SVE addresses.
28489 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
28490 new hook interface.
28492 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28494 * Makefile.in (OBJS): Add early-remat.o.
28495 * target.def (select_early_remat_modes): New hook.
28496 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
28497 * doc/tm.texi: Regenerate.
28498 * targhooks.h (default_select_early_remat_modes): Declare.
28499 * targhooks.c (default_select_early_remat_modes): New function.
28500 * timevar.def (TV_EARLY_REMAT): New timevar.
28501 * passes.def (pass_early_remat): New pass.
28502 * tree-pass.h (make_pass_early_remat): Declare.
28503 * early-remat.c: New file.
28504 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
28506 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
28508 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28509 Alan Hayward <alan.hayward@arm.com>
28510 David Sherwood <david.sherwood@arm.com>
28512 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
28513 vfm1 with a bound_epilog parameter.
28514 (vect_do_peeling): Update calls accordingly, and move the prologue
28515 call earlier in the function. Treat the base bound_epilog as 0 for
28516 fully-masked loops and retain vf - 1 for other loops. Add 1 to
28517 this base when peeling for gaps.
28518 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
28519 with fully-masked loops.
28520 (vect_estimate_min_profitable_iters): Handle the single peeled
28521 iteration in that case.
28523 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28524 Alan Hayward <alan.hayward@arm.com>
28525 David Sherwood <david.sherwood@arm.com>
28527 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
28528 single-element interleaving even if the size is not a power of 2.
28529 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
28530 accesses for single-element interleaving if the group size is
28533 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28534 Alan Hayward <alan.hayward@arm.com>
28535 David Sherwood <david.sherwood@arm.com>
28537 * doc/md.texi (fold_extract_last_@var{m}): Document.
28538 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
28539 * optabs.def (fold_extract_last_optab): New optab.
28540 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
28541 * internal-fn.c (fold_extract_direct): New macro.
28542 (expand_fold_extract_optab_fn): Likewise.
28543 (direct_fold_extract_optab_supported_p): Likewise.
28544 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
28545 * tree-vect-loop.c (vect_model_reduction_cost): Handle
28546 EXTRACT_LAST_REDUCTION.
28547 (get_initial_def_for_reduction): Do not create an initial vector
28548 for EXTRACT_LAST_REDUCTION reductions.
28549 (vectorizable_reduction): Leave the scalar phi in place for
28550 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
28551 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
28552 epilogue code for EXTRACT_LAST_REDUCTION and defer the
28553 transform phase to vectorizable_condition.
28554 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
28556 (vect_finish_stmt_generation): ...here.
28557 (vect_finish_replace_stmt): New function.
28558 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
28559 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
28561 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
28563 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28564 Alan Hayward <alan.hayward@arm.com>
28565 David Sherwood <david.sherwood@arm.com>
28567 * doc/md.texi (extract_last_@var{m}): Document.
28568 * optabs.def (extract_last_optab): New optab.
28569 * internal-fn.def (EXTRACT_LAST): New internal function.
28570 * internal-fn.c (cond_unary_direct): New macro.
28571 (expand_cond_unary_optab_fn): Likewise.
28572 (direct_cond_unary_optab_supported_p): Likewise.
28573 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
28574 loops using EXTRACT_LAST.
28575 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
28576 (extract_last_<mode>): ...this optab.
28577 (vec_extract<mode><Vel>): Update accordingly.
28579 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28580 Alan Hayward <alan.hayward@arm.com>
28581 David Sherwood <david.sherwood@arm.com>
28583 * target.def (empty_mask_is_expensive): New hook.
28584 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
28585 * doc/tm.texi: Regenerate.
28586 * targhooks.h (default_empty_mask_is_expensive): Declare.
28587 * targhooks.c (default_empty_mask_is_expensive): New function.
28588 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
28589 if the target says that empty masks are expensive.
28590 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
28592 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
28594 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28595 Alan Hayward <alan.hayward@arm.com>
28596 David Sherwood <david.sherwood@arm.com>
28598 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
28599 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
28600 (vect_use_loop_mask_for_alignment_p): New function.
28601 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
28602 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
28603 niters_skip argument. Make sure that the first niters_skip elements
28604 of the first iteration are inactive.
28605 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
28606 Update call to vect_set_loop_masks_directly.
28607 (get_misalign_in_elems): New function, split out from...
28608 (vect_gen_prolog_loop_niters): ...here.
28609 (vect_update_init_of_dr): Take a code argument that specifies whether
28610 the adjustment should be added or subtracted.
28611 (vect_update_init_of_drs): Likewise.
28612 (vect_prepare_for_masked_peels): New function.
28613 (vect_do_peeling): Skip prologue peeling if we're using a mask
28614 instead. Update call to vect_update_inits_of_drs.
28615 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28617 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
28618 alignment. Do not include the number of peeled iterations in
28619 the minimum threshold in that case.
28620 (vectorizable_induction): Adjust the start value down by
28621 LOOP_VINFO_MASK_SKIP_NITERS iterations.
28622 (vect_transform_loop): Call vect_prepare_for_masked_peels.
28623 Take the number of skipped iterations into account when calculating
28625 * tree-vect-stmts.c (vect_gen_while_not): New function.
28627 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28628 Alan Hayward <alan.hayward@arm.com>
28629 David Sherwood <david.sherwood@arm.com>
28631 * doc/sourcebuild.texi (vect_fully_masked): Document.
28632 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
28633 default value to 0.
28634 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
28636 (vect_analyze_loop_2): ...here. Don't check the vectorization
28637 factor against the number of loop iterations if the loop is
28640 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28641 Alan Hayward <alan.hayward@arm.com>
28642 David Sherwood <david.sherwood@arm.com>
28644 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
28645 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
28646 (dump_groups): Update accordingly.
28647 (iv_use::mem_type): New member variable.
28648 (address_p): New function.
28649 (record_use): Add a mem_type argument and initialize the new
28651 (record_group_use): Add a mem_type argument. Use address_p.
28652 Remove obsolete null checks of base_object. Update call to record_use.
28653 (find_interesting_uses_op): Update call to record_group_use.
28654 (find_interesting_uses_cond): Likewise.
28655 (find_interesting_uses_address): Likewise.
28656 (get_mem_type_for_internal_fn): New function.
28657 (find_address_like_use): Likewise.
28658 (find_interesting_uses_stmt): Try find_address_like_use before
28659 calling find_interesting_uses_op.
28660 (addr_offset_valid_p): Use the iv mem_type field as the type
28661 of the addressed memory.
28662 (add_autoinc_candidates): Likewise.
28663 (get_address_cost): Likewise.
28664 (split_small_address_groups_p): Use address_p.
28665 (split_address_groups): Likewise.
28666 (add_iv_candidate_for_use): Likewise.
28667 (autoinc_possible_for_pair): Likewise.
28668 (rewrite_groups): Likewise.
28669 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
28670 (determine_group_iv_cost): Update after split of USE_ADDRESS.
28671 (get_alias_ptr_type_for_ptr_address): New function.
28672 (rewrite_use_address): Rewrite address uses in calls that were
28673 identified by find_address_like_use.
28675 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28676 Alan Hayward <alan.hayward@arm.com>
28677 David Sherwood <david.sherwood@arm.com>
28679 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
28681 * gimple-expr.h (is_gimple_addressable: Likewise.
28682 * gimple-expr.c (is_gimple_address): Likewise.
28683 * internal-fn.c (expand_call_mem_ref): New function.
28684 (expand_mask_load_optab_fn): Use it.
28685 (expand_mask_store_optab_fn): Likewise.
28687 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28688 Alan Hayward <alan.hayward@arm.com>
28689 David Sherwood <david.sherwood@arm.com>
28691 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
28692 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
28693 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
28694 (cond_umax@var{mode}): Document.
28695 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
28696 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
28697 (cond_umin_optab, cond_umax_optab): New optabs.
28698 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
28699 (COND_IOR, COND_XOR): New internal functions.
28700 * internal-fn.h (get_conditional_internal_fn): Declare.
28701 * internal-fn.c (cond_binary_direct): New macro.
28702 (expand_cond_binary_optab_fn): Likewise.
28703 (direct_cond_binary_optab_supported_p): Likewise.
28704 (get_conditional_internal_fn): New function.
28705 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
28706 Cope with reduction statements that are vectorized as calls rather
28708 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
28709 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
28710 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
28711 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
28712 (UNSPEC_COND_EOR): New unspecs.
28713 (optab): Add mappings for them.
28714 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
28715 (sve_int_op, sve_fp_op): New int attributes.
28717 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28718 Alan Hayward <alan.hayward@arm.com>
28719 David Sherwood <david.sherwood@arm.com>
28721 * optabs.def (while_ult_optab): New optab.
28722 * doc/md.texi (while_ult@var{m}@var{n}): Document.
28723 * internal-fn.def (WHILE_ULT): New internal function.
28724 * internal-fn.h (direct_internal_fn_supported_p): New override
28725 that takes two types as argument.
28726 * internal-fn.c (while_direct): New macro.
28727 (expand_while_optab_fn): New function.
28728 (convert_optab_supported_p): Likewise.
28729 (direct_while_optab_supported_p): New macro.
28730 * wide-int.h (wi::udiv_ceil): New function.
28731 * tree-vectorizer.h (rgroup_masks): New structure.
28732 (vec_loop_masks): New typedef.
28733 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
28734 and fully_masked_p.
28735 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
28736 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
28737 (vect_max_vf): New function.
28738 (slpeel_make_loop_iterate_ntimes): Delete.
28739 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
28740 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
28741 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
28742 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
28743 internal-fn.h, stor-layout.h and optabs-query.h.
28744 (vect_set_loop_mask): New function.
28745 (add_preheader_seq): Likewise.
28746 (add_header_seq): Likewise.
28747 (interleave_supported_p): Likewise.
28748 (vect_maybe_permute_loop_masks): Likewise.
28749 (vect_set_loop_masks_directly): Likewise.
28750 (vect_set_loop_condition_masked): Likewise.
28751 (vect_set_loop_condition_unmasked): New function, split out from
28752 slpeel_make_loop_iterate_ntimes.
28753 (slpeel_make_loop_iterate_ntimes): Rename to..
28754 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
28755 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
28756 (vect_do_peeling): Update call accordingly.
28757 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
28759 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28760 mask_compare_type, can_fully_mask_p and fully_masked_p.
28761 (release_vec_loop_masks): New function.
28762 (_loop_vec_info): Use it to free the loop masks.
28763 (can_produce_all_loop_masks_p): New function.
28764 (vect_get_max_nscalars_per_iter): Likewise.
28765 (vect_verify_full_masking): Likewise.
28766 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
28767 retries, and free the mask rgroups before retrying. Check loop-wide
28768 reasons for disallowing fully-masked loops. Make the final decision
28769 about whether use a fully-masked loop or not.
28770 (vect_estimate_min_profitable_iters): Do not assume that peeling
28771 for the number of iterations will be needed for fully-masked loops.
28772 (vectorizable_reduction): Disable fully-masked loops.
28773 (vectorizable_live_operation): Likewise.
28774 (vect_halve_mask_nunits): New function.
28775 (vect_double_mask_nunits): Likewise.
28776 (vect_record_loop_mask): Likewise.
28777 (vect_get_loop_mask): Likewise.
28778 (vect_transform_loop): Handle the case in which the final loop
28779 iteration might handle a partial vector. Call vect_set_loop_condition
28780 instead of slpeel_make_loop_iterate_ntimes.
28781 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
28782 (check_load_store_masking): New function.
28783 (prepare_load_store_mask): Likewise.
28784 (vectorizable_store): Handle fully-masked loops.
28785 (vectorizable_load): Likewise.
28786 (supportable_widening_operation): Use vect_halve_mask_nunits for
28788 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
28789 (vect_gen_while): New function.
28790 * config/aarch64/aarch64.md (umax<mode>3): New expander.
28791 (aarch64_uqdec<mode>): New insn.
28793 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28794 Alan Hayward <alan.hayward@arm.com>
28795 David Sherwood <david.sherwood@arm.com>
28797 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
28798 (reduc_xor_scal_optab): New optabs.
28799 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
28800 (reduc_xor_scal_@var{m}): Document.
28801 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
28802 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
28803 internal functions.
28804 * fold-const-call.c (fold_const_call): Handle them.
28805 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
28806 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
28807 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
28808 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
28809 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
28810 (UNSPEC_XORV): New unspecs.
28811 (optab): Add entries for them.
28812 (BITWISEV): New int iterator.
28813 (bit_reduc_op): New int attributes.
28815 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28816 Alan Hayward <alan.hayward@arm.com>
28817 David Sherwood <david.sherwood@arm.com>
28819 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
28820 * internal-fn.def (VEC_SHL_INSERT): New internal function.
28821 * optabs.def (vec_shl_insert_optab): New optab.
28822 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
28823 (duplicate_and_interleave): Likewise.
28824 * tree-vect-loop.c: Include internal-fn.h.
28825 (neutral_op_for_slp_reduction): New function, split out from
28826 get_initial_defs_for_reduction.
28827 (get_initial_def_for_reduction): Handle option 2 for variable-length
28828 vectors by loading the neutral value into a vector and then shifting
28829 the initial value into element 0.
28830 (get_initial_defs_for_reduction): Replace the code argument with
28831 the neutral value calculated by neutral_op_for_slp_reduction.
28832 Use gimple_build_vector for constant-length vectors.
28833 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
28834 but the first group_size elements have a neutral value.
28835 Use duplicate_and_interleave otherwise.
28836 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
28837 Update call to get_initial_defs_for_reduction. Handle SLP
28838 reductions for variable-length vectors by creating one vector
28839 result for each scalar result, with the elements associated
28840 with other scalar results stubbed out with the neutral value.
28841 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
28842 Require IFN_VEC_SHL_INSERT for double reductions on
28843 variable-length vectors, or SLP reductions that have
28844 a neutral value. Require can_duplicate_and_interleave_p
28845 support for variable-length unchained SLP reductions if there
28846 is no neutral value, such as for MIN/MAX reductions. Also require
28847 the number of vector elements to be a multiple of the number of
28848 SLP statements when doing variable-length unchained SLP reductions.
28849 Update call to vect_create_epilog_for_reduction.
28850 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
28851 and remove initial values.
28852 (duplicate_and_interleave): Make public.
28853 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
28854 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
28856 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28857 Alan Hayward <alan.hayward@arm.com>
28858 David Sherwood <david.sherwood@arm.com>
28860 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
28861 (can_duplicate_and_interleave_p): New function.
28862 (vect_get_and_check_slp_defs): Take the vector of statements
28863 rather than just the current one. Remove excess parentheses.
28864 Restriction rejectinon of vect_constant_def and vect_external_def
28865 for variable-length vectors to boolean types, or types for which
28866 can_duplicate_and_interleave_p is false.
28867 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
28868 (duplicate_and_interleave): New function.
28869 (vect_get_constant_vectors): Use gimple_build_vector for
28870 constant-length vectors and suitable variable-length constant
28871 vectors. Use duplicate_and_interleave for other variable-length
28872 vectors. Don't defer the update when inserting new statements.
28874 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28875 Alan Hayward <alan.hayward@arm.com>
28876 David Sherwood <david.sherwood@arm.com>
28878 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
28879 min_profitable_iters doesn't go negative.
28881 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28882 Alan Hayward <alan.hayward@arm.com>
28883 David Sherwood <david.sherwood@arm.com>
28885 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
28886 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
28887 * optabs.def (vec_mask_load_lanes_optab): New optab.
28888 (vec_mask_store_lanes_optab): Likewise.
28889 * internal-fn.def (MASK_LOAD_LANES): New internal function.
28890 (MASK_STORE_LANES): Likewise.
28891 * internal-fn.c (mask_load_lanes_direct): New macro.
28892 (mask_store_lanes_direct): Likewise.
28893 (expand_mask_load_optab_fn): Handle masked operations.
28894 (expand_mask_load_lanes_optab_fn): New macro.
28895 (expand_mask_store_optab_fn): Handle masked operations.
28896 (expand_mask_store_lanes_optab_fn): New macro.
28897 (direct_mask_load_lanes_optab_supported_p): Likewise.
28898 (direct_mask_store_lanes_optab_supported_p): Likewise.
28899 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
28901 (vect_load_lanes_supported): Likewise.
28902 * tree-vect-data-refs.c (strip_conversion): New function.
28903 (can_group_stmts_p): Likewise.
28904 (vect_analyze_data_ref_accesses): Use it instead of checking
28905 for a pair of assignments.
28906 (vect_store_lanes_supported): Take a masked_p parameter.
28907 (vect_load_lanes_supported): Likewise.
28908 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
28909 vect_store_lanes_supported and vect_load_lanes_supported.
28910 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
28911 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
28912 parameter. Don't allow gaps for masked accesses.
28913 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
28914 and vect_load_lanes_supported.
28915 (get_load_store_type): Take a masked_p parameter and update
28916 call to get_group_load_store_type.
28917 (vectorizable_store): Update call to get_load_store_type.
28918 Handle IFN_MASK_STORE_LANES.
28919 (vectorizable_load): Update call to get_load_store_type.
28920 Handle IFN_MASK_LOAD_LANES.
28922 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28923 Alan Hayward <alan.hayward@arm.com>
28924 David Sherwood <david.sherwood@arm.com>
28926 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
28928 * config/aarch64/aarch64-protos.h
28929 (aarch64_sve_struct_memory_operand_p): Declare.
28930 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
28931 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
28932 (VPRED, vpred): Handle SVE structure modes.
28933 * config/aarch64/constraints.md (Utx): New constraint.
28934 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
28935 (aarch64_sve_struct_nonimmediate_operand): New predicates.
28936 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
28937 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
28938 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
28939 structure modes. Split into pieces after RA.
28940 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
28941 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
28943 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
28944 SVE structure modes.
28945 (aarch64_classify_address): Likewise.
28946 (sizetochar): Move earlier in file.
28947 (aarch64_print_operand): Handle SVE register lists.
28948 (aarch64_array_mode): New function.
28949 (aarch64_sve_struct_memory_operand_p): Likewise.
28950 (TARGET_ARRAY_MODE): Redefine.
28952 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28953 Alan Hayward <alan.hayward@arm.com>
28954 David Sherwood <david.sherwood@arm.com>
28956 * target.def (array_mode): New target hook.
28957 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
28958 * doc/tm.texi: Regenerate.
28959 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
28960 * hooks.c (hook_optmode_mode_uhwi_none): New function.
28961 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
28962 targetm.array_mode.
28963 * stor-layout.c (mode_for_array): Likewise. Support polynomial
28966 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28967 Alan Hayward <alan.hayward@arm.com>
28968 David Sherwood <david.sherwood@arm.com>
28970 * fold-const.c (fold_binary_loc): Check the argument types
28971 rather than the result type when testing for a vector operation.
28973 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28975 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
28976 * doc/tm.texi: Regenerate.
28978 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28979 Alan Hayward <alan.hayward@arm.com>
28980 David Sherwood <david.sherwood@arm.com>
28982 * doc/invoke.texi (-msve-vector-bits=): Document new option.
28983 (sve): Document new AArch64 extension.
28984 * doc/md.texi (w): Extend the description of the AArch64
28985 constraint to include SVE vectors.
28986 (Upl, Upa): Document new AArch64 predicate constraints.
28987 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
28989 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
28990 (msve-vector-bits=): New option.
28991 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
28992 SVE when these are disabled.
28993 (sve): New extension.
28994 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
28995 modes. Adjust their number of units based on aarch64_sve_vg.
28996 (MAX_BITSIZE_MODE_ANY_MODE): Define.
28997 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
28998 aarch64_addr_query_type.
28999 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
29000 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
29001 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
29002 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
29003 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
29004 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
29005 (aarch64_simd_imm_zero_p): Delete.
29006 (aarch64_check_zero_based_sve_index_immediate): Declare.
29007 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29008 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29009 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29010 (aarch64_sve_float_mul_immediate_p): Likewise.
29011 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29012 rather than an rtx.
29013 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
29014 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
29015 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
29016 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
29017 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
29018 (aarch64_regmode_natural_size): Likewise.
29019 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
29020 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
29022 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
29023 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
29024 for VG and the SVE predicate registers.
29025 (V_ALIASES): Add a "z"-prefixed alias.
29026 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
29027 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
29028 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
29029 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
29030 (REG_CLASS_NAMES): Add entries for them.
29031 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
29032 and the predicate registers.
29033 (aarch64_sve_vg): Declare.
29034 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
29035 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
29036 (REGMODE_NATURAL_SIZE): Define.
29037 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
29039 * config/aarch64/aarch64.c: Include cfgrtl.h.
29040 (simd_immediate_info): Add a constructor for series vectors,
29041 and an associated step field.
29042 (aarch64_sve_vg): New variable.
29043 (aarch64_dbx_register_number): Handle VG and the predicate registers.
29044 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
29045 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
29046 (VEC_ANY_DATA, VEC_STRUCT): New constants.
29047 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
29048 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
29049 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
29050 (aarch64_get_mask_mode): New functions.
29051 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
29052 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
29053 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
29054 predicate modes and predicate registers. Explicitly restrict
29055 GPRs to modes of 16 bytes or smaller. Only allow FP registers
29056 to store a vector mode if it is recognized by
29057 aarch64_classify_vector_mode.
29058 (aarch64_regmode_natural_size): New function.
29059 (aarch64_hard_regno_caller_save_mode): Return the original mode
29061 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
29062 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
29063 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
29064 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
29066 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
29067 does not overlap dest if the function is frame-related. Handle
29069 (aarch64_split_add_offset): New function.
29070 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
29071 them aarch64_add_offset.
29072 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
29073 and update call to aarch64_sub_sp.
29074 (aarch64_add_cfa_expression): New function.
29075 (aarch64_expand_prologue): Pass extra temporary registers to the
29076 functions above. Handle the case in which we need to emit new
29077 DW_CFA_expressions for registers that were originally saved
29078 relative to the stack pointer, but now have to be expressed
29079 relative to the frame pointer.
29080 (aarch64_output_mi_thunk): Pass extra temporary registers to the
29082 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
29083 IP0 and IP1 values for SVE frames.
29084 (aarch64_expand_vec_series): New function.
29085 (aarch64_expand_sve_widened_duplicate): Likewise.
29086 (aarch64_expand_sve_const_vector): Likewise.
29087 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
29088 Handle SVE constants. Use emit_move_insn to move a force_const_mem
29089 into the register, rather than emitting a SET directly.
29090 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
29091 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
29092 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
29093 (offset_9bit_signed_scaled_p): New functions.
29094 (aarch64_replicate_bitmask_imm): New function.
29095 (aarch64_bitmask_imm): Use it.
29096 (aarch64_cannot_force_const_mem): Reject expressions involving
29097 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
29098 (aarch64_classify_index): Handle SVE indices, by requiring
29099 a plain register index with a scale that matches the element size.
29100 (aarch64_classify_address): Handle SVE addresses. Assert that
29101 the mode of the address is VOIDmode or an integer mode.
29102 Update call to aarch64_classify_symbol.
29103 (aarch64_classify_symbolic_expression): Update call to
29104 aarch64_classify_symbol.
29105 (aarch64_const_vec_all_in_range_p): New function.
29106 (aarch64_print_vector_float_operand): Likewise.
29107 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
29108 "vN" for FP registers with SVE modes. Handle (const ...) vectors
29109 and the FP immediates 1.0 and 0.5.
29110 (aarch64_print_address_internal): Handle SVE addresses.
29111 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
29112 (aarch64_regno_regclass): Handle predicate registers.
29113 (aarch64_secondary_reload): Handle big-endian reloads of SVE
29115 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
29116 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
29117 (aarch64_convert_sve_vector_bits): New function.
29118 (aarch64_override_options): Use it to handle -msve-vector-bits=.
29119 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29120 rather than an rtx.
29121 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
29122 Handle SVE vector and predicate modes. Accept VL-based constants
29123 that need only one temporary register, and VL offsets that require
29124 no temporary registers.
29125 (aarch64_conditional_register_usage): Mark the predicate registers
29126 as fixed if SVE isn't available.
29127 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
29128 Return true for SVE vector and predicate modes.
29129 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
29130 rather than an unsigned int. Handle SVE modes.
29131 (aarch64_preferred_simd_mode): Update call accordingly. Handle
29133 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
29135 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29136 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29137 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29138 (aarch64_sve_float_mul_immediate_p): New functions.
29139 (aarch64_sve_valid_immediate): New function.
29140 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
29141 Explicitly reject structure modes. Check for INDEX constants.
29142 Handle PTRUE and PFALSE constants.
29143 (aarch64_check_zero_based_sve_index_immediate): New function.
29144 (aarch64_simd_imm_zero_p): Delete.
29145 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
29146 vector modes. Accept constants in the range of CNT[BHWD].
29147 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
29148 ask for an Advanced SIMD mode.
29149 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
29150 (aarch64_simd_vector_alignment): Handle SVE predicates.
29151 (aarch64_vectorize_preferred_vector_alignment): New function.
29152 (aarch64_simd_vector_alignment_reachable): Use it instead of
29154 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
29155 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
29157 (MAX_VECT_LEN): Delete.
29158 (expand_vec_perm_d): Add a vec_flags field.
29159 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
29160 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
29161 (aarch64_evpc_ext): Don't apply a big-endian lane correction
29163 (aarch64_evpc_rev): Rename to...
29164 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
29165 (aarch64_evpc_rev_global): New function.
29166 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
29167 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
29169 (aarch64_evpc_sve_tbl): New function.
29170 (aarch64_expand_vec_perm_const_1): Update after rename of
29171 aarch64_evpc_rev. Handle SVE permutes too, trying
29172 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
29173 than aarch64_evpc_tbl.
29174 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
29175 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
29176 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
29177 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
29178 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
29179 (aarch64_expand_sve_vcond): New functions.
29180 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
29181 of aarch64_vector_mode_p.
29182 (aarch64_dwarf_poly_indeterminate_value): New function.
29183 (aarch64_compute_pressure_classes): Likewise.
29184 (aarch64_can_change_mode_class): Likewise.
29185 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
29186 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
29187 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
29188 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
29189 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
29190 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
29191 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
29192 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
29194 (Dn, Dl, Dr): Accept const as well as const_vector.
29195 (Dz): Likewise. Compare against CONST0_RTX.
29196 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
29197 of "vector" where appropriate.
29198 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
29199 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
29200 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
29201 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
29202 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
29203 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
29204 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
29205 (v_int_equiv): Extend to SVE modes.
29206 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
29208 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
29209 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
29210 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
29211 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
29212 (SVE_COND_FP_CMP): New int iterators.
29213 (perm_hilo): Handle the new unpack unspecs.
29214 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
29216 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
29217 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
29218 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
29219 (aarch64_equality_operator, aarch64_constant_vector_operand)
29220 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
29221 (aarch64_sve_nonimmediate_operand): Likewise.
29222 (aarch64_sve_general_operand): Likewise.
29223 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
29224 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
29225 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
29226 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
29227 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
29228 (aarch64_sve_float_arith_immediate): Likewise.
29229 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
29230 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
29231 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
29232 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
29233 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
29234 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
29235 (aarch64_sve_float_arith_operand): Likewise.
29236 (aarch64_sve_float_arith_with_sub_operand): Likewise.
29237 (aarch64_sve_float_mul_operand): Likewise.
29238 (aarch64_sve_vec_perm_operand): Likewise.
29239 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
29240 (aarch64_mov_operand): Accept const_poly_int and const_vector.
29241 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
29242 as well as const_vector.
29243 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
29244 in file. Use CONST0_RTX and CONSTM1_RTX.
29245 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
29246 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
29247 Use aarch64_simd_imm_zero.
29248 * config/aarch64/aarch64-sve.md: New file.
29249 * config/aarch64/aarch64.md: Include it.
29250 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
29251 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
29252 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
29253 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
29254 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
29255 (sve): New attribute.
29256 (enabled): Disable instructions with the sve attribute unless
29258 (movqi, movhi): Pass CONST_POLY_INT operaneds through
29259 aarch64_expand_mov_immediate.
29260 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
29261 CNT[BHSD] immediates.
29262 (movti): Split CONST_POLY_INT moves into two halves.
29263 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
29264 Split additions that need a temporary here if the destination
29265 is the stack pointer.
29266 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
29267 (*add<mode>3_poly_1): New instruction.
29268 (set_clobber_cc): New expander.
29270 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29272 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
29273 parameter and use it instead of GET_MODE_SIZE (innermode). Use
29274 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
29275 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
29276 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
29277 Change innermode from fixed_mode_size to machine_mode.
29278 (simplify_subreg): Update call accordingly. Handle a constant-sized
29279 subreg of a variable-length CONST_VECTOR.
29281 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29282 Alan Hayward <alan.hayward@arm.com>
29283 David Sherwood <david.sherwood@arm.com>
29285 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
29286 (add_offset_to_base): New function, split out from...
29287 (create_mem_ref): ...here. When handling a scale other than 1,
29288 check first whether the address is valid without the offset.
29289 Add it into the base if so, leaving the index and scale as-is.
29291 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29294 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
29295 fold_for_warn before checking if arg2 is INTEGER_CST.
29297 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
29299 * config/rs6000/predicates.md (load_multiple_operation): Delete.
29300 (store_multiple_operation): Delete.
29301 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
29302 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
29303 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
29304 guarded by TARGET_STRING.
29305 (rs6000_output_load_multiple): Delete.
29306 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
29307 OPTION_MASK_STRING / TARGET_STRING handling.
29308 (print_operand) <'N', 'O'>: Add comment that these are unused now.
29309 (const rs6000_opt_masks) <"string">: Change mask to 0.
29310 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
29311 (MASK_STRING): Delete.
29312 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
29314 (load_multiple): Delete.
29321 (store_multiple): Delete.
29328 (movmemsi_8reg): Delete.
29329 (corresponding unnamed define_insn): Delete.
29330 (movmemsi_6reg): Delete.
29331 (corresponding unnamed define_insn): Delete.
29332 (movmemsi_4reg): Delete.
29333 (corresponding unnamed define_insn): Delete.
29334 (movmemsi_2reg): Delete.
29335 (corresponding unnamed define_insn): Delete.
29336 (movmemsi_1reg): Delete.
29337 (corresponding unnamed define_insn): Delete.
29338 * config/rs6000/rs6000.opt (mno-string): New.
29339 (mstring): Replace by deprecation warning stub.
29340 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
29342 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29344 * regrename.c (regrename_do_replace): If replacing the same
29345 reg multiple times, try to reuse last created gen_raw_REG.
29348 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
29349 main to workaround a bug in GDB.
29351 2018-01-12 Tom de Vries <tom@codesourcery.com>
29354 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
29356 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
29358 PR rtl-optimization/80481
29359 * ira-color.c (get_cap_member): New function.
29360 (allocnos_conflict_by_live_ranges_p): Use it.
29361 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
29362 (setup_slot_coalesced_allocno_live_ranges): Ditto.
29364 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
29367 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
29368 (*saddl_se_1): Ditto.
29369 (*ssubsi_1): Ditto.
29370 (*ssubl_se_1): Ditto.
29372 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29374 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
29375 rather than wi::to_widest for DR_INITs.
29376 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
29377 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
29378 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
29380 (vect_analyze_group_access_1): Note that here.
29382 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29384 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
29385 polynomial type sizes.
29387 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29389 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
29390 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
29391 (gimple_add_tmp_var): Likewise.
29393 2018-01-12 Martin Liska <mliska@suse.cz>
29395 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
29396 (gimple_alloc_sizes): Likewise.
29397 (dump_gimple_statistics): Use PRIu64 in printf format.
29398 * gimple.h: Change uint64_t to int.
29400 2018-01-12 Martin Liska <mliska@suse.cz>
29402 * tree-core.h: Use uint64_t instead of int.
29403 * tree.c (tree_node_counts): Likewise.
29404 (tree_node_sizes): Likewise.
29405 (dump_tree_statistics): Use PRIu64 in printf format.
29407 2018-01-12 Martin Liska <mliska@suse.cz>
29409 * Makefile.in: As qsort_chk is implemented in vec.c, add
29410 vec.o to linkage of gencfn-macros.
29411 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
29412 passing the info to record_node_allocation_statistics.
29413 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
29415 * ggc-common.c (struct ggc_usage): Add operator== and use
29416 it in operator< and compare function.
29417 * mem-stats.h (struct mem_usage): Likewise.
29418 * vec.c (struct vec_usage): Remove operator< and compare
29419 function. Can be simply inherited.
29421 2018-01-12 Martin Jambor <mjambor@suse.cz>
29424 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
29425 * tree-ssa-math-opts.c: Include domwalk.h.
29426 (convert_mult_to_fma_1): New function.
29427 (fma_transformation_info): New type.
29428 (fma_deferring_state): Likewise.
29429 (cancel_fma_deferring): New function.
29430 (result_of_phi): Likewise.
29431 (last_fma_candidate_feeds_initial_phi): Likewise.
29432 (convert_mult_to_fma): Added deferring logic, split actual
29433 transformation to convert_mult_to_fma_1.
29434 (math_opts_dom_walker): New type.
29435 (math_opts_dom_walker::after_dom_children): New method, body moved
29436 here from pass_optimize_widening_mul::execute, added deferring logic
29438 (pass_optimize_widening_mul::execute): Moved most of code to
29439 math_opts_dom_walker::after_dom_children.
29440 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
29441 * config/i386/i386.c (ix86_option_override_internal): Added
29442 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
29444 2018-01-12 Richard Biener <rguenther@suse.de>
29447 * dwarf2out.c (gen_variable_die): Do not reset old_die for
29448 inline instance vars.
29450 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
29453 * config/rx/rx.c (rx_is_restricted_memory_address):
29454 Handle SUBREG case.
29456 2018-01-12 Richard Biener <rguenther@suse.de>
29458 PR tree-optimization/80846
29459 * target.def (split_reduction): New target hook.
29460 * targhooks.c (default_split_reduction): New function.
29461 * targhooks.h (default_split_reduction): Declare.
29462 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
29463 target requests first reduce vectors by combining low and high
29465 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
29466 (get_vectype_for_scalar_type_and_size): Export.
29467 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
29468 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
29469 * doc/tm.texi: Regenerate.
29470 * config/i386/i386.c (ix86_split_reduction): Implement
29471 TARGET_VECTORIZE_SPLIT_REDUCTION.
29473 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29476 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
29477 in PIC mode except for TARGET_VXWORKS_RTP.
29478 * config/sparc/sparc.c: Include cfgrtl.h.
29479 (TARGET_INIT_PIC_REG): Define.
29480 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
29481 (sparc_pic_register_p): New predicate.
29482 (sparc_legitimate_address_p): Use it.
29483 (sparc_legitimize_pic_address): Likewise.
29484 (sparc_delegitimize_address): Likewise.
29485 (sparc_mode_dependent_address_p): Likewise.
29486 (gen_load_pcrel_sym): Remove 4th parameter.
29487 (load_got_register): Adjust call to above. Remove obsolete stuff.
29488 (sparc_expand_prologue): Do not call load_got_register here.
29489 (sparc_flat_expand_prologue): Likewise.
29490 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
29491 (sparc_use_pseudo_pic_reg): New function.
29492 (sparc_init_pic_reg): Likewise.
29493 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
29494 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
29496 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
29498 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
29499 Add item for branch_cost.
29501 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29503 PR rtl-optimization/83565
29504 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
29505 not extend the result to a larger mode for rotate operations.
29506 (num_sign_bit_copies1): Likewise.
29508 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29511 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
29513 Use values-Xc.o for -pedantic.
29514 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
29516 2018-01-12 Martin Liska <mliska@suse.cz>
29519 * ipa-devirt.c (final_warning_record::grow_type_warnings):
29521 (possible_polymorphic_call_targets): Use it.
29522 (ipa_devirt): Likewise.
29524 2018-01-12 Martin Liska <mliska@suse.cz>
29526 * profile-count.h (enum profile_quality): Use 0 as invalid
29527 enum value of profile_quality.
29529 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
29531 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
29532 -mext-string options.
29534 2018-01-12 Richard Biener <rguenther@suse.de>
29536 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
29537 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
29538 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
29540 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
29542 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
29544 * configure.ac (--with-long-double-format): Add support for the
29545 configuration option to change the default long double format on
29547 * config.gcc (powerpc*-linux*-*): Likewise.
29548 * configure: Regenerate.
29549 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
29550 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
29551 used without modification.
29553 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29555 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
29556 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
29557 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
29558 MISC_BUILTIN_SPEC_BARRIER.
29559 (rs6000_init_builtins): Likewise.
29560 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
29562 (speculation_barrier): New define_insn.
29563 * doc/extend.texi: Document __builtin_speculation_barrier.
29565 2018-01-11 Jakub Jelinek <jakub@redhat.com>
29568 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
29569 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
29570 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
29572 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
29573 integral modes instead of "ss" and "sd".
29574 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
29575 vectors with 32-bit and 64-bit elements.
29576 (vecdupssescalarmodesuffix): New mode attribute.
29577 (vec_dup<mode>): Use it.
29579 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
29582 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
29583 frame if argument is passed on stack.
29585 2018-01-11 Jakub Jelinek <jakub@redhat.com>
29588 * ree.c (combine_reaching_defs): Optimize also
29589 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
29590 reg2=any_extend(exp); reg1=reg2;, formatting fix.
29592 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
29594 PR middle-end/83189
29595 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
29597 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
29599 PR middle-end/83718
29600 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
29601 after they are computed.
29603 2018-01-11 Bin Cheng <bin.cheng@arm.com>
29605 PR tree-optimization/83695
29606 * gimple-loop-linterchange.cc
29607 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
29608 reset cached scev information after interchange.
29609 (pass_linterchange::execute): Remove call to scev_reset_htab.
29611 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29613 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
29614 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
29615 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
29616 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
29617 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
29618 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
29619 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
29620 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
29621 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
29622 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
29623 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
29624 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
29625 (V_lane_reg): Likewise.
29626 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
29628 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
29629 (vfmal_lane_low<mode>_intrinsic,
29630 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
29631 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
29632 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
29633 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
29634 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
29635 vfmsl_lane_high<mode>_intrinsic): New define_insns.
29637 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29639 * config/arm/arm-cpus.in (fp16fml): New feature.
29640 (ALL_SIMD): Add fp16fml.
29641 (armv8.2-a): Add fp16fml as an option.
29642 (armv8.3-a): Likewise.
29643 (armv8.4-a): Add fp16fml as part of fp16.
29644 * config/arm/arm.h (TARGET_FP16FML): Define.
29645 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
29647 * config/arm/arm-modes.def (V2HF): Define.
29648 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
29649 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
29650 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
29651 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
29652 vfmsl_low, vfmsl_high): New set of builtins.
29653 * config/arm/iterators.md (PLUSMINUS): New code iterator.
29654 (vfml_op): New code attribute.
29655 (VFMLHALVES): New int iterator.
29656 (VFML, VFMLSEL): New mode attributes.
29657 (V_reg): Define mapping for V2HF.
29658 (V_hi, V_lo): New mode attributes.
29659 (VF_constraint): Likewise.
29660 (vfml_half, vfml_half_selector): New int attributes.
29661 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
29663 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
29664 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
29666 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
29667 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
29668 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
29669 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
29671 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
29672 Document new effective target and option set.
29674 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29676 * config/arm/arm-cpus.in (armv8_4): New feature.
29677 (ARMv8_4a): New fgroup.
29678 (armv8.4-a): New arch.
29679 * config/arm/arm-tables.opt: Regenerate.
29680 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
29681 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
29682 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
29683 Add matching rules for -march=armv8.4-a and extensions.
29684 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
29686 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
29689 * config/rx/rx.md (BW): New mode attribute.
29690 (sync_lock_test_and_setsi): Add mode suffix to insn output.
29692 2018-01-11 Richard Biener <rguenther@suse.de>
29694 PR tree-optimization/83435
29695 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
29696 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
29697 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
29699 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29700 Alan Hayward <alan.hayward@arm.com>
29701 David Sherwood <david.sherwood@arm.com>
29703 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
29705 (aarch64_classify_address): Initialize it. Track polynomial offsets.
29706 (aarch64_print_address_internal): Use it to check for a zero offset.
29708 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29709 Alan Hayward <alan.hayward@arm.com>
29710 David Sherwood <david.sherwood@arm.com>
29712 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
29713 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
29714 Return a poly_int64 rather than a HOST_WIDE_INT.
29715 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
29716 rather than a HOST_WIDE_INT.
29717 * config/aarch64/aarch64.h (aarch64_frame): Protect with
29718 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
29719 hard_fp_offset, frame_size, initial_adjust, callee_offset and
29720 final_offset from HOST_WIDE_INT to poly_int64.
29721 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
29722 to_constant when getting the number of units in an Advanced SIMD
29724 (aarch64_builtin_vectorized_function): Check for a constant number
29726 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
29728 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
29729 attribute instead of GET_MODE_NUNITS.
29730 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
29731 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
29732 GET_MODE_SIZE for fixed-size registers.
29733 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
29734 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
29735 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
29736 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
29737 (aarch64_print_operand, aarch64_print_address_internal)
29738 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
29739 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
29740 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
29741 Handle polynomial GET_MODE_SIZE.
29742 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
29743 wider than SImode without modification.
29744 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
29745 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
29746 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
29747 passing and returning SVE modes.
29748 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
29749 rather than GEN_INT.
29750 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
29751 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
29752 (aarch64_allocate_and_probe_stack_space): Likewise.
29753 (aarch64_layout_frame): Cope with polynomial offsets.
29754 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
29755 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
29756 polynomial offsets.
29757 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
29758 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
29759 poly_int64 rather than a HOST_WIDE_INT.
29760 (aarch64_get_separate_components, aarch64_process_components)
29761 (aarch64_expand_prologue, aarch64_expand_epilogue)
29762 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
29763 (aarch64_anchor_offset): New function, split out from...
29764 (aarch64_legitimize_address): ...here.
29765 (aarch64_builtin_vectorization_cost): Handle polynomial
29766 TYPE_VECTOR_SUBPARTS.
29767 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
29769 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
29770 number of elements from the PARALLEL rather than the mode.
29771 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
29772 rather than GET_MODE_BITSIZE.
29773 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
29774 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
29775 (aarch64_expand_vec_perm_const_1): Handle polynomial
29776 d->perm.length () and d->perm elements.
29777 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
29778 Apply to_constant to d->perm elements.
29779 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
29780 polynomial CONST_VECTOR_NUNITS.
29781 (aarch64_move_pointer): Take amount as a poly_int64 rather
29783 (aarch64_progress_pointer): Avoid temporary variable.
29784 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
29785 the mode attribute instead of GET_MODE.
29787 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29788 Alan Hayward <alan.hayward@arm.com>
29789 David Sherwood <david.sherwood@arm.com>
29791 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
29792 x exists before using it.
29793 (aarch64_add_constant_internal): Rename to...
29794 (aarch64_add_offset_1): ...this. Replace regnum with separate
29795 src and dest rtxes. Handle the case in which they're different,
29796 including when the offset is zero. Replace scratchreg with an rtx.
29797 Use 2 additions if there is no spare register into which we can
29798 move a 16-bit constant.
29799 (aarch64_add_constant): Delete.
29800 (aarch64_add_offset): Replace reg with separate src and dest
29801 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
29802 Use aarch64_add_offset_1.
29803 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
29804 an rtx rather than an int. Take the delta as a poly_int64
29805 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
29806 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
29807 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
29808 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
29809 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
29810 and aarch64_add_sp.
29811 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
29812 aarch64_add_constant.
29814 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29816 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
29817 Use scalar_float_mode.
29819 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29821 * config/aarch64/aarch64-simd.md
29822 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
29823 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
29824 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
29825 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
29826 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
29827 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
29828 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
29829 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
29830 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
29831 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
29833 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29836 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
29837 targ_options->x_arm_arch_string is non NULL.
29839 2018-01-11 Tamar Christina <tamar.christina@arm.com>
29841 * config/aarch64/aarch64.h
29842 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
29844 2018-01-11 Sudakshina Das <sudi.das@arm.com>
29847 * expmed.c (emit_store_flag_force): Swap if const op0
29848 and change VOIDmode to mode of op0.
29850 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29852 PR rtl-optimization/83761
29853 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
29854 than bytes to mode_for_size.
29856 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29858 PR middle-end/83189
29859 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
29860 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
29863 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29865 PR middle-end/83575
29866 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
29867 when in layout mode.
29868 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
29869 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
29872 2018-01-10 Michael Collison <michael.collison@arm.com>
29874 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
29875 * config/aarch64/aarch64-option-extension.def: Add
29876 AARCH64_OPT_EXTENSION of 'fp16fml'.
29877 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29878 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
29879 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
29880 * config/aarch64/constraints.md (Ui7): New constraint.
29881 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
29882 (VFMLA_SEL_W): Ditto.
29885 (VFMLA16_LOW): New int iterator.
29886 (VFMLA16_HIGH): Ditto.
29887 (UNSPEC_FMLAL): New unspec.
29888 (UNSPEC_FMLSL): Ditto.
29889 (UNSPEC_FMLAL2): Ditto.
29890 (UNSPEC_FMLSL2): Ditto.
29891 (f16mac): New code attribute.
29892 * config/aarch64/aarch64-simd-builtins.def
29893 (aarch64_fmlal_lowv2sf): Ditto.
29894 (aarch64_fmlsl_lowv2sf): Ditto.
29895 (aarch64_fmlalq_lowv4sf): Ditto.
29896 (aarch64_fmlslq_lowv4sf): Ditto.
29897 (aarch64_fmlal_highv2sf): Ditto.
29898 (aarch64_fmlsl_highv2sf): Ditto.
29899 (aarch64_fmlalq_highv4sf): Ditto.
29900 (aarch64_fmlslq_highv4sf): Ditto.
29901 (aarch64_fmlal_lane_lowv2sf): Ditto.
29902 (aarch64_fmlsl_lane_lowv2sf): Ditto.
29903 (aarch64_fmlal_laneq_lowv2sf): Ditto.
29904 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
29905 (aarch64_fmlalq_lane_lowv4sf): Ditto.
29906 (aarch64_fmlsl_lane_lowv4sf): Ditto.
29907 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
29908 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
29909 (aarch64_fmlal_lane_highv2sf): Ditto.
29910 (aarch64_fmlsl_lane_highv2sf): Ditto.
29911 (aarch64_fmlal_laneq_highv2sf): Ditto.
29912 (aarch64_fmlsl_laneq_highv2sf): Ditto.
29913 (aarch64_fmlalq_lane_highv4sf): Ditto.
29914 (aarch64_fmlsl_lane_highv4sf): Ditto.
29915 (aarch64_fmlalq_laneq_highv4sf): Ditto.
29916 (aarch64_fmlsl_laneq_highv4sf): Ditto.
29917 * config/aarch64/aarch64-simd.md:
29918 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
29919 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29920 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
29921 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29922 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
29923 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
29924 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
29925 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
29926 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
29927 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
29928 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
29929 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
29930 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
29931 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
29932 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
29933 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
29934 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
29935 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
29936 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
29937 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
29938 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
29939 (vfmlsl_low_u32): Ditto.
29940 (vfmlalq_low_u32): Ditto.
29941 (vfmlslq_low_u32): Ditto.
29942 (vfmlal_high_u32): Ditto.
29943 (vfmlsl_high_u32): Ditto.
29944 (vfmlalq_high_u32): Ditto.
29945 (vfmlslq_high_u32): Ditto.
29946 (vfmlal_lane_low_u32): Ditto.
29947 (vfmlsl_lane_low_u32): Ditto.
29948 (vfmlal_laneq_low_u32): Ditto.
29949 (vfmlsl_laneq_low_u32): Ditto.
29950 (vfmlalq_lane_low_u32): Ditto.
29951 (vfmlslq_lane_low_u32): Ditto.
29952 (vfmlalq_laneq_low_u32): Ditto.
29953 (vfmlslq_laneq_low_u32): Ditto.
29954 (vfmlal_lane_high_u32): Ditto.
29955 (vfmlsl_lane_high_u32): Ditto.
29956 (vfmlal_laneq_high_u32): Ditto.
29957 (vfmlsl_laneq_high_u32): Ditto.
29958 (vfmlalq_lane_high_u32): Ditto.
29959 (vfmlslq_lane_high_u32): Ditto.
29960 (vfmlalq_laneq_high_u32): Ditto.
29961 (vfmlslq_laneq_high_u32): Ditto.
29962 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
29963 (AARCH64_FL_FOR_ARCH8_4): New.
29964 (AARCH64_ISA_F16FML): New ISA flag.
29965 (TARGET_F16FML): New feature flag for fp16fml.
29966 (doc/invoke.texi): Document new fp16fml option.
29968 2018-01-10 Michael Collison <michael.collison@arm.com>
29970 * config/aarch64/aarch64-builtins.c:
29971 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
29972 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29973 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
29974 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
29975 (AARCH64_ISA_SHA3): New ISA flag.
29976 (TARGET_SHA3): New feature flag for sha3.
29977 * config/aarch64/iterators.md (sha512_op): New int attribute.
29978 (CRYPTO_SHA512): New int iterator.
29979 (UNSPEC_SHA512H): New unspec.
29980 (UNSPEC_SHA512H2): Ditto.
29981 (UNSPEC_SHA512SU0): Ditto.
29982 (UNSPEC_SHA512SU1): Ditto.
29983 * config/aarch64/aarch64-simd-builtins.def
29984 (aarch64_crypto_sha512hqv2di): New builtin.
29985 (aarch64_crypto_sha512h2qv2di): Ditto.
29986 (aarch64_crypto_sha512su0qv2di): Ditto.
29987 (aarch64_crypto_sha512su1qv2di): Ditto.
29988 (aarch64_eor3qv8hi): Ditto.
29989 (aarch64_rax1qv2di): Ditto.
29990 (aarch64_xarqv2di): Ditto.
29991 (aarch64_bcaxqv8hi): Ditto.
29992 * config/aarch64/aarch64-simd.md:
29993 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
29994 (aarch64_crypto_sha512su0qv2di): Ditto.
29995 (aarch64_crypto_sha512su1qv2di): Ditto.
29996 (aarch64_eor3qv8hi): Ditto.
29997 (aarch64_rax1qv2di): Ditto.
29998 (aarch64_xarqv2di): Ditto.
29999 (aarch64_bcaxqv8hi): Ditto.
30000 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
30001 (vsha512h2q_u64): Ditto.
30002 (vsha512su0q_u64): Ditto.
30003 (vsha512su1q_u64): Ditto.
30004 (veor3q_u16): Ditto.
30005 (vrax1q_u64): Ditto.
30006 (vxarq_u64): Ditto.
30007 (vbcaxq_u16): Ditto.
30008 * config/arm/types.md (crypto_sha512): New type attribute.
30009 (crypto_sha3): Ditto.
30010 (doc/invoke.texi): Document new sha3 option.
30012 2018-01-10 Michael Collison <michael.collison@arm.com>
30014 * config/aarch64/aarch64-builtins.c:
30015 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
30016 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30017 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
30018 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
30019 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
30020 (AARCH64_ISA_SM4): New ISA flag.
30021 (TARGET_SM4): New feature flag for sm4.
30022 * config/aarch64/aarch64-simd-builtins.def
30023 (aarch64_sm3ss1qv4si): Ditto.
30024 (aarch64_sm3tt1aq4si): Ditto.
30025 (aarch64_sm3tt1bq4si): Ditto.
30026 (aarch64_sm3tt2aq4si): Ditto.
30027 (aarch64_sm3tt2bq4si): Ditto.
30028 (aarch64_sm3partw1qv4si): Ditto.
30029 (aarch64_sm3partw2qv4si): Ditto.
30030 (aarch64_sm4eqv4si): Ditto.
30031 (aarch64_sm4ekeyqv4si): Ditto.
30032 * config/aarch64/aarch64-simd.md:
30033 (aarch64_sm3ss1qv4si): Ditto.
30034 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
30035 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
30036 (aarch64_sm4eqv4si): Ditto.
30037 (aarch64_sm4ekeyqv4si): Ditto.
30038 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
30039 (sm3part_op): Ditto.
30040 (CRYPTO_SM3TT): Ditto.
30041 (CRYPTO_SM3PART): Ditto.
30042 (UNSPEC_SM3SS1): New unspec.
30043 (UNSPEC_SM3TT1A): Ditto.
30044 (UNSPEC_SM3TT1B): Ditto.
30045 (UNSPEC_SM3TT2A): Ditto.
30046 (UNSPEC_SM3TT2B): Ditto.
30047 (UNSPEC_SM3PARTW1): Ditto.
30048 (UNSPEC_SM3PARTW2): Ditto.
30049 (UNSPEC_SM4E): Ditto.
30050 (UNSPEC_SM4EKEY): Ditto.
30051 * config/aarch64/constraints.md (Ui2): New constraint.
30052 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
30053 * config/arm/types.md (crypto_sm3): New type attribute.
30054 (crypto_sm4): Ditto.
30055 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
30056 (vsm3tt1aq_u32): Ditto.
30057 (vsm3tt1bq_u32): Ditto.
30058 (vsm3tt2aq_u32): Ditto.
30059 (vsm3tt2bq_u32): Ditto.
30060 (vsm3partw1q_u32): Ditto.
30061 (vsm3partw2q_u32): Ditto.
30062 (vsm4eq_u32): Ditto.
30063 (vsm4ekeyq_u32): Ditto.
30064 (doc/invoke.texi): Document new sm4 option.
30066 2018-01-10 Michael Collison <michael.collison@arm.com>
30068 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
30069 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
30070 (AARCH64_FL_FOR_ARCH8_4): New.
30071 (AARCH64_FL_V8_4): New flag.
30072 (doc/invoke.texi): Document new armv8.4-a option.
30074 2018-01-10 Michael Collison <michael.collison@arm.com>
30076 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30077 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
30078 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
30079 * config/aarch64/aarch64-option-extension.def: Add
30080 AARCH64_OPT_EXTENSION of 'sha2'.
30081 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
30082 (crypto): Disable sha2 and aes if crypto disabled.
30083 (crypto): Enable aes and sha2 if enabled.
30084 (simd): Disable sha2 and aes if simd disabled.
30085 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
30087 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
30088 (TARGET_SHA2): New feature flag for sha2.
30089 (TARGET_AES): New feature flag for aes.
30090 * config/aarch64/aarch64-simd.md:
30091 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
30092 conditional on TARGET_AES.
30093 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
30094 (aarch64_crypto_sha1hsi): Make pattern conditional
30096 (aarch64_crypto_sha1hv4si): Ditto.
30097 (aarch64_be_crypto_sha1hv4si): Ditto.
30098 (aarch64_crypto_sha1su1v4si): Ditto.
30099 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
30100 (aarch64_crypto_sha1su0v4si): Ditto.
30101 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
30102 (aarch64_crypto_sha256su0v4si): Ditto.
30103 (aarch64_crypto_sha256su1v4si): Ditto.
30104 (doc/invoke.texi): Document new aes and sha2 options.
30106 2018-01-10 Martin Sebor <msebor@redhat.com>
30108 PR tree-optimization/83781
30109 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
30112 2018-01-11 Martin Sebor <msebor@gmail.com>
30113 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30115 PR tree-optimization/83501
30116 PR tree-optimization/81703
30118 * tree-ssa-strlen.c (get_string_cst): Rename...
30119 (get_string_len): ...to this. Handle global constants.
30120 (handle_char_store): Adjust.
30122 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
30123 Jim Wilson <jimw@sifive.com>
30125 * config/riscv/riscv-protos.h (riscv_output_return): New.
30126 * config/riscv/riscv.c (struct machine_function): New naked_p field.
30127 (riscv_attribute_table, riscv_output_return),
30128 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
30129 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
30130 (riscv_compute_frame_info): Only compute frame->mask if not a naked
30132 (riscv_expand_prologue): Add early return for naked function.
30133 (riscv_expand_epilogue): Likewise.
30134 (riscv_function_ok_for_sibcall): Return false for naked function.
30135 (riscv_set_current_function): New.
30136 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
30137 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
30138 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
30139 * doc/extend.texi (RISC-V Function Attributes): New.
30141 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
30143 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
30144 check for 128-bit long double before checking TCmode.
30145 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
30146 128-bit long doubles before checking TFmode or TCmode.
30147 (FLOAT128_IBM_P): Likewise.
30149 2018-01-10 Martin Sebor <msebor@redhat.com>
30151 PR tree-optimization/83671
30152 * builtins.c (c_strlen): Unconditionally return zero for the empty
30154 Use -Warray-bounds for warnings.
30155 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
30156 for non-constant array indices with COMPONENT_REF, arrays of
30157 arrays, and pointers to arrays.
30158 (gimple_fold_builtin_strlen): Determine and set length range for
30159 non-constant character arrays.
30161 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
30163 PR middle-end/81897
30164 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
30167 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
30169 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
30171 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30174 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
30175 VECTOR_MEM_ALTIVEC_OR_VSX_P.
30176 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
30177 indexed_or_indirect_operand predicate.
30178 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
30179 (*vsx_le_perm_load_v8hi): Likewise.
30180 (*vsx_le_perm_load_v16qi): Likewise.
30181 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
30182 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
30183 (*vsx_le_perm_store_v8hi): Likewise.
30184 (*vsx_le_perm_store_v16qi): Likewise.
30185 (eight unnamed splitters): Likewise.
30187 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30189 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
30190 * config/rs6000/emmintrin.h: Likewise.
30191 * config/rs6000/mmintrin.h: Likewise.
30192 * config/rs6000/xmmintrin.h: Likewise.
30194 2018-01-10 David Malcolm <dmalcolm@redhat.com>
30197 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
30199 * tree.c (tree_nop_conversion): Return true for location wrapper
30201 (maybe_wrap_with_location): New function.
30202 (selftest::check_strip_nops): New function.
30203 (selftest::test_location_wrappers): New function.
30204 (selftest::tree_c_tests): Call it.
30205 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
30206 (maybe_wrap_with_location): New decl.
30207 (EXPR_LOCATION_WRAPPER_P): New macro.
30208 (location_wrapper_p): New inline function.
30209 (tree_strip_any_location_wrapper): New inline function.
30211 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
30214 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
30215 stack_realign_offset for the largest alignment of stack slot
30217 (ix86_find_max_used_stack_alignment): New function.
30218 (ix86_finalize_stack_frame_flags): Use it. Set
30219 max_used_stack_alignment if we don't realign stack.
30220 * config/i386/i386.h (machine_function): Add
30221 max_used_stack_alignment.
30223 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
30225 * config/arm/arm.opt (-mbranch-cost): New option.
30226 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
30229 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
30232 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
30233 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
30235 2018-01-10 Richard Biener <rguenther@suse.de>
30238 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
30239 early out so it also covers the case where we have a non-NULL
30242 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30244 PR tree-optimization/83753
30245 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
30246 for non-strided grouped accesses if the number of elements is 1.
30248 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30251 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
30252 * i386.h (TARGET_USE_GATHER): Define.
30253 * x86-tune.def (X86_TUNE_USE_GATHER): New.
30255 2018-01-10 Martin Liska <mliska@suse.cz>
30258 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
30259 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
30261 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
30262 CLEANUP_NO_PARTITIONING is not set.
30264 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30266 * doc/rtl.texi: Remove documentation of (const ...) wrappers
30267 for vectors, as a partial revert of r254296.
30268 * rtl.h (const_vec_p): Delete.
30269 (const_vec_duplicate_p): Don't test for vector CONSTs.
30270 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
30271 * expmed.c (make_tree): Likewise.
30274 * common.md (E, F): Use CONSTANT_P instead of checking for
30276 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
30277 checking for CONST_VECTOR.
30279 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30281 PR middle-end/83575
30282 * predict.c (force_edge_cold): Handle in more sane way edges
30283 with no prediction.
30285 2018-01-09 Carl Love <cel@us.ibm.com>
30287 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
30289 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
30290 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
30291 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
30292 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
30293 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
30294 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
30295 * config/rs6000/rs6000-protos.h: Add extern defition for
30296 rs6000_generate_float2_double_code.
30297 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
30299 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
30300 (float2_v2df): Add define_expand.
30302 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
30305 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
30306 op_mode in the force_to_mode call.
30308 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30310 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
30311 instead of checking each element individually.
30312 (aarch64_evpc_uzp): Likewise.
30313 (aarch64_evpc_zip): Likewise.
30314 (aarch64_evpc_ext): Likewise.
30315 (aarch64_evpc_rev): Likewise.
30316 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
30317 instead of checking each element individually. Return true without
30319 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
30320 whether all selected elements come from the same input, instead of
30321 checking each element individually. Remove calls to gen_rtx_REG,
30322 start_sequence and end_sequence and instead assert that no rtl is
30325 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30327 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
30328 order of HIGH and CONST checks.
30330 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30332 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
30333 if the destination isn't an SSA_NAME.
30335 2018-01-09 Richard Biener <rguenther@suse.de>
30337 PR tree-optimization/83668
30338 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
30340 (canonicalize_loop_form): ... here, renamed from ...
30341 (canonicalize_loop_closed_ssa_form): ... this and amended to
30342 swap successor edges for loop exit blocks to make us use
30343 the RPO order we need for initial schedule generation.
30345 2018-01-09 Joseph Myers <joseph@codesourcery.com>
30347 PR tree-optimization/64811
30348 * match.pd: When optimizing comparisons with Inf, avoid
30349 introducing or losing exceptions from comparisons with NaN.
30351 2018-01-09 Martin Liska <mliska@suse.cz>
30354 * asan.c (shadow_mem_size): Add gcc_assert.
30356 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
30358 Don't save registers in main().
30361 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
30362 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
30363 * config/avr/avr.c (avr_set_current_function): Don't error if
30364 naked, OS_task or OS_main are specified at the same time.
30365 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
30367 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
30369 * common/config/avr/avr-common.c (avr_option_optimization_table):
30370 Switch on -mmain-is-OS_task for optimizing compilations.
30372 2018-01-09 Richard Biener <rguenther@suse.de>
30374 PR tree-optimization/83572
30375 * graphite.c: Include cfganal.h.
30376 (graphite_transform_loops): Connect infinite loops to exit
30377 and remove fake edges at the end.
30379 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30381 * ipa-inline.c (edge_badness): Revert accidental checkin.
30383 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30386 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
30387 symbols; not inline clones.
30389 2018-01-09 Jakub Jelinek <jakub@redhat.com>
30392 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
30393 hard registers. Formatting fixes.
30395 PR preprocessor/83722
30396 * gcc.c (try_generate_repro): Pass
30397 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
30398 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
30401 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
30402 Kito Cheng <kito.cheng@gmail.com>
30404 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
30405 (riscv_leaf_function_p): Delete.
30406 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
30408 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30410 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
30412 (do_ifelse): New function.
30413 (do_isel): New function.
30414 (do_sub3): New function.
30415 (do_add3): New function.
30416 (do_load_mask_compare): New function.
30417 (do_overlap_load_compare): New function.
30418 (expand_compare_loop): New function.
30419 (expand_block_compare): Call expand_compare_loop() when appropriate.
30420 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
30421 option description.
30422 (-mblock-compare-inline-loop-limit): New option.
30424 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30427 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
30428 Reverse order of second and third operands in first alternative.
30429 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
30430 of first and second elements in UNSPEC_VPERMR vector.
30431 (altivec_expand_vec_perm_le): Likewise.
30433 2018-01-08 Jeff Law <law@redhat.com>
30435 PR rtl-optimizatin/81308
30436 * tree-switch-conversion.c (cfg_altered): New file scoped static.
30437 (process_switch): If group_case_labels makes a change, then set
30439 (pass_convert_switch::execute): If a switch is converted, then
30440 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
30442 PR rtl-optimization/81308
30443 * recog.c (split_all_insns): Conditionally cleanup the CFG after
30446 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
30448 PR target/83663 - Revert r255946
30449 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
30450 generation for cases where splatting a value is not useful.
30451 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
30452 across a vec_duplicate and a paradoxical subreg forming a vector
30453 mode to a vec_concat.
30455 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30457 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
30458 -march=armv8.3-a variants.
30459 * config/arm/t-multilib: Likewise.
30460 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
30462 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30464 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
30466 (cceq_ior_compare_complement): Give it a name so I can use it, and
30467 change boolean_or_operator predicate to boolean_operator so it can
30468 be used to generate a crand.
30469 (eqne): New code iterator.
30470 (bd/bd_neg): New code_attrs.
30471 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
30472 a single define_insn.
30473 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
30474 decrement (bdnzt/bdnzf/bdzt/bdzf).
30475 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
30476 with the new names of the branch decrement patterns, and added the
30477 names of the branch decrement conditional patterns.
30479 2018-01-08 Richard Biener <rguenther@suse.de>
30481 PR tree-optimization/83563
30482 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
30485 2018-01-08 Richard Biener <rguenther@suse.de>
30487 PR middle-end/83713
30488 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
30490 2018-01-08 Richard Biener <rguenther@suse.de>
30492 PR tree-optimization/83685
30493 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
30494 references to abnormals.
30496 2018-01-08 Richard Biener <rguenther@suse.de>
30499 * dwarf2out.c (output_indirect_strings): Handle empty
30500 skeleton_debug_str_hash.
30501 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
30503 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
30505 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
30506 (emit_store_direct): Likewise.
30507 (arc_trampoline_adjust_address): Likewise.
30508 (arc_asm_trampoline_template): New function.
30509 (arc_initialize_trampoline): Use asm_trampoline_template.
30510 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
30511 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
30512 * config/arc/arc.md (flush_icache): Delete pattern.
30514 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
30516 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
30517 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
30520 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
30523 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
30524 by not USED_FOR_TARGET.
30525 (make_pass_resolve_sw_modes): Likewise.
30527 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
30529 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
30532 2018-01-08 Richard Biener <rguenther@suse.de>
30534 PR middle-end/83580
30535 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
30537 2018-01-08 Richard Biener <rguenther@suse.de>
30539 PR middle-end/83517
30540 * match.pd ((t * 2) / 2) -> t): Add missing :c.
30542 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
30544 PR middle-end/81897
30545 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
30546 basic blocks with a small number of successors.
30547 (convert_control_dep_chain_into_preds): Improve handling of
30549 (dump_predicates): Split apart into...
30550 (dump_pred_chain): ...here...
30551 (dump_pred_info): ...and here.
30552 (can_one_predicate_be_invalidated_p): Add debugging printfs.
30553 (can_chain_union_be_invalidated_p): Improve check for invalidation
30555 (uninit_uses_cannot_happen): Avoid unnecessary if
30556 convert_control_dep_chain_into_preds yielded nothing.
30558 2018-01-06 Martin Sebor <msebor@redhat.com>
30560 PR tree-optimization/83640
30561 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
30562 subtracting negative offset from size.
30563 (builtin_access::overlap): Adjust offset bounds of the access to fall
30564 within the size of the object if possible.
30566 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
30568 PR rtl-optimization/83699
30569 * expmed.c (extract_bit_field_1): Restrict the vector usage of
30570 extract_bit_field_as_subreg to cases in which the extracted
30571 value is also a vector.
30573 * lra-constraints.c (process_alt_operands): Test for the equivalence
30574 substitutions when detecting a possible reload cycle.
30576 2018-01-06 Jakub Jelinek <jakub@redhat.com>
30579 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
30580 by default if flag_selective_schedling{,2}. Formatting fixes.
30582 PR rtl-optimization/83682
30583 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
30584 if it has non-VECTOR_MODE element mode.
30585 (vec_duplicate_p): Likewise.
30587 PR middle-end/83694
30588 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
30589 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
30591 2018-01-05 Jakub Jelinek <jakub@redhat.com>
30594 * config/i386/i386-builtin.def
30595 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
30596 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
30597 Require also OPTION_MASK_ISA_AVX512F in addition to
30598 OPTION_MASK_ISA_GFNI.
30599 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
30600 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
30601 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
30602 to OPTION_MASK_ISA_GFNI.
30603 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
30604 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
30605 OPTION_MASK_ISA_AVX512BW.
30606 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
30607 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
30608 addition to OPTION_MASK_ISA_GFNI.
30609 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
30610 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
30611 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
30612 to OPTION_MASK_ISA_GFNI.
30613 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
30614 a requirement for all ISAs rather than any of them with a few
30616 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
30618 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
30619 bitmasks to be enabled with 3 exceptions, instead of requiring any
30620 enabled ISA with lots of exceptions.
30621 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
30622 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
30623 Change avx512bw in isa attribute to avx512f.
30624 * config/i386/sgxintrin.h: Add license boilerplate.
30625 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
30626 to __AVX512F__ and __AVX512VL to __AVX512VL__.
30627 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
30628 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
30630 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
30631 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
30632 temporarily sse2 rather than sse if not enabled already.
30635 * config/i386/sse.md (VI248_VLBW): Rename to ...
30636 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
30637 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
30638 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
30639 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
30640 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
30641 mode iterator instead of VI248_VLBW.
30643 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
30645 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
30646 (record_modified): Skip clobbers; add debug output.
30647 (param_change_prob): Use sreal frequencies.
30649 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
30651 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
30652 punt for user-aligned variables.
30654 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
30656 * tree-chrec.c (chrec_contains_symbols): Return true for
30659 2018-01-05 Sudakshina Das <sudi.das@arm.com>
30662 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
30663 of (x|y) == x for BICS pattern.
30665 2018-01-05 Jakub Jelinek <jakub@redhat.com>
30667 PR tree-optimization/83605
30668 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
30669 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
30672 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
30674 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
30675 * config/epiphany/rtems.h: New file.
30677 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30678 Uros Bizjak <ubizjak@gmail.com>
30681 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
30682 QIreg_operand instead of register_operand predicate.
30683 * config/i386/i386.c (ix86_rop_should_change_byte_p,
30684 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
30685 comments instead of -fmitigate[-_]rop.
30687 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30690 * cgraphunit.c (symbol_table::compile): Switch to text_section
30691 before calling assembly_start debug hook.
30692 * run-rtl-passes.c (run_rtl_passes): Likewise.
30695 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30697 * tree-vrp.c (extract_range_from_binary_expr_1): Check
30698 range_int_cst_p rather than !symbolic_range_p before calling
30699 extract_range_from_multiplicative_op_1.
30701 2018-01-04 Jeff Law <law@redhat.com>
30703 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
30704 redundant test in assertion.
30706 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30708 * doc/rtl.texi: Document machine_mode wrapper classes.
30710 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30712 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
30713 using tree_to_uhwi.
30715 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30717 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
30718 the VEC_PERM_EXPR fold to fail.
30720 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30723 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
30724 to switched_sections.
30726 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30729 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
30730 test for d.testing.
30732 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
30735 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
30736 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
30738 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30741 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
30742 is BLKmode and bitpos not zero or mode change is needed.
30744 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30747 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
30750 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
30753 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
30754 instead of MULT rtx. Update all corresponding splitters.
30755 (*saddl_se): Ditto.
30756 (*ssub<modesuffix>): Ditto.
30757 (*ssubl_se): Ditto.
30758 (*cmp_sadd_di): Update split patterns.
30759 (*cmp_sadd_si): Ditto.
30760 (*cmp_sadd_sidi): Ditto.
30761 (*cmp_ssub_di): Ditto.
30762 (*cmp_ssub_si): Ditto.
30763 (*cmp_ssub_sidi): Ditto.
30764 * config/alpha/predicates.md (const23_operand): New predicate.
30765 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
30766 Look for ASHIFT, not MULT inner operand.
30767 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
30769 2018-01-04 Martin Liska <mliska@suse.cz>
30771 PR gcov-profile/83669
30772 * gcov.c (output_intermediate_file): Add version to intermediate
30774 * doc/gcov.texi: Document new field 'version' in intermediate
30775 file format. Fix location of '-k' option of gcov command.
30777 2018-01-04 Martin Liska <mliska@suse.cz>
30780 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
30782 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30784 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
30786 2018-01-03 Martin Sebor <msebor@redhat.com>
30788 PR tree-optimization/83655
30789 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
30790 checking calls with invalid arguments.
30792 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30794 * tree-vect-stmts.c (vect_get_store_rhs): New function.
30795 (vectorizable_mask_load_store): Delete.
30796 (vectorizable_call): Return false for masked loads and stores.
30797 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
30798 instead of gimple_assign_rhs1.
30799 (vectorizable_load): Handle IFN_MASK_LOAD.
30800 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
30802 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30804 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
30806 (vectorizable_mask_load_store): ...here.
30807 (vectorizable_load): ...and here.
30809 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30811 * tree-vect-stmts.c (vect_build_all_ones_mask)
30812 (vect_build_zero_merge_argument): New functions, split out from...
30813 (vectorizable_load): ...here.
30815 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30817 * tree-vect-stmts.c (vect_check_store_rhs): New function,
30819 (vectorizable_mask_load_store): ...here.
30820 (vectorizable_store): ...and here.
30822 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30824 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
30826 (vectorizable_mask_load_store): ...here.
30828 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30830 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
30831 (vect_model_store_cost): Take a vec_load_store_type instead of a
30833 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
30834 (vect_model_store_cost): Take a vec_load_store_type instead of a
30836 (vectorizable_mask_load_store): Update accordingly.
30837 (vectorizable_store): Likewise.
30838 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
30840 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30842 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
30843 IFN_MASK_LOAD calls here rather than...
30844 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
30846 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30847 Alan Hayward <alan.hayward@arm.com>
30848 David Sherwood <david.sherwood@arm.com>
30850 * expmed.c (extract_bit_field_1): For vector extracts,
30851 fall back to extract_bit_field_as_subreg if vec_extract
30854 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30855 Alan Hayward <alan.hayward@arm.com>
30856 David Sherwood <david.sherwood@arm.com>
30858 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
30859 they are variable or constant sized.
30860 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
30861 slots for constant-sized data.
30863 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30864 Alan Hayward <alan.hayward@arm.com>
30865 David Sherwood <david.sherwood@arm.com>
30867 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
30868 handling COND_EXPRs with boolean comparisons, try to find a better
30869 basis for the mask type than the boolean itself.
30871 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30873 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
30874 is calculated and how it can be overridden.
30875 * genmodes.c (max_bitsize_mode_any_mode): New variable.
30876 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
30878 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
30881 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30882 Alan Hayward <alan.hayward@arm.com>
30883 David Sherwood <david.sherwood@arm.com>
30885 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
30886 Remove the mode argument.
30887 (aarch64_simd_valid_immediate): Remove the mode and inverse
30889 * config/aarch64/iterators.md (bitsize): New iterator.
30890 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
30891 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
30892 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
30893 aarch64_simd_valid_immediate.
30894 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
30895 (aarch64_reg_or_bic_imm): Likewise.
30896 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
30897 with an insn_type enum and msl with a modifier_type enum.
30898 Replace element_width with a scalar_mode. Change the shift
30899 to unsigned int. Add constructors for scalar_float_mode and
30900 scalar_int_mode elements.
30901 (aarch64_vect_float_const_representable_p): Delete.
30902 (aarch64_can_const_movi_rtx_p)
30903 (aarch64_simd_scalar_immediate_valid_for_move)
30904 (aarch64_simd_make_constant): Update call to
30905 aarch64_simd_valid_immediate.
30906 (aarch64_advsimd_valid_immediate_hs): New function.
30907 (aarch64_advsimd_valid_immediate): Likewise.
30908 (aarch64_simd_valid_immediate): Remove mode and inverse
30909 arguments. Rewrite to use the above. Use const_vec_duplicate_p
30910 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
30911 and aarch64_float_const_representable_p on the result.
30912 (aarch64_output_simd_mov_immediate): Remove mode argument.
30913 Update call to aarch64_simd_valid_immediate and use of
30914 simd_immediate_info.
30915 (aarch64_output_scalar_simd_mov_immediate): Update call
30918 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30919 Alan Hayward <alan.hayward@arm.com>
30920 David Sherwood <david.sherwood@arm.com>
30922 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
30923 (mode_nunits): Likewise CONST_MODE_NUNITS.
30924 * machmode.def (ADJUST_NUNITS): Document.
30925 * genmodes.c (mode_data::need_nunits_adj): New field.
30926 (blank_mode): Update accordingly.
30927 (adj_nunits): New variable.
30928 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
30930 (emit_mode_size_inline): Set need_bytesize_adj for all modes
30931 listed in adj_nunits.
30932 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
30933 listed in adj_nunits. Don't emit case statements for such modes.
30934 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
30935 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
30936 nothing if adj_nunits is nonnull.
30937 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
30938 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
30939 (emit_mode_fbit): Update use of print_maybe_const_decl.
30940 (emit_move_size): Likewise. Treat the array as non-const
30942 (emit_mode_adjustments): Handle adj_nunits.
30944 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30946 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
30947 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
30948 (VECTOR_MODES): Use it.
30949 (make_vector_modes): Take the prefix as an argument.
30951 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30952 Alan Hayward <alan.hayward@arm.com>
30953 David Sherwood <david.sherwood@arm.com>
30955 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
30956 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
30957 for MODE_VECTOR_BOOL.
30958 * machmode.def (VECTOR_BOOL_MODE): Document.
30959 * genmodes.c (VECTOR_BOOL_MODE): New macro.
30960 (make_vector_bool_mode): New function.
30961 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
30963 * lto-streamer-in.c (lto_input_mode_table): Likewise.
30964 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
30966 * stor-layout.c (int_mode_for_mode): Likewise.
30967 * tree.c (build_vector_type_for_mode): Likewise.
30968 * varasm.c (output_constant_pool_2): Likewise.
30969 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
30970 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
30971 for MODE_VECTOR_BOOL.
30972 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
30973 of mode class checks.
30974 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
30975 instead of a list of mode class checks.
30976 (expand_vector_scalar_condition): Likewise.
30977 (type_for_widest_vector_mode): Handle BImode as an inner mode.
30979 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30980 Alan Hayward <alan.hayward@arm.com>
30981 David Sherwood <david.sherwood@arm.com>
30983 * machmode.h (mode_size): Change from unsigned short to
30985 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
30986 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30987 or if measurement_type is not polynomial.
30988 (fixed_size_mode::includes_p): Check for constant-sized modes.
30989 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
30990 return a poly_uint16 rather than an unsigned short.
30991 (emit_mode_size): Change the type of mode_size from unsigned short
30992 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
30993 (emit_mode_adjustments): Cope with polynomial vector sizes.
30994 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30996 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30998 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
30999 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
31000 * caller-save.c (setup_save_areas): Likewise.
31001 (replace_reg_with_saved_mem): Likewise.
31002 * calls.c (emit_library_call_value_1): Likewise.
31003 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
31004 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
31005 (gen_lowpart_for_combine): Likewise.
31006 * convert.c (convert_to_integer_1): Likewise.
31007 * cse.c (equiv_constant, cse_insn): Likewise.
31008 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
31009 (cselib_subst_to_values): Likewise.
31010 * dce.c (word_dce_process_block): Likewise.
31011 * df-problems.c (df_word_lr_mark_ref): Likewise.
31012 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
31013 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
31014 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
31015 (rtl_for_decl_location): Likewise.
31016 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
31017 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
31018 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
31019 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
31020 (expand_expr_real_1): Likewise.
31021 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
31022 (pad_below): Likewise.
31023 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31024 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
31025 * ira.c (get_subreg_tracking_sizes): Likewise.
31026 * ira-build.c (ira_create_allocno_objects): Likewise.
31027 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
31028 (ira_sort_regnos_for_alter_reg): Likewise.
31029 * ira-costs.c (record_operand_costs): Likewise.
31030 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
31031 (resolve_simple_move): Likewise.
31032 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
31033 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
31034 (lra_constraints): Likewise.
31035 (CONST_POOL_OK_P): Reject variable-sized modes.
31036 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
31037 (add_pseudo_to_slot, lra_spill): Likewise.
31038 * omp-low.c (omp_clause_aligned_alignment): Likewise.
31039 * optabs-query.c (get_best_extraction_insn): Likewise.
31040 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31041 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
31042 (expand_mult_highpart, valid_multiword_target_p): Likewise.
31043 * recog.c (offsettable_address_addr_space_p): Likewise.
31044 * regcprop.c (maybe_mode_change): Likewise.
31045 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
31046 * regrename.c (build_def_use): Likewise.
31047 * regstat.c (dump_reg_info): Likewise.
31048 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
31049 (find_reloads, find_reloads_subreg_address): Likewise.
31050 * reload1.c (eliminate_regs_1): Likewise.
31051 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
31052 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
31053 (simplify_binary_operation_1, simplify_subreg): Likewise.
31054 * targhooks.c (default_function_arg_padding): Likewise.
31055 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
31056 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
31057 (verify_gimple_assign_ternary): Likewise.
31058 * tree-inline.c (estimate_move_cost): Likewise.
31059 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31060 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
31061 (get_address_cost_ainc): Likewise.
31062 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
31063 (vect_supportable_dr_alignment): Likewise.
31064 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31065 (vectorizable_reduction): Likewise.
31066 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
31067 (vectorizable_operation, vectorizable_load): Likewise.
31068 * tree.c (build_same_sized_truth_vector_type): Likewise.
31069 * valtrack.c (cleanup_auto_inc_dec): Likewise.
31070 * var-tracking.c (emit_note_insn_var_location): Likewise.
31071 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
31072 (ADDR_VEC_ALIGN): Likewise.
31074 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31075 Alan Hayward <alan.hayward@arm.com>
31076 David Sherwood <david.sherwood@arm.com>
31078 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
31080 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31081 or if measurement_type is polynomial.
31082 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
31083 * combine.c (make_extraction): Likewise.
31084 * dse.c (find_shift_sequence): Likewise.
31085 * dwarf2out.c (mem_loc_descriptor): Likewise.
31086 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
31087 (extract_bit_field, extract_low_bits): Likewise.
31088 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
31089 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
31090 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
31091 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
31092 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31093 * reload.c (find_reloads): Likewise.
31094 * reload1.c (alter_reg): Likewise.
31095 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
31096 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
31097 * tree-if-conv.c (predicate_mem_writes): Likewise.
31098 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
31099 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
31100 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
31101 * valtrack.c (dead_debug_insert_temp): Likewise.
31102 * varasm.c (mergeable_constant_section): Likewise.
31103 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
31105 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31106 Alan Hayward <alan.hayward@arm.com>
31107 David Sherwood <david.sherwood@arm.com>
31109 * expr.c (expand_assignment): Cope with polynomial mode sizes
31110 when assigning to a CONCAT.
31112 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31113 Alan Hayward <alan.hayward@arm.com>
31114 David Sherwood <david.sherwood@arm.com>
31116 * machmode.h (mode_precision): Change from unsigned short to
31118 (mode_to_precision): Return a poly_uint16 rather than an unsigned
31120 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
31121 or if measurement_type is not polynomial.
31122 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
31123 in which the mode is already known to be a scalar_int_mode.
31124 * genmodes.c (emit_mode_precision): Change the type of mode_precision
31125 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
31127 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31128 for GET_MODE_PRECISION.
31129 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31130 for GET_MODE_PRECISION.
31131 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
31133 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
31134 (expand_field_assignment, make_extraction): Likewise.
31135 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
31136 (get_last_value): Likewise.
31137 * convert.c (convert_to_integer_1): Likewise.
31138 * cse.c (cse_insn): Likewise.
31139 * expr.c (expand_expr_real_1): Likewise.
31140 * lra-constraints.c (simplify_operand_subreg): Likewise.
31141 * optabs-query.c (can_atomic_load_p): Likewise.
31142 * optabs.c (expand_atomic_load): Likewise.
31143 (expand_atomic_store): Likewise.
31144 * ree.c (combine_reaching_defs): Likewise.
31145 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
31146 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
31147 * tree.h (type_has_mode_precision_p): Likewise.
31148 * ubsan.c (instrument_si_overflow): Likewise.
31150 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31151 Alan Hayward <alan.hayward@arm.com>
31152 David Sherwood <david.sherwood@arm.com>
31154 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
31155 polynomial numbers of units.
31156 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
31157 (valid_vector_subparts_p): New function.
31158 (build_vector_type): Remove temporary shim and take the number
31159 of units as a poly_uint64 rather than an int.
31160 (build_opaque_vector_type): Take the number of units as a
31161 poly_uint64 rather than an int.
31162 * tree.c (build_vector_from_ctor): Handle polynomial
31163 TYPE_VECTOR_SUBPARTS.
31164 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
31165 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
31166 (build_vector_from_val): If the number of units is variable,
31167 use build_vec_duplicate_cst for constant operands and
31168 VEC_DUPLICATE_EXPR otherwise.
31169 (make_vector_type): Remove temporary is_constant ().
31170 (build_vector_type, build_opaque_vector_type): Take the number of
31171 units as a poly_uint64 rather than an int.
31172 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
31174 * cfgexpand.c (expand_debug_expr): Likewise.
31175 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
31176 (store_constructor, expand_expr_real_1): Likewise.
31177 (const_scalar_mask_from_tree): Likewise.
31178 * fold-const-call.c (fold_const_reduction): Likewise.
31179 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
31180 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
31181 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
31182 (fold_relational_const): Likewise.
31183 (native_interpret_vector): Likewise. Change the size from an
31184 int to an unsigned int.
31185 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
31186 TYPE_VECTOR_SUBPARTS.
31187 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
31188 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
31189 duplicating a non-constant operand into a variable-length vector.
31190 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
31191 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
31192 * ipa-icf.c (sem_variable::equals): Likewise.
31193 * match.pd: Likewise.
31194 * omp-simd-clone.c (simd_clone_subparts): Likewise.
31195 * print-tree.c (print_node): Likewise.
31196 * stor-layout.c (layout_type): Likewise.
31197 * targhooks.c (default_builtin_vectorization_cost): Likewise.
31198 * tree-cfg.c (verify_gimple_comparison): Likewise.
31199 (verify_gimple_assign_binary): Likewise.
31200 (verify_gimple_assign_ternary): Likewise.
31201 (verify_gimple_assign_single): Likewise.
31202 * tree-pretty-print.c (dump_generic_node): Likewise.
31203 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31204 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
31205 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
31206 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
31207 (vect_shift_permute_load_chain): Likewise.
31208 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
31209 (expand_vector_condition, optimize_vector_constructor): Likewise.
31210 (lower_vec_perm, get_compute_type): Likewise.
31211 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31212 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
31213 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
31214 (vect_recog_mask_conversion_pattern): Likewise.
31215 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
31216 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
31217 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31218 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
31219 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
31220 (vectorizable_shift, vectorizable_operation, vectorizable_store)
31221 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
31222 (supportable_widening_operation): Likewise.
31223 (supportable_narrowing_operation): Likewise.
31224 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
31226 * varasm.c (output_constant): Likewise.
31228 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31229 Alan Hayward <alan.hayward@arm.com>
31230 David Sherwood <david.sherwood@arm.com>
31232 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
31233 so that both the length == 3 and length != 3 cases set up their
31234 own permute vectors. Add comments explaining why we know the
31235 number of elements is constant.
31236 (vect_permute_load_chain): Likewise.
31238 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31239 Alan Hayward <alan.hayward@arm.com>
31240 David Sherwood <david.sherwood@arm.com>
31242 * machmode.h (mode_nunits): Change from unsigned char to
31244 (ONLY_FIXED_SIZE_MODES): New macro.
31245 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
31246 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
31247 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
31249 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
31250 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
31251 or if measurement_type is not polynomial.
31252 * genmodes.c (ZERO_COEFFS): New macro.
31253 (emit_mode_nunits_inline): Make mode_nunits_inline return a
31255 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
31256 Use ZERO_COEFFS when emitting initializers.
31257 * data-streamer.h (bp_pack_poly_value): New function.
31258 (bp_unpack_poly_value): Likewise.
31259 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31260 for GET_MODE_NUNITS.
31261 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31262 for GET_MODE_NUNITS.
31263 * tree.c (make_vector_type): Remove temporary shim and make
31264 the real function take the number of units as a poly_uint64
31265 rather than an int.
31266 (build_vector_type_for_mode): Handle polynomial nunits.
31267 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
31268 * emit-rtl.c (const_vec_series_p_1): Likewise.
31269 (gen_rtx_CONST_VECTOR): Likewise.
31270 * fold-const.c (test_vec_duplicate_folding): Likewise.
31271 * genrecog.c (validate_pattern): Likewise.
31272 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
31273 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31274 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
31275 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
31276 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
31277 * rtlanal.c (subreg_get_info): Likewise.
31278 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31279 (vect_grouped_load_supported): Likewise.
31280 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
31281 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
31282 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
31283 (simplify_const_unary_operation, simplify_binary_operation_1)
31284 (simplify_const_binary_operation, simplify_ternary_operation)
31285 (test_vector_ops_duplicate, test_vector_ops): Likewise.
31286 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
31287 instead of CONST_VECTOR_NUNITS.
31288 * varasm.c (output_constant_pool_2): Likewise.
31289 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
31290 explicit-encoded elements in the XVEC for variable-length vectors.
31292 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31294 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
31296 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31297 Alan Hayward <alan.hayward@arm.com>
31298 David Sherwood <david.sherwood@arm.com>
31300 * coretypes.h (fixed_size_mode): Declare.
31301 (fixed_size_mode_pod): New typedef.
31302 * builtins.h (target_builtins::x_apply_args_mode)
31303 (target_builtins::x_apply_result_mode): Change type to
31304 fixed_size_mode_pod.
31305 * builtins.c (apply_args_size, apply_result_size, result_vector)
31306 (expand_builtin_apply_args_1, expand_builtin_apply)
31307 (expand_builtin_return): Update accordingly.
31309 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31311 * cse.c (hash_rtx_cb): Hash only the encoded elements.
31312 * cselib.c (cselib_hash_rtx): Likewise.
31313 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
31314 CONST_VECTOR encoding.
31316 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31317 Jeff Law <law@redhat.com>
31320 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
31321 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
31322 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
31323 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
31326 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
31327 explicitly probe *sp in a noreturn function if there were any callee
31328 register saves or frame pointer is needed.
31330 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31333 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
31334 BLKmode for ternary, binary or unary expressions.
31337 * var-tracking.c (delete_vta_debug_insn): New inline function.
31338 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
31339 insns from get_insns () to NULL instead of each bb separately.
31340 Use delete_vta_debug_insn. No longer static.
31341 (vt_debug_insns_local, variable_tracking_main_1): Adjust
31342 delete_vta_debug_insns callers.
31343 * rtl.h (delete_vta_debug_insns): Declare.
31344 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
31345 instead of variable_tracking_main.
31347 2018-01-03 Martin Sebor <msebor@redhat.com>
31349 PR tree-optimization/83603
31350 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
31351 arguments past the endof the argument list in functions declared
31352 without a prototype.
31353 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
31354 Avoid checking when arguments are null.
31356 2018-01-03 Martin Sebor <msebor@redhat.com>
31359 * doc/extend.texi (attribute const): Fix a typo.
31360 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
31361 issuing -Wsuggest-attribute for void functions.
31363 2018-01-03 Martin Sebor <msebor@redhat.com>
31365 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
31366 offset_int::from instead of wide_int::to_shwi.
31367 (maybe_diag_overlap): Remove assertion.
31368 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
31369 * gimple-ssa-sprintf.c (format_directive): Same.
31370 (parse_directive): Same.
31371 (sprintf_dom_walker::compute_format_length): Same.
31372 (try_substitute_return_value): Same.
31374 2018-01-03 Jeff Law <law@redhat.com>
31376 PR middle-end/83654
31377 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
31378 non-constant residual for zero at runtime and avoid probing in
31379 that case. Reorganize code for trailing problem to mirror handling
31382 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31384 PR tree-optimization/83501
31385 * tree-ssa-strlen.c (get_string_cst): New.
31386 (handle_char_store): Call get_string_cst.
31388 2018-01-03 Martin Liska <mliska@suse.cz>
31390 PR tree-optimization/83593
31391 * tree-ssa-strlen.c: Include tree-cfg.h.
31392 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
31393 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
31394 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
31396 (strlen_dom_walker::before_dom_children): Call
31397 gimple_purge_dead_eh_edges. Dump tranformation with details
31399 (strlen_dom_walker::before_dom_children): Update call by adding
31400 new argument cleanup_eh.
31401 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
31403 2018-01-03 Martin Liska <mliska@suse.cz>
31406 * cif-code.def (VARIADIC_THUNK): New enum value.
31407 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
31410 2018-01-03 Jan Beulich <jbeulich@suse.com>
31412 * sse.md (mov<mode>_internal): Tighten condition for when to use
31413 vmovdqu<ssescalarsize> for TI and OI modes.
31415 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31417 Update copyright years.
31419 2018-01-03 Martin Liska <mliska@suse.cz>
31422 * ipa-visibility.c (function_and_variable_visibility): Skip
31423 functions with noipa attribure.
31425 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31427 * gcc.c (process_command): Update copyright notice dates.
31428 * gcov-dump.c (print_version): Ditto.
31429 * gcov.c (print_version): Ditto.
31430 * gcov-tool.c (print_version): Ditto.
31431 * gengtype.c (create_file): Ditto.
31432 * doc/cpp.texi: Bump @copying's copyright year.
31433 * doc/cppinternals.texi: Ditto.
31434 * doc/gcc.texi: Ditto.
31435 * doc/gccint.texi: Ditto.
31436 * doc/gcov.texi: Ditto.
31437 * doc/install.texi: Ditto.
31438 * doc/invoke.texi: Ditto.
31440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31442 * vector-builder.h (vector_builder::m_full_nelts): Change from
31443 unsigned int to poly_uint64.
31444 (vector_builder::full_nelts): Update prototype accordingly.
31445 (vector_builder::new_vector): Likewise.
31446 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
31447 (vector_builder::operator ==): Likewise.
31448 (vector_builder::finalize): Likewise.
31449 * int-vector-builder.h (int_vector_builder::int_vector_builder):
31450 Take the number of elements as a poly_uint64 rather than an
31452 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
31453 from unsigned int to poly_uint64.
31454 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
31455 (vec_perm_indices::new_vector): Likewise.
31456 (vec_perm_indices::length): Likewise.
31457 (vec_perm_indices::nelts_per_input): Likewise.
31458 (vec_perm_indices::input_nelts): Likewise.
31459 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
31460 number of elements per input as a poly_uint64 rather than an
31461 unsigned int. Use the original encoding for variable-length
31462 vectors, rather than clamping each individual element.
31463 For the second and subsequent elements in each pattern,
31464 clamp the step and base before clamping their sum.
31465 (vec_perm_indices::series_p): Handle polynomial element counts.
31466 (vec_perm_indices::all_in_range_p): Likewise.
31467 (vec_perm_indices_to_tree): Likewise.
31468 (vec_perm_indices_to_rtx): Likewise.
31469 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
31470 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
31471 (tree_vector_builder::new_binary_operation): Handle polynomial
31472 element counts. Return false if we need to know the number
31473 of elements at compile time.
31474 * fold-const.c (fold_vec_perm): Punt if the number of elements
31475 isn't known at compile time.
31477 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31479 * vec-perm-indices.h (vec_perm_builder): Change element type
31480 from HOST_WIDE_INT to poly_int64.
31481 (vec_perm_indices::element_type): Update accordingly.
31482 (vec_perm_indices::clamp): Handle polynomial element_types.
31483 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31484 (vec_perm_indices::all_in_range_p): Likewise.
31485 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
31487 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
31488 polynomial vec_perm_indices element types.
31489 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
31490 * fold-const.c (fold_vec_perm): Likewise.
31491 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
31492 * tree-vect-generic.c (lower_vec_perm): Likewise.
31493 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31494 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
31495 element type to HOST_WIDE_INT.
31497 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31498 Alan Hayward <alan.hayward@arm.com>
31499 David Sherwood <david.sherwood@arm.com>
31501 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
31502 rather than an int. Use plus_constant.
31503 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
31504 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
31506 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31507 Alan Hayward <alan.hayward@arm.com>
31508 David Sherwood <david.sherwood@arm.com>
31510 * calls.c (emit_call_1, expand_call): Change struct_value_size from
31511 a HOST_WIDE_INT to a poly_int64.
31513 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31514 Alan Hayward <alan.hayward@arm.com>
31515 David Sherwood <david.sherwood@arm.com>
31517 * calls.c (load_register_parameters): Cope with polynomial
31518 mode sizes. Require a constant size for BLKmode parameters
31519 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
31520 forces a parameter to be padded at the lsb end in order to
31521 fill a complete number of words, require the parameter size
31522 to be ordered wrt UNITS_PER_WORD.
31524 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31525 Alan Hayward <alan.hayward@arm.com>
31526 David Sherwood <david.sherwood@arm.com>
31528 * reload1.c (spill_stack_slot_width): Change element type
31529 from unsigned int to poly_uint64_pod.
31530 (alter_reg): Treat mode sizes as polynomial.
31532 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31533 Alan Hayward <alan.hayward@arm.com>
31534 David Sherwood <david.sherwood@arm.com>
31536 * reload.c (complex_word_subreg_p): New function.
31537 (reload_inner_reg_of_subreg, push_reload): Use it.
31539 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31540 Alan Hayward <alan.hayward@arm.com>
31541 David Sherwood <david.sherwood@arm.com>
31543 * lra-constraints.c (process_alt_operands): Reject matched
31544 operands whose sizes aren't ordered.
31545 (match_reload): Refer to this check here.
31547 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31548 Alan Hayward <alan.hayward@arm.com>
31549 David Sherwood <david.sherwood@arm.com>
31551 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
31552 that the mode size is in the set {1, 2, 4, 8, 16}.
31554 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31555 Alan Hayward <alan.hayward@arm.com>
31556 David Sherwood <david.sherwood@arm.com>
31558 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
31559 Use plus_constant instead of gen_rtx_PLUS.
31561 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31562 Alan Hayward <alan.hayward@arm.com>
31563 David Sherwood <david.sherwood@arm.com>
31565 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
31566 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
31567 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
31568 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
31569 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
31570 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
31571 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
31572 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
31573 * config/i386/i386.c (ix86_push_rounding): ...this new function.
31574 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
31576 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
31577 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
31578 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
31579 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
31580 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
31581 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
31582 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
31583 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
31584 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
31585 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
31587 * expr.c (emit_move_resolve_push): Treat the input and result
31588 of PUSH_ROUNDING as a poly_int64.
31589 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
31590 (emit_push_insn): Likewise.
31591 * lra-eliminations.c (mark_not_eliminable): Likewise.
31592 * recog.c (push_operand): Likewise.
31593 * reload1.c (elimination_effects): Likewise.
31594 * rtlanal.c (nonzero_bits1): Likewise.
31595 * calls.c (store_one_arg): Likewise. Require the padding to be
31596 known at compile time.
31598 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31599 Alan Hayward <alan.hayward@arm.com>
31600 David Sherwood <david.sherwood@arm.com>
31602 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
31603 Use plus_constant instead of gen_rtx_PLUS.
31605 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31606 Alan Hayward <alan.hayward@arm.com>
31607 David Sherwood <david.sherwood@arm.com>
31609 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
31610 rather than an int.
31612 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31613 Alan Hayward <alan.hayward@arm.com>
31614 David Sherwood <david.sherwood@arm.com>
31616 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
31617 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
31618 via stack temporaries. Treat the mode size as polynomial too.
31620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31621 Alan Hayward <alan.hayward@arm.com>
31622 David Sherwood <david.sherwood@arm.com>
31624 * expr.c (expand_expr_real_2): When handling conversions involving
31625 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
31626 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
31627 as a poly_uint64 too.
31629 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31630 Alan Hayward <alan.hayward@arm.com>
31631 David Sherwood <david.sherwood@arm.com>
31633 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
31635 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31636 Alan Hayward <alan.hayward@arm.com>
31637 David Sherwood <david.sherwood@arm.com>
31639 * combine.c (can_change_dest_mode): Handle polynomial
31640 REGMODE_NATURAL_SIZE.
31641 * expmed.c (store_bit_field_1): Likewise.
31642 * expr.c (store_constructor): Likewise.
31643 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
31644 and polynomial REGMODE_NATURAL_SIZE.
31645 (gen_lowpart_common): Likewise.
31646 * reginfo.c (record_subregs_of_mode): Likewise.
31647 * rtlanal.c (read_modify_subreg_p): Likewise.
31649 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31650 Alan Hayward <alan.hayward@arm.com>
31651 David Sherwood <david.sherwood@arm.com>
31653 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
31654 numbers of elements.
31656 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31657 Alan Hayward <alan.hayward@arm.com>
31658 David Sherwood <david.sherwood@arm.com>
31660 * match.pd: Cope with polynomial numbers of vector elements.
31662 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31663 Alan Hayward <alan.hayward@arm.com>
31664 David Sherwood <david.sherwood@arm.com>
31666 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
31667 in a POINTER_PLUS_EXPR.
31669 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31670 Alan Hayward <alan.hayward@arm.com>
31671 David Sherwood <david.sherwood@arm.com>
31673 * omp-simd-clone.c (simd_clone_subparts): New function.
31674 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
31675 (ipa_simd_modify_function_body): Likewise.
31677 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31678 Alan Hayward <alan.hayward@arm.com>
31679 David Sherwood <david.sherwood@arm.com>
31681 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
31682 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
31683 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
31684 (expand_vector_condition, vector_element): Likewise.
31685 (subparts_gt): New function.
31686 (get_compute_type): Use subparts_gt.
31687 (count_type_subparts): Delete.
31688 (expand_vector_operations_1): Use subparts_gt instead of
31689 count_type_subparts.
31691 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31692 Alan Hayward <alan.hayward@arm.com>
31693 David Sherwood <david.sherwood@arm.com>
31695 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
31696 (vect_compile_time_alias): ...this new function. Do the calculation
31697 on poly_ints rather than trees.
31698 (vect_prune_runtime_alias_test_list): Update call accordingly.
31700 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31701 Alan Hayward <alan.hayward@arm.com>
31702 David Sherwood <david.sherwood@arm.com>
31704 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
31706 (vect_schedule_slp_instance): Likewise.
31708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31709 Alan Hayward <alan.hayward@arm.com>
31710 David Sherwood <david.sherwood@arm.com>
31712 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
31713 constant and extern definitions for variable-length vectors.
31714 (vect_get_constant_vectors): Note that the number of units
31715 is known to be constant.
31717 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31718 Alan Hayward <alan.hayward@arm.com>
31719 David Sherwood <david.sherwood@arm.com>
31721 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
31722 of units as polynomial. Choose between WIDE and NARROW based
31725 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31726 Alan Hayward <alan.hayward@arm.com>
31727 David Sherwood <david.sherwood@arm.com>
31729 * tree-vect-stmts.c (simd_clone_subparts): New function.
31730 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
31732 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31733 Alan Hayward <alan.hayward@arm.com>
31734 David Sherwood <david.sherwood@arm.com>
31736 * tree-vect-stmts.c (vectorizable_call): Treat the number of
31737 vectors as polynomial. Use build_index_vector for
31738 IFN_GOMP_SIMD_LANE.
31740 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31741 Alan Hayward <alan.hayward@arm.com>
31742 David Sherwood <david.sherwood@arm.com>
31744 * tree-vect-stmts.c (get_load_store_type): Treat the number of
31745 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
31746 for variable-length vectors.
31747 (vectorizable_mask_load_store): Treat the number of units as
31748 polynomial, asserting that it is constant if the condition has
31749 already been enforced.
31750 (vectorizable_store, vectorizable_load): Likewise.
31752 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31753 Alan Hayward <alan.hayward@arm.com>
31754 David Sherwood <david.sherwood@arm.com>
31756 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
31757 of units as polynomial. Punt if we can't tell at compile time
31758 which vector contains the final result.
31760 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31761 Alan Hayward <alan.hayward@arm.com>
31762 David Sherwood <david.sherwood@arm.com>
31764 * tree-vect-loop.c (vectorizable_induction): Treat the number
31765 of units as polynomial. Punt on SLP inductions. Use an integer
31766 VEC_SERIES_EXPR for variable-length integer reductions. Use a
31767 cast of such a series for variable-length floating-point
31770 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31771 Alan Hayward <alan.hayward@arm.com>
31772 David Sherwood <david.sherwood@arm.com>
31774 * tree.h (build_index_vector): Declare.
31775 * tree.c (build_index_vector): New function.
31776 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
31777 of units as polynomial, forcibly converting it to a constant if
31778 vectorizable_reduction has already enforced the condition.
31779 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
31780 to create a {1,2,3,...} vector.
31781 (vectorizable_reduction): Treat the number of units as polynomial.
31782 Choose vectype_in based on the largest scalar element size rather
31783 than the smallest number of units. Enforce the restrictions
31786 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31787 Alan Hayward <alan.hayward@arm.com>
31788 David Sherwood <david.sherwood@arm.com>
31790 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
31791 number of units as polynomial.
31793 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31794 Alan Hayward <alan.hayward@arm.com>
31795 David Sherwood <david.sherwood@arm.com>
31797 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
31798 * target.def (autovectorize_vector_sizes): Return the vector sizes
31799 by pointer, using vector_sizes rather than a bitmask.
31800 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
31801 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
31802 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
31804 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
31805 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
31806 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
31807 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
31808 * omp-general.c (omp_max_vf): Likewise.
31809 * omp-low.c (omp_clause_aligned_alignment): Likewise.
31810 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
31811 * tree-vect-loop.c (vect_analyze_loop): Likewise.
31812 * tree-vect-slp.c (vect_slp_bb): Likewise.
31813 * doc/tm.texi: Regenerate.
31814 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
31816 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
31817 the vector size as a poly_uint64 rather than an unsigned int.
31818 (current_vector_size): Change from an unsigned int to a poly_uint64.
31819 (get_vectype_for_scalar_type): Update accordingly.
31820 * tree.h (build_truth_vector_type): Take the size and number of
31821 units as a poly_uint64 rather than an unsigned int.
31822 (build_vector_type): Add a temporary overload that takes
31823 the number of units as a poly_uint64 rather than an unsigned int.
31824 * tree.c (make_vector_type): Likewise.
31825 (build_truth_vector_type): Take the number of units as a poly_uint64
31826 rather than an unsigned int.
31828 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31829 Alan Hayward <alan.hayward@arm.com>
31830 David Sherwood <david.sherwood@arm.com>
31832 * target.def (get_mask_mode): Take the number of units and length
31833 as poly_uint64s rather than unsigned ints.
31834 * targhooks.h (default_get_mask_mode): Update accordingly.
31835 * targhooks.c (default_get_mask_mode): Likewise.
31836 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
31837 * doc/tm.texi: Regenerate.
31839 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31840 Alan Hayward <alan.hayward@arm.com>
31841 David Sherwood <david.sherwood@arm.com>
31843 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
31844 * omp-general.c (omp_max_vf): Likewise.
31845 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
31846 (expand_omp_simd): Handle polynomial safelen.
31847 * omp-low.c (omplow_simd_context): Add a default constructor.
31848 (omplow_simd_context::max_vf): Change from int to poly_uint64.
31849 (lower_rec_simd_input_clauses): Update accordingly.
31850 (lower_rec_input_clauses): Likewise.
31852 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31853 Alan Hayward <alan.hayward@arm.com>
31854 David Sherwood <david.sherwood@arm.com>
31856 * tree-vectorizer.h (vect_nunits_for_cost): New function.
31857 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
31858 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
31859 (vect_analyze_slp_cost): Likewise.
31860 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
31861 (vect_model_load_cost): Likewise.
31863 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31864 Alan Hayward <alan.hayward@arm.com>
31865 David Sherwood <david.sherwood@arm.com>
31867 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
31868 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
31869 from an unsigned int * to a poly_uint64_pod *.
31870 (calculate_unrolling_factor): New function.
31871 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
31873 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31874 Alan Hayward <alan.hayward@arm.com>
31875 David Sherwood <david.sherwood@arm.com>
31877 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
31878 from an unsigned int to a poly_uint64.
31879 (_loop_vec_info::slp_unrolling_factor): Likewise.
31880 (_loop_vec_info::vectorization_factor): Change from an int
31882 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
31883 (vect_get_num_vectors): New function.
31884 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
31885 (vect_get_num_copies): Use vect_get_num_vectors.
31886 (vect_analyze_data_ref_dependences): Change max_vf from an int *
31887 to an unsigned int *.
31888 (vect_analyze_data_refs): Change min_vf from an int * to a
31890 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31891 than an unsigned HOST_WIDE_INT.
31892 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
31893 (vect_analyze_data_ref_dependence): Change max_vf from an int *
31894 to an unsigned int *.
31895 (vect_analyze_data_ref_dependences): Likewise.
31896 (vect_compute_data_ref_alignment): Handle polynomial vf.
31897 (vect_enhance_data_refs_alignment): Likewise.
31898 (vect_prune_runtime_alias_test_list): Likewise.
31899 (vect_shift_permute_load_chain): Likewise.
31900 (vect_supportable_dr_alignment): Likewise.
31901 (dependence_distance_ge_vf): Take the vectorization factor as a
31902 poly_uint64 rather than an unsigned HOST_WIDE_INT.
31903 (vect_analyze_data_refs): Change min_vf from an int * to a
31905 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
31906 vfm1 as a poly_uint64 rather than an int. Make the same change
31907 for the returned bound_scalar.
31908 (vect_gen_vector_loop_niters): Handle polynomial vf.
31909 (vect_do_peeling): Likewise. Update call to
31910 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
31911 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
31913 * tree-vect-loop.c (vect_determine_vectorization_factor)
31914 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
31915 (vect_get_known_peeling_cost): Likewise.
31916 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
31917 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
31918 (vect_transform_loop): Likewise. Use the lowest possible VF when
31919 updating the upper bounds of the loop.
31920 (vect_min_worthwhile_factor): Make static. Return an unsigned int
31921 rather than an int.
31922 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
31923 polynomial unroll factors.
31924 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
31925 (vect_make_slp_decision): Likewise.
31926 (vect_supported_load_permutation_p): Likewise, and polynomial
31928 (vect_analyze_slp_cost): Handle polynomial vf.
31929 (vect_slp_analyze_node_operations): Likewise.
31930 (vect_slp_analyze_bb_1): Likewise.
31931 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31932 than an unsigned HOST_WIDE_INT.
31933 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
31934 (vectorizable_load): Handle polynomial vf.
31935 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
31937 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
31939 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31940 Alan Hayward <alan.hayward@arm.com>
31941 David Sherwood <david.sherwood@arm.com>
31943 * match.pd: Handle bit operations involving three constants
31944 and try to fold one pair.
31946 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31948 * tree-vect-loop-manip.c: Include gimple-fold.h.
31949 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
31950 niters_maybe_zero parameters. Handle other cases besides a step of 1.
31951 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
31952 Add a path that uses a step of VF instead of 1, but disable it
31954 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
31955 and niters_no_overflow parameters. Update calls to
31956 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
31957 Create a new SSA name if the latter choses to use a ste other
31958 than zero, and return it via niters_vector_mult_vf_var.
31959 * tree-vect-loop.c (vect_transform_loop): Update calls to
31960 vect_do_peeling, vect_gen_vector_loop_niters and
31961 slpeel_make_loop_iterate_ntimes.
31962 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
31963 (vect_gen_vector_loop_niters): Update declarations after above changes.
31965 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
31967 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
31968 128-bit round to integer instructions.
31969 (ceil<mode>2): Likewise.
31970 (btrunc<mode>2): Likewise.
31971 (round<mode>2): Likewise.
31973 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31975 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
31976 unaligned VSX load/store on P8/P9.
31977 (expand_block_clear): Allow the use of unaligned VSX
31978 load/store on P8/P9.
31980 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31982 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
31984 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
31985 swap associated with both a load and a store.
31987 2018-01-02 Andrew Waterman <andrew@sifive.com>
31989 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
31990 * config/riscv/riscv.md (clear_cache): Use it.
31992 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
31994 * web.c: Remove out-of-date comment.
31996 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31998 * expr.c (fixup_args_size_notes): Check that any existing
31999 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
32000 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
32001 (emit_single_push_insn): ...here.
32003 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32005 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
32006 (const_vector_encoded_nelts): New function.
32007 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
32008 (const_vector_int_elt, const_vector_elt): Declare.
32009 * emit-rtl.c (const_vector_int_elt_1): New function.
32010 (const_vector_elt): Likewise.
32011 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
32012 of CONST_VECTOR_ELT.
32014 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32016 * expr.c: Include rtx-vector-builder.h.
32017 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
32018 directly on the tree encoding.
32019 (const_vector_from_tree): Likewise.
32020 * optabs.c: Include rtx-vector-builder.h.
32021 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
32022 sequence of "u" values.
32023 * vec-perm-indices.c: Include rtx-vector-builder.h.
32024 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
32025 directly on the vec_perm_indices encoding.
32027 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32029 * doc/rtl.texi (const_vector): Describe new encoding scheme.
32030 * Makefile.in (OBJS): Add rtx-vector-builder.o.
32031 * rtx-vector-builder.h: New file.
32032 * rtx-vector-builder.c: Likewise.
32033 * rtl.h (rtx_def::u2): Add a const_vector field.
32034 (CONST_VECTOR_NPATTERNS): New macro.
32035 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
32036 (CONST_VECTOR_DUPLICATE_P): Likewise.
32037 (CONST_VECTOR_STEPPED_P): Likewise.
32038 (CONST_VECTOR_ENCODED_ELT): Likewise.
32039 (const_vec_duplicate_p): Check for a duplicated vector encoding.
32040 (unwrap_const_vec_duplicate): Likewise.
32041 (const_vec_series_p): Check for a non-duplicated vector encoding.
32042 Say that the function only returns true for integer vectors.
32043 * emit-rtl.c: Include rtx-vector-builder.h.
32044 (gen_const_vec_duplicate_1): Delete.
32045 (gen_const_vector): Call gen_const_vec_duplicate instead of
32046 gen_const_vec_duplicate_1.
32047 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
32048 (gen_const_vec_duplicate): Use rtx_vector_builder.
32049 (gen_const_vec_series): Likewise.
32050 (gen_rtx_CONST_VECTOR): Likewise.
32051 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
32052 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32053 Build a new vector rather than modifying a CONST_VECTOR in-place.
32054 (handle_special_swappables): Update call accordingly.
32055 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
32056 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32057 Build a new vector rather than modifying a CONST_VECTOR in-place.
32058 (handle_special_swappables): Update call accordingly.
32060 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32062 * simplify-rtx.c (simplify_const_binary_operation): Use
32063 CONST_VECTOR_ELT instead of XVECEXP.
32065 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32067 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
32068 the selector elements to be different from the data elements
32069 if the selector is a VECTOR_CST.
32070 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
32071 ssizetype for the selector.
32073 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32075 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
32076 before testing each element individually.
32077 * tree-vect-generic.c (lower_vec_perm): Likewise.
32079 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32081 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
32082 * selftest-run-tests.c (selftest::run_tests): Call it.
32083 * vector-builder.h (vector_builder::operator ==): New function.
32084 (vector_builder::operator !=): Likewise.
32085 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
32086 (vec_perm_indices::all_from_input_p): New function.
32087 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32088 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
32089 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
32090 instead of reading the VECTOR_CST directly. Detect whether both
32091 vector inputs are the same before constructing the vec_perm_indices,
32092 and update the number of inputs argument accordingly. Use the
32093 utility functions added above. Only construct sel2 if we need to.
32095 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32097 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
32098 the broadcast of the low byte.
32099 (expand_mult_highpart): Use an explicit encoding for the permutes.
32100 * optabs-query.c (can_mult_highpart_p): Likewise.
32101 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
32102 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32103 (vectorizable_bswap): Likewise.
32104 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
32105 explicit encoding for the power-of-2 permutes.
32106 (vect_permute_store_chain): Likewise.
32107 (vect_grouped_load_supported): Likewise.
32108 (vect_permute_load_chain): Likewise.
32110 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32112 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
32113 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
32114 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
32115 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32116 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
32117 (vect_gen_perm_mask_any): Likewise.
32119 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32121 * int-vector-builder.h: New file.
32122 * vec-perm-indices.h: Include int-vector-builder.h.
32123 (vec_perm_indices): Redefine as an int_vector_builder.
32124 (auto_vec_perm_indices): Delete.
32125 (vec_perm_builder): Redefine as a stand-alone class.
32126 (vec_perm_indices::vec_perm_indices): New function.
32127 (vec_perm_indices::clamp): Likewise.
32128 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
32129 (vec_perm_indices::new_vector): New function.
32130 (vec_perm_indices::new_expanded_vector): Update for new
32131 vec_perm_indices class.
32132 (vec_perm_indices::rotate_inputs): New function.
32133 (vec_perm_indices::all_in_range_p): Operate directly on the
32134 encoded form, without computing elided elements.
32135 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
32136 encoding. Update for new vec_perm_indices class.
32137 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
32138 the given vec_perm_builder.
32139 (expand_vec_perm_var): Update vec_perm_builder constructor.
32140 (expand_mult_highpart): Use vec_perm_builder instead of
32141 auto_vec_perm_indices.
32142 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
32143 vec_perm_indices instead of auto_vec_perm_indices. Use a single
32144 or double series encoding as appropriate.
32145 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
32146 vec_perm_indices instead of auto_vec_perm_indices.
32147 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32148 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32149 (vect_permute_store_chain): Likewise.
32150 (vect_grouped_load_supported): Likewise.
32151 (vect_permute_load_chain): Likewise.
32152 (vect_shift_permute_load_chain): Likewise.
32153 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32154 (vect_transform_slp_perm_load): Likewise.
32155 (vect_schedule_slp_instance): Likewise.
32156 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32157 (vectorizable_mask_load_store): Likewise.
32158 (vectorizable_bswap): Likewise.
32159 (vectorizable_store): Likewise.
32160 (vectorizable_load): Likewise.
32161 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
32162 vec_perm_indices instead of auto_vec_perm_indices. Use
32163 tree_to_vec_perm_builder to read the vector from a tree.
32164 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
32165 vec_perm_builder instead of a vec_perm_indices.
32166 (have_whole_vector_shift): Use vec_perm_builder and
32167 vec_perm_indices instead of auto_vec_perm_indices. Leave the
32168 truncation to calc_vec_perm_mask_for_shift.
32169 (vect_create_epilog_for_reduction): Likewise.
32170 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
32171 from auto_vec_perm_indices to vec_perm_indices.
32172 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32173 instead of changing individual elements.
32174 (aarch64_vectorize_vec_perm_const): Use new_vector to install
32175 the vector in d.perm.
32176 * config/arm/arm.c (expand_vec_perm_d::perm): Change
32177 from auto_vec_perm_indices to vec_perm_indices.
32178 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32179 instead of changing individual elements.
32180 (arm_vectorize_vec_perm_const): Use new_vector to install
32181 the vector in d.perm.
32182 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
32183 Update vec_perm_builder constructor.
32184 (rs6000_expand_interleave): Likewise.
32185 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
32186 (rs6000_expand_interleave): Likewise.
32188 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32190 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
32191 to qimode could truncate the indices.
32192 * optabs.c (expand_vec_perm_var): Likewise.
32194 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32196 * Makefile.in (OBJS): Add vec-perm-indices.o.
32197 * vec-perm-indices.h: New file.
32198 * vec-perm-indices.c: Likewise.
32199 * target.h (vec_perm_indices): Replace with a forward class
32201 (auto_vec_perm_indices): Move to vec-perm-indices.h.
32202 * optabs.h: Include vec-perm-indices.h.
32203 (expand_vec_perm): Delete.
32204 (selector_fits_mode_p, expand_vec_perm_var): Declare.
32205 (expand_vec_perm_const): Declare.
32206 * target.def (vec_perm_const_ok): Replace with...
32207 (vec_perm_const): ...this new hook.
32208 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
32209 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
32210 * doc/tm.texi: Regenerate.
32211 * optabs.def (vec_perm_const): Delete.
32212 * doc/md.texi (vec_perm_const): Likewise.
32213 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
32214 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
32215 expand_vec_perm for constant permutation vectors. Assert that
32216 the mode of variable permutation vectors is the integer equivalent
32217 of the mode that is being permuted.
32218 * optabs-query.h (selector_fits_mode_p): Declare.
32219 * optabs-query.c: Include vec-perm-indices.h.
32220 (selector_fits_mode_p): New function.
32221 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
32222 is defined, instead of checking whether the vec_perm_const_optab
32223 exists. Use targetm.vectorize.vec_perm_const instead of
32224 targetm.vectorize.vec_perm_const_ok. Check whether the indices
32225 fit in the vector mode before using a variable permute.
32226 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
32227 vec_perm_indices instead of an rtx.
32228 (expand_vec_perm): Replace with...
32229 (expand_vec_perm_const): ...this new function. Take the selector
32230 as a vec_perm_indices rather than an rtx. Also take the mode of
32231 the selector. Update call to shift_amt_for_vec_perm_mask.
32232 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
32233 Use vec_perm_indices::new_expanded_vector to expand the original
32234 selector into bytes. Check whether the indices fit in the vector
32235 mode before using a variable permute.
32236 (expand_vec_perm_var): Make global.
32237 (expand_mult_highpart): Use expand_vec_perm_const.
32238 * fold-const.c: Includes vec-perm-indices.h.
32239 * tree-ssa-forwprop.c: Likewise.
32240 * tree-vect-data-refs.c: Likewise.
32241 * tree-vect-generic.c: Likewise.
32242 * tree-vect-loop.c: Likewise.
32243 * tree-vect-slp.c: Likewise.
32244 * tree-vect-stmts.c: Likewise.
32245 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
32247 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
32248 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
32249 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
32250 (aarch64_vectorize_vec_perm_const): ...this new function.
32251 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32252 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32253 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
32254 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
32255 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32256 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32257 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
32259 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
32260 check for NEON modes.
32261 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
32262 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
32263 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
32264 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
32266 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
32267 the old VEC_PERM_CONST conditions.
32268 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
32269 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
32270 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
32271 (ia64_vectorize_vec_perm_const_ok): Merge into...
32272 (ia64_vectorize_vec_perm_const): ...this new function.
32273 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
32274 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
32275 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
32276 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
32277 * config/mips/mips.c (mips_expand_vec_perm_const)
32278 (mips_vectorize_vec_perm_const_ok): Merge into...
32279 (mips_vectorize_vec_perm_const): ...this new function.
32280 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
32281 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
32282 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
32283 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
32284 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
32285 (rs6000_expand_vec_perm_const): Delete.
32286 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
32288 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32289 (altivec_expand_vec_perm_const_le): Take each operand individually.
32290 Operate on constant selectors rather than rtxes.
32291 (altivec_expand_vec_perm_const): Likewise. Update call to
32292 altivec_expand_vec_perm_const_le.
32293 (rs6000_expand_vec_perm_const): Delete.
32294 (rs6000_vectorize_vec_perm_const_ok): Delete.
32295 (rs6000_vectorize_vec_perm_const): New function.
32296 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32297 an element count and rtx array.
32298 (rs6000_expand_extract_even): Update call accordingly.
32299 (rs6000_expand_interleave): Likewise.
32300 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
32301 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
32302 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
32303 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
32304 (rs6000_expand_vec_perm_const): Delete.
32305 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32306 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32307 (altivec_expand_vec_perm_const_le): Take each operand individually.
32308 Operate on constant selectors rather than rtxes.
32309 (altivec_expand_vec_perm_const): Likewise. Update call to
32310 altivec_expand_vec_perm_const_le.
32311 (rs6000_expand_vec_perm_const): Delete.
32312 (rs6000_vectorize_vec_perm_const_ok): Delete.
32313 (rs6000_vectorize_vec_perm_const): New function. Remove stray
32314 reference to the SPE evmerge intructions.
32315 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32316 an element count and rtx array.
32317 (rs6000_expand_extract_even): Update call accordingly.
32318 (rs6000_expand_interleave): Likewise.
32319 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
32320 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
32322 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32324 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32326 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
32327 vector mode and that that mode matches the mode of the data
32329 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
32330 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
32331 directly using expand_vec_perm_1 when forcing selectors into
32333 (expand_vec_perm_var): New function, split out from expand_vec_perm.
32335 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32337 * optabs-query.h (can_vec_perm_p): Delete.
32338 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
32339 * optabs-query.c (can_vec_perm_p): Split into...
32340 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
32341 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
32342 particular selector is valid.
32343 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32344 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32345 (vect_grouped_load_supported): Likewise.
32346 (vect_shift_permute_load_chain): Likewise.
32347 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32348 (vect_transform_slp_perm_load): Likewise.
32349 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32350 (vectorizable_bswap): Likewise.
32351 (vect_gen_perm_mask_checked): Likewise.
32352 * fold-const.c (fold_ternary_loc): Likewise. Don't take
32353 implementations of variable permutation vectors into account
32354 when deciding which selector to use.
32355 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
32356 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
32357 with a false third argument.
32358 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
32359 to test whether the constant selector is valid and can_vec_perm_var_p
32360 to test whether a variable selector is valid.
32362 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32364 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
32365 * optabs-query.c (can_vec_perm_p): Likewise.
32366 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
32367 instead of vec_perm_indices.
32368 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
32369 (vect_gen_perm_mask_checked): Likewise,
32370 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
32371 (vect_gen_perm_mask_checked): Likewise,
32373 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32375 * optabs-query.h (qimode_for_vec_perm): Declare.
32376 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
32377 (qimode_for_vec_perm): ...this new function.
32378 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
32380 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32382 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
32383 does not have a conditional at the top.
32385 2018-01-02 Richard Biener <rguenther@suse.de>
32387 * ipa-inline.c (big_speedup_p): Fix expression.
32389 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32392 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
32395 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32399 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
32400 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
32401 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
32402 cond_taken_branch_cost 3->4.
32404 2018-01-01 Jakub Jelinek <jakub@redhat.com>
32406 PR tree-optimization/83581
32407 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
32408 TODO_cleanup_cfg if any changes have been made.
32410 PR middle-end/83608
32411 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
32412 convert_modes if target mode has the right side, but different mode
32415 PR middle-end/83609
32416 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
32417 last argument when extracting from CONCAT. If either from_real or
32418 from_imag is NULL, use expansion through memory. If result is not
32419 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
32420 the parts directly to inner mode, if even that fails, use expansion
32423 PR middle-end/83623
32424 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
32425 check for bswap in mode rather than HImode and use that in expand_unop
32428 Copyright (C) 2018 Free Software Foundation, Inc.
32430 Copying and distribution of this file, with or without modification,
32431 are permitted in any medium without royalty provided the copyright
32432 notice and this notice are preserved.