1 2018-09-04 Martin Liska <mliska@suse.cz>
3 * genmatch.c (output_line_directive): Add new argument
5 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
7 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
9 * doc/invoke.texi (Option Summary): Add whitespace.
11 * doc/invoke.texi (Option Summary): Add -Waligned-new.
13 2018-09-04 Richard Biener <rguenther@suse.de>
15 PR tree-optimization/87211
16 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
17 backedge value we're supposed to treat as VARYING also number
18 the PHI to VARYING in case it got a different value-number already.
20 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
22 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
23 (extract_range_from_binary_expr_1): Do not call
24 vrp_can_optimize_bit_op.
25 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
27 (wide_int_range_get_mask_and_bounds): New.
28 (wide_int_range_optimize_bit_op): New.
29 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
30 (wide_int_range_bit_and): Same.
31 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
32 (wide_int_range_optimize_bit_op): New.
33 (wide_int_range_get_mask_and_bounds): New.
35 2018-09-04 Richard Biener <rguenther@suse.de>
37 PR tree-optimization/87176
38 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
39 variable. When value-numbering a virtual PHI node make sure
40 to not value-number to the backedge value.
42 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
44 * doc/extend.texi (Long Long, Hex Floats): Document support for
45 long long and hex floats in more recent versions of ISO C++.
47 2018-09-03 Richard Biener <rguenther@suse.de>
49 PR tree-optimization/87177
50 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
53 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
55 * bb-reorder.c (edge_order): Convert to C-qsort-style
57 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
59 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
61 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
63 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
65 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
67 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
68 (mergesort): ... here as maximum count for using netsort.
69 (gcc_qsort): Set nlim to 3 if stable sort is requested.
70 (gcc_stablesort): New.
71 * system.h (gcc_stablesort): Declare.
73 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
75 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
76 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
77 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
79 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
81 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
82 lxsdx and stxsdx alternatives.
83 (*mov<mode>_hardfloat64): Ditto.
84 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
86 2018-09-03 Richard Biener <rguenther@suse.de>
88 PR tree-optimization/87200
89 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
92 2018-09-03 Martin Liska <mliska@suse.cz>
94 PR tree-optimization/87201
95 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
96 Fix parenthesis in an expression.
98 2018-09-03 Richard Biener <rguenther@suse.de>
100 PR tree-optimization/87197
101 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
102 visited. CSE the VN_INFO hashtable lookup.
104 PR tree-optimization/87169
105 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
106 iterating make sure there's no extra backedges from irreducible
107 regions feeding the header. Mark the destination block
110 2018-09-03 Martin Liska <mliska@suse.cz>
113 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
114 * common/common-targhooks.c (default_get_valid_option_values):
116 * common/common-targhooks.h (default_get_valid_option_values):
118 * common/config/i386/i386-common.c: Move processor_target_table
120 (ix86_get_valid_option_values): New function.
121 (TARGET_GET_VALID_OPTION_VALUES): New macro.
122 * config/i386/i386.c (struct ptt): Move to i386-common.c.
123 (PTA_*): Move all defined masks into i386-common.c.
124 (ix86_function_specific_restore): Use new processor_cost_table.
125 * config/i386/i386.h (struct ptt): Moved from i386.c.
126 (struct pta): Likewise.
127 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
128 * doc/tm.texi.in: Likewise.
129 * opt-suggestions.c (option_proposer::suggest_option):
130 Pass prefix to build_option_suggestions.
131 (option_proposer::get_completions): Likewise.
132 (option_proposer::build_option_suggestions): Use the new target
134 * opts.c (struct option_help_tuple): New struct.
135 (print_filtered_help): Use the new target hook.
137 2018-09-03 Martin Liska <mliska@suse.cz>
140 * predict.c (set_even_probabilities): Add likely_edges
141 argument and handle cases where we have precisely one
143 (combine_predictions_for_bb): Catch also likely_edges.
144 (tree_predict_by_opcode): Handle gswitch statements.
145 * tree-cfg.h (find_case_label_for_value): New declaration.
146 (find_taken_edge_switch_expr): Likewise.
147 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
148 Find pivot in decision tree based on probabily, not by number of
151 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
153 * doc/standards.texi (Standards): Update Objective-C reference.
155 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
157 * doc/install.texi (Prerequisites): Update link for MPC.
159 2018-09-01 Michael Matz <matz@suse.de>
161 PR tree-optimization/87074
162 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
163 PHIs for outer-loop uses.
165 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
167 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
168 * doc/invoke.texi (C Dialect Options): Ditto.
170 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
172 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
174 2018-08-31 Richard Biener <rguenther@suse.de>
176 PR tree-optimization/87168
177 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
178 (rpo_elim::eliminate_avail): When OP was not visited it must
181 2018-08-31 David Malcolm <dmalcolm@redhat.com>
183 * tree-vrp.c (copy_value_range): Convert param "from" from
184 "value_range *" to "const value_range *".
185 (range_is_null): Likewise for param "vr".
186 (range_int_cst_p): Likewise.
187 (range_int_cst_singleton_p): Likewise.
188 (symbolic_range_p): Likewise.
189 (value_ranges_intersect_p): Likewise for both params.
190 (value_range_nonnegative_p): Likewise for param "vr".
191 (value_range_constant_singleton): Likewise.
192 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
193 (extract_range_into_wide_ints): Likewise for param "vr".
194 (extract_range_from_multiplicative_op): Likewise for params "vr0"
196 (vrp_can_optimize_bit_op): Likewise.
197 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
199 (extract_range_from_unary_expr): Likewise.
200 (debug_value_range): Likewise for param "vr".
201 (value_range::dump): Add "const" qualifier.
202 (vrp_prop::check_array_ref): Convert local "vr" from
203 "value_range *" to "const value_range *".
204 (vrp_prop::check_mem_ref): Likewise.
205 (vrp_prop::visit_stmt): Likewise for local "old_vr".
206 (vrp_intersect_ranges_1): Likewise for param "vr_1".
207 (vrp_intersect_ranges): Likewise.
208 (simplify_stmt_for_jump_threading): Likewise for local "vr".
209 (vrp_prop::vrp_finalize): Likewise.
210 * tree-vrp.h (value_range::dump): Add "const" qualifier.
211 (vrp_intersect_ranges): Add "const" qualifier to params as above.
212 (extract_range_from_unary_expr): Likewise.
213 (value_range_constant_singleton): Likewise.
214 (symbolic_range_p): Likewise.
215 (copy_value_range): Likewise.
216 (extract_range_from_binary_expr_1): Likewise.
217 (range_int_cst_p): Likewise.
218 (vrp_set_zero_nonzero_bits): Likewise.
219 (range_int_cst_singleton_p): Likewise.
221 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
223 * config/aarch64/arm_neon.h (vabsd_s64): New.
224 (vnegd_s64): Likewise.
226 2018-08-31 Martin Jambor <mjambor@suse.cz>
228 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
230 2018-08-31 Martin Liska <mliska@suse.cz>
232 * ipa-icf.c (sem_item::add_type): Use
233 sem_item::m_type_hash_cache.
234 * ipa-icf.h: Move the cache from sem_item_optimizer
237 2018-08-31 Nathan Sidwell <nathan@acm.org>
239 * doc/extend.texi (Backwards Compatibility): Remove implicit
240 extern C leeway of () being (...).
242 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
244 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
246 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
250 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
252 2018-08-31 Jakub Jelinek <jakub@redhat.com>
255 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
256 gen_int_mode. Formatting fixes.
258 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
260 * target.def (custom_function_descriptors): Improve documentation.
261 * doc/tm.texi.in (Trampolines): Expand discussion of function
262 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
263 beginning of the section.
264 * doc/tm.texi: Regenerated.
266 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
268 * cfg.h (class auto_edge_flag): Spell out the template-id of the
269 base class in the initializer list. This is a workaround for
270 building with older GCC.
271 (class auto_bb_flag): Likewise.
273 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
275 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
276 (altivec_vcmpequ<VI_char>_p): Remove star.
277 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
279 (expand_strncmp_vec_sequence): New function.
280 (emit_final_str_compare_vec): New function.
281 (expand_strn_compare): Add support for vector strncmp.
282 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
283 length specification to bytes.
284 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
285 (vcmpnezb_p): New pattern.
286 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
287 for option -mstring-compare-inline-limit.
289 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
291 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
292 (PTA_SKYLAKE): Add PTA_AES.
293 (PTA_GOLDMONT): Likewise.
295 2018-08-29 Jan Hubicka <jh@suse.cz>
298 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
299 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
301 2018-08-29 Jan Hubicka <jh@suse.cz>
303 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
305 (hash_tree): Do not visit TYPE_STUB_DECL.
306 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
307 stream TYPE_STUB_DECL.
308 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
309 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
310 after free_lang_data.
311 (type_in_anonymous_namespace_p): Likewise.
313 2018-08-29 Jan Hubicka <jh@suse.cz>
315 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
316 comment that it has to be even number.
317 (class sreal): Change m_sig type to int32_t.
318 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
319 int64_t for temporary calculations.
320 (sreal_verify_basics): Drop one bit from minimum and maximum.
322 2018-08-30 Richard Biener <rguenther@suse.de>
324 PR tree-optimization/87147
325 * tree-ssa-sccvn.c (SSA_VISITED): New function.
326 (visit_phi): When the degenerate result is from the backedge and
327 we didn't visit its definition yet drop to VARYING.
328 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
330 2018-08-29 Jan Hubicka <jh@suse.cz>
332 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
334 (hash_tree): Likewise.
336 2018-08-29 Jan Hubicka <jh@suse.cz>
338 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
339 and TYPE_NEXT_REF_TO.
341 2018-08-29 Jan Hubicka <jh@suse.cz>
343 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
344 comment that it has to be even number.
345 (class sreal): Change m_sig type to int32_t.
346 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
347 int64_t for temporary calculations.
348 (sreal_verify_basics): Drop one bit from minimum and maximum.
350 2018-08-30 Tamar Christina <tamar.christina@arm.com>
352 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
354 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
357 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
358 if to_add is negative.
360 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
363 * builtins.c (c_strlen): Improve range checks.
365 2018-08-29 Martin Sebor <msebor@redhat.com>
366 Jeff Law <law@redhat.com>
368 PR tree-optimization/86714
369 PR tree-optimization/86711
370 * builtins.c (c_strlen): Add arguments to call to string_constant.
371 * expr.c (string_constant): Add argument. Detect missing nul
372 terminator and outermost declaration it's missing in.
373 * expr.h (string_constant): Add argument.
374 * fold-const.c (read_from_constant_string): Add arguments to call to
376 (c_getstr): Likewise.
377 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
379 * tree-ssa-strlen.c (get_stridx): Likewise.
381 2018-08-29 Jan Hubicka <jh@suse.cz>
383 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
384 Do not stream DECL_VINDEX.
385 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
386 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
387 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
389 2018-08-29 Richard Biener <rguenther@suse.de>
391 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
392 virtual operands that are not default defs to honor region
394 (rpo_vn_valueize): Remove ineffective code here.
396 2018-08-29 Richard Biener <rguenther@suse.de>
398 PR tree-optimization/87132
399 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
400 when skipping defs reachable over backedges.
402 2018-08-29 Richard Biener <rguenther@suse.de>
404 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
405 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
406 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
407 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
408 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
409 (vn_reference_lookup_3): Remove use of const_parms.
410 (free_rpo_vn): Do not free const_parms.
411 (do_rpo_vn): Do not call init_const_parms.
412 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
413 SSA_NAME_POINTS_TO_READONLY_MEMORY.
414 (call_may_clobber_ref_p_1): Likewise.
416 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
419 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
421 (-ftree-scev-cprop): Document.
423 2018-08-29 Jan Hubicka <jh@suse.cz>
425 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
427 (sreal constructor): Update.
428 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
429 sreal:operator/): Update.
431 2018-08-29 Martin Liska <mliska@suse.cz>
433 * tree-switch-conversion.c (switch_conversion::expand):
434 Strenghten assumption about gswitch statements.
436 2018-08-29 Richard Biener <rguenther@suse.de>
438 PR tree-optimization/87117
439 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
440 re-value-number released SSA VDEFs.
442 2018-08-29 Richard Biener <rguenther@suse.de>
444 PR tree-optimization/87126
445 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
447 2018-08-28 Jim Wilson <jimw@sifive.com>
449 * config/riscv/pic.md: Rewrite.
450 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
452 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
453 (SOFTF, default_load, softload, softstore): New.
455 2018-08-28 Jeff Law <law@redhat.com>
457 * fold-const.c (fold_binary_loc): Remove recently added assert.
459 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
461 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
462 to OP parmeter of generated function.
464 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
466 PR tree-optimization/87009
467 * match.pd: Add boolean optimizations.
469 2018-08-28 Martin Sebor <msebor@redhat.com>
472 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
473 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
474 (pass_walloca::gate): Use it.
475 (alloca_call_type): Same.
476 (pass_walloca::execute): Same.
477 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
479 2018-08-28 David Malcolm <dmalcolm@redhat.com>
481 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
482 GCC_VERSION for usage of "__gcc_dump_printf__" format from
485 2018-08-28 Richard Biener <rguenther@suse.de>
487 PR tree-optimization/87124
488 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
489 constants before looking up avail.
491 2018-08-28 Jakub Jelinek <jakub@redhat.com>
494 * calls.c (maybe_warn_nonstring_arg): Punt early if
495 warn_stringop_overflow is zero. Don't call get_range_strlen
496 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
497 Swap comparison operands to have constants on rhs. Only use
498 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
501 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
503 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
504 use of tree_to_shwi. Remove duplicated test for the size being
505 a whole number of bytes.
507 2018-08-28 Richard Biener <rguenther@suse.de>
509 PR tree-optimization/87117
510 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
511 Handle removed stmt without LHS (GIMPLE_NOP).
513 2018-08-28 Richard Biener <rguenther@suse.de>
515 PR tree-optimization/87117
516 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
517 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
519 2018-08-28 Richard Biener <rguenther@suse.de>
521 PR tree-optimization/87117
522 * tree-ssa-pre.c (compute_avail): Do not make expressions
523 with predicated values available.
524 (get_expr_value_id): Assert we do not run into predicated value
527 2018-08-28 Richard Biener <rguenther@suse.de>
529 PR tree-optimization/87117
530 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
531 get virtual operands.
532 (get_expr_operands): Handle STRING_CST like other decls.
534 2018-08-28 Martin Liska <mliska@suse.cz>
536 * tree.h: Update documentation of fndecl_built_in_p
540 2018-08-27 Jeff Law <law@redhat.com>
541 PR tree-optimization/87110
542 * tree-ssa-dse.c (compute_trims): Handle non-constant
545 2018-08-27 Martin Sebor <msebor@redhat.com>
547 PR tree-optimization/86914
548 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
550 2018-08-27 Martin Sebor <msebor@redhat.com>
552 PR tree-optimization/87112
553 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
554 the type of the bound argument.
556 2018-08-27 Jeff Law <law@redhat.com>
558 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
559 type does not have a TYPE_SIZE_UNIT.
561 2018-08-27 Steve Ellcey <sellcey@cavium.com>
563 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
564 with include of backend.h.
566 2018-08-27 Richard Biener <rguenther@suse.de>
568 PR tree-optimization/86927
569 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
570 use const cond reduction code.
572 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
574 PR tree-optimization/85758
575 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
577 2018-08-27 David Malcolm <dmalcolm@redhat.com>
580 * diagnostic-show-locus.c (class layout_range): Update for
581 conversion of show_caret_p to a tri-state.
582 (layout_range::layout_range): Likewise.
583 (make_range): Likewise.
584 (layout::maybe_add_location_range): Likewise.
585 (layout::should_print_annotation_line_p): Don't show annotation
586 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
587 (layout::get_state_at_point): Update for conversion of
588 show_caret_p to a tri-state. Bail out early for
589 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
590 underlining or source colorization.
591 (gcc_rich_location::add_location_if_nearby): Update for conversion
592 of show_caret_p to a tri-state.
593 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
594 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
596 (selftest::test_one_liner_labels): Likewise.
597 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
598 conversion of show_caret_p to a tri-state.
599 * pretty-print.c (text_info::set_location): Likewise.
600 * pretty-print.h (text_info::set_location): Likewise.
601 * substring-locations.c (format_warning_n_va): Likewise.
602 * tree-diagnostic.c (default_tree_printer): Likewise.
603 * tree-pretty-print.c (newline_and_indent): Likewise.
605 2018-08-27 David Malcolm <dmalcolm@redhat.com>
608 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
609 line above for line-insertion fix-it hints.
610 (selftest::test_fixit_insert_containing_newline): Update the
611 expected results, and add a test with line-numbering enabled.
613 2018-08-27 Martin Liska <mliska@suse.cz>
616 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
617 params with DECL_HAS_VALUE_EXPR_P.
619 2018-08-27 Martin Liska <mliska@suse.cz>
621 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
622 selected expansion strategy.
624 2018-08-27 Martin Liska <mliska@suse.cz>
626 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
627 * builtins.c (is_builtin_fn): Likewise.
628 * attribs.c (diag_attr_exclusions): Use new function
629 fndecl_built_in_p and remove check for FUNCTION_DECL if
631 (builtin_mathfn_code): Likewise.
632 (fold_builtin_expect): Likewise.
633 (fold_call_expr): Likewise.
634 (fold_builtin_call_array): Likewise.
635 (fold_call_stmt): Likewise.
636 (set_builtin_user_assembler_name): Likewise.
637 (is_simple_builtin): Likewise.
638 * calls.c (gimple_alloca_call_p): Likewise.
639 (maybe_warn_nonstring_arg): Likewise.
640 * cfgexpand.c (expand_call_stmt): Likewise.
641 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
642 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
643 (cgraph_node::verify_node): Likewise.
644 * cgraphclones.c (build_function_decl_skip_args): Likewise.
645 (cgraph_node::create_clone): Likewise.
646 * config/arm/arm.c (arm_insert_attributes): Likewise.
647 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
648 * dse.c (scan_insn): Likewise.
649 * expr.c (expand_expr_real_1): Likewise.
650 * fold-const.c (operand_equal_p): Likewise.
651 (fold_binary_loc): Likewise.
652 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
653 * gimple-low.c (lower_stmt): Likewise.
654 * gimple-pretty-print.c (dump_gimple_call): Likewise.
655 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
656 * gimple.c (gimple_build_call_from_tree): Likewise.
657 (gimple_call_builtin_p): Likewise.
658 (gimple_call_combined_fn): Likewise.
659 * gimplify.c (gimplify_call_expr): Likewise.
660 (gimple_boolify): Likewise.
661 (gimplify_modify_expr): Likewise.
662 (gimplify_addr_expr): Likewise.
663 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
664 * ipa-cp.c (determine_versionability): Likewise.
665 * ipa-fnsummary.c (compute_fn_summary): Likewise.
666 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
667 * ipa-split.c (visit_bb): Likewise.
668 (split_function): Likewise.
669 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
670 * lto-cgraph.c (input_node): Likewise.
671 * lto-streamer-out.c (write_symbol): Likewise.
672 * omp-low.c (setjmp_or_longjmp_p): Likewise.
673 (lower_omp_1): Likewise.
674 * predict.c (strip_predict_hints): Likewise.
675 * print-tree.c (print_node): Likewise.
676 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
677 * trans-mem.c (is_tm_irrevocable): Likewise.
678 (is_tm_load): Likewise.
679 (is_tm_simple_load): Likewise.
680 (is_tm_store): Likewise.
681 (is_tm_simple_store): Likewise.
682 (is_tm_abort): Likewise.
683 (tm_region_init_1): Likewise.
684 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
685 * tree-cfg.c (verify_gimple_call): Likewise.
686 (move_stmt_r): Likewise.
687 (stmt_can_terminate_bb_p): Likewise.
688 * tree-eh.c (lower_eh_constructs_2): Likewise.
689 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
690 * tree-inline.c (remap_gimple_stmt): Likewise.
692 (estimate_num_insns): Likewise.
693 (fold_marked_statements): Likewise.
694 * tree-sra.c (scan_function): Likewise.
695 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
696 (optimize_stack_restore): Likewise.
697 (pass_fold_builtins::execute): Likewise.
698 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
699 (mark_all_reaching_defs_necessary_1): Likewise.
700 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
701 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
702 (pass_forwprop::execute): Likewise.
703 * tree-ssa-loop-im.c (stmt_cost): Likewise.
704 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
705 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
706 * tree-ssa-strlen.c (get_string_length): Likewise.
707 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
708 (find_func_aliases_for_call): Likewise.
709 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
710 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
711 * tree-tailcall.c (find_tail_calls): Likewise.
712 * tree.c (need_assembler_name_p): Likewise.
713 (free_lang_data_in_decl): Likewise.
714 (get_call_combined_fn): Likewise.
715 * ubsan.c (is_ubsan_builtin_p): Likewise.
716 * varasm.c (incorporeal_function_p): Likewise.
717 * tree.h (DECL_BUILT_IN): Remove and replace with
719 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
720 (fndecl_built_in_p): New.
722 2018-08-27 Martin Liska <mliska@suse.cz>
724 PR tree-optimization/86847
725 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
726 Dump also subtree probability.
727 (switch_decision_tree::do_jump_if_equal): New function.
728 (switch_decision_tree::emit_case_nodes): Handle special
729 situations in balanced tree that can be emitted much simpler.
730 Fix calculation of probabilities that happen in tree expansion.
731 * tree-switch-conversion.h (struct cluster): Add
733 (struct simple_cluster): Likewise.
734 (struct case_tree_node): Add new function has_child.
735 (do_jump_if_equal): New.
737 2018-08-27 Martin Liska <mliska@suse.cz>
739 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
740 Add new argument to bit_test_cluster constructor.
741 (bit_test_cluster::emit): Set bits really number of values
743 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
744 probability argument.
745 * tree-switch-conversion.h (struct bit_test_cluster):
746 Add m_handles_entire_switch.
748 2018-08-27 Martin Liska <mliska@suse.cz>
750 PR tree-optimization/86702
751 * tree-switch-conversion.c (jump_table_cluster::emit):
752 Make probabilities even for values in jump table
753 according to number of cases handled.
754 (switch_decision_tree::compute_cases_per_edge): Pass
755 argument to reset_out_edges_aux function.
756 (switch_decision_tree::analyze_switch_statement): Likewise.
757 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
760 2018-08-27 Martin Liska <mliska@suse.cz>
762 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
763 cfun argument explicitly.
764 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
765 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
766 function gimple_switch_default_bb.
767 (convert_switch_statements):
769 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
770 * stmt.c (label_to_block_fn): Use label_to_block and pass
771 cfun argument explicitly and use gimple_switch_label_bb.
772 (expand_case): Likewise.
773 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
774 cfun argument explicitly. Likewise.
775 (make_edges_bb): Likewise.
776 (make_cond_expr_edges): Likewise.
777 (get_cases_for_edge): Likewise.
778 (make_gimple_switch_edges): Likewise.
779 (label_to_block_fn): Likewise.
780 (label_to_block): Likewise.
781 (make_goto_expr_edges): Likewise.
782 (make_gimple_asm_edges): Likewise.
783 (main_block_label): Likewise.
784 (group_case_labels_stmt): Likewise.
785 (find_taken_edge_computed_goto): Likewise.
786 (find_taken_edge_switch_expr): Likewise.
787 (gimple_verify_flow_info): Likewise.
788 (gimple_redirect_edge_and_branch): Likewise.
789 (gimple_switch_label_bb): New function.
790 (gimple_switch_default_bb): Likewise.
791 (gimple_switch_edge): Likewise.
792 (gimple_switch_default_edge): Likewise.
793 * tree-cfg.h (label_to_block_fn): Remove and replace ...
794 (label_to_block): ... with this.
795 (gimple_switch_label_bb): New.
796 (gimple_switch_default_bb): Likewise.
797 (gimple_switch_edge): Likewise.
798 (gimple_switch_default_edge): Likewise.
799 * tree-cfgcleanup.c (convert_single_case_switch): Use
800 new gimple functions and pass new argument to label_to_block.
801 (cleanup_control_flow_bb):
802 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
803 cfun argument explicitly.
804 (make_eh_edges): Likewise.
805 (redirect_eh_dispatch_edge): Likewise.
806 (lower_resx): Likewise.
807 (lower_eh_dispatch): Likewise.
808 (maybe_remove_unreachable_handlers): Likewise.
809 (unsplit_eh): Likewise.
810 (cleanup_empty_eh): Likewise.
811 (verify_eh_edges): Likewise.
812 (verify_eh_dispatch_edge): Likewise.
813 * tree-ssa-dom.c (record_edge_info): Likewise.
814 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
815 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
816 (thread_through_normal_block): Likewise.
817 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
818 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
819 * tree-switch-conversion.c (switch_conversion::collect): Use new
821 (switch_conversion::check_final_bb): Likewise.
822 (switch_conversion::gather_default_values): Pass new argument
824 (switch_conversion::build_constructors): Likewise.
825 (switch_decision_tree::compute_cases_per_edge): Use new
826 gimple_switch_edge function.
827 (switch_decision_tree::analyze_switch_statement): Pass new argument
829 (switch_decision_tree::try_switch_expansion): Use
830 gimple_switch_default_edge.
831 * tree-vrp.c (find_switch_asserts): Pass new argument
833 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
834 (vr_values::simplify_switch_using_ranges): Likewise.
836 2018-08-27 Richard Biener <rguenther@suse.de>
838 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
839 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
841 * tree-ssa-sccvn.h (struct vn_pval): New structure.
842 (struct vn_nary_op_s): Add unwind_to member. Add
843 predicated_values flag and put result into a union together
844 with a linked list of vn_pval.
845 (struct vn_ssa_aux): Add name member to make maintaining
846 a map of SSA name to vn_ssa_aux possible. Remove no longer
847 needed info, dfsnum, low, visited, on_sccstack, use_processed
848 and range_info_anti_range_p members.
849 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
850 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
852 (vn_valueize): New global.
853 (vn_context_bb): Likewise.
854 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
855 VN_INFO_PTR_INFO): Remove.
856 * tree-ssa-sccvn.c: ... (rewrite)
857 (pass_fre::execute): For -O2+ initialize loops and run
858 RPO VN in optimistic mode (iterating). For -O1 and -Og
859 run RPO VN in non-optimistic mode.
860 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
861 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
862 * doc/invoke.texi (sccvn-max-scc-size): Remove.
863 (rpo-vn-max-loop-depth): Document.
864 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
865 when valuezing the VUSE signals we walked out of the region.
866 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
867 (phi_translate): Set VN context block to use for availability
869 (compute_avail): Likewise.
870 (pre_valueize): New function.
871 (pass_pre::execute): Adjust to the RPO VN API.
873 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
874 (propagate_constants_for_unrolling): Remove.
875 (tree_unroll_loops_completely): Perform value-numbering
876 on the unrolled bodies loop parent.
878 2018-08-27 Richard Biener <rguenther@suse.de>
880 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
881 for partial antic compute.
883 2018-08-27 Jakub Jelinek <jakub@redhat.com>
885 PR rtl-optimization/87065
886 * combine.c (simplify_if_then_else): Formatting fix.
887 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
889 (known_cond): Don't return const_true_rtx for vector modes. Use
890 CONST0_RTX instead of const0_rtx. Formatting fixes.
892 2018-08-27 Martin Liska <mliska@suse.cz>
894 PR gcov-profile/87069
895 * gcov.c (process_file): Record files already processed
896 and warn about a file being processed multiple times.
898 2018-08-27 Martin Liska <mliska@suse.cz>
901 * config/aarch64/aarch64.c (aarch64_override_options_internal):
902 Set default values for x_aarch64_*_string strings.
903 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
904 prefix. For -mabi do not print '=ABI' in help and use
905 <option_value> format for -msve-vector-bits and -moverride
908 2018-08-26 Jeff Law <law@redhat.com>
910 * config/mips/frame-header-opt.c: Include "backend.h" rather than
913 2018-08-26 Marek Polacek <polacek@redhat.com>
915 PR c++/87029, Implement -Wredundant-move.
916 * doc/invoke.texi: Document -Wredundant-move.
918 2018-08-25 Martin Sebor <msebor@redhat.com>
920 PR tree-optimization/87059
921 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
922 to the same type as the other.
923 * fold-const.c (fold_binary_loc): Assert expectation.
925 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
927 * config/darwin.c (machopic_legitimize_pic_address): Clean up
928 extraneous parentheses, dead code section and formatting.
930 2018-08-24 David Malcolm <dmalcolm@redhat.com>
933 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
934 wide enough for jumps in the line-numbering to be visible.
935 (layout::print_gap_in_line_numbering): New member function.
936 (layout::calculate_line_spans): When using line numbering, merge
937 line spans that are only 1 line apart.
938 (diagnostic_show_locus): When printing line numbers, show gaps in
939 line numbering directly, rather than printing headers.
940 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
941 line-numbering with multiple line spans.
942 (selftest::test_fixit_insert_containing_newline_2): Add test of
943 line-numbering, in which the spans are close enough to be merged.
945 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
947 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
948 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
949 * tree-vrp.c (range_is_nonnull): Remove.
950 (range_includes_zero_p): Accept value_range instead of min/max.
951 (extract_range_from_binary_expr_1): Do not early bail on
953 Use range_includes_zero_p instead of range_is_nonnull.
954 (extract_range_from_unary_expr): Use range_includes_zero_p instead
956 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
957 special case VR_ANTI_RANGE.
958 (vrp_finalize): Same.
959 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
961 (range_is_nonnull): Remove.
962 * vr-values.c (vrp_stmt_computes_nonzero): Use
963 range_includes_zero_p instead of range_is_nonnull.
964 (extract_range_basic): Pass value_range to range_includes_zero_p
965 instead of range_is_nonnull.
967 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
969 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
970 * emit-rtl.h (rtl_data): Remove return_bnd.
971 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
972 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
973 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
974 (POINTER_BOUNDS_MODE): Remove definition.
975 (make_pointer_bounds_mode): Remove.
976 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
977 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
978 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
979 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
980 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
981 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
982 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
984 * config/i386/i386-modes.def (BND32, BND64): Remove.
985 * config/i386/i386.c (dbx_register_map): Remove bound registers.
986 (dbx64_register_map): Ditto.
987 (svr4_dbx_register_map): Ditto.
988 (indirect_thunk_bnd_needed): Remove.
989 (indirect_thunks_bnd_used): Ditto.
990 (indirect_return_bnd_needed): Ditto.
991 (indirect_return_via_cx_bnd): Ditto.
992 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
993 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
994 (output_indirect_thunk): Ditto. Remove need_prefix argument.
995 (output_indirect_thunk_function): Remove handling of
996 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
997 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
998 (ix86_save_reg): Remove handling of crtl->return_bnd.
999 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1000 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1001 and UNSPEC_BNDLX_ADDR.
1002 (ix86_output_indirect_branch_via_reg): Remove handling of
1003 indirect_thunk_prefix_bnd.
1004 (ix86_output_indirect_branch_via_push): Ditto.
1005 (ix86_output_function_return): Ditto.
1006 (ix86_output_indirect_function_return): Ditto.
1007 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1008 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1009 (CALL_USED_REGISTERS): Ditto.
1010 (REG_ALLOC_ORDER): Update for removal of bound registers.
1011 (HI_REGISTER_NAMES): Ditto.
1012 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1013 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1014 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1015 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1016 (FIRST_PSEUDO_REG): Update.
1017 (BND): Remove mode iterator.
1018 * config/i386/predicates.md (bnd_mem_operator): Remove.
1020 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1022 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1025 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1027 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1028 the case in which the permute needs only a single element and
1029 repeats for every vector of the result. Extend that case to
1030 handle variable-length vectors.
1031 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1033 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1036 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1037 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1039 2018-08-24 Richard Biener <rguenther@suse.de>
1041 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1042 bb_flags_allocated members.
1043 (auto_flag): New RAII class for allocating flags.
1044 (auto_edge_flag): New RAII class for allocating edge flags.
1045 (auto_bb_flag): New RAII class for allocating bb flags.
1046 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1048 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1049 in favor of temporarily allocated BB flag.
1050 * hsa-brig.c: Re-order includes.
1051 * hsa-dump.c: Likewise.
1052 * hsa-regalloc.c: Likewise.
1053 * print-rtl.c: Likewise.
1054 * profile-count.c: Likewise.
1056 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1059 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1062 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1065 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1066 from wide_int_range_multiplicative_op.
1068 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1070 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1073 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1075 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1078 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1080 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1081 full GENERIC expression used for replacement.
1083 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1085 * tree-vrp.c (abs_extent_range): Remove.
1086 (extract_range_into_wide_ints): Pass wide ints by reference.
1087 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1088 Pass wide ints by reference in all calls to
1089 extract_range_into_wide_ints.
1090 * wide-int-range.cc (wide_int_range_div): New.
1091 * wide-int-range.h (wide_int_range_div): New.
1092 (wide_int_range_includes_zero_p): New.
1093 (wide_int_range_zero_p): New.
1095 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1097 * config/aarch64/aarch64.md (arches): New enum.
1098 (arch): New enum attr.
1099 (arch_enabled): New attr.
1100 (enabled): Now uses arch_enabled only.
1101 (simd, sve, fp16): Removed attribute.
1102 (fp): Attr now defined in terms of 'arch'.
1103 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1104 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1105 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1106 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1107 attributes into 'arch'.
1108 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1109 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1110 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1111 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1112 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1113 'simd' attribute into 'arch'.
1114 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1115 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1116 Convert use of 'fp' attribute to 'arch'.
1117 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1118 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1120 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1121 (different modes) Merge 'fp' and 'simd' into 'arch'.
1122 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1125 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1127 PR rtl-optimization/87026
1128 * expmed.c (canonicalize_comparison): If we can no longer create
1129 pseudoregisters, don't.
1131 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1134 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1136 * config/arm/arm.c (speculation_barrier_libfunc): New static
1138 (arm_init_libfuncs): Initialize it.
1139 (arm_emit_speculation_barrier): New function.
1140 * config/arm/arm.md (speculation_barrier): Call
1141 arm_emit_speculation_barrier for architectures that do not have
1143 (speculation_barrier_insn): Only match on Armv7 or later.
1145 2018-08-23 Richard Biener <rguenther@suse.de>
1148 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1151 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1153 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1154 of single-vector TBLs.
1155 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1158 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1161 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1162 aarch64_evpc_tbl guard.
1164 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1166 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1169 2018-08-22 Martin Sebor <msebor@redhat.com>
1172 * tree-pretty-print.c (pretty_print_string): Add argument.
1173 (dump_generic_node): Call to pretty_print_string with string size.
1175 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1177 PR rtl-optimization/86771
1178 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1179 of two SETs into those two SETs, one to be placed at i2, if that SETs
1180 destination is modified between i2 and i3.
1182 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1184 PR tree-optimization/86725
1185 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1187 (vect_analyze_scalar_cycles_1): Check it.
1189 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1191 PR tree-optimization/86725
1192 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1193 an outer loop phi as a double reduction, make sure that the
1194 single user of the phi result is an inner loop phi.
1196 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1198 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1199 grouped stores with gaps to a strided group.
1201 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1203 * tree-vect-stmts.c (get_group_load_store_type)
1204 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1205 first statement in a group.
1207 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1209 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1210 the sequence used in gcc/gcc.c.
1212 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1215 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1218 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1220 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1221 Darwin10-specific unwinder-shim.
1222 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1223 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1224 New to cater for Darwin10 Rosetta.
1226 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1228 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1229 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1231 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1236 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1237 (dwarf2out_switch_text_section): Generate a local label for the
1238 second function sub-section and apply it as the second FDE start
1240 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1241 second sub-section start.
1243 2018-08-22 Richard Biener <rguenther@suse.de>
1245 PR tree-optimization/86988
1246 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1248 2018-08-22 Richard Biener <rguenther@suse.de>
1250 PR tree-optimization/86945
1251 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1253 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1255 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1256 a comment about how uses of r2 for .sdata2 come about.
1258 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1260 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1262 2018-08-21 Marek Polacek <polacek@redhat.com>
1264 PR c++/86981, Implement -Wpessimizing-move.
1265 * doc/invoke.texi: Document -Wpessimizing-move.
1267 2018-08-21 Jan Hubicka <jh@suse.cz>
1269 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1270 * tree.h (is_redundant_typedef): Remove.
1271 * dwarf2out.c (is_redundant_typedef): Turn into static function.
1273 2018-08-21 Jan Hubicka <jh@suse.cz>
1275 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1278 2018-08-21 Tamar Christina <tamar.christina@arm.com>
1280 * expmed.c (extract_low_bits): Reject invalid subregs early.
1282 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1285 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1288 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1290 * config/vxworks.h: Guard vxworks_asm_out_constructor and
1291 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1292 * config/vxworks.c: Likewise.
1294 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1296 * config/vxworks.c: Set targetm.have_ctors_dtors
1297 if HAVE_INITFINI_ARRAY_SUPPORT.
1298 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1299 if HAVE_INITFINI_ARRAY_SUPPORT.
1301 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1303 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1304 default search path for VxWorks < 7.
1306 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1308 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1309 (get_format_string): Refer to c_getstr.
1311 2018-08-21 Tom de Vries <tdevries@suse.de>
1313 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1314 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1315 (debuginfo_early_stop): Declare.
1316 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1317 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1318 (debuginfo_early_stop): New function.
1319 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1320 and debuginfo_early_stop.
1321 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1322 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1323 (general_init): Call debuginfo_early_init.
1324 (finalize): Call debuginfo_fini.
1325 (do_compile): Call debuginfo_init.
1326 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1328 (@item -fdump-debug, @item -fdump-earlydebug): Add.
1330 2018-08-21 Tom de Vries <tdevries@suse.de>
1332 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1333 flag_dump_noaddr and flag_dump_unnumbered.
1335 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
1337 * wide-int-range.cc (wide_int_range_abs): New.
1338 (wide_int_range_order_set): Rename from wide_int_range_min_max.
1339 * wide-int-range.h (wide_int_range_abs): New.
1340 (wide_int_range_min_max): New.
1341 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1342 case to call wide_int_range_abs.
1343 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1344 (extract_range_from_abs_expr): Delete.
1346 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
1349 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1350 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1353 2018-08-20 Nathan Sidwell <nathan@acm.org>
1354 Jeff Law <law@redhat.com>
1356 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1357 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1359 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1362 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1363 (decl_attributes): Likewise.
1364 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1366 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1367 * diagnostic-core.h (class auto_diagnostic_group): New class.
1368 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1369 (diagnostic_report_diagnostic): Handle the first diagnostics within
1371 (emit_diagnostic): Add auto_diagnostic_group instance.
1373 (inform_n): Likewise.
1374 (warning): Likewise.
1375 (warning_at): Likewise.
1376 (warning_n): Likewise.
1377 (pedwarn): Likewise.
1378 (permerror): Likewise.
1380 (error_n): Likewise.
1381 (error_at): Likewise.
1383 (fatal_error): Likewise.
1384 (internal_error): Likewise.
1385 (internal_error_no_backtrace): Likewise.
1386 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1387 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1388 * diagnostic.h (struct diagnostic_context): Add fields
1389 "diagnostic_group_nesting_depth",
1390 "diagnostic_group_emission_count", "begin_group_cb",
1392 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1393 Add auto_diagnostic_group instance(s).
1394 (find_explicit_erroneous_behavior): Likewise.
1395 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1396 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1397 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1398 (gimplify_va_arg_expr): Likewise.
1399 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1400 (HSA_SORRY_AT): Likewise.
1401 * ipa-devirt.c (compare_virtual_tables): Likewise.
1402 (warn_odr): Likewise.
1403 * multiple_target.c (expand_target_clones): Likewise.
1404 * opts-common.c (cmdline_handle_error): Likewise.
1405 * reginfo.c (globalize_reg): Likewise.
1406 * substring-locations.c (format_warning_n_va): Likewise.
1407 * tree-inline.c (expand_call_inline): Likewise.
1408 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1409 * tree-ssa-loop-niter.c
1410 (do_warn_aggressive_loop_optimizations): Likewise.
1411 * tree-ssa-uninit.c (warn_uninit): Likewise.
1412 * tree.c (warn_deprecated_use): Likewise.
1414 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
1417 * config/i386/i386.md (eh_return): Always update EH return
1418 address in word_mode.
1420 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
1422 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1423 TARGET_SPLIT_COMPLEX_ARG is defined.
1425 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1427 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1429 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1432 * expr.c (expand_assignment): Assert that bitpos is positive.
1433 (store_field): Likewise
1434 (expand_expr_real_1): Make sure that bitpos is positive.
1435 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1438 2018-08-20 Nathan Sidwell <nathan@acm.org>
1440 * Makefile.in (CPP_ID_DATA_H): Delete.
1441 (CPP_INTERNAL_H): Don't add it.
1442 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1443 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1445 2018-08-20 Richard Biener <rguenther@suse.de>
1447 PR tree-optimization/78655
1448 * tree-vrp.c (extract_range_from_binary_expr_1): Make
1449 pointer + offset nonnull if either operand is nonnull work.
1451 2018-08-20 Tom de Vries <tdevries@suse.de>
1453 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1454 unless the referenced die describes the added property using
1455 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1456 Otherwise, add a DW_AT_location to the referenced die.
1458 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1461 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1462 register_operand when calling ix86_set_reg_reg_cost.
1463 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1464 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1465 predicate and to 1 otherwise.
1467 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1469 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1470 emit a diagnostic that it is not supported and reset the option.
1471 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1472 supported and consume the option. (ASM_FINAL_SPEC): New.
1474 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1476 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1479 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
1481 C-SKY port: Documentation
1483 * doc/extend.texi (C-SKY Function Attributes): New section.
1484 * doc/invoke.texi (Option Summary): Add C-SKY options.
1485 (C-SKY Options): New section.
1486 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1488 2018-08-17 Jojo <jijie_rong@c-sky.com>
1489 Huibin Wang <huibin_wang@c-sky.com>
1490 Sandra Loosemore <sandra@codesourcery.com>
1491 Chung-Lin Tang <cltang@codesourcery.com>
1493 C-SKY port: Backend implementation
1495 * config/csky/*: New.
1496 * common/config/csky/*: New.
1498 2018-08-17 Jojo <jijie_rong@c-sky.com>
1499 Huibin Wang <huibin_wang@c-sky.com>
1500 Sandra Loosemore <sandra@codesourcery.com>
1501 Chung-Lin Tang <cltang@codesourcery.com>
1502 Andrew Jenner <andrew@codesourcery.com>
1504 C-SKY port: Configury
1506 * config.gcc (csky-*-*): New.
1507 * configure.ac: Add csky to targets for dwarf2 debug_line support.
1508 * configure: Regenerated.
1510 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1512 * dump-context.h: Include "dumpfile.h".
1513 (dump_context::dump_printf_va): Convert final param from va_list
1514 to va_list *. Convert from ATTRIBUTE_PRINTF to
1515 ATTRIBUTE_GCC_DUMP_PRINTF.
1516 (dump_context::dump_printf_loc_va): Likewise.
1517 * dumpfile.c: Include "stringpool.h".
1518 (make_item_for_dump_printf_va): Delete.
1519 (make_item_for_dump_printf): Delete.
1520 (class dump_pretty_printer): New class.
1521 (dump_pretty_printer::dump_pretty_printer): New ctor.
1522 (dump_pretty_printer::emit_items): New member function.
1523 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1525 (dump_pretty_printer::emit_item): New member function.
1526 (dump_pretty_printer::stash_item): New member function.
1527 (dump_pretty_printer::format_decoder_cb): New member function.
1528 (dump_pretty_printer::decode_format): New member function.
1529 (dump_context::dump_printf_va): Reimplement in terms of
1530 dump_pretty_printer.
1531 (dump_context::dump_printf_loc_va): Convert final param from va_list
1533 (dump_context::begin_scope): Reimplement call to
1534 make_item_for_dump_printf.
1535 (dump_printf): Update for change to dump_printf_va.
1536 (dump_printf_loc): Likewise.
1537 (selftest::test_capture_of_dump_calls): Convert "stmt" from
1538 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
1539 with %T, %E, and %G.
1540 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1541 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1542 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1543 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1544 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1545 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1546 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1547 within a dump_printf_loc call to "%wu".
1548 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1549 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
1550 missing space after "=".
1551 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1552 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1553 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1554 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1555 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
1556 duplicate "vectorized" from message.
1558 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1560 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1561 polyNxK_t element's TYPE_STRING_FLAG.
1563 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1565 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1566 (they were unnamed before). Fix comments.
1568 2018-08-17 Nathan Sidwell <nathan@acm.org>
1570 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1572 2018-08-17 Richard Biener <rguenther@suse.de>
1574 PR tree-optimization/86841
1575 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1577 2018-08-17 Martin Liska <mliska@suse.cz>
1579 * common.opt: Remove Warn, Init and Report for options with
1580 Ignore/Deprecated flag. Warning is done automatically for
1582 * config/i386/i386.opt: Likewise.
1583 * config/ia64/ia64.opt: Likewise.
1584 * config/rs6000/rs6000.opt: Likewise.
1585 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1586 Remove usage of flag_check_pointer_bounds.
1587 * lto-wrapper.c (merge_and_complain): Do not handle
1588 OPT_fcheck_pointer_bounds.
1589 (append_compiler_options): Likewise.
1590 * opt-functions.awk: Do not handle Deprecated.
1591 * optc-gen.awk: Check that Var, Report and Init are not
1592 used for an option with Ignore/Deprecated flag.
1593 * opts-common.c (decode_cmdline_option): Do not report
1595 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1597 * opts.h (struct cl_option): Remove cl_deprecated flag.
1598 (CL_ERR_DEPRECATED): Remove error enum value.
1600 2018-08-17 Richard Biener <rguenther@suse.de>
1603 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1604 across a va-arg-pack using call adjust its return value accordingly.
1606 2018-08-16 Martin Sebor <msebor@redhat.com>
1608 PR tree-optimization/86853
1609 * gimple-ssa-sprintf.c (struct format_result): Rename member.
1610 (struct fmtresult): Add member and initialize it in ctors.
1611 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
1612 (format_string): Handle %S the same as %ls. Set MAYFAIL.
1613 (format_directive): Set POSUNDER4K when MAYFAIL is set.
1614 (parse_directive): Handle %C same as %c.
1615 (sprintf_dom_walker::compute_format_length): Adjust.
1616 (is_call_safe): Adjust.
1618 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1620 * builtins.c (c_strlen): Add new parameter eltsize. Use it
1621 for determining how to count the elements.
1622 * builtins.h (c_strlen): Adjust prototype.
1623 * expr.c (string_constant): Add new parameter mem_size.
1624 Set *mem_size appropriately.
1625 * expr.h (string_constant): Adjust protoype.
1626 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1627 * gimple-fold.h (get_range_strlen): Adjust prototype.
1628 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1629 (format_string): Call get_string_length with eltsize.
1631 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1633 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1634 to emit the span, rather than setting it as the prefix.
1636 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1638 * diagnostic-show-locus.c (layout::start_annotation_line): Add
1639 "margin_char" parameter, defaulting to space. Use it in place
1640 of pp_space for the initial part of the margin.
1641 (layout::print_leading_fixits): Use '+' when filling the margin
1642 of line-insertion fix-it hints.
1644 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1646 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1649 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1651 * config/rs6000/altivec.md: Don't set length attribute to the default
1653 * config/rs6000/darwin.md: Ditto.
1654 * config/rs6000/dfp.md: Ditto.
1655 * config/rs6000/htm.md: Ditto.
1656 * config/rs6000/rs6000.md: Ditto.
1657 * config/rs6000/sync.md: Ditto.
1658 * config/rs6000/vsx.md: Ditto.
1660 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1662 * config/rs6000/altivec.md: Don't set length attribute to the default
1663 value, for branch instructions.
1664 * config/rs6000/darwin.md: Ditto.
1665 * config/rs6000/rs6000.md: Ditto.
1667 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1669 * config/rs6000/rs6000.md (length): Always define as const_int 4.
1670 (unnamed conditional branch define_insn): Set length to 4 or 8
1671 depending on offset.
1672 (<bd>_<mode>): Similar, for alternative 0.
1673 (<bd>tf_<mode>): Ditto.
1675 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1677 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1679 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
1681 * doc/rtl.texi: Replace old RTX class names with new names.
1684 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
1686 * expmed.h (canonicalize_comparison): New declaration.
1687 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1688 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1689 * optabs.c (prepare_cmp_insn): Likewise.
1690 * rtl.h (unsigned_condition_p): New function which checks if a
1691 comparison operator is unsigned.
1693 2018-08-16 Nathan Sidwell <nathan@acm.org>
1695 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1696 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1698 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1701 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1702 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1703 (mov<mov>): ..this and enable unconditionally.
1705 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1707 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1709 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
1711 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1712 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1713 "Common" with "Target".
1715 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1717 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1718 * doc/invoke.texi (mmitigate-rop): Remove.
1719 * config/i386/i386.c: Do not include "regrename.h".
1720 (ix86_rop_should_change_byte_p, reg_encoded_number)
1721 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
1723 (ix86_reorg): Remove call to ix86_mitigate_rop.
1724 * config/i386/i386.md (attr "modrm_class"): Remove.
1725 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
1726 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
1727 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
1729 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
1731 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
1732 allow folding of mergeh() and mergel() for the float and double types.
1733 (fold_mergehl_helper): Rework to handle building a permute tree
1736 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1738 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
1741 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1743 * common.opt (fdiagnostics-show-labels): New option.
1744 * diagnostic-show-locus.c (class layout_range): Add field
1746 (class layout): Add field "m_show_labels_p".
1747 (layout_range::layout_range): Add param "label" and use it to
1749 (make_range): Pass in NULL for new "label" param of layout_range's
1751 (layout::layout): Initialize m_show_labels_p.
1752 (layout::maybe_add_location_range): Pass in loc_range->m_label
1753 when constructing layout_range instances.
1754 (struct line_label): New struct.
1755 (layout::print_any_labels): New member function.
1756 (layout::print_line): Call it if label-printing is enabled.
1757 (selftest::test_one_liner_labels): New test.
1758 (selftest::test_diagnostic_show_locus_one_liner): Call it.
1759 * diagnostic.c (diagnostic_initialize): Initialize
1760 context->show_labels_p.
1761 * diagnostic.h (struct diagnostic_context): Add field
1763 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1764 -fno-diagnostics-show-labels.
1765 * dwarf2out.c (gen_producer_string): Add
1766 OPT_fdiagnostics_show_labels to the ignored options.
1767 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1769 (gcc_rich_location::maybe_add_expr): Likewise.
1770 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1771 label" param, defaulting to NULL.
1772 (gcc_rich_location::add_expr): Add "label" param.
1773 (gcc_rich_location::maybe_add_expr): Likewise.
1774 (class text_range_label): New class.
1775 (class range_label_for_type_mismatch): New class.
1776 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1777 of format_warning_va.
1778 (fmtwarn_n): Likewise for new params of format_warning_n_va.
1779 * lto-wrapper.c (merge_and_complain): Add
1780 OPT_fdiagnostics_show_labels to the "pick one setting" options.
1781 (append_compiler_options): Likewise to the dropped options.
1782 (append_diag_options): Likewise to the passed-on options.
1783 * opts.c (common_handle_option): Handle the new option.
1784 * selftest-diagnostic.c
1785 (test_diagnostic_context::test_diagnostic_context): Enable
1787 * substring-locations.c: Include "gcc-rich-location.h".
1788 (format_warning_n_va): Add "fmt_label" and "param_label" params
1789 and use them as appropriate.
1790 (format_warning_va): Add "fmt_label" and "param_label" params,
1791 passing them on to format_warning_n_va.
1792 (format_warning_at_substring): Likewise.
1793 (format_warning_at_substring_n): Likewise.
1794 * substring-locations.h (format_warning_va): Add "fmt_label" and
1795 "param_label" params.
1796 (format_warning_n_va): Likewise.
1797 (format_warning_at_substring): Likewise.
1798 (format_warning_at_substring_n): Likewise.
1799 * toplev.c (general_init): Initialize global_dc->show_labels_p.
1801 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
1804 * builtins.c (expand_builtin_memcmp): Do not expand the call
1805 when overflow is detected.
1807 2018-08-15 Martin Sebor <msebor@redhat.com>
1809 PR tree-optimization/71625
1810 * config/aarch64/aarch64-builtins.c
1811 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
1813 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
1815 * config/s390/s390.c (s390_reorg): Remove loop.
1817 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1820 (darwin_function_switched_text_sections): Delete.
1821 * gcc/config/darwin.h
1822 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
1824 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1827 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
1828 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
1829 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
1831 2018-08-15 Martin Liska <mliska@suse.cz>
1833 PR tree-optimization/86925
1834 * predict.c (expr_expected_value_1): When taking
1835 later predictor, assign also probability.
1836 Use fold_build2_initializer_loc in order to fold
1837 the expression in -frounding-math.
1839 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
1841 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
1843 (expand_vec_perm_1): Try the new method.
1845 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
1848 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
1849 Check whether lra_live_max_point is 0 before dividing.
1851 2018-08-14 Martin Sebor <msebor@redhat.com>
1853 PR tree-optimization/86650
1854 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
1855 (vrp_prop::check_mem_ref): Same.
1857 2018-08-13 Liu Hao <lh_mouse@126.com>
1859 * pretty-print.c (eat_esc_sequence): Swap the foreground and
1860 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
1861 and clear it thereafter, as it only works for DBCS.
1863 2018-08-13 Liu Hao <lh_mouse@126.com>
1865 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
1866 handle returned by _get_osf_handle().
1868 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1870 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
1871 for folding vec_perm.
1873 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1875 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
1876 Add support for gimple-folding of vec_pack() and vec_unpack()
1879 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1881 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
1882 vec_xst variants to the list.
1883 (rs6000_gimple_fold_builtin): Add support for folding unaligned
1884 vector loads and stores.
1886 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
1888 * config.gcc (rs6000-ibm-aix4.x): Delete.
1889 (rs6000-ibm-aix5.1): Delete.
1890 (rs6000-ibm-aix5.2): Delete.
1891 (rs6000-ibm-aix5.3): Delete.
1892 * config/rs6000/aix43.h: Delete.
1893 * config/rs6000/aix51.h: Delete.
1894 * config/rs6000/aix52.h: Delete.
1895 * config/rs6000/t-aix43: Delete.
1897 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
1899 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1901 (s390_decompose_address): Factor out constant pool ref
1904 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1906 * config/nds32/nds32-predicates.c
1907 (nds32_can_use_bclr_p): Change return type as bool.
1908 (nds32_can_use_bset_p): Ditto.
1909 (nds32_can_use_btgl_p): Ditto.
1910 (nds32_can_use_bitci_p): Ditto.
1911 * config/nds32/nds32-protos.h
1912 (nds32_can_use_bclr_p): Change declaration.
1913 (nds32_can_use_bset_p): Ditto.
1914 (nds32_can_use_btgl_p): Ditto.
1915 (nds32_can_use_bitci_p): Ditto.
1917 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1919 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
1920 Support -msched-prolog-epilog option.
1921 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
1923 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1925 * common/config/nds32/nds32-common.c
1926 (nds32_option_optimization_table): Enalbe -malways-align.
1928 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1930 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
1932 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
1933 OPT_misr_secure_ case.
1934 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
1935 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
1936 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
1938 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
1939 (nds32_isr_info): New field security_level.
1940 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
1941 * config/nds32/nds32.md (return_internal): Consider critical attribute.
1942 * config/nds32/nds32.opt (misr-secure): New option.
1943 * config/nds32/nds32_init.inc: New file.
1944 * config/nds32/nds32_isr.h: New file.
1946 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
1948 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
1949 Update comment for atomic instructions.
1950 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
1951 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
1953 (atomic_loaddi): Revise fence expansion to only emit fence prior to
1954 load for __ATOMIC_SEQ_CST model.
1955 (atomic_loaddi_1): Remove float register target.
1956 (atomic_storedi): Handle CONST_INT values.
1957 (atomic_storedi_1): Remove float register source. Add special case
1959 (memory_barrier): New expander and insn.
1961 2018-08-11 Jakub Jelinek <jakub@redhat.com>
1963 PR tree-optimization/86835
1964 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
1965 new_stmt after def_gsi, make sure to insert new_square_stmt after
1966 that stmt, not 2 stmts before it.
1968 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
1971 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
1974 2018-08-10 Martin Liska <mliska@suse.cz>
1977 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
1979 * builtins.c (expand_builtin_expect_with_probability):
1981 (expand_builtin_expect_with_probability): New function.
1982 (build_builtin_expect_predicate): Add new argumnet probability
1983 for BUILT_IN_EXPECT_WITH_PROBABILITY.
1984 (fold_builtin_expect):
1987 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
1988 * builtins.h (fold_builtin_expect): Set new argument.
1989 * doc/extend.texi: Document __builtin_expect_with_probability.
1990 * doc/invoke.texi: Likewise.
1991 * gimple-fold.c (gimple_fold_call): Pass new argument.
1992 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
1993 also BUILT_IN_EXPECT_WITH_PROBABILITY.
1994 * predict.c (get_predictor_value): New function.
1995 (expr_expected_value): Add new argument probability. Assume
1996 that predictor and probability are always non-null.
1997 (expr_expected_value_1): Likewise. For __builtin_expect and
1998 __builtin_expect_with_probability set probability. Handle
1999 combination in binary expressions.
2000 (tree_predict_by_opcode): Simplify code by simply calling
2001 get_predictor_value.
2002 (pass_strip_predict_hints::execute): Add handling of
2003 BUILT_IN_EXPECT_WITH_PROBABILITY.
2004 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2006 * tree.h (DECL_BUILT_IN_P): New function.
2008 2018-08-10 Martin Liska <mliska@suse.cz>
2010 PR tree-optimization/85799
2011 * passes.def: Add argument for pass_strip_predict_hints.
2012 * predict.c (class pass_strip_predict_hints): Add new argument
2014 (strip_predictor_early): New function.
2015 (pass_strip_predict_hints::execute): Call the function to
2017 (strip_predict_hints): New function.
2018 * predict.def: Fix comment.
2020 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2022 * Makefile.in: Clarify which tm.texi to copy over to assert the
2023 right to grant a GFDL license for all.
2025 2018-08-09 Jeff Law <law@redhat.com>
2027 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2030 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2032 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2035 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2037 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2038 reductions for variable-length vectors.
2040 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2043 * common.opt (fdiagnostics-show-line-numbers): New option.
2044 * diagnostic-show-locus.c (class layout): Add fields
2045 "m_show_line_numbers_p" and "m_linenum_width";
2046 (num_digits): New function.
2047 (test_num_digits): New function.
2048 (layout::layout): Initialize new fields. Update m_x_offset
2049 logic to handle any left margin.
2050 (layout::print_source_line): Print line number when requested.
2051 (layout::start_annotation_line): New member function.
2052 (layout::print_annotation_line): Call it.
2053 (layout::print_leading_fixits): Likewise.
2054 (layout::print_trailing_fixits): Likewise. Update calls to
2055 move_to_column for new parameter.
2056 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2057 it to potentially call start_annotation_line.
2058 (layout::show_ruler): Call start_annotation_line.
2059 (selftest::test_line_numbers_multiline_range): New selftest.
2060 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2061 and selftest::test_line_numbers_multiline_range.
2062 * diagnostic.c (diagnostic_initialize): Initialize
2063 show_line_numbers_p.
2064 * diagnostic.h (struct diagnostic_context): Add field
2065 "show_line_numbers_p".
2066 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2067 -fno-diagnostics-show-line-numbers.
2068 * dwarf2out.c (gen_producer_string): Add
2069 OPT_fdiagnostics_show_line_numbers to the ignored options.
2070 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2071 one setting" options.
2072 (append_compiler_options): Likewise to the dropped options.
2073 (append_diag_options): Likewise to the passed-on options.
2074 * opts.c (common_handle_option): Handle the new option.
2075 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2077 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2079 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2080 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2081 third argument of type "const signed char" to descriptions of
2082 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2083 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2084 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2085 __builtin_bcdsub_ov functions.
2087 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2089 PR tree-optimization/86858
2090 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2091 flow_bb_inside_loop_p calls.
2093 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2095 PR tree-optimization/86871
2096 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2097 instead of gimple_assign_lhs.
2099 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2102 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2103 register constraint to operand 0.
2104 (add<mode>3_carryinC): Likewise.
2105 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2107 2018-08-09 Martin Liska <mliska@suse.cz>
2110 * common.opt: Remove extra line.
2112 2018-08-09 Martin Liska <mliska@suse.cz>
2114 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2115 at the end of a line, make first letter capital and end up
2116 a sentence with a dot.
2117 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2118 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2119 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2120 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2121 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2122 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2123 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2124 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2125 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2126 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2127 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2128 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2129 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2130 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2131 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2132 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2133 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2134 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2136 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2139 * config/s390/s390.c (s390_option_override_internal): Reduce the
2140 stack-clash-protection-probe-interval param if it would be too big
2143 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2146 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2147 * config/m68k/m68k.c (handle_move_double): Don't call
2148 m68k_final_prescan_insn.
2149 (m68k_adjust_decorated_operand): Renamed from
2150 m68k_final_prescan_insn, remove first and third operand and
2152 (print_operand): Call it.
2153 (print_operand_address): Call it.
2155 2018-08-08 Nathan Sidwell <nathan@acm.org>
2157 * diagnostic.c (diagnostic_report_current_module): Use
2158 linemap_included_from & linemap_included_from_linemap.
2160 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2162 * config/aarch64/aarch64-cores.def: Add phecda core.
2163 * config/aarch64/aarch64-tune.md: Regenerate.
2164 * doc/invoke.texi: Add phecda core.
2166 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2169 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2171 * config/s390/s390.md ("movti"): Add more alternatives for
2172 constant to GPR copies.
2174 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2176 * config/s390/s390.c: Fix whitespace damage throughout the file.
2177 * config/s390/s390.h: Likewise.
2178 * config/s390/tpf.h: Likewise.
2180 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2182 * config/s390/s390.c (s390_loadrelative_operand_p):
2183 Remove TARGET_CPU_ZARCH usages.
2184 (s390_rtx_costs): Likewise.
2185 (s390_legitimate_constant_p): Likewise.
2186 (s390_cannot_force_const_mem): Likewise.
2187 (legitimate_reload_constant_p): Likewise.
2188 (s390_preferred_reload_class): Likewise.
2189 (legitimize_pic_address): Likewise.
2190 (legitimize_tls_address): Likewise.
2191 (s390_split_branches): Removed.
2192 (s390_add_execute): Removed.
2193 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2194 (s390_mainpool_start): Likewise.
2195 (s390_mainpool_finish): Likewise.
2196 (s390_mainpool_cancel): Removed.
2197 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2198 (s390_chunkify_cancel): Likewise.
2199 (s390_return_addr_rtx): Likewise.
2200 (s390_register_info): Remove split_branches_pending_p uages.
2201 (s390_optimize_register_info): Likewise.
2202 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2203 split_branches_pending_p usages.
2204 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2205 (s390_load_got): Likewise.
2206 (s390_expand_split_stack_prologue): Likewise.
2207 (output_asm_nops): Likewise.
2208 (s390_function_profiler): Likewise.
2209 (s390_emit_call): Likewise.
2210 (s390_conditional_register_usage): Likewise.
2211 (s390_optimize_prologue): Likewise.
2212 (s390_reorg): Remove TARGET_CPU_ZARCH and
2213 split_branches_pending_p usages.
2214 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2216 (s390_output_indirect_thunk_function): Likewise.
2217 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2218 (TARGET_CPU_ZARCH_P): Removed.
2219 (struct machine_function): Remove split_branches_pending_p.
2220 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2222 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2224 * common/config/s390/s390-common.c (processor_flags_table):
2226 * config.gcc: Remove with_arch/with_tune support.
2227 * config/s390/2064.md: Remove cpu attribute comparisons.
2228 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2230 * config/s390/linux.h (ASM_SPEC):
2231 Remove -march support.
2232 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2233 Use a table to get an arch level.
2234 * config/s390/s390-opts.h (enum processor_type):
2236 * config/s390/s390.c
2237 (processor_table): Remove entries, add arch_level values.
2238 (s390_issue_rate): Remove cases.
2239 (s390_option_override): Adjust
2240 s390_option_override_internal() call.
2241 (s390_option_override_internal): Remove deprecation warning.
2242 (s390_valid_target_attribute_tree): Adjust
2243 s390_option_override_internal() call.
2244 * config/s390/s390.h (struct s390_processor):
2245 Share with s390-c.c, add arch_level field.
2246 * config/s390/s390.md:
2247 Remove occurrences in cpu attribute.
2248 * config/s390/s390.opt: Remove -march/-mtune support.
2249 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2250 * doc/invoke.texi: Remove deprecation warning.
2252 2018-08-08 Luis Machado <luis.machado@linaro.org>
2254 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2256 (qdf24xx_tunings): Set vector cost structure to
2257 qdf24xx_vector_cost.
2259 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2260 <register_sextend>: Set to 3.
2262 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2265 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2266 * config/aarch64/aarch64-simd.md
2267 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2268 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2269 (aarch64_frecpx<mode>): ...this new pattern.
2270 * config/aarch64/aarch64-simd-builtins.def: Remove comment
2271 about aarch64_frecp<FRECP:frecp_suffix><mode>.
2273 2018-08-07 Martin Liska <mliska@suse.cz>
2276 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2277 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2278 * predict.def (PRED_MALLOC_NONNULL): New predictor.
2279 * doc/extend.texi: Document that malloc attribute adds
2282 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
2285 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2286 Define to speculation_safe_value_not_needed.
2288 2018-08-06 Jeff Law <law@redhat.com>
2290 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2291 the vr_values instance to cprop_into_stmt.
2292 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2293 (cprop_operand): Also query EVRP to determine if OP is a constant.
2295 2018-08-06 Nathan Sidwell <nathan@acm.org>
2297 * diagnostic.c (diagnostic_report_current_module): Reroll
2298 included-at loop. Translate text.
2300 2018-08-06 David Malcolm <dmalcolm@redhat.com>
2302 * function-tests.c (selftest::test_expansion_to_rtl): Call
2303 free_after_compilation.
2305 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2307 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2309 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
2311 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2312 loops with memory block operations from getting unrolled.
2314 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
2317 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2318 Define to speculation_safe_value_not_needed.
2320 2018-08-06 Jeff Law <law@redhat.com>
2322 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2325 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2328 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2329 with all enabled __intN types.
2331 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2333 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2335 * alias.c (record_set): Check for clobber high.
2336 * cfgexpand.c (expand_gimple_stmt): Likewise.
2337 * combine-stack-adj.c (single_set_for_csa): Likewise.
2338 * combine.c (find_single_use_1): Likewise.
2339 (set_nonzero_bits_and_sign_copies): Likewise.
2340 (get_combine_src_dest): Likewise.
2341 (is_parallel_of_n_reg_sets): Likewise.
2342 (try_combine): Likewise.
2343 (record_dead_and_set_regs_1): Likewise.
2344 (reg_dead_at_p_1): Likewise.
2345 (reg_dead_at_p): Likewise.
2346 * dce.c (deletable_insn_p): Likewise.
2347 (mark_nonreg_stores_1): Likewise.
2348 (mark_nonreg_stores_2): Likewise.
2349 * df-scan.c (df_find_hard_reg_defs): Likewise.
2350 (df_uses_record): Likewise.
2351 (df_get_call_refs): Likewise.
2352 * dwarf2out.c (mem_loc_descriptor): Likewise.
2353 * haifa-sched.c (haifa_classify_rtx): Likewise.
2354 * ira-build.c (create_insn_allocnos): Likewise.
2355 * ira-costs.c (scan_one_insn): Likewise.
2356 * ira.c (equiv_init_movable_p): Likewise.
2357 (rtx_moveable_p): Likewise.
2358 (interesting_dest_for_shprep): Likewise.
2359 * jump.c (mark_jump_label_1): Likewise.
2360 * postreload-gcse.c (record_opr_changes): Likewise.
2361 * postreload.c (reload_cse_simplify): Likewise.
2362 (struct reg_use): Add source expr.
2363 (reload_combine): Check for clobber high.
2364 (reload_combine_note_use): Likewise.
2365 (reload_cse_move2add): Likewise.
2366 (move2add_note_store): Likewise.
2367 * print-rtl.c (print_pattern): Likewise.
2368 * recog.c (decode_asm_operands): Likewise.
2369 (store_data_bypass_p): Likewise.
2370 (if_test_bypass_p): Likewise.
2371 * regcprop.c (kill_clobbered_value): Likewise.
2372 (kill_set_value): Likewise.
2373 * reginfo.c (reg_scan_mark_refs): Likewise.
2374 * reload1.c (maybe_fix_stack_asms): Likewise.
2375 (eliminate_regs_1): Likewise.
2376 (elimination_effects): Likewise.
2377 (mark_not_eliminable): Likewise.
2378 (scan_paradoxical_subregs): Likewise.
2379 (forget_old_reloads_1): Likewise.
2380 * reorg.c (find_end_label): Likewise.
2381 (try_merge_delay_insns): Likewise.
2382 (redundant_insn): Likewise.
2383 (own_thread_p): Likewise.
2384 (fill_simple_delay_slots): Likewise.
2385 (fill_slots_from_thread): Likewise.
2386 (dbr_schedule): Likewise.
2387 * resource.c (update_live_status): Likewise.
2388 (mark_referenced_resources): Likewise.
2389 (mark_set_resources): Likewise.
2390 * rtl.c (copy_rtx): Likewise.
2391 * rtlanal.c (reg_referenced_p): Likewise.
2392 (single_set_2): Likewise.
2393 (noop_move_p): Likewise.
2394 (note_stores): Likewise.
2395 * sched-deps.c (sched_analyze_reg): Likewise.
2396 (sched_analyze_insn): Likewise.
2398 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2400 * cse.c (invalidate_reg): New function extracted from...
2401 (invalidate): ...here.
2402 (canonicalize_insn): Check for clobber high.
2403 (invalidate_from_clobbers): invalidate clobber highs.
2404 (invalidate_from_sets_and_clobbers): Likewise.
2405 (count_reg_usage): Check for clobber high.
2406 (insn_live_p): Likewise.
2407 * cselib.c (cselib_expand_value_rtx_1):Likewise.
2408 (cselib_invalidate_regno): Check for clobber in setter.
2409 (cselib_invalidate_rtx): Pass through setter.
2410 (cselib_invalidate_rtx_note_stores):
2411 (cselib_process_insn): Check for clobber high.
2412 * cselib.h (cselib_invalidate_rtx): Add operand.
2414 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2416 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2417 (mark_not_eliminable): Likewise.
2418 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2419 * lra-lives.c (process_bb_lives): Check for clobber high.
2420 * lra.c (new_insn_reg): Remember clobber highs.
2421 (collect_non_operand_hard_regs): Check for clobber high.
2422 (lra_set_insn_recog_data): Likewise.
2423 (add_regs_to_insn_regno_info): Likewise.
2424 (lra_update_insn_regno_info): Likewise.
2426 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2428 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2429 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2431 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2433 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2434 (copy_insn_1): Likewise.
2435 (gen_hard_reg_clobber_high): New gen function.
2436 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2437 * genemit.c (gen_exp): Likewise.
2438 (gen_emit_seq): Pass through info.
2439 (gen_insn): Check for CLOBBER_HIGH.
2440 (gen_expand): Pass through info.
2441 (gen_split): Likewise.
2442 (output_add_clobbers): Likewise.
2443 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2444 (remove_clobbers): Likewise.
2445 * rtl.h (gen_hard_reg_clobber_high): New declaration.
2447 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2449 * doc/rtl.texi (clobber_high): Add.
2450 (parallel): Add in clobber high
2451 * rtl.c (rtl_check_failed_code3): Add function.
2452 * rtl.def (CLOBBER_HIGH): Add expression.
2453 * rtl.h (RTL_CHECKC3): Add macro.
2454 (rtl_check_failed_code3): Add declaration.
2455 (XC3EXP): Add macro.
2457 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2460 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2461 cfun->machine->max_used_stack_alignment if needed.
2463 2018-08-04 Martin Sebor <msebor@redhat.com>
2465 PR tree-optimization/86571
2466 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2469 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
2472 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2475 2018-08-03 Jeff Law <law@redhat.com>
2478 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2479 Define to speculation_safe_value_not_needed.
2481 2018-08-03 David Malcolm <dmalcolm@redhat.com>
2483 * doc/gcov.texi (-x): Remove duplicate "to".
2484 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2485 (-Wif-not-aligned): Remove duplicate "is".
2486 (-flto): Remove duplicate "the".
2487 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2488 duplicate "v5.00.b".
2489 (MSP430 Options): Remove duplicate "and" from the description
2490 of "-mgprel-sec=regexp".
2491 (x86 Options): Remove duplicate copies of "vmldLog102" and
2492 vmlsLog104 from description of "-mveclibabi=type".
2494 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
2496 * internal-fn.h (first_commutative_argument): Declare.
2497 * internal-fn.c (first_commutative_argument): New function.
2498 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2499 restrictions for pattern statements. Use first_commutative_argument
2500 to look for commutative operands in calls to internal functions.
2502 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
2504 * Makefile.in (wide-int-range.o): New.
2505 * tree-vrp.c: Move all the wide_int_* functions to...
2506 * wide-int-range.cc: ...here.
2507 * tree-vrp.h: Move all the wide_int_* prototypes to...
2508 * wide-int-range.h: ...here.
2510 2018-08-03 Tom de Vries <tdevries@suse.de>
2512 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2514 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2515 * except.c (output_function_exception_table): Do early exit if
2516 targetm_common.except_unwind_info (&global_options) == UI_NONE.
2518 2018-08-03 Martin Liska <mliska@suse.cz>
2520 * predict.c (dump_prediction): Change to 2 digits
2523 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
2525 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2527 (falkor_am_1_gtov_gtov): ... a new insn reservation.
2529 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
2531 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2532 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2533 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2534 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2535 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2537 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2539 * diagnostic-show-locus.c (diagnostic_show_locus): Use
2540 pp_take_prefix when saving the existing prefix.
2541 * diagnostic.c (diagnostic_append_note): Likewise.
2542 * langhooks.c (lhd_print_error_function): Likewise.
2543 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2544 param's type. Free the existing prefix.
2545 (pp_take_prefix): New function.
2546 (pretty_printer::pretty_printer): Drop the prefix parameter.
2547 Rename the length parameter to match the comment.
2548 (pretty_printer::~pretty_printer): Free the prefix.
2549 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2551 (struct pretty_printer): Drop the "const" from "prefix" field's
2552 type and clarify memory management.
2553 (pp_set_prefix): Drop the "const" from the 2nd param.
2554 (pp_take_prefix): New decl.
2556 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2558 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2559 for word_mode_ok here instead of passing as argument.
2560 (expand_block_compare): Change select_block_compare_mode() call.
2561 (expand_strncmp_gpr_sequence): New function.
2562 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2564 2018-08-02 Jeff Law <law@redhat.com>
2567 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2568 Define to speculation_safe_value_not_needed.
2571 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2572 Define to speculation_safe_value_not_needed.
2574 2018-08-02 Tom de Vries <tdevries@suse.de>
2577 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2578 function. Return UI_TARGET unconditionally.
2579 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2580 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2582 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2584 * genemit.c (print_overload_test): Fix typo.
2586 2018-08-02 Richard Biener <rguenther@suse.de>
2588 PR tree-optimization/86816
2589 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2590 which checks for value availability before querying it.
2591 (gvn_uses_equal): Use it.
2592 (same_succ_hash): Likewise.
2593 (gimple_equal_p): Likewise.
2595 2018-08-02 Nick Clifton <nickc@redhat.com>
2598 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2599 Define to speculation_safe_value_not_needed.
2602 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2603 Define to speculation_safe_value_not_needed.
2606 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2607 Define to speculation_safe_value_not_needed.
2610 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2611 Define to speculation_safe_value_not_needed.
2614 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2615 Define to speculation_safe_value_not_needed.
2618 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2619 Define to speculation_safe_value_not_needed.
2622 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2623 Define to speculation_safe_value_not_needed.
2626 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2627 Define to speculation_safe_value_not_needed.
2630 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2631 speculation_safe_value_not_needed.
2634 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2635 to speculation_safe_value_not_needed.
2637 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2639 * doc/md.texi: Expand the documentation of instruction names
2640 to mention port-local uses. Document '@' in pattern names.
2641 * read-md.h (overloaded_instance, overloaded_name): New structs.
2643 (md_reader::handle_overloaded_name): New member function.
2644 (md_reader::get_overloads): Likewise.
2645 (md_reader::m_first_overload): New member variable.
2646 (md_reader::m_next_overload_ptr): Likewise.
2647 (md_reader::m_overloads_htab): Likewise.
2648 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2649 m_next_overload_ptr and m_overloads_htab.
2650 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2651 (get_mode_token, get_code_token, get_int_token): New functions.
2652 (map_attr_string): Add an optional argument that passes back
2653 the associated iterator.
2654 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2655 (md_reader::handle_overloaded_name, add_overload_instance): New
2657 (apply_iterators): Handle '@' names. Report an error if '@'
2658 is used without iterators.
2659 (initialize_iterators): Initialize the new iterator_group fields.
2660 * genopinit.c (handle_overloaded_code_for)
2661 (handle_overloaded_gen): New functions.
2662 (main): Use them to print declarations of maybe_code_for_* and
2663 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2664 * genemit.c (print_overload_arguments, print_overload_test)
2665 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2666 (main): Use it to print definitions of maybe_code_for_* and
2667 maybe_gen_* functions.
2668 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2669 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2670 instead of explicit mode checks.
2671 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2672 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2673 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2674 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2675 (aarch64_expand_compare_and_swap): Likewise
2676 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2677 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2678 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2679 (aarch64_constant_pool_reload_icode): Delete.
2680 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2681 instead of aarch64_constant_pool_reload_icode. Use
2682 code_for_aarch64_reload_mov instead of explicit mode checks.
2683 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2684 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2685 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2686 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2687 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2688 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2689 (aarch64_atomic_load_op_code): Delete.
2690 (aarch64_emit_atomic_load_op): Likewise.
2691 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2692 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
2693 instead of aarch64_emit_atomic_load_op.
2694 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2695 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2696 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2697 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2698 character before the pattern name.
2699 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2700 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2701 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2702 (aarch64_frecps<mode>): Likewise.
2703 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2704 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2705 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2706 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2707 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2709 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2711 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2712 Allow HFmode constants if TARGET_FP_F16INST.
2714 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
2717 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2718 No longer check last store for clobber of address register.
2720 2018-08-02 Martin Liska <mliska@suse.cz>
2722 PR gcov-profile/86817
2723 * gcov.c (process_all_functions): New function.
2725 (process_file): Move functions processing to
2726 process_all_functions.
2728 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2730 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
2731 "const" to the "gimple *" and "rtx_insn *" parameters.
2732 * dumpfile.h (dump_user_location_t::dump_user_location_t):
2734 (dump_location_t::dump_location_t): Likewise.
2736 2018-08-01 Martin Sebor <msebor@redhat.com>
2738 PR tree-optimization/86650
2739 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
2740 rather than a "gcall *". Directly pass the data of interest
2741 to percent_K_format, rather than building a temporary CALL_EXPR
2743 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
2744 (gimple_fold_builtin_strncat): Adjust.
2745 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
2746 gcall* argument with gimple*.
2747 * gimple-ssa-warn-restrict.c (check_call): Same.
2748 (wrestrict_dom_walker::before_dom_children): Same.
2749 (builtin_access::builtin_access): Same.
2750 (check_bounds_or_overlap): Same
2751 (maybe_diag_overlap): Same.
2752 (maybe_diag_offset_bounds): Same.
2753 * tree-diagnostic.c (default_tree_printer): Move usage of
2754 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2756 * tree-pretty-print.c (percent_K_format): Add argument.
2757 * tree-pretty-print.h: Add argument.
2758 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2759 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2760 (maybe_diag_stxncpy_trunc): Same.
2761 (handle_builtin_stxncpy): Same.
2762 (handle_builtin_strcat): Same.
2764 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2766 * match.pd: Optimise pointer range checks.
2768 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2770 PR tree-optimization/86758
2771 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2772 to remove pattern statements.
2774 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2776 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2777 result of dfs_enumerate_from when constructing stmt_vec_infos,
2778 instead of additionally calling get_loop_body.
2780 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2782 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2784 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2785 When creating an iv, assert that the step is not known to be zero.
2786 (vect_setup_realignment): Update call accordingly.
2787 * tree-vect-stmts.c (vectorizable_store): Likewise.
2788 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
2790 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2792 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2793 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2794 (vectorizable_reduction): Likewise.
2795 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2796 (vect_detect_hybrid_slp_stmts): Likewise.
2797 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2799 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
2801 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2802 (wide_int_set_zero_nonzero_bits): ...this.
2803 (zero_nonzero_bits_from_vr): Rename to...
2804 (vrp_set_zero_nonzero_bits): ...this.
2805 (extract_range_from_multiplicative_op_1): Abstract wide int
2807 (wide_int_range_multiplicative_op): ...here.
2808 (extract_range_from_binary_expr_1): Extract wide int binary
2809 operations into their own functions.
2810 (wide_int_range_lshift): New.
2811 (wide_int_range_can_optimize_bit_op): New.
2812 (wide_int_range_shift_undefined_p): New.
2813 (wide_int_range_bit_xor): New.
2814 (wide_int_range_bit_ior): New.
2815 (wide_int_range_bit_and): New.
2816 (wide_int_range_trunc_mod): New.
2817 (extract_range_into_wide_ints): New.
2818 (vrp_shift_undefined_p): New.
2819 (extract_range_from_multiplicative_op): New.
2820 (vrp_can_optimize_bit_op): New.
2821 * tree-vrp.h (value_range::dump): New.
2822 (wide_int_range_multiplicative_op): New.
2823 (wide_int_range_lshift):New.
2824 (wide_int_range_shift_undefined_p): New.
2825 (wide_int_range_bit_xor): New.
2826 (wide_int_range_bit_ior): New.
2827 (wide_int_range_bit_and): New.
2828 (wide_int_range_trunc_mod): New.
2829 (zero_nonzero_bits_from_bounds): Rename to...
2830 (wide_int_set_zero_nonzero_bits): ...this.
2831 (zero_nonzero_bits_from_vr): Rename to...
2832 (vrp_set_zero_nonzero_bits): ...this.
2833 (range_easy_mask_min_max): Rename to...
2834 (wide_int_range_can_optimize_bit_op): this.
2835 * vr-values.c (simplify_bit_ops_using_ranges): Rename
2836 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2838 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2840 * tree-vectorizer.h (vect_orig_stmt): New function.
2841 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
2842 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
2843 (vect_create_epilog_for_reduction): Likewise.
2844 (vectorizable_live_operation): Likewise.
2845 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2846 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
2847 * tree-vect-stmts.c (vectorizable_call): Likewise.
2848 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2850 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2852 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
2854 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
2855 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
2856 (vect_transform_loop): Likewise.
2857 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2859 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2861 * tree-vectorizer.h (vect_schedule_slp): Return void.
2862 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2863 (vect_schedule_slp): Likewise.
2865 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2867 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
2869 (vect_transform_loop): Update calls accordingly. Schedule SLP
2870 instances before the main loop, if any exist.
2872 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2874 PR tree-optimization/86749
2875 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
2876 If the lhs is used in a COND_EXPR, check that it is being used
2877 as the "then" or "else" value.
2879 2018-08-01 Tom de Vries <tdevries@suse.de>
2882 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2883 speculation_safe_value_not_needed.
2885 2018-08-01 Richard Biener <rguenther@suse.de>
2887 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
2890 2018-08-01 Martin Liska <mliska@suse.cz>
2892 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
2893 format how successful transformation is dumped.
2894 (gimple_mod_pow2_value_transform): Likewise.
2895 (gimple_mod_subtract_transform): Likewise.
2896 (gimple_stringops_transform): Likewise.
2898 2018-08-01 Martin Liska <mliska@suse.cz>
2901 * value-prof.c (interesting_stringop_to_profile_p):
2902 Simplify the code and add BUILT_IN_MEMMOVE.
2903 (gimple_stringops_transform): Likewise.
2905 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
2907 * config/aarch64/aarch64-simd.md
2908 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
2909 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
2910 use GPI iterator instead of SI mode.
2912 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2914 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
2915 rs6000_speculation_barrier.
2916 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
2917 new barrier pattern name.
2919 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2921 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
2922 (speculation_barrier): New insn.
2924 2018-08-01 Richard Biener <rguenther@suse.de>
2927 * graphite.h: Include isl/id.h and isl/space.h to allow build
2930 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
2933 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2934 mode for COFF targets.
2935 * defaults.h (TARGET_COFF): Define.
2936 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
2937 TARGET_COFF): Define.
2938 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
2939 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
2940 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
2942 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2944 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
2945 * gimple-streamer-out.c (output_bb): Save it.
2946 * lto-streamer-in.c (input_struct_function_base): Restore
2947 instance discriminator if available. Create map on demand.
2948 * lto-streamer-out.c (output_struct_function_base): Save it if
2950 * final.c (decl_to_instance_map): Document LTO strategy.
2952 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2953 Olivier Hainque <hainque@adacore.com>
2955 * debug.h (decl_to_instance_map_t): New type.
2956 (decl_to_instance_map): Declare.
2957 (maybe_create_decl_to_instance_map): New inline function.
2958 * final.c (bb_discriminator, last_bb_discriminator): New statics,
2959 to track basic block discriminators.
2960 (final_start_function_1): Initialize them.
2961 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
2963 (decl_to_instance_map): New variable.
2964 (map_decl_to_instance, maybe_set_discriminator): New functions.
2965 (notice_source_line): Set discriminator.
2967 2018-07-31 Ian Lance Taylor <iant@golang.org>
2969 * targhooks.c (default_have_speculation_safe_value): Add
2972 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2974 * dump-context.h: Include "pretty-print.h".
2975 (dump_context::refresh_dumps_are_enabled): New decl.
2976 (dump_context::emit_item): New decl.
2977 (class dump_context): Add fields "m_test_pp" and
2979 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2980 (temp_dump_context::get_dumped_text): New decl.
2981 (class temp_dump_context): Add field "m_pp".
2982 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
2983 (dump_context::refresh_dumps_are_enabled): ...and add a test for
2985 (set_dump_file): Update for above change.
2986 (set_alt_dump_file): Likewise.
2987 (dump_loc): New overload, taking a pretty_printer *.
2988 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
2989 to any test pretty-printer.
2990 (make_item_for_dump_gimple_stmt): New function, adapted from
2991 optinfo::add_gimple_stmt.
2992 (dump_context::dump_gimple_stmt): Call it, and use the result,
2993 eliminating the direct usage of dump_file and alt_dump_file in
2994 favor of indirectly using them via emit_item.
2995 (make_item_for_dump_gimple_expr): New function, adapted from
2996 optinfo::add_gimple_expr.
2997 (dump_context::dump_gimple_expr): Call it, and use the result,
2998 eliminating the direct usage of dump_file and alt_dump_file in
2999 favor of indirectly using them via emit_item.
3000 (make_item_for_dump_generic_expr): New function, adapted from
3002 (dump_context::dump_generic_expr): Call it, and use the result,
3003 eliminating the direct usage of dump_file and alt_dump_file in
3004 favor of indirectly using them via emit_item.
3005 (make_item_for_dump_printf_va): New function, adapted from
3006 optinfo::add_printf_va.
3007 (make_item_for_dump_printf): New function.
3008 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3009 and use the result, eliminating the direct usage of dump_file and
3010 alt_dump_file in favor of indirectly using them via emit_item.
3011 (make_item_for_dump_dec): New function.
3012 (dump_context::dump_dec): Call it, and use the result,
3013 eliminating the direct usage of dump_file and alt_dump_file in
3014 favor of indirectly using them via emit_item.
3015 (make_item_for_dump_symtab_node): New function, adapted from
3016 optinfo::add_symtab_node.
3017 (dump_context::dump_symtab_node): Call it, and use the result,
3018 eliminating the direct usage of dump_file and alt_dump_file in
3019 favor of indirectly using them via emit_item.
3020 (dump_context::begin_scope): Reimplement, avoiding direct usage
3021 of dump_file and alt_dump_file in favor of indirectly using them
3023 (dump_context::emit_item): New member function.
3024 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3025 Set up test pretty-printer on the underlying context. Call
3026 refresh_dumps_are_enabled.
3027 (temp_dump_context::~temp_dump_context): Call
3028 refresh_dumps_are_enabled.
3029 (temp_dump_context::get_dumped_text): New member function.
3030 (selftest::verify_dumped_text): New function.
3031 (ASSERT_DUMPED_TEXT_EQ): New macro.
3032 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3033 and then without optinfo enabled. Add uses of
3034 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3035 * dumpfile.h: Update comment for the dump_* API.
3036 * optinfo-emit-json.cc
3037 (selftest::test_building_json_from_dump_calls): Update for new
3038 param for temp_dump_context ctor.
3039 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3040 and "m_owned" field.
3041 (optinfo_item::~optinfo_item): Likewise.
3042 (optinfo::add_item): New member function.
3043 (optinfo::emit): Update comment.
3044 (optinfo::add_string): Delete.
3045 (optinfo::add_printf): Delete.
3046 (optinfo::add_printf_va): Delete.
3047 (optinfo::add_gimple_stmt): Delete.
3048 (optinfo::add_gimple_expr): Delete.
3049 (optinfo::add_tree): Delete.
3050 (optinfo::add_symtab_node): Delete.
3051 (optinfo::add_dec): Delete.
3052 * optinfo.h (class dump_context): New forward decl.
3053 (optinfo::add_item): New decl.
3054 (optinfo::add_string): Delete.
3055 (optinfo::add_printf): Delete.
3056 (optinfo::add_printf_va): Delete.
3057 (optinfo::add_gimple_stmt): Delete.
3058 (optinfo::add_gimple_expr): Delete.
3059 (optinfo::add_tree): Delete.
3060 (optinfo::add_symtab_node): Delete.
3061 (optinfo::add_dec): Delete.
3062 (optinfo::add_poly_int): Delete.
3063 (optinfo_item::optinfo_item): Remove "owned" param.
3064 (class optinfo_item): Remove field "m_owned".
3066 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3069 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3070 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3071 requested variable alignment.
3072 (expand_one_ssa_partition): Likewise.
3073 (expand_one_var): Likewise.
3075 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3077 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3078 to speculation_safe_value_not_needed.
3080 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3082 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3083 * targhooks.c (speculation_safe_value_not_needed): New function.
3084 * target.def (have_speculation_safe_value): Update documentation.
3085 * doc/tm.texi: Regenerated.
3087 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3089 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3090 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3092 (despeculate_copy<ALLI:mode>_insn): New insn.
3093 (despeculate_copyti_insn): New insn.
3094 (despeculate_simple<ALLI:mode>): New insn
3095 (despeculate_simpleti): New insn.
3096 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3098 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3099 aarch64_speculation_safe_value.
3100 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3102 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3104 * config/aarch64/aarch64-speculation.cc: New file.
3105 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3106 before pass_reorder_blocks.
3107 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3109 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3110 X14 and X15 when tracking speculation.
3111 * config/aarch64/aarch64.md (register name constants): Add
3112 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3113 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3114 (speculation_barrier): New insn attribute.
3115 (cmp<mode>): Allow SP in comparisons.
3116 (speculation_tracker): New insn.
3117 (speculation_barrier): Add speculation_barrier attribute.
3118 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3119 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3120 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3122 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3124 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3125 aarch64_track_speculation is true.
3126 (tb<optab><mode>1): Likewise.
3127 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3128 generate CB[N]Z when tracking speculation.
3129 (aarch64_split_compare_and_swap): Likewise.
3130 (aarch64_split_atomic_op): Likewise.
3132 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3134 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3136 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3138 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3139 (speculation_barrier): New insn.
3141 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3143 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3144 * config/arm/arm.md (speculation_barrier): New expand.
3145 (speculation_barrier_insn): New pattern.
3147 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3149 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3150 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3151 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3152 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3154 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3155 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3156 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3157 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3158 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3159 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3160 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3161 * builtins.c (expand_speculation_safe_value): New function.
3162 (expand_builtin): Call it.
3163 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3164 * doc/extend.texi: Document __builtin_speculation_safe_value.
3165 * doc/md.texi: Document "speculation_barrier" pattern.
3166 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3167 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3168 * doc/tm.texi: Regenerated.
3169 * target.def (have_speculation_safe_value, speculation_safe_value): New
3171 * targhooks.c (default_have_speculation_safe_value): New function.
3172 (default_speculation_safe_value): New function.
3173 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3174 (default_speculation_safe_value): Add prototype.
3176 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3178 * dump-context.h (dump_context::dump_loc): New decl.
3179 * dumpfile.c (dump_context::dump_loc): New member function.
3180 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3181 and dump_gimple_stmt.
3182 (dump_context::dump_gimple_expr_loc): Likewise, using
3184 (dump_context::dump_generic_expr_loc): Likewise, using
3186 (dump_context::dump_printf_loc_va): Likewise, using
3188 (dump_context::begin_scope): Explicitly using the global function
3189 "dump_loc", rather than the member function.
3191 2018-07-31 Martin Sebor <msebor@redhat.com>
3193 PR tree-optimization/86741
3194 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3196 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3198 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3199 depend on whether prefetch instructions will be emitted or not.
3200 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3201 will be emitted or not.
3202 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3203 (TARGET_SETMEM_PFD): New macros.
3205 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3207 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3208 (NULL_STMT_VEC_INFO): Delete.
3209 (stmt_vec_info::operator*): Likewise.
3210 (stmt_vec_info::operator gimple *): Likewise.
3211 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3212 of NULL_STMT_VEC_INFO.
3213 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3214 (vect_reassociating_reduction_p): Likewise.
3215 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3216 (vectorizable_store): Likewise.
3217 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3218 (vec_info::free_stmt_vec_infos): Likewise.
3220 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3222 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3223 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3225 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3227 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3228 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3229 (vec_info::free_stmt_vec_info): New private member functions.
3230 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3231 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3232 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3233 set_stmt_vec_info_vec and free_stmt_vec_infos.
3234 * tree-vect-loop.c (_loop_vec_info): Remove call to
3235 set_stmt_vec_info_vec.
3236 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3237 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3238 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3239 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3240 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3241 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3242 with the clearing in the xcalloc.
3243 (stmt_vec_info_vec): Delete.
3244 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3245 (vectorize_loops): Likewise.
3246 (vec_info::~vec_info): Remove argument from call to
3247 free_stmt_vec_infos.
3248 (vec_info::add_stmt): Remove vinfo argument from call to
3251 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3253 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3254 rather than a gimple stmt.
3255 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3256 information for pattern statements when passed the original
3257 statement; instead wait to be passed the pattern statement itself.
3258 Don't call set_vinfo_for_stmt here.
3259 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3260 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3261 stmt_vec_infos here.
3262 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3263 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3264 stmt_vec_infos entry.
3266 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3268 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3269 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3270 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3271 * tree-vect-stmts.c (vectorizable_call): Likewise.
3272 (vectorizable_simd_clone_call): Likewise.
3274 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3276 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3277 * tree-vectorizer.c (vec_info::remove_stmt): New function.
3278 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3279 * tree-vect-loop.c (vect_transform_loop): Likewise.
3280 * tree-vect-slp.c (vect_schedule_slp): Likewise.
3281 * tree-vect-stmts.c (vect_remove_stores): Likewise.
3283 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3285 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3286 (vect_dr_stmt): Delete.
3287 * tree-vectorizer.c (vec_info::lookup_dr): New function.
3288 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3290 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3291 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3292 (vect_verify_datarefs_alignment, vect_peeling_supportable)
3293 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3294 (vect_analyze_data_refs): Likewise.
3295 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
3297 (vect_find_same_alignment_drs): Likewise.
3298 (vect_slp_analyze_node_dependences): Update calls accordingly.
3299 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3300 instead of DR_VECT_AUX.
3301 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3302 of a vector data references. Use vec_info::lookup_dr instead of
3304 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3305 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3306 instead of DR_VECT_AUX.
3308 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3310 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3312 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3314 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3315 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3316 (vect_gen_prolog_loop_niters): Likewise.
3318 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3320 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3321 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3322 (vect_known_alignment_in_bytes, vect_dr_behavior)
3323 (vect_get_scalar_dr_size): Take references as dr_vec_infos
3324 instead of data_references. Update calls to other routines for
3325 which the same change has been made.
3326 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3327 dr_vec_infos instead of stmt_vec_infos.
3328 (vect_analyze_data_ref_dependence): Update call accordingly.
3329 (vect_slp_analyze_data_ref_dependence)
3330 (vect_record_base_alignments): Use DR_VECT_AUX.
3331 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3332 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3333 (vector_alignment_reachable_p, vect_get_data_access_cost)
3334 (vect_peeling_supportable, vect_analyze_group_access_1)
3335 (vect_analyze_group_access, vect_analyze_data_ref_access)
3336 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3337 (vect_compile_time_alias, vect_small_gap_p)
3338 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3339 (vect_supportable_dr_alignment): Take references as dr_vec_infos
3340 instead of data_references. Update calls to other routines for
3341 which the same change has been made.
3342 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3343 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3344 (vect_slp_analyze_and_verify_node_alignment)
3345 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3346 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3347 (vect_setup_realignment): Use dr_vec_infos. Update calls after
3349 (_vect_peel_info::dr): Replace with...
3350 (_vect_peel_info::dr_info): ...this new field.
3351 (vect_peeling_hash_get_most_frequent)
3352 (vect_peeling_hash_choose_best_peeling): Update accordingly.
3353 (vect_peeling_hash_get_lowest_cost):
3354 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
3355 routines for which the same change has been made.
3356 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
3358 * tree-vect-loop-manip.c (get_misalign_in_elems)
3359 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
3361 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3362 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3363 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3364 (get_group_load_store_type, get_negative_load_store_type)
3365 (vect_get_data_ptr_increment, vectorizable_store)
3366 (vectorizable_load): Likewise.
3367 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3368 Update calls to other routines for which the same change has been made.
3370 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3372 * tree-vectorizer.h (vec_info::move_dr): New member function.
3373 (dataref_aux): Rename to...
3374 (dr_vec_info): ...this and add "dr" and "stmt" fields.
3375 (_stmt_vec_info::dr_aux): Update accordingly.
3376 (_stmt_vec_info::data_ref_info): Delete.
3377 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3378 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3379 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3380 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3382 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
3383 (STMT_VINFO_DR_INFO): New macro.
3384 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3385 (set_dr_misalignment): Update after rename of dataref_aux.
3386 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
3387 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3388 initialization of STMT_VINFO_DATA_REF.
3389 * tree-vectorizer.c (vec_info::move_dr): New function.
3390 * tree-vect-patterns.c (vect_recog_bool_pattern)
3391 (vect_recog_mask_conversion_pattern)
3392 (vect_recog_gather_scatter_pattern): Use it.
3393 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3394 the "dr" and "stmt" fields of dr_vec_info instead of
3395 STMT_VINFO_DATA_REF.
3397 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3399 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3400 (is_pattern_stmt_p): Use it.
3401 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3402 on pattern statements.
3404 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3406 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3407 original stmt as a stmt_vec_info rather than a gimple stmt.
3408 (vect_pattern_recog_1): Take the statement directly as a
3409 stmt_vec_info, rather than via a gimple_stmt_iterator.
3410 Update call to vect_mark_pattern_stmts.
3411 (vect_pattern_recog): Update calls accordingly.
3413 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3415 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3416 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3417 a vect_def_type for the first argument.
3418 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3419 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
3420 operand if it isn't defined by a vectorized statement.
3421 (vect_build_gather_load_calls): Remove the mask_dt argument and
3422 update calls to vect_get_vec_def_for_stmt_copy.
3423 (vectorizable_bswap): Likewise the dt argument.
3424 (vectorizable_call): Update calls to vectorizable_bswap and
3425 vect_get_vec_def_for_stmt_copy.
3426 (vectorizable_simd_clone_call, vectorizable_assignment)
3427 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3428 (vectorizable_comparison): Update calls to
3429 vect_get_vec_def_for_stmt_copy.
3430 (vectorizable_store): Likewise. Remove now-unnecessary calls to
3432 (vect_get_loop_based_defs): Remove dt argument and update call
3433 to vect_get_vec_def_for_stmt_copy.
3434 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3435 and vect_get_vec_def_for_stmt_copy.
3436 (vectorizable_load): Update calls to vect_build_gather_load_calls
3437 and vect_get_vec_def_for_stmt_copy.
3438 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3439 (vectorizable_reduction, vectorizable_live_operation): Update calls
3440 to vect_get_vec_def_for_stmt_copy.
3442 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3444 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3445 and gimple stmt arguments with a stmt_vec_info.
3446 (vect_record_base_alignments): Update calls accordingly.
3447 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3448 and gimple stmt arguments with a stmt_vec_info.
3449 (vect_build_slp_tree_1): Remove vinfo argument and update call
3450 to vect_record_max_nunits.
3451 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3452 and vect_record_max_nunits.
3454 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3456 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3457 file and take a stmt_vec_info instead of a gimple stmt.
3458 (supportable_widening_operation, vect_finish_replace_stmt)
3459 (vect_finish_stmt_generation, vect_get_store_rhs)
3460 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3461 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3462 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3463 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3464 (vect_create_data_ref_ptr, bump_vector_ptr)
3465 (vect_permute_store_chain, vect_setup_realignment)
3466 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3467 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3468 (vectorizable_reduction, vectorizable_induction)
3469 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3470 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3471 than gimple stmts as arguments.
3472 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3473 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3474 (can_group_stmts_p, vect_check_gather_scatter)
3475 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3476 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3477 (vect_permute_load_chain, vect_shift_permute_load_chain)
3478 (vect_transform_grouped_load)
3479 (vect_record_grouped_load_vectors): Likewise.
3480 * tree-vect-loop.c (vect_fixup_reduc_chain)
3481 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3482 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3483 (vectorizable_reduction, vectorizable_induction)
3484 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3485 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3486 (vect_get_load_store_mask): Likewise.
3487 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3488 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3489 * tree-vect-stmts.c (vect_mark_relevant)
3490 (is_simple_and_all_uses_invariant)
3491 (exist_non_indexing_operands_for_use_p, process_use)
3492 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3493 (vect_get_vec_def_for_operand, vect_get_vec_defs)
3494 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3495 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3496 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3497 (get_negative_load_store_type, get_load_store_type)
3498 (vect_check_load_store_mask, vect_check_store_rhs)
3499 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3500 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3501 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3502 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3503 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3504 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3505 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3506 (supportable_widening_operation): Likewise.
3508 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3510 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3511 a stmt_vec_info instead of a gcall.
3512 (vect_check_gather_scatter): Update call accordingly.
3513 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3515 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3516 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3517 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3518 instead of a gimple stmt.
3519 (vect_transform_loop): Update calls accordingly.
3520 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3521 stmt_vec_infos instead of gimple stmts.
3522 (vect_analyze_slp_instance): Update use accordingly.
3523 * tree-vect-stmts.c (read_vector_array, write_vector_array)
3524 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3525 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3526 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3527 (vect_gen_widened_results_half, vect_get_loop_based_defs)
3528 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3529 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3530 down to subroutines.
3532 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3534 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3535 of the worklist from a vector of gimple stmts to a vector of
3537 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3538 (vect_mark_stmts_to_be_vectorized): Likewise
3540 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3542 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3543 statement before passing it to vect_analyze_stmt.
3544 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3545 the chain of phi vector definitions. Track the exit phi via its
3547 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3548 STMT_VINFO_REDUC_DEF.
3549 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3550 stmt_vec_infos to handle the statement chains.
3551 (vect_get_slp_defs): Record the first statement in the node
3552 using a stmt_vec_info.
3553 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3554 statements here and pass their stmt_vec_info down to subroutines.
3555 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3556 down to vect_finish_stmt_generation.
3557 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3558 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3559 stmt_vec_infos to subroutines.
3560 (vect_remove_stores): Use stmt_vec_infos to handle the statement
3563 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3565 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3566 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3567 (vect_permute_store_chain, vect_setup_realignment)
3568 (vect_permute_load_chain, vect_shift_permute_load_chain)
3569 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3570 stmts internally, and when passing values to other vectorizer routines.
3571 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3572 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3573 (vect_analyze_loop_operations, get_initial_def_for_reduction)
3574 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3575 (vectorizable_reduction, vectorizable_induction)
3576 (vectorizable_live_operation, vect_transform_loop_stmt)
3577 (vect_transform_loop): Likewise.
3578 * tree-vect-patterns.c (vect_reassociating_reduction_p)
3579 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3580 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3581 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3582 (vect_slp_analyze_node_operations_1): Likewise.
3583 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3584 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3585 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3586 (vect_finish_stmt_generation_1, get_group_load_store_type)
3587 (get_load_store_type, vect_build_gather_load_calls)
3588 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3589 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3590 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3591 (vectorizable_store, vectorizable_load, vectorizable_condition)
3592 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3593 (supportable_widening_operation): Likewise.
3594 (vect_get_vector_types_for_stmt): Likewise.
3595 * tree-vectorizer.h (vect_dr_behavior): Likewise.
3597 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3599 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3600 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3601 (vect_permute_store_chain, vect_permute_load_chain)
3602 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3603 repeated stmt_vec_info lookups.
3604 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3605 (vect_update_ivs_after_vectorizer): Likewise.
3606 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3607 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3608 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3609 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3610 (vect_bb_slp_scalar_cost): Likewise.
3611 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3613 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3615 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3616 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3617 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3618 to get gassigns and gcalls, rather than operating on generc gimple
3620 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3621 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3622 (vectorizable_load, vect_analyze_stmt): Likewise.
3623 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3625 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3627 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3628 return stmt_vec_infos rather than gimple stmts. Do not accept
3630 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3632 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3633 Update use of get_later_stmt.
3634 (vect_get_constant_vectors): Update call accordingly.
3635 (vect_schedule_slp_instance): Likewise
3636 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3637 (vect_slp_analyze_instance_dependence): Likewise.
3638 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3640 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3642 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3643 (stmt_info_for_cost::stmt_info): ...this new field.
3644 (add_stmt_costs): Update accordingly.
3645 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3646 (vect_get_known_peeling_cost): Likewise.
3647 (vect_estimate_min_profitable_iters): Likewise.
3648 * tree-vect-stmts.c (record_stmt_cost): Likewise.
3650 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3652 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3653 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3654 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3656 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3658 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3660 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3661 a gimple stmt to a stmt_vec_info.
3662 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3664 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3666 * tree-vectorizer.h (vec_info::grouped_stores): Change from
3667 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3668 (_loop_vec_info::reduction_chains): Likewise.
3669 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3671 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3673 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3675 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3676 a gimple stmt to a stmt_vec_info.
3677 (_stmt_vec_info::next_element): Likewise.
3678 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3679 (vect_slp_analyze_and_verify_node_alignment)
3680 (vect_analyze_group_access_1, vect_analyze_group_access)
3681 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3682 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3683 (vect_supportable_dr_alignment): Update accordingly.
3684 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3685 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3686 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3687 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3688 * tree-vect-slp.c (vect_build_slp_tree_1)
3689 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3690 (vect_split_slp_store_group, vect_analyze_slp_instance)
3691 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3692 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3693 (get_group_load_store_type, get_load_store_type)
3694 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3695 (vect_transform_stmt, vect_remove_stores): Likewise.
3697 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3699 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3701 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3702 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3703 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3704 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3705 (vector_alignment_reachable_p, vect_get_data_access_cost)
3706 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3707 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3708 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3709 (vect_analyze_group_access_1, vect_analyze_group_access)
3710 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3711 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3712 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3713 result of vect_dr_stmt and use the stmt_vec_info instead of
3714 the associated gimple stmt.
3715 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3716 (vect_gen_prolog_loop_niters): Likewise.
3717 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3719 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3721 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
3722 to a vec<stmt_vec_info>.
3723 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
3724 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
3726 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
3727 to a vec<stmt_vec_info>.
3728 (bst_traits::value_type, bst_traits::value_type): Likewise.
3729 (bst_traits::hash): Update accordingly.
3730 (vect_get_and_check_slp_defs): Change the stmts parameter from
3731 a vec<gimple *> to a vec<stmt_vec_info>.
3732 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
3733 (vect_build_slp_tree): Likewise.
3734 (vect_build_slp_tree_2): Likewise. Update uses of
3735 SLP_TREE_SCALAR_STMTS.
3736 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
3737 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
3738 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
3739 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
3740 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
3741 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
3742 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
3743 (vect_get_constant_vectors, vect_get_slp_defs)
3744 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
3745 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
3746 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3747 instead of gimple stmts.
3748 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3749 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3750 (vect_slp_analyze_instance_dependence): Update uses of
3751 SLP_TREE_SCALAR_STMTS.
3752 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3753 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3754 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3755 (get_initial_defs_for_reduction): Likewise.
3756 (vect_create_epilog_for_reduction): Likewise.
3757 (vectorize_fold_left_reduction): Likewise.
3758 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3759 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3760 (can_vectorize_live_stmts): Likewise.
3762 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3764 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3765 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3766 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3768 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3770 (gather_scalar_reductions): Update after above interface changes.
3771 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3772 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3774 (vect_force_simple_reduction): Likewise.
3775 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3776 LOOP_VINFO_REDUCTIONS.
3777 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3779 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3781 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3782 a gimple stmt to a stmt_vec_info.
3783 * tree-vect-loop.c (vect_active_double_reduction_p)
3784 (vect_force_simple_reduction, vectorizable_reduction): Update
3787 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3789 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3790 vec<gimple *> to a vec<stmt_vec_info>.
3791 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3792 the reduction_phis argument from a vec<gimple *> to a
3794 (vectorizable_reduction): Likewise the phis local variable that
3795 is passed to vect_create_epilog_for_reduction. Update for new type
3796 of SLP_TREE_VEC_STMTS.
3797 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3798 (vectorizable_live_operation): Likewise.
3799 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3800 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3802 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3804 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3805 a gimple stmt to a stmt_vec_info.
3806 (vectorizable_condition, vectorizable_live_operation)
3807 (vectorizable_reduction, vectorizable_induction): Pass back the
3808 vectorized statement as a stmt_vec_info.
3809 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
3810 use of STMT_VINFO_VEC_STMT.
3811 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
3812 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
3813 as stmt_vec_infos rather than gimple stmts.
3814 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
3816 (vectorizable_live_operation): Likewise.
3817 (vectorizable_reduction, vectorizable_induction): Likewise,
3818 updating use of STMT_VINFO_VEC_STMT.
3819 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
3820 of STMT_VINFO_VEC_STMT.
3821 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
3822 (vectorizable_simd_clone_call, vectorizable_conversion)
3823 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3824 (vectorizable_store, vectorizable_load, vectorizable_condition)
3825 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
3826 from a gimple stmt to a stmt_vec_info.
3827 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
3828 pointer to a stmt_vec_info to the vectorizable_* routines.
3830 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3832 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
3833 a gimple stmt to a stmt_vec_info.
3834 (is_pattern_stmt_p): Update accordingly.
3835 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
3836 (vect_record_grouped_load_vectors): Likewise.
3837 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3838 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
3839 (vect_model_reduction_cost): Likewise.
3840 (vect_create_epilog_for_reduction): Likewise.
3841 (vectorizable_reduction, vectorizable_induction): Likewise.
3842 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3843 Return the stmt_vec_info for the pattern statement.
3844 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
3845 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
3846 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3847 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
3848 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3849 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
3850 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
3851 (free_stmt_vec_info, vect_is_simple_use): Likewise.
3853 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3855 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
3856 (vect_finish_stmt_generation): Likewise.
3857 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3858 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
3859 (vect_build_gather_load_calls): Use the return value of the above
3860 functions instead of a separate call to vinfo_for_stmt. Use narrow
3861 scopes for the input gimple stmt and wider scopes for the associated
3862 stmt_vec_info. Use vec_info::lookup_def when setting these
3863 stmt_vec_infos from an SSA_NAME definition.
3864 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3865 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3866 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3867 (vectorizable_store, vectorizable_load, vectorizable_condition)
3868 (vectorizable_comparison): Likewise.
3869 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
3870 (vectorizable_reduction): Likewise.
3872 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3874 * tree-vectorizer.h (vect_is_simple_use): Add an optional
3875 stmt_vec_info * parameter before the optional gimple **.
3876 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3877 (process_use, vect_get_vec_def_for_operand_1): Update callers.
3878 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
3879 * tree-vect-loop.c (vectorizable_reduction): Likewise.
3880 (vectorizable_live_operation): Likewise.
3881 * tree-vect-patterns.c (type_conversion_p): Likewise.
3882 (vect_look_through_possible_promotion): Likewise.
3883 (vect_recog_rotate_pattern): Likewise.
3884 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3886 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3888 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
3889 a typedef to a wrapper class.
3890 (NULL_STMT_VEC_INFO): New macro.
3891 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
3892 (stmt_vec_info::operator*): New function.
3893 (stmt_vec_info::operator gimple *): Likewise.
3894 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
3895 (add_stmt_costs): Likewise.
3896 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3897 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3898 (vect_get_known_peeling_cost): Likewise.
3899 (vect_estimate_min_profitable_iters): Likewise.
3900 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3901 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
3902 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3903 (vectorizable_store, free_stmt_vec_infos): Likewise.
3904 (new_stmt_vec_info): Change return type of xcalloc to
3907 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3909 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
3910 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
3911 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
3912 a single_imm_use-based sequence.
3913 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
3915 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3917 * tree-vectorizer.h (vec_info::lookup_def): Declare.
3918 * tree-vectorizer.c (vec_info::lookup_def): New function.
3919 * tree-vect-patterns.c (vect_get_internal_def): Use it.
3920 (vect_widened_op_tree): Likewise.
3921 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3922 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
3923 (vectorizable_reduction): Likewise.
3924 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
3926 (vect_is_slp_reduction): Update calls accordingly. Use
3927 vec_info::lookup_def.
3928 (vect_is_simple_reduction): Likewise
3929 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
3931 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3933 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
3934 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
3935 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
3937 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
3938 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
3939 (vect_update_vf_for_slp, vect_analyze_loop_operations)
3940 (vect_is_slp_reduction, vectorizable_induction)
3941 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
3942 * tree-vect-patterns.c (vect_init_pattern_stmt):
3943 (vect_determine_min_output_precision_1, vect_determine_precisions)
3944 (vect_pattern_recog): Likewise.
3945 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
3946 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
3947 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
3948 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3949 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
3950 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
3951 info field from a loop to a loop_vec_info.
3953 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3955 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
3956 (vec_info::add_stmt): Declare.
3957 * tree-vectorizer.c (vec_info::add_stmt): New function.
3958 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
3959 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
3960 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3961 (vectorizable_induction): Likewise.
3962 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
3963 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3964 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
3965 (vectorizable_load): Likewise.
3966 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3967 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
3968 (vect_recog_gather_scatter_pattern): Likewise.
3969 (append_pattern_def_seq): Likewise. Remove a check that is
3970 performed by add_stmt itself.
3972 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3974 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
3975 which make_ssa_name was called with new_stmt before new_stmt
3978 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3980 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
3982 (vect_is_slp_reduction): ...here...
3983 (vect_is_simple_reduction): ...and here. Remove repetition of tests
3984 that are already known to be false.
3986 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3988 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
3989 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
3990 STMT_VINFO_NUM_SLP_USES when it's true.
3991 (vect_free_slp_instance): Add a final_p parameter and pass it to
3993 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
3994 (vect_analyze_slp_instance): Likewise.
3995 (vect_slp_analyze_operations): Likewise.
3996 (vect_slp_analyze_bb_1): Likewise.
3997 * tree-vectorizer.c (vec_info): Likewise.
3998 * tree-vect-loop.c (vect_transform_loop): Likewise.
4000 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4002 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4003 function is not called for second and subsequent members of
4006 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4008 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4009 cases for nested loops from here to ...
4010 (vect_create_epilog_for_reduction): ...here. Only call
4011 vect_is_simple_use for inner-loop reductions.
4013 2018-07-31 Martin Liska <mliska@suse.cz>
4015 PR gcov-profile/85338
4016 PR gcov-profile/85350
4017 PR gcov-profile/85372
4018 * profile.c (struct location_triplet): New.
4019 (struct location_triplet_hash): Likewise.
4020 (output_location): Do not output a BB that
4021 is already recorded for a line.
4022 (branch_prob): Use streamed_locations.
4024 2018-07-31 Martin Liska <mliska@suse.cz>
4026 PR gcov-profile/85370
4027 * coverage.c (coverage_begin_function): Do not mark target
4028 clones as artificial functions.
4030 2018-07-31 Martin Liska <mliska@suse.cz>
4032 PR gcov-profile/83813
4033 PR gcov-profile/84758
4034 PR gcov-profile/85217
4035 PR gcov-profile/85332
4036 * profile.c (branch_prob): Do not record GOTO expressions
4037 for GIMPLE statements which locations are already streamed.
4039 2018-07-31 Olivier Hainque <hainque@adacore.com>
4041 * gcc.c (handle_spec_function): Accept a soft_matched_part
4042 argument, as do_spec_1. Pass it down to ...
4043 (eval_spec_function): Accept a soft_matched_part argument,
4044 and pass it down to ...
4045 (do_spec_2): Accept a soft_matched_part argument, and pass
4046 it down to do_spec_1.
4047 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4048 (handle_braces): Update call to handle_spec_function.
4049 (driver::set_up_specs): Update calls to do_spec_2.
4050 (compare_debug_dump_opt_spec_function): Likewise.
4051 (compare_debug_self_opt_spec_function): Likewise.
4053 2018-07-31 Olivier Hainque <hainque@adacore.com>
4055 * common.opt (nolibc): New option.
4056 * doc/invoke.texi (Link Options): Document it.
4057 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4058 * config/alpha/linux.h: Likewise.
4059 * config/arc/elf.h: Likewise.
4060 * config/arm/uclinux-elf.h: Likewise.
4061 * config/arm/unknown-elf.h: Likewise.
4062 * config/avr/avrlibc.h: Likewise.
4063 * config/bfin/bfin.h: Likewise.
4064 * config/bfin/linux.h: Likewise.
4065 * config/bfin/uclinux.h: Likewise.
4066 * config/darwin.h: Likewise.
4067 * config/darwin10.h: Likewise.
4068 * config/darwin12.h: Likewise.
4069 * config/gnu-user.h: Likewise.
4070 * config/lm32/uclinux-elf.h: Likewise.
4071 * config/pa/pa-hpux11.h: Likewise.
4072 * config/pa/pa64-hpux.h: Likewise.
4073 * config/sparc/sparc.h: Likewise.
4075 2018-07-31 Olivier Hainque <hainque@adacore.com>
4077 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4078 undefined variables.
4080 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4083 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4086 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4088 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4089 terminated string literal.
4091 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4093 PR rtl-optimization/85160
4094 * combine.c (is_just_move): New function.
4095 (try_combine): Allow combining two instructions into two if neither of
4096 the original instructions was a move.
4098 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4101 * doc/extend.texi (Global Register Variables): Discourage use of type
4103 (Local Register Variables): Likewise.
4105 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4107 PR tree-optimization/86506
4108 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4110 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4113 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4114 hard_regno, make sure no insn between `from` and `to` clobbers it.
4116 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4117 Tom de Vries <tdevries@suse.de>
4119 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4120 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4121 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4122 PTX_DEFAULT_RUNTIME_DIM.
4123 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4125 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4127 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4128 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4129 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4131 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4133 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4135 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4136 predicate to reflect toc fusion has been deleted.
4137 (toc_fusion_mem_raw): Delete, no longer used.
4138 (toc_fusion_mem_wrapped): Likewise.
4139 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4141 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4142 Delete, no longer used.
4143 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4144 meant to be used for toc fusion.
4145 (rs6000_debug_print_mode): Delete toc fusion debugging.
4146 (rs6000_debug_reg_global): Likewise.
4147 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4148 fusion and secondary reload support that were never used.
4149 (rs6000_option_override_internal): Delete TOC fusion, that was only
4150 partially defined, and it did not work unless you also used the
4152 (rs6000_legitimate_address_p): Delete TOC fusion support.
4153 (rs6000_opt_masks): Likewise.
4154 (fusion_wrap_memory_address): Delete function, no longer used.
4155 (fusion_split_address); Delete TOC fusion support.
4156 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4157 longer used with toc fusion being deleted.
4158 (TARGET_TOC_FUSION_FP): Likewise.
4159 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4161 (toc fusion spliter): Delete TOC fusion support.
4162 (toc_fusionload_<mode>): Likewise.
4163 (toc_fusionload_di): Likewise.
4164 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4165 longer needs to be named. Rename predicate to delete TOC fusion.
4166 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4167 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4168 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4169 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4170 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4172 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4174 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4175 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4176 __int128 in built-in function prototypes.
4177 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4178 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4180 2018-07-27 Martin Sebor <msebor@redhat.com>
4182 PR tree-optimization/86696
4183 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4184 types, including enums.
4185 (handle_char_store): Be prepared for the above function to fail.
4187 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4189 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4190 when optimization level is lower than 2 or optimize for size.
4192 2018-07-26 Martin Sebor <msebor@redhat.com>
4194 PR tree-optimization/86043
4195 PR tree-optimization/86042
4196 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4197 (get_string_cst_length): Rename...
4198 (get_min_string_length): ...to this. Add argument.
4199 (handle_char_store): Extend to handle multi-character stores by
4201 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4202 * tree.h (initializer_zerop): Add argument.
4204 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4207 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4208 declare target to variables if they have always,{to,from,tofrom} map
4211 2018-07-26 Martin Liska <mliska@suse.cz>
4214 * lto-wrapper.c: Add linker_output as prefix
4215 for ltrans_output_file.
4217 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4219 PR rtl-optimization/85805
4220 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4221 value for hard registers if that was written in the same mode.
4223 2018-07-26 Martin Liska <mliska@suse.cz>
4225 PR gcov-profile/86536
4226 * gcov.c (format_gcov): Use printf format %.*f directly
4227 and do not handle special values.
4229 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4231 * common/config/arc/arc-common.c (arc_option_optimization_table):
4232 Update default optimizations for size.
4234 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4236 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4237 * config/arc/constraints.md (CfZ): New constraint.
4238 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4239 (subsf3_fpu): Likewise.
4240 (cmpsf_fpu): Likewise.
4241 (cmpsf_fpu_uneq): Likewise.
4243 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4245 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4247 (arc_is_uncached_mem_p): uncached applies to both the variable and
4250 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4252 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4255 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4257 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4258 field "m_scopes" from vec to auto_vec.
4260 2018-07-25 Martin Liska <mliska@suse.cz>
4262 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4265 2018-07-25 Richard Biener <rguenther@suse.de>
4268 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4269 special wrt context_die late.
4270 (gen_subprogram_die): Re-use DIEs in local scope.
4272 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
4274 PR tree-optimization/86644
4275 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
4277 2018-07-25 Martin Liska <mliska@suse.cz>
4280 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4281 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4283 2018-07-25 Martin Liska <mliska@suse.cz>
4286 * params.def: Explain ASan abbreviation and provide
4287 a documentation link.
4289 2018-07-24 Martin Sebor <msebor@redhat.com>
4291 PR tree-optimization/86622
4292 PR tree-optimization/86532
4293 * builtins.h (string_length): Declare.
4294 * builtins.c (c_strlen): Correct handling of non-constant offsets.
4295 (check_access): Be prepared for non-constant length ranges.
4296 (string_length): Make extern.
4297 * expr.c (string_constant): Only handle the minor non-constant
4298 array index. Use string_constant to compute the length of
4299 a generic string constant.
4301 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
4303 PR tree-optimization/86618
4304 * tree-vect-stmts.c (vectorizable_call): Don't take the address
4305 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4307 2018-07-24 David Malcolm <dmalcolm@redhat.com>
4309 PR tree-optimization/86636
4310 * json.cc (json::object::set): Fix comment. Add assertions.
4311 (json::array::append): Move here from json.h. Add comment and an
4313 (json::string::string): Likewise.
4314 * json.h (json::array::append): Move to json.cc.
4315 (json::string::string): Likewise.
4316 * optinfo-emit-json.cc
4317 (optrecord_json_writer::impl_location_to_json): Assert that we
4318 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4319 wrapper around it. Expand the location once, rather than three
4321 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4322 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4324 (optrecord_json_writer::optinfo_to_json): Likewise, in four
4325 places. Fix some overlong lines.
4327 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
4329 * config/aarch64/aarch64-simd.md
4330 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4331 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4332 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4333 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4334 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4335 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4336 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4337 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4338 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4340 2018-07-24 Jakub Jelinek <jakub@redhat.com>
4343 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4344 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
4345 and abs_d == d, do the power of two handling if profitable.
4347 2018-07-24 Richard Biener <rguenther@suse.de>
4349 * match.pd: Add BIT_FIELD_REF canonicalizations.
4351 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4354 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4356 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4358 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4359 terminated STRING_CST object.
4361 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4363 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4365 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4367 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4368 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4369 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4370 the elements into a register.
4371 (rs6000_split_v4si_init_di_reg): Delete.
4372 (rs6000_split_v4si_init): Delete.
4373 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4374 (vsx_init_v4si): Rewrite as a define_expand.
4376 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4378 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4379 zero_extend argument from memory): New.
4381 2018-07-22 Martin Sebor <msebor@redhat.com>
4384 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4385 diagnosing calls with unknown arguments unless -Walloca-larger-than
4386 is restricted to less than PTRDIFF_MAX bytes.
4388 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
4390 * doc/gcov.texi (Invoking Gcov): Editorial changes.
4392 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4394 * pretty-print.c (text_info::set_location): Remove redundant
4395 "line_table" parameter from call to rich_location::set_range.
4397 2018-07-20 Martin Sebor <msebor@redhat.com>
4400 * builtins.c (expand_builtin_alloca): Adjust.
4401 * calls.c (alloc_max_size): Simplify.
4402 * cgraphunit.c (cgraph_node::expand): Adjust.
4403 * common.opt (larger_than_size, warn_frame_larger_than): Remove
4405 (frame_larger_than_size): Same.
4406 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4407 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4409 * doc/invoke.texi (GCC Command Options): Document option arguments.
4410 Explain byte-size arguments and suffixes.
4411 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4412 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4413 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4414 * doc/options.texi (UInteger): Expand.
4415 (Host_Wide_Int, ByteSize): Document new properties.
4416 * final.c (final_start_function_1): Include sizes in an error message.
4417 * function.c (frame_offset_overflow): Same.
4418 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4419 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4420 Diagnose unbounded alloca calls only for limits of less than
4422 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
4423 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
4425 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
4426 only for limits of less than PTRDIFF_MAX.
4427 * langhooks-def.h (lhd_handle_option): Change function argument
4429 * langhooks.c (lhd_handle_option): Same.
4430 * langhooks.h (handle_option): Same.
4431 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4433 (var_type, var_type_struct): Same.
4434 (var_set): Handle ByteSize flag.
4435 * optc-gen.awk: Add comments to output to ease debugging. Make
4436 use of HOST_WIDE_INT where appropriate.
4437 * opts-gen-save.awk: Use %lx to format unsigned long.
4438 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4439 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4440 arguments. Parse bytes-size suffixes.
4441 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4442 (enum_value_to_arg): Same.
4443 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
4444 (handle_option): Adjust.
4445 (generate_option): Change function argument to HOST_WIDE_INT.
4446 (cmdline_handle_error): Adjust.
4447 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4448 (set_option): Change function argument to HOST_WIDE_INT.
4449 (option_enabled): Handle cl_host_wide_int.
4450 (get_option_state): Handle CLVC_SIZE.
4451 (control_warning_option): Same.
4452 * opts.c (common_handle_option): Change function argument to
4453 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4454 OPT_Wvla_larger_than_.
4455 * opts.h (enum cl_var_type): Add an enumerator.
4456 * stor-layout.c (layout_decl): Print a more meaningful warning.
4457 * toplev.c (output_stack_usage): Adjust.
4459 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4461 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4462 call to inline_expand_builtin_string_cmp.
4463 (expand_builtin_strcmp): Likewise.
4464 (expand_builtin_strncmp): Likewise.
4465 (inline_string_cmp): Delete the last parameter, change char_type_node
4466 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4468 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4469 the inlining expansion on target where the type of the call has same or
4470 narrower precision than unsigned char.
4472 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4474 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4475 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4476 * common.opt (fsave-optimization-record): New option.
4477 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4478 * doc/invoke.texi (-fsave-optimization-record): New option.
4479 * dumpfile.c: Include "optinfo-emit-json.h".
4480 (struct kv_pair): Move to coretypes.h.
4481 (optgroup_options): Make non-static.
4482 (dump_context::end_scope): Call
4483 optimization_records_maybe_pop_dump_scope.
4484 * dumpfile.h (optgroup_options): New decl.
4485 * json.cc: New file.
4487 * optinfo-emit-json.cc: New file.
4488 * optinfo-emit-json.h: New file.
4489 * optinfo.cc: Include "optinfo-emit-json.h".
4490 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4491 (optinfo_enabled_p): Check optimization_records_enabled_p.
4492 (optinfo_wants_inlining_info_p): Likewise.
4493 * optinfo.h: Update comment.
4494 * profile-count.c (profile_quality_as_string): New function.
4495 * profile-count.h (profile_quality_as_string): New decl.
4496 (profile_count::quality): New accessor.
4497 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4498 and optinfo_emit_json_cc_tests.
4499 * selftest.h (selftest::json_cc_tests): New decl.
4500 (selftest::optinfo_emit_json_cc_tests): New decl.
4501 * toplev.c: Include "optinfo-emit-json.h".
4502 (compile_file): Call optimization_records_finish.
4503 (do_compile): Call optimization_records_start.
4504 * tree-ssa-live.c: Include optinfo.h.
4505 (remove_unused_scope_block_p): Retain inlining information if
4506 optinfo_wants_inlining_info_p returns true.
4508 2018-07-20 Richard Biener <rguenther@suse.de>
4511 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4512 to cover -flto-partition=none.
4514 2018-07-20 Martin Liska <mliska@suse.cz>
4516 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4517 (get_decl_source_range): Remove unused function.
4519 2018-07-20 Richard Biener <rguenther@suse.de>
4521 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4522 (struct vn_phi_s): Likewise.
4523 (struct vn_reference_s): Likewise.
4524 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4525 for searching the slot of an entry known to be in the hash itself.
4526 (vn_phi_hasher::equal): Likewise.
4527 (vn_reference_hasher::equal): Likewise.
4528 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4530 (optimistic_info, current_info): Remove, keeping only valid_info.
4531 (vn_reference_lookup_1): Remove fallback lookup.
4532 (vn_reference_lookup_2): Likewise.
4533 (vn_nary_op_lookup_1): Likewise.
4534 (vn_phi_lookup): Likewise.
4535 (vn_nary_build_or_lookup_1): Make sure to not chain the built
4537 (vn_reference_insert): Adjust, chain the inserted hash element
4538 at last_inserted_ref.
4539 (vn_reference_insert_pieces): Likewise.
4540 (visit_reference_op_call): Likewise.
4541 (vn_nary_op_insert_into): Chain the inserted hash element at
4543 (vn_nary_op_insert_pieces): Adjust.
4544 (vn_nary_op_insert): Likewise.
4545 (vn_nary_op_insert_stmt): Likewise.
4546 (vn_phi_insert): Adjust, chain the inserted hash element at
4548 (process_scc): Remove clearing and copying the optimistic
4549 table. Instead remove elements inserted during an optimistic
4550 iteration from the single table we maintain.
4551 (init_scc_vn): Adjust.
4552 (free_scc_vn): Likewise.
4553 (sccvn_dom_walker::record_cond): Likewise.
4554 (sccvn_dom_walker::after_dom_children): Likewise.
4556 2018-07-19 Martin Sebor <msebor@redhat.com>
4558 PR tree-optimization/84047
4559 PR tree-optimization/83776
4560 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4561 (check_array_bounds): Call it.
4563 2018-07-19 Martin Sebor <msebor@redhat.com>
4565 * align.h (align_flags): Use member initialization.
4567 2018-07-19 David Malcolm <dmalcolm@redhat.com>
4569 * Makefile.in (OBJS): Add optinfo.o.
4570 * coretypes.h (class symtab_node): New forward decl.
4571 (struct cgraph_node): New forward decl.
4572 (class varpool_node): New forward decl.
4573 * dump-context.h: New file.
4574 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4576 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4577 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4578 (set_alt_dump_file): Likewise.
4579 (dump_context::~dump_context): New dtor.
4580 (dump_gimple_stmt): Move implementation to...
4581 (dump_context::dump_gimple_stmt): ...this new member function.
4582 Add the stmt to any pending optinfo, creating one if need be.
4583 (dump_gimple_stmt_loc): Move implementation to...
4584 (dump_context::dump_gimple_stmt_loc): ...this new member function.
4585 Start a new optinfo and add the stmt to it.
4586 (dump_gimple_expr): Move implementation to...
4587 (dump_context::dump_gimple_expr): ...this new member function.
4588 Add the stmt to any pending optinfo, creating one if need be.
4589 (dump_gimple_expr_loc): Move implementation to...
4590 (dump_context::dump_gimple_expr_loc): ...this new member function.
4591 Start a new optinfo and add the stmt to it.
4592 (dump_generic_expr): Move implementation to...
4593 (dump_context::dump_generic_expr): ...this new member function.
4594 Add the tree to any pending optinfo, creating one if need be.
4595 (dump_generic_expr_loc): Move implementation to...
4596 (dump_context::dump_generic_expr_loc): ...this new member
4597 function. Add the tree to any pending optinfo, creating one if
4599 (dump_printf): Move implementation to...
4600 (dump_context::dump_printf_va): ...this new member function. Add
4601 the text to any pending optinfo, creating one if need be.
4602 (dump_printf_loc): Move implementation to...
4603 (dump_context::dump_printf_loc_va): ...this new member function.
4604 Start a new optinfo and add the stmt to it.
4605 (dump_dec): Move implementation to...
4606 (dump_context::dump_dec): ...this new member function. Add the
4607 value to any pending optinfo, creating one if need be.
4608 (dump_context::dump_symtab_node): New member function.
4609 (dump_context::get_scope_depth): New member function.
4610 (dump_context::begin_scope): New member function.
4611 (dump_context::end_scope): New member function.
4612 (dump_context::ensure_pending_optinfo): New member function.
4613 (dump_context::begin_next_optinfo): New member function.
4614 (dump_context::end_any_optinfo): New member function.
4615 (dump_context::s_current): New global.
4616 (dump_context::s_default): New global.
4617 (dump_scope_depth): Delete global.
4618 (dumpfile_ensure_any_optinfo_are_flushed): New function.
4619 (dump_symtab_node): New function.
4620 (get_dump_scope_depth): Reimplement in terms of dump_context.
4621 (dump_begin_scope): Likewise.
4622 (dump_end_scope): Likewise.
4623 (selftest::temp_dump_context::temp_dump_context): New ctor.
4624 (selftest::temp_dump_context::~temp_dump_context): New dtor.
4625 (selftest::verify_item): New function.
4626 (ASSERT_IS_TEXT): New macro.
4627 (ASSERT_IS_TREE): New macro.
4628 (ASSERT_IS_GIMPLE): New macro.
4629 (selftest::test_capture_of_dump_calls): New test.
4630 (selftest::dumpfile_c_tests): Call it.
4631 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4632 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4633 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4634 descriptive comment.
4635 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4636 (dump_node, dump_bb): Move these unrelated decls.
4637 (class dump_manager): Add leading comment.
4638 * optinfo.cc: New file.
4639 * optinfo.h: New file.
4641 2018-07-19 Michael Collison <michael.collison@arm.com>
4642 Richard Henderson <rth@redhat.com>
4644 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4645 (subti): Handle op1 zero.
4646 (subvti4, usub4ti4): New.
4647 (*sub<GPI>3_compare1_imm): New.
4648 (sub<GPI>3_carryinCV): New.
4649 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4650 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4652 2018-07-19 Michael Collison <michael.collison@arm.com>
4653 Richard Henderson <rth@redhat.com>
4655 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4656 (addti3): Create simpler code if low part is already known to be 0.
4657 (addvti4, uaddvti4): New.
4658 (*add<GPI>3_compareC_cconly_imm): New.
4659 (*add<GPI>3_compareC_cconly): New.
4660 (*add<GPI>3_compareC_imm): New.
4661 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4662 handle constants within this pattern..
4663 (*add<GPI>3_compareV_cconly_imm): New.
4664 (*add<GPI>3_compareV_cconly): New.
4665 (*add<GPI>3_compareV_imm): New.
4666 (add<GPI>3_compareV): New.
4667 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4668 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4669 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4670 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4671 with 'comparison' operator.
4672 (*add<GPI>3_compareV_cconly_imm): Ditto.
4673 (*add<GPI>3_compareV_cconly): Ditto.
4674 (*add<GPI>3_compareV_imm): Ditto.
4675 (add<GPI>3_compareV): Ditto.
4676 (add<mode>3_carryinC): Ditto.
4677 (*add<mode>3_carryinC_zero): Ditto.
4678 (*add<mode>3_carryinC): Ditto.
4679 (add<mode>3_carryinV): Ditto.
4680 (*add<mode>3_carryinV_zero): Ditto.
4681 (*add<mode>3_carryinV): Ditto.
4683 2018-07-19 Michael Collison <michael.collison@arm.com>
4684 Richard Henderson <rth@redhat.com>
4686 * config/aarch64/aarch64-modes.def (CC_V): New.
4687 * config/aarch64/aarch64-protos.h
4688 (aarch64_addti_scratch_regs): Declare
4689 (aarch64_subvti_scratch_regs): Declare.
4690 (aarch64_expand_subvti): Declare.
4691 (aarch64_gen_unlikely_cbranch): Declare
4692 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4693 for signed overflow using CC_Vmode.
4694 (aarch64_get_condition_code_1): Handle CC_Vmode.
4695 (aarch64_gen_unlikely_cbranch): New function.
4696 (aarch64_addti_scratch_regs): New function.
4697 (aarch64_subvti_scratch_regs): New function.
4698 (aarch64_expand_subvti): New function.
4700 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4702 * config/aarch64/aarch64-option-extensions.def: New entry for profile
4704 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4705 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4708 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4711 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4712 address check not strict.
4714 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4716 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4718 (store_pair_lanes<mode>): Likewise.
4719 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
4720 enum value 'ADDR_QUERY_LDP_STP_N'.
4721 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
4722 (aarch64_print_address_internal): Add declaration.
4723 (aarch64_print_ldpstp_address): Remove.
4724 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
4725 (aarch64_print_operand): Change printing of 'y'.
4726 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
4727 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
4728 'true' rather than '1'.
4729 * config/aarch64/constraints.md (Uml): Likewise.
4730 (Uml): Rename to Umn.
4733 2018-07-19 Richard Biener <rguenther@suse.de>
4735 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
4737 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
4738 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
4739 (vn_reference_hasher): Likewise.
4740 (struct vn_tables_s): Remove obstack and alloc-pool members.
4741 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
4742 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
4743 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
4744 (vn_reference_insert_pieces): Likewise.
4745 (alloc_vn_nary_op_noinit): Adjust.
4746 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4747 (vn_phi_eq): Adjust.
4748 (shared_lookup_phiargs): Remove.
4749 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4750 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4751 (visit_reference_op_call): Likewise.
4752 (copy_nary, copy_phi, copy_reference): Remove.
4753 (process_scc): Rewind the obstack when iterating. Do not
4754 copy the elements to valid_info but just move them from one
4755 hashtable to the other.
4756 (allocate_vn_table): Adjust.
4757 (free_vn_table): Likewise.
4758 (init_scc_vn): Likewise.
4759 (free_scc_vn): Likewise.
4761 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
4764 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4765 indirect_return as function type attribute.
4766 (ix86_attribute_table): Change indirect_return to function
4768 * doc/extend.texi: Update indirect_return attribute.
4770 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
4772 * wide-int.h (widest2_int): New.
4773 * gimple-fold.c (arith_overflowed_p): Use it.
4774 * tree.h (widest2_int_cst): New.
4775 * tree-vrp.c (wide_int_binop_overflow): Rename from
4776 vrp_int_const_binop.
4777 Rewrite to work on trees.
4778 (extract_range_from_multiplicative_op_1): Abstract code to...
4779 (wide_int_range_min_max): ...here.
4780 (wide_int_range_cross_product): ...and here.
4781 (extract_range_from_binary_expr_1): Abstract overflow code to...
4782 (wide_int_range_mult_wrapping): ...here.
4783 * tree-vrp.h (wide_int_range_cross_product): New.
4784 (wide_int_range_mult_wrapping): New.
4786 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
4787 Julia Koval <julia.koval@intel.com>
4789 * config/i386/x86-tune-costs.h (skylake_memcpy,
4790 skylake_memset): Replace rep_prefix with unrolling for size 512.
4792 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
4795 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4796 comparision with EQ_EXPR in last stmt.
4798 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
4800 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4801 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4802 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4803 previously known as "PowerPC AltiVec Built-in Functions". Move
4804 some material to new subsubsections "PowerPC AltiVec Built-in
4805 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4807 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
4808 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
4809 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
4810 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
4812 2018-07-18 Richard Biener <rguenther@suse.de>
4814 PR tree-optimization/86557
4815 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
4818 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
4820 * config/s390/s390.c (s390_function_profiler): Generate CFI.
4822 2018-07-17 Jeff Law <law@redhat.com>
4824 * config/arm/arm.c (get_label_padding): Update for recent
4825 changes to label_to_alignment.
4827 PR tree-optimization/86010
4828 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
4830 * config/mips/mips.c (vr4130_align_insns): Update for recent
4831 changes to label_to_alignment.
4833 * config/frv/frv.c (frv_label_align): Update for recent changes
4834 to label_to_alignment.
4836 * config/nios2/nios2.c (nios2_label_align): Update for recent
4837 changes which dropped ALIGN_LABELS_LOG.
4839 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
4841 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
4842 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
4844 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
4846 * config/arc/arc.c (arc_label_align): Use align_labels instead of
4847 deprecated align_labels_log.
4849 2018-07-17 Richard Biener <rguenther@suse.de>
4852 * dwarf2out.c (init_sections_and_labels): Always generate
4853 a debug_line_str_section for early LTO debug.
4854 (dwarf2out_finish): Reset debug_line_str_hash output early.
4855 Bump counter for extra dwarf5 .debug_loc labels to not conflict
4857 (dwarf2out_early_finish): Output debug_line_str.
4859 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4861 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
4862 index register on z196 or later.
4864 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4866 * config/s390/s390.c (s390_default_align): Set default function
4868 (s390_override_options_after_change): Call s390_default align.
4869 (s390_option_override_internal): Call s390_default_align.
4870 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
4872 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4875 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
4876 to _looptemp_ clauses, other than the first two.
4878 2018-07-17 Martin Liska <mliska@suse.cz>
4880 * opts.c: Do not enable OPT_falign_* for -Os.
4882 2018-07-17 Martin Liska <mliska@suse.cz>
4884 * align.h (MAX_CODE_ALIGN): New.
4885 (MAX_CODE_ALIGN_VALUE): New.
4886 * common/config/i386/i386-common.c (ix86_handle_option):
4887 (MAX_CODE_ALIGN): Moved to align.h.
4888 * final.c (MAX_CODE_ALIGN): Likewise.
4889 * opts.c (parse_and_check_align_values):
4890 (MAX_CODE_ALIGN): Likewise.
4891 (MAX_CODE_ALIGN_VALUE): Likewise.
4893 2018-07-17 Martin Liska <mliska@suse.cz>
4895 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
4896 in order to fulfil coding style.
4897 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4898 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4899 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4900 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
4901 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
4902 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
4903 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
4904 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
4905 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4907 2018-07-17 Martin Liska <mliska@suse.cz>
4909 * align.h: New file.
4910 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
4912 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
4913 align_flags of label_to_alignment.
4914 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
4916 * config/m68k/m68k.c: Do not use removed align_labels_value and
4918 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
4919 (LOOP_ALIGN): Likewise.
4920 (LABEL_ALIGN): Likewise.
4921 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4922 Remove not used macro.
4923 (rs6000_loop_align): Change return type to align_flags.
4924 (rs6000_loop_align_max_skip): Remove.
4925 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
4926 Change return type to align_flags.
4927 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4928 Remove not used macro.
4929 (rs6000_loop_align): Change return type to align_flags.
4930 (rs6000_loop_align_max_skip): Remove.
4931 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
4932 * config/rx/rx-protos.h (rx_align_for_label): Make it
4934 * config/rx/rx.c (rx_align_for_label): Change return type
4936 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
4938 into align_flags class.
4939 (LABEL_ALIGN): Likewise.
4940 (LOOP_ALIGN): Likewise.
4941 * config/s390/s390.c (s390_label_align): Use align_flags
4943 (s390_asm_output_function_label): Likewise.
4944 * config/sh/sh.c (sh_override_options_after_change):
4945 Use align_flags class directly without macros.
4946 (find_barrier): Likewise.
4947 (barrier_align): Likewise.
4948 (sh_loop_align): Likewise.
4949 * config/spu/spu.c (spu_option_override):
4950 Use align_flags_tuple::get_value instead of removed macros.
4951 (spu_sched_init): Likewise.
4952 * config/spu/spu.h (GTY): Likewise.
4953 * config/visium/visium.c (visium_option_override):
4954 Set "8" as default secondary alignment.
4955 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
4956 in order to guarantee secondary alignment of 8.
4957 * coretypes.h: Include align.h header file.
4958 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
4959 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
4960 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
4961 * doc/tm.texi.in: Likewise.
4962 * final.c (struct label_alignment): Remove not used structure.
4963 (LABEL_ALIGN): Change type to align_flags.
4964 (LOOP_ALIGN): Likewise.
4965 (JUMP_ALIGN): Likewise.
4966 (default_loop_align_max_skip): Remove.
4967 (default_label_align_max_skip): Likewise.
4968 (default_jump_align_max_skip): Likewise.
4969 (default_label_align_after_barrier_max_skip):
4970 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
4971 (LABEL_TO_MAX_SKIP): Remove.
4972 (label_to_alignment): Return align_flags type instead of integer.
4973 (label_to_max_skip): Remove.
4974 (align_fuzz): Use align_flags type.
4975 (compute_alignments): Use align_flags type and use align_flags::max
4976 to combine multiple alignments.
4977 (grow_label_align): Grow vec instead of C array.
4978 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
4979 (shorten_branches): Use align_flags type and use align_flags::max
4980 to combine multiple alignments.
4981 (final_scan_insn_1): Remove usage of secondary alignment that comes
4982 from label alignment, but instead use proper secondary alignment
4983 which is computed in grow_label_align.
4984 * flags.h (struct align_flags_tuple): Move to align.h.
4985 (struct align_flags): Likewise.
4986 (state_align_loops): Rename to align_loops.
4987 (state_align_jumps): Rename to align_jumps.
4988 (state_align_labels): Rename to align_labels.
4989 (state_align_functions): Rename to align_functions.
4990 (align_loops_log): Remove.
4991 (align_jumps_log): Remove.
4992 (align_labels_log): Remove.
4993 (align_functions_log): Remove.
4994 (align_loops_max_skip): Remove.
4995 (align_jumps_max_skip): Remove.
4996 (align_labels_max_skip): Remove.
4997 (align_functions_max_skip): Remove.
4998 (align_loops_value): Remove.
4999 (align_jumps_value): Remove.
5000 (align_labels_value): Remove.
5001 (align_functions_value): Remove.
5002 * output.h (label_to_alignment): Change return type to align_flags.
5003 (label_to_max_skip): Remove.
5004 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5005 jump_align_max_skip macros.
5006 * targhooks.h (default_loop_align_max_skip): Remove.
5007 (default_label_align_max_skip): Likewise.
5008 (default_jump_align_max_skip): Likewise.
5009 (default_label_align_after_barrier_max_skip): Remove.
5010 * toplev.c (read_log_maxskip): Use ::normalize function.
5011 (parse_N_M): Remove not used argument and also call ::normalize.
5012 (parse_alignment_opts): Do not pass unused arguments.
5013 * varasm.c (assemble_start_function): Use directly align_functions
5014 instead of removed macros.
5015 * system.h: Do not poison removed macros.
5017 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5020 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5021 and cond temporaries don't have reference type if iterator has
5022 pointer type. For init use &for_pre_body instead of pre_p if
5023 for_pre_body is non-empty.
5025 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5027 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5028 double-double modes to SFmode directly directly.
5029 (trunc<mode>sf2_fprs): Delete.
5031 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5033 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5034 for conversions between IFmode and the decimal floating point modes.
5035 (init_float128_ieee): Use the correct names for conversions between
5036 KFmode and the decimal floating point modes.
5038 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5040 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5041 for the conversions between TDmode and IFmode.
5042 (init_float128_ieee): Use more correct names for the conversions
5043 between TDmode and KFmode.
5045 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5047 PR tree-optimization/86526
5048 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5049 (inline_expand_builtin_string_cmp): Likewise.
5050 (inline_string_cmp): Likewise. Use c_readstr instead of
5051 builtin_memcpy_read_str. Add unit_mode temporary.
5053 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5056 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5057 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5059 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5061 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5062 Alphabetize prototypes of built-in functions, separating out
5063 built-in functions that are listed in this section but should be
5064 described elsewhere.
5066 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5069 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5070 conditional move when trapping comparison was split to a
5071 non-trapping one (and vice versa).
5073 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5075 * config/s390/s390.c (s390_function_profiler): Generate nops
5076 instead of profiler call sequences.
5077 * config/s390/s390.opt: Add the new option.
5079 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5081 * config/s390/s390.c (s390_function_profiler): Generate
5082 __mcount_loc section.
5083 * config/s390/s390.opt: Add the new option.
5085 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5087 * common.opt: Add the new warning.
5088 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5089 %r0,__fentry__" when -mfentry is specified.
5090 (s390_option_override_internal): Disallow -mfentry for 31-bit
5092 * config/s390/s390.opt: Add the new option.
5094 2018-07-16 Richard Biener <rguenther@suse.de>
5097 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5098 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5100 2018-07-16 Martin Liska <mliska@suse.cz>
5103 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5106 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5108 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5110 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5112 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5114 * config/arc/arc-cpus.def (hs4x): New cpu.
5116 * config/arc/arc-tables.opt: Regenerate.
5117 * config/arc/arc.c (arc_sched_issue_rate): New function.
5118 (TARGET_SCHED_ISSUE_RATE): Define.
5119 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5120 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5122 (attr tune): Add ARCHS4x tune values.
5123 (attr tune_dspmpy): Define.
5124 (*tst): Correct instruction type.
5125 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5126 * config/arc/arcHS4x.md: New file.
5127 * config/arc/fpu.md: Update instruction type attributes.
5128 * config/arc/t-multilib: Regenerate.
5130 2018-07-16 Tom de Vries <tdevries@suse.de>
5133 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5135 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5137 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5140 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5142 PR tree-optimization/86514
5143 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5144 conversion to a boolean type from a type with greater precision.
5146 2018-07-16 Tom de Vries <tdevries@suse.de>
5148 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5149 dump_flags request TDF_SLIM.
5151 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5153 * fold-const.c (int_const_binop_1): Abstract...
5154 (wide_int_binop): ...wide int code here.
5155 (poly_int_binop): ...poly int code here.
5156 Abstract the rest of int_const_binop_1 into int_const_binop.
5157 * fold-const.h (wide_int_binop): New.
5158 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5159 Remove useless PLUS/MINUS_EXPR case.
5160 (zero_nonzero_bits_from_vr): Move wide int code...
5161 (zero_nonzero_bits_from_bounds): ...here.
5162 (extract_range_from_binary_expr_1): Move mask optimization code...
5163 (range_easy_mask_min_max): ...here.
5164 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5165 (range_easy_mask_min_max): New.
5167 2018-07-15 Jeff Law <law@redhat.com>
5170 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5173 2018-07-14 Jim Wilson <jimw@sifive.com>
5175 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5177 2018-07-14 Paul Koning <ni1d@arrl.net>
5179 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5181 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5183 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5186 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5187 Steve Munroe <munroesj52@gmail.com>
5189 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5190 (_mm_andnot_si128): Likewise.
5191 (_mm_or_si128): Likewise.
5192 (_mm_xor_si128): Likewise.
5194 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5197 * builtins.c (expand_builtin_memcmp): Inline the calls first
5198 when result_eq is false.
5199 (expand_builtin_strcmp): Inline the calls first.
5200 (expand_builtin_strncmp): Likewise.
5201 (inline_string_cmp): New routine. Expand a string compare
5202 call by using a sequence of char comparison.
5203 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5204 a call to str(n)cmp/memcmp.
5205 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5207 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5209 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5211 * config/arm/driver-arm.c: Include arm-native.h.
5212 (host_detect_local_cpu): Use auto-generated data tables.
5213 (vendors, arm_cpu_table): Delete. Move part information to ...
5214 * config/arm/arm-cpus.in: ... here.
5215 * config/arm/parsecpu.awk (gen_native): New function.
5216 (vendor, part): New CPU fields.
5217 (END): Add support for building the native CPU detection tables.
5218 * config/arm/t-arm (arm-native.h): Add build rule.
5219 (driver-arm.o): Add dependency on arm-native.h.
5221 2018-07-13 Richard Biener <rguenther@suse.de>
5224 * match.pd (addr1 - addr2): Allow either of the operand to
5227 2018-07-13 Tom de Vries <tdevries@suse.de>
5229 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5232 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5234 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5235 arrays instead of numbered variables.
5237 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5239 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5240 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5242 2018-07-13 Richard Biener <rguenther@suse.de>
5245 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5246 instead of get_context_die.
5248 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5249 Richard Biener <rguenther@suse.de>
5252 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5253 that the loop latch destination where phi is defined.
5255 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5257 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5258 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5259 (riscv_set_current_function): Extract getting interrupt type to new
5261 (riscv_get_interrupt_type): New function.
5262 (riscv_merge_decl_attributes): New function, checking interrupt type is
5264 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5266 2018-07-12 Paul Koning <ni1d@arrl.net>
5268 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5271 2018-07-12 Paul Koning <ni1d@arrl.net>
5273 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5274 zero reference, add doloop_end instead.
5275 * doc/md.texi (decrement_and_branch_until_zero): Remove.
5276 (Looping patterns): Remove decrement_and_branch_until_zero. Add
5277 detail for doloop_end.
5279 2018-07-12 Martin Sebor <msebor@redhat.com>
5282 * attribs.c (decl_attributes): Reject conflicting attributes before
5283 calling attribute handlers.
5285 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5287 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5289 (gcc::dump_manager::get_dump_file_name): likewise.
5290 (dump_begin): Likewise.
5291 * dumpfile.h (dump_begin): Update prototype.
5292 (gcc::dump_manager::get_dump_file_name,
5293 gcc::dump_manager::get_dump_file_name): Update prototype.
5295 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5297 * internal-fn.h (vectorizable_internal_fn_p): New function.
5298 * tree-vect-slp.c (compatible_calls_p): Likewise.
5299 (vect_build_slp_tree_1): Remove nops argument. Handle calls
5300 to internal functions.
5301 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5303 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5305 * fold-const.h (inverse_conditions_p): Declare.
5306 * fold-const.c (inverse_conditions_p): New function.
5307 * match.pd: Use inverse_conditions_p. Add folds of view_converts
5308 that test the inverse condition of a conditional internal function.
5309 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5310 * internal-fn.c (internal_fn_mask_index): Handle conditional
5312 (vectorized_internal_fn_supported_p): New function.
5313 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5314 (any_pred_load_store): Replace with...
5315 (need_to_predicate): ...this new variable.
5316 (redundant_ssa_names): New variable.
5317 (ifcvt_can_use_mask_load_store): Move initial checks to...
5318 (ifcvt_can_predicate): ...this new function. Handle tree codes
5319 for which a conditional internal function exists.
5320 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5321 instead of ifcvt_can_use_mask_load_store. Update after variable
5323 (predicate_load_or_store): New function, split out from
5324 predicate_mem_writes.
5325 (check_redundant_cond_expr): New function.
5326 (value_available_p): Likewise.
5327 (predicate_rhs_code): Likewise.
5328 (predicate_mem_writes): Rename to...
5329 (predicate_statements): ...this. Use predicate_load_or_store
5330 and predicate_rhs_code.
5331 (combine_blocks, tree_if_conversion): Update after above name changes.
5332 (ifcvt_local_dce): Handle redundant_ssa_names.
5333 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5334 general conditional functions.
5335 * tree-vect-stmts.c (vectorizable_call): Likewise.
5337 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5338 Alan Hayward <alan.hayward@arm.com>
5339 David Sherwood <david.sherwood@arm.com>
5341 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5342 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5343 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5344 plus and minus and convert them into IFN_COND_FMA-based sequences.
5345 (convert_mult_to_fma): Handle conditional plus and minus.
5347 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5349 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5350 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5351 (cond_fnms_optab): New optabs.
5352 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5354 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5355 * internal-fn.h (get_conditional_internal_fn): Declare.
5356 (get_unconditional_internal_fn): Likewise.
5357 * internal-fn.c (cond_ternary_direct): New macro.
5358 (expand_cond_ternary_optab_fn): Likewise.
5359 (direct_cond_ternary_optab_supported_p): Likewise.
5360 (FOR_EACH_COND_FN_PAIR): Likewise.
5361 (get_conditional_internal_fn): New function.
5362 (get_unconditional_internal_fn): Likewise.
5363 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5364 (gimple_match_op::gimple_match_op): Add a new overload for 5
5366 (gimple_match_op::set_op): Likewise.
5367 (gimple_resimplify5): Declare.
5368 * genmatch.c (decision_tree::gen): Generate simplifications for
5370 * gimple-match-head.c (gimple_simplify): Define an overload for
5371 5 operands. Handle calls with 5 arguments in the top-level overload.
5372 (convert_conditional_op): Handle conversions from unconditional
5373 internal functions to conditional ones.
5374 (gimple_resimplify5): New function.
5375 (build_call_internal): Pass a fifth operand.
5376 (maybe_push_res_to_seq): Likewise.
5377 (try_conditional_simplification): Try converting conditional
5378 internal functions to unconditional internal functions.
5379 Handle 3-operand unconditional forms.
5380 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5381 Define ternary equivalents of the current rules for binary conditional
5383 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5385 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5386 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5387 (optab): Handle them.
5388 (SVE_COND_FP_TERNARY): New int iterator.
5389 (sve_fmla_op, sve_fmad_op): New int attributes.
5390 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5391 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5392 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5394 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5396 * target.def (preferred_else_value): New target hook.
5397 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5398 * doc/tm.texi: Regenerate.
5399 * targhooks.h (default_preferred_else_value): Declare.
5400 * targhooks.c (default_preferred_else_value): New function.
5401 * internal-fn.h (conditional_internal_fn_code): Declare.
5402 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5403 (get_conditional_internal_fn): Use it.
5404 (conditional_internal_fn_code): New function.
5405 * gimple-match.h (gimple_match_cond): New struct.
5406 (gimple_match_op): Add a cond member function.
5407 (gimple_match_op::gimple_match_op): Update all forms to take a
5409 * genmatch.c (expr::gen_transform): Use the same condition as res_op
5410 for the suboperation, but don't specify a particular else_value.
5411 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5412 (visit_nary_op, visit_reference_op_load): Pass
5413 gimple_match_cond::UNCOND to the gimple_match_op constructor.
5414 * gimple-match-head.c: Include tree-eh.h
5415 (convert_conditional_op): New function.
5416 (maybe_resimplify_conditional_op): Likewise.
5417 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5418 (gimple_resimplify2): Likewise.
5419 (gimple_resimplify3): Likewise.
5420 (gimple_resimplify4): Likewise.
5421 (maybe_push_res_to_seq): Return null for conditional operations.
5422 (try_conditional_simplification): New function.
5423 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
5425 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5427 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5429 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5431 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5433 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5435 (hash_tree): Do not hash DECL_FCONTEXT
5436 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5437 Do not stream DECL_FCONTEXT.
5438 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5439 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5441 2018-07-12 Richard Biener <rguenther@suse.de>
5444 * dwarf2out.c (gen_block_die): Only output blocks when they have
5445 at least one !DECL_IGNORED_P variable.
5447 2018-07-12 Richard Biener <rguenther@suse.de>
5450 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5451 Remove -mieee-fp handling.
5453 2018-07-12 Richard Biener <rguenther@suse.de>
5455 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5456 left-over from last patch.
5458 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5460 PR tree-optimization/86492
5461 * gimple-ssa-store-merging.c
5462 (imm_store_chain_info::coalesce_immediate_stores): Call
5463 check_no_overlap even for the merge_overlapping case. Formatting fix.
5465 2018-07-12 Richard Biener <rguenther@suse.de>
5468 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5469 move possibly trapping operations into the conditional.
5471 2018-07-12 Richard Biener <rguenther@suse.de>
5473 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5474 (vn_lookup_simplify_result): Remove recursion limit applied
5476 (vn_nary_build_or_lookup_1): Adjust.
5477 (try_to_simplify): Likewise.
5478 * gimple-match-head.c (gimple_resimplify1): Instead apply one
5480 (gimple_resimplify2): Likewise.
5481 (gimple_resimplify3): Likewise.
5482 (gimple_resimplify4): Likewise.
5484 2018-07-11 Jakub Jelinek <jakub@redhat.com>
5486 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5487 Use __mmask64 type instead of __mmask8 for __M argument.
5488 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5489 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5491 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5492 __mmask16 for __M argument.
5493 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5494 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5495 to __mmask16 instead of __mmask8.
5496 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5497 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5498 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5499 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5500 instead of __mmask16 for __U argument.
5501 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5502 __mmask16 instead of __mmask8 for __U argument.
5503 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5505 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5507 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5509 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5511 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5513 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5515 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5517 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5519 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5521 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5523 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5524 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5525 return type as well as __M argument type and all casts from __mmask8
5527 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5528 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5529 return type as well as __M argument type and all casts from __mmask8
5531 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5532 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5533 return type as well as __M argument type and all casts from __mmask8
5535 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5536 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5537 return type as well as __M argument type and all casts from __mmask8
5539 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5540 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5543 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
5545 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5546 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5549 2018-07-11 Paul Koning <ni1d@arrl.net>
5551 * doc/md.texi (define_subst): Document how multiple occurrences of
5552 the same argument in the replacement pattern are handled.
5554 2018-07-11 Paul Koning <ni1d@arrl.net>
5556 * doc/extend.texi (Common Variable Attributes): Move "mode" into
5558 (Common Type Attributes): Add "mode" attribute.
5560 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
5562 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5563 stream DECL_ORIGINAL_TYPE.
5564 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5565 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5566 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5567 Do not walk original type.
5568 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5570 (write_ts_decl_non_common_tree_pointers): Do not stream
5572 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5573 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5575 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5577 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5578 thread twice from the same starting edge.
5580 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5582 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5583 * gimple.c (gimple_call_nonnull_result_p): ...here...
5584 (gimple_call_nonnull_arg): ...and here.
5585 * gimple.h (gimple_call_nonnull_result_p): New.
5586 (gimple_call_nonnull_arg): New.
5588 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
5590 * config/arm/arm-cpus.in: Move information from fpu field of each
5591 cpu definition to the isa field.
5592 * config/arm/parsecpu.awk (fpu): Delete match rule.
5593 (gen_comm_data): Don't add bits from the CPU's FPU entry.
5595 2018-07-11 Richard Biener <rguenther@suse.de>
5598 * dwarf2out.c (init_sections_and_labels): Use
5599 output_asm_line_debug_info consistently.
5600 (dwarf2out_early_finish): Likewise.
5601 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5604 2018-07-11 Richard Biener <rguenther@suse.de>
5606 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5607 Rework father_bb setting in a way to avoid propagating constants
5608 multiple times on a loop body.
5610 2018-07-10 Mark Wielaard <mark@klomp.org>
5613 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5615 2018-07-10 Richard Biener <rguenther@suse.de>
5617 * hash-map.h (hash_map::iterator::operator*): Return
5618 references to key and value.
5620 2018-07-10 Jakub Jelinek <jakub@redhat.com>
5623 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5624 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5625 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5626 (gimplify_omp_for): For composite loops, move outer
5627 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5628 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
5629 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
5630 TREE_LIST for both the original class iterator and the "last" helper
5631 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
5632 loop, remember has_decl_expr from outer composite loops for the
5633 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5635 2018-07-09 Martin Sebor <msebor@redhat.com>
5639 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5640 accessing implicitly initialized array elements.
5641 * expr.c (string_constant): Handle string initializers of
5642 character arrays within aggregates.
5643 * gimple-fold.c (fold_array_ctor_reference): Add argument.
5644 Store element offset. As a special case, handle zero size.
5645 (fold_nonarray_ctor_reference): Same.
5646 (fold_ctor_reference): Add argument. Store subobject offset.
5647 * gimple-fold.h (fold_ctor_reference): Add argument.
5649 2018-07-09 Paul Koning <ni1d@arrl.net>
5651 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5652 (pdp11_insn_cost): New function.
5653 (pdp11_md_asm_adjust): New function.
5654 (TARGET_INVALID_WITHIN_DOLOOP): Define.
5655 (pdp11_rtx_costs): Update to match machine better.
5656 (output_addr_const_pdp11): Correct format mismatch warnings.
5657 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5658 * config/pdp11/pdp11.md: General change to add base_cost and/or
5659 length attributes for use by new pdp11_insn_cost function.
5660 (MIN_BRANCH): Correct definition.
5662 (doloop_end): Use standard pattern name for looping pattern.
5663 (doloop_end_nocc): New.
5664 (movsf): Add another constraint alternative.
5665 (zero_extendqihi2): Add constraint alternatives for not in place
5667 (zero_extendhisi2): Remove.
5668 (shift patterns): Add CC handling variants.
5672 (define_peephole2): New peephole to recognize mov that sets CC for
5675 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5677 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5678 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5681 2018-07-09 Jakub Jelinek <jakub@redhat.com>
5684 * real.c (real_nextafter): Return true if result is denormal.
5686 2018-07-09 Martin Liska <mliska@suse.cz>
5688 * common.opt: Add back wrongly removed attribute.
5690 2018-07-09 Richard Biener <rguenther@suse.de>
5693 * dwarf2out.c (gen_block_die): For an early generated DIE
5694 always output high/low PC attributes.
5696 2018-07-09 Tom de Vries <tdevries@suse.de>
5698 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5699 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5700 onto VAR_DECL with abstract origin.
5702 2018-07-07 Jim Wilson <jimw@sifive.com>
5704 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5706 2018-07-07 Tom de Vries <tdevries@suse.de>
5708 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5710 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
5712 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5714 (combine_bound): Use wide-int overflow calculation instead of
5716 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5718 * fold-const.c (int_const_binop_2): Same.
5719 (extract_muldiv_1): Same.
5720 (fold_div_compare): Same.
5721 (fold_abs_const): Same.
5723 * poly-int.h (add): Same.
5727 * predict.c (predict_iv_comparison): Same.
5728 * profile-count.c (slow_safe_scale_64bit): Same.
5729 * simplify-rtx.c (simplify_const_binary_operation): Same.
5730 * tree-chrec.c (tree_fold_binomial): Same.
5731 * tree-data-ref.c (split_constant_offset_1): Same.
5732 * tree-if-conv.c (idx_within_array_bound): Same.
5733 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
5734 * tree-ssa-phiopt.c (minmax_replacement): Same.
5735 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
5736 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
5737 * vr-values.c (vr_values::adjust_range_with_scev): Same.
5738 * wide-int.cc (wi::add_large): Same.
5739 (wi::mul_internal): Same.
5740 (wi::sub_large): Same.
5741 (wi::divmod_internal): Same.
5742 * wide-int.h: Change overflow type to overflow_type for neg, add,
5743 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
5744 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
5745 mul_internal, divmod_internal.
5746 (overflow_type): New enum.
5747 (accumulate_overflow): New.
5749 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5751 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5752 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5754 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5756 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5757 argument is checked for zero before entering loop, avoid checking again.
5759 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5761 * gimplify.h (generic_expr_could_trap_p): Set as global function.
5762 * gimplify.h (generic_expr_could_trap_p): Likwise.
5763 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5765 2018-07-06 Jakub Jelinek <jakub@redhat.com>
5767 PR tree-optimization/86401
5768 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5769 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5770 (fold_bit_and_mask): ... here. New helper function for match.pd.
5771 * fold-const.h (fold_bit_and_mask): Declare.
5772 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5774 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
5777 * target.def (translate_mode_attribute): New hook.
5778 * targhooks.h (default_translate_mode_attribute): Declare.
5779 * targhooks.c (default_translate_mode_attribute): New function.
5780 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5781 * doc/tm.texi: Regenerate.
5782 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5783 (rs6000_translate_mode_attribute): New function.
5785 2018-07-06 Paul Koning <ni1d@arrl.net>
5787 * doc/md.texi (define_split): Document DONE and FAIL.
5788 (define_peephole2): Ditto.
5790 2018-07-05 Jeff Law <law@redhat.com>
5792 PR tree-optimization/86010
5793 * tree-ssa-dse.c (compute_trims): More aggressively trim at
5794 both the head and tail of mem* and str* calls.
5796 2018-07-05 Jim Wilson <jimw@sifive.com>
5798 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5800 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
5802 * config/aarch64/aarch64-simd.md: correct flags text for
5803 MIN_EXPR replacement.
5805 2018-07-05 James Clarke <jrtc27@jrtc27.com>
5807 * configure: Regenerated.
5809 2018-07-05 Carl Love <cel@us.ibm.com>
5811 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
5812 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
5813 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
5814 VSX_BUILTIN_DOUBLEL_V4SF.
5816 2018-07-05 Martin Sebor <msebor@redhat.com>
5819 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
5820 than its domain to compute its the upper bound of a char array.
5822 2018-07-05 Nathan Sidwell <nathan@acm.org>
5824 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
5825 * doc/cpp.texi: Update comment.
5826 * doc/tm.texi: Rebuilt.
5827 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
5828 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
5829 * doc/extend.texi (Backwards Compatibility): Clarify it is system
5830 headers affected by extern "C".
5831 * system.h: Poison NO_IMPLICIT_EXTERN_C.
5832 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
5833 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
5834 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
5835 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
5836 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
5837 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
5838 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
5839 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
5840 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
5841 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
5842 config/sparc/sp64-elf.h, config/spu/spu.h,
5843 config/stormy16/stormy16.h, config/v850/v850.h,
5844 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
5845 define NO_IMPLICIT_EXTERN_C.
5846 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
5848 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5851 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5852 instead of GET_MODE_SIZE when comparing Units.
5854 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5857 * rtlanal.c (set_noop_p): Constrain on mode change,
5858 include hard-reg-set.h
5860 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5862 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
5864 2018-07-05 Jakub Jelinek <jakub@redhat.com>
5867 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5870 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5872 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5874 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5877 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5879 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5881 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
5884 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
5886 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
5888 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
5889 neg_*_op* variables.
5891 2018-07-04 Martin Liska <mliska@suse.cz>
5893 * tree-switch-conversion.c: Define
5894 max_ratio_for_speed and max_ratio_for_size constants.
5896 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5897 Martin Liska <mliska@suse.cz>
5902 * common.opt: Rename align options with 'str_' prefix.
5903 * common/config/i386/i386-common.c (set_malign_value): New
5905 (ix86_handle_option): Use it to set -falign-* options/
5906 * config/aarch64/aarch64-protos.h (struct tune_params): Change
5907 type from int to string.
5908 * config/aarch64/aarch64.c: Update default values from int
5910 * config/alpha/alpha.c (alpha_override_options_after_change):
5912 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
5913 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5914 max skip conditionally.
5915 * config/i386/freebsd.h (SUBALIGN_LOG): New.
5916 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5917 max skip conditionally.
5918 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5919 max skip conditionally.
5920 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
5921 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5922 max skip conditionally.
5923 * config/i386/i386.c (struct ptt): Change type from int to
5925 (ix86_default_align): Set default values.
5926 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
5927 max skip conditionally.
5928 * config/i386/iamcu.h (SUBALIGN_LOG): New.
5929 (ASM_OUTPUT_MAX_SKIP_ALIGN):
5930 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
5931 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5932 max skip conditionally.
5933 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
5934 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
5935 * config/i386/x86-64.h (SUBALIGN_LOG): New.
5936 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5937 max skip conditionally.
5938 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5939 * config/ia64/ia64.c (ia64_option_override): Set default values
5940 for alignment options.
5941 * config/m68k/m68k.c: Handle new str_align_* options.
5942 * config/mips/mips.c (mips_set_compression_mode): Change
5944 (mips_option_override): Set default values for options.
5945 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5947 * config/rs6000/rs6000.c (rs6000_option_override_internal):
5949 * config/rx/rx.c (rx_option_override): Likewise.
5950 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
5951 (LABEL_ALIGN): Use align_labels_log.
5952 (LOOP_ALIGN): Use align_loops_align.
5953 * config/s390/s390.c (s390_asm_output_function_label): Use new
5955 * config/sh/sh.c (sh_override_options_after_change):
5956 Change type of constants.
5957 * config/spu/spu.c (spu_sched_init): Likewise.
5958 * config/sparc/sparc.c (sparc_option_override): Set default
5960 * config/visium/visium.c (visium_option_override): Likewise.
5961 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
5962 emit p2align format with last argument if it's not needed.
5963 * doc/invoke.texi: Document extended format of -falign-*.
5964 * final.c: Use align_labels alignment.
5965 * flags.h (struct target_flag_state): Change type to use
5967 (struct align_flags_tuple): New.
5968 (struct align_flags): Likewise.
5969 (align_loops_log): Redefine macro to use new types.
5970 (align_loops_max_skip): Redefine macro to use new types.
5971 (align_jumps_log): Redefine macro to use new types.
5972 (align_jumps_max_skip): Redefine macro to use new types.
5973 (align_labels_log): Redefine macro to use new types.
5974 (align_labels_max_skip): Redefine macro to use new types.
5975 (align_functions_log): Redefine macro to use new types.
5976 (align_loops): Redefine macro to use new types.
5977 (align_jumps): Redefine macro to use new types.
5978 (align_labels): Redefine macro to use new types.
5979 (align_functions): Redefine macro to use new types.
5980 (align_functions_max_skip): Redefine macro to use new types.
5981 (align_loops_value): New macro.
5982 (align_jumps_value): New macro.
5983 (align_labels_value): New macro.
5984 (align_functions_value): New macro.
5985 * function.c (invoke_set_current_function_hook): Propagate
5986 alignment values from flags to global variables default in
5988 * ipa-icf.c (sem_function::equals_wpa): Use
5989 cl_optimization_option_eq instead of memcmp.
5990 * lto-streamer.h (cl_optimization_stream_out): Support streaming
5992 (cl_optimization_stream_in): Likewise.
5993 * optc-save-gen.awk: Support strings in cl_optimization.
5994 * opth-gen.awk: Likewise.
5995 * opts.c (finish_options): Remove error checking of invalid
5997 (MAX_CODE_ALIGN): Remove.
5998 (MAX_CODE_ALIGN_VALUE): Likewise.
5999 (parse_and_check_align_values): New function.
6000 (check_alignment_argument): Likewise.
6001 (common_handle_option): Use check_alignment_argument.
6002 * opts.h (parse_and_check_align_values): Declare.
6003 * toplev.c (init_alignments): Remove.
6004 (read_log_maxskip): New.
6005 (parse_N_M): Likewise.
6006 (parse_alignment_opts): Likewise.
6007 (backend_init_target): Remove usage of init_alignments.
6008 * toplev.h (parse_alignment_opts): Declare.
6009 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6011 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6012 * tree.c (cl_option_hasher::equal): New.
6013 * varasm.c: Use new global macros.
6015 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6017 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6018 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6019 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6020 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6021 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6022 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6023 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6024 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6025 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6026 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6027 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6028 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6029 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6031 2018-07-04 Martin Liska <mliska@suse.cz>
6032 Jonathan Wakely <jwakely@redhat.com>
6034 * coverage.c: Use correct type.
6035 * doc/invoke.texi: Language correction.
6037 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6040 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6041 ENDBRANCH for non-tail call which may return via indirect branch.
6042 * doc/extend.texi: Document indirect_return attribute.
6044 2018-07-03 Martin Sebor <msebor@redhat.com>
6046 PR tree-optimization/86274
6047 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6049 (format_floating): Correct handling of infinities and NaNs.
6051 2018-07-03 Martin Sebor <msebor@redhat.com>
6053 * print-tree.c (print_real_cst): New function.
6054 (print_node_brief): Call it.
6055 (print_node): Ditto.
6057 2018-07-03 Jeff Law <law@redhat.com>
6059 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6060 into a single pattern.
6062 * config/h8300/h8300.md (ors code_iterator): New.
6063 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6064 a single pattern and single splitter.
6065 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6066 (iorqi3_1, xorqi3_1): Likewise.
6067 (iorqi3, xorqi3 expanders): Similarly.
6069 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6070 (movmd_internal) into a single pattern using the P mode iterator.
6071 (movmd splitters): Similarly.
6072 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6073 (movsd splitters): Similarly.
6075 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6076 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6077 right table based on the size of the operand.
6078 * config/h8300/h8300.md (length_table): Corresponding changes. All
6079 references to "addb", "addw" and "addl" changed to "add".
6080 (btst patterns): Merge two variants into a single pattern.
6081 (tstqi, tsthi): Likewise.
6082 (addhi3_incdec, addsi3_incdec): Likewise.
6083 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6084 (mulhi3, mulsi3): Likewise.
6085 (udivhi3, udivsi3): Likewise.
6086 (divhi3, divsi3): Likewise.
6087 (andorqi3, andorhi3, andorsi3): Likewise.
6089 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6092 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6093 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6095 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6097 PR tree-optimization/85694
6098 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6099 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6101 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6102 (<u>avg<mode>3_ceil): New patterns.
6104 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6106 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6107 scan-tree-dump directive.
6108 * gcc.dg/vect/slp-perm-2.c: Likewise.
6109 * gcc.dg/vect/slp-perm-3.c: Likewise.
6110 * gcc.dg/vect/slp-perm-5.c: Likewise.
6111 * gcc.dg/vect/slp-perm-6.c: Likewise.
6112 * gcc.dg/vect/slp-perm-7.c: Likewise.
6113 * gcc.dg/vect/slp-perm-8.c: Likewise.
6115 2018-07-03 Marek Polacek <polacek@redhat.com>
6118 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6120 2018-07-03 Richard Biener <rguenther@suse.de>
6123 * tree-ssa-structalias.c (find_func_clobbers): Properly
6124 handle indirect calls.
6126 2018-07-03 Jeff Law <law@redhat.com>
6128 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6129 (shifts): New code iterator.
6130 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6131 expander. Fix HImode handling on H8/SX.
6132 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6133 (subqi3, subhi3, subsi3 expanders): Likewise.
6134 (andqi3, andhi3, andsi3 expanders): Likewise.
6135 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6136 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6137 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6138 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6139 (zero_extendqihi2, zero_extendqisi2): Likewise.
6140 (extendqihi2, extendqisi2): Likewise.
6141 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6142 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6143 (rotlqi3_1, rotlhi3_1): Likewise.
6144 (logicalhi3_sn, logicalsi3_sn): Likewise.
6145 (logicalhi3, logicalsi3): Likewise.
6147 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6149 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6150 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6151 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6152 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6153 type to append_pattern_def_seq instead of creating a stmt_vec_info
6155 (build_mask_conversion): Likewise. Remove vinfo argument.
6156 (vect_add_conversion_to_patterm): Likewise, renaming to...
6157 (vect_add_conversion_to_pattern): ...this.
6158 (vect_recog_mask_conversion_pattern): Update call to
6159 build_mask_conversion. Pass the vector type to
6160 append_pattern_def_seq here too.
6161 (vect_recog_gather_scatter_pattern): Update call to
6162 vect_add_conversion_to_pattern.
6164 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6166 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6167 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6168 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6169 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6170 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6171 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6172 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6173 append_pattern_def_seq instead of new_pattern_def_seq.
6174 (vect_recog_divmod_pattern): Do both of the above.
6175 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6178 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6180 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6181 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6182 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6183 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6184 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6185 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6186 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6187 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6188 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6189 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6190 parameter with a single stmt_vec_info.
6191 (vect_recog_func_ptr): Likewise.
6192 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6193 (vect_try_gather_scatter_pattern): ...this.
6194 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6195 the stmt_vec_info of the statement to be matched. Don't clear
6196 STMT_VINFO_RELATED_STMT.
6197 (vect_pattern_recog): Update call accordingly.
6199 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6201 PR tree-optimization/85694
6202 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6203 (uavgM3_ceil): Document new optabs.
6204 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6205 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6207 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6208 (savg_ceil_optab): New optabs.
6209 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6210 (vect_vect_recog_func_ptrs): Add it.
6211 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6212 constant directly from the associated lhs.
6214 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6216 * tree-vect-patterns.c (vect_split_statement): New function.
6217 (vect_convert_input): Use it to try to split an existing cast.
6219 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6221 * poly-int.h (print_hex): New function.
6222 * dumpfile.h (dump_dec, dump_hex): Declare.
6223 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6224 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6225 min_input_precision, operation_precision and operation_sign.
6226 * tree-vect-patterns.c (vect_get_range_info): New function.
6227 (vect_same_loop_or_bb_p, vect_single_imm_use)
6228 (vect_operation_fits_smaller_type): Delete.
6229 (vect_look_through_possible_promotion): Add an optional
6230 single_use_p parameter.
6231 (vect_recog_over_widening_pattern): Rewrite to use new
6232 stmt_vec_info infomration. Handle one operation at a time.
6233 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6234 (vect_truncatable_operation_p, vect_set_operation_type)
6235 (vect_set_min_input_precision): New functions.
6236 (vect_determine_min_output_precision_1): Likewise.
6237 (vect_determine_min_output_precision): Likewise.
6238 (vect_determine_precisions_from_range): Likewise.
6239 (vect_determine_precisions_from_users): Likewise.
6240 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6241 (vect_vect_recog_func_ptrs): Put over_widening first.
6243 (vect_pattern_recog): Call vect_determine_precisions.
6245 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6247 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6248 statements that have been replaced by further pattern statements.
6249 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6251 2018-07-03 Richard Biener <rguenther@suse.de>
6253 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6254 always set *dt. Dump vectype in vectype overload.
6255 * dumpfile.h (dump_gimple_expr): New function.
6256 (dump_gimple_expr_loc): Likewise.
6257 * dumpfile.c (dump_gimple_expr): New function.
6258 (dump_gimple_expr_loc): Likewise.
6260 2018-07-02 Jeff Law <law@redhat.com>
6262 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6263 the H8/300, H8/300H and H8/S variants into a single pattern.
6264 (movhi_h8300, movqi_h8300hs): Similarly.
6265 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6266 (QHI mode iterator): New.
6268 * config/h8300/h8300.md: Remove trailing whitespace.
6270 2018-07-02 Jim Wilson <jimw@sifive.com>
6272 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6273 instead of emit_insn for interrupt returns.
6274 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6275 (riscv_sret, riscv_uret): Likewise.
6277 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6279 * pretty-print.c (selftest::test_pp_format): Move save and restore
6280 of quotes to class auto_fix_quotes, and add an instance.
6281 * selftest.c: Include "intl.h".
6282 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6283 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6284 * selftest.h (selftest::auto_fix_quotes): New class.
6286 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
6288 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6289 (aarch64_sve_prepare_conditional_op): Remove.
6290 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6291 Allow aarch64_simd_reg_or_zero as select operand; remove
6292 the aarch64_sve_prepare_conditional_op call.
6293 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6294 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6295 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6296 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6297 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6298 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6299 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6300 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6301 and a splitters to match all of the *_any patterns.
6302 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6304 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6305 (SVE_COND_FP_BINARY_REV): Remove.
6306 (sve_int_op_rev, sve_fp_op_rev): New.
6307 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6308 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6309 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6310 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6311 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6312 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6313 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6314 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6315 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6317 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6318 Remove match_dup 1 from the inner unspec.
6319 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6321 * config/aarch64/aarch64.md (movprfx): New attr.
6322 (length): Default movprfx to 8.
6323 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6324 (*madd<SVE_I>, *msub<SVE_I): Likewise.
6325 (*<su>mul<SVE_I>3_highpart): Likewise.
6326 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6327 (*v<ASHIFT><SVE_I>3): Likewise.
6328 (*<su><MAXMIN><SVE_I>3): Likewise.
6329 (*<su><MAXMIN><SVE_F>3): Likewise.
6330 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6331 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6332 (*div<SVE_F>4): Likewise.
6334 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
6336 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6339 2018-07-02 Richard Biener <rguenther@suse.de>
6341 PR tree-optimization/86363
6342 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6343 memset argument refers to a non-variable address.
6345 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6347 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6348 {PLUS,MINUS}_EXPR code to...
6349 (adjust_symbolic_bound): ...here,
6350 (combine_bound): ...here,
6351 (set_value_range_with_overflow): ...and here.
6353 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6355 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6357 (extract_range_from_abs_expr): ...here.
6359 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
6361 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6362 -fno-omit-frame-pointer when not optimizing.
6364 2018-07-02 Martin Liska <mliska@suse.cz>
6367 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6368 (propagate_nothrow): Likewise.
6370 2018-07-02 Martin Liska <mliska@suse.cz>
6373 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6375 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6377 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6378 function in r262149, changing "loc" param from source_location to
6379 const dump_location_t &.
6380 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6381 declaration, as above.
6383 2018-07-01 Paul Koning <ni1d@arrl.net>
6385 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6386 -munit-asm, -mgnu-asm, -mdec-asm.
6387 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6388 (pdp11_output_labelref): New.
6389 (pdp11_output_def): New.
6390 (pdp11_output_addr_vec_elt): New.
6391 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
6392 %# and %@ format codes.
6393 (pdp11_option_override): New.
6394 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6395 (pdp11_output_ident): New.
6396 (pdp11_asm_named_section): New.
6397 (pdp11_asm_init_sections): New.
6398 (pdp11_file_start): New.
6399 (pdp11_file_end): New.
6400 (output_ascii): Use .ascii/.asciz for -mdec-asm.
6401 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
6402 %o, like %c but octal.
6403 (pdp11_option_override): New.
6404 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6406 (DATA_SECTION_ASM_OP): Ditto.
6407 (READONLY_DATA_SECTION_ASM_OP): New.
6408 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6409 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6410 (ASM_OUTPUT_LABELREF): Ditto.
6411 (ASM_OUTPUT_DEF): Ditto.
6412 (ASM_OUTPUT_EXTERNAL): New.
6413 (ASM_OUTPUT_SOURCE_FILENAME): New.
6414 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6415 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6416 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
6417 %# and %@ format codes.
6418 * config/pdp11/pdp11.opt (mgnu-asm): New.
6419 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6420 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6421 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6423 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
6425 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6426 dereferencing path[] beyond its length.
6428 (debug_all_paths): New.
6429 (rewire_first_differing_edge): New.
6430 (adjust_paths_after_duplication): New.
6431 (duplicate_thread_path): Call adjust_paths_after_duplication.
6433 (thread_through_all_blocks): Add new argument to
6434 duplicate_thread_path.
6436 2018-06-30 Jim Wilson <jimw@sifive.com>
6438 * config/riscv/predicates.md (p2m1_shift_operand): New.
6439 (high_mask_shift_operand): New.
6440 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6441 pattern using p2m1_shift_operand.
6442 (lshsi3_zero_extend_3+2): New combiner pattern using
6443 high_mask_shift_operand.
6445 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6447 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6449 (vect_recog_rotate_pattern): ...here.
6450 (vect_convert_input): Try to insert casts of invariants in the
6452 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6453 preheader to be empty.
6455 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6457 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6458 vector type. If given, install it in the new statement's
6460 (vect_element_precision): New function.
6461 (vect_unpromoted_value): New struct.
6462 (vect_unpromoted_value::vect_unpromoted_value): New function.
6463 (vect_unpromoted_value::set_op): Likewise.
6464 (vect_look_through_possible_promotion): Likewise.
6465 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6466 (vect_widened_op_tree, vect_convert_input): Likewise.
6467 (vect_convert_inputs, vect_convert_output): Likewise.
6468 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6469 to handle the optional cast of the multiplication result and
6470 vect_widened_op_tree to detect the widened multiplication itself.
6471 Do not require the input and output of promotion casts to have
6472 the same sign, but base the signedness of the operation on the
6473 input rather than the result. If the pattern includes two
6474 promotions, check that those promotions have the same sign.
6475 Do not restrict the MULT_EXPR handling to a double-width result;
6476 handle quadruple-width results and wider. Use vect_convert_inputs
6477 to convert the inputs to the common type.
6478 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
6479 to handle the optional cast of the ABS result. Also allow a sign
6480 change or a sign extension between the ABS and MINUS.
6481 Use vect_widened_op_tree to detect the widened subtraction and use
6482 vect_convert_inputs to convert the inputs to the common type.
6483 (vect_handle_widen_op_by_const): Delete.
6484 (vect_recog_widen_op_pattern): New function.
6485 (vect_recog_widen_mult_pattern): Use it.
6486 (vect_recog_widen_shift_pattern): Likewise.
6487 (vect_recog_widen_sum_pattern): Use
6488 vect_look_through_possible_promotion to handle the promoted
6491 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6493 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6494 the containing gimple_seq *.
6495 * gimple-iterator.h (gsi_for_stmt): Declare it.
6496 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6497 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6498 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6499 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6500 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6502 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6504 (vect_mark_pattern_stmts): ...here. Handle cases in which the
6505 statement being replaced is part of an existing pattern
6506 definition sequence, inserting the new pattern statements before
6508 (vect_pattern_recog_1): Don't return a bool. If the statement
6509 is already part of a pattern, instead apply pattern matching
6510 to the pattern definition statements. Don't clear the
6511 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6512 (vect_pattern_recog): Don't break after the first match;
6513 continue processing the pattern definition statements instead.
6514 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6516 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6518 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6519 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6520 (vect_recog_widen_sum_pattern): Use it.
6522 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6524 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6525 phi is not a pattern statement and has not been replaced by
6526 a pattern statement.
6527 * tree-vect-patterns.c (type_conversion_p): Don't check
6528 STMT_VINFO_IN_PATTERN_P.
6529 (vect_recog_vector_vector_shift_pattern): Likewise.
6530 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6531 the pattern statement rather than the original statement; check
6532 directly for a WIDEN_MULT_EXPR here.
6533 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6534 vect_is_simple_use to return the pattern statement rather
6535 than the original statement; use is_pattern_stmt_p to check
6536 for such a pattern statement.
6537 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6538 to return the pattern statement rather than the original statement;
6539 don't do the same transformation here.
6540 (vect_is_simple_use): If the defining statement has been replaced
6541 by a pattern statement, return the pattern statement instead.
6542 Remove the corresponding (local) transformation from the vectype
6545 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6547 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6548 end and default to null.
6549 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6550 (vectorizable_reduction): Update calls accordingly, dropping the
6551 gimple ** argument if the passed-back statement isn't needed.
6552 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6553 (vect_recog_rotate_pattern): Likewise.
6554 (vect_recog_mask_conversion_pattern): Likewise.
6555 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6556 (vect_mask_constant_operand_p): Likewise.
6557 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6558 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6559 (get_group_load_store_type, get_load_store_type): Likewise.
6560 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6561 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6562 (vectorizable_conversion, vectorizable_assignment): Likewise.
6563 (vectorizable_shift, vectorizable_operation): Likewise.
6564 (vectorizable_store, vect_is_simple_cond): Likewise.
6565 (vectorizable_condition, vectorizable_comparison): Likewise.
6566 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6567 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6568 and move it to the end. Cope with null def_stmt_outs.
6570 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6572 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6574 2018-06-29 Jeff Law <law@redhat.com>
6576 * config/v850/v850.c (v850_legitimate_address_p): Handle large
6577 displacements for TARGET_V850E2V3 and newer.
6578 (TARGET_LRA_P): Remove. Defaults to LRA now.
6579 * config/v850/v850.md (sign23byte_load): Remove.
6580 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6581 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6583 2018-06-29 Martin Liska <mliska@suse.cz>
6586 * coverage.c (coverage_init): Mangle full path name.
6587 * doc/invoke.texi: Document the change.
6588 * gcov-io.c (mangle_path): New.
6589 * gcov-io.h (mangle_path): Likewise.
6590 * gcov.c (mangle_name): Use mangle_path for path mangling.
6592 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6594 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6595 if starting source register is not even.
6597 2018-06-29 Martin Liska <mliska@suse.cz>
6599 PR tree-optimization/86263
6600 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6601 Make edge redirection.
6603 2018-06-29 David Malcolm <dmalcolm@redhat.com>
6605 * dumpfile.c (dump_loc): Add indentation based on scope depth.
6606 (dump_scope_depth): New variable.
6607 (get_dump_scope_depth): New function.
6608 (dump_begin_scope): New function.
6609 (dump_end_scope): New function.
6610 * dumpfile.h (get_dump_scope_depth): New declaration.
6611 (dump_begin_scope): New declaration.
6612 (dump_end_scope): New declaration.
6613 (class auto_dump_scope): New class.
6614 (AUTO_DUMP_SCOPE): New macro.
6615 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6618 2018-06-29 Richard Biener <rguenther@suse.de>
6620 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6621 compute_all_dependences succeeds.
6622 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6623 exceed --param loop-max-datarefs-for-datadeps.
6625 2018-06-29 Jakub Jelinek <jakub@redhat.com>
6627 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6629 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
6632 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6633 alternative 0 in preferred_for_speed attribute.
6635 2018-06-28 Paul Koning <ni1d@arrl.net>
6637 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6638 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6639 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6640 * config/pdp11/pdp11.md: Correct "length" attribute calculation
6641 for shift insn patterns.
6643 2018-06-28 David Malcolm <dmalcolm@redhat.com>
6645 * cgraph.c (cgraph_node::get_body): Replace assignments to
6646 "dump_file" with calls to set_dump_file.
6647 * dumpfile.c (alt_dump_file): Make static, and group with...
6648 (alt_flags): ...this definition.
6649 (dumps_are_enabled): New variable.
6650 (refresh_dumps_are_enabled): New function.
6651 (set_dump_file): New function.
6652 (set_alt_dump_file): New function.
6653 (gcc::dump_manager::dump_start): Replace assignments to
6654 "dump_file" and "alt_dump_file" with calls to set_dump_file and
6656 (gcc::dump_manager::dump_finish): Likewise.
6657 * dumpfile.h (alt_dump_file): Delete decl.
6658 (dumps_are_enabled): New variable decl.
6659 (set_dump_file): New function decl.
6660 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6662 * tree-nested.c (lower_nested_functions): Replace assignments to
6663 "dump_file" with calls to set_dump_file.
6665 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6667 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6668 goto_locus of each outgoing edge of each basic block.
6670 2018-06-28 Richard Biener <rguenther@suse.de>
6672 * dwarf2out.c (decl_scope_table): Remove.
6673 (push_decl_scope): Likewise.
6674 (pop_decl_scope): Likewise.
6675 (gen_type_die_for_member): Do not call push/pop_decl_scope.
6676 (gen_struct_or_union_type_die): Likewise.
6677 (gen_tagged_type_die): Likewise.
6678 (dwarf2out_init): Do not initialize decl_scope_table.
6679 (dwarf2out_c_finalize): Do not free it.
6681 2018-06-28 Richard Biener <rguenther@suse.de>
6683 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6684 deciding whether to not re-use a DIE.
6686 2018-06-28 Richard Biener <rguenther@suse.de>
6688 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6689 DW_AT_abstract_origin attribute.
6691 2018-06-28 Martin Liska <mliska@suse.cz>
6693 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6694 Use newly introduced constants.
6695 * tree-switch-conversion.h (struct jump_table_cluster):
6696 Define max_ratio_for_size and max_ratio_for_speed.
6698 2018-06-28 Martin Liska <mliska@suse.cz>
6700 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6701 Add new checking assert to catch invalid state.
6702 (jump_table_cluster::can_be_handled): Handle single case
6704 (jump_table_cluster::is_beneficial): Bail out for such case.
6705 (bit_test_cluster::find_bit_tests):
6706 Add new checking assert to catch invalid state.
6707 (bit_test_cluster::can_be_handled): Handle single case
6709 (bit_test_cluster::is_beneficial): Bail out for such case.
6710 (switch_decision_tree::analyze_switch_statement):
6713 2018-06-28 Martin Liska <mliska@suse.cz>
6715 * common.opt: Introduce -completion option.
6716 * gcc.c (driver_handle_option): Handle it.
6717 (driver::main): Print completions if completion
6719 * opt-suggestions.c (option_proposer::get_completions):
6721 (option_proposer::suggest_completion): Likewise.
6722 (option_proposer::find_param_completions): Likewise.
6723 (verify_autocompletions): Likewise.
6724 (test_completion_valid_options): Likewise.
6725 (test_completion_valid_params): Likewise.
6726 (in_completion_p): Likewise.
6727 (empty_completion_p): Likewise.
6728 (test_completion_partial_match): Likewise.
6729 (test_completion_garbage): Likewise.
6730 (opt_proposer_c_tests): Likewise.
6731 * opt-suggestions.h: Declare new functions.
6732 * opts.c (common_handle_option): Handle OPT__completion_.
6733 * selftest-run-tests.c (selftest::run_tests): Add
6734 opt_proposer_c_tests.
6735 * selftest.c (assert_str_startswith): New.
6736 * selftest.h (assert_str_startswith): Likewise.
6737 (opt_proposer_c_tests): New.
6738 (ASSERT_STR_STARTSWITH): Likewise.
6740 2018-06-28 Martin Liska <mliska@suse.cz>
6742 * Makefile.in: Add opt-suggestions.o.
6743 * gcc-main.c: Include opt-suggestions.h.
6744 * gcc.c (driver::driver): Likewise.
6745 (driver::~driver): Remove m_option_suggestions.
6746 (driver::build_option_suggestions): Moved to option_proposer.
6747 (driver::suggest_option): Likewise.
6748 (driver::handle_unrecognized_options): Use option_proposer.
6749 * gcc.h (class driver): Add new memver m_option_proposer.
6750 * opt-suggestions.c: New file.
6751 * opt-suggestions.h: New file.
6753 2018-06-28 Martin Liska <mliska@suse.cz>
6755 * vec.h (class auto_string_vec): New (moved from auto_argvec).
6756 (auto_string_vec::~auto_string_vec): Likewise.
6758 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6760 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6761 prevent_decl_creation_for_types fields up and add reset_location field.
6762 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6763 statement if id->reset_location is true.
6764 (copy_edges_for_bb): Do not set goto_locus on the new edges if
6765 id->reset_location is true.
6766 (copy_phis_for_bb): Force input_location on the arguments if
6767 id->reset_location is true.
6768 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6769 is set on the function to be inlined.
6771 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
6773 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6775 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
6777 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6778 registers for Pmode.
6779 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6780 hard registers for the clobbered pseudo.
6782 2018-06-27 Paul Koning <ni1d@arrl.net>
6784 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6785 mutually exclusive options.
6786 * config/pdp11/constraints.md (h): New constraint.
6787 (O): Update definition to match shift code generation.
6788 (D): New constraint.
6789 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6791 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6793 (output_jump): Change arguments.
6794 (pdp11_fixed_cc_regs): New function.
6795 (pdp11_cc_mode): Ditto.
6796 (pdp11_expand_shift): Ditto.
6797 (pdp11_assemble_shift): Ditto.
6798 (pdp11_small_shift): Ditto.
6799 (pdp11_branch_cost): Remove.
6800 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6802 (pdp11_register_move_cost): Update for CC registers.
6803 (pdp11_rtx_costs): Add case for LSHIFTRT.
6804 (pdp11_output_jump): Add CCNZ mode conditional branches.
6805 (notice_update_cc_on_set): Remove.
6806 (pdp11_cc_mode): New function.
6807 (simple_memory_operand): Correct pre/post decrement case.
6808 (no_side_effect_operand): New function.
6809 (pdp11_regno_reg_class): Add CC_REGS class.
6810 (pdp11_fixed_cc_regs): New function.
6811 (pdp11_small_shift): New function.
6812 (pdp11_expand_shift): New function to expand shift insns.
6813 (pdp11_assemble_shift): New function to output shifts.
6814 (pdp11_branch_cost): Remove.
6815 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
6816 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
6817 (WCHAR_TYPE): Ditto.
6818 (PTRDIFF_TYPE): Ditto.
6819 (ADJUST_INSN_LENGTH): New macro.
6820 (FIXED_REGISTERS): Add CC registers.
6821 (CALL_USED_REGISTERS): Ditto.
6823 (REG_CLASS_NAMES): Ditto.
6824 (REG_CLASS_CONTENTS): Ditto.
6825 (SELECT_CC_MODE): Use new function.
6826 (TARGET_FLAGS_REGNUM): New macro.
6827 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
6828 (cc0_reg_rtx): Remove.
6829 (CC_STATUS_MDEP): Remove.
6830 (CC_STATUS_MDEFP_INIT): Remove.
6831 (CC_IN_FPU): Remove.
6832 (NOTICE_UPDATE_CC): Remove.
6833 (REGISTER_NAMES): Add CC registers.
6834 (BRANCH_COST): Change to constant 1.
6835 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
6837 * config/pdp11/pdp11.opt (mbcopy): Remove.
6838 (mbcopy-builtin): Remove.
6839 (mbranch-cheap): Remove.
6840 (mbranch-expensive): Remove.
6841 * config/pdp11/predicates.md (expand_shift_operand): Update to
6842 match shift code generation.
6843 (ccnz_operator): New predicate.
6844 * doc/invoke.texi (PDP-11 Options): Remove deleted options
6845 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
6846 Remove non-existent option -mabshi, -mno-abshi. Document mutually
6848 * doc/md.texi (PDP-11): Document new D and h constraints. Update
6849 description of O constraint.
6851 2018-06-27 Jeff Law <law@redhat.com>
6852 Austin Law <austinklaw@gmail.com>
6854 * config/v850/v850.md (addsi3_set_flags): New pattern.
6855 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
6856 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
6857 (zero_extendhisi2_v850_set_flags): Likewise.
6858 (zero_extendqisi2_v850_set_flags): Likewise.
6859 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
6860 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
6861 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
6863 * config/v850/v850-protos.h (notice_update_cc): Remove.
6864 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
6865 (v850_print_operand): Handle 'D' and "d".
6866 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
6867 Add handling of arithmetic/logical operations compared against zero.
6868 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
6869 Do not look at v850_compare_op, instead get mode from last argument.
6870 (v850_gen_compare): Remove
6871 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
6872 after reload for prologue insns.
6873 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
6875 (construct_save_jarl): Likewise.
6876 (TARGET_FLAGS_REGNUM): Define.
6877 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
6878 (NOTICE_UPDATE_CC): Remove.
6879 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
6880 than cc0. Conditionalize on reload_completed.
6881 (cmpsi_insn, setfcc_insn): Likewise.
6882 (tst1 splitter): Turn into define_and_split which sets the flags
6884 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
6885 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
6886 (cstoresf4, cstoredf4): Clobber the flags.
6887 (cmpsi, cmpsf, cmpdf): Remove expanders.
6888 (setf_insn): Remove pattern.
6889 (addsi3): Turn into define_and_split which clobbers the flags after
6890 reload and a suitable pattern (addsi3_clobber_flags) for use after
6892 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
6893 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
6894 (ashrsi3, ashrsi3_v850e2): Likewise.
6895 (bins): Clobber the flags.
6896 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6897 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6898 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6899 (call_value_internal_short, call_value_internal_long): Likewise.
6900 (callt_save_interrupt, callt_return_interrupt): Likewise.
6901 (save_interrupt, return_interrupt): Likewise.
6902 (callt_save_all_interrupt, save_all_interrupt): Likewise.
6903 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
6904 (restore_all_interrupt, _restore_all_interrupt): Likewise.
6905 (All FP comparisons): Only allow after reload has completed.
6907 (divh, divhu): Tweak output template.
6908 (branch_z_normal, branch_z_invert): Remove
6909 (branch_nz_normal, branch_nz_invert): Likewise.
6910 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
6912 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
6913 * config/v850/v850.c (notice_update_cc): Remove.
6914 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
6915 (CC_NO_CARRY): Likewise.
6916 (NOTICE_UPDATE_CC): Define to nothing.
6917 * config/v850/v850.md: Remove block comment on cc0 handling
6918 Remove "cc" attribute from all patterns. Remove cc_status handling
6919 from all patterns. Minor formatting fixes.
6921 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6923 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
6924 (cortex-a76.cortex-a55): Likewise.
6925 * config/aarch64/aarch64-tune.md: Regenerate.
6926 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
6927 cortex-a76.cortex-a55.
6929 2018-06-27 Jeff Law <law@redhat.com>
6931 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
6932 (MULTILIB_DIRNAMES): Similarly.
6934 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
6936 * gimple.h (gimple_return_retbnd): Delete.
6937 (gimple_return_set_retbnd): Likewise.
6938 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
6939 gimple_return_set_retbnd.
6940 * gimple-pretty-print.c (dump_gimple_return): Remove call to
6941 gimple_return_retbnd and adjust.
6942 * tree-inline.h (struct copy_body_data): Remove retbnd field.
6943 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
6944 Explicitly return NULL in a couple more cases. Move assertion
6945 on debug statements and remove unreachable code.
6946 (reset_debug_binding): Do not test id->retbnd.
6947 (expand_call_inline): Do not set it.
6949 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6951 * configure.ac: Add --disable-gcov option.
6952 * configure: Regenerate.
6953 * Makefile.in: Honour @enable_gcov@.
6954 * doc/install.texi: Document --disable-gcov.
6956 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6958 * config/arm/arm-cpus.in (cortex-a76): New entry.
6959 (cortex-a76.cortex-a55): Likewise.
6960 * config/arm/arm-tables.opt: Regenerate.
6961 * config/arm/arm-tune.md: Likewise.
6962 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
6963 * doc/invoke.texi (ARM Options): Document cortex-a76 and
6964 cortex-a76.cortex-a55.
6966 2018-06-27 Tamar Christina <tamar.christina@arm.com>
6969 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
6971 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
6973 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
6975 (EPILOGUE_USES): Likewise.
6977 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
6979 * tree-inline.c (remap_location): New function extracted from...
6980 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
6981 (copy_phis_for_bb): ...here. Call remap_location.
6982 (copy_cfg_body): Adjust call to copy_edges_for_bb.
6984 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
6986 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
6987 unaligned vsx for 16B memset.
6989 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
6992 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
6993 ieee128_float_type_node to long_double_type_node unless
6994 TARGET_LONG_DOUBLE_128 is set.
6996 2018-06-26 David Malcolm <dmalcolm@redhat.com>
6998 * cfgloop.c (get_loop_location): Convert return type from
6999 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7000 by implicit construction from rtx_insn *, and using
7001 dump_user_location_t::from_function_decl for the fallback case.
7002 * cfgloop.h (get_loop_location): Convert return type from
7003 location_t to dump_user_location_t.
7004 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7005 dump_printf_loc to pass in a dump_location_t rather than a
7006 location_t, via the gimple stmt.
7007 * coverage.c (get_coverage_counts): Update calls to
7008 dump_printf_loc to pass in dump_location_t rather than a
7010 * doc/optinfo.texi (Dump types): Convert example of
7011 dump_printf_loc from taking "locus" to taking "insn". Update
7012 description of the "_loc" calls to cover dump_location_t.
7013 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7015 (dump_user_location_t::dump_user_location_t): New constructors,
7016 from gimple *stmt and rtx_insn *.
7017 (dump_user_location_t::from_function_decl): New function.
7018 (dump_loc): Make static.
7019 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7020 const dump_location_t &.
7021 (dump_generic_expr_loc): Delete.
7022 (dump_printf_loc): Convert param "loc" from location_t to
7023 const dump_location_t &.
7024 (selftest::test_impl_location): New function.
7025 (selftest::dumpfile_c_tests): New function.
7026 * dumpfile.h: Include "profile-count.h".
7027 (class dump_user_location_t): New class.
7028 (struct dump_impl_location_t): New struct.
7029 (class dump_location_t): New class.
7030 (dump_printf_loc): Convert 2nd param from source_location to
7031 const dump_location_t &.
7032 (dump_generic_expr_loc): Delete.
7033 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7034 const dump_location_t &.
7035 * gimple-fold.c (fold_gimple_assign): Update call to
7036 dump_printf_loc to pass in a dump_location_t rather than a
7037 location_t, via the gimple stmt.
7038 (gimple_fold_call): Likewise.
7039 * gimple-loop-interchange.cc
7040 (loop_cand::analyze_iloop_reduction_var): Update for change to
7041 check_reduction_path.
7042 (tree_loop_interchange::interchange): Update for change to
7044 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7045 change in return-type of find_loop_location.
7046 (graphite_regenerate_ast_isl): Likewise.
7047 * graphite-optimize-isl.c (optimize_isl): Likewise.
7048 * graphite.c (graphite_transform_loops): Likewise.
7049 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7050 pass in a dump_location_t rather than a location_t, via the
7052 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7053 * ipa.c (walk_polymorphic_call_targets): Likewise.
7054 * loop-unroll.c (report_unroll): Convert "locus" param from
7055 location_t to dump_location_t.
7056 (decide_unrolling): Update for change to get_loop_location's
7058 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7059 location_t to dump_user_location_t.
7060 (grid_find_single_omp_among_assignments_1): Updates calls to
7061 dump_printf_loc to pass in a dump_location_t rather than a
7062 location_t, via the gimple stmt.
7063 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7064 location_t to dump_location_t. Updates calls to dump_printf_loc
7065 to pass in a dump_location_t rather than a location_t, via the
7067 (grid_inner_loop_gridifiable_p): Likewise.
7068 (grid_dist_follows_simple_pattern): Likewise.
7069 (grid_gfor_follows_tiling_pattern): Likewise.
7070 (grid_target_follows_gridifiable_pattern): Likewise.
7071 (grid_attempt_target_gridification): Convert initialization
7072 of local "grid" from memset to zero-initialization; FIXME: does
7073 this require C++11? Update call to dump_printf_loc to pass in a
7074 optinfo_location rather than a location_t, via the gimple stmt.
7075 * profile.c (read_profile_edge_counts): Updates call to
7076 dump_printf_loc to pass in a dump_location_t rather than a
7078 (compute_branch_probabilities): Likewise.
7079 * selftest-run-tests.c (selftest::run_tests): Call
7081 * selftest.h (dumpfile_c_tests): New decl.
7082 * tree-loop-distribution.c (pass_loop_distribution::execute):
7083 Update for change in return type of find_loop_location.
7084 * tree-parloops.c (parallelize_loops): Likewise.
7085 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7086 "locus" from location_t to dump_user_location_t.
7087 (canonicalize_loop_induction_variables): Likewise.
7088 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7089 for change in return type of find_loop_location.
7090 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7091 to dump_printf_loc to pass in a dump_location_t rather than a
7092 location_t, via the stmt.
7093 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7095 * tree-vect-loop-manip.c (find_loop_location): Convert return
7096 type from source_location to dump_user_location_t.
7097 (vect_do_peeling): Update for above change.
7098 (vect_loop_versioning): Update for change in type of
7100 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7101 from location_t to dump_user_location_t.
7102 (vect_estimate_min_profitable_iters): Update for change in type
7104 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7105 location_t to dump_location_t.
7106 (vect_slp_bb): Update for change in type of vect_location.
7107 * tree-vectorizer.c (vect_location): Convert from source_location
7108 to dump_user_location_t.
7109 (try_vectorize_loop_1): Update for change in vect_location's type.
7110 (vectorize_loops): Likewise.
7111 (increase_alignment): Likewise.
7112 * tree-vectorizer.h (vect_location): Convert from source_location
7113 to dump_user_location_t.
7114 (find_loop_location): Convert return type from source_location to
7115 dump_user_location_t.
7116 (check_reduction_path): Convert 1st param from location_t to
7117 dump_user_location_t.
7118 * value-prof.c (check_counter): Update call to dump_printf_loc to
7119 pass in a dump_user_location_t rather than a location_t; update
7120 call to error_at for change in type of "locus".
7121 (check_ic_target): Update call to dump_printf_loc to
7122 pass in a dump_user_location_t rather than a location_t, via the
7125 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7127 * config/s390/s390.h (enum processor_flags): Do not use
7128 default tune parameter when -march was specified.
7130 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7133 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7134 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7137 2018-06-26 Richard Biener <rguenther@suse.de>
7139 PR tree-optimization/86287
7141 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7142 (vect_analyze_loop): Initialize n_stmts.
7144 2018-06-26 Richard Biener <rguenther@suse.de>
7147 * fold-const.c (fold_convertible_p): Pointer extension
7150 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7153 * dwarf2out.c (loc_list_has_views): Adjust comments.
7154 (dw_loc_list): Split single cross-partition range with
7157 2018-06-25 Jeff Law <law@redhat.com>
7159 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7160 on -mbig-switch by default.
7162 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7164 (const_float_0_operand): Remove unused predicate.
7165 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7166 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7167 (recipsf2): New expander. Original pattern now called
7169 (recipdf2, recipdf2_insn): Similarly.
7170 (rsqrtsf2, rsqrtsf2_insn): Similarly
7171 (rsqrtdf2, rsqrtdf2_insn): Similarly
7173 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7175 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7176 Simplify logic for FreeBSD (twice).
7178 2018-06-25 Martin Sebor <msebor@redhat.com>
7180 PR tree-optimization/86204
7181 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7182 a strnlen result if it's less than the length of the string.
7184 2018-06-25 Martin Sebor <msebor@redhat.com>
7186 PR tree-optimization/85700
7187 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7188 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7189 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7191 2018-06-25 Martin Sebor <msebor@redhat.com>
7193 * doc/extend.texi (Zero-length arrays): Update and clarify.
7195 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7197 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7198 added IEEE/IBM long double multilib support on PowerPC little
7199 endian Linux systems.
7200 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7201 (MULTILIB_DEFAULTS): Likewise.
7202 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7204 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7205 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7206 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7208 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7211 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7212 (REORDER_45): Likewise.
7214 2018-06-25 Jeff Law <law@redhat.com>
7216 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7217 dividend to 32 bits. Adjust length.
7218 (udivmodhi4): Cleanup output template. Fix length.
7220 2018-06-25 Carl Love <cel@us.ibm.com>
7222 * config/rs6000/vsx.md: Change word selector to prefered location.
7224 2018-06-25 Richard Biener <rguenther@suse.de>
7226 PR tree-optimization/86304
7227 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7228 epilogue-if-converted loops as well.
7230 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7232 * lto-section-out.c (lto_begin_section): Do not print section
7233 name for noaddr and unnumbered dumps.
7235 2018-06-25 Richard Biener <rguenther@suse.de>
7237 * tree-vectorizer.h (struct vec_info_shared): New structure
7238 with parts split out from struct vec_info and loop_nest from
7239 struct _loop_vec_info.
7240 (struct vec_info): Adjust accordingly.
7241 (struct _loop_vec_info): Likewise.
7242 (LOOP_VINFO_LOOP_NEST): Adjust.
7243 (LOOP_VINFO_DATAREFS): Likewise.
7244 (LOOP_VINFO_DDRS): Likewise.
7245 (struct _bb_vec_info): Likewise.
7246 (BB_VINFO_DATAREFS): Likewise.
7247 (BB_VINFO_DDRS): Likewise.
7248 (struct _stmt_vec_info): Add dr_aux member.
7249 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7250 (DR_MISALIGNMENT_UNINITIALIZED): New.
7251 (set_dr_misalignment): Adjust.
7252 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7253 (vect_analyze_loop): Adjust prototype.
7254 (vect_analyze_loop_form): Likewise.
7255 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7256 Compute dependences lazily.
7257 (vect_record_base_alignments): Use shared datarefs/ddrs.
7258 (vect_verify_datarefs_alignment): Likewise.
7259 (vect_analyze_data_refs_alignment): Likewise.
7260 (vect_analyze_data_ref_accesses): Likewise.
7261 (vect_analyze_data_refs): Likewise.
7262 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7263 constructor parameter for shared part.
7264 (vect_analyze_loop_form): Pass in shared part and adjust.
7265 (vect_analyze_loop_2): Pass in storage for the number of
7266 stmts. Move loop nest finding to the caller. Compute
7268 (vect_analyze_loop): Pass in shared part.
7269 (vect_transform_loop): Verify shared datarefs are unchanged.
7270 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7271 constructor parameter for shared part.
7272 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7273 (vect_slp_bb): Verify shared datarefs are unchanged before
7275 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7277 (new_stmt_vec_info): Initialize DR_AUX misalignment to
7278 DR_MISALIGNMENT_UNINITIALIZED.
7279 * tree-vectorizer.c (vec_info::vec_info): Add constructor
7280 parameter for shared part.
7281 (vec_info::~vec_info): Adjust.
7282 (vec_info_shared::vec_info_shared): New.
7283 (vec_info_shared::~vec_info_shared): Likewise.
7284 (vec_info_shared::save_datarefs): Likewise.
7285 (vec_info_shared::check_datarefs): Likewise.
7286 (try_vectorize_loop_1): Construct shared part live for analyses
7287 of a single loop for multiple vector sizes.
7288 * tree-parloops.c (gather_scalar_reductions): Adjust.
7290 2018-06-25 Richard Biener <rguenther@suse.de>
7292 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7293 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7294 (vect_analyze_data_refs): Remove similar code from here and
7295 simplify accordingly.
7297 2018-06-25 Richard Biener <rguenther@suse.de>
7299 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7300 for reverse storage order accesses rather than asserting
7301 they cannot happen here.
7303 2018-06-25 Tom de Vries <tdevries@suse.de>
7306 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7307 Use data16 instead of .byte for insn prefix.
7309 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
7312 * parser.c (make_char_string_pack): Pass this literal chars
7313 through cpp_interpret_string.
7314 (cp_parser_userdef_numeric_literal): Check the result of
7315 make_char_string_pack.
7317 2018-06-24 Maya Rashish <coypu@sdf.org>
7319 * ginclude/stddef.h: Simplify conditions around avoiding
7320 re-definition of __size_t.
7322 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7324 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7325 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7327 2018-06-22 Maya Rashish <coypu@sdf.org>
7329 * doc/invoke.texi (mno-fancy-math-387): Update for changes
7330 made to OpenBSD and NetBSD through the years.
7332 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7334 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7335 behavior of vec_pack (vector double, vector double) to match
7336 behavior of vec_float2 (vector double, vector double).
7338 2018-06-22 Olivier Hainque <hainque@adacore.com>
7340 * gimplify.c (gimplify_function_tree): Prevent creation
7341 of a trampoline for the address of the current function
7342 passed to entry/exit instrumentation hooks.
7344 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
7347 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7350 2018-06-22 Martin Liska <mliska@suse.cz>
7352 PR tree-optimization/86263
7353 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7354 Bail out if is_enabled is false.
7355 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7357 (jump_table_cluster::is_enabled): New function.
7359 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7361 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7362 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7363 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7364 (lto_input_ts_binfo_tree_pointers): Likewise.
7365 * tree-streamer-out.c (streamer_write_tree_bitfields,
7366 write_ts_binfo_tree_pointers): Likewise.
7367 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7369 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7371 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7373 2018-06-22 Martin Liska <mliska@suse.cz>
7375 * symbol-summary.h (get): Make it pure and inline move
7376 functionality from ::get function.
7377 (get): Remove and inline into ::get and ::get_create.
7378 (get_create): Move code from ::get function.
7380 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7383 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7384 -x assembler-with-cpp.
7386 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7388 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7389 _FILE_OFFSET_BITS=64 for C++.
7391 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
7393 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7394 conversion insn that shows up when pr85657-3.c is compiled using
7395 IEEE 128-bit long double.
7396 (neg<mode>2_internal): Use the correct mode to check whether the
7397 mode is IBM extended.
7398 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7399 multiply and divide external functions from being created more
7402 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7404 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7406 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
7407 the edge can be forwarded.
7408 (cfg_layout_merge_blocks): Likewise.
7410 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7412 * except.c (finish_eh_generation): Commit edge insertions only after
7413 the EH edges have been redirected from post-landing to landing pads.
7415 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7417 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7418 create_tmp_var_for to create the FRAME decl.
7419 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7421 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7423 * tree-inline.c (copy_edges_for_bb): Minor tweak.
7424 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7425 debug statement when resetting its value.
7426 (expand_call_inline): Copy the locus of the call onto the assignment
7427 of the return value, if any. Use local variable in more cases.
7429 2018-06-21 Martin Liska <mliska@suse.cz>
7431 * ipa-pure-const.c (propagate_nothrow): Use
7432 funct_state_summaries->get.
7433 (dump_malloc_lattice): Likewise.
7434 (propagate_malloc): Likewise.
7436 2018-06-21 Richard Biener <rguenther@suse.de>
7438 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7439 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7440 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7442 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7443 BLOCK_ABSTRACT_ORIGIN unconditionally.
7445 2018-06-21 David Malcolm <dmalcolm@redhat.com>
7447 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7449 * ipa-reference.c (ipa_reference_c_finalize): Delete
7450 ipa_ref_opt_sum_summaries and set it to NULL.
7452 2018-06-21 Tom de Vries <tdevries@suse.de>
7454 PR tree-optimization/85859
7455 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7456 test with comment from bb_no_side_effects_p.
7458 2018-06-21 Richard Biener <rguenther@suse.de>
7460 PR tree-optimization/86232
7461 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7462 max for constant niter.
7464 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7466 * config/aarch64/aarch64-simd.md
7467 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7469 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7471 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7472 Make opernads of the unspec commutative.
7474 2018-06-21 Richard Biener <rguenther@suse.de>
7476 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7477 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7478 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7479 (vect_analyze_data_ref_dependence): Re-order checks to deal with
7481 (vect_record_base_alignments): Do not record base alignment
7482 for gathers or scatters.
7483 (vect_compute_data_ref_alignment): Drop return value that is always
7484 true. Bail out early for gathers or scatters.
7485 (vect_enhance_data_refs_alignment): Bail out early for gathers
7487 (vect_find_same_alignment_drs): Likewise.
7488 (vect_analyze_data_refs_alignment): Remove dead code.
7489 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7490 (vect_analyze_data_refs): For possible gathers or scatters do
7491 not create an alternate DR, just check their possible validity
7492 and mark them. Adjust DECL_NONALIASED handling to not rely
7494 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7495 update inits of gathers or scatters.
7496 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7497 Also copy gather/scatter flag to pattern vinfo.
7499 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
7501 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7502 behavior of vec_packsu (vector unsigned long long, vector unsigned
7503 long long) to match behavior of vec_packs with same signature.
7505 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
7506 Thomas Schwinge <thomas@codesourcery.com>
7507 Cesar Philippidis <cesar@codesourcery.com>
7509 * gimplify.c (gimplify_scan_omp_clauses): Add support for
7510 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7511 (gimplify_adjust_omp_clauses): Likewise.
7512 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7513 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7514 (gimplify_omp_target_update): Update handling of acc update and
7516 * omp-low.c (install_var_field): Remove unused parameter
7517 base_pointers_restrict.
7518 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7519 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7521 (omp_target_base_pointers_restrict_p): Delete.
7522 (scan_omp_target): Update call to scan_sharing_clauses.
7523 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7525 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7526 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7527 (convert_local_omp_clauses): Likewise.
7528 * tree-pretty-print.c (dump_omp_clause): Likewise.
7529 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
7531 (omp_clause_code_name): Likewise.
7533 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7536 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7539 PR tree-optimization/86231
7540 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
7541 anti-range don't overwrite *vr0min before using it to compute *vr0max.
7543 2018-06-20 Tom de Vries <tdevries@suse.de>
7545 PR tree-optimization/86097
7546 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7547 iv type if signedness of iv type is not the same as that of *nit.
7549 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7551 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
7552 EDGE_EH edges, verify they are all EDGE_EH.
7554 2018-06-20 Maya Rashish <coypu@sdf.org>
7556 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7558 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7560 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7561 * config/aarch64/aarch64.c (xgene1_tunings): Add
7562 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7563 (aarch64_mode_valid_for_sched_fusion_p):
7564 Allow 16-byte modes.
7565 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7566 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7568 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7570 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7571 * config/aarch64/iterators.md (VQ2): New mode iterator.
7573 2018-06-20 Martin Liska <mliska@suse.cz>
7575 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7576 Change default ratio from 10 to 8.
7578 2018-06-20 Martin Liska <mliska@suse.cz>
7580 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7582 (bit_test_cluster::find_bit_tests): Likewise.
7583 (switch_decision_tree::analyze_switch_statement): Find clusters.
7584 * tree-switch-conversion.h (struct jump_table_cluster): Document
7587 2018-06-20 Martin Liska <mliska@suse.cz>
7589 * tree-switch-conversion.c (switch_conversion::collect):
7590 Record m_uniq property.
7591 (switch_conversion::expand): Bail out for special conditions.
7592 (group_cluster::~group_cluster): New.
7593 (group_cluster::group_cluster): Likewise.
7594 (group_cluster::dump): Likewise.
7595 (jump_table_cluster::emit): New.
7596 (switch_decision_tree::fix_phi_operands_for_edges): New.
7597 (struct case_node): Remove struct.
7598 (jump_table_cluster::can_be_handled): New.
7599 (case_values_threshold): Moved to header.
7600 (reset_out_edges_aux): Likewise.
7601 (jump_table_cluster::is_beneficial): New.
7602 (bit_test_cluster::can_be_handled): Likewise.
7603 (add_case_node): Remove.
7604 (bit_test_cluster::is_beneficial): New.
7605 (case_bit_test::cmp): New.
7606 (bit_test_cluster::emit): New.
7607 (expand_switch_as_decision_tree_p): Remove.
7608 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7609 (fix_phi_operands_for_edge): Likewise.
7610 (switch_decision_tree::analyze_switch_statement): New.
7611 (compute_cases_per_edge): Move ...
7612 (switch_decision_tree::compute_cases_per_edge): ... here.
7613 (try_switch_expansion): Likewise.
7614 (switch_decision_tree::try_switch_expansion): Likewise.
7615 (record_phi_operand_mapping): Likewise.
7616 (switch_decision_tree::record_phi_operand_mapping): Likewise.
7617 (emit_case_decision_tree): Likewise.
7618 (switch_decision_tree::emit): Likewise.
7619 (balance_case_nodes): Likewise.
7620 (switch_decision_tree::balance_case_nodes): Likewise.
7621 (dump_case_nodes): Likewise.
7622 (switch_decision_tree::dump_case_nodes): Likewise.
7623 (emit_jump): Likewise.
7624 (switch_decision_tree::emit_jump): Likewise.
7625 (emit_cmp_and_jump_insns): Likewise.
7626 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7627 (emit_case_nodes): Likewise.
7628 (switch_decision_tree::emit_case_nodes): Likewise.
7629 (conditional_probability): Remove.
7630 * tree-switch-conversion.h (enum cluster_type): New.
7632 (struct cluster): Likewise.
7633 (cluster::cluster): Likewise.
7634 (struct simple_cluster): Likewise.
7635 (simple_cluster::simple_cluster): Likewise.
7636 (struct group_cluster): Likewise.
7637 (struct jump_table_cluster): Likewise.
7638 (struct bit_test_cluster): Likewise.
7639 (struct min_cluster_item): Likewise.
7640 (struct case_tree_node): Likewise.
7641 (case_tree_node::case_tree_node): Likewise.
7642 (jump_table_cluster::case_values_threshold): Likewise.
7643 (struct case_bit_test): Likewise.
7644 (struct switch_decision_tree): Likewise.
7645 (struct switch_conversion): Likewise.
7646 (switch_decision_tree::reset_out_edges_aux): Likewise.
7648 2018-06-20 Martin Liska <mliska@suse.cz>
7650 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7651 (hoist_edge_and_branch_if_true): Likewise.
7652 (expand_switch_using_bit_tests_p): Likewise.
7653 (struct case_bit_test): Likewise.
7654 (case_bit_test_cmp): Likewise.
7655 (emit_case_bit_tests): Likewise.
7656 (switch_conversion::switch_conversion): New class.
7657 (struct switch_conv_info): Remove old struct.
7658 (collect_switch_conv_info): More to ...
7659 (switch_conversion::collect): ... this.
7660 (check_range): Likewise.
7661 (switch_conversion::check_range): Likewise.
7662 (check_all_empty_except_final): Likewise.
7663 (switch_conversion::check_all_empty_except_final): Likewise.
7664 (check_final_bb): Likewise.
7665 (switch_conversion::check_final_bb): Likewise.
7666 (create_temp_arrays): Likewise.
7667 (switch_conversion::create_temp_arrays): Likewise.
7668 (free_temp_arrays): Likewise.
7669 (gather_default_values): Likewise.
7670 (switch_conversion::gather_default_values): Likewise.
7671 (build_constructors): Likewise.
7672 (switch_conversion::build_constructors): Likewise.
7673 (constructor_contains_same_values_p): Likewise.
7674 (switch_conversion::contains_same_values_p): Likewise.
7675 (array_value_type): Likewise.
7676 (switch_conversion::array_value_type): Likewise.
7677 (build_one_array): Likewise.
7678 (switch_conversion::build_one_array): Likewise.
7679 (build_arrays): Likewise.
7680 (switch_conversion::build_arrays): Likewise.
7681 (gen_def_assigns): Likewise.
7682 (switch_conversion::gen_def_assigns): Likewise.
7683 (prune_bbs): Likewise.
7684 (switch_conversion::prune_bbs): Likewise.
7685 (fix_phi_nodes): Likewise.
7686 (switch_conversion::fix_phi_nodes): Likewise.
7687 (gen_inbound_check): Likewise.
7688 (switch_conversion::gen_inbound_check): Likewise.
7689 (process_switch): Use the newly created class.
7690 (switch_conversion::expand): New.
7691 (switch_conversion::~switch_conversion): New.
7692 * tree-switch-conversion.h: New file.
7694 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7696 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7697 tree-vect-patterns.c.
7698 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7699 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
7700 (vect_recog_sad_pattern): Likewise.
7701 (vect_recog_widen_sum_pattern): Likewise.
7702 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
7703 (vect_recog_widen_shift_pattern): Remove the type_in argument.
7704 (vect_recog_rotate_pattern): Likewise.
7705 (vect_recog_mult_pattern): Likewise.
7706 (vect_recog_vector_vector_shift_pattern): Likewise.
7707 (vect_recog_divmod_pattern): Likewise.
7708 (vect_recog_mixed_size_cond_pattern): Likewise.
7709 (vect_recog_bool_pattern): Likewise.
7710 (vect_recog_mask_conversion_pattern): Likewise.
7711 (vect_try_gather_scatter_pattern): Likewise.
7712 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
7713 (vect_recog_over_widening_pattern): Likewise.
7714 (vect_recog_gather_scatter_pattern): Likewise.
7715 (vect_recog_func_ptr): Move from tree-vectorizer.h
7716 (vect_vect_recog_func_ptrs): Move further down the file.
7717 (vect_recog_func): Likewise. Remove the third argument.
7718 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7719 (vect_pattern_recog_1): Expect the pattern function to do any
7720 necessary target tests. Also expect it to provide a vector type.
7721 Remove the type_in handling.
7723 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7725 * tree-vect-patterns.c (vect_pattern_detected): New function.
7726 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
7727 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
7728 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
7729 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
7730 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7731 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7732 (vect_recog_mask_conversion_pattern)
7733 (vect_try_gather_scatter_pattern): Likewise.
7735 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7737 * tree-vect-patterns.c (vect_get_internal_def): New function.
7738 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7739 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
7740 (search_type_for_mask_1): Use it.
7742 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7744 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7745 redundant WIDEN_SUM_EXPR handling.
7746 (vect_recog_sad_pattern): Likewise.
7748 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7750 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7751 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7752 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7753 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7754 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7756 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7758 * tree-vect-stmts.c (vectorizable_call): Make sure that we
7759 use the stmt_vec_info of the original bb statement for the
7760 new zero assignment, even if the call is part of a pattern.
7762 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7764 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7765 that the sequence is attached to the original statement rather
7766 than the pattern statement.
7767 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7768 PATTERN_DEF_SEQ from the original statement rather than
7769 the main pattern statement.
7770 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7771 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7772 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7774 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7776 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7777 definition statements before the early exit for statements that aren't
7779 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7781 (vect_transform_loop): ...here. Process pattern definition
7782 statements without first checking whether the main pattern
7783 statement is live or relevant.
7785 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7787 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7788 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7790 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
7792 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7793 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7794 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7795 (expand_block_compare): Change select_block_compare_mode call.
7796 (expand_strncmp_align_check): Use new functions, fix comment.
7797 (emit_final_str_compare_gpr): New function.
7798 (expand_strn_compare): Refactor and clean up code.
7799 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7801 2018-06-19 Tony Reix <tony.reix@atos.com>
7802 Damien Bergamini <damien.bergamini@atos.com>
7803 David Edelsohn <dje.gcc@gmail.com>
7805 * collect2.c (static_obj): New variable.
7806 (static_libs): New variable.
7807 (is_in_list): Uncomment declaration.
7808 (main): Track AIX libraries linked statically.
7809 (is_in_list): Uncomment definition.
7810 (scan_prog_file): Don't add AIX shared libraries initializer
7811 to constructor list if linking statically.
7813 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
7815 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
7817 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
7819 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
7821 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
7824 2018-06-19 Martin Liska <mliska@suse.cz>
7826 * config/i386/i386.c (ix86_can_inline_p): Do not use
7827 ipa_fn_summaries::get_create.
7828 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
7830 (devirtualization_time_bonus): Likewise.
7831 (ipcp_propagate_stage): Likewise.
7832 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7833 (edge_set_predicate): Likewise.
7834 (evaluate_conditions_for_known_args): Likewise.
7835 (evaluate_properties_for_edge): Likewise.
7836 (ipa_call_summary::reset): Tranform to ...
7837 (ipa_call_summary::~ipa_call_summary): ... this.
7838 (ipa_fn_summary::reset): Transform to ...
7839 (ipa_fn_summary::~ipa_fn_summary): ... this.
7840 (ipa_fn_summary_t::remove): Rename to ...
7841 (ipa_fn_summary_t::remove_callees): ... this.
7842 (ipa_fn_summary_t::duplicate): Use placement new
7843 instead of memory copy.
7844 (ipa_call_summary_t::duplicate): Likewise.
7845 (ipa_call_summary_t::remove): Remove.
7846 (dump_ipa_call_summary): Change get_create to get.
7847 (ipa_dump_fn_summary): Dump only when summary exists.
7848 (analyze_function_body): Use symbol_summary::get instead
7850 (compute_fn_summary): Likewise.
7851 (estimate_edge_devirt_benefit): Likewise.
7852 (estimate_edge_size_and_time): Likewise.
7853 (inline_update_callee_summaries): Likewise.
7854 (remap_edge_change_prob): Likewise.
7855 (remap_edge_summaries): Likewise.
7856 (ipa_merge_fn_summary_after_inlining): Likewise.
7857 (write_ipa_call_summary): Likewise.
7858 (ipa_fn_summary_write): Likewise.
7859 (ipa_free_fn_summary): Likewise.
7860 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
7861 (struct ipa_call_summary): Likewise.
7862 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
7864 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
7865 (estimate_size_after_inlining): Likewise.
7866 (estimate_growth): Likewise.
7867 (growth_likely_positive): Likewise.
7868 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7869 (inline_call): Likewise.
7870 * ipa-inline.c (caller_growth_limits): Likewise.
7871 (can_inline_edge_p): Likewise.
7872 (can_inline_edge_by_limits_p): Likewise.
7873 (compute_uninlined_call_time): Likewise.
7874 (compute_inlined_call_time): Likewise.
7875 (want_inline_small_function_p): Likewise.
7876 (edge_badness): Likewise.
7877 (update_caller_keys): Likewise.
7878 (update_callee_keys): Likewise.
7879 (inline_small_functions): Likewise.
7880 (inline_to_all_callers_1): Likewise.
7881 (dump_overall_stats): Likewise.
7882 (early_inline_small_functions): Likewise.
7883 (early_inliner): Likewise.
7884 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7885 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7886 * ipa-pure-const.c (malloc_candidate_p): Likewise.
7887 * ipa-split.c (execute_split_functions): Likewise.
7888 * symbol-summary.h: Likewise.
7889 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7891 2018-06-19 Richard Biener <rguenther@suse.de>
7893 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
7894 (vectorize_loops): ... here. Fix dbgcnt handling.
7895 (try_vectorize_loop): Wrap try_vectorize_loop_1.
7897 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
7900 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
7901 ieee128 argument takes up only one (vector) register, not two (floating
7904 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7906 * gimplify.c (gimplify_init_constructor): Really never clear for an
7907 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
7909 2018-06-19 Richard Biener <rguenther@suse.de>
7911 PR tree-optimization/86179
7912 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
7913 after failed recognition.
7915 2018-06-18 Martin Sebor <msebor@redhat.com>
7918 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
7919 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
7920 Handle integer subtraction.
7921 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
7922 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
7924 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7926 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
7927 param from rtx to rtx_insn *.
7928 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
7930 (frv_ifcvt_modify_insn): Likwise.
7931 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
7932 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
7933 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
7934 as_a <rtx_insn *> cast to local "unprotected_region" once
7935 it's been established that it's not NULL or pc_rtx.
7936 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
7937 param "sethi" from rtx to rtx_insn *.
7938 (nds32_group_float_insns): Likewise for param "insn".
7939 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
7941 (vax_output_int_subtract): Likewise.
7942 * config/vax/vax.c (vax_output_int_add): Likewise for param
7944 (vax_output_int_subtract): Likewise.
7945 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
7946 (emit_pattern_after): Likewise for param "after".
7947 (emit_insn_after): Likewise.
7948 (emit_jump_insn_after): Likewise.
7949 (emit_call_insn_after): Likewise.
7950 (emit_debug_insn_after): Likewise.
7951 (emit_pattern_before): Likewise for param "before".
7952 (emit_insn_before): Likewise.
7953 (emit_jump_insn_before): Likewise.
7954 * final.c (get_insn_template): Likewise for param "insn", removing
7956 * output.h (get_insn_template): Likewise for 2nd param.
7957 * rtl.h (emit_insn_before): Likewise.
7958 (emit_jump_insn_before): Likewise.
7959 (emit_debug_insn_before_noloc): Likewise.
7960 (emit_insn_after): Likewise.
7961 (emit_jump_insn_after): Likewise.
7962 (emit_call_insn_after): Likewise.
7963 (emit_debug_insn_after): Likewise.
7964 (set_insn_deleted): Likewise for param.
7966 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
7969 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
7970 floating point modes, so that IFmode is numerically greater than
7971 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
7972 to declare the ordering. This prevents IFmode from being
7973 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
7974 machine. Include rs6000-modes.h to share the fractional values
7975 between genmodes* and the rest of the compiler.
7979 * config/rs6000/rs6000-modes.h: New file.
7980 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
7981 meaning of rs6000_long_double_size so that 126..128 selects an
7982 appropriate 128-bit floating point type.
7983 (rs6000_option_override_internal): Likewise.
7984 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
7985 (TARGET_LONG_DOUBLE_128): Change the meaning of
7986 rs6000_long_double_size so that 126..128 selects an appropriate
7987 128-bit floating point type.
7988 (LONG_DOUBLE_TYPE_SIZE): Update comment.
7989 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
7990 source and destination to match the standard usage.
7991 (truncifkf2): Likewise.
7992 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
7993 ISA 2.07 to use an explicit clobber, instead of passing in a
7995 (copysign<mode>3_soft): Likewise.
7997 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7999 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8000 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8001 (vect_slp_analyze_instance_dependence): Likewise.
8002 (vect_enhance_data_refs_alignment): Likewise.
8003 (vect_analyze_data_refs_alignment): Likewise.
8004 (vect_slp_analyze_and_verify_instance_alignment
8005 (vect_analyze_data_ref_accesses): Likewise.
8006 (vect_prune_runtime_alias_test_list): Likewise.
8007 (vect_analyze_data_refs): Likewise.
8008 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8009 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8010 (vect_analyze_scalar_cycles_1): Likewise.
8011 (vect_get_loop_niters): Likewise.
8012 (vect_analyze_loop_form_1): Likewise.
8013 (vect_update_vf_for_slp): Likewise.
8014 (vect_analyze_loop_operations): Likewise.
8015 (vect_analyze_loop): Likewise.
8016 (vectorizable_induction): Likewise.
8017 (vect_transform_loop): Likewise.
8018 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8019 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8020 (vect_make_slp_decision): Likewise.
8021 (vect_detect_hybrid_slp): Likewise.
8022 (vect_slp_analyze_operations): Likewise.
8023 (vect_slp_bb): Likewise.
8024 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8025 (vectorizable_bswap): Likewise.
8026 (vectorizable_call): Likewise.
8027 (vectorizable_simd_clone_call): Likewise.
8028 (vectorizable_conversion): Likewise.
8029 (vectorizable_assignment): Likewise.
8030 (vectorizable_shift): Likewise.
8031 (vectorizable_operation): Likewise.
8032 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8034 2018-06-18 Martin Sebor <msebor@redhat.com>
8036 PR tree-optimization/81384
8037 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8038 * builtins.c (expand_builtin_strnlen): New function.
8039 (expand_builtin): Call it.
8040 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8041 * builtins.def (BUILT_IN_STRNLEN): New.
8042 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8043 Warn for bounds in excess of maximum object size.
8044 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8045 single-value ranges. Handle strnlen.
8046 (handle_builtin_strlen): Handle strnlen.
8047 (strlen_check_and_optimize_stmt): Same.
8048 * doc/extend.texi (Other Builtins): Document strnlen.
8050 2018-06-18 Maya Rashish <coypu@sdf.org>
8052 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8053 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8054 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8056 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8058 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8060 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8062 * tree.c (escaped_string::escape): Replace cast to char * by
8063 const_cast<char *> (unescaped).
8065 2018-06-18 Nick Clifton <nickc@redhat.com>
8068 * tree.c (escaped_string): New class. Converts an unescaped
8069 string into its escaped equivalent.
8070 (warn_deprecated_use): Use the new class to convert the
8071 deprecation message, if present.
8072 (test_escaped_strings): New self test.
8073 (test_c_tests): Add test_escaped_strings.
8074 * doc/extend.texi (deprecated): Add a note that the
8075 deprecation message is affected by the -fmessage-length
8076 option, and that control characters will be escaped.
8077 (#pragma GCC error): Document this pragma.
8078 (#pragma GCC warning): Likewise.
8079 * doc/invoke.texi (-fmessage-length): Document this option's
8080 effect on the #warning and #error preprocessor directives and
8081 the deprecated attribute.
8083 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8085 * tree.c (decl_value_expr_lookup): Revert latest change.
8086 (decl_value_expr_insert): Likewise.
8088 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8090 * gimplify.c (nonlocal_vlas): Delete.
8091 (nonlocal_vla_vars): Likewise.
8092 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8094 (gimplify_body): Do not create and destroy nonlocal_vlas.
8095 * tree-nested.c: Include diagnostic.h.
8096 (use_pointer_in_frame): Tweak.
8097 (lookup_field_for_decl): Add assertion and declare the transformation.
8098 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8099 internal error when the reference is in a wrong context. Do not
8100 create a debug decl by default.
8101 (note_nonlocal_block_vlas): Delete.
8102 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8103 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8104 create a debug decl by default.
8105 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8106 call is in a wrong context.
8107 (fixup_vla_decls): New function.
8108 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8109 debug variables were created.
8110 * tree.c (decl_value_expr_lookup): Add checking assertion.
8111 (decl_value_expr_insert): Likewise.
8113 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8116 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8117 * tree-scalar-evolution.c (interpret_expr): Likewise.
8118 (expression_expensive_p): Likewise.
8119 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8120 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8121 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8122 (ssa_defined_by_minus_one_stmt_p): New.
8124 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8127 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8128 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8129 * dojump.c (do_jump): Likewise.
8130 * expr.c (expand_expr_real_2): Check operand type's sign.
8131 * fold-const.c (const_unop): Handle ABSU_EXPR.
8132 (fold_abs_const): Likewise.
8133 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8134 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8135 (strip_sign_op_1): Likesise.
8136 * match.pd: Add new pattern to generate ABSU_EXPR.
8137 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8138 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8139 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8140 * tree-inline.c (estimate_operator_cost): Likewise.
8141 * tree-pretty-print.c (dump_generic_node): Likewise.
8142 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8143 * tree.def (ABSU_EXPR): New.
8145 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8148 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8149 documented as preserved for backward compatibility only.
8150 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8152 PR rtl-optimization/86108
8153 * bb-reorder.c (create_forwarder_block): Renamed to ...
8154 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8155 jump from new landing pad to the second part.
8156 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8159 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8162 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8163 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8164 Only call store_expr for halves if the mode is the same.
8167 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8168 Fix up comment formatting.
8170 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8172 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8173 (typed_splay_tree::closure,
8174 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8175 (typed_splay_tree::typed_splay_tree,
8176 typed_splay_tree::operator =): Declared private.
8177 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8178 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8179 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8180 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8181 typed_splay_tree::splay_tree_splay,
8182 typed_splay_tree::splay_tree_foreach_helper,
8183 typed_splay_tree::splay_tree_insert,
8184 typed_splay_tree::splay_tree_remove,
8185 typed_splay_tree::splay_tree_lookup,
8186 typed_splay_tree::splay_tree_predecessor,
8187 typed_splay_tree::splay_tree_successor,
8188 typed_splay_tree::splay_tree_min,
8189 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8190 (typed_splay_tree::root, typed_splay_tree::comp,
8191 typed_splay_tree::delete_key,
8192 typed_splay_tree::delete_value): New data members.
8193 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8194 typed_splay_tree::remove.
8196 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8198 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8199 -mginv and -mno-ginv to the assembler.
8200 * config/mips/mips.opt (-mcrc): New option.
8202 * doc/invoke.text (-mcrc): Document.
8205 2018-06-15 Nick Clifton <nickc@redhat.com>
8208 * tree.c (escaped_string): New class. Converts an unescaped
8209 string into its escaped equivalent.
8210 (warn_deprecated_use): Use the new class to convert the
8211 deprecation message, if present.
8212 (test_escaped_strings): New self test.
8213 (test_c_tests): Add test_escaped_strings.
8214 * doc/extend.texi (deprecated): Add a note that the
8215 deprecation message is affected by the -fmessage-length
8216 option, and that control characters will be escaped.
8217 (#pragma GCC error): Document this pragma.
8218 (#pragma GCC warning): Likewise.
8219 * doc/invoke.texi (-fmessage-length): Document this option's
8220 effect on the #warning and #error preprocessor directives and
8221 the deprecated attribute.
8223 2018-06-15 Richard Biener <rguenther@suse.de>
8225 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8226 here, also noting vector size used.
8227 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8228 size used in MSG_OPTIMIZED_LOCATIONS dump.
8229 (pass_slp_vectorize::execute): Adjust.
8231 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8234 * config/arc/arc.c (arc_return_address_register): Fix
8237 2018-06-15 Richard Biener <rguenther@suse.de>
8240 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8241 leave useless conversion stripping to force_gimple_operand_gsi.
8242 (gimplify_build2): Likewise.
8243 (gimplify_build1): Likewise.
8245 2018-06-15 Richard Biener <rguenther@suse.de>
8248 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8249 before adjusting their block.
8251 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8253 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8254 multilibs for *-*-rtems*.
8255 * config/riscv/t-rtems: New file.
8257 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8260 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8261 unsigned_type_for returns NULL.
8264 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8265 subregs of multi-word pseudos unless the float mode has word size.
8267 2018-06-14 Richard Biener <rguenther@suse.de>
8270 * tree-vect-generic.c (build_word_mode_vector_type): Remove
8271 duplicate and harmful type_hash_canon.
8272 * tree.c (type_hash_canon): Assert we didn't find ourselves.
8274 2018-06-14 Richard Biener <rguenther@suse.de>
8277 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8280 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
8282 * config/rtems.h (STDINT_LONG32): Define.
8284 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
8285 Prachi Godbole <prachi.godbole@imgtec.com>
8287 * config/mips/mips-cpus.def: Define P6600.
8288 * config/mips/mips-tables.opt: Regenerate.
8289 * config/mips/mips.c (mips_ucbranch_type): New enum.
8290 (mips_rtx_cost_data): Add support for P6600.
8291 (mips_issue_rate): Likewise.
8292 (mips_multipass_dfa_lookahead): Likewise.
8293 (mips_avoid_hazard): Likewise.
8294 (mips_reorg_process_insns): Likewise.
8295 (mips_classify_branch_p6600): New function.
8296 * config/mips/mips.h (TUNE_P6600): New define.
8297 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8298 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8299 * config/mips/mips.md: Include p6600.md.
8300 (processor): Add p6600.
8301 * config/mips/p6600.md: New file.
8302 * doc/invoke.texi: Add p6600 to supported architectures.
8304 2018-06-13 Martin Sebor <msebor@redhat.com>
8306 PR tree-optimization/86114
8307 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8309 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8311 2018-06-13 Richard Biener <rguenther@suse.de>
8313 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8314 Properly set vector type of the intermediate stmt.
8315 * tree-vect-stmts.c (vectorizable_operation): The destination
8316 var always has vectype_out type.
8318 2018-06-13 Jeff Law <law@redhat.com>
8320 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8321 integer 0 for argument to print_rtl_with_bb.
8322 (rl78_reorg): Likewise.
8324 2018-06-13 David Malcolm <dmalcolm@redhat.com>
8326 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8327 from rtx to rtx_insn *.
8328 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8330 (add_sched_insns_for_speculation): Likewise for local "target",
8331 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8332 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8333 from rtx_insn ** to rtx_code_label **.
8334 (reorg_emit_nops): Likewise.
8335 (c6x_reorg): Likewise for local "call_labels".
8336 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8338 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8339 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8340 the loops over LABEL_REFS.
8341 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8343 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8344 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8345 (split_branches): Strengthen local "olabel" from rtx to
8346 rtx_insn *, adding a safe_as_a cast.
8347 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8349 (add_insn_after): Likewise for first two params.
8350 (add_insn_before): Likewise.
8351 (remove_insn): Likewise for param.
8352 (emit_pattern_before_noloc): Likewise for second and third params.
8353 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8354 (emit_call_insn_before_noloc): Likewise.
8355 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8357 (emit_barrier_before): Likewise.
8358 (emit_label_before): Strengthen "label" param from "rtx" to
8359 "rtx_code_label *". Strengthen "before" param from "rtx" to
8361 (emit_insn_after_1): Strengthen "after" param from "rtx" to
8363 (emit_pattern_after_noloc): Likewise.
8364 (emit_insn_after_noloc): Likewise.
8365 (emit_jump_insn_after_noloc): Likewise.
8366 (emit_call_insn_after_noloc): Likewise.
8367 (emit_debug_insn_after_noloc): Likewise.
8368 (emit_barrier_after): Likewise.
8369 (emit_label_after): Likewise for both params.
8370 (emit_pattern_after_setloc): Likewise for "after" param. Convert
8371 "loc" param from "int" to "location_t".
8372 (emit_insn_after_setloc): Likewise.
8373 (emit_jump_insn_after_setloc): Likewise.
8374 (emit_call_insn_after_setloc): Likewise.
8375 (emit_debug_insn_after_setloc): Likewise.
8376 (emit_pattern_before_setloc): Likewise for "before" param. Convert
8377 "loc" param from "int" to "location_t".
8378 (emit_pattern_before): Convert NULL_RTX to NULL.
8379 (emit_insn_before_setloc): Convert "loc" param from "int" to
8381 (emit_jump_insn_before_setloc): Likewise.
8382 (emit_call_insn_before_setloc): Likewise.
8383 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8384 rtx_insn *. Convert "loc" param from "int" to "location_t".
8385 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8386 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8387 Convert 3rd param from "int" to "location_t".
8388 (emit_barrier_before, emit_barrier_after, next_real_insn):
8389 Strengthen param from rtx to rtx_insn *.
8390 (emit_label_before): Strengthen 1st param from "rtx" to
8391 "rtx_code_label *". Strengthen 2nd param from "rtx" to
8393 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8394 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8395 Strengthen 2nd param from "rtx" to "rtx_insn *".
8396 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8397 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8398 Likewise. Convert 3rd param from "int" to "location_t".
8399 (emit_label_after): Strengthen 1st param from "rtx" to
8401 (next_real_insn, remove_insn): Strengthen param from "rtx" to
8403 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8404 from "rtx" to "rtx_insn *".
8406 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
8408 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8409 bodies streamed in with -Q.
8410 * dumpfile.c (dump_files): Add lto-stream-out dump file.
8411 * dumpfile.h (tree_dump_index): Add lto_stream_out.
8412 * gimple-streamer-out.c: Include gimple-pretty-print.h
8413 (output_bb): Dump stmts streamed.
8414 * lto-section-out.c: Include print-tree.h
8415 (lto_begin_section): Dump sections created.
8416 (lto_output_decl_index): Dump decl encoded.
8417 * lto-streamer-out.c: Include print-tree.h
8418 (create_output_block): Dump output block created.
8419 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8420 (output_function): Dump function output.
8421 (output_constructor): Dump constructor streamed.
8422 (write_global_stream): Output indexes encoded.
8423 (produce_asm_for_decls): Dump streams encoded.
8424 * lto-streamer.c (streamer_dump_file): New global var.
8425 * lto-streamer.h (streamer_dump_file): Declare.
8426 * passes.c (ipa_write_summaries): Initialize streamer dump.
8427 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8430 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
8433 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8434 offsets for register save directives. Emit a second batch of save
8435 directives, if need be, when the function accesses prior frames.
8437 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8439 * config/arc/fpu.md (fmasf4): Force operand to register.
8440 (fnmasf4): Likewise.
8442 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8444 * config/arc/arc-protos.h (arc_pad_return): Remove.
8445 * config/arc/arc.c (machine_function): Remove force_short_suffix
8447 (arc_print_operand): Adjust printing of '&'.
8448 (arc_verify_short): Remove conditional printing of short suffix.
8449 (arc_final_prescan_insn): Remove reference to size_reason.
8450 (pad_return): New function.
8451 (arc_reorg): Call pad_return.
8452 (arc_pad_return): Remove.
8453 (arc_init_machine_status): Remove reference to force_short_suffix.
8454 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8455 (attr length): When attribute iscompact is true force to 2
8456 regardless; in the case of maybe check if we want to force the
8457 instruction to have 4 bytes length.
8458 (nopv): Change it to generate 4 byte long nop as well.
8459 (blockage): New pattern.
8460 (simple_return): Remove call to arc_pad_return.
8461 (p_return_i): Likewise.
8463 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8465 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8467 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8469 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8472 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8474 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8475 for ARC700 and ARCv2.
8477 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
8480 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8481 operands[2] instead of operands[1].
8484 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8486 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8487 case, check whether the outer register overlaps an unallocatable
8488 register, not just whether it fits the required class.
8490 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8492 * poly-int.h (can_div_trunc_p): Add new overload in which all values
8494 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8495 (memrefs_conflict_p): Likewise.
8496 (init_alias_analysis): Likewise.
8497 * cfgexpand.c (expand_debug_expr): Likewise.
8498 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8499 * cse.c (fold_rtx): Likewise.
8500 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8501 * expr.c (emit_block_move_hints): Likewise.
8502 (clear_storage_hints, push_block, emit_push_insn): Likewise.
8503 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8504 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8505 (emit_group_store): Likewise.
8506 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
8507 to read the PRE/POST_MODIFY increment.
8508 * calls.c (store_one_arg): Use strip_offset.
8509 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8511 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8513 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8514 (simplify_binary_operation_1): Extend CONST_INT handling to
8516 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8517 than a HOST_WIDE_INT.
8518 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8520 (adjust_mems, add_stores): Update accodingly.
8521 (vt_canonicalize_addr): Track polynomial offsets.
8522 (emit_note_insn_var_location): Likewise.
8523 (vt_add_function_parameter): Likewise.
8524 (vt_initialize): Likewise.
8526 2018-06-12 Jeff Law <law@redhat.com>
8528 * config.gcc (alpha*-*-freebsd*): Remove.
8529 * config/alpha/freebsd.h: Remove.
8531 2018-06-12 David Malcolm <dmalcolm@redhat.com>
8534 * spellcheck-tree.c (levenshtein_distance): Rename to...
8535 (get_edit_distance): ...this, and update for underlying renaming.
8536 * spellcheck-tree.h (levenshtein_distance): Rename to...
8537 (get_edit_distance): ...this.
8538 * spellcheck.c (levenshtein_distance): Rename to...
8539 (get_edit_distance): ...this. Convert from Levenshtein distance
8540 to Damerau-Levenshtein distance by supporting transpositions of
8541 adjacent characters. Rename "v1" to "v_next" and "v0" to
8543 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8544 (selftest::test_edit_distance_unit_test_oneway): ...this, and
8545 update for underlying renaming.
8546 (selftest::levenshtein_distance_unit_test): Rename to...
8547 (selftest::test_get_edit_distance_unit): ...this, and update for
8548 underlying renaming.
8549 (selftest::test_find_closest_string): Add example from PR 69968
8550 where transposition helps
8551 (selftest::test_metric_conditions): Update for renaming.
8552 (selftest::test_metric_conditions): Likewise.
8553 (selftest::spellcheck_c_tests): Likewise.
8554 * spellcheck.h (levenshtein_distance): Rename both overloads to...
8555 (get_edit_distance): ...this.
8556 (best_match::consider): Update for renaming.
8558 2018-06-12 Martin Sebor <msebor@redhat.com>
8560 PR tree-optimization/85259
8561 * builtins.c (compute_objsize): Handle constant offsets.
8562 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8563 true iff a warning has been issued.
8564 * gimple.h (gimple_nonartificial_location): New function.
8565 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8566 gimple_nonartificial_location and handle -Wno-system-headers.
8567 (handle_builtin_stxncpy): Same.
8569 2018-06-12 Martin Sebor <msebor@redhat.com>
8572 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8574 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
8576 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8577 BUILTIN_VEC_XST entries for pointer to double and long long.
8579 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
8582 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8584 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8587 2018-06-12 Martin Liska <mliska@suse.cz>
8589 * doc/options.texi: Document IntegerRange.
8591 2018-06-12 Martin Liska <mliska@suse.cz>
8593 * config/i386/i386.opt: Make MPX-related options as Deprecated.
8594 * opt-functions.awk: Handle Deprecated flag.
8595 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8597 (read_cmdline_option): Report warning for a deprecated option.
8598 * opts.h (struct cl_option): Add new field cl_deprecated.
8599 (CL_ERR_DEPRECATED): New.
8601 2018-06-12 Martin Liska <mliska@suse.cz>
8603 * doc/options.texi: Document Deprecated option flag.
8605 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8607 * config/arc/arc-arch.h (arc_extras): New enum.
8608 (arc_cpu_t):Add field extra.
8609 (arc_cpu_types): Consider the extras.
8610 * config/arc/arc-cpus.def: Add extras info.
8611 * config/arc/arc-opts.h (processor_type): Consider extra field.
8612 * config/arc/arc.c (arc_override_options): Handle extra field.
8614 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8616 * config/arc/arc-arch.h: Update ARC_OPTX macro.
8617 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8619 * config/arc/arc.c (arc_init): Update pic warning.
8620 (irq_range): Update irq range parsing warnings.
8621 (arc_override_options): Update various warning messages.
8622 (arc_handle_aux_attribute): Likewise.
8624 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
8626 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8628 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8630 * doc/sourcebuild.texi: Document usage of line number 0 in verify
8631 compiler messages directives.
8633 2018-06-12 Matthew Fortune <mfortune@gmail.com>
8635 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8636 * config/mips/mips-tables.opt: Regenerate.
8637 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8639 * doc/invoke.texi: Document -march=i6500.
8641 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
8643 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8644 (i6400_gpmul): Add cpu_unit.
8645 (i6400_gpdiv): Likewise.
8646 (i6400_msa_add_d): Update reservations.
8647 (i6400_msa_int_add) Likewise.
8648 (i6400_msa_short_logic3) Likewise.
8649 (i6400_msa_short_logic2) Likewise.
8650 (i6400_msa_short_logic) Likewise.
8651 (i6400_msa_move) Likewise.
8652 (i6400_msa_cmp) Likewise.
8653 (i6400_msa_short_float2) Likewise.
8654 (i6400_msa_div_d) Likewise.
8655 (i6400_msa_long_logic1) Likewise.
8656 (i6400_msa_long_logic2) Likewise.
8657 (i6400_msa_mult) Likewise.
8658 (i6400_msa_long_float2) Likewise.
8659 (i6400_msa_long_float4) Likewise.
8660 (i6400_msa_long_float5) Likewise.
8661 (i6400_msa_long_float8) Likewise.
8662 (i6400_fpu_fadd): Include frint type.
8663 (i6400_fpu_store): New define_insn_reservation.
8664 (i6400_fpu_load): Likewise.
8665 (i6400_fpu_move): Likewise.
8666 (i6400_fpu_fcmp): Likewise.
8667 (i6400_fpu_fmadd): Likewise.
8668 (i6400_int_mult): Include imul3nc type and update reservation.
8669 (i6400_int_div): Include idiv3 type and update reservation.
8670 (i6400_int_load): Update to check type not move_type.
8671 (i6400_int_store): Likewise.
8672 (i6400_int_prefetch): Set zero latency.
8674 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
8676 * gcc.c: Document new %@{...} sequence.
8677 (LINK_COMMAND_SPEC): Use it for the -L switches.
8678 (cpp_unique_options): Use it for the -I switches.
8679 (at_file_argbuf): New global variable.
8680 (in_at_file): Likewise.
8681 (alloc_args): Create at_file_argbuf.
8682 (clear_args): Truncate at_file_argbuf.
8683 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8684 (open_at_file): New function.
8685 (close_at_file): Likewise.
8686 (create_at_file): Delete.
8687 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8690 (validate_switches_from_spec): Deal with %@{...} sequence.
8691 (validate_switches): Likewise.
8692 (driver::finalize): Call clear_args.
8694 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
8696 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8698 2018-06-11 Martin Sebor <msebor@redhat.com>
8700 * doc/invoke.texi (-Wall): List -Wc++17-compat.
8701 (Wno-class-memaccess): Add @opindex.
8702 (Wno-templates, Wno-multiple-inheritance): Same.
8703 (Wno-virtual-inheritance, Wno-namespaces): Same.
8704 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8705 (Wno-format-overflow, Wno-format-truncation): Same.
8706 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8707 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8708 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8709 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8710 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8711 (Wno-misspelled-isr): Same.
8713 2018-06-11 Martin Sebor <msebor@redhat.com>
8715 * PR tree-optimization/86083
8716 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8718 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
8720 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
8722 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
8725 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
8726 on the correct operand.
8727 (*movdi_internal64): Ditto.
8729 2018-06-11 Martin Liska <mliska@suse.cz>
8731 PR tree-optimization/86089
8732 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
8734 2018-06-11 Julia Koval <julia.koval@intel.com>
8736 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
8737 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
8738 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
8740 2018-06-11 Olivier Hainque <hainque@adacore.com>
8742 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
8743 for Ada with strict dwarf2.
8745 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
8748 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8751 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
8753 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8755 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
8757 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8760 2018-06-08 Martin Liska <mliska@suse.cz>
8762 * tree-cfg.h (debug_function): Fix argument type to match
8765 2018-06-08 Martin Liska <mliska@suse.cz>
8767 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8768 Remove usage of MPX-related (and removed) fields.
8769 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8771 2018-06-08 David Malcolm <dmalcolm@redhat.com>
8773 * cfg.c (debug): Use TDF_NONE rather than 0.
8774 * cfghooks.c (debug): Likewise.
8775 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8776 (struct dump_option_value_info): Convert to...
8777 (struct kv_pair): ...this template type.
8778 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8780 (optinfo_verbosity_options): Likewise.
8781 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8783 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8784 than int for "optgroup_flags" param.
8785 (dump_generic_expr_loc): Use dump_flags_t rather than int for
8787 (dump_dec): Likewise.
8788 (dump_finish): Use TDF_NONE rather than 0.
8789 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8790 rather than int for "optgroup_flags" param. Use TDF_NONE rather
8791 than 0. Update for change to option_ptr.
8792 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8793 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
8794 0. Update for changes to optinfo_verbosity_options and
8796 (opt_info_switch_p): Convert optgroup_flags from int to
8798 (dump_basic_block): Use dump_flags_t rather than int
8799 for "dump_kind" param.
8800 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8801 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8802 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8803 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8804 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8805 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8806 TDF_NONE): Convert from macros to...
8807 (enum dump_flag): ...this new enum.
8808 (dump_flags_t): Update to use enum.
8809 (operator|, operator&, operator~, operator|=, operator&=):
8810 Implement for dump_flags_t.
8811 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
8812 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
8813 Convert from macros to...
8814 (enum optgroup_flag): ...this new enum.
8815 (optgroup_flags_t): New typedef.
8816 (operator|, operator|=): Implement for optgroup_flags_t.
8817 (struct dump_file_info): Convert field "alt_flags" to
8818 dump_flags_t. Convert field "optgroup_flags" to
8820 (dump_basic_block): Use dump_flags_t rather than int for param.
8821 (dump_generic_expr_loc): Likewise.
8822 (dump_dec): Likewise.
8823 (dump_register): Convert param "optgroup_flags" to
8825 (opt_info_enable_passes): Likewise.
8826 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
8828 * gimple-pretty-print.c (debug): Likewise.
8829 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
8830 (merged_store_group::apply_stores): Likewise.
8831 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
8832 * gimple.c (verify_gimple_pp): Likewise.
8833 * graphite-poly.c (print_pbb_body): Likewise.
8834 * passes.c (pass_manager::register_one_dump_file): Convert
8835 local "optgroup_flags" to optgroup_flags_t.
8836 * print-tree.c (print_node): Use TDF_NONE rather than 0.
8838 (debug_body): Likewise.
8839 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
8840 to optgroup_flags_t.
8841 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
8843 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
8844 (convert_mult_to_fma): Likewise.
8845 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
8846 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
8847 * tree-vect-data-refs.c (dump_lower_bound): Convert param
8848 "dump_kind" to dump_flags_t.
8850 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8852 * config/rs6000/rs6000.c (min, max): Delete.
8854 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8856 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
8857 -mabi=spe and -mabi=no-spe.
8859 2018-06-08 Martin Liska <mliska@suse.cz>
8861 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
8862 where we expect an existing summary.
8864 2018-06-08 Martin Liska <mliska@suse.cz>
8866 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
8867 * ipa-inline.h (estimate_edge_growth): Likewise.
8869 2018-06-08 Martin Liska <mliska@suse.cz>
8871 * cgraph.c (function_version_hasher::hash): Use
8872 cgraph_node::get_uid ().
8873 (function_version_hasher::equal):
8874 * cgraph.h (cgraph_node::get_uid): New method.
8875 * ipa-inline.c (update_caller_keys): Use
8876 cgraph_node::get_uid ().
8877 (update_callee_keys): Likewise.
8878 * ipa-utils.c (searchc): Likewise.
8879 (ipa_reduced_postorder): Likewise.
8880 * lto-cgraph.c (input_node): Likewise.
8881 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
8882 * symbol-summary.h (symtab_insertion): Likewise.
8883 (symtab_removal): Likewise.
8884 (symtab_duplication): Likewise.
8885 * tree-pretty-print.c (dump_function_header): Likewise.
8886 * tree-sra.c (convert_callers_for_node): Likewise.
8888 2018-06-08 Martin Liska <mliska@suse.cz>
8890 * cgraph.c (symbol_table::create_edge): Always assign a new
8892 (symbol_table::free_edge): Do not recycle numbers.
8893 * cgraph.h (cgraph_edge::get): New method.
8894 * symbol-summary.h (symtab_removal): Use it.
8895 (symtab_duplication): Likewise.
8896 (call_summary::hashable_uid): Remove.
8898 2018-06-08 Martin Liska <mliska@suse.cz>
8900 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
8901 (initialize_growth_caches): Remove.
8902 (free_growth_caches): Likewise.
8903 (do_estimate_edge_time): Use edge_growth_cache.
8904 (do_estimate_edge_size): Likewise.
8905 (do_estimate_edge_hints): Likewise.
8906 * ipa-inline.c (reset_edge_caches): Likewise.
8907 (recursive_inlining): Likewise.
8908 (inline_small_functions): Likewise.
8909 * ipa-inline.h (initialize_growth_caches): Remove.
8910 (estimate_edge_size): Likewise.
8911 (estimate_edge_time): Likewise.
8912 (estimate_edge_hints): Likewise.
8913 (reset_edge_growth_cache): Likewise.
8914 * symbol-summary.h (call_summary::remove): New method.
8916 2018-06-08 Martin Liska <mliska@suse.cz>
8918 * ipa-cp.c (class edge_clone_summary): New summary.
8919 (grow_edge_clone_vectors): Remove.
8920 (ipcp_edge_duplication_hook): Remove.
8921 (class edge_clone_summary_t): New call_summary class.
8922 (ipcp_edge_removal_hook): Remove.
8923 (edge_clone_summary_t::duplicate): New function.
8924 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
8925 (create_specialized_node): Likewise.
8926 (ipcp_driver): Initialize edge_clone_summaries and do not
8929 2018-06-08 Martin Liska <mliska@suse.cz>
8931 * symbol-summary.h (get): New function.
8932 (call_summary::m_initialize_when_cloning): New class member.
8934 2018-06-08 Martin Liska <mliska@suse.cz>
8936 * cgraph.c (cgraph_node::remove): Do not recycle uid.
8937 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
8938 (symbol_table::allocate_cgraph_symbol): Do not set uid.
8939 * passes.c (uid_hash_t): Record removed_nodes by their uids.
8940 (remove_cgraph_node_from_order): Use the removed_nodes set.
8941 (do_per_function_toporder): Likwise.
8942 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
8943 instead of summary_uid.
8944 (symtab_removal): Likewise.
8945 (symtab_duplication): Likewise.
8947 2018-06-08 Martin Liska <mliska@suse.cz>
8949 * ipa-cp.c (ipcp_store_bits_results): Use
8950 ipcp_transformation_sum.
8951 (ipcp_store_vr_results): Likewise.
8952 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
8954 (ipcp_transformation_initialize): ... this.
8955 (ipa_set_node_agg_value_chain):
8956 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
8957 (write_ipcp_transformation_info): Likewise.
8958 (read_ipcp_transformation_info): Likewise.
8959 (ipcp_update_bits): Likewise.
8960 (ipcp_update_vr): Likewise.
8961 (ipcp_transform_function): Likewise.
8962 * ipa-prop.h: Rename ipcp_transformation_summary to
8963 ipcp_transformation.
8964 (class ipcp_transformation_t): New function summary.
8965 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
8966 (ipa_get_agg_replacements_for_node): Likewise.
8968 2018-06-08 Martin Liska <mliska@suse.cz>
8970 * ipa-pure-const.c (struct funct_state_d): Do it class instead
8972 (class funct_state_summary_t): New function_summary class.
8973 (has_function_state): Remove.
8974 (get_function_state): Likewise.
8975 (set_function_state): Likewise.
8976 (add_new_function): Likewise.
8977 (funct_state_summary_t::insert): New function.
8978 (duplicate_node_data): Remove.
8979 (remove_node_data): Remove.
8980 (funct_state_summary_t::duplicate): New function.
8981 (register_hooks): Create new funct_state_summaries.
8982 (pure_const_generate_summary): Use it.
8983 (pure_const_write_summary): Likewise.
8984 (pure_const_read_summary): Likewise.
8985 (propagate_pure_const): Likewise.
8986 (propagate_nothrow): Likewise.
8987 (dump_malloc_lattice): Likewise.
8988 (propagate_malloc): Likewise.
8989 (execute): Do not register hooks, just remove summary
8991 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
8994 2018-06-08 Martin Liska <mliska@suse.cz>
8996 * ipa-reference.c (remove_node_data): Remove.
8997 (duplicate_node_data): Likewise.
8998 (class ipa_ref_var_info_summary_t): New class.
8999 (class ipa_ref_opt_summary_t): Likewise.
9000 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9001 (get_reference_optimization_summary): Use
9002 ipa_ref_opt_sum_summaries.
9003 (set_reference_vars_info): Remove.
9004 (set_reference_optimization_summary): Likewise.
9005 (ipa_init): Create summaries.
9006 (init_function_info): Use function summary.
9007 (ipa_ref_opt_summary_t::duplicate): New function.
9008 (ipa_ref_opt_summary_t::remove): New function.
9009 (get_read_write_all_from_node): Fix GNU coding style.
9010 (propagate): Use function summary.
9011 (write_node_summary_p): Fix GNU coding style.
9012 (stream_out_bitmap): Likewise.
9013 (ipa_reference_read_optimization_summary): Use function summary.
9014 (ipa_reference_c_finalize): Do not release hooks.
9016 2018-06-08 Martin Liska <mliska@suse.cz>
9018 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9019 (analyze_function_body): Extract multiple calls of get_create.
9020 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9021 * ipa-inline.c (recursive_inlining): Use ::get method.
9022 * ipa-inline.h (estimate_edge_growth): Likewise.
9024 2018-06-08 Martin Liska <mliska@suse.cz>
9026 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9028 (hsa_function_summary::hsa_function_summary): Use the new enum
9030 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9031 * hsa-gen.c (hsa_get_host_function): Likewise.
9032 (get_brig_function_name): Likewise.
9033 * ipa-hsa.c (process_hsa_functions): Likewise.
9034 (ipa_hsa_write_summary): Likewise.
9035 * symbol-summary.h (symtab_duplication): Use ::get function/
9036 (get): New function.
9038 2018-06-08 Martin Liska <mliska@suse.cz>
9040 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9042 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9043 (hsa_register_kernel): Likewise.
9044 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9045 * hsa-gen.c (hsa_get_host_function): Likewise.
9046 (get_brig_function_name): Likewise.
9047 (generate_hsa): Likewise.
9048 (pass_gen_hsail::execute): Likewise.
9049 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9050 (devirtualization_time_bonus): Likewise.
9051 (ipcp_propagate_stage): Likewise.
9052 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9053 (edge_set_predicate): Likewise.
9054 (evaluate_conditions_for_known_args): Likewise.
9055 (evaluate_properties_for_edge): Likewise.
9056 (ipa_fn_summary::reset): Likewise.
9057 (ipa_fn_summary_t::duplicate): Likewise.
9058 (dump_ipa_call_summary): Likewise.
9059 (ipa_dump_fn_summary): Likewise.
9060 (analyze_function_body): Likewise.
9061 (compute_fn_summary): Likewise.
9062 (estimate_edge_devirt_benefit): Likewise.
9063 (estimate_edge_size_and_time): Likewise.
9064 (estimate_calls_size_and_time): Likewise.
9065 (estimate_node_size_and_time): Likewise.
9066 (inline_update_callee_summaries): Likewise.
9067 (remap_edge_change_prob): Likewise.
9068 (remap_edge_summaries): Likewise.
9069 (ipa_merge_fn_summary_after_inlining): Likewise.
9070 (ipa_update_overall_fn_summary): Likewise.
9071 (read_ipa_call_summary): Likewise.
9072 (inline_read_section): Likewise.
9073 (write_ipa_call_summary): Likewise.
9074 (ipa_fn_summary_write): Likewise.
9075 (ipa_free_fn_summary): Likewise.
9076 * ipa-hsa.c (process_hsa_functions): Likewise.
9077 (ipa_hsa_write_summary): Likewise.
9078 (ipa_hsa_read_section): Likewise.
9079 * ipa-icf.c (sem_function::merge): Likewise.
9080 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9081 (do_estimate_edge_time): Likewise.
9082 (estimate_size_after_inlining): Likewise.
9083 (estimate_growth): Likewise.
9084 (growth_likely_positive): Likewise.
9085 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9086 (inline_call): Likewise.
9087 * ipa-inline.c (caller_growth_limits): Likewise.
9088 (can_inline_edge_p): Likewise.
9089 (can_inline_edge_by_limits_p): Likewise.
9090 (compute_uninlined_call_time): Likewise.
9091 (compute_inlined_call_time): Likewise.
9092 (want_inline_small_function_p): Likewise.
9093 (edge_badness): Likewise.
9094 (update_caller_keys): Likewise.
9095 (update_callee_keys): Likewise.
9096 (recursive_inlining): Likewise.
9097 (inline_small_functions): Likewise.
9098 (inline_to_all_callers_1): Likewise.
9099 (dump_overall_stats): Likewise.
9100 (early_inline_small_functions): Likewise.
9101 (early_inliner): Likewise.
9102 * ipa-inline.h (estimate_edge_growth): Likewise.
9103 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9104 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9105 * ipa-prop.h (IPA_NODE_REF): Likewise.
9106 (IPA_EDGE_REF): Likewise.
9107 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9108 (propagate_malloc): Likewise.
9109 * ipa-split.c (execute_split_functions): Likewise.
9110 * symbol-summary.h: Rename get to get_create.
9112 (get_create): Likewise.
9113 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9115 2018-06-08 Martin Liska <mliska@suse.cz>
9117 * symbol-summary.h (release): Move definition out of class
9119 (symtab_removal): Likewise.
9120 (symtab_duplication): Likewise.
9122 2018-06-08 Martin Liska <mliska@suse.cz>
9124 * symbol-summary.h (function_summary): Move constructor
9125 implementation out of class declaration.
9126 (release): Likewise.
9127 (symtab_insertion): Likewise.
9128 (symtab_removal): Likewise.
9129 (symtab_duplication): Likewise.
9132 2018-06-08 Martin Liska <mliska@suse.cz>
9134 * Makefile.in: Remove support for MPX (macros, related functions,
9135 fields in cgraph_node, ...).
9136 * builtin-types.def (BT_BND): Likewise.
9137 (BT_FN_BND_CONST_PTR): Likewise.
9138 (BT_FN_CONST_PTR_BND): Likewise.
9139 (BT_FN_VOID_PTR_BND): Likewise.
9140 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9141 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9142 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9143 (expand_builtin_mempcpy_with_bounds): Likewise.
9144 (expand_builtin_memset_with_bounds): Likewise.
9145 (expand_builtin_memset_args): Likewise.
9146 (std_expand_builtin_va_start): Likewise.
9147 (expand_builtin): Likewise.
9148 (expand_builtin_with_bounds): Likewise.
9149 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9150 (DEF_LIB_BUILTIN_CHKP): Likewise.
9151 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9152 (DEF_CHKP_BUILTIN): Likewise.
9153 (BUILT_IN_MEMCPY): Likewise.
9154 (BUILT_IN_MEMMOVE): Likewise.
9155 (BUILT_IN_MEMPCPY): Likewise.
9156 (BUILT_IN_MEMSET): Likewise.
9157 (BUILT_IN_STPCPY): Likewise.
9158 (BUILT_IN_STRCAT): Likewise.
9159 (BUILT_IN_STRCHR): Likewise.
9160 (BUILT_IN_STRCPY): Likewise.
9161 (BUILT_IN_STRLEN): Likewise.
9162 (BUILT_IN_MEMCPY_CHK): Likewise.
9163 (BUILT_IN_MEMMOVE_CHK): Likewise.
9164 (BUILT_IN_MEMPCPY_CHK): Likewise.
9165 (BUILT_IN_MEMSET_CHK): Likewise.
9166 (BUILT_IN_STPCPY_CHK): Likewise.
9167 (BUILT_IN_STRCAT_CHK): Likewise.
9168 (BUILT_IN_STRCPY_CHK): Likewise.
9169 * calls.c (store_bounds): Likewise.
9170 (emit_call_1): Likewise.
9171 (special_function_p): Likewise.
9172 (maybe_warn_nonstring_arg): Likewise.
9173 (initialize_argument_information): Likewise.
9174 (finalize_must_preallocate): Likewise.
9175 (compute_argument_addresses): Likewise.
9176 (expand_call): Likewise.
9177 * cfgexpand.c (expand_call_stmt): Likewise.
9178 (expand_return): Likewise.
9179 (expand_gimple_stmt_1): Likewise.
9180 (pass_expand::execute): Likewise.
9181 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9182 (cgraph_node::remove): Likewise.
9183 (cgraph_node::dump): Likewise.
9184 (cgraph_node::verify_node): Likewise.
9185 * cgraph.h (chkp_function_instrumented_p): Likewise.
9186 (symtab_node::get_alias_target): Likewise.
9187 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9188 (cgraph_local_p): Likewise.
9189 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9190 (cgraph_edge::rebuild_references): Likewise.
9191 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9192 (walk_polymorphic_call_targets): Likewise.
9193 (cgraph_node::expand_thunk): Likewise.
9194 (symbol_table::output_weakrefs): Likewise.
9195 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9196 (ix86_handle_option): Likewise.
9197 * config/i386/constraints.md: Likewise.
9198 * config/i386/i386-builtin-types.def (BND): Likewise.
9202 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9203 (BDESC_FIRST): Likewise.
9205 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9206 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9207 * config/i386/i386.c (enum reg_class): Likewise.
9208 (ix86_target_string): Likewise.
9209 (ix86_option_override_internal): Likewise.
9210 (ix86_conditional_register_usage): Likewise.
9211 (ix86_valid_target_attribute_inner_p): Likewise.
9212 (ix86_set_indirect_branch_type): Likewise.
9213 (ix86_set_current_function): Likewise.
9214 (ix86_function_arg_regno_p): Likewise.
9215 (init_cumulative_args): Likewise.
9216 (ix86_function_arg_advance): Likewise.
9217 (ix86_function_arg): Likewise.
9218 (ix86_pass_by_reference): Likewise.
9219 (ix86_function_value_regno_p): Likewise.
9220 (ix86_function_value_1): Likewise.
9221 (ix86_function_value_bounds): Likewise.
9222 (ix86_return_in_memory): Likewise.
9223 (ix86_setup_incoming_vararg_bounds): Likewise.
9224 (ix86_va_start): Likewise.
9225 (indirect_thunk_need_prefix): Likewise.
9226 (print_reg): Likewise.
9227 (ix86_print_operand): Likewise.
9228 (ix86_expand_call): Likewise.
9229 (ix86_output_function_return): Likewise.
9230 (reg_encoded_number): Likewise.
9231 (BDESC_VERIFYS): Likewise.
9232 (ix86_init_mpx_builtins): Likewise.
9233 (ix86_init_builtins): Likewise.
9234 (ix86_emit_cmove): Likewise.
9235 (ix86_emit_move_max): Likewise.
9236 (ix86_expand_builtin): Likewise.
9237 (ix86_builtin_mpx_function): Likewise.
9238 (ix86_get_arg_address_for_bt): Likewise.
9239 (ix86_load_bounds): Likewise.
9240 (ix86_store_bounds): Likewise.
9241 (ix86_load_returned_bounds): Likewise.
9242 (ix86_store_returned_bounds): Likewise.
9243 (ix86_class_likely_spilled_p): Likewise.
9244 (ix86_hard_regno_mode_ok): Likewise.
9245 (x86_order_regs_for_local_alloc): Likewise.
9246 (ix86_mitigate_rop): Likewise.
9247 (ix86_bnd_prefixed_insn_p): Likewise.
9248 (ix86_mpx_bound_mode): Likewise.
9249 (ix86_make_bounds_constant): Likewise.
9250 (ix86_initialize_bounds): Likewise.
9251 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9252 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9253 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9254 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9255 (TARGET_CHKP_BOUND_MODE): Likewise.
9256 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9257 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9258 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9259 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9260 * config/i386/i386.h (TARGET_MPX): Likewise.
9261 (TARGET_MPX_P): Likewise.
9262 (VALID_BND_REG_MODE): Likewise.
9263 (FIRST_BND_REG): Likewise.
9264 (LAST_BND_REG): Likewise.
9265 (enum reg_class): Likewise.
9266 (BND_REG_P): Likewise.
9267 (BND_REGNO_P): Likewise.
9268 (BNDmode): Likewise.
9269 (ADJUST_INSN_LENGTH): Likewise.
9270 * config/i386/i386.md: Likewise.
9271 * config/i386/i386.opt: Likewise.
9272 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9273 (defined): Likewise.
9274 (LINK_MPX): Likewise.
9275 (MPX_SPEC): Likewise.
9276 (LIBMPX_SPEC): Likewise.
9277 (LIBMPXWRAPPERS_SPEC): Likewise.
9278 (CHKP_SPEC): Likewise.
9279 * config/i386/predicates.md: Likewise.
9280 * dbxout.c (dbxout_type): Likewise.
9281 * doc/extend.texi: Likewise.
9282 * doc/invoke.texi: Likewise.
9283 * doc/md.texi: Likewise.
9284 * doc/tm.texi: Likewise.
9285 * doc/tm.texi.in: Likewise.
9286 * dwarf2out.c (is_base_type): Likewise.
9287 (gen_formal_types_die): Likewise.
9288 (gen_subprogram_die): Likewise.
9289 (gen_type_die_with_usage): Likewise.
9290 (gen_decl_die): Likewise.
9291 (dwarf2out_late_global_decl): Likewise.
9292 * expr.c (expand_assignment): Likewise.
9293 (emit_storent_insn): Likewise.
9294 (store_expr_with_bounds): Likewise.
9295 (store_expr): Likewise.
9296 (expand_expr_real_1): Likewise.
9297 * expr.h (store_expr_with_bounds): Likewise.
9298 * function.c (use_register_for_decl): Likewise.
9299 (struct bounds_parm_data): Likewise.
9300 (assign_parms_augmented_arg_list): Likewise.
9301 (assign_parm_find_entry_rtl): Likewise.
9302 (assign_parm_is_stack_parm): Likewise.
9303 (assign_parm_load_bounds): Likewise.
9304 (assign_bounds): Likewise.
9305 (assign_parms): Likewise.
9306 (expand_function_start): Likewise.
9307 * gcc.c (CHKP_SPEC): Likewise.
9308 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9309 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9310 (wrestrict_dom_walker::check_call): Likewise.
9311 * gimple.c (gimple_build_call_from_tree): Likewise.
9312 * gimple.h (enum gf_mask): Likewise.
9313 (gimple_call_with_bounds_p): Likewise.
9314 (gimple_call_set_with_bounds): Likewise.
9315 * gimplify.c (gimplify_init_constructor): Likewise.
9316 * ipa-cp.c (initialize_node_lattices): Likewise.
9317 (propagate_constants_across_call): Likewise.
9318 (find_more_scalar_values_for_callers_subset): Likewise.
9319 * ipa-hsa.c (process_hsa_functions): Likewise.
9320 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9321 * ipa-icf.c (sem_function::merge): Likewise.
9322 * ipa-inline.c (early_inliner): Likewise.
9323 * ipa-pure-const.c (warn_function_noreturn): Likewise.
9324 (warn_function_cold): Likewise.
9325 (propagate_pure_const): Likewise.
9326 * ipa-ref.h (enum GTY): Likewise.
9327 * ipa-split.c (find_retbnd): Likewise.
9328 (consider_split): Likewise.
9329 (split_function): Likewise.
9330 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9331 * ipa.c (walk_polymorphic_call_targets): Likewise.
9332 (symbol_table::remove_unreachable_nodes): Likewise.
9333 (process_references): Likewise.
9334 (cgraph_build_static_cdtor_1): Likewise.
9335 * lto-cgraph.c (lto_output_node): Likewise.
9336 (output_refs): Likewise.
9337 (compute_ltrans_boundary): Likewise.
9338 (input_overwrite_node): Likewise.
9339 (input_node): Likewise.
9340 (input_cgraph_1): Likewise.
9341 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9342 * passes.c (pass_manager::execute_early_local_passes): Likewise.
9343 (class pass_chkp_instrumentation_passes): Likewise.
9344 (make_pass_chkp_instrumentation_passes): Likewise.
9345 * passes.def: Likewise.
9346 * rtl.h (struct GTY): Likewise.
9347 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9348 * stor-layout.c (layout_type): Likewise.
9349 * symtab.c: Likewise.
9350 * target.def: Likewise.
9351 * targhooks.c (default_chkp_bound_type): Likewise.
9352 (default_chkp_bound_mode): Likewise.
9353 (default_builtin_chkp_function): Likewise.
9354 (default_chkp_function_value_bounds): Likewise.
9355 (default_chkp_make_bounds_constant): Likewise.
9356 (default_chkp_initialize_bounds): Likewise.
9357 * targhooks.h (default_chkp_bound_type): Likewise.
9358 (default_chkp_bound_mode): Likewise.
9359 (default_builtin_chkp_function): Likewise.
9360 (default_chkp_function_value_bounds): Likewise.
9361 (default_chkp_make_bounds_constant): Likewise.
9362 (default_chkp_initialize_bounds): Likewise.
9363 * toplev.c (compile_file): Likewise.
9364 (process_options): Likewise.
9365 * tree-core.h (DEF_BUILTIN): Likewise.
9366 (DEF_BUILTIN_CHKP): Likewise.
9367 * tree-inline.c (declare_return_variable): Likewise.
9368 (remap_gimple_stmt): Likewise.
9369 (copy_bb): Likewise.
9370 (initialize_inlined_parameters): Likewise.
9371 (expand_call_inline): Likewise.
9372 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9373 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9374 (make_pass_ipa_chkp_produce_thunks): Likewise.
9375 (make_pass_chkp): Likewise.
9376 (make_pass_chkp_opt): Likewise.
9377 (make_pass_chkp_instrumentation_passes): Likewise.
9378 * tree-pretty-print.c (dump_generic_node): Likewise.
9379 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9380 * tree-ssa-dce.c (propagate_necessity): Likewise.
9381 (eliminate_unnecessary_stmts): Likewise.
9382 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9383 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9384 * tree-ssa-sccvn.h: Likewise.
9385 * tree-ssa-strlen.c (get_string_length): Likewise.
9386 (valid_builtin_call): Likewise.
9387 (adjust_last_stmt): Likewise.
9388 (handle_builtin_strchr): Likewise.
9389 (handle_builtin_strcpy): Likewise.
9390 (handle_builtin_stxncpy): Likewise.
9391 (handle_builtin_memcpy): Likewise.
9392 (handle_builtin_strcat): Likewise.
9393 (strlen_check_and_optimize_stmt): Likewise.
9394 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9395 * tree-streamer-in.c: Likewise.
9396 * tree-streamer.c (record_common_node): Likewise.
9397 * tree.c (tree_code_size): Likewise.
9398 (wide_int_to_tree_1): Likewise.
9399 (type_contains_placeholder_1): Likewise.
9400 (build_common_tree_nodes): Likewise.
9401 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9402 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9403 (POINTER_BOUNDS_P): Likewise.
9404 (BOUNDED_TYPE_P): Likewise.
9405 (BOUNDED_P): Likewise.
9406 (CALL_WITH_BOUNDS_P): Likewise.
9407 (pointer_bounds_type_node): Likewise.
9408 * value-prof.c (gimple_ic): Likewise.
9409 * var-tracking.c (vt_add_function_parameters): Likewise.
9410 * varasm.c (make_decl_rtl): Likewise.
9411 (assemble_start_function): Likewise.
9412 (output_constant): Likewise.
9413 (maybe_assemble_visibility): Likewise.
9414 * varpool.c (ctor_for_folding): Likewise.
9415 * chkp-builtins.def: Remove.
9416 * ipa-chkp.c: Remove.
9417 * ipa-chkp.h: Remove.
9418 * rtl-chkp.c: Remove.
9419 * rtl-chkp.h: Remove.
9420 * tree-chkp-opt.c: Remove.
9421 * tree-chkp.c: Remove.
9422 * tree-chkp.h: Remove.
9424 2018-06-07 Carl Love <cel@us.ibm.com>
9426 * config/rs6000/vsx.md (vextract_fp_from_shorth,
9427 vextract_fp_from_shortl): Add BE support.
9429 2018-06-07 Paul Koning <ni1d@arrl.net>
9431 * compare-elim.c (try_merge_compare): Don't merge compare if
9432 address contains a side effect.
9433 (try_eliminate_compare): Likewise.
9435 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
9437 * config.gcc: Support "tremont".
9438 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9439 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9441 * config/i386/i386.c (m_TREMONT): Define.
9442 (processor_target_table): Add "tremont".
9443 (PTA_TREMONT): Define.
9444 (ix86_lea_outperforms): Add TARGET_TREMONT.
9445 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9446 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9447 and M_INTEL_GOLDMONT_PLUS.
9448 (fold_builtin_cpu): Add "tremont".
9449 (ix86_add_stmt_cost): Add TARGET_TREMONT.
9450 (ix86_option_override_internal): Add "tremont".
9451 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9452 (processor_type): Add PROCESSOR_TREMONT.
9453 * config/i386/x86-tune.def: Add m_TREMONT.
9454 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9456 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9458 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9459 symbol defined for msp430i* devices to be lower case.
9461 2018-06-07 Richard Biener <rguenther@suse.de>
9463 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9464 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9465 Properly wrap signed arithmetic if overflow wraps.
9467 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9469 PR tree-optimization/69615
9470 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9471 of a cast from a same precision integral SSA_NAME in a bb dominated
9472 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
9473 cast to utype if rhs2 has already a compatible type.
9475 2018-06-07 Richard Biener <rguenther@suse.de>
9477 PR tree-optimization/85935
9478 * graphite-scop-detection.c (find_params_in_bb): Analyze
9479 condition operands with respect to the correct loop. Assert
9480 the analysis doesn't fail.
9482 2018-06-04 Carl Love <cel@us.ibm.com>
9484 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9485 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
9486 as it is slightly cheaper.
9487 (first_match_or_eos_index_<mode>):
9488 Calculate index using natural element order.
9489 (first_match_index_<mode>):
9490 Calculate index using natural element order.
9491 (first_match_or_eos_index_<mode>):
9492 Calculate index using natural order.
9493 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9494 for BE and LE modes.
9495 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9496 P9V_BUILTIN_VCLZLSBB_V16QI.
9497 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9500 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9502 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9503 indentation and line wrap for many prototypes. Add missing
9504 @smallexample directives around block of prototypes for vec_xl and
9507 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
9509 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9510 track if we pass or return IEEE 128-bit floating point.
9511 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9512 C++ mangling that is compatible with GCC 8.1.
9513 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9514 (init_cumulative_args): Note if we pass or return IEEE 128-bit
9515 floating point types.
9516 (rs6000_function_arg_advance_1): Likewise.
9517 (rs6000_mangle_type): Optionally generate mangled names that match
9518 what GCC 8.1 generated for IEEE 128-bit floating point types.
9519 (rs6000_globalize_decl_name): If we have an external function that
9520 passes or returns IEEE 128-bit types, generate a weak reference
9521 from the mangled name used in GCC 8.1 to the current mangled
9523 (rs6000_init_builtins): Make __ibm128 use the long double type if
9524 long double is IBM extended double. Make __float128 use the long
9525 double type if long double is IEEE 128-bit.
9528 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9529 macro for __ibm128 built-in functions.
9530 (PACK_IF): Add __ibm128 pack/unpack functions.
9531 (UNPACK_IF): Likewise.
9532 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9533 enable long double built-in functions if long double is IEEE
9534 128-bit floating point.
9535 (rs6000_invalid_builtin): Update long double built-in function
9537 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9538 functions, adjust the built-in function to use the long double
9539 built-in function if __ibm128 and long double are the same type.
9540 * doc/extend.texi (PowerPC builtins): Update documention for
9541 __builtin_{,un}pack_longdouble. Add documentation for
9542 __builtin_{,un}pack_ibm128.
9544 2018-06-06 Jim Wilson <jimw@sifive.com>
9546 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9547 (struct machine_function): New field interrupt_mode.
9548 (riscv_handle_type_attribute): New function. Add forward declaration.
9549 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9550 (riscv_expand_epilogue): Check interrupt_mode field.
9551 (riscv_set_current_function): Check interrupt attribute args and
9552 set interrupt_mode field.
9553 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9554 (riscv_sret, riscv_uret): New.
9555 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9556 new arguments to interrupt attribute.
9558 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
9561 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9562 Don't handle -mcpu=power8 if -mpower9-vector is also used.
9564 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9566 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9567 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9568 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9569 several redundant entries.
9571 2018-06-06 David Malcolm <dmalcolm@redhat.com>
9573 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9574 type from "rtx" to "rtx_insn *".
9575 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9576 for local "call_insn", removing cast.
9577 (ix86_expand_call): Likewise, introducing a "call_insn" local.
9579 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
9581 PR tree-optimization/86066
9582 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9583 for BIT_INSERT_EXPR stores.
9585 2018-06-06 Richard Biener <rguenther@suse.de>
9587 PR tree-optimization/86062
9588 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9589 component refs ontop
9590 of to be offsetted base.
9592 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9594 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9595 to be static and remove check on interrupt attribute name.
9597 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
9599 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9600 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9602 2018-06-05 Steve Ellcey <sellcey@cavium.com>
9605 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9607 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9608 Remove second argument, change how error is called.
9609 (aarch64_layout_arg): Remove second argument from
9610 aarch64_err_no_fpadvsimd call.
9611 (aarch64_init_cumulative_args): Ditto.
9612 (aarch64_gimplify_va_arg_expr): Ditto.
9613 * config/aarch64/aarch64.md (mov<mode>): Ditto.
9615 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
9617 * config/i386/i386.md (simple_return_indirect_internal): New expander.
9618 (*simple_return_indirect_internal<mode>): Rename from
9619 simple_return_indirect_internal. Use W mode iterator.
9620 (rstorssp): New expander.
9621 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
9622 (clrssbsy): New expander.
9623 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
9625 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
9627 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9629 (cmse_check_pointed_object): Likewise.
9631 2018-06-05 Martin Liska <mliska@suse.cz>
9633 PR gcov-profile/47618
9634 * doc/invoke.texi: Document how -fprofile-dir format
9637 2018-06-05 Richard Biener <rguenther@suse.de>
9639 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9640 removal pretend DOM info isn't available so we do not update
9641 it and only remove edges, not dominated blocks. Actually free
9642 DOM info in case we removed something. Remove unreachable blocks.
9643 (mfb_keep_latches): Work with either DOM info or marked backedges.
9644 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9645 first. Mark backedges if DOM info isn't available.
9646 (Re-)compute DOM info after cleanup_control_flow_pre.
9648 2018-06-05 Richard Biener <rguenther@suse.de>
9650 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9651 (locus_discrim_hasher::hash): Adjust.
9652 (locus_discrim_hasher::equal): Likewise.
9653 (next_discriminator_for_locus): Work on line directly.
9654 (same_line_p): Pass in expanded locus1 as well.
9655 (assign_discriminators): Avoid redundant location expansions.
9657 2018-06-05 Richard Biener <rguenther@suse.de>
9659 PR tree-optimization/86046
9660 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9661 if required after clearing TREE_ADDRESSABLE.
9663 2018-06-05 Richard Biener <rguenther@suse.de>
9665 PR tree-optimization/86047
9666 * tree-ssa-loop.c (for_each_index): Glob handling of all
9667 decls and constants and really handle all of them.
9669 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9672 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9673 qualifier_void_pointer and qualifier_const_void_pointer.
9674 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9675 (arm_init_builtins): Handle the above.
9676 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9677 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9678 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9681 2018-06-05 Martin Liska <mliska@suse.cz>
9683 * auto-profile.c (read_autofdo_file): Do not use
9684 gcov_ctr_summary struct.
9685 (afdo_callsite_hot_enough_for_early_inline): Likewise.
9686 * coverage.c (struct counts_entry): Likewise.
9687 (read_counts_file): Read just single summary entry.
9688 (get_coverage_counts): Use gcov_summary struct.
9689 * coverage.h (get_coverage_counts): Likewise.
9690 * gcov-dump.c (dump_working_sets): Likewise.
9691 (tag_summary): Dump just single summary.
9692 * gcov-io.c (gcov_write_summary): Write just histogram
9694 (gcov_read_summary): Read just single summary.
9695 (compute_working_sets): Use gcov_summary struct.
9696 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9697 of GCOV_COUNTERS_SUMMABLE.
9698 (GCOV_COUNTERS_SUMMABLE): Remove.
9699 (GCOV_FIRST_VALUE_COUNTER): Replace with
9700 GCOV_COUNTER_V_INTERVAL.
9701 (struct gcov_ctr_summary): Remove.
9702 (struct gcov_summary): Directly use fields of former
9704 (compute_working_sets): Use gcov_summary struct.
9705 * gcov.c (read_count_file): Do not use ctrs fields.
9706 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9708 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9710 * profile.c: Likewise.
9711 * profile.h: Likewise.
9713 2018-06-05 Martin Liska <mliska@suse.cz>
9715 PR gcov-profile/84846
9716 * gcov.c (output_lines): Print working directory only
9717 in intermediate format.
9719 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
9721 * config/s390/s390-builtin-types.def: Add void function type.
9722 * config/s390/s390-builtins.def: Use the function type for the
9725 2018-06-04 Jim Wilson <jimw@sifive.com>
9727 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
9729 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
9730 and maybe_eh_return. Change regno to unsigned int. Use new args to
9731 handle EH_RETURN_DATA_REGNO registers properly.
9732 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
9733 (riscv_expand_epilogue): Update comment. Change argument name and
9734 type. Update code to use new name and type. Pass new args to
9735 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
9737 * config/riscv/riscv.md (NORMAL_RETURN): New.
9738 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
9739 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
9740 (eh_return): Call gen_eh_return_internal and emit barrier.
9741 (eh_return_internal): Call riscv_expand_epilogue.
9743 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
9745 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
9746 bit_insertion field and declare can_be_merged_into method.
9747 (merged_store_group::can_be_merged_into): New method.
9748 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9749 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
9750 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9752 2018-06-04 Richard Biener <rguenther@suse.de>
9754 PR tree-optimization/85955
9755 * builtins.c (fold_builtin_sincos): Convert pointers to
9756 destination to appropriate type before dereferencing.
9758 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
9760 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9762 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
9764 * expr.c (expand_expr_real_1): Force the operand into memory if
9765 its TYPE_MODE is BLKmode and if there is no integer mode for
9766 the number of bits being extracted.
9768 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9772 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9773 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9775 2018-06-04 Richard Biener <rguenther@suse.de>
9777 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9778 (cleanup_tree_cfg_noloop): ... single caller. Do
9779 start_recording_case_labels later.
9781 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
9783 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9784 to _IMMINTRIN_H_INCLUDED.
9785 * config/i386/pconfigintrin.h: Ditto.
9786 * config/i386/waitpkgintrin.h: Ditto.
9787 * config/i386/immintrin.h: Add includes for sgxintrin.h,
9788 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9789 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9790 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9791 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9792 waitpkgintrin.h and cldemoteintrin.h.
9794 2018-06-04 Richard Biener <rguenther@suse.de>
9796 PR tree-optimization/86038
9797 * tracer.c (find_best_successor): Check probability for
9798 being initialized, bail out if not.
9800 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
9803 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9804 of bits to ignore when comparing architectures.
9806 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9808 PR tree-optimization/69615
9809 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
9810 maximum or minimum of the type, try to merge it also as if
9811 range1 is + [-, x - 1] or + [x + 1, -].
9814 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
9816 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
9818 PR tree-optimization/86034
9819 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
9820 the unsigned bitfield type in a bit insertion sequence if it does not
9821 have a larger precision than the bitfield size.
9822 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
9824 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
9826 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
9828 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9830 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
9831 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
9832 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
9833 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
9835 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9837 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
9838 Disable -fdelete-null-pointer-checks for ELF toolchain.
9840 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9841 Kito Cheng <kito.cheng@gmail.com>
9843 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
9844 (nds32le-*-*, nds32be-*-*): Integrate checking process.
9845 (nds32*-*-*): Add glibc and uclibc conditions.
9846 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
9847 (TARGET_EXCEPT_UNWIND_INFO): Define.
9848 * config/nds32/elf.h: New file.
9849 * config/nds32/linux.h: New file.
9850 * config/nds32/nds32-elf.opt: New file.
9851 * config/nds32/nds32-linux.opt: New file.
9852 * config/nds32/nds32-fp-as-gp.c
9853 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
9854 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
9856 (nds32_asm_file_end): Ditto.
9857 (nds32_print_operand): Ditto.
9858 (nds32_insert_attributes): Ditto.
9859 (nds32_init_libfuncs): New function.
9860 (TARGET_HAVE_TLS): Define.
9861 (TARGET_INIT_LIBFUNCS): Define.
9862 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
9864 (TARGET_ELF): Apply different mcmodel setting.
9865 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
9866 been migrated into elf.h and linux.h files.
9867 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
9868 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
9869 (mcmodel): The content has been migrated into nds32-elf.opt and
9870 nds32-linux.opt files.
9871 * config/nds32/t-elf: New file.
9872 * config/nds32/t-linux: New file.
9874 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9875 Shiva Chen <shiva0217@gmail.com>
9877 * config/nds32/constants.md (unspec_volatile_element): Add
9878 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
9879 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
9881 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
9882 (make_pass_nds32_fp_as_gp): Declare.
9883 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
9885 (nds32_asm_function_end_prologue): Remove unused asm output.
9886 (nds32_asm_function_begin_epilogue): Remove unused asm output.
9887 (nds32_asm_file_start): Output necessary fp_as_gp information.
9888 (nds32_option_override): Adjust register usage.
9889 (nds32_expand_prologue): Consider fp_as_gp situation.
9890 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
9891 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
9894 (simple_return): Ditto.
9895 (omit_fp_begin): Output special directive for fp_as_gp.
9896 (omit_fp_end): Output special directive for fp_as_gp.
9897 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9898 mforbid-fp-as-gp): New options.
9900 2018-06-01 Mark Wielaard <mark@klomp.org>
9902 * dwarf2out.c (dwarf2out_finish): Remove generation of
9903 DW_AT_loclists_base.
9905 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
9907 * gimple-ssa-store-merging.c: Include gimple-fold.h.
9908 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
9909 (struct merged_store_group): Add bit_insertion field.
9910 (dump_char_array): Use standard hexadecimal format.
9911 (merged_store_group::merged_store_group): Set bit_insertion to false.
9912 (merged_store_group::apply_stores): Use optimal buffer size. Deal
9913 with BIT_INSERT_EXPR stores. Move up code updating the mask and
9914 also print the mask in the dump file.
9915 (pass_store_merging::gate): Minor tweak.
9916 (imm_store_chain_info::coalesce_immediate): Fix wrong association
9917 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
9918 stores with INTEGER_CST stores.
9919 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
9920 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
9921 and use it throughout. Generate bit insertion sequences if need be.
9922 (pass_store_merging::process_store): Remove redundant condition.
9923 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
9925 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
9927 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
9928 the 128-bit floating point types. Fix function comment.
9930 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9932 * config/aarch64/aarch64-simd.md
9933 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
9935 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
9938 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9940 PR tree-optimization/85989
9941 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
9943 (backprop::intersect_uses): Check it when deciding whether this
9944 is a backedge reference.
9945 (backprop::process_block): Add each phi to m_visited_phis
9946 after visiting it, then clear it at the end.
9948 2018-06-01 Richard Biener <rguenther@suse.de>
9950 * tree-vectorizer.h (vect_dr_stmt): New function.
9951 (vect_get_load_cost): Adjust.
9952 (vect_get_store_cost): Likewise.
9953 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
9954 Use vect_dr_stmt instead of DR_SMTT.
9955 (vect_record_base_alignments): Likewise.
9956 (vect_calculate_target_alignment): Likewise.
9957 (vect_compute_data_ref_alignment): Likewise and make static.
9958 (vect_update_misalignment_for_peel): Likewise.
9959 (vect_verify_datarefs_alignment): Likewise.
9960 (vector_alignment_reachable_p): Likewise.
9961 (vect_get_data_access_cost): Likewise. Pass down
9962 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
9963 (vect_get_peeling_costs_all_drs): Likewise.
9964 (vect_peeling_hash_get_lowest_cost): Likewise.
9965 (vect_enhance_data_refs_alignment): Likewise.
9966 (vect_find_same_alignment_drs): Likewise.
9967 (vect_analyze_data_refs_alignment): Likewise.
9968 (vect_analyze_group_access_1): Likewise.
9969 (vect_analyze_group_access): Likewise.
9970 (vect_analyze_data_ref_access): Likewise.
9971 (vect_analyze_data_ref_accesses): Likewise.
9972 (vect_vfa_segment_size): Likewise.
9973 (vect_small_gap_p): Likewise.
9974 (vectorizable_with_step_bound_p): Likewise.
9975 (vect_prune_runtime_alias_test_list): Likewise.
9976 (vect_analyze_data_refs): Likewise.
9977 (vect_supportable_dr_alignment): Likewise.
9978 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9979 (vect_gen_prolog_loop_niters): Likewise.
9980 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9981 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
9983 (vect_recog_mask_conversion_pattern): Likewise.
9984 (vect_try_gather_scatter_pattern): Likewise.
9985 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
9986 to vect_get_store_cost.
9987 (vect_get_store_cost): Get stmt_info instead of DR.
9988 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
9989 (vect_get_load_cost): Get stmt_info instead of DR.
9991 2018-06-01 Richard Biener <rguenther@suse.de>
9994 * gimple-fold.c (var_decl_component_p): Also allow offsetted
9995 vars wrapped in MEM_REFs.
9997 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9999 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10000 Fix subreg tests so that we only return a choice between
10001 GENERAL_REGS and FP_REGS if the original classes included both.
10003 2018-06-01 Richard Biener <rguenther@suse.de>
10006 * tree-ssa-structalias.c (get_function_part_constraint):
10007 Handle NULL fi->decl.
10008 (find_func_aliases_for_call): Properly handle indirect
10009 fi from direct call.
10010 (find_func_clobbers): Likewise.
10011 (ipa_pta_execute): Likewise.
10012 (create_variable_info_for): For functions that are ifunc_resolver
10013 resolve to a varinfo that contains the result of the resolver call.
10014 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10017 2018-05-31 Michael Collison <michael.collison@arm.com>
10019 * config/aarch64/aarch64.md:
10020 (*fix_to_zero_extenddfdi2): New pattern.
10021 * gcc.target/aarch64/fix_extend1.c: New testcase.
10023 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10025 PR middle-end/78809
10026 PR middle-end/83026
10027 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10028 and BUILT_IN_STRNCMP_EQ.
10029 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10030 BUILT_IN_STRNCMP_EQ.
10031 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10032 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10033 (gimple_fold_builtin): Likewise.
10034 * tree-ssa-strlen.c (compute_string_length): New function.
10035 (determine_min_obsize): New function.
10036 (handle_builtin_string_cmp): New function to handle calls to
10037 string compare functions.
10038 (strlen_optimize_stmt): Add handling to builtin string compare
10040 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10041 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10042 * tree.c (build_common_builtin_nodes): Add new defines of
10043 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10045 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10048 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10049 functions with naked attribute.
10051 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10053 * config/i386/sse.md (avx_vec_concat<mode>):
10054 Substitute concat_tg_mode mode attribute with xtg_mode.
10055 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10056 (concat_tg_mode): Remove mode attribute.
10058 2018-05-31 Martin Sebor <msebor@redhat.com>
10061 * calls.c (alloc_max_size): Correct a logic error/typo.
10062 Treat excessive arguments as infinite. Warn for invalid arguments.
10063 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10065 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10068 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10069 and movx for Haswell.
10071 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10072 Cesar Philippidis <cesar@codesourcery.com>
10074 PR middle-end/85879
10075 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10076 when emitting error on private/firstprivate reductions.
10077 * omp-low.c (lower_omp_target): Avoid reference-type processing
10078 on pointers for firstprivate clause.
10080 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10082 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10085 * config/aarch64/aarch64-simd.md
10086 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10087 (aarch64_ld1_x3_<mode>): Likewise
10088 (aarch64_st1x2<VALLDIF:mode>): Likewise
10089 (aarch64_st1_x2_<mode>): Likewise
10090 (aarch64_st1x3<VALLDIF:mode>): Likewise
10091 (aarch64_st1_x3_<mode>): Likewise
10092 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10093 (vld1_s8_x3): Likewise.
10094 (vld1_u16_x3): Likewise.
10095 (vld1_s16_x3): Likewise.
10096 (vld1_u32_x3): Likewise.
10097 (vld1_s32_x3): Likewise.
10098 (vld1_u64_x3): Likewise.
10099 (vld1_s64_x3): Likewise.
10100 (vld1_f16_x3): Likewise.
10101 (vld1_f32_x3): Likewise.
10102 (vld1_f64_x3): Likewise.
10103 (vld1_p8_x3): Likewise.
10104 (vld1_p16_x3): Likewise.
10105 (vld1_p64_x3): Likewise.
10106 (vld1q_u8_x3): Likewise.
10107 (vld1q_s8_x3): Likewise.
10108 (vld1q_u16_x3): Likewise.
10109 (vld1q_s16_x3): Likewise.
10110 (vld1q_u32_x3): Likewise.
10111 (vld1q_s32_x3): Likewise.
10112 (vld1q_u64_x3): Likewise.
10113 (vld1q_s64_x3): Likewise.
10114 (vld1q_f16_x3): Likewise.
10115 (vld1q_f32_x3): Likewise.
10116 (vld1q_f64_x3): Likewise.
10117 (vld1q_p8_x3): Likewise.
10118 (vld1q_p16_x3): Likewise.
10119 (vld1q_p64_x3): Likewise.
10120 (vst1_s64_x2): Likewise.
10121 (vst1_u64_x2): Likewise.
10122 (vst1_f64_x2): Likewise.
10123 (vst1_s8_x2): Likewise.
10124 (vst1_p8_x2): Likewise.
10125 (vst1_s16_x2): Likewise.
10126 (vst1_p16_x2): Likewise.
10127 (vst1_s32_x2): Likewise.
10128 (vst1_u8_x2): Likewise.
10129 (vst1_u16_x2): Likewise.
10130 (vst1_u32_x2): Likewise.
10131 (vst1_f16_x2): Likewise.
10132 (vst1_f32_x2): Likewise.
10133 (vst1_p64_x2): Likewise.
10134 (vst1q_s8_x2): Likewise.
10135 (vst1q_p8_x2): Likewise.
10136 (vst1q_s16_x2): Likewise.
10137 (vst1q_p16_x2): Likewise.
10138 (vst1q_s32_x2): Likewise.
10139 (vst1q_s64_x2): Likewise.
10140 (vst1q_u8_x2): Likewise.
10141 (vst1q_u16_x2): Likewise.
10142 (vst1q_u32_x2): Likewise.
10143 (vst1q_u64_x2): Likewise.
10144 (vst1q_f16_x2): Likewise.
10145 (vst1q_f32_x2): Likewise.
10146 (vst1q_f64_x2): Likewise.
10147 (vst1q_p64_x2): Likewise.
10148 (vst1_s64_x3): Likewise.
10149 (vst1_u64_x3): Likewise.
10150 (vst1_f64_x3): Likewise.
10151 (vst1_s8_x3): Likewise.
10152 (vst1_p8_x3): Likewise.
10153 (vst1_s16_x3): Likewise.
10154 (vst1_p16_x3): Likewise.
10155 (vst1_s32_x3): Likewise.
10156 (vst1_u8_x3): Likewise.
10157 (vst1_u16_x3): Likewise.
10158 (vst1_u32_x3): Likewise.
10159 (vst1_f16_x3): Likewise.
10160 (vst1_f32_x3): Likewise.
10161 (vst1_p64_x3): Likewise.
10162 (vst1q_s8_x3): Likewise.
10163 (vst1q_p8_x3): Likewise.
10164 (vst1q_s16_x3): Likewise.
10165 (vst1q_p16_x3): Likewise.
10166 (vst1q_s32_x3): Likewise.
10167 (vst1q_s64_x3): Likewise.
10168 (vst1q_u8_x3): Likewise.
10169 (vst1q_u16_x3): Likewise.
10170 (vst1q_u32_x3): Likewise.
10171 (vst1q_u64_x3): Likewise.
10172 (vst1q_f16_x3): Likewise.
10173 (vst1q_f32_x3): Likewise.
10174 (vst1q_f64_x3): Likewise.
10175 (vst1q_p64_x3): Likewise.
10177 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10179 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10180 user_label_prefix to name.
10182 * tree-core.h: Update comment about the format of NAME string
10183 passed to handler in attribute_spec.
10185 * config/msp430/msp430.md: Remove erroneous subreg expression from
10186 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10187 zero_extend{q,h}isi2.
10189 2018-05-30 Borislav Petkov <bp@suse.de>
10191 * doc/extend.texi: Document some architecture specific
10192 constraints and sort entries.
10194 2018-05-30 Martin Sebor <msebor@redhat.com>
10196 PR middle-end/85369
10197 * builtins.c (expand_builtin_stpcpy_1): New function.
10198 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10199 only if the former succeeds.
10201 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10203 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10206 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10208 * doc/invoke.texi (-flinker-output): Document
10210 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10212 * passes.c (ipa_write_summaries): Only modify statements if body
10214 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10215 incrementally linking.
10216 (ipa_passes): Likewise.
10217 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10218 pass down resolution info.
10219 * common.opt (flag_incremental_link): Update info.
10220 * gcc.c (plugin specs): Turn flinker-output=* to
10221 -plugin-opt=-linker-output-known
10222 * toplev.c (compile_file): Also cut compilation when doing incremental
10224 * flag-types. (enum lto_partition_model): Add
10225 LTO_LINKER_OUTPUT_NOLTOREL.
10226 (invoke.texi): Add -flinker-output docs.
10227 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10228 link same way as WPA; do not stream in dead initializers.
10230 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10231 darf2out_register_external_decl): Support incremental link.
10233 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10235 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10237 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10239 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10240 it down to simple_object_copy_lto_debug_sections.
10241 (run_gcc): Determine incremental LTO link time and configure
10242 lto1 into non-wpa mode, disable renaming of debug sections.
10244 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10246 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10247 descriptions of various incorrectly documented functions.
10249 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10252 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10253 address check not strict.
10255 2018-05-30 Richard Biener <rguenther@suse.de>
10257 PR tree-optimization/85964
10258 * tracer.c (better_p): Drop initialized count check, we only
10259 call the function with initialized counts now.
10260 (find_best_successor): Do find a best edge if one
10261 has uninitialized count.
10262 (find_best_predecessor): Likewise. Do BB frequency check only
10263 if count is initialized.
10265 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10267 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10268 (aarch64_ldrstr_offset_compare): New.
10269 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10270 load/store orderings.
10271 (aarch64_gen_adjusted_ldpstp): Likewise.
10273 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
10275 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10276 Check for subset of GENERAL_REGS and FP_REGS.
10277 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10280 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
10282 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10283 and wi::to_poly_offset. Add the current offset and then check
10284 whether the sum fits, rather than using an unchecked addition of
10285 a checked term. Check for a shwi rather than a uhwi.
10286 * expr.c (get_bit_range): Use tree_to_poly_uint64.
10287 (store_constructor): Use poly_int_tree_p.
10288 (expand_expr_real_1): Likewise.
10289 * function.c (assign_temp): Likewise.
10290 * fold-const.c (const_binop): Use poly_int_tree_p and
10291 wi::to_poly_offset.
10292 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
10294 * ipa-icf-gimple.c (func_checker::compare_operand): Use
10295 to_poly_offset for MEM offsets.
10296 * ipa-icf.c (sem_variable::equals): Likewise.
10297 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10298 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10299 wi::to_poly_offset for BIT_FIELD_REF offsets.
10300 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10301 wi::to_poly_offset.
10302 * var-tracking.c (emit_note_insn_var_location): Use
10303 tree_to_poly_uint64.
10305 2018-05-29 Jim Wilson <jimw@sifive.com>
10307 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10309 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
10312 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10313 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10315 (sse4_1_round<mode>2): Use nonimmediate_operand
10316 for operand 1 predicate.
10318 2018-05-29 Martin Sebor <msebor@redhat.com>
10319 Richard Biener <rguenther@suse.de>
10322 * calls.c (get_size_range): Call determine_value_range instead
10323 of get_value_range..
10324 * tree-vrp.h (determine_value_range): Declared new function.
10325 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10327 2018-05-29 Richard Biener <rguenther@suse.de>
10329 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10330 sure to use non-pattern stmts for get_earlier_stmt arguments.
10331 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10332 called on pattern stmts.
10333 (get_later_stmt): Likewise.
10335 2018-05-29 Martin Liska <mliska@suse.cz>
10337 PR gcov-profile/85759
10338 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10341 2018-05-29 Jakub Jelinek <jakub@redhat.com>
10343 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10345 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10349 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10350 VEC_PACK_FLOAT_EXPR): New tree codes.
10351 * tree-pretty-print.c (op_code_prio): Handle
10352 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10353 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10354 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10355 * tree-inline.c (estimate_operator_cost): Likewise.
10356 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10357 * fold-const.c (const_binop): Likewise.
10358 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10359 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10360 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10361 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10362 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10363 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10364 * expr.c (expand_expr_real_2): Likewise.
10365 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10366 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10367 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10369 * optabs.c (expand_widen_pattern_expr): For
10370 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10371 sign from result type rather than operand's type.
10372 (expand_binop_directly): For vec_packu_float_optab and
10373 vec_packs_float_optab allow result type to be different from operand's
10375 * optabs-tree.c (optab_for_tree_code): Handle
10376 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10377 VEC_PACK_FLOAT_EXPR. Formatting fixes.
10378 * tree-vect-generic.c (expand_vector_operations_1): Handle
10379 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10380 VEC_PACK_FLOAT_EXPR.
10381 * tree-vect-stmts.c (supportable_widening_operation): Handle
10383 (supportable_narrowing_operation): Handle FLOAT_EXPR.
10384 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10385 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10386 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
10387 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10389 (vec_pack<floatprefix>_float_<mode>): New expander.
10390 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10392 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10393 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10394 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10395 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10396 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10398 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10399 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10400 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10401 VEC_PACK_FLOAT_EXPR): Document.
10403 2018-05-29 Richard Biener <rguenther@suse.de>
10405 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10407 (stmt_vec_info_vec): Make pointer.
10408 (init_stmt_vec_info_vec): Remove.
10409 (free_stmt_vec_info_vec): Likewise.
10410 (set_stmt_vec_info_vec): New function.
10411 (free_stmt_vec_infos): Likewise.
10412 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10413 (set_vinfo_for_stmt): Likewise.
10414 (get_earlier_stmt): Likewise.
10415 (get_later_stmt): Likewise.
10416 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10417 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10418 (vec_info::~vec_info): Free stmt_vec_infos.
10419 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10420 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10421 (pass_slp_vectorize::execute): Likewise.
10422 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10423 (free_stmt_vec_info_vec): Likewise.
10424 (set_stmt_vec_info_vec): New function.
10425 (free_stmt_vec_infos): Likewise.
10426 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10427 the global stmt_vec_info_vec.
10428 * tree-parloops.c (gather_scalar_reductions): Use
10429 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10432 2018-05-29 Richard Biener <rguenther@suse.de>
10434 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10436 2018-05-29 Martin Liska <mliska@suse.cz>
10437 David Malcolm <dmalcolm@redhat.com>
10439 * vec.c (test_reverse): New.
10440 (vec_c_tests): Add new test.
10441 * vec.h (vl_ptr>::reverse): New function.
10443 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
10445 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10447 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10450 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
10452 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10454 2018-05-28 Richard Biener <rguenther@suse.de>
10456 PR tree-optimization/85933
10457 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10458 look at stmts marked as vectorizable.
10460 2018-05-28 Richard Biener <rguenther@suse.de>
10462 PR tree-optimization/85934
10463 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10464 vector boolean check before scalar optimization.
10466 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10468 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10471 2018-05-28 Mark Wielaard <mark@klomp.org>
10473 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10474 if it is an expression containing a minus sign.
10476 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
10478 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10480 2018-05-27 Paul Koning <ni1d@arrl.net>
10482 * config/pdp11/pdp11.md (truncsihi2): Remove.
10484 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
10485 Chung-Ju Wu <jasonwucj@gmail.com>
10487 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10489 (unaligned_store_dw): Ditto.
10490 * config/nds32/nds32-memory-manipulation.c
10491 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10492 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10493 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10494 (emit_setmem_word_loop): Rename to ...
10495 (emit_setmem_doubleword_loop): ... this.
10496 (nds32_gen_dup_4_byte_to_word_value): New function.
10497 (nds32_gen_dup_8_byte_to_double_word_value): New function.
10498 (nds32_expand_setmem_loop): Refine implementation.
10499 (nds32_expand_setmem_loop_v3m): Ditto.
10500 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10503 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10505 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10507 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10509 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10510 (nds32_init_machine_status): Initialize machine->attr_naked_p and
10511 machine->attr_no_prologue_p.
10512 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10513 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10514 (nds32_expand_epilogue): Consider attr_naked_p.
10515 (nds32_expand_epilogue_v3pop): Likewise.
10516 (nds32_can_use_return_insn): Likewise.
10517 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10518 attr_no_prologue_p fields.
10519 * config/nds32/nds32.opt (mret-in-naked-func): New option.
10521 2018-05-27 Jakub Jelinek <jakub@redhat.com>
10524 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10526 * config/i386/sse.md
10527 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10529 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10531 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10533 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10535 (*<floatsuffix>floatv2div2sf2): Rename to ...
10536 (*float<floatunssuffix>v2div2sf2): ... this.
10537 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10538 (float<floatunssuffix>v2div2sf2_mask): ... this.
10539 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10540 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10541 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10543 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10545 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10547 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10549 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10551 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10553 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10554 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10555 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10556 gen_ufix_truncv8dfv8si2.
10557 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10558 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10559 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10560 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10561 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10562 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10563 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10564 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10566 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10570 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10572 2018-05-25 Jim Wilson <jimw@sifive.com>
10574 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10575 * config/riscv/riscv.c (struct machine_function): Add
10576 interrupt_handler_p and attribute_checked_p fields.
10577 (riscv_attribute_table): Add interrupt.
10578 (riscv_interrupt_type_p): New.
10579 (riscv_save_reg_p): Save extra regs for interrupt handler.
10580 (riscv_use_save_libcall): Return false for interrupt handler.
10581 (riscv_first_stack_step): Add forward declaration.
10582 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
10583 for interrupt handler with large frame. Use it for saved reg list.
10584 (riscv_expand_prologue): Move flag_stack_usage_info support to
10585 eliminate duplication.
10586 (riscv_expand_epilogue): Generate mret for interrupt handler.
10587 (riscv_epilogue_uses): New.
10588 (riscv_can_use_return_insn): Return false for interrupt handler.
10589 (riscv_function_ok_for_sibcall): Likewise.
10590 (riscv_set_current_function): Add interrupt handler support.
10591 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10592 * config/riscv/riscv.md (UNSPECV_MRET): New.
10594 (riscv_frflags, riscv_fsflags): Use tab after opcode.
10596 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10598 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
10600 PR tree-optimization/85712
10601 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10602 this candidate has already been replaced in-situ by a copy.
10604 2018-05-25 Jason Merrill <jason@redhat.com>
10606 PR c++/80485 - inline function non-zero address.
10607 * symtab.c (nonzero_address): Check DECL_COMDAT.
10609 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
10612 * config/alpha/alpha.md (ashlsi3): New insn pattern.
10613 (*ashlsi_se): Rename from *ashldi_se. Define as sign
10614 extension of SImode operation. Use const123_operand predicate.
10615 (*saddsi_1): Remove.
10616 (*saddl_se_1): Ditto.
10617 (*ssubsi_1): Ditto.
10618 (*ssubl_se_1): Ditto.
10619 * config/alpha/predicates.md (const123_operand): New predicate.
10620 * config/alpha/constraints.md (P): Use IN_RANGE.
10622 2018-05-25 Richard Biener <rguenther@suse.de>
10624 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10626 (ref_maybe_used_by_stmt_p): Likewise.
10627 (stmt_may_clobber_ref_p): Likewise.
10628 (stmt_may_clobber_ref_p_1): Likewise.
10629 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10631 (ref_maybe_used_by_stmt_p): Likewise.
10632 (stmt_may_clobber_ref_p): Likewise.
10633 (stmt_may_clobber_ref_p_1): Likewise.
10634 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10635 the alias oracle to disambiguate DRs with stmts DR analysis
10637 (vect_analyze_data_refs): Do not give up on not analyzable
10638 DRs for BB vectorization. Remove code truncating the dataref
10641 2018-05-25 Jakub Jelinek <jakub@redhat.com>
10644 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10645 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
10646 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10648 2018-05-25 Richard Biener <rguenther@suse.de>
10650 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10651 function, combining stmt data ref gathering and fatal analysis
10653 (vect_analyze_data_refs): Remove now redudnant code and simplify.
10654 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10655 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10656 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10657 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10659 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10661 PR tree-optimization/85720
10662 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10663 SCC if all partitions are builtins.
10664 (version_loop_by_alias_check): New parameter. Generate cancelable
10665 runtime alias check if all partitions are builtins.
10666 (distribute_loop): Update call to above function.
10668 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10670 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10671 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10672 (parm_default_def_partition_arg): Ditto.
10673 (set_parm_default_def_partition): Ditto.
10674 (get_parm_default_def_partitions): Ditto and make it static.
10675 (get_undefined_value_partitions): Ditto and make it static.
10676 (remove_ssa_form): Refactor call to init_var_map here.
10677 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10678 computation for loop region.
10679 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10680 (register_default_def): Delete.
10681 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10682 (parm_default_def_partition_arg): Ditto.
10683 (set_parm_default_def_partition): Ditto.
10684 (get_parm_default_def_partitions): Ditto and make it static.
10685 (get_undefined_value_partitions): Ditto and make it static.
10686 (coalesce_with_default, coalesce_with_default): Update comment.
10687 (create_coalesce_list_for_region): New func factored out from
10688 create_outofssa_var_map.
10689 (populate_coalesce_list_for_outofssa): New func factored out from
10690 create_outofssa_var_map and coalesce_ssa_name.
10691 (create_outofssa_var_map): Delete.
10692 (coalesce_ssa_name): Refactor to support live range computation.
10693 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10694 (get_parm_default_def_partitions): Delete.
10695 (get_undefined_value_partitions): Ditto.
10696 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10697 computation for loop region.
10698 (new_tree_live_info, loe_visit_block): Ditto.
10699 (live_worklist, set_var_live_on_entry): Ditto.
10700 (calculate_live_on_exit, verify_live_on_entry): Ditto.
10701 * tree-ssa-live.h (struct _var_map): New fields.
10702 (init_var_map): Change decl.
10703 (region_contains_p): New.
10705 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10707 * tree-ssa-live.h (live_merge_and_clear): Delete.
10709 2018-05-25 Richard Biener <rguenther@suse.de>
10712 * tree-dump.c (dequeue_and_dump): Remove access to removed
10713 operand 2 of a SWITCH_EXPR.
10715 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10717 * doc/sourcebuild.texi (vect_double_cond_arith): Include
10718 multiplication and division.
10719 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
10720 (cond_udiv@var{m}, cond_umod@var{m}): Document.
10721 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
10722 (cond_udiv_optab, cond_umod_optab): New optabs.
10723 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10724 (IFN_COND_RDIV): New internal functions.
10725 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
10726 TRUNC_MOD_EXPR and RDIV_EXPR.
10727 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
10728 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
10730 (SVE_INT_BINARY): Include mult.
10731 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
10732 (optab, sve_int_op): Handle mult.
10733 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
10735 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
10736 for SVE_INT_BINARY_SD.
10738 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10740 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
10741 (optab, sve_int_op): Handle div and udiv.
10742 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
10743 for SVE_INT_BINARY_SD.
10744 (*<optab><mode>3): New insn for the same.
10746 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10748 * tree-vect-patterns.c: Include predict.h.
10749 (vect_recog_divmod_pattern): Restrict check for division support
10750 to when optimizing for size.
10752 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10754 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10755 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10756 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10757 (gimple_match_op::set_op): Likewise.
10758 (gimple_resimplify4): Declare.
10759 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10760 (expr::gen_transform): Likewise.
10761 (decision_tree::gen): Generate a simplification routine for 4 operands.
10762 * gimple-match-head.c (gimple_simplify): Add an overload for
10763 4 operands. In the top-level function, handle up to 4 call
10764 arguments and call gimple_resimplify4.
10765 (gimple_resimplify4): New function.
10766 (build_call_internal): Pass a fourth operand.
10767 (maybe_push_to_seq): Likewise.
10768 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10769 Fold VEC_COND_EXPRs of an operation and a default value into
10770 an IFN_COND_* function if possible.
10771 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10773 (SVE_COND_FP_BINARY): Include them.
10774 (optab, sve_fp_op): Handle them.
10775 (SVE_INT_BINARY_REV): New code iterator.
10776 (SVE_COND_FP_BINARY_REV): New int iterator.
10777 (commutative): New int attribute.
10778 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10780 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10782 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10783 (*cond_<optab><mode>): New patterns for reversed operands.
10785 2018-05-25 Richard Biener <rguenther@suse.de>
10787 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10788 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10789 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10790 (STMT_VINFO_GROUPED_ACCESS): Adjust.
10791 * tree-vect-data-refs.c (everywhere): Adjust users.
10792 * tree-vect-loop.c (everywhere): Likewise.
10793 * tree-vect-slp.c (everywhere): Likewise.
10794 * tree-vect-stmts.c (everywhere): Likewise.
10795 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10797 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10799 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10801 (gcc_cv_as_section_exclude): ... this.
10802 Try Solaris as #exclude syntax.
10803 * configure: Regenerate.
10804 * config.in: Regenerate.
10805 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10807 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
10808 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
10810 * varasm.c (default_elf_asm_named_section): Don't check if
10811 HAVE_GAS_SECTION_EXCLUDE is defined.
10813 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10815 * doc/md.texi: Update the documentation of the cond_* optabs
10816 to mention the new final operand. Fix GET_MODE_NUNITS call.
10817 Describe the scalar case too.
10818 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
10819 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
10821 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
10822 (get_conditional_internal_fn): Update comment.
10823 * tree-vect-loop.c (vectorizable_reduction): Pass the original
10824 accumulator value as a final argument to conditional functions.
10825 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
10826 a define_expand and add an "else" operand. Assert for now that
10827 the else operand is equal to operand 2. Use SVE_INT_BINARY and
10828 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
10829 (*cond_<optab><mode>): New patterns.
10830 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
10831 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10832 (UNSPEC_COND_EOR): Delete.
10833 (optab): Remove associated mappings.
10834 (SVE_INT_BINARY): New code iterator.
10835 (sve_int_op): Remove int attribute and add "minus" to the code
10837 (SVE_COND_INT_OP): Delete.
10838 (SVE_COND_FP_OP): Rename to...
10839 (SVE_COND_FP_BINARY): ...this.
10841 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10843 * optabs.c (can_reuse_operands_p): New function.
10844 (maybe_legitimize_operands): Try to reuse the results for
10847 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10849 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
10850 Add {q} suffix to insn mnemonic.
10852 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10854 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
10855 (msp430_warn_func_return): New.
10857 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
10859 * fold-const.c (tree_nonzero_bits): New function.
10860 * fold-const.h (tree_nonzero_bits): Likewise.
10861 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
10862 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
10864 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10868 * varasm.c (assemble_alias): Check ifunc_resolver only on
10871 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10874 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
10875 when memory input operand is handled.
10877 2018-05-24 Luis Machado <luis.machado@linaro.org>
10879 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
10881 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
10883 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10885 * match.pd: Delay FMA folds until after vectorization.
10887 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
10890 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10891 address check not strict.
10893 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10895 * gimple-match.h (gimple_match_op): New class.
10896 (mprts_hook): Replace parameters with a gimple_match_op *.
10897 (maybe_build_generic_op): Likewise.
10898 (gimple_simplified_result_is_gimple_val): Replace parameters with
10899 a const gimple_match_op *.
10900 (gimple_simplify): Replace code_helper * and tree * parameters with
10901 a gimple_match_op * parameter.
10902 (gimple_resimplify1): Replace code_helper *, tree and tree *
10903 parameters with a gimple_match_op * parameter.
10904 (gimple_resimplify2): Likewise.
10905 (gimple_resimplify3): Likewise.
10906 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
10907 parameters with a gimple_match_op * parameter.
10908 * gimple-match-head.c (gimple_simplify): Change prototypes of
10909 auto-generated functions to take a gimple_match_op * instead of
10910 separate code_helper * and tree * parameters. Make the same
10911 change in the top-level overload and update calls to the
10912 gimple_resimplify routines. Update calls to the auto-generated
10913 functions and to maybe_push_res_to_seq in the publicly-facing
10914 operation-specific gimple_simplify overloads.
10915 (gimple_match_op::MAX_NUM_OPS): Define.
10916 (gimple_resimplify1): Replace rcode and ops with a single res_op
10917 parameter. Update call to gimple_simplify.
10918 (gimple_resimplify2): Likewise.
10919 (gimple_resimplify3): Likewise.
10920 (mprts_hook): Replace parameters with a gimple_match_op *.
10921 (maybe_build_generic_op): Likewise.
10922 (build_call_internal): Replace type, nargs and ops with
10923 a gimple_match_op *.
10924 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
10925 with a single gimple_match_op *. Update calls to mprts_hook,
10926 build_call_internal and gimple_simplified_result_is_gimple_val.
10927 Factor out code that is common to the tree_code and combined_fn cases.
10928 * genmatch.c (expr::gen_transform): Replace tem_code and
10929 tem_ops with a gimple_match_op called tem_op. Update calls
10930 to the gimple_resimplify functions and maybe_push_res_to_seq.
10931 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
10932 res_ops. Update call to the gimple_resimplify functions.
10933 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
10934 (decision_tree::gen): Make the functions take a gimple_match_op *
10935 called res_op instead of separate res_code and res_ops parameters.
10936 Update call accordingly.
10937 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
10938 and ops with a single res_op parameter. Update calls to
10939 maybe_build_generic_op and maybe_push_res_to_seq.
10940 (fold_stmt_1): Update calls to gimple_simplify and
10941 replace_stmt_with_simplification.
10942 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
10943 and gimple_simplified_result_is_gimple_val.
10944 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
10946 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
10947 with a gimple_match_op *.
10948 (vn_nary_build_or_lookup): Likewise. Update call to
10949 vn_nary_build_or_lookup_1.
10950 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
10951 gimple_match_op *. Update calls to the gimple_resimplify routines
10952 and to gimple_simplified_result_is_gimple_val.
10953 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
10954 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
10955 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
10956 (visit_nary_op): Likewise.
10957 (visit_reference_op_load): Likewise.
10959 2018-05-23 Luis Machado <luis.machado@linaro.org>
10961 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
10962 modifier for printing the step amount.
10964 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
10967 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
10970 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
10972 * doc/sourcebuild.texi (Endianness): New subsubsection.
10974 2018-05-23 Luis Machado <luis.machado@linaro.org>
10976 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10977 <prefetch_dynamic_strides>: New const bool field.
10978 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10979 prefetch_dynamic_strides.
10980 (exynosm1_prefetch_tune): Likewise.
10981 (thunderxt88_prefetch_tune): Likewise.
10982 (thunderx_prefetch_tune): Likewise.
10983 (thunderx2t99_prefetch_tune): Likewise.
10984 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
10986 (aarch64_override_options_internal): Update to set
10987 PARAM_PREFETCH_DYNAMIC_STRIDES.
10988 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10989 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10990 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10991 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10992 prefetch-dynamic-strides setting.
10994 2018-05-23 Luis Machado <luis.machado@linaro.org>
10996 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10997 <minimum_stride>: New const int field.
10998 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10999 minimum_stride field defaulting to -1.
11000 (exynosm1_prefetch_tune): Likewise.
11001 (thunderxt88_prefetch_tune): Likewise.
11002 (thunderx_prefetch_tune): Likewise.
11003 (thunderx2t99_prefetch_tune): Likewise.
11004 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11005 <default_opt_level>: Set to 3.
11006 (aarch64_override_options_internal): Update to set
11007 PARAM_PREFETCH_MINIMUM_STRIDE.
11008 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11009 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11010 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11011 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11012 stride is constant and is below the minimum stride threshold.
11014 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11016 * config/arm/arm-cpus.in (mode26): Delete.
11017 (armv4): Delete mode26 reference.
11018 * config/arm/arm.c (arm_configure_build_target): Delete use of
11021 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11023 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11025 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11026 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11028 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11029 (floatunsdidf2): Ditto.
11031 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11033 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11034 (fixuns_trunc<mode>si2_avx512f): Ditto.
11035 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11036 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11037 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11039 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11041 PR rtl-optimization/79985
11042 * df-scan.c (df_insn_refs_collect): Remove special case for
11043 global registers and asm statements.
11045 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11047 * extend.texi (Global Register Variables): Rewrite the bullet list.
11048 Note that the register is available for allocation. Note that access
11049 via inline asm must use constraints. Add note about async-signal
11050 handlers. Remove paragraph about automagic register selection.
11052 2018-05-23 Richard Biener <rguenther@suse.de>
11054 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11055 of fixed offset from memset VN.
11057 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11059 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11060 first_interp field.
11061 (alloc_cand_and_find_basis): Initialize first_interp field.
11062 (slsr_process_mul): Modify first_interp field.
11063 (slsr_process_add): Likewise.
11064 (slsr_process_cast): Modify first_interp field for each new
11066 (slsr_process_copy): Likewise.
11067 (dump_candidate): Dump first_interp field.
11068 (replace_mult_candidate): Process all interpretations, not just
11070 (replace_rhs_if_not_dup): Likewise.
11071 (replace_one_candidate): Likewise.
11073 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11075 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11077 (aarch64_needs_frame_chain): New function.
11078 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11080 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11083 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11084 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11085 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11086 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11087 as true for strict-align.
11088 (aarch64_can_inline_p): Perform checks even when callee has no
11089 attributes to check for strict alignment.
11090 * doc/extend.texi (AArch64 Function Attributes): Document
11092 * doc/invoke.texi: (AArch64 Options): Likewise.
11094 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11096 PR tree-optimization/85853
11097 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11098 the handling of the root of the node to...
11099 (vect_slp_analyze_node_operations_1): ...this new function,
11100 and run the whole thing with the child nodes' def types
11101 set according to their SLP node's def type.
11103 2018-05-23 Richard Biener <rguenther@suse.de>
11105 PR middle-end/85874
11106 * tree-data-ref.c (create_runtime_alias_checks): Defer
11107 and ignore overflow warnings.
11109 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11111 PR tree-optimization/85822
11112 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11115 2018-05-23 Richard Biener <rguenther@suse.de>
11117 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11118 memset constants via native_interpret_expr.
11120 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11123 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11125 (cgraph_node::create_alias): Likewise.
11126 (cgraph_node::get_availability): Check ifunc_resolver instead
11127 of looking up ifunc attribute.
11128 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11129 * varasm.c (do_assemble_alias): Likewise.
11130 (assemble_alias): Likewise.
11131 (default_binds_local_p_3): Likewise.
11132 * cgraph.h (cgraph_node): Add ifunc_resolver.
11133 (cgraph_node::only_called_directly_or_aliased_p): Return false
11134 for IFUNC resolver.
11135 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11137 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11138 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11139 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11140 instead of looking up ifunc attribute.
11142 2018-05-22 Luis Machado <luis.machado@linaro.org>
11144 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11146 2018-05-22 Martin Sebor <msebor@redhat.com>
11148 PR middle-end/85359
11149 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11150 only when expasion succeeds.
11151 (expand_builtin_strcmp): Same.
11152 (expand_builtin_strncmp): Same.
11154 2018-05-22 Martin Sebor <msebor@redhat.com>
11156 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11158 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11159 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11161 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11162 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11164 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11165 Add check for legitimate_address.
11166 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11167 (aarch64_swap_ldrstr_operands): New.
11168 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11171 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11172 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11174 * config/aarch64/aarch64.md: New patterns to generate stp
11176 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11177 single words and double words.
11178 (load_pair_sw, load_pair_dw): Likewise.
11179 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11181 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11183 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11184 for different mode ldpstp and add peephole for merged zero stores.
11185 Likewise for loads.
11186 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11188 (aarch64_gen_store_pair): Rename calls to match new patterns.
11189 (aarch64_gen_load_pair): Rename calls to match new patterns.
11190 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11191 (load_pair<DREG:mode><DREG2:mode>): ... This.
11192 (store_pair<mode>): Rename to...
11193 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11194 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11195 New mode iterators.
11196 (V_INT_EQUIV): Handle SImode.
11197 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11200 2018-05-22 Martin Sebor <msebor@redhat.com>
11203 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11204 or ajust the presumed bound on an operation to avoid unnecessary
11207 2018-05-22 Martin Sebor <msebor@redhat.com>
11209 PR tree-optimization/85826
11210 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11211 assuming that a DECL necesarily has a constant size.
11213 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11215 PR middle-end/85862
11216 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11218 2018-05-22 Richard Biener <rguenther@suse.de>
11220 PR tree-optimization/85834
11221 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11222 non-constant and non-zero memset arguments.
11224 2018-05-22 Martin Liska <mliska@suse.cz>
11227 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11229 2018-05-22 Richard Biener <rguenther@suse.de>
11231 PR tree-optimization/85863
11232 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11233 comparisons when vectype is specified.
11234 (vectorizable_condition): Do not specify vectype for
11235 vect_is_simple_cond when SLP vectorizing.
11237 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11240 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11241 define __ibm128 as long double.
11242 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11243 as a distinct type when IEEE 128-bit support is enabled.
11244 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11245 128-bit types to use the correct functions.
11246 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11247 convert between 128-bit floating point types that have different
11248 modes but the same representation, instead of using gen_lowpart to
11250 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11252 (IFKF_reg): New attributes to give the register constraints for
11254 (extend<mode>tf2_internal): New insns to mark an explicit
11255 conversion between 128-bit floating point types that have a
11256 different mode but share the same representation.
11258 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11260 PR tree-optimization/85814
11261 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11262 a null return from get_strinfo when unsharing the next
11263 strinfo in the chain.
11265 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11268 * varasm.c (weak_finish): Clean up weak_decls.
11270 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11272 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11273 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11274 UNSPEC_UADALP values.
11275 * config/aarch64/iterators.md (ABAL): New int iterator.
11278 (sur): Add mappings for the above.
11279 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11281 (aarch64_<sur>abal<mode>_4): Likewise.
11282 (aarch64_<sur>adalp<mode>_3): Likewise.
11283 (<sur>sadv16qi): New define_expand.
11285 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
11287 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11288 (*movdf_internal): Ditto.
11289 (*rcpsf2_sse): Ditto.
11290 (*rsqrtsf2_sse): Ditto.
11291 (*sqrt<mode>2_sse): Ditto.
11293 2018-05-21 Tamar Christina <tamar.christina@arm.com>
11295 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11297 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11298 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11299 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11300 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11302 * config/aarch64/arm_neon.h: Likewise.
11303 * config/aarch64/iterators.md (VQ_I): New.
11305 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
11307 * config.gcc: Add arc/t-multilib-linux to tmake_file for
11309 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11312 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11314 * config/nds32/constraints.md (S): New constraint.
11315 * config/nds32/nds32.md (call_internal): Use constraint S.
11316 (call_value_internal): Likewise.
11317 (sibcall_internal): Likewise.
11318 (sibcall_value_internal): Likewise.
11320 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11321 Chung-Ju Wu <jasonwucj@gmail.com>
11323 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11324 into consideration.
11326 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11327 Chung-Ju Wu <jasonwucj@gmail.com>
11329 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11330 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11331 (nds32_rtx_costs_impl): Simplify.
11332 (nds32_address_cost_impl): Simplify.
11333 (nds32_init_rtx_costs): New function.
11334 (nds32_rtx_costs_speed_prefer): Likewise.
11335 (nds32_rtx_costs_size_prefer): Likewise.
11336 (nds32_address_cost_speed_prefer): Likewise.
11337 (nds32_address_cost_speed_fwprop): Likewise.
11338 (nds32_address_cost_size_prefer): Likewise.
11339 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11340 * config/nds32/nds32.c (nds32_option_override): Use
11341 nds32_init_rtx_costs function.
11343 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11345 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11346 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11347 (TARGET_PIPELINE_N8): Likewise.
11348 (TARGET_PIPELINE_N10): Likewise.
11349 (TARGET_PIPELINE_N13): Likewise.
11350 (TARGET_PIPELINE_GRAYWOLF): Likewise.
11352 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
11354 * config/nds32/nds32-fpu.md: Update copyright year.
11356 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11358 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11360 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11362 * config/nds32/nds32.c
11363 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11364 * config/nds32/nds32.opt (minline-asm-r15): New option.
11366 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11368 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11370 * config/nds32/nds32.md (abssi2): New pattern.
11372 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
11374 * config/i386/i386.md (rex64namesuffix): New mode attribute.
11375 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11376 Merge insn pattern from sse_cvtsi2ss<round_name> and
11377 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11378 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11379 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11380 using SWI48 mode iterator.
11381 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11382 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11383 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11384 pattern from sse_cvttss2si<round_saeonly_name>
11385 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11386 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11387 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11388 using SWI48 mode iterator.
11389 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11390 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11391 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11392 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11393 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11394 using SWI48 mode iterator.
11395 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11396 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11397 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11398 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11399 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11400 SWI48 mode iterator.
11401 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11402 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11403 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11404 pattern from sse_cvttsd2si<round_saeonly_name>
11405 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11407 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11409 * config/nds32/nds32-md-auxiliary.c
11410 (nds32_valid_smw_lwm_base_p): Refine.
11411 (nds32_output_smw_single_word): Refine.
11412 (nds32_output_smw_double_word): New.
11413 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11415 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11417 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11418 (nds32_output_stack_pop): Refine.
11419 (nds32_expand_unaligned_load): Refine.
11420 (nds32_expand_unaligned_store): Refine.
11422 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11423 Chung-Ju Wu <jasonwucj@gmail.com>
11425 * config/nds32/constants.md: Add TP_REGNUM constant.
11426 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11427 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11429 * config/nds32/nds32-doubleword.md: Consider flag_pic.
11430 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11431 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11432 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11433 and PIC code generation.
11434 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11436 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11438 * config/nds32/nds32.md: Support TLS and PIC.
11439 * config/nds32/nds32.c: Support TLS and PIC.
11440 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11441 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11444 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11446 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11447 mode with E_ prefix.
11449 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11450 Chung-Ju Wu <jasonwucj@gmail.com>
11452 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11453 * config/nds32/nds32-md-auxiliary.c
11454 (symbolic_reference_mentioned_p): New.
11455 (nds32_legitimize_ict_address): New.
11456 (nds32_expand_ict_move): New.
11457 (nds32_indirect_call_referenced_p): New.
11458 (nds32_symbol_binds_local_p): Delete.
11459 (nds32_long_call_p): Modify.
11460 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11461 * config/nds32/nds32-protos.h
11462 (symbolic_reference_mentioned_p): Declare.
11463 (nds32_legitimize_ict_address): Declare.
11464 (nds32_expand_ict_move): Declare.
11465 (nds32_indirect_call_referenced_p): Declare.
11466 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11467 (nds32_relax_group): Use nds32_ict_const_p as condition.
11468 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11469 (nds32_asm_file_start): Output ict_model directive in asm code.
11470 (nds32_legitimate_address_p): Consider indirect call.
11471 (nds32_print_operand): Consider indirect call.
11472 (nds32_print_operand_address): Consider indirect call.
11473 (nds32_insert_attributes): Handle "indirect_call" attribute.
11474 (TARGET_LEGITIMATE_ADDRESS_P): Define.
11475 (TARGET_LEGITIMATE_CONSTANT_P): Define.
11476 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11477 (TARGET_DELEGITIMIZE_ADDRESS): Define.
11478 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11479 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11480 (TARGET_ICT_MODEL_SMALL): Define.
11481 (TARGET_ICT_MODEL_LARGE): Define.
11482 * config/nds32/nds32.md (movsi): Consider ict model.
11483 (call, call_value): Consider ict model.
11484 (sibcall, sibcall_value): Consider ict model.
11485 * config/nds32/nds32.opt (mict-model): New option.
11486 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11489 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
11490 Monk Chiang <sh.chiang04@gmail.com>
11491 Jim Wilson <jimw@sifive.com>
11493 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11494 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
11495 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11496 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11497 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
11498 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11499 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11500 compute save_libcall_adjustment properly.
11501 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11502 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11503 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11504 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11505 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11506 (ABI_SPEC): Handle mabi=ilp32e.
11507 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11508 (RVE): Add RVE mask.
11509 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11510 <-march>: Add rv32e as an example.
11512 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
11515 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11516 (intra_create_variable_infos): Handle C++ constructors.
11518 2018-05-18 Martin Liska <mliska@suse.cz>
11520 * passes.def: Remove a redundant pass.
11522 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
11525 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11527 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11529 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11531 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11533 (armv2, armv2a, armv3, armv3m): Delete architectures.
11534 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11535 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11536 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11538 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11539 (*mulsidi3adddi): Likewise.
11540 (mulsidi3): Likewise.
11541 (*mulsidi3_nov6): Likewise.
11542 (umulsidi3): Likewise.
11543 (umulsidi3_nov6): Likewise.
11544 (umaddsidi4): Likewise.
11545 (*umulsidi3adddi): Likewise.
11546 (smulsi3_highpart): Likewise.
11547 (*smulsi3_highpart_nov6): Likewise.
11548 (umulsi3_highpart): Likewise.
11549 (*umulsi3_highpart_nov6): Likewise.
11550 * config/arm/arm.h (arm_arch3m): Delete.
11551 * config/arm/arm.c (arm_arch3m): Delete.
11552 (arm_option_override_internal): Update armv3-related comment.
11553 (arm_configure_build_target): Delete use of isa_bit_mode32.
11554 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11555 (arm_rtx_costs_internal): Delete check of arm_arch3m.
11556 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11557 (mulsa3): Likewise.
11558 (mulusa3): Likewise.
11559 * config/arm/arm-protos.h (arm_arch3m): Delete.
11560 * config/arm/arm-tables.opt: Regenerate.
11561 * config/arm/arm-tune.md: Likewise.
11562 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11563 deleted architectures.
11565 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11567 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11568 (armv5t, armv5te): New features.
11569 (ARMv5, ARMv5e): Delete fgroups.
11570 (ARMv5t, ARMv5te): Adjust for above changes.
11571 (ARMv6m): Likewise.
11572 (armv5, armv5e): Delete arches.
11573 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11575 (*call_reg_arm): Likewise.
11576 (*call_value_reg_armv5): Likewise.
11577 (*call_value_reg_arm): Likewise.
11578 (*call_symbol): Likewise.
11579 (*call_value_symbol): Likewise.
11580 (*sibcall_insn): Likewise.
11581 (*sibcall_value_insn): Likewise.
11582 (clzsi2): Likewise.
11583 (prefetch): Likewise.
11584 (define_split and define_peephole2 dependent on arm_arch5):
11586 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11588 (TARGET_ARM_QBIT): Likewise.
11589 (TARGET_DSP_MULTIPLY): Likewise.
11590 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11591 (arm_arch5, arm_arch5e): Delete.
11592 (arm_arch5t, arm_arch5te): Declare.
11593 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11594 (arm_arch5t): Declare.
11595 (arm_option_reconfigure_globals): Update for the above.
11596 (arm_options_perform_arch_sanity_checks): Update comment, replace
11597 use of arm_arch5 with arm_arch5t.
11598 (use_return_insn): Likewise.
11599 (arm_emit_call_insn): Likewise.
11600 (output_return_instruction): Likewise.
11601 (arm_final_prescan_insn): Likewise.
11602 (arm_coproc_builtin_available): Likewise.
11603 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11604 arm_arch5e with arm_arch5t and arm_arch5te.
11605 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11606 (arm_arch5t, arm_arch5te): Declare.
11607 * config/arm/arm-tables.opt: Regenerate.
11608 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11609 * config/arm/t-multilib: Likewise.
11610 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11611 instead of arm_arch5.
11612 (*call_reg_thumb1): Likewise.
11613 (*call_value_reg_thumb1_v5): Likewise.
11614 (*call_value_reg_thumb1): Likewise.
11615 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11617 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11619 2018-05-18 Martin Liska <mliska@suse.cz>
11621 PR gcov-profile/84846
11622 * doc/gcov.texi: Document -t option of gcov tool.
11624 2018-05-18 Martin Liska <mliska@suse.cz>
11626 PR gcov-profile/84846
11627 * gcov.c (print_usage): Add new -t option.
11628 (process_args): Handle the option.
11629 (generate_results): Use stdout as output when requested by
11632 2018-05-18 Martin Liska <mliska@suse.cz>
11634 PR gcov-profile/84846
11635 * coverage.c (coverage_init): Write PWD to .gcno file.
11636 * doc/gcov.texi: Document how working directory is printed.
11637 * gcov-dump.c (dump_gcov_file): Print PWD.
11638 * gcov.c (output_intermediate_file): Likewise.
11639 (read_graph_file): Read PWD string.
11640 (output_lines): Print PWD.
11642 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11644 PR middle-end/85817
11645 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11646 for retval and return false if all args to phi are zero.
11648 2018-05-18 Richard Biener <rguenther@suse.de>
11650 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11652 (evrp_dom_walker::before_dom_children): Call it.
11654 2018-05-18 Richard Biener <rguenther@suse.de>
11656 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11657 results when processing array refs with variable index.
11659 2018-05-18 Toon Moene <toon@moene.org>
11661 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11662 directly after that of -floop-interchange. Indicate that both
11663 options are enabled by default when specifying -O3.
11665 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11667 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11668 iterator. Delete separate integer-mode vec_set<mode> expander.
11669 (aarch64_simd_vec_setv2di): Delete.
11670 (vec_setv2di): Delete.
11671 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11672 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
11673 the "w, r" alternative.
11675 2018-05-18 Martin Liska <mliska@suse.cz>
11677 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11678 * tree-pass.h (make_pass_lower_switch_O0): New function.
11679 * tree-switch-conversion.c (node_has_low_bound): Remove.
11680 (node_has_high_bound): Likewise.
11681 (node_is_bounded): Likewise.
11682 (class pass_lower_switch): Make it a template type and create
11684 (pass_lower_switch::execute): Add template argument.
11685 (make_pass_lower_switch): New function.
11686 (make_pass_lower_switch_O0): New function.
11687 (do_jump_if_equal): Remove.
11688 (emit_case_nodes): Simplify to just handle all 3 cases and leave
11689 all the hard work to tree optimization passes.
11691 2018-05-18 Martin Liska <mliska@suse.cz>
11693 * dbgcnt.c (limit_low): Renamed from limit.
11694 (limit_high): New variable.
11695 (dbg_cnt_is_enabled): Check for upper limit.
11696 (dbg_cnt): Adjust dumping.
11697 (dbg_cnt_set_limit_by_index): Add new argument for high
11699 (dbg_cnt_set_limit_by_name): Likewise.
11700 (dbg_cnt_process_single_pair): Parse new format.
11701 (dbg_cnt_process_opt): Use strtok.
11702 (dbg_cnt_list_all_counters): Remove 'value' and add
11704 * doc/invoke.texi: Document changes.
11706 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
11708 * doc/sourcebuild.texi (scalar_all_fma): Document.
11709 * tree.def (FMA_EXPR): Delete.
11710 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11711 * internal-fn.c (ternary_direct): New macro.
11712 (expand_ternary_optab_fn): Likewise.
11713 (direct_ternary_optab_supported_p): Likewise.
11714 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11715 * builtins.c (fold_builtin_fma): Delete.
11716 (fold_builtin_3): Don't call it.
11717 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11718 * expr.c (expand_expr_real_2): Likewise.
11719 * fold-const.c (operand_equal_p): Likewise.
11720 (fold_ternary_loc): Likewise.
11721 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
11722 * gimple.c (DEFTREECODE): Likewise.
11723 * gimplify.c (gimplify_expr): Likewise.
11724 * optabs-tree.c (optab_for_tree_code): Likewise.
11725 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
11726 * tree-eh.c (operation_could_trap_p): Likewise.
11727 (stmt_could_throw_1_p): Likewise.
11728 * tree-inline.c (estimate_operator_cost): Likewise.
11729 * tree-pretty-print.c (dump_generic_node): Likewise.
11730 (op_code_prio): Likewise.
11731 * tree-ssa-loop-im.c (stmt_cost): Likewise.
11732 * tree-ssa-operands.c (get_expr_operands): Likewise.
11733 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
11734 * fold-const-call.h (fold_fma): Delete.
11735 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
11736 CFN_FNMA and CFN_FNMS.
11737 (fold_fma): Delete.
11738 * genmatch.c (combined_fn): New enum.
11739 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
11740 (commutative_op): New function.
11741 (commutate): Use it. Handle more than 2 operands.
11742 (dt_operand::gen_gimple_expr): Use commutative_op.
11743 (parser::parse_expr): Allow :c to be used with non-binary
11744 operators if the commutative operand is known.
11745 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
11746 CFN_FMS, CFN_FNMA and CFN_FNMS.
11747 (backprop::process_assign_use): Remove FMA_EXPR handling.
11748 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11749 (gen_hsa_fma): New function.
11750 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11751 IFN_FNMA and IFN_FNMS.
11752 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11753 * gimple-fold.h (follow_all_ssa_edges): Declare.
11754 * gimple-fold.c (follow_all_ssa_edges): New function.
11755 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11756 gimple_build interface and use follow_all_ssa_edges to fold the result.
11757 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11758 instead of checking for optabs directly.
11759 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11760 rather than FMA_EXPRs.
11761 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11762 call to IFN_FMA instead of an FMA_EXPR.
11764 2018-05-17 Jim Wilson <jimw@sifive.com>
11766 * expr.c (do_tablejump): When converting index to Pmode, if we have a
11767 sign extended promoted subreg, and the range does not have the sign bit
11768 set, then do a sign extend.
11770 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11771 test, check for sign extended subreg and/or constant operands, and
11772 do a sign extend in that case.
11774 2018-05-17 Steve Ellcey <sellcey@cavium.com>
11776 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11777 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11779 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11780 Change logics_shift_reg to logics_shift_imm.
11781 (thunderx2t99_fp_loadpair_basic): Delete.
11782 (thunderx2t99_fp_storepair_basic): Delete.
11783 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11784 (thunderx2t99_asimd_polynomial): Delete.
11785 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11786 and neon_fp_mul_d_scalar_q.
11787 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11788 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11789 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11790 (thunderx2t99_asimd_lut): Add missing tbl types.
11791 (thunderx2t99_asimd_ext): Delete.
11792 (thunderx2t99_asimd_load1_1_mult): Delete.
11793 (thunderx2t99_asimd_load1_2_mult): Delete.
11794 (thunderx2t99_asimd_load1_ldp): New.
11795 (thunderx2t99_asimd_load1): New.
11796 (thunderx2t99_asimd_load2): Add missing *load2* types.
11797 (thunderx2t99_asimd_load3): New.
11798 (thunderx2t99_asimd_load4): New.
11799 (thunderx2t99_asimd_store1_1_mult): Delete.
11800 (thunderx2t99_asimd_store1_2_mult): Delete.
11801 (thunderx2t99_asimd_store2_mult): Delete.
11802 (thunderx2t99_asimd_store2_onelane): Delete.
11803 (thunderx2t99_asimd_store_stp): New.
11804 (thunderx2t99_asimd_store1): New.
11805 (thunderx2t99_asimd_store2): New.
11806 (thunderx2t99_asimd_store3): New.
11807 (thunderx2t99_asimd_store4): New.
11809 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
11811 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
11812 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
11814 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
11815 Segher Boessenkool <segher@kernel.crashing.org>
11818 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
11821 2018-05-17 Richard Biener <rguenther@suse.de>
11823 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
11824 for pruning loop and prune defs feeding only already visited PHIs.
11826 2018-05-17 Richard Biener <rguenther@suse.de>
11828 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
11830 2018-05-17 Bin Cheng <bin.cheng@arm.com>
11831 Richard Biener <rguenther@suse.de>
11833 PR tree-optimization/85793
11834 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
11835 for VMAT_ELEMENTWISE.
11837 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11839 * internal-fn.h (lookup_internal_fn): Declare
11840 * internal-fn.c (lookup_internal_fn): New function.
11841 * gimple.c (gimple_build_call_from_tree): Handle calls to
11842 internal functions.
11843 * gimple-pretty-print.c (dump_gimple_call): Print "." before
11844 internal function names.
11845 * tree-pretty-print.c (dump_generic_node): Likewise.
11846 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
11848 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11850 * gimple-fold.h (gimple_build): Make the function forms take
11851 combined_fn rather than built_in_function.
11852 (gimple_simplify): Likewise.
11853 * gimple-match-head.c (gimple_simplify): Likewise.
11854 * gimple-fold.c (gimple_build): Likewise.
11855 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
11856 rather than gimple_build_call_internal.
11857 (get_initial_defs_for_reduction): Likewise.
11858 (vect_create_epilog_for_reduction): Likewise.
11859 (vectorizable_live_operation): Likewise.
11861 2018-05-17 Martin Liska <mliska@suse.cz>
11863 * gimple-ssa-sprintf.c (format_directive): Do not use
11864 space in between 'G_' and '('.
11866 2018-05-17 Jakub Jelinek <jakub@redhat.com>
11869 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
11870 even if the mask is not all ones.
11873 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
11875 (ix86_gimple_fold_builtin): Likewise.
11878 * config/i386/i386.c: Include tree-vector-builder.h.
11879 (ix86_vector_shift_count): New function.
11880 (ix86_fold_builtin): Fold shift builtins by scalar count.
11881 (ix86_gimple_fold_builtin): Likewise.
11883 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
11884 _mm512_setzero): New intrinsics.
11886 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
11887 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11889 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
11890 code generation for cases where splatting a value is not useful.
11891 * simplify-rtx.c (simplify_ternary_operation): Simplify
11892 vec_merge across a vec_duplicate and a paradoxical subreg forming
11893 a vector mode to a vec_concat.
11895 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
11897 * config.gcc: Support "goldmont-plus".
11898 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11900 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11901 PROCESSOR_GOLDMONT_PLUS.
11902 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
11903 (processor_target_table): Add "goldmont-plus".
11904 (PTA_GOLDMONT_PLUS): Define.
11905 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
11906 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
11907 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
11908 (fold_builtin_cpu): Add "goldmont-plus".
11909 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
11910 (ix86_option_override_internal): Add "goldmont-plus".
11911 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
11912 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
11913 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
11914 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
11916 2018-05-17 Richard Biener <rguenther@suse.de>
11918 PR tree-optimization/85757
11919 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
11920 remove defs that only feed that PHI from further processing.
11922 2018-05-16 Jim Wilson <jimw@sifive.com>
11924 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
11926 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
11928 2018-05-16 Mark Wielaard <mark@klomp.org>
11930 * dwarf2out.c (count_index_strings): New function.
11931 (output_indirect_strings): Call count_index_strings and generate
11932 header for dwarf_version >= 5.
11934 2018-05-16 Mark Wielaard <mark@klomp.org>
11936 * dwarf2out.c (dwarf_FORM): New function.
11937 (set_indirect_string): Use dwarf_FORM.
11938 (reset_indirect_string): Likewise.
11939 (size_of_die): Likewise.
11940 (value_format): Likewise.
11941 (output_die): Likewise.
11942 (add_skeleton_AT_string): Likewise.
11943 (output_macinfo_op): Likewise.
11944 (index_string): Likewise.
11945 (output_index_string_offset): Likewise.
11946 (output_index_string): Likewise.
11947 (count_index_strings): Likewise.
11949 2018-05-16 Carl Love <cel@us.ibm.com>
11951 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11952 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
11954 2018-05-16 Martin Jambor <mjambor@suse.cz>
11956 * ipa-prop.c (ipa_free_all_edge_args): Remove.
11957 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
11959 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
11961 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
11962 (fnma<mode>4): Likewise.
11963 (fms<mode>4): Likewise.
11964 (fnms<mode>4): Likewise.
11965 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
11966 (aarch64_fnma<mode>4): Likewise.
11967 (aarch64_fms<mode>4): Likewise.
11968 (aarch64_fnms<mode>4): Likewise.
11969 (aarch64_fnmadd<mode>4): Likewise.
11971 2018-05-16 Jason Merrill <jason@redhat.com>
11973 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
11975 2018-05-16 Richard Biener <rguenther@suse.de>
11977 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
11978 (dump_stmt_cost): Declare.
11979 (add_stmt_cost): Dump cost we add.
11980 (add_stmt_costs): New function.
11981 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
11982 No longer exported.
11983 (vect_analyze_stmt): Adjust prototype.
11984 (vectorizable_condition): Likewise.
11985 (vectorizable_live_operation): Likewise.
11986 (vectorizable_reduction): Likewise.
11987 (vectorizable_induction): Likewise.
11988 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
11989 cost vector to pass to vectorizable_ and record afterwards.
11990 (vect_model_reduction_cost): Take cost vector argument and adjust.
11991 (vect_model_induction_cost): Likewise.
11992 (vectorizable_reduction): Likewise.
11993 (vectorizable_induction): Likewise.
11994 (vectorizable_live_operation): Likewise.
11995 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
11996 SLP_TREE_NUMBER_OF_VEC_STMTS.
11997 (vect_analyze_slp_cost_1): Remove.
11998 (vect_analyze_slp_cost): Likewise.
11999 (vect_slp_analyze_node_operations): Take visited args and
12000 a target cost vector. Avoid processing already visited stmt sets.
12001 (vect_slp_analyze_operations): Use a local cost vector to gather
12002 costs and register those of non-discarded instances.
12003 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12004 (vect_schedule_slp_instance): Remove copying of
12005 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12007 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12008 adding cost. Record cost entry location.
12009 (vect_prologue_cost_for_slp_op): Function to compute cost of
12010 a constant or invariant generated for SLP vect in the prologue,
12011 split out from vect_analyze_slp_cost_1.
12012 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12013 (vect_model_promotion_demotion_cost): Likewise.
12014 (vect_model_store_cost): Likewise, make static.
12015 (vect_model_load_cost): Likewise.
12016 (vectorizable_bswap): Add cost vector arg and adjust.
12017 (vectorizable_call): Likewise.
12018 (vectorizable_simd_clone_call): Likewise.
12019 (vectorizable_conversion): Likewise.
12020 (vectorizable_assignment): Likewise.
12021 (vectorizable_shift): Likewise.
12022 (vectorizable_operation): Likewise.
12023 (vectorizable_store): Likewise.
12024 (vectorizable_load): Likewise.
12025 (vectorizable_condition): Likewise.
12026 (vectorizable_comparison): Likewise.
12027 (can_vectorize_live_stmts): Likewise.
12028 (vect_analyze_stmt): Likewise.
12029 (vect_transform_stmt): Adjust calls to vectorizable_*.
12030 * tree-vectorizer.c: Include gimple-pretty-print.h.
12031 (dump_stmt_cost): New function.
12033 2018-05-16 Richard Biener <rguenther@suse.de>
12035 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12036 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12037 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12038 (check_name): New callback.
12039 (dse_classify_store): Track cycles via a visited bitmap of PHI
12040 defs and simplify handling of in-loop and across loop dead stores
12041 and properly fail for loop-variant refs. Handle byte-tracking with
12042 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12045 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12047 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12048 (vect_get_mask_type_for_stmt): Likewise.
12049 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12051 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12052 to determine the statement's vector type and the vector type that
12053 should be used for calculating nunits. Deal with cases in which
12054 the type has to be deferred.
12055 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12056 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12057 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12058 (vect_determine_vf_for_stmt): New functions, split out from...
12059 (vect_determine_vectorization_factor): ...here.
12060 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12061 (vect_get_mask_type_for_stmt): New functions, split out from
12062 vect_determine_vectorization_factor.
12064 2018-05-16 Richard Biener <rguenther@suse.de>
12066 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12067 verify the [VEC_]COND_EXPR embedded comparison.
12069 2018-05-15 Martin Sebor <msebor@redhat.com>
12071 PR tree-optimization/85753
12072 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12073 RECORD_TYPE in addition to ARRAY_TYPE.
12075 2018-05-15 Martin Sebor <msebor@redhat.com>
12077 PR middle-end/85643
12078 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12080 2018-05-15 Richard Biener <rguenther@suse.de>
12082 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12083 add by_clobber_p one. Change algorithm to collect all defs
12084 representing uses we need to walk and try reducing them to
12085 a single one before failing.
12086 (dse_dom_walker::dse_optimize_stmt): Adjust.
12088 2018-05-13 Mark Wielaard <mark@klomp.org>
12090 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12091 (size_of_loc_descr): Likewise.
12092 (output_loc_operands): Likewise.
12093 (output_loc_operands_raw): Likewise.
12094 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12095 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12096 (hash_loc_operands): Likewise.
12097 (compare_loc_operands): Likewise.
12099 2018-05-14 Mark Wielaard <mark@klomp.org>
12101 * dwarf2out.c (count_index_addrs): New function.
12102 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12104 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12106 PR tree-optimization/83648
12107 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12108 return value as malloc candidate.
12110 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12113 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12114 param as true in call to suggest_attribute.
12116 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12118 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12119 -mreadonly-in-sdata.
12121 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12123 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12125 (aarch64_crypto_aesd_fused): Likewise.
12127 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12129 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12130 (movsi_aarch64): Likewise.
12131 (load_pairsi): Likewise.
12132 (load_pairdi): Likewise.
12133 (store_pairsi): Likewise.
12134 (store_pairdi): Likewise.
12135 (load_pairsf): Likewise.
12136 (load_pairdf): Likewise.
12137 (store_pairsf): Likewise.
12138 (store_pairdf): Likewise.
12139 (zero_extend): Likewise.
12140 (trunc): Swap alternatives.
12141 (fcvt_target): Add '?' to prefer w over r.
12143 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12146 * config/i386/i386.md: Disallow non-commutative arithmetics in
12147 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12148 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12149 in the peephole2 before it.
12151 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12153 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12154 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12155 (ix86_handle_option): Handle -mcldemote.
12156 * config.gcc: New header.
12157 * config/i386/cldemoteintrin.h: New file.
12158 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12159 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12161 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12162 OPTION_MASK_ISA_CLDEMOTE.
12163 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12164 (ix86_valid_target_attribute_inner_p): Ditto.
12165 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12166 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12167 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12168 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12169 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12171 * config/i386/i386.opt: Add -mcldemote.
12172 * config/i386/x86intrin.h: New header.
12173 * doc/invoke.texi: Add -mcldemote.
12175 2018-05-14 Richard Biener <rguenther@suse.de>
12177 * doc/match-and-simplify.texi: Adjust :s documentation.
12179 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12181 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12182 intended memcpy size.
12183 (REORDER_45): Likewise.
12185 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12187 * sort.cc: New file.
12188 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12189 * vec.c (qsort_chk): Use gcc_qsort.
12190 * Makefile.in (OBJS-libcommon): Add sort.o.
12191 (build/sort.o): New target. Use it...
12192 (BUILD_RTL): ... here, and...
12193 (build/gencfn-macros): ... here, and...
12194 (build/genmatch): ... here.
12196 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12197 Chung-Ju Wu <jasonwucj@gmail.com>
12199 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12200 * config/nds32/nds32-graywolf.md: New file.
12201 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12202 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12204 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12205 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12206 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12207 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12208 * config/nds32/pipelines.md: Include n15 settings.
12210 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12211 Chung-Ju Wu <jasonwucj@gmail.com>
12213 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12214 * config/nds32/nds32-n13.md: New file.
12215 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12216 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12218 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12219 * config/nds32/nds32.md (pipeline_model): Add n13.
12220 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12221 * config/nds32/pipelines.md: Include n13 settings.
12223 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12224 Chung-Ju Wu <jasonwucj@gmail.com>
12226 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12227 * config/nds32/nds32-n10.md: New file.
12228 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12229 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12231 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12232 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12233 * config/nds32/nds32.md (pipeline_model): Add n10.
12234 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12235 * config/nds32/pipelines.md: Include n10 settings.
12237 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12238 Kito Cheng <kito.cheng@gmail.com>
12239 Chung-Ju Wu <jasonwucj@gmail.com>
12241 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12242 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12243 Add enum values for DSP extension instructions.
12244 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12246 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12247 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12248 New code iterators.
12249 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12250 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12251 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12252 * config/nds32/nds32-intrinsic.md: Likewise.
12253 * config/nds32/nds32_intrinsic.h: Likewise.
12254 * config/nds32/nds32-md-auxiliary.c: Likewise.
12255 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12256 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12257 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12258 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12259 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12260 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12261 TYPE_DMAC in switch statement.
12262 * config/nds32/nds32.c: New checking and implementation for DSP
12263 extension instructions.
12264 * config/nds32/nds32.h: Likewise.
12265 * config/nds32/nds32.md: Likewise.
12266 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12267 * config/nds32/predicates.md: Implement new predicates for DSP
12270 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12272 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12273 Reformat alternatives and attributes so it is easier to identify
12274 which constraints/attributes go with which instruction.
12275 (mov<mode>_hardfloat32, FMOVE64): Likewise.
12276 (mov<mode>_softfloat32, FMOVE64): Likewise.
12277 (mov<mode>_hardfloat64, FMOVE64): Likewise.
12278 (mov<mode>_softfloat64, FMOVE64): Likewise.
12280 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
12282 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12284 (Basic PowerPC Built-in Functions): The new name of the
12285 subsection previously known as "PowerPC Built-in Functions".
12286 (Basic PowerPC Built-in Functions Available on all Configurations):
12288 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12289 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12290 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12291 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12293 2018-05-11 Martin Jambor <mjambor@suse.cz>
12296 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12299 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12302 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12304 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
12306 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12307 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12308 (ix86_handle_option): Handle -mwaitpkg.
12309 * config.gcc: New header.
12310 * config/i386/cpuid.h (bit_WAITPKG): New bit.
12311 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12312 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12314 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12315 OPTION_MASK_ISA_WAITPKG.
12316 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12317 (ix86_option_override_internal): Add PTA_WAITPKG.
12318 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12319 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12320 IX86_BUILTIN_TPAUSE.
12321 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12322 __builtin_ia32_umwait and __builtin_ia32_tpause.
12323 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12324 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12325 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12326 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12327 UNSPECV_TPAUSE): New.
12328 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12329 * config/i386/i386.opt: Add -mwaitpkg.
12330 * config/i386/waitpkgintrin.h: New file.
12331 * config/i386/x86intrin.h: New header.
12332 * doc/invoke.texi: Add -mwaitpkg.
12334 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12337 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12339 (cortex-m0): Use armv6s-m isa.
12340 (cortex-m0plus): Likewise.
12341 (cortex-m1): Likewise.
12342 (cortex-m0.small-multiply): Likewise.
12343 (cortex-m0plus.small-multiply): Likewise.
12344 (cortex-m1.small-multiply): Likewise.
12346 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
12347 Jakub Jelinek <jakub@redhat.com>
12349 PR tree-optimization/85692
12350 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12351 source permute as well.
12353 2018-05-11 Martin Liska <mliska@suse.cz>
12356 * doc/extend.texi: Document LLVM style format for no_sanitize
12359 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12361 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12362 mode_supports_vsx_dform_quad to mode_supports_dq_form.
12363 (mode_supports_vsx_dform_quad): Likewise.
12364 (mode_supports_vmx_dform): Move these functions to be next to the
12365 other mode_supports functions.
12366 (mode_supports_dq_form): Likewise.
12367 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12368 mode_supports_dq_form.
12369 (reg_offset_addressing_ok_p): Likewise.
12370 (offsettable_ok_by_alignment): Likewise.
12371 (rs6000_legitimate_offset_address_p): Likewise.
12372 (legitimate_lo_sum_address_p): Likewise.
12373 (rs6000_legitimize_address): Likewise.
12374 (rs6000_legitimize_reload_address): Likewise.
12375 (rs6000_secondary_reload_inner): Likewise.
12376 (rs6000_preferred_reload_class): Likewise.
12377 (rs6000_output_move_128bit): Likewise.
12379 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12381 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12382 Generate SImode target register for null target.
12383 <case IX86_BUILTIN_XGETBV>: Ditto.
12384 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12385 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12387 2018-05-10 Carl Love <cel@us.ibm.com>
12389 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12390 dcbtt and dcbtstt if operands[2] is 0.
12392 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12395 * config/i386/sse.md (usadv64qi): New expander.
12397 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
12399 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12400 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12401 -maltivec=be support.
12402 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12403 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12404 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12405 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12406 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12407 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12408 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12409 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12410 altivec_vsumsws): Adjust.
12411 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12412 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12413 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12415 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12416 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12417 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12418 (altivec_lve<VI_char>x): Delete expand.
12419 (*altivec_lve<VI_char>x_internal): Rename to...
12420 (altivec_lve<VI_char>x): ... this.
12421 (altivec_lvxl_<mode>): Delete expand.
12422 (*altivec_lvxl_<mode>_internal): Rename to ...
12423 (altivec_lvxl_<mode>): ... this.
12424 (altivec_stvxl_<mode>): Delete expand.
12425 (*altivec_stvxl_<mode>_internal): Rename to ...
12426 (altivec_stvxl_<mode>): ... this.
12427 (altivec_stve<VI_char>x): Delete expand.
12428 (*altivec_stve<VI_char>x_internal): Rename to ...
12429 (altivec_stve<VI_char>x): ... this.
12430 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12431 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12432 reduc_plus_scal_<mode>): Adjust.
12433 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12435 (rs6000_cpu_cpp_builtins): Adjust.
12436 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12437 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12438 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12439 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12440 -maltivec=be support.
12441 (rs6000_split_vec_extract_var): Adjust.
12442 (rs6000_split_v4si_init): Adjust.
12443 (swap_selector_for_mode): Delete.
12444 (altivec_expand_lvx_be, altivec_expand_stvx_be,
12445 altivec_expand_stvex_be): Delete.
12446 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12447 -maltivec=be support.
12448 (rs6000_gimple_fold_builtin): Ditto.
12449 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12451 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12452 (TARGET_DIRECT_MOVE_64BIT): Adjust.
12453 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12454 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12455 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12456 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12457 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12458 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12459 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12460 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12461 anonymous split): Adjust.
12462 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12463 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12465 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12467 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12468 when --with-gxx-include-dir is also specified.
12469 * configure: Regenerate.
12471 2018-05-09 Jim Wilson <jimw@sifive.com>
12474 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12475 * config/riscv/t-withmultilib: New.
12476 * config/riscv/withmultilib.h: New.
12477 * doc/install.texi: Document RISC-V --with-multilib-list support.
12479 2018-05-09 Richard Biener <rguenther@suse.de>
12481 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12483 (vect_bb_vectorization_profitable_p): Adjust. Compute
12484 actual scalar cost using the cost vector and the add_stmt_cost
12487 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12489 PR rtl-optimization/85645
12490 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12491 in the REG_CFA_REGISTER note for LR, don't leave it empty.
12493 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12495 PR rtl-optimization/85645
12496 * shrink-wrap.c (spread_components): Return a boolean saying if
12497 anything was changed.
12498 (try_shrink_wrapping_separate): Iterate spread_components until
12499 nothing changes anymore.
12501 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12503 PR rtl-optimization/85645
12504 * regrename.c (build_def_use): Also kill the chains that include the
12505 destination of a REG_CFA_REGISTER note.
12507 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12509 PR rtl-optimization/85645
12510 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12511 insn that has a REG_CFA_REGISTER note.
12513 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
12515 * cfgexpand.c (expand_clobber): New function.
12516 (expand_gimple_stmt_1): Use it.
12517 * tree-vect-stmts.c (vect_clobber_variable): New function,
12519 (vectorizable_simd_clone_call): ...here.
12520 (vectorizable_store): Emit a clobber either side of an
12521 IFN_STORE_LANES sequence.
12522 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12524 2018-05-09 Tom de Vries <tom@codesourcery.com>
12527 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12528 (define_insn "trap_if_false"): Add exit after trap.
12530 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
12532 PR rtl-optimization/85638
12533 * bb-reorder.c: Include common/common-target.h.
12534 (create_forwarder_block): New function extracted from...
12535 (fix_up_crossing_landing_pad): ...here. Rename into...
12536 (dw2_fix_up_crossing_landing_pad): ...this.
12537 (sjlj_fix_up_crossing_landing_pad): New function.
12538 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12539 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12540 from both partitions and exit the loop after one iteration.
12542 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12545 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12547 (Basic PowerPC Built-in Functions): The new name of the
12548 subsection previously known as "PowerPC Built-in Functions".
12549 (Basic PowerPC Built-in Functions Available on all Configurations):
12551 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12553 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12555 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12557 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12560 2018-05-08 Jim Wilson <jimw@sifive.com>
12562 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12563 (LD_EMUL_SUFFIX): New.
12564 (LINK_SPEC): Use it.
12566 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12568 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12570 (Basic PowerPC Built-in Functions): The new name of the
12571 subsection previously known as "PowerPC Built-in Functions".
12572 (Basic PowerPC Built-in Functions Available on all Configurations):
12574 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12576 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12578 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12580 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12583 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12586 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12587 after cmpelim optimization.
12589 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
12591 * config.gcc: Support "goldmont".
12592 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12593 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12594 PROCESSOR_GOLDMONT.
12595 * config/i386/i386.c (m_GOLDMONT): Define.
12596 (processor_target_table): Add "goldmont".
12597 (PTA_GOLDMONT): Define.
12598 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12599 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12600 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12601 (fold_builtin_cpu): Add "goldmont".
12602 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12603 (ix86_option_override_internal): Add "goldmont".
12604 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12605 (processor_type): Add PROCESSOR_GOLDMONT.
12606 * config/i386/i386.md: Add CPU "glm".
12607 * config/i386/glm.md: New file.
12608 * config/i386/x86-tune.def: Add m_GOLDMONT.
12609 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12611 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12614 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12616 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12617 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
12618 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
12621 * config/i386/i386.c (ix86_fold_builtin): Handle
12622 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12625 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12626 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12628 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
12631 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12632 (check_arch): Likewise.
12633 (check_fpu): Return the result rather than printing it.
12634 (end arch): Fix operator precedence.
12635 (end cpu): Likewise.
12636 (END): Print the result from check_fpu.
12638 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12639 Alan Hayward <alan.hayward@arm.com>
12640 David Sherwood <david.sherwood@arm.com>
12642 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12643 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12644 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12645 (*fcmuo<mode>_and): New patterns.
12647 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12649 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12650 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12651 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12652 (cmp_op, sve_imm_con): New code attributes.
12653 (SVE_COND_INT_CMP, imm_con): Delete.
12654 (cmp_op): Remove above unspecs from int attribute.
12655 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12657 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
12658 comparison-specific unspecs.
12659 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12660 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12661 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12662 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12663 (*vec_fcm<cmp_op><mode>): Rename to...
12664 (*fcm<cmp_op><mode>): ...this and adjust likewise.
12665 (*vec_fcmuo<mode>): Rename to...
12666 (*fcmuo<mode>): ...this and adjust likewise.
12667 (*pred_fcm<cmp_op><mode>): New pattern.
12668 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12669 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12671 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12673 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12674 (aarch64_emit_sve_predicated_cond): New function.
12675 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12676 (aarch64_emit_unspec_cond_or): Replace with...
12677 (aarch64_emit_sve_or_conds): ...this new function. Use
12678 aarch64_emit_sve_ptrue_op for the individual comparisons and
12679 aarch64_emit_binop to OR them together.
12680 (aarch64_emit_inverted_unspec_cond): Replace with...
12681 (aarch64_emit_sve_inverted_cond): ...this new function. Use
12682 aarch64_emit_sve_ptrue_op for the comparison and
12683 aarch64_emit_unop to invert the result.
12684 (aarch64_expand_sve_vec_cmp_float): Update after the above
12685 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
12687 2018-05-07 Nathan Sidwell <nathan@acm.org>
12689 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12690 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12691 (Backwards Compatibility): Likewise.
12693 2018-05-07 Luis Machado <luis.machado@linaro.org>
12697 2018-05-07 Luis Machado <luis.machado@linaro.org>
12699 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12700 <prefetch_dynamic_strides>: New const bool field.
12701 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12702 prefetch_dynamic_strides.
12703 (exynosm1_prefetch_tune): Likewise.
12704 (thunderxt88_prefetch_tune): Likewise.
12705 (thunderx_prefetch_tune): Likewise.
12706 (thunderx2t99_prefetch_tune): Likewise.
12707 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12709 (aarch64_override_options_internal): Update to set
12710 PARAM_PREFETCH_DYNAMIC_STRIDES.
12711 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12712 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12713 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12714 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12715 prefetch-dynamic-strides setting.
12717 2018-05-07 Luis Machado <luis.machado@linaro.org>
12719 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12720 <minimum_stride>: New const int field.
12721 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12722 minimum_stride field.
12723 (exynosm1_prefetch_tune): Likewise.
12724 (thunderxt88_prefetch_tune): Likewise.
12725 (thunderx_prefetch_tune): Likewise.
12726 (thunderx2t99_prefetch_tune): Likewise.
12727 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12728 (aarch64_override_options_internal): Update to set
12729 PARAM_PREFETCH_MINIMUM_STRIDE.
12730 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12731 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12732 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12733 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12734 stride is constant and is below the minimum stride threshold.
12736 2018-05-07 Luis Machado <luis.machado@linaro.org>
12738 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
12741 2018-05-07 Luis Machado <luis.machado@linaro.org>
12743 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12744 <prefetch_dynamic_strides>: New const bool field.
12745 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12746 prefetch_dynamic_strides.
12747 (exynosm1_prefetch_tune): Likewise.
12748 (thunderxt88_prefetch_tune): Likewise.
12749 (thunderx_prefetch_tune): Likewise.
12750 (thunderx2t99_prefetch_tune): Likewise.
12751 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12753 (aarch64_override_options_internal): Update to set
12754 PARAM_PREFETCH_DYNAMIC_STRIDES.
12755 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12756 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12757 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12758 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12759 prefetch-dynamic-strides setting.
12761 2018-05-07 Luis Machado <luis.machado@linaro.org>
12763 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12764 <minimum_stride>: New const int field.
12765 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12766 minimum_stride field.
12767 (exynosm1_prefetch_tune): Likewise.
12768 (thunderxt88_prefetch_tune): Likewise.
12769 (thunderx_prefetch_tune): Likewise.
12770 (thunderx2t99_prefetch_tune): Likewise.
12771 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12772 (aarch64_override_options_internal): Update to set
12773 PARAM_PREFETCH_MINIMUM_STRIDE.
12774 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12775 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12776 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12777 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12778 stride is constant and is below the minimum stride threshold.
12780 2018-05-06 Jakub Jelinek <jakub@redhat.com>
12783 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12784 the type is addressable. Don't force op into register if it has
12787 2018-05-05 Roland McGrath <mcgrathr@google.com>
12790 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12791 any section for which we don't know a specific type it should have,
12792 regardless of name. Previously this was done only for the exact
12793 names ".init_array", ".fini_array", and ".preinit_array".
12794 (default_elf_asm_named_section): Add comment about
12795 relationship with default_section_type_flags and SECTION_NOTYPE.
12796 (get_section): Don't consider it a type conflict if one side has
12797 SECTION_NOTYPE and the other doesn't, as long as neither has the
12798 SECTION_BSS et al used in the default_section_type_flags logic.
12800 2018-05-05 Tom de Vries <tom@codesourcery.com>
12803 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12804 (workaround_barsyncs): New function.
12805 (nvptx_reorg): Use workaround_barsyncs.
12806 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12807 (define_expand "nvptx_membar_cta"): New define_expand.
12808 (define_insn "*nvptx_membar_cta"): New insn.
12810 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
12812 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
12813 To improve optimization opportunities.
12814 * builtin-types.def: The new needed builtin types for the above.
12816 2018-05-04 Richard Biener <rguenther@suse.de>
12818 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
12819 * gimple-ssa-store-merging.c
12820 (imm_store_chain_info::output_merged_store): Remove redundant create,
12821 release split_store vector contents on failure.
12822 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
12823 scalar stmt vector on cache hit.
12825 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
12827 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
12829 * config.gcc (powerpc-xilinx-eabi*): Remove.
12830 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
12832 (fusion_addis_mem_combo_load): Ditto.
12833 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
12835 (rs6000_cpu_cpp_builtins): Ditto.
12836 * config/rs6000/rs6000-linux.c
12837 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
12838 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
12839 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
12841 (rs6000_setup_reg_addr_masks): Ditto.
12842 (rs6000_init_hard_regno_mode_ok): Ditto.
12843 (rs6000_option_override_internal): Ditto.
12844 (legitimate_lo_sum_address_p): Ditto.
12845 (rs6000_legitimize_address): Ditto.
12846 (rs6000_legitimize_reload_address): Ditto.
12847 (rs6000_legitimate_address_p): Ditto.
12848 (abi_v4_pass_in_fpr): Ditto.
12849 (setup_incoming_varargs): Ditto.
12850 (rs6000_gimplify_va_arg): Ditto.
12851 (rs6000_split_multireg_move): Ditto.
12852 (rs6000_savres_strategy): Ditto.
12853 (rs6000_emit_prologue_components): Ditto.
12854 (rs6000_emit_epilogue_components): Ditto.
12855 (rs6000_emit_prologue): Ditto.
12856 (rs6000_emit_epilogue): Ditto.
12857 (rs6000_elf_file_end): Ditto.
12858 (rs6000_function_value): Ditto.
12859 (rs6000_libcall_value): Ditto.
12860 * config/rs6000/rs6000.h: Ditto.
12861 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
12862 (TARGET_MINMAX): ... this. New.
12863 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
12864 * config/rs6000/rs6000.md: Remove Xilinx FP support.
12865 (*movsi_internal1_single): Delete.
12866 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
12867 mfpu=, mxilinx-fpu): Delete.
12868 * config/rs6000/singlefp.h: Delete.
12869 * config/rs6000/sysv4.h: Remove Xilinx FP support.
12870 * config/rs6000/t-rs6000: Ditto.
12871 * config/rs6000/t-xilinx: Delete.
12872 * config/rs6000/titan.md: Adjust for fp_type removal.
12873 * config/rs6000/vsx.md: Remove Xilinx FP support.
12874 (VStype_simple): Delete.
12875 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
12876 * config/rs6000/xfpu.h: Delete.
12877 * config/rs6000/xfpu.md: Delete.
12878 * config/rs6000/xilinx.h: Delete.
12879 * config/rs6000/xilinx.opt: Delete.
12880 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
12881 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
12883 2018-05-04 Tom de Vries <tom@codesourcery.com>
12886 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
12889 2018-05-04 Richard Biener <rguenther@suse.de>
12891 PR middle-end/85627
12892 * tree-complex.c (update_complex_assignment): We are always in SSA form.
12893 (expand_complex_div_wide): Likewise.
12894 (expand_complex_operations_1): Likewise.
12895 (expand_complex_libcall): Preserve EH info of the original stmt.
12896 (tree_lower_complex): Handle removed blocks.
12897 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12898 on complex multiplication and division libcall builtins.
12900 2018-05-04 Richard Biener <rguenther@suse.de>
12902 PR middle-end/85574
12903 * fold-const.c (negate_expr_p): Restrict negation of operand
12904 zero of a division to when we know that can happen without
12906 (fold_negate_expr_1): Likewise.
12908 2018-05-04 Jakub Jelinek <jakub@redhat.com>
12911 * real.h (real_nextafter): Declare.
12912 * real.c (real_nextafter): New function.
12913 * fold-const-call.c (fold_const_nextafter): New function.
12914 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
12915 CASE_CFN_NEXTTOWARD.
12916 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
12917 even when arg1_mode is different from arg0_mode.
12919 2018-05-03 Nathan Sidwell <nathan@acm.org>
12921 * doc/extend.texi (Deprecated Features): Remove
12922 -ffriend-injection.
12923 (Backwards Compatibility): Likewise.
12924 * doc/invoke.texi (C++ Language Options): Likewise.
12925 (C++ Dialect Options): Likewise.
12927 2018-05-03 Jakub Jelinek <jakub@redhat.com>
12930 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
12931 _mm512_mask_mullox_epi64): New intrinsics.
12933 2018-05-03 Tom de Vries <tom@codesourcery.com>
12936 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12937 dump files): Add offload-tree.
12939 2018-05-03 Richard Biener <rguenther@suse.de>
12941 PR tree-optimization/85615
12942 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
12943 to loops not nested in BBs loop father to avoid creating multi-entry
12946 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12948 PR tree-optimization/70291
12949 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
12950 arguments. Change return type to tree. Emit libcall as a new
12951 statement rather than replacing existing one when inplace_p is true.
12952 (expand_complex_multiplication_components): New function.
12953 (expand_complex_multiplication): Expand floating-point complex
12954 multiplication using the above.
12955 (expand_complex_division): Rename inner_type parameter to type.
12956 Update expand_complex_libcall call-site.
12957 (expand_complex_operations_1): Update expand_complex_multiplication
12958 and expand_complex_division call-sites.
12960 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12963 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12964 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12965 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
12966 the highest significant bit of the shift count mask is clear. In
12967 check whether and[sq]i3 is needed verify that all significant bits
12968 of the shift count other than the highest are set.
12970 2018-05-02 Tom de Vries <tom@codesourcery.com>
12973 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
12974 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
12975 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
12976 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
12977 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
12978 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
12979 __builtin_goacc_parlevel_size.
12981 2018-05-02 Richard Biener <rguenther@suse.de>
12983 PR tree-optimization/85597
12984 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
12985 do not use split vect_get_vec_defs call but call vect_get_slp_defs
12988 2018-05-02 Tom de Vries <tom@codesourcery.com>
12991 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12992 dump files): Add ltrans-tree.
12994 2018-05-02 Tom de Vries <tom@codesourcery.com>
12997 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12998 dump files): Add wpa-ipa.
13000 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13002 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13003 powerpc*-*-linux*paired* target.
13004 * config/rs6000/750cl.h: Delete.
13005 * config/rs6000/paired.h: Delete.
13006 * config/rs6000/paired.md: Delete.
13007 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13009 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13010 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13011 comment. Remove paired float support.
13012 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13013 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13015 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13016 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13018 * config/rs6000/rs6000.c: Remove paired float support.
13019 (paired_expand_vector_init, paired_expand_vector_move,
13020 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13021 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13022 paired_expand_builtin, paired_expand_predicate_builtin,
13023 paired_init_builtins): Delete.
13024 * config/rs6000/rs6000.h: Remove paired float support.
13025 * config/rs6000/rs6000.md: Remove paired float support.
13026 (move_from_CR_ov_bit): Delete.
13027 * config/rs6000/rs6000.opt (mpaired): Delete.
13028 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13029 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13031 2018-05-02 Richard Biener <rguenther@suse.de>
13033 PR middle-end/85567
13034 * gimplify.c (gimplify_save_expr): When in SSA form allow
13035 SAVE_EXPRs to compute to SSA vars.
13037 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13040 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13041 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13042 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13043 clobber operands[2], instead use a new pseudo. Formatting fixes.
13045 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13047 PR tree-optimization/85586
13048 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13049 exit early for statements in the same group if the accesses are
13052 2018-05-02 Tom de Vries <tom@codesourcery.com>
13055 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13058 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13060 PR tree-optimization/85143
13061 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13063 2018-05-01 Tom de Vries <tom@codesourcery.com>
13066 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13067 not found" error message.
13069 2018-05-01 Tom de Vries <tom@codesourcery.com>
13072 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13073 * vec.c (test_ordered_remove_if): New function.
13074 (vec_c_tests): Call test_ordered_remove_if.
13075 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13076 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13077 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13078 VEC_ORDERED_REMOVE_IF.
13080 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13082 PR tree-optimization/82665
13083 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13084 pointer subtraction where arguments come from a memchr call.
13086 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13088 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13089 --push-state --as-needed and --pop-state instead of --as-needed and
13090 --no-as-needed if ld supports it.
13091 * configure: Regenerated.
13094 * doc/install.texi2html: Replace _002d with - and _002a with * in
13095 generated html files using sed.
13097 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13100 * gcc-rich-location.c (blank_line_before_p): New function.
13101 (use_new_line): New function.
13102 (gcc_rich_location::add_fixit_insert_formatted): New function.
13103 * gcc-rich-location.h
13104 (gcc_rich_location::add_fixit_insert_formatted): New function.
13106 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13108 * selftest.c (assert_streq): Rename "expected" and "actual" to
13109 "val1" and "val2". Extend NULL-handling to cover both inputs
13110 symmetrically, while still requiring both to be non-NULL for a pass.
13111 * selftest.h (assert_streq): Rename "expected" and "actual" to
13113 (ASSERT_EQ): Likewise.
13114 (ASSERT_EQ_AT): Likewise.
13115 (ASSERT_KNOWN_EQ): Likewise.
13116 (ASSERT_KNOWN_EQ_AT): Likewise.
13117 (ASSERT_NE): Likewise.
13118 (ASSERT_MAYBE_NE): Likewise.
13119 (ASSERT_MAYBE_NE_AT): Likewise.
13120 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13121 the assertion to pass.
13122 (ASSERT_STREQ_AT): Likewise.
13124 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13126 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13127 interaction with -pie.
13129 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13131 * selftest.h: Fix alphabetization of per-source-file selftest
13134 2018-04-30 Jason Merrill <jason@redhat.com>
13136 PR c++/61982 - dead stores to destroyed objects.
13137 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13140 2018-04-30 Jason Merrill <jason@redhat.com>
13142 * tree.c (build_clobber): New.
13143 * tree.h: Declare it.
13144 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13146 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13148 * diagnostic-show-locus.c (layout::layout): Update for
13149 location_get_source_line returning a char_span.
13150 (struct char_span): Move to input.h.
13151 (struct correction): Update for fields in char_span becoming
13153 (struct source_line): Update for location_get_source_line
13154 returning a char_span.
13155 (layout::print_line): Likewise.
13156 * edit-context.c (edited_file::print_content): Likewise.
13157 (edited_file::print_diff_hunk): Likewise.
13158 (edited_file::print_run_of_changed_lines): Likewise.
13159 (edited_file::get_num_lines): Likewise.
13160 (edited_line::edited_line): Likewise.
13161 * final.c (asm_show_source): Likewise.
13162 * input.c (location_get_source_line): Convert return type
13163 from const char * to char_span, losing the final "line_len"
13165 (dump_location_info): Update for the above.
13166 (get_substring_ranges_for_loc): Likewise. Use a char_span
13167 when handling the literal within the line.
13168 (test_reading_source_line): Update for location_get_source_line
13169 returning a char_span.
13170 * input.h (class char_span): Move here from
13171 diagnostic-show-locus.c, converting from a struct to a class.
13172 Make data members private.
13173 (char_span::operator bool): New.
13174 (char_span::length): New.
13175 (char_span::get_buffer): New.
13176 (char_span::operator[]): New.
13177 (char_span::subspan): Make const.
13178 (char_span::xstrdup): New.
13179 (location_get_source_line): Convert return type from const char *
13180 to char_span, losing the final "line_size" param.
13182 2018-04-30 Jan Hubicka <jh@suse.cz>
13184 * lto-wrapper.c (ltrans_priorities): New static var.
13185 (cmp_priority): New.
13186 (run_gcc): Read priorities and if doing parallel build order
13187 the Makefile by them.
13189 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13191 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13193 2018-04-30 Richard Biener <rguenther@suse.de>
13195 * tree-cfg.c (verify_address): Remove base argument, add
13196 flag whether to check TREE_ADDRESSABLE and do that.
13197 (verify_expr): Remove.
13198 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13199 (verify_gimple_assign_single): Likewise.
13200 (verify_gimple_switch): Likewise.
13201 (verify_expr_location_1): Dereference tp once. Add (disabled)
13202 piece from verify_expr.
13203 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13205 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13207 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13209 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13211 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13212 (small_data_pattern): Likewise.
13213 (arc_rewrite_small_data): Likewise.
13214 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13215 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13216 (get_symbol_alignment): New function.
13217 (legitimate_small_data_address_p): Likewise.
13218 (legitimate_scaled_address): Update, call
13219 legitimate_small_data_address_p.
13220 (output_sdata): New static variable.
13221 (arc_print_operand): Update how we handle small data operands.
13222 (arc_print_operand_address): Likewise.
13223 (arc_legitimate_address_p): Update, use
13224 legitimate_small_data_address_p.
13225 (arc_rewrite_small_data_p): Remove.
13226 (arc_rewrite_small_data_1): Likewise.
13227 (arc_rewrite_small_data): Likewise.
13228 (small_data_pattern): Likewise.
13229 (compact_sda_memory_operand): Update to use
13230 legitimate_small_data_address_p and get_symbol_alignment.
13231 (prepare_move_operands): Don't rewite sdata pattern.
13232 (prepare_extend_operands): Remove.
13233 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13235 (zero_extendqisi2): Likewise.
13236 (zero_extendhisi2): Likewise.
13237 (extendqihi2): Likewise.
13238 (extendqisi2): Likewise.
13239 (extendhisi2): Likewise.
13240 (addsi3): Likewise.
13241 (subsi3): Likewise.
13242 (andsi3): Likewise.
13243 * config/arc/constraints.md (Usd): Change it to memory constraint.
13245 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13247 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13248 as source of std instructions.
13249 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13250 allow 6-bit constants as source for store instructions.
13251 (movdi_insn): Update instruction pattern to allow 6-bit constants
13252 as source for store instructions.
13254 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13256 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13258 2018-04-30 Nathan Sidwell <nathan@acm.org>
13259 Sandra Loosemore <sandra@codesourcery.com>
13261 * dumpfile.c (dump_open): Allow '-' for stdout.
13262 * doc/invoke.texi (Developer Options): Document dump filename
13263 determination early. Document stdin/stdout selection.
13265 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13267 Microblaze Target: PIC data text relative
13269 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13270 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13272 * config/microblaze/microblaze.h (microblaze_constant_address_p):
13273 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13274 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13275 New addressing mode for data-text relative position indepenedent code.
13276 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13277 'ADDRESS_SYMBOLIC_TXT_REL'.
13278 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13279 (microblaze_legitimate_pic_operand): Exclude function calls from
13280 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13281 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13283 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13284 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13285 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13286 for 'address + offset'.
13287 (microblaze_expand_prologue): Add new function prologue call for
13289 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13290 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13291 table in case of TARGET_PIC_DATA_TEXT_REL.
13292 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13293 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13294 Add new macros 'UNSPEC_TEXT',
13295 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13296 + exclude function calls from 'UNSPEC_PLT' in case of data text
13298 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13299 new target hook for generating address diff vector tables in case of
13301 * doc/tm.texi : Regenerate.
13302 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13303 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13304 of addr diff vector generation.
13305 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13306 target hook definition.
13307 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13308 Add default function for generate_pic_addr_diff_vec -> flag_pic.
13309 * doc/invoke.texi (Add new pic option): Add new microblaze pic
13310 option for data text relative.
13312 2018-04-30 Richard Biener <rguenther@suse.de>
13314 * tree-chrec.h (evolution_function_is_constant_p): Remove
13316 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13318 2018-04-30 Richard Biener <rguenther@suse.de>
13321 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13323 2018-04-30 Richard Biener <rguenther@suse.de>
13325 PR tree-optimization/28364
13326 PR tree-optimization/85275
13327 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13328 copying first exit test.
13330 2018-04-28 Mark Wielaard <mark@klomp.org>
13332 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13333 dwarf_version >= 5.
13334 (dwarf_AT): Handle DW_AT_addr_base.
13335 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13337 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
13340 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13341 (*ashl<dwi>3_doubleword_mask_1): Ditto.
13342 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13343 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13345 2018-04-28 Richard Biener <rguenther@suse.de>
13347 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13348 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13349 to reflect use. Only add interesting stmts.
13351 2018-04-27 Martin Jambor <mjambor@suse.cz>
13354 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13355 the jump function allows for passing through aggregate values.
13357 2018-04-27 David Malcolm <dmalcolm@redhat.com>
13359 * input.h (in_system_header_at): Convert from macro to inline
13361 (from_macro_expansion_at): Likewise.
13362 (from_macro_definition_at): Likewise.
13364 2018-04-27 Jeff Law <law@redhat.com>
13366 * config.gcc: Mark tile* targets as deprecated/obsolete.
13368 2018-04-27 Richard Biener <rguenther@suse.de>
13370 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13373 2018-04-27 Richard Biener <rguenther@suse.de>
13375 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13377 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
13379 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13380 with Yd constraint. Set "preferred_for_speed" attribute from
13381 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13382 with Yd constraint.
13383 (*movdi_internal): Ditto.
13384 (movti_interunit splitters): Remove
13385 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13386 (movdi_interunit splitters): Ditto.
13387 * config/i386/constraints.md (Ye): Remove.
13388 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13390 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13393 * config/aarch64/constraints.md (Usg): Limit to 31.
13394 (Usj): Limit to 63.
13396 2018-04-27 Jakub Jelinek <jakub@redhat.com>
13398 PR tree-optimization/85529
13399 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13400 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13401 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13402 zero extension or masking of the MSB bit.
13403 (optimize_range_tests): Add FIRST_BB argument, pass it through
13404 to optimize_range_tests_var_bound.
13405 (maybe_optimize_range_tests, reassociate_bb): Adjust
13406 optimize_range_tests callers.
13408 2018-04-26 Richard Biener <rguenther@suse.de>
13409 Jakub Jelinek <jakub@redhat.com>
13411 * cgraph.h (symbol_table): Just declare debug method here.
13412 * symtab.c (symbol_table::debug): Define.
13414 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
13416 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13418 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
13420 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13421 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13422 (*movdi_internal): Substitute Yi and Yj constraint with x
13423 and Ym and Yn constraint with y constraint. Update "isa"
13424 attribute and set "preferred_for_speed" attribute from
13425 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13426 (*movsi_internal): Ditto.
13427 (*movdf_internal): Ditto.
13428 (*movsf_internal): Ditto.
13429 (*zero_extendsidi2): Ditto.
13430 * config/i386/sse.md (vec_set<mode>_0): Ditto.
13431 (sse2_loadld): Ditto.
13432 (*vec_extract<ssevecmodelower>_0): Ditto.
13433 (*vec_extractv4si_0_zext_sse4): Ditto.
13434 (vec_concatv2di): Ditto.
13435 (*vec_dup<mode>): Ditto.
13436 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13437 * config/i386/constraints.md (Yi): Remove.
13442 2018-04-26 Nathan Sidwell <nathan@acm.org>
13444 * dumpfile.c (dump_open): New.
13445 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13446 (dump_finish): Detect stdio/stderr by value not name.
13448 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
13450 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13452 2018-04-26 Tom de Vries <tom@codesourcery.com>
13455 * config/nvptx/nvptx.c (verify_neutering_jumps)
13456 (verify_neutering_labels): New function
13457 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13459 2018-04-26 Tom de Vries <tom@codesourcery.com>
13462 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13463 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13466 2018-04-26 Richard Biener <rguenther@suse.de>
13467 Tom de Vries <tom@codesourcery.com>
13470 * lto-streamer-out.c (output_function): Fixup loops if required to match
13471 discovery done in the reader.
13473 2018-04-26 Richard Biener <rguenther@suse.de>
13475 PR tree-optimization/85116
13476 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13477 have a loop exit from the single latch predecessor. Remove
13478 case of header with just condition.
13479 (ch_base::copy_headers): Exclude infinite loops from any
13481 (pass_ch::execute): Record exits.
13483 2018-04-26 Richard Biener <rguenther@suse.de>
13485 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13486 prologue cost vector and pass it to vect_get_load_cost.
13487 (vect_get_peeling_costs_all_drs): Likewise.
13488 (vect_peeling_hash_get_lowest_cost): Likewise.
13489 (vect_enhance_data_refs_alignment): Likewise.
13491 2018-04-26 Richard Biener <rguenther@suse.de>
13493 PR middle-end/85450
13494 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13495 checking of integer<->pointer conversions.
13496 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13497 sign-/zero-extending pointer types.
13498 (expand_omp_for_static_chunk): Likewise.
13500 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
13501 Jean Lee <xiaoyur347@gmail.com>
13503 * config/mips/mips.c (mips_asan_shadow_offset): New function.
13504 (TARGET_ASAN_SHADOW_OFFSET): Define.
13505 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13506 true for -fsanitize=address.
13508 2018-04-25 Mark Wielaard <mark@klomp.org>
13510 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13513 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13515 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13516 than "alu", remove explicit "memory" and "imm_disp" attributes.
13517 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13519 PR middle-end/85414
13520 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13521 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13522 gen_lowpart_no_emit.
13524 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
13527 * config/i386/i386.c (ix86_expand_builtin): Change memory
13528 operand to XI, extend p0 to Pmode.
13529 * config/i386/i386.md: Change unspec volatile and operand
13530 1 mode to XI, change operand 0 mode to P.
13532 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13534 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13535 GET_MODE_MASK before any checking.
13536 (nds32_can_use_bset_p): Likewise.
13537 (nds32_can_use_btgl_p): Likewise.
13539 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13541 * config/nds32/nds32-doubleword.md: New define_split pattern for
13542 illegal register number.
13544 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13546 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13548 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13550 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13552 2018-04-25 Richard Biener <rguenther@suse.de>
13554 * lto-streamer.h (LTO_major_version): Bump to 8.
13556 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13558 * BASE-VER: Set to 9.0.0.
13560 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
13562 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13563 in __abskf2 and __powikf2.
13565 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13568 * config/aarch64/constraints.md (Usg, Usj): New constraints.
13569 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13570 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13571 Use the above on operand 2. Reindent.
13572 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13574 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13577 * common/config/i386/i386-common.c (ix86_handle_option): Don't
13579 * config/i386/i386.opt (mcet): Removed.
13580 * doc/install.texi: Remove -mcet documentation.
13581 * doc/invoke.texi: Likewise.
13583 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13586 * doc/install.texi: Remove -mcet from bootstrap-cet.
13588 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13591 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13592 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13596 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13597 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13598 containing a CONST_VECTOR.
13600 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
13602 * doc/install.texi: Update newlib dependency for nvptx.
13604 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13607 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13608 instead of INTVAL when shifting x left.
13610 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
13612 PR tree-optimization/85478
13613 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13614 vect_grouped_store_supported for single element vectors.
13616 2018-04-24 Richard Biener <rguenther@suse.de>
13619 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13620 load cost increase to the case of non-constant step.
13622 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13625 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13626 destination if any_malformed_asm.
13628 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
13630 PR middle-end/85496
13631 * expr.c (store_field): In the bitfield case, if the value comes from
13632 a function call and is returned in registers by means of a PARALLEL,
13633 do not change the mode of the temporary unless BLKmode and VOIDmode.
13635 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
13637 PR rtl-optimization/85423
13638 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13639 dependencies to debug insns when the previous insn is non-debug.
13641 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13643 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13644 enums into a single definition.
13645 (fls): Fix predicates and printing.
13648 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13650 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13651 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13652 and short u6 immediate.
13653 (check_if_valid_sleep_operand): Remove.
13654 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13656 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13658 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13659 flag_always_save_lp condition.
13660 * config/nds32/nds32.opt (malways-save-lp): New option.
13662 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13664 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13665 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13666 * config/nds32/nds32.h
13667 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13668 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13670 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13672 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13673 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13675 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13676 Chung-Ju Wu <jasonwucj@gmail.com>
13678 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13680 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13681 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13683 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13685 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13687 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13689 * config/nds32/nds32-protos.h (nds32_data_alignment,
13690 nds32_local_alignment): Declare.
13691 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13692 nds32_local_alignment): New functions.
13693 (TARGET_CONSTANT_ALIGNMENT): Define.
13694 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13696 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13698 * config/nds32/nds32.c
13699 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13700 (TARGET_MODES_TIEABLE_P): Likewise.
13702 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13704 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13705 level Ofast and Og.
13707 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
13708 Chung-Ju Wu <jasonwucj@gmail.com>
13710 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13711 for unaligned access.
13712 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13714 * config/nds32/nds32-intrinsic.md: Likewise.
13715 * config/nds32/nds32_intrinsic.h: Likewise.
13716 * config/nds32/nds32.h (nds32_builtins): Likewise.
13717 * config/nds32/nds32.opt (munaligned-access): New option.
13718 * config/nds32/nds32.c (nds32_asm_file_start): Display
13719 flag_unaligned_access status.
13721 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13723 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
13724 -mno-relax is present.
13725 * config/riscv/linux.h (LINK_SPEC): Ditto.
13727 2018-04-20 Martin Sebor <msebor@redhat.com>
13730 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
13732 (gimple_fold_builtin_stxcpy_chk): Same.
13733 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
13735 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
13738 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
13739 __powikf2 when long double is IEEE 128-bit.
13741 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13743 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
13744 step to make sure stack always aligned.
13746 2018-04-20 Carl Love <cel@us.ibm.com>
13749 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13750 size check for arg0.
13752 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
13753 Tom de Vries <tom@codesourcery.com>
13756 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13757 Emit insns for calls too.
13758 (nvptx_find_par): Always look for worker-level predecessor insn.
13759 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
13761 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13762 (nvptx_process_pars): Propagate frames for calls.
13764 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
13767 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13769 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13770 (ix86_handle_option): Don't handle OPT_mibt.
13771 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13773 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13775 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13776 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13777 (ix86_target_macros): Define __CET__ with flag_cf_protection
13778 for -fcf-protection.
13779 * config/i386/i386.c (isa2_opts): Remove -mibt.
13780 * config/i386/i386.h (TARGET_IBT): Removed.
13781 (TARGET_IBT_P): Likewise.
13782 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13783 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13784 * config/i386/i386.opt (mcet): Update help message.
13785 (mshstk): Likewise.
13787 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
13788 -mcet as an alias for -mshstk.
13790 2018-04-20 Richard Biener <rguenther@suse.de>
13792 PR middle-end/85475
13793 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13794 complexity by forcing a single use of the multiply operand.
13796 2018-04-20 Martin Jambor <mjambor@suse.cz>
13799 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13800 recursion dependency to only apply to non-clones.
13802 2018-04-20 Martin Jambor <mjambor@suse.cz>
13805 * ipa-cp.c (create_specialized_node): Check that clones of
13806 self-recursive edges exist during IPA-CP.
13808 2018-04-19 Toon Moene <toon@moene.org>
13810 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
13813 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13815 PR tree-optimization/85467
13816 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
13817 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
13818 VECTOR_CST element to type.
13820 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13823 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
13824 * config/i386/i386.md (builtin_setjmp_setup): Removed.
13825 (builtin_longjmp): Likewise.
13826 (save_stack_nonlocal): New pattern.
13827 (restore_stack_nonlocal): Likewise.
13829 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13832 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13833 Replace ASM_OUTPUT_LABEL with fprintf.
13835 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13838 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13839 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
13840 * config/i386/i386-c.c (ix86_target_macros_internal): Also
13841 define __IBT__ and __SHSTK__ for -fcf-protection.
13842 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
13844 (ix86_trampoline_init): Likewise.
13845 (x86_output_mi_thunk): Likewise.
13846 (ix86_notrack_prefixed_insn_p): Likewise.
13847 (ix86_option_override_internal): Don't disallow -fcf-protection.
13848 * config/i386/i386.md (rdssp<mode>): Also enable for
13850 (incssp<mode>): Likewise.
13851 (nop_endbr): Likewise.
13852 * config/i386/i386.opt (mcet): Change help message to built-in
13855 (mshstk): Likewise.
13856 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
13857 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
13858 enable CET built-in functions.
13860 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
13862 * common/config/i386/i386-common.c
13863 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
13864 OPTION_MASK_ISA_MOVDIRI_UNSET,
13865 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
13866 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
13867 * config.gcc (movdirintrin.h): New header.
13868 * config/i386/cpuid.h (bit_MOVDIRI,
13869 bit_MOVDIR64B): New bits.
13870 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
13872 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
13873 (VOID, PVOID, PCVOID)): New function types.
13874 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
13875 __builtin_ia32_directstoreu_u64,
13876 __builtin_ia32_movdir64b): New builtins.
13877 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
13878 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
13880 (ix86_valid_target_attribute_inner_p): Ditto.
13881 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
13882 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
13883 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
13884 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
13885 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
13886 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
13887 (movdiri<mode>, movdir64b_<mode>): New.
13888 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
13889 * config/i386/immintrin.h: Include movdirintrin.h.
13890 * config/i386/movdirintrin.h: New file.
13891 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
13893 2018-04-19 Richard Biener <rguenther@suse.de>
13895 PR middle-end/85455
13896 * cfg.c (clear_bb_flags): When loop state says we have
13897 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13899 2018-04-19 Richard Biener <rguenther@suse.de>
13901 PR tree-optimization/84737
13902 * tree-vect-data-refs.c (vect_copy_ref_info): New function
13903 copying restrict info.
13904 (vect_setup_realignment): Use it.
13905 * tree-vectorizer.h (vect_copy_ref_info): Declare.
13906 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
13907 the first DR to all generated stores.
13908 (vectorizable_load): Likewise for loads.
13910 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13912 PR tree-optimization/85446
13913 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
13914 the integral and pointer types to have the same precision.
13916 * doc/install.texi: Document --disable-cet being the default and
13919 2018-04-18 Martin Liska <mliska@suse.cz>
13921 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
13924 2018-04-18 Martin Liska <mliska@suse.cz>
13927 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13930 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13931 arguments if they are comparable.
13933 2018-04-18 Martin Liska <mliska@suse.cz>
13936 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13939 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13942 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
13945 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
13946 ENDBR after calling __morestack.
13948 2018-04-18 David Malcolm <dmalcolm@redhat.com>
13951 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
13952 by using gcc_base_ver to generate a gcc_driver_version, and use
13953 it when generating GCC_DRIVER_NAME.
13954 * configure: Regenerate.
13956 2018-04-18 Jakub Jelinek <jakub@redhat.com>
13959 * config.gcc: Obsolete powerpc*-*-*spe*.
13961 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13964 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
13965 (stabstr_D): Change type of unum from unsigned int to
13966 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
13969 2018-04-17 Jim Wilson <jimw@sifive.com>
13972 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
13973 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
13974 Set arg_pointer_offset after using pretend_args_size.
13976 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13978 PR rtl-optimization/85431
13979 * dse.c (record_store): Ignore zero width stores.
13982 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
13983 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
13984 __builtin_stack_restore rather than after it.
13985 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
13986 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
13987 argument instead of virtual_dynamic_stack_rtx.
13989 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
13991 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
13993 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13994 Add note to error message to explain internal mapping of overloaded
13995 built-in function name to non-overloaded built-in function name.
13996 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
13999 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14002 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14003 where the inputs overlap with the output.
14005 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14007 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14008 (=v, v) alternative and explicit "memory" attribute.
14009 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14010 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14012 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14013 "sselog1" type instead of "sselog".
14014 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14015 "sselog". Remove explicit "memory" attribute.
14016 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14017 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14019 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14020 "sselog1" type instead of "sselog". Remove explicit "memory"
14022 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14023 use "sselog1" type instead of "sselog". Remove explicit "memory"
14025 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14026 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14028 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14029 "sselog1" type instead of "sselog". Remove explicit "memory"
14031 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14032 use "sselog1" type instead of "sselog". Remove explicit "memory"
14036 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14038 PR middle-end/85414
14039 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14042 2018-04-17 Martin Jambor <mjambor@suse.cz>
14045 * ipa-cp.c (create_specialized_node): Call
14046 expand_all_artificial_thunks if necessary.
14048 2018-04-17 Martin Liska <mliska@suse.cz>
14051 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14052 in message, remote space in between '_G' and '('.
14054 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14057 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14058 avx512f_vmcmp<mode>3<round_saeonly_name>,
14059 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14060 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14061 avx512f_rndscale<mode><round_saeonly_name>,
14062 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14063 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14064 Use %<iptr>2 instead of %2 for -masm=intel.
14065 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14066 avx512f_vcvttss2usi<round_saeonly_name>,
14067 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14069 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14070 avx512f_vcvttsd2usi<round_saeonly_name>,
14071 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14072 Use %q1 instead of %1 for -masm=intel.
14073 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14074 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14075 of %3 for -masm=intel.
14076 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14078 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14080 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14082 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14083 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14085 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14087 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14088 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14089 %g1 and one with %0 and %1.
14090 (avx512er_vmrcp28<mode><round_saeonly_name>,
14091 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14092 %1 for -masm=intel.
14093 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14094 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14095 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14096 of %0 and %{%4%} for -masm=intel.
14097 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14098 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14099 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14100 order of %0 and %{%5%}%{z%} for -masm=intel.
14102 2018-04-17 Jan Hubicka <jh@suse.cz>
14105 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14107 2018-04-17 Martin Liska <mliska@suse.cz>
14110 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14111 for target_clone error message. Make default implementation
14112 clone to be a local declaration.
14113 (separate_attrs): Add new argument and check for an empty
14115 (expand_target_clones): Handle it.
14116 (ipa_target_clone): Make redirection just for target_clones
14119 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14120 Tom de Vries <tom@codesourcery.com>
14122 PR middle-end/84955
14123 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14124 tiled basic blocks without omp continue statements.
14126 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14129 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14130 vec_extract expression as having side effects to make sure it gets
14133 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14136 * config/i386/i386.c (get_builtin_code_for_version): Check
14139 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14142 * config.gcc: Support "skylake".
14143 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14145 * config/i386/i386.c (m_SKYLAKE): Define.
14146 (processor_target_table): Add "skylake".
14147 (ix86_option_override_internal): Add "skylake".
14148 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14149 PROCESSOR_CANNONLAKE.
14150 (get_builtin_code_for_version): Fix priority for
14151 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14152 PROCESSOR_SKYLAKE-AVX512.
14153 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14154 (processor_type): Add PROCESSOR_SKYLAKE.
14156 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14157 Jason Merrill <jason@redhat.com>
14160 * convert.c (convert_to_integer_1): Use direct recursion for
14161 enumeral types and types with a precision less than the number
14162 of bits in their mode.
14164 2018-04-16 Julia Koval <julia.koval@intel.com>
14167 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14168 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14170 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14173 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14174 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14175 and -mno-direct-move.
14177 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14180 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14181 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14182 Ensure negative shifts result in {0}.
14184 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14186 PR rtl-optimization/79916
14187 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14188 regs (if any) to define how to gnerate SD moves when LRA is in
14191 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14193 PR rtl-optimization/85393
14194 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14195 * except.c (expand_dw2_landing_pad_for_region): Make static.
14196 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14197 a label and unconditional jump to old_bb, rather than
14198 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14201 PR rtl-optimization/85376
14202 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14203 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14204 instead of a specific value.
14206 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14207 Bin Cheng <bin.cheng@arm.com>
14209 PR tree-optimization/82965
14210 PR tree-optimization/83991
14211 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14212 by_profile_only parameter.
14213 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14214 information if the loop was predicted to iterate too many times.
14215 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14217 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14220 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14223 2018-04-13 Martin Liska <mliska@suse.cz>
14224 Jakub Jelinek <jakub@redhat.com>
14226 PR middle-end/81657
14227 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14228 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14229 * builtins.c (expand_builtin_memory_copy_args): Use
14230 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14231 handle dest_addr == pc_rtx.
14233 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14236 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14237 asked to not generate direct moves.
14238 (fix_trunc<mode>si2_stfiwx): Similar.
14239 (fix_trunc<mode>si2_internal): Similar.
14241 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14244 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14245 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14246 lookup if dest in some wider mode is known to be const0_rtx and
14247 if so, record permanent equivalence for it to be ZERO_EXTEND of
14248 the narrower mode destination.
14250 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14252 * lto-streamer-out.c (output_function): Revert 259346.
14253 * omp-expand.c (expand_oacc_for): Likewise.
14255 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14257 PR rtl-optimization/85354
14258 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14259 * sel-sched.c (sel_global_init): ... here.
14261 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14264 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14265 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14266 mode for PE-COFF targets.
14267 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14268 (i386_pe_asm_lto_end): Likewise.
14269 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14270 (TARGET_ASM_LTO_END): Likewise.
14271 * config/i386/winnt.c (saved_debug_info_level): New static variable.
14272 (i386_pe_asm_lto_start): New function.
14273 (i386_pe_asm_lto_end): Likewise.
14275 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14276 Richard Biener <rguenther@suse.de>
14278 PR middle-end/84955
14279 * lto-streamer-out.c (output_function): Fix CFG loop state before
14281 * omp-expand.c (expand_oacc_for): Handle calls to internal
14282 functions like regular functions.
14284 2018-04-12 Richard Biener <rguenther@suse.de>
14287 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14288 for the early LTO debug to properly generate references to it
14289 during DIE emission. Do not re-use that for the skeleton for
14291 (dwarf2out_early_finish): Likewise.
14293 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14296 * config/i386/sse.md
14297 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14298 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14299 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14300 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14301 and output is a reg, avoid creating invalid lowpart subreg, but
14302 instead split into a 512-bit move. Don't split if not AVX512VL,
14303 input is xmm16+ reg and output is a mem.
14304 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14305 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14306 xmm16+ reg and output is a mem.
14308 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14310 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14311 also for flag_dwarf2_cfi_asm.
14313 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14315 PR rtl-optimization/85342
14316 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14317 a bool scalar var inside of the loop instead. Don't try to update
14318 recog_data.operand after failed apply_change_group.
14320 2018-04-12 Tom de Vries <tom@codesourcery.com>
14323 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14324 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
14325 array with flexible array member as array without given dimension.
14326 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14327 argument for undefined param to true.
14329 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
14332 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14333 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14334 from PowerPC section.
14335 * config/rs6000/sysv4.opt (mcall-): Improve help text.
14336 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14337 help text that is too long.
14338 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14339 help text that is too long.
14340 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14341 help text that is too long.
14343 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
14345 * config/alpha/alpha.md (stack_probe_internal): Rename
14346 from "probe_stack". Update all callers.
14348 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14350 PR rtl-optimization/84566
14351 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14352 sched_macro_fuse_insns.
14354 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14357 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14358 (compute_block_dependences): ... from here.
14360 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14362 PR tree-optimization/85331
14363 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14364 from int to HOST_WIDE_INT.
14366 2018-04-11 Martin Jambor <mjambor@suse.cz>
14369 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14370 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14371 not the same as the source val.
14372 (cgraph_edge_brings_value_p): New parameter.
14373 (gather_edges_for_value): Pass destination value to
14374 cgraph_edge_brings_value_p.
14375 (perhaps_add_new_callers): Likewise.
14376 (get_info_about_necessary_edges): Likewise and exclude values brought
14377 only by self-recursive edges.
14378 (create_specialized_node): Redirect only clones of self-calling edges.
14379 (+self_recursive_pass_through_p): New function.
14380 (find_more_scalar_values_for_callers_subset): Use it.
14381 (find_aggregate_values_for_callers_subset): Likewise.
14382 (known_aggs_to_agg_replacement_list): Removed.
14383 (decide_whether_version_node): Re-calculate known constants for all
14384 remaining context clones.
14386 2018-04-11 Richard Biener <rguenther@suse.de>
14389 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14390 from early DWARF output.
14391 (dwarf2out_early_finish): Output line info unconditionally into
14392 early DWARF and add reference to it.
14394 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14397 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14398 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14399 other than V2DFmode using iptr mode attribute.
14400 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14402 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14404 PR rtl-optimization/84659
14405 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14407 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14410 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14412 (output_loc_list): Pass address of a dummy size variable even in the
14413 locview handling loop.
14414 (index_location_lists): Add comment on why skip_loc_list_entry can't
14417 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
14420 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14423 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
14426 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14427 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14428 and -mstring-compare-inline-limit.
14430 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14433 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14434 for stack clash protection in a register whenever we need it to be in
14437 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14439 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14440 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14442 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14445 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14447 (mlong-double-): Ditto.
14448 * config/rs6000/sysv4.opt (msdata=): Ditto.
14449 (mtls-size=): Ditto.
14451 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14453 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14454 erroneous entries for
14455 "vector int vec_ldl (int, long int *)", and
14456 "vector unsigned int vec_ldl (int, unsigned long int *)".
14457 Add comments and entries for
14458 "vector bool char vec_ldl (int, bool char *)",
14459 "vector bool short vec_ldl (int, bool short *)",
14460 "vector bool int vec_ldl (int, bool int *)",
14461 "vector bool long long vec_ldl (int, bool long long *)",
14462 "vector pixel vec_ldl (int, pixel *)",
14463 "vector long long vec_ldl (int, long long *)",
14464 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14465 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14466 type tree bool_long_long_type_node and correct definition of
14467 bool_V2DI_type_node to make reference to this new type tree.
14468 (rs6000_mangle_type): Replace erroneous reference to
14469 bool_long_type_node with bool_long_long_type_node.
14470 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14471 comments to emphasize sign distinctions for char and int types and
14472 replace RS6000_BTI_bool_long constant with
14473 RS6000_BTI_bool_long_long constant. Also add comment to restrict
14474 use of RS6000_BTI_pixel.
14475 (bool_long_type_node): Remove this macro definition.
14476 (bool_long_long_type_node): New macro definition
14478 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14480 PR rtl-optimization/85300
14481 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14482 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14483 simplify_unary_operation fails.
14485 2018-04-10 Martin Liska <mliska@suse.cz>
14487 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14488 cgraph_edge and ipa_ref.
14490 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14494 * config/i386/sse.md
14495 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14496 computation of the VEC_MERGE selector from mask.
14497 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14498 Fix decoding of the VEC_MERGE selector into mask.
14500 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14502 PR tree-optimization/85286
14503 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14505 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14507 * final.c (final_1): Set insn_last_address as well as
14508 insn_current_address.
14510 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14513 * explow.c (emit_stack_probe): Call validize_mem on memory location
14514 before passing it to gen_probe_stack. Create address operand and
14515 legitimize it for the probe_stack_address case.
14517 2018-04-09 Jan Hubicka <jh@suse.cz>
14520 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14521 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14522 * tree.c (free_lang_data_in_type): Fix handling of binfos;
14524 (free_lang_data): Rebuild type inheritance graph.
14526 2018-04-09 Martin Sebor <msebor@redhat.com>
14528 * invoke.texi (-finline-small-functions): Mention other optimization
14530 (-findirect-inlining, -fpartial-inlining): Same.
14531 (-finline-functions-called-once): Same.
14532 (-freorder-blocks-and-partition): Same.
14534 2018-04-09 Jan Hubicka <jh@suse.cz>
14537 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14538 jumps; choose last target that matches the criteria (i.e.
14539 no partition changes for non-crossing jumps).
14540 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14541 support for redirecting crossing jumps to non-crossing.
14543 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
14545 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14546 also for naked functions.
14548 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
14550 * config/arc/arc.md (add_shift): New pattern.
14551 (add_shift2): Likewise.
14552 (sub_shift): Likewise.
14553 (sub_shift_cmp0_noout): Likewise.
14554 (compare_si_ashiftsi): Likewise.
14555 (xbfu_cmp0_noout): New combine pattern.
14556 (xbfu_cmp0"): Likewise.
14557 (movsi_set_cc_insn): Place the predicable variant first.
14558 (commutative_binary_cmp0_noout): Remove clobber.
14559 (commutative_binary_cmp0): New pattern.
14560 (noncommutative_binary_cmp0): Likewise.
14561 (noncommutative_binary_cmp0_noout): Likewise.
14562 (noncommutative_binary_comparison_result_used): Removed.
14563 (rsub_cmp0): New pattern.
14564 (rsub_cmp0_noout): Likewise.
14565 (extzvsi): Changed, keep only meaningful variants.
14566 (SQH, SEZ): New iterators.
14567 (SQH_postfix): New mode attribute.
14568 (SEZ_prefix): New code attribute.
14569 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14570 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14571 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14572 of numerical value.
14573 (noncommutative_operator): Check the availability of barrel
14576 2018-04-09 Richard Biener <rguenther@suse.de>
14578 PR tree-optimization/85284
14579 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14580 Only use the niter constraining form of simple_iv when the exit
14581 is always executed.
14583 2018-04-09 Tom de Vries <tom@codesourcery.com>
14586 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14587 (define_expand "*memory_barrier"): New define_expand.
14588 (define_insn "memory_barrier"): New insn.
14590 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14592 PR rtl-optimization/80463
14593 PR rtl-optimization/83972
14594 PR rtl-optimization/83480
14596 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14597 correct producer for the insn.
14598 (tidy_control_flow): Fixup seqnos in case of debug insns.
14600 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14602 PR rtl-optimization/83913
14604 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14605 different sched-times when merging exprs.
14607 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14609 PR rtl-optimization/83962
14611 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14612 tidy_fallthru_edge and tidy_control_flow.
14614 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14616 PR rtl-optimization/83530
14618 * sel-sched.c (force_next_insn): New global variable.
14619 (remove_insn_for_debug): When force_next_insn is true, also leave only
14620 next insn in the ready list.
14621 (sel_sched_region): When the region wasn't scheduled, make another pass
14622 over it with force_next_insn set to 1.
14624 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14626 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14628 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14629 for interrupt control.
14630 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14631 functions for interrupt control.
14632 * config/nds32/nds32-intrinsic.md: Likewise.
14633 * config/nds32/nds32_intrinsic.h: Likewise.
14634 * config/nds32/nds32.h (nds32_builtins): Likewise.
14636 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14638 * config/nds32/nds32.c (nds32_init_machine_status,
14639 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14640 strict_aligned_p field.
14641 (nds32_expand_to_rtl_hook): New function.
14642 (TARGET_EXPAND_TO_RTL_HOOK): Define.
14643 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14645 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14646 Chung-Ju Wu <jasonwucj@gmail.com>
14648 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14649 * config/nds32/nds32-n7.md: New file.
14650 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14651 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14653 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14654 * config/nds32/nds32.md (pipeline_model): Add n7.
14655 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14656 * config/nds32/pipelines.md: Include n7 settings.
14658 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14659 Chung-Ju Wu <jasonwucj@gmail.com>
14661 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14662 * config/nds32/nds32-e8.md: New file.
14663 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14664 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14666 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14667 * config/nds32/nds32.md (pipeline_model): Add e8.
14668 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14669 * config/nds32/pipelines.md: Include e8 settings.
14671 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14672 Chung-Ju Wu <jasonwucj@gmail.com>
14674 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14675 * config/nds32/nds32-n8.md: New file.
14676 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14677 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14679 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14680 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14681 * config/nds32/nds32.md (pipeline_model): Add n8.
14682 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14683 * config/nds32/pipelines.md: Include n8 settings.
14685 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14686 Chung-Ju Wu <jasonwucj@gmail.com>
14688 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14689 * config/nds32/nds32-n9-2r1w.md: New file.
14690 * config/nds32/nds32-n9-3r2w.md: New file.
14691 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14692 nds32_register_ports): New or modify for cpu n9.
14693 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14695 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14696 * config/nds32/nds32-utils.c: New file.
14697 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14698 TARGET_MUL_SLOW): Define.
14699 * config/nds32/nds32.md (pipeline_model): New attribute.
14700 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14701 New options that support cpu n9.
14702 * config/nds32/pipelines.md: Include n9 settings.
14703 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14705 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14707 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14708 information if necessary.
14709 (output_cond_branch_compare_zero): Likewise.
14710 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14711 (nds32_target_alignment): Refine for alignment.
14712 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14713 (FUNCTION_BOUNDARY): Modify.
14714 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14716 * config/nds32/nds32.opt (malways-align, malign-functions): New.
14718 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14720 * config/nds32/constants.md (unspec_volatile_element): Add values for
14721 TLB operation and data prefetch.
14722 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14723 functions for TLB operation and data prefetch.
14724 * config/nds32/nds32-intrinsic.md: Likewise.
14725 * config/nds32/nds32_intrinsic.h: Likewise.
14726 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
14727 (nds32_print_operand): Likewise.
14728 * config/nds32/nds32.h (nds32_builtins): Likewise.
14730 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
14731 Andrew Pinski <pinsika@gcc.gnu.org>
14733 PR middle-end/82976
14734 * match.pd: Use constant_boolean_node of correct type instead of
14735 boolean_true_node or boolean_false_node for simplifying
14736 pointer comparisons to zero.
14738 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14740 PR tree-optimization/80021
14741 * tree.c (verify_type_variant): Make error call in verify_variant_match
14742 translatable and remove final full stop.
14744 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14746 * config/nds32/constants.md (unspec_volatile_element): Add
14747 UNSPEC_VOLATILE_EH_RETURN.
14748 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14749 nds32_output_stack_pop): Support dwarf exception handling process.
14750 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14751 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14752 exception handling process.
14753 (nds32_compute_stack_frame): Likewise.
14754 (nds32_return_addr_rtx): Likewise.
14755 (nds32_initial_elimination_offset): Likewise.
14756 (nds32_expand_prologue): Likewise.
14757 (nds32_expand_epilogue): Likewise.
14758 (nds32_dynamic_chain_address): New function.
14759 * config/nds32/nds32.h (machine_function): Add fields for dwarf
14760 exception handling.
14761 (DYNAMIC_CHAIN_ADDRESS): Define.
14762 (EH_RETURN_DATA_REGNO): Define.
14763 (EH_RETURN_STACKADJ_RTX): Define.
14764 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14765 patterns for dwarf exception handling.
14767 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14769 * config/nds32/nds32.h: Clean up obsolete macros.
14771 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14773 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14774 Add enum values for particular instructions.
14775 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14776 particular intrinsic functions.
14777 * config/nds32/nds32-intrinsic.md: Likewise.
14778 * config/nds32/nds32_intrinsic.h: Likewise.
14779 * config/nds32/nds32.h (nds32_builtins): Likewise.
14780 * config/nds32/nds32.md (type): Add pbsad and pbsada.
14781 (btst, ave): New patterns for particular instructions.
14783 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14785 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14786 Add enum values for atomic load/store and memory sync.
14787 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14789 * config/nds32/nds32-intrinsic.md: Likewise.
14790 * config/nds32/nds32_intrinsic.h: Likewise.
14791 * config/nds32/nds32.h (nds32_builtins): Likewise.
14793 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14795 PR tree-optimization/85257
14796 * fold-const.c (native_encode_vector): If not all elts could fit
14797 and off is -1, return 0 rather than offset.
14798 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14799 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14800 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
14801 adjust buffer in native_interpret_expr call.
14803 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14805 * config/nds32/constants.md (unspec_volatile_element): Add cache
14806 control enum values.
14807 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
14808 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
14809 * config/nds32/nds32.c (nds32_cctl_names): New.
14810 (nds32_print_operand): Handle cache control register names.
14811 * config/nds32/nds32.h (nds32_builtins): New enum values.
14812 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
14814 * config/nds32/nds32.md (type): Add mmu.
14815 * config/nds32/pipelines.md (simple_insn): Add mmu.
14817 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14819 * config/nds32/nds32.md (type): Remove call.
14820 * config/nds32/pipelines.md (simple_insn): Likewise.
14822 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14824 * config/nds32/constants.md (unspec_volatile_element): Add
14825 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
14826 UNSPEC_VOLATILE_FMFCFG.
14827 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
14828 description for fmfcfg and fmfcsr.
14829 (bdesc_1arg): Add fmtcsr.
14830 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
14831 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
14832 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
14833 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
14834 unspec_fmfcfg): New patterns.
14835 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
14836 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
14837 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
14838 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
14839 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
14840 __nds32__fmfcfg): Define.
14842 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14844 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
14845 intrinsic register names.
14846 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
14847 intrinsic register enum values and macros.
14849 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14851 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
14852 for load/store addressing form.
14853 (nds32_print_operand_address): Likewise.
14855 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
14858 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
14859 based on LABEL_REF. Remove useless assertion.
14860 (pic_address_needs_scratch): Fix formatting.
14861 (sparc_legitimize_pic_address): Minor tweaks.
14862 (sparc_delegitimize_address): Adjust assertion accordingly.
14863 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
14864 into symbolic_operand.
14865 (movsi_high_pic_label_ref): Likewise.
14866 (movsi_lo_sum_pic_label_ref): Likewise.
14867 (movdi_pic_label_ref): Likewise.
14868 (movdi_high_pic_label_ref): Likewise.
14869 (movdi_lo_sum_pic_label_ref): Likewise.
14871 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
14873 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
14874 custom LIB_SPEC setup.
14876 2018-04-06 Ruslan Bukin <br@bsdpad.com>
14877 Kito Cheng <kito.cheng@gmail.com>
14879 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
14880 * config/riscv/freebsd.h: New.
14882 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14884 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
14885 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
14888 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14889 Kito Cheng <kito.cheng@gmail.com>
14891 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
14892 nds32_output_call, nds32_symbol_binds_local_p): New functions.
14893 * config/nds32/nds32-protos.h (nds32_output_call,
14894 nds32_output_return): Declare.
14895 * config/nds32/nds32.md: Refine all the call and return patterns.
14897 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14900 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
14901 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
14903 PR rtl-optimization/84872
14904 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
14905 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
14906 EDGE_CROSSING edge.
14908 2018-04-06 Tamar Christina <tamar.christina@arm.com>
14910 * expr.c (copy_blkmode_to_reg): Revert 254862.
14911 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
14913 2018-04-06 Richard Biener <rguenther@suse.de>
14915 PR middle-end/85244
14916 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
14917 after seeing a component reference with an adjacent field. Treat
14918 refs to arrays at struct end of external decls similar to
14919 refs to unconstrained commons.
14921 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14924 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
14925 look through SAVE_EXPRs with non-side-effects argument. Adjust
14927 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
14930 2018-04-06 Richard Biener <rguenther@suse.de>
14932 PR middle-end/85180
14933 * alias.c (find_base_term): New wrapper around find_base_term
14934 unwinding CSELIB_VAL_PTR changes.
14935 (find_base_term): Do not restore CSELIB_VAL_PTR during the
14938 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14940 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
14942 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
14943 constant definitions.
14944 ("nop"): lr 0,0 -> nopr r0
14945 ("nop_lr0", "nop_lr1"): New insn definitions.
14947 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14949 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
14950 NDS32_V3PUSH_AVAILABLE_P macro.
14952 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
14953 Chung-Ju Wu <jasonwucj@gmail.com>
14955 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
14956 (nds32*-*-*): Add float and fpu_config into supported_defaults.
14957 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
14958 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
14959 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
14960 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
14961 * config/nds32/constraints.md: New constraints and checking for hard
14962 float configuration.
14963 * config/nds32/iterators.md: New mode iterator and attribute for hard
14964 float configuration.
14965 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
14967 * config/nds32/nds32-fpu.md: New file.
14968 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
14969 deal with hard float code generation.
14970 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
14972 (abi_type, float_reg_number): New enum type.
14973 * config/nds32/nds32-predicates.c: New predicates for hard float.
14974 * config/nds32/nds32-protos.h: Declare functions for hard float.
14975 * config/nds32/nds32.c: Implementation for hard float configuration.
14976 * config/nds32/nds32.h: Definitions for hard float configuration.
14977 * config/nds32/nds32.md: Include hard float machine description and
14978 modify patterns for hard float configuration.
14979 * config/nds32/nds32.opt: New options for hard float configuration.
14980 * config/nds32/predicates.md: New predicates for hard float
14983 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14985 * common/config/nds32/nds32-common.c
14986 (nds32_option_optimization_table): Enable -mreleax-hint by default.
14988 2018-04-05 Jakub Jelinek <jakub@redhat.com>
14990 PR middle-end/85195
14991 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
14992 CONSTRUCTOR_ELT (ctor, ...)->value.
14994 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
14997 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
14999 2018-04-05 Tom de Vries <tom@codesourcery.com>
15002 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15005 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15006 Kito Cheng <kito.cheng@gmail.com>
15008 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15009 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15010 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15011 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15013 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15014 Kito Cheng <kito.cheng@gmail.com>
15016 * config/nds32/constraints.md (Ufe): New memory constraint.
15017 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15018 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15019 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15021 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15022 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15024 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15026 * config/nds32/nds32.md: Use optimize_size in the condition for
15027 alu-shift instructions.
15029 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15031 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15033 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15035 * config/nds32/nds32.md (negsi2): Refine pattern.
15037 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15038 Chung-Ju Wu <jasonwucj@gmail.com>
15040 * config/nds32/iterators.md (shift_rotate): New code iterator.
15041 (shift): New code attribute.
15042 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15043 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15044 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15045 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15046 bit-wise operations.
15047 (andsi3, *andsi3): Ditto.
15048 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15049 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15050 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15051 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15052 nds32_ior_operand, nds32_xor_operand): New predicates.
15054 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15056 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15057 (addsi3, subsi3): ... this.
15059 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15061 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15063 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15065 * config/nds32/nds32.md: Adjust indention.
15067 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15069 * config/nds32/nds32.md (feature): New attribute.
15071 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15073 * config/nds32/nds32.md (subtype): New attribute.
15075 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15078 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15079 expansion to perform a bitwise AND of the argument followed by a
15080 boolean negation of the result.
15082 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15084 PR rtl-optimization/84878
15085 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15086 the basic block. Assert the use reference is not artificial and that
15087 it has an associated insn.
15089 2018-04-04 Michael Matz <matz@suse.de>
15091 * builtins.c (compute_objsize): Pass correct operand
15092 to array_at_struct_end_p.
15094 2018-04-04 Richard Biener <rguenther@suse.de>
15097 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15098 from contexts for DINFO_LEVEL_TERSE and below.
15100 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15102 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15103 resiter_operand condition.
15104 * config/nds32/nds32.md (*move<mode>): Ditto.
15106 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15107 Monk Chiang <sh.chiang04@gmail.com>
15109 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15111 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15113 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15115 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15116 Kito Cheng <kito.cheng@gmail.com>
15118 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15119 nds32_cond_code_str, output_cond_branch,
15120 output_cond_branch_compare_zero, nds32_expand_cbranch,
15121 nds32_expand_cstore, nds32_expand_movcc,
15122 nds32_output_cbranchsi4_equality_zero,
15123 nds32_output_cbranchsi4_equality_reg,
15124 nds32_output_cbranchsi4_equality_reg_or_const_int,
15125 nds32_output_cbranchsi4_greater_less_zero: New functions.
15126 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15127 nds32_expand_cstore, nds32_expand_movcc,
15128 nds32_output_cbranchsi4_equality_zero,
15129 nds32_output_cbranchsi4_equality_reg,
15130 nds32_output_cbranchsi4_equality_reg_or_const_int,
15131 nds32_output_cbranchsi4_greater_less_zero): Declare.
15132 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15133 nds32_rimm11s_operand): New predicates.
15134 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15135 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15138 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15140 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15141 * config/nds32/nds32.md: Ditto.
15142 * config/nds32/pipelines.md: Ditto.
15144 2018-04-04 Richard Biener <rguenther@suse.de>
15146 PR tree-optimization/85168
15147 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15148 propagating abnormals.
15150 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15152 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15154 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15155 Kito Cheng <kito.cheng@gmail.com>
15157 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15158 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15159 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15160 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15161 * config/nds32/nds32.md (sibcall_internal): New.
15162 (sibcall_register): Remove.
15163 (sibcall_immediate): Remove.
15164 (sibcall_value_internal): New.
15165 (sibcall_value_register): Remove.
15166 (sibcall_value_immediate): Remove.
15167 * config/nds32/predicates.md (nds32_general_register_operand): New.
15168 (nds32_call_address_operand): New.
15170 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15172 PR rtl-optimization/85167
15173 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15174 bb_defs if *split_p, instead preinitialize it to NULL.
15176 PR tree-optimization/85156
15177 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15178 evaluating the argument multiple times.
15180 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15182 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15184 (_mm_cvtpd_ps): Likewise.
15185 (_mm_cvttpd_epi32): Likewise.
15186 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15187 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15188 vector, pixel, and bool following altivec.h include.
15190 2018-04-03 Martin Sebor <msebor@redhat.com>
15192 * doc/extend.texi (Common Function Attributes): Clarify.
15193 (const attribute): Likewise.
15194 (pure attribute): Likewise.
15196 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15199 * config/i386/i386.c (ix86_expand_vector_set): Use
15200 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15202 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15204 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15205 instructions when changing rounding bits to preserve precision bits
15206 in the x87 control word.
15208 2018-04-03 Martin Liska <mliska@suse.cz>
15210 PR tree-optimization/82491
15211 * rtl.h (strip_offset_and_add): Replace += suboffset with
15212 poly_uint64 () + suboffset.
15214 2018-03-29 Martin Liska <mliska@suse.cz>
15215 Martin Jambor <mjambor@suse.cz>
15218 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15219 param_type is not an integral or pointer type.
15221 2018-04-03 Richard Biener <rguenther@suse.de>
15223 * sese.h (recompute_all_dominators): Remove.
15225 2018-04-02 Martin Sebor <msebor@redhat.com>
15227 * doc/invoke.texi (-Wrestrict): Fix typos.
15229 2018-04-02 Jim Wilson <jimw@sifive.com>
15231 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15232 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15233 (<optab>di3, <optab>si3_extend): Likewise.
15234 (<optab>si3_mask, <optab>si3_mask_1): New.
15235 (<optab>di3_mask, <optab>di3_mask_1): New.
15236 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15237 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15238 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15240 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15242 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15245 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15247 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15248 (nds32_canonicalize_comparison): New function.
15250 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15251 Kito Cheng <kito.cheng@gmail.com>
15252 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15254 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15255 * config/nds32/constants.md (unspec_volatile_element): Add
15256 UNSPEC_VOLATILE_RELAX_GROUP.
15257 * config/nds32/nds32-relax-opt.c: New file.
15258 * config/nds32/nds32-predicates.c
15259 (nds32_symbol_load_store_p): New function.
15260 * config/nds32/nds32-protos.h
15261 (nds32_symbol_load_store_p): Declare function.
15262 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15263 * config/nds32/nds32.c
15264 (nds32_register_pass): New function to register pass.
15265 (nds32_register_passes): New function to register passes.
15266 * config/nds32/nds32.md (relax_group): New pattern.
15267 * config/nds32/nds32.opt (mrelax-hint): New option.
15268 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15270 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
15272 * config/nds32/t-nds32: Modify files dependency.
15274 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15276 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15277 (PROFILE_HOOK): Define its implementation.
15279 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15281 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15282 type and 32-bit size.
15284 2018-04-01 Jakub Jelinek <jakub@redhat.com>
15286 PR middle-end/85090
15287 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15288 (V_128_256): New mode iterator.
15289 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15290 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15291 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15293 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15294 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15296 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
15299 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15300 NaN inputs correctly.
15302 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
15305 * config/rs6000/vsx.md (??r): New mode attribute.
15306 (*vsx_mov<mode>_64bit): Use it.
15307 (*vsx_mov<mode>_32bit): Likewise.
15309 2018-03-30 Martin Sebor <msebor@redhat.com>
15311 PR tree-optimization/84818
15312 * builtins.c (check_access): Use warning_n.
15314 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15317 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15319 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15322 2018-03-30 Julia Koval <julia.koval@intel.com>
15325 * x86-tune.def (movx, partial_reg_dependency): Enable for
15328 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
15330 PR inline-asm/84985
15331 * lra-constraints.c (process_alt_operands): Move setting
15332 this_alternative_matches below.
15334 2018-03-29 Martin Liska <mliska@suse.cz>
15337 * doc/invoke.texi: Document how LTO works with debug info.
15338 Describe auto-load support of binutils. Mention 'x86-64'
15339 as valid option value of -march option.
15341 2018-03-29 Jakub Jelinek <jakub@redhat.com>
15343 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15346 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15347 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15348 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15351 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15354 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15355 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15356 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15357 for RS6000_BTM_POWERPC64.
15358 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15359 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15360 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15363 (DIVDEU): Likewise.
15365 2018-03-28 Carl Love <cel@us.ibm.com>
15368 2017-09-27 Carl Love <cel@us.ibm.com>
15370 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15371 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15372 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15375 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15377 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15378 instead of __vector bool.
15379 (_mm_max_pu8): Likewise.
15380 (_mm_min_pi16): Likewise.
15382 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15385 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15386 (DIVWEUO): Likewise.
15387 (DIVDEO): Likewise.
15388 (DIVDEUO): Likewise.
15389 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15390 DIVWEUO and DIVDEUO.
15391 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15392 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15393 (div_extend): Likewise.
15394 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15396 (__builtin_divweuo): Likewise.
15397 (__builtin_divdeo): Likewise.
15398 (__builtin_divdeuo): Likewise.
15400 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15403 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15404 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15406 PR tree-optimization/82004
15407 * gimple-match-head.c (optimize_pow_to_exp): New function.
15408 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15409 Don't fold to exp if optimize_pow_to_exp is false.
15411 2018-03-28 Martin Liska <mliska@suse.cz>
15414 * calls.c (initialize_argument_information): Fix trailing space.
15415 * common.opt: Fix typo and provide better explanation for
15416 -fsanitize-coverage option.
15417 * config/i386/i386.opt: Fix typo.
15419 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15420 Martin Liska <mliska@suse.cz>
15423 * gimplify.c (asan_poison_variable): Don't do the check for
15424 gimplify_omp_ctxp here.
15425 (gimplify_decl_expr): Do it here.
15426 (gimplify_target_expr): Likewise.
15428 2018-03-28 Martin Liska <mliska@suse.cz>
15431 * config/i386/i386.c (ix86_function_arg_advance): Do not call
15432 chkp_type_bounds_count if MPX is not enabled.
15434 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
15436 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15438 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
15441 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15442 function to create the function decl for complex long double
15443 multiply and divide for -mabi=ieeelongdouble.
15444 (init_float128_ieee): Call it.
15446 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
15449 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15450 -fcf-protection=branch -mibt.
15451 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15453 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15456 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15457 arm_word_relocations.
15459 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15462 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15463 extern array declarations.
15465 2018-03-27 Richard Biener <rguenther@suse.de>
15467 PR middle-end/84067
15468 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15469 explicit single_use checks.
15471 2018-03-27 Richard Biener <rguenther@suse.de>
15473 PR tree-optimization/85082
15474 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15477 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15479 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15480 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15481 Turn on fasynchronous-unwind-tables and funwind-tables.
15483 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
15486 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15487 (*bmi_blsr_<mode>_ccz): Ditto.
15489 2018-03-26 Tom de Vries <tom@codesourcery.com>
15491 PR tree-optimization/85063
15492 * omp-general.c (offloading_function_p): New function. Factor out
15494 * omp-offload.c (pass_omp_target_link::gate): ... here.
15495 * omp-general.h (offloading_function_p): Declare.
15496 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15497 with attribute omp declare target for offloading functions.
15499 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
15501 PR tree-optimization/84005
15502 * tree-data-ref.h (get_base_for_alignment): Declare.
15503 * tree-data-ref.c (get_base_for_alignment_1): New function.
15504 (get_base_for_alignment): Likewise.
15505 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15506 get_base_for_alignment to find a suitable base object, instead
15507 of always using drb->base_address.
15509 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15511 PR inline-asm/85022
15512 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15513 known size by default.
15515 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
15517 PR inline-asm/85030
15518 * lra-constraints.c (process_alt_operands): Don't match BLKmode
15519 and non BLKmode operands.
15521 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15524 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15525 Clean up attributes.
15527 2018-03-23 Richard Biener <rguenther@suse.de>
15530 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15531 we are going to emit early debug for LTO.
15533 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15535 PR inline-asm/85034
15536 * function.c (match_asm_constraints_1): Don't optimize if input
15537 doesn't satisfy general_operand predicate for output's mode.
15539 PR inline-asm/85022
15540 * alias.c (write_dependence_p): Don't require for x_canonicalized
15541 non-VOIDmode if x has VOIDmode.
15544 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15545 just don't try to optimize it rather than assert it never happens.
15547 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15549 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15550 macro expansions for definition of ST_INTERNAL_<mode> and
15551 LD_INTERNAL_<mode> builtins.
15552 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15554 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15556 (altivec_expand_st_builtin): Likewise.
15557 (altivec_expand_builtin): Remove calls to deleted functions.
15558 (rs6000_address_for_altivec): Delete this function.
15559 * config/rs6000/vector.md: Remove expands for
15560 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15562 2018-03-22 Sudakshina Das <sudi.das@arm.com>
15565 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15566 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15567 re-computing once computed.
15568 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15569 (arm_init_machine_status): Initialize
15570 machine->static_chain_stack_bytes.
15572 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15575 * doc/extend.texi: Add four new prototypes for vec_ld.
15576 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15577 definitions for more logical presentation.
15578 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15579 entries for V1TI variants of __builtin_altivec_ld builtin.
15580 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15581 handling of V1TI variant of LVX icode pattern.
15582 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15583 (rs6000_gimple_fold_builtin): Likewise.
15584 (altivec_init_builtins): Add code to define
15585 __builtin_altivec_lvx_v1ti function.
15587 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15589 PR inline-asm/84941
15590 * function.c (match_asm_constraints_1): Don't do the optimization
15591 if input isn't a REG, SUBREG, MEM or constant.
15593 2018-03-22 Tom de Vries <tom@codesourcery.com>
15595 PR tree-optimization/84956
15596 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15597 bb_has_abnormal_pred.
15599 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15602 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15603 DECL_INITIAL (decl) to decl at the end.
15604 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15605 adjust the comment.
15607 2018-03-21 Joseph Myers <joseph@codesourcery.com>
15609 * doc/extend.texi (__builtin_tgmath): Document when complex
15610 integer types are treated as _Complex _Float64.
15612 2018-03-21 Tom de Vries <tom@codesourcery.com>
15614 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15616 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15618 PR tree-optimization/84960
15619 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15620 if it is ENTRY block, move them into single succ of ENTRY in that case.
15622 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
15624 PR tree-optimization/84811
15625 * poly-int.h (poly_span_traits): Remove the T3 parameter and
15626 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15627 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15628 (known_subrange_p): Update accordingly. Cast each value involved
15629 in the size comparison, rather than casting the result of the
15632 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15634 PR tree-optimization/84982
15635 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15636 by flipping the least significant bit rather than all bits from
15637 bitpos to bitpos + bitsize - 1.
15639 2018-03-21 Nathan Sidwell <nathan@acm.org>
15641 * doc/extend.texi (Deprecated Features): Remove mention of
15642 long-deleted deprecations.
15644 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15647 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15648 * configure: Regenerate.
15650 2018-03-21 Tom de Vries <tom@codesourcery.com>
15652 PR tree-optimization/83126
15653 * tree-parloops.c (num_phis): New function.
15654 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15656 2018-03-21 Nathan Sidwell <nathan@acm.org>
15658 * doc/extend.texi (Deprecated Features): Update deprecated flags,
15659 mention anon-struct/union members and trailing attributes.
15661 2018-03-21 Bin Cheng <bin.cheng@arm.com>
15663 PR tree-optimization/84969
15664 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15665 builtin memset partitions if they set different rhs values.
15667 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15669 PR rtl-optimization/84989
15670 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15671 VEC_DUPLICATE with scalar result mode.
15673 2018-03-21 Martin Liska <mliska@suse.cz>
15676 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15677 not intended return statement.
15679 2018-03-21 Martin Liska <mliska@suse.cz>
15682 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15683 (chkp_find_bound_slots_1): Limit number of iterations.
15685 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
15688 * Minor grammar fixes for x86 options.
15690 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15693 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15694 holding REG_CFA_RESTORE notes, instead turn them into a USE.
15696 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
15699 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15700 (altivec_lvx_<mode>_1op): Likewise.
15701 (altivec_stvx_<mode>_2op): Likewise.
15702 (altivec_stvx_<mode>_1op): Likewise.
15703 (altivec_lvx_<VM2:mode>): New define_expand.
15704 (altivec_stvx_<VM2:mode>): Likewise.
15705 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15706 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15707 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15708 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15709 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15710 (rs6000_gen_lvx): Likewise.
15711 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15712 (altivec_expand_stv_builtin): Likewise.
15713 (altivec_expand_builtin): Likewise.
15714 * config/rs6000/vector.md: Likewise.
15716 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15719 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
15722 2018-03-20 Richard Biener <rguenther@suse.de>
15725 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
15726 sign-conversions as zero, fall back to standard scalar_stmt
15729 2018-03-20 Martin Liska <mliska@suse.cz>
15732 * predict.c (rebuild_frequencies): Handle case when we have
15733 PROFILE_ABSENT, but flag_guess_branch_prob is false.
15735 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15738 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
15739 flag_section_anchors.
15740 * varasm.c (use_blocks_for_decl_p): Remove hack for
15741 dw2_force_const_mem.
15744 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
15746 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
15747 be created, use lowpart_subreg of operands[0] rather than operands[0]
15749 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15750 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15751 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15752 and n constraint instead of aarch64_shift_imm_di and Usd.
15753 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15754 (*aarch64_<optab>_reg_minus<mode>3): ... this.
15756 2018-03-20 Sudakshina Das <sudi.das@arm.com>
15759 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15760 to favor GPR over NEON registers.
15761 (<shift>di3_neon): Likewise.
15763 2018-03-20 Tom de Vries <tom@codesourcery.com>
15766 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15767 (nvptx_process_pars): Emit bar.sync asap and alap.
15769 2018-03-20 Tom de Vries <tom@codesourcery.com>
15772 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15773 seen_label if seen_label is already set.
15775 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15778 * config/i386/i386.c (fold_builtin_cpu): For features above 31
15779 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15780 Use 1U instead of 1. Formatting fixes.
15783 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15784 instead of TREE_TYPE (s1) for the return value.
15786 2018-03-19 Jakub Jelinek <jakub@redhat.com>
15788 PR tree-optimization/84946
15789 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15790 bitsize + bitsize in poly_uint64 rather than poly_int64.
15793 * dwarf2asm.c: Include fold-const.c.
15794 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15795 of decl rather than decl itself.
15797 PR rtl-optimization/84643
15798 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15800 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
15803 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15804 calling assemble_variable.
15806 2018-03-19 Sudakshina Das <sudi.das@arm.com>
15809 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
15810 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
15812 2018-03-19 Jim Wilson <jimw@sifive.com>
15815 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
15816 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
15817 (riscv_first_stack_step): Likewise.
15818 (riscv_option_override): Use STACK_BOUNDARY instead of
15819 MIN_STACK_BOUNDARY.
15820 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
15821 MIN_STACK_BOUNDARY.
15822 (BIGGEST_ALIGNMENT): Set to 128.
15823 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
15824 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
15827 2018-03-19 Richard Biener <rguenther@suse.de>
15829 PR tree-optimization/84933
15830 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
15831 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
15833 2018-03-19 Richard Biener <rguenther@suse.de>
15835 PR tree-optimization/84859
15836 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
15837 (cond_if_else_store_replacement): Perform sinking operation on
15838 single-store BBs regardless of MAX_STORES_TO_SINK setting.
15839 Generalize what a BB with a single eligible store is.
15841 2018-03-19 Richard Biener <rguenther@suse.de>
15843 PR tree-optimization/84929
15844 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
15845 chrec_is_positive against non-chrec arg.
15847 2018-03-19 Tamar Christina <tamar.christina@arm.com>
15850 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
15852 2018-03-18 Martin Liska <mliska@suse.cz>
15854 PR rtl-optimization/84635
15855 * regrename.c (build_def_use): Use matches_mode only when
15858 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
15860 PR tree-optimization/84913
15861 * tree-vect-loop.c (vectorizable_reduction): Don't try to
15862 vectorize chains of COND_EXPRs.
15864 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15866 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
15868 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15870 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
15872 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15874 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
15876 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15877 Kito Cheng <kito.cheng@gmail.com>
15879 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
15880 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
15881 (nds32_adjust_reg_alloc_order): New function.
15882 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
15884 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
15886 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
15887 nds32_print_operand, nds32_print_operand_address): Use
15888 HOST_WIDE_INT_PRINT_DEC instead.
15890 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15892 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
15894 2018-03-17 Jakub Jelinek <jakub@redhat.com>
15897 * config/i386/i386.c (initial_ix86_tune_features,
15898 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15899 unsigned long long.
15900 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
15901 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
15902 rather than 1u << ix86_tune. Formatting fix.
15903 (ix86_option_override_internal): Change ix86_arch_mask from
15904 unsigned int to unsigned HOST_WIDE_INT, initialize to
15905 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
15906 (ix86_function_specific_restore): Likewise.
15908 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15911 * postreload.c (reload_combine_recognize_pattern): Perform
15912 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
15913 truncate_int_for_mode the result for the destination's mode.
15916 * hsa-gen.c (mem_type_for_type): Fix comment typo.
15917 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
15919 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15922 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
15925 * lra-assigns.c (lra_split_hard_reg_for): Don't use
15926 regno_allocno_class_array and sorted_pseudos.
15927 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
15928 insns where regno is used.
15930 2018-03-16 Martin Liska <mliska@suse.cz>
15933 * multiple_target.c (create_dispatcher_calls): Redirect
15934 reference in the symbol table.
15936 2018-03-16 Martin Liska <mliska@suse.cz>
15939 * multiple_target.c (create_dispatcher_calls): Redirect also
15942 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15946 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
15947 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
15948 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
15950 2018-03-16 Julia Koval <julia.koval@intel.com>
15952 * doc/invoke.texi (Skylake Server): Add CLWB.
15953 Cannonlake): Remove CLWB.
15955 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15957 PR tree-optimization/84841
15958 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
15960 (FLOAT_ONE_CONST_TYPE): Define.
15961 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
15962 (sort_by_operand_rank): Put entries with higher constant_type last
15963 rather than first to match comments.
15965 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
15967 * config/nios2/nios2.md (movsi_internal): Fix thinko in
15970 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15973 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
15974 check and use address of target always.
15976 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
15979 * config/i386/i386.c (indirect_thunk_needed): Update comments.
15980 (indirect_thunk_bnd_needed): Likewise.
15981 (indirect_thunks_used): Likewise.
15982 (indirect_thunks_bnd_used): Likewise.
15983 (indirect_return_needed): New.
15984 (indirect_return_bnd_needed): Likewise.
15985 (output_indirect_thunk_function): Add a bool argument for
15987 (output_indirect_thunk_function): Don't generate alias for
15988 function return thunk.
15989 (ix86_code_end): Call output_indirect_thunk_function to generate
15990 function return thunks.
15991 (ix86_output_function_return): Set indirect_return_bnd_needed
15992 and indirect_return_needed instead of indirect_thunk_bnd_needed
15993 and indirect_thunk_needed.
15995 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
15997 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
15998 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
15999 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16001 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16002 Paul Hua <paul.hua.gm@gmail.com>
16005 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16007 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16009 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16010 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16011 resp. SFmode cases.
16013 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16016 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16017 instead of GET_MODE_SIZE when comparing Units.
16019 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16022 * varasm.c (hash_section): Return an unchangeble hash value
16023 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16024 Return !aarch64_can_use_per_function_literal_pools_p ().
16026 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16029 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16030 rather than address of cmode as last argument to prepare_cmp_insn.
16032 2018-03-15 Julia Koval <julia.koval@intel.com>
16034 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16035 F_AVX512VNNI, F_AVX512BITALG): New.
16037 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16040 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16041 insn for floating-point loads and stores.
16043 2018-03-14 Carl Love <cel@us.ibm.com>
16045 * config/rs6000/rs6000-c.c: Add macro definitions for
16046 ALTIVEC_BUILTIN_VEC_PERMXOR.
16047 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16048 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16049 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16050 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16052 * config/doc/extend.texi: Add prototypes for vec_permxor.
16054 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16057 * diagnostic-show-locus.c (class layout_point): Convert m_line
16058 from int to linenum_type.
16059 (line_span::comparator): Use linenum "compare" function when
16060 comparing line numbers.
16061 (test_line_span): New function.
16062 (layout_range::contains_point): Convert param "row" from int to
16064 (layout_range::intersects_line_p): Likewise.
16065 (layout::will_show_line_p): Likewise.
16066 (layout::print_source_line): Likewise.
16067 (layout::should_print_annotation_line_p): Likewise.
16068 (layout::print_annotation_line): Likewise.
16069 (layout::print_leading_fixits): Likewise.
16070 (layout::annotation_line_showed_range_p): Likewise.
16071 (struct line_corrections): Likewise for field m_row.
16072 (line_corrections::line_corrections): Likewise for param "row".
16073 (layout::print_trailing_fixits): Likewise.
16074 (layout::get_state_at_point): Likewise.
16075 (layout::get_x_bound_for_row): Likewise.
16076 (layout::print_line): Likewise.
16077 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16078 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16079 * input.c (selftest::test_linenum_comparisons): New function.
16080 (selftest::input_c_tests): Call it.
16081 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16082 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16083 * selftest.h (ASSERT_GT): New macro.
16084 (ASSERT_GT_AT): New macro.
16085 (ASSERT_LT): New macro.
16086 (ASSERT_LT_AT): New macro.
16088 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16090 PR rtl-optimization/84780
16091 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16093 2018-03-14 Martin Liska <mliska@suse.cz>
16095 * tree.c (record_node_allocation_statistics): Use
16096 get_stats_node_kind.
16097 (get_stats_node_kind): New function extracted from
16098 record_node_allocation_statistics.
16099 (free_node): Use get_stats_node_kind.
16101 2018-03-14 Richard Biener <rguenther@suse.de>
16103 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16104 that the value-set of ANTIC_IN doesn't grow.
16107 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16109 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16110 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16112 2018-03-14 Julia Koval <julia.koval@intel.com>
16114 * config.gcc (icelake-client, icelake-server): New.
16116 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16117 (initial_ix86_arch_features): Ditto.
16118 (PTA_SKYLAKE): Add SGX.
16119 (PTA_ICELAKE): Remove.
16120 (PTA_ICELAKE_CLIENT): New.
16121 (PTA_ICELAKE_SERVER): New.
16122 (ix86_option_override_internal): Split up icelake on icelake client and
16124 (get_builtin_code_for_version): Ditto.
16125 (fold_builtin_cpu): Ditto.
16126 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16127 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16128 * config/i386/i386.h (processor_type): Ditto.
16129 * doc/invoke.texi: Ditto.
16131 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16134 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16135 INTEGER_CST offset, add it together with bitpos / 8 and
16136 sign extend based on POINTER_SIZE.
16140 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16143 * config/i386/constraints.md (Yc): New register constraint.
16144 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16145 Use Yc constraint for alternative 2 of operand 0. Remove
16146 preferred_for_speed attribute.
16148 2018-03-14 Richard Biener <rguenther@suse.de>
16150 PR tree-optimization/84830
16151 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16152 with the old one to avoid oscillations.
16154 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16157 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16159 (assign_by_spills): Return a flag of reload assignment failure.
16160 Do not process the reload assignment failures. Do not spill other
16161 reload pseudos if they has the same reg class. Update n if
16163 (lra_assign): Add a return arg. Set up from the result of
16164 assign_by_spills call.
16165 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16166 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16167 usage_insns if it is not NULL.
16168 (spill_hard_reg_in_range): New function.
16169 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16170 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16171 function prototypes.
16172 (lra_assign): Change prototype.
16173 * lra.c (lra): Add code to deal with fails by splitting hard reg
16176 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16178 * config/riscv/riscv.opt (mrelax): New option.
16179 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16180 "norelax" when riscv_mrelax is disabled.
16181 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16183 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16186 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16187 reassociation for int modes.
16189 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16191 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16192 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16194 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16195 * config/aarch64/aarch64-sve.md
16196 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16197 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16198 (*extend<mode><Vwide>2): Rename to...
16199 (aarch64_sve_extend<mode><Vwide>2): ...this.
16200 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16201 renaming the old pattern to...
16202 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16204 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16205 define_expand, renaming the old pattern to...
16206 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16207 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16208 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16209 account when deciding which SVE instruction the optab should use.
16210 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16212 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16214 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16215 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16216 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16217 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16218 (tlsdesc_small_<mode>): Turn a define_expand and use
16219 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16220 (tlsdesc_small_advsimd_<mode>): ...this.
16221 (tlsdesc_small_sve_<mode>): New pattern.
16223 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16225 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16226 (UNSPEC_UMUL_HIGHPART): New constants.
16227 (MUL_HIGHPART): New int iteraor.
16228 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16229 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16231 (*<su>mul<mode>3_highpart): New define_insn.
16233 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16236 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16239 2018-03-13 Martin Liska <mliska@suse.cz>
16242 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16244 (sem_item_optimizer::~sem_item_optimizer): Release it.
16245 (sem_item_optimizer::merge_classes): Register variable aliases.
16246 (sem_item_optimizer::fixup_pt_set): New function.
16247 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16248 * ipa-icf.h: Declare new variables and functions.
16250 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16252 PR middle-end/84834
16253 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16254 integer_pow2p@2 and test integer_pow2p in condition.
16255 (A < 0 ? C : 0): Similarly for @1.
16257 PR middle-end/84831
16258 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16259 characters starting at p contain '\0' character, don't look beyond
16263 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16264 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16267 * reg-stack.c (change_stack): Change update_end var from int to
16268 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16269 also call set_block_for_insn on the newly added insns and rescan.
16272 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16273 on the last operand.
16276 * tree.c (stabilize_reference_1): Return save_expr (e) for
16277 STATEMENT_LIST even if it doesn't have side-effects.
16279 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
16281 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16283 2018-03-12 Renlin Li <renlin.li@arm.com>
16285 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16286 aarch64_output_scalar_simd_mov_immediate.
16288 2018-03-12 Martin Sebor <msebor@redhat.com>
16290 PR tree-optimization/83456
16291 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16292 for perfectly overlapping calls to memcpy.
16293 (gimple_fold_builtin_memory_chk): Same.
16294 (gimple_fold_builtin_strcpy): Handle no-warning.
16295 (gimple_fold_builtin_stxcpy_chk): Same.
16296 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16298 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16300 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16301 parameter. Use it for SFmode.
16302 (rs6000_function_arg_advance_1): Adjust.
16303 (rs6000_function_arg): Adjust.
16304 (rs6000_gimplify_va_arg): Pass false for that new parameter.
16306 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16308 PR rtl-optimization/84169
16309 PR rtl-optimization/84780
16310 * combine.c (can_combine_p): Check for a 2-insn combination whether
16311 the destination register is used between the two insns, too.
16313 2018-03-12 Richard Biener <rguenther@suse.de>
16315 PR tree-optimization/84803
16316 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16317 for refs DR analysis didn't process.
16319 2018-03-12 Richard Biener <rguenther@suse.de>
16321 PR tree-optimization/84777
16322 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16323 force-vectorize loops ignore whether we are optimizing for size.
16325 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
16327 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16328 (TARGET_MD_ASM_ADJUST): Define.
16330 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
16331 Kito Cheng <kito.cheng@gmail.com>
16332 Chung-Ju Wu <jasonwucj@gmail.com>
16334 * config/nds32/nds32.c (nds32_compute_stack_frame,
16335 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16336 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16337 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16338 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16339 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16340 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16341 * config/nds32/nds32.md (prologue, epilogue): Use macro
16342 NDS32_V3PUSH_AVAILABLE_P to do checking.
16344 2018-03-11 Jakub Jelinek <jakub@redhat.com>
16347 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16348 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16349 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
16350 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
16351 addition of most attributes on !orig_type_die or the attribute not
16352 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16354 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16355 Chung-Ju Wu <jasonwucj@gmail.com>
16357 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16358 __NDS32_VH__ macro.
16359 * config/nds32/nds32.opt (mvh): New option.
16361 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16362 Chung-Ju Wu <jasonwucj@gmail.com>
16364 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16366 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16367 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16370 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16371 Chung-Ju Wu <jasonwucj@gmail.com>
16373 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16375 * config/nds32/nds32-multiple.md (strlensi): New pattern.
16376 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16378 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
16379 Kito Cheng <kito.cheng@gmail.com>
16380 Chung-Ju Wu <jasonwucj@gmail.com>
16382 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16383 UNSPEC_FFMISM and UNSPEC_FLMISM.
16384 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16385 for ffb, ffmism and flmism.
16386 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16387 (unspec_ffmism): Ditto.
16388 (unspec_flmism): Ditto.
16389 (nds32_expand_builtin_impl): Check if string extension is available.
16390 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16391 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16393 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
16396 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16399 * lra-assigns.c (assign_by_spills): Return a flag of reload
16400 assignment failure. Do not process the reload assignment
16401 failures. Do not spill other reload pseudos if they has the same
16403 (lra_assign): Add a return arg. Set up from the result of
16404 assign_by_spills call.
16405 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16406 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16407 usage_insns if it is not NULL.
16408 (spill_hard_reg_in_range): New function.
16409 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16410 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16411 function prototypes.
16412 (lra_assign): Change prototype.
16413 * lra.c (lra): Add code to deal with fails by splitting hard reg
16416 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
16419 * config/i386/i386.opt: Replace Enforcment with Enforcement.
16421 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
16424 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16425 (dw_val_node): Add val_symbolic_view.
16426 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16427 (symview_upper_bound): New.
16428 (new_line_info_table): Initialize symviews_since_reset.
16429 (dwarf2out_source_line): Count symviews_since_reset and set
16430 symview_upper_bound.
16431 (dw_val_equal_p): Handle symview.
16432 (add_AT_symview): New.
16433 (print_dw_val): Handle symview.
16434 (attr_checksum, attr_checksum_ordered): Likewise.
16435 (same_dw_val_p, size_of_die): Likewise.
16436 (value_format, output_die): Likewise.
16437 (add_high_low_attributes): Use add_AT_symview for entry_view.
16438 (dwarf2out_finish): Reset symview_upper_bound, clear
16441 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
16444 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16445 Add strict argument and use it.
16446 (rs6000_split_multireg_move): Update for new strict argument.
16447 (mem_operand_gpr): Disallow all non-offsettable addresses.
16448 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16450 2018-03-09 Jakub Jelinek <jakub@redhat.com>
16453 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16454 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16455 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16458 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16459 decl, use remap_type if we want to use the type.
16461 2018-03-09 Martin Sebor <msebor@redhat.com>
16463 PR tree-optimization/84526
16464 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16466 (builtin_access::generic_overlap): Be prepared to handle non-array
16469 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
16471 PR rtl-optimization/84682
16472 * lra-constraints.c (process_address_1): Check is_address flag
16473 for address constraints.
16474 (process_alt_operands): Likewise.
16475 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16476 preprocess_constraints.
16477 * recog.h (preprocess_constraints): Add oploc parameter.
16479 * recog.c (preprocess_constraints): Test address_operand for
16480 CT_ADDRESS constraints.
16482 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16485 * lra-assigns.c (assign_by_spills): Return a flag of reload
16486 assignment failure. Do not process the reload assignment
16487 failures. Do not spill other reload pseudos if they has the same
16489 (lra_assign): Add a return arg. Set up from the result of
16490 assign_by_spills call.
16491 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16492 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16493 usage_insns if it is not NULL.
16494 (spill_hard_reg_in_range): New function.
16495 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16496 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16497 function prototypes.
16498 (lra_assign): Change prototype.
16499 * lra.c (lra): Add code to deal with fails by splitting hard reg
16502 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16505 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16506 Accept complain bool parameter. Only emit errors if it is true.
16507 (arm_parse_cpu_option_name): Likewise.
16508 (arm_target_thumb_only): Adjust callers of the above.
16509 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16510 prototype to take a default true bool parameter.
16511 (arm_parse_arch_option_name): Likewise.
16513 2018-03-09 David Malcolm <dmalcolm@redhat.com>
16514 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
16518 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16519 * configure: Regenerate.
16520 * configure.ac ("linker --version-script option"): New.
16521 ("linker soname option"): New.
16523 2018-03-09 Richard Biener <rguenther@suse.de>
16525 PR tree-optimization/84775
16526 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16527 immediate uses of predicate stmts and mark them modified.
16530 PR tree-optimization/84178
16531 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16533 (version_loop_for_if_conversion): Delay update_ssa call.
16534 (tree_if_conversion): Delay update_ssa until after predicate
16537 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
16540 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16541 when the function accesses prior frames.
16543 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16546 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16547 gen_llsym, otherwise call maybe_gen_llsym.
16549 PR inline-asm/84742
16550 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16551 has ',' character inside of it.
16553 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16556 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16557 as clobbering CC_REGNUM.
16559 2018-03-08 Richard Biener <rguenther@suse.de>
16561 PR middle-end/84552
16562 * tree-scalar-evolution.c: Include tree-into-ssa.h.
16563 (follow_copies_to_constant): Do not follow SSA names registered
16566 2018-03-08 Richard Biener <rguenther@suse.de>
16568 PR tree-optimization/84178
16569 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16571 (version_loop_for_if_conversion): Delay update_ssa call.
16572 (tree_if_conversion): Delay update_ssa until after predicate
16575 2018-03-08 David Malcolm <dmalcolm@redhat.com>
16577 PR tree-optimization/84178
16578 * tree-if-conv.c (release_bb_predicate): Remove the
16579 the assertion that the stmts have NULL use_ops.
16580 Discard the statements, asserting that they haven't
16581 yet been added to a BB.
16583 2018-03-08 Richard Biener <rguenther@suse.de>
16585 PR tree-optimization/84746
16586 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16587 (phi_translate): Pass in destination ANTIC_OUT set.
16588 (phi_translate_1): Likewise. For a simplified result lookup
16589 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16590 (phi_translate_set): Adjust.
16591 (do_pre_regular_insertion): Likewise.
16592 (do_pre_partial_partial_insertion): Likewise.
16594 2018-03-08 Martin Liska <mliska@suse.cz>
16596 PR gcov-profile/84735
16597 * doc/gcov.texi: Document usage of profile files.
16598 * gcov-io.h: Document changes in the format.
16600 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
16604 * dwarf2out.c (struct dw_line_info_table): Update comments for
16606 (FORCE_RESET_NEXT_VIEW): New.
16607 (FORCE_RESETTING_VIEW_P): New.
16608 (RESETTING_VIEW_P): Check for -1 too.
16609 (ZERO_VIEW_P): Likewise.
16610 (new_line_info_table): Force-reset next view.
16611 (dwarf2out_begin_function): Likewise.
16612 (dwarf2out_source_line): Simplify zero_view_p initialization.
16613 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16614 view directly. Omit view when omitting .loc at line 0.
16616 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16618 PR tree-optimization/84740
16619 * tree-switch-conversion.c (process_switch): Call build_constructors
16620 only if info.phi_count is non-zero.
16622 PR tree-optimization/84739
16623 * tree-tailcall.c (find_tail_calls): Check call arguments against
16624 DECL_ARGUMENTS (current_function_decl) rather than
16625 DECL_ARGUMENTS (func) when checking for tail recursion.
16627 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16629 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16630 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16631 Volker Reichelt's entry and add entries for people that perform
16632 GCC fuzzy testing and report numerous bugs.
16634 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
16637 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16638 readonly data in sdata, if that is disabled.
16639 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16640 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16641 -mreadonly-in-sdata option.
16643 2018-03-07 Martin Sebor <msebor@redhat.com>
16645 PR tree-optimization/84468
16646 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16647 basic block when looking for nul assignment.
16649 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
16652 * except.h (output_function_exception_table): Adjust prototype.
16653 * except.c (output_function_exception_table): Remove FNNAME parameter
16654 and add SECTION parameter. Ouput one part of the table at a time.
16655 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16656 the first part of the exception table and emit unwind directives.
16657 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16658 (i386_pe_seh_cold_init): Likewise.
16659 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16660 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16661 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16662 (ix86_output_call_insn): Emit a nop in one more case for SEH.
16663 * config/i386/winnt.c: Include except.h.
16664 (struct seh_frame_state): Add reg_offset, after_prologue and
16665 in_cold_section fields.
16666 (i386_pe_seh_end_prologue): Set seh->after_prologue.
16667 (i386_pe_seh_cold_init): New function.
16668 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16669 to seh->in_cold_section.
16670 (seh_emit_push): Record the offset of the push.
16671 (seh_emit_save): Record the offet of the save.
16672 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16673 Test seh->after_prologue to disregard the epilogue.
16674 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16675 (i386_pe_end_cold_function): New function.
16677 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16680 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16681 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16684 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16686 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16687 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16689 PR middle-end/84723
16690 * multiple_target.c: Include tree-inline.h and intl.h.
16691 (expand_target_clones): Diagnose and fail if node->definition and
16692 !tree_versionable_function_p (node->decl).
16694 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
16696 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16698 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16699 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16700 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16702 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16705 * combine.c (try_combine): Use reg_or_subregno instead of handling
16706 just paradoxical SUBREGs and REGs.
16708 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
16710 * config/arc/arc.c (arc_finalize_pic): Remove function.
16711 (arc_must_save_register): We use single base PIC register, remove
16712 checks to save/restore the PIC register.
16713 (arc_expand_prologue): Likewise.
16714 * config/arc/arc-protos.h (arc_set_default_type_attributes):
16716 (arc_verify_short): Likewise.
16717 (arc_attr_type): Likewise.
16718 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16719 (walk_stores): Likewise.
16720 (arc_address_cost): Make it static.
16721 (arc_verify_short): Likewise.
16722 (branch_dest): Likewise.
16723 (arc_attr_type): Likewise.
16724 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
16725 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
16726 (arc_final_prescan_insn): Remove inserting the nops due to
16727 hardware hazards. It is done in reorg step.
16728 (insn_length_variant_t): Remove.
16729 (insn_length_parameters_t): Likewise.
16730 (arc_insn_length_parameters): Likewise.
16731 (arc_get_insn_variants): Likewise.
16732 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
16734 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16736 PR inline-asm/84683
16737 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
16740 PR tree-optimization/84687
16741 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
16743 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
16745 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16747 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16748 Rename to ppc_speculation_barrier.
16749 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16750 __builtin_ppc_speculation_barrier.
16752 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16755 * combine.c (combine_simplify_rtx): Don't try to simplify if
16756 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16759 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
16761 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16762 to 32 bytes when compiling for POWER9.
16764 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16767 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16768 regparm >= 3 with no arg reg available also for calls with
16769 flag_force_indirect_call. Pass decl to ix86_function_regparm.
16772 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16774 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
16776 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
16779 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16781 2018-03-05 Richard Biener <rguenther@suse.de>
16783 PR tree-optimization/84486
16784 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16785 When inserting a __builtin_assume_aligned call set the LHS
16786 SSA name alignment info accordingly.
16788 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
16790 PR tree-optimization/84114
16791 * config/aarch64/aarch64.c (aarch64_reassociation_width)
16792 Avoid reassociation of FLOAT_MODE addition.
16794 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
16796 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16797 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16798 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16799 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16800 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16801 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16802 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16804 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16805 __builtin_ia32_wbinvd): New builtins.
16806 (SPECIAL_ARGS2): New.
16807 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
16808 (SPECIAL_ARGS2): New.
16809 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
16810 (ix86_valid_target_attribute_inner_p): Ditto.
16811 (ix86_init_mmx_sse_builtins): Add special_args2.
16812 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
16813 TARGET_WBNOINVD_P): New.
16814 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
16815 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
16816 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
16817 * config/i386/immintrin.h (_wbinvd): New intrinsic.
16818 * config/i386/pconfigintrin.h: New file.
16819 * config/i386/wbnoinvdintrin.h: Ditto.
16820 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
16822 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
16824 2018-03-05 Richard Biener <rguenther@suse.de>
16826 PR tree-optimization/84670
16827 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16829 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16830 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16831 (compute_antic_aux): Only assert the number of values in ANTIC_IN
16832 doesn't grow if all successors (recursively) were visited at least
16835 2018-03-05 Richard Biener <rguenther@suse.de>
16837 PR tree-optimization/84650
16838 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
16839 if executed in the loop pipeline.
16841 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
16843 * doc/configfiles.texi (Configuration Files): Move info about
16844 conditionalizing $target-protos.h to...
16845 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
16846 differs from $target-protos.h.
16848 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
16849 Chung-Ju Wu <jasonwucj@gmail.com>
16851 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
16852 * config/nds32/nds32-multiple.md (setmemsi): Define.
16853 * config/nds32/nds32-memory-manipulation.c
16854 (nds32_gen_dup_4_byte_to_word_value): New.
16855 (emit_setmem_word_loop): New.
16856 (emit_setmem_byte_loop): New.
16857 (nds32_expand_setmem_loop): New.
16858 (nds32_expand_setmem_loop_v3m): New.
16859 (nds32_expand_setmem_unroll): New.
16860 (nds32_expand_setmem): New.
16862 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16863 Chung-Ju Wu <jasonwucj@gmail.com>
16865 * config/nds32/nds32-memory-manipulation.c
16866 (nds32_emit_load_store): New.
16867 (nds32_emit_post_inc_load_store): New.
16868 (nds32_emit_mem_move): New.
16869 (nds32_emit_mem_move_block): New.
16870 (nds32_expand_movmemsi_loop_unknown_size): New.
16871 (nds32_expand_movmemsi_loop_known_size): New.
16872 (nds32_expand_movmemsi_loop): New.
16873 (nds32_expand_movmemsi_unroll): New.
16874 (nds32_expand_movmemqi): Rename ...
16875 (nds32_expand_movmemsi): ... to this.
16876 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
16877 (movmemsi): ... to this.
16878 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
16879 (nds32_expand_movmemsi): ... to this.
16881 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16882 Monk Chiang <sh.chiang04@gmail.com>
16883 Chung-Ju Wu <jasonwucj@gmail.com>
16885 * config/nds32/nds32-protos.h
16886 (nds32_expand_load_multiple): New arguments.
16887 (nds32_expand_store_multiple): Ditto.
16888 (nds32_valid_multiple_load_store): Rename ...
16889 (nds32_valid_multiple_load_store_p): ... to this.
16890 * config/nds32/nds32-memory-manipulation.c
16891 (nds32_expand_load_multiple): Refine implementation.
16892 (nds32_expand_store_multiple): Ditto.
16893 * config/nds32/nds32-multiple.md
16894 (load_multiple): Update nds32_expand_load_multiple interface.
16895 (store_multiple): Update nds32_expand_store_multiple interface.
16896 * config/nds32/nds32-predicates.c
16897 (nds32_valid_multiple_load_store): Rename ...
16898 (nds32_valid_multiple_load_store_p): ... to this and refine
16900 * config/nds32/predicates.md
16901 (nds32_load_multiple_and_update_address_operation): New predicate.
16902 (nds32_store_multiple_and_update_address_operation): New predicate.
16904 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16905 Chung-Ju Wu <jasonwucj@gmail.com>
16907 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
16908 (combo): New attribute.
16909 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
16911 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
16913 * config/nds32/nds32.opt: Change -mcmodel= default value.
16915 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
16916 Monk Chiang <sh.chiang04@gmail.com>
16917 Chung-Ju Wu <jasonwucj@gmail.com>
16919 * config/nds32/constants.md (unspec_element): New enum.
16920 * config/nds32/constraints.md (Umw): New constraint.
16921 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
16922 * config/nds32/nds32-intrinsic.md: Likewise.
16923 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
16924 (nds32_valid_smw_lwm_base_p): New.
16925 (nds32_output_smw_single_word): New.
16926 (nds32_output_lmw_single_word): New.
16927 (nds32_expand_unaligned_load): New.
16928 (nds32_expand_unaligned_store): New.
16929 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
16930 (nds32_output_smw_single_word): Declare.
16931 (nds32_output_lmw_single_word): Declare.
16932 (nds32_expand_unaligned_load): Declare.
16933 (nds32_expand_unaligned_store): Declare.
16934 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
16935 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
16936 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
16937 NDS32_BUILTIN_UASTORE_DW.
16938 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
16941 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
16942 Kito Cheng <kito.cheng@gmail.com>
16943 Chung-Ju Wu <jasonwucj@gmail.com>
16945 * config/nds32/nds32-intrinsic.c
16946 (nds32_expand_builtin_null_ftype_reg): Delete.
16947 (nds32_expand_builtin_reg_ftype_imm): Ditto.
16948 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
16949 (nds32_read_argument): New.
16950 (nds32_legitimize_target): Ditto.
16951 (nds32_legitimize_argument): Ditto.
16952 (nds32_check_constant_argument): Ditto.
16953 (nds32_expand_unop_builtin): Ditto.
16954 (nds32_expand_unopimm_builtin): Ditto.
16955 (nds32_expand_binop_builtin): Ditto.
16956 (nds32_builtin_decl_impl): Ditto.
16957 (builtin_description): Ditto.
16958 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
16959 (nds32_init_builtins_impl): Ditto.
16960 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
16961 (nds32_builtin_decl): New.
16962 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
16963 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
16965 2018-03-02 Jeff Law <law@redhat.com>
16967 * reorg.c (stop_search_p): Handle DEBUG_INSN.
16968 (redundant_insn, fill_simple_delay_slots): Likewise.
16969 (fill_slots_from_thread): Likewise.
16970 * resource.c (mark_referenced_resources): Likewise.
16971 (mark_set_resources, find_dead_or_set_registers): Likewise.
16973 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16975 * substring-locations.h (format_warning_va): Formatting fix for
16976 ATTRIBUTE_GCC_DIAG.
16977 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
16979 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
16980 * substring-locations.c: Include intl.h.
16981 (format_warning_va): Turned into small wrapper around
16982 format_warning_n_va, renamed to ...
16983 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
16984 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
16986 (format_warning_at_substring_n): New function.
16987 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
16988 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
16989 format_warning_at_substring with just a shorter name instead of
16990 const function pointer.
16991 (fmtwarn_n): New function.
16992 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
16993 appropriate, get rid of all the fmtstr temporaries, move conditionals
16994 with G_() wrapped string literals directly into fmtwarn arguments,
16995 cast dir.len to (int), formatting fixes.
16997 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
16999 * doc/invoke.texi: Remove "Cilk Plus" references.
17001 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17002 Richard Biener <rguenther@suse.de>
17005 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17006 for error or warning attributes if CALL_FROM_THUNK_P is set.
17009 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17012 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17013 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17016 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17017 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17019 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17020 instead of -1U in last predictors element's probability member.
17022 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17025 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17026 arguments if they are comparable.
17028 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17030 PR tree-optimization/84634
17031 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17032 masks and masked_loop_p with a single loop_masks, making sure it's
17033 null for bb vectorization.
17035 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17037 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17038 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17039 loop->force_vectorize to check whether there is no alias.
17041 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17044 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17046 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17048 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17049 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17050 instead of a loop around prev_real_insn.
17051 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17054 PR inline-asm/84625
17055 * config/i386/i386.c (ix86_print_operand): Use conditional
17056 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17059 2018-03-02 Richard Biener <rguenther@suse.de>
17061 PR tree-optimization/84427
17062 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17063 (bitmap_set_subtract_values): Rewrite to handle multiple
17066 (prune_clobbered_mems): Likewise.
17067 (phi_translate): Take edge instead of pred/phiblock.
17068 (phi_translate_1): Likewise.
17069 (phi_translate_set): Likewise. Insert all translated
17070 exprs for a value into the set, keeping possibly multiple
17071 expressions per value.
17072 (compute_antic_aux): Adjust for phi_translate changes.
17073 When intersecting union the expressions and prune those
17074 not in the final value set, keeping possibly multiple
17075 expressions per value. Do not use value-insertion
17076 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17077 all expressions. Add verification that the value-sets
17078 only shrink during iteration.
17079 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17080 (do_pre_regular_insertion): Likewise.
17081 (do_pre_partial_partial_insertion): Likewise.
17083 2018-03-02 Richard Biener <rguenther@suse.de>
17086 * config/darwin.c (saved_debug_info_level): New static global.
17087 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17088 (darwin_asm_lto_end): Restore debug info generation settings.
17090 2018-03-01 Martin Liska <mliska@suse.cz>
17093 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17094 volatile arguments.
17096 2018-03-01 Richard Biener <rguenther@suse.de>
17099 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17100 type annotation with LTO when debug was disabled at compile-time.
17102 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17104 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17106 (mips_final_postscan_insn): Likewise.
17108 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17110 PR rtl-optimization/84528
17111 * alias.c (init_alias_target): Add commentary.
17112 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17113 a unique base value if the frame pointer is not eliminated
17114 to the stack pointer.
17116 2018-03-01 Tom de Vries <tom@codesourcery.com>
17118 PR rtl-optimization/83327
17119 * lra-int.h (hard_regs_spilled_into): Declare.
17120 * lra.c (hard_regs_spilled_into): Define.
17121 (init_reg_info): Init hard_regs_spilled_into.
17122 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17123 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17124 (process_bb_lives): Handle hard_regs_spilled_into.
17125 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17126 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17128 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17130 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17131 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17132 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17133 * config/rs6000/aix72.h: New file.
17135 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17137 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17138 instead of warning_at with conditional singular and plural messages
17142 * stor-layout.c (update_alignment_for_field): For
17143 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17144 && !DECL_PACKED (field), do the alignment update, just use
17145 only desired_align instead of MAX (type_align, desired_align)
17147 (place_field): Don't do known_align < desired_align handling
17148 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17149 is non-NULL, instead do it after rli->prev_field handling and
17150 only if not within a bitfield word. For DECL_PACKED (field)
17151 use type_align of BITS_PER_UNIT.
17153 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17155 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17156 superfluous parentheses and trailing spaces.
17158 2018-02-28 Richard Biener <rguenther@suse.de>
17160 PR tree-optimization/84584
17161 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17162 SCoPs with fake exit edge.
17164 2018-02-28 Martin Liska <mliska@suse.cz>
17167 * timevar.c (timer::print): Fix format to properly print 100%
17170 2018-02-28 Richard Biener <rguenther@suse.de>
17172 PR middle-end/84607
17173 * genmatch.c (capture_info::walk_match): Do not mark
17174 captured expressions without operands as expr_p given
17175 they act more like predicates and should be subject to
17176 "lost tail" side-effect preserving.
17178 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17180 PR rtl-optimization/81611
17181 * auto-inc-dec.c (attempt_change): Move dead note from
17182 mem_insn if it's the next use of regno
17183 (find_address): Take address use of reg holding
17184 non-incremented value. Add parm to limit search to the named
17186 (merge_in_block): Attempt to use a mem insn that is the next
17187 use of the original regno.
17189 2018-02-27 Martin Sebor <msebor@redhat.com>
17192 * doc/invoke.texi (-Wmissing-attributes): New option.
17193 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17195 2018-02-27 Martin Sebor <msebor@redhat.com>
17197 PR translation/84207
17198 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17199 n argument to unsigned HOST_WIDE_INT.
17200 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17201 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17202 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17203 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17205 2018-02-27 Richard Biener <rguenther@suse.de>
17207 PR tree-optimization/84512
17208 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17209 Do not use the estimate returned from record_stmt_cost for
17210 the scalar iteration cost but sum properly using add_stmt_cost.
17212 2018-02-27 Richard Biener <rguenther@suse.de>
17214 PR tree-optimization/84466
17215 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17216 Adjust last change to less strictly validate use operands.
17218 2018-02-27 Martin Liska <mliska@suse.cz>
17220 PR gcov-profile/84548
17221 * gcov.c (process_file): Allow partial overlap and consider it
17222 also as group functions.
17223 (output_lines): Properly calculate range of lines for a group.
17225 2018-02-27 Martin Liska <mliska@suse.cz>
17227 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17228 'ggc' suffixes. Change first column width.
17229 (timer::print): Fix formatting of the column.
17231 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17233 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17234 preserve inline entry blocks for the sake of debug inline
17235 entry point markers alone.
17236 (remove_unused_locals): Suggest in comments a better place to
17237 force the preservation of inline entry blocks that are
17238 otherwise unused, but do not preserve them.
17240 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17242 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17244 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17247 * config/i386/constraints.md (Bs): Replace
17248 ix86_indirect_branch_register with
17249 TARGET_INDIRECT_BRANCH_REGISTER.
17251 * config/i386/i386.md (indirect_jump): Likewise.
17252 (tablejump): Likewise.
17253 (*sibcall_memory): Likewise.
17254 (*sibcall_value_memory): Likewise.
17255 Peepholes of indirect call and jump via memory: Likewise.
17256 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17257 (*sibcall_value_GOT_32): Likewise.
17258 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17259 (GOT_memory_operand): Likewise.
17260 (call_insn_operand): Likewise.
17261 (sibcall_insn_operand): Likewise.
17262 (GOT32_symbol_operand): Likewise.
17263 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17265 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17267 PR rtl-optimization/83496
17268 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17269 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17270 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17271 redundant insn, if any.
17272 (relax_delay_slots): Likewise.
17273 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17275 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
17277 PR tree-optimization/83965
17278 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17279 that grouped statements are part of a reduction chain. Return
17280 true if the statement is not marked as a reduction itself but
17281 is part of a group.
17282 (vect_recog_dot_prod_pattern): Don't check whether the statement
17283 is part of a group here.
17284 (vect_recog_sad_pattern): Likewise.
17285 (vect_recog_widen_sum_pattern): Likewise.
17287 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17290 * final.c (rest_of_clean_state): Also look for calls inside sequences.
17292 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17295 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17297 (ix86_output_indirect_function_return): New prototype.
17298 (ix86_split_simple_return_pop_internal): Likewise.
17299 * config/i386/i386.c (indirect_return_via_cx): New.
17300 (indirect_return_via_cx_bnd): Likewise.
17301 (indirect_thunk_name): Handle return va CX_REG.
17302 (output_indirect_thunk_function): Create alias for
17303 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17304 (ix86_output_indirect_jmp): Remove the bool argument.
17305 (ix86_output_indirect_function_return): New function.
17306 (ix86_split_simple_return_pop_internal): Likewise.
17307 * config/i386/i386.md (*indirect_jump): Don't pass false
17308 to ix86_output_indirect_jmp.
17309 (*tablejump_1): Likewise.
17310 (simple_return_pop_internal): Change it to define_insn_and_split.
17311 Call ix86_split_simple_return_pop_internal to split it for
17312 -mfunction-return=.
17313 (simple_return_indirect_internal): Call
17314 ix86_output_indirect_function_return instead of
17315 ix86_output_indirect_jmp.
17317 2018-02-26 Jakub Jelinek <jakub@redhat.com>
17320 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17321 memset and value initialization afterwards.
17323 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
17325 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17327 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17330 * common/config/aarch64/aarch64-common.c
17331 (aarch_option_optimization_table[]): Switch
17332 off fomit-frame-pointer
17334 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17335 Chung-Ju Wu <jasonwucj@gmail.com>
17337 * config/nds32/nds32-multiple.md (load_multiple): Disallow
17339 (store_multiple): Ditto.
17341 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17343 * config.gcc: Add --with-cpu support for nds32 target.
17344 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17345 * config/nds32/nds32.opt: Add -mcpu= option.
17347 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
17349 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17350 isel=yes): Warn for these deprecated options.
17352 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
17354 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17355 ISA_2_5_MASKS_EMBEDDED.
17357 2018-02-23 Jakub Jelinek <jakub@redhat.com>
17359 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17360 p->max as pointers rather than using iterative_hash_expr.
17362 2018-02-23 Carl Love <cel@us.ibm.com>
17364 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17365 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17367 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17368 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17369 P8V_BUILTIN_VEC_VUNSIGNED2.
17371 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
17374 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17375 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17377 * lra-constraints.c (curr_insn_transform): Set up
17378 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
17380 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17381 * lra-eliminations.c (spill_pseudos): Ditto.
17382 (process_insn_for_elimination): Ditto.
17383 * lra-lives.c (reg_early_clobber_p): Use the new macros.
17384 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17385 LRA_NON_CLOBBERED_ALT.
17387 2018-02-22 Martin Sebor <msebor@redhat.com>
17389 PR tree-optimization/84480
17390 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17391 to maybe_diag_stxncpy_trunc. Call it.
17392 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17393 from gimple_fold_builtin_strcpy. Print inlining stack.
17394 (handle_builtin_stxncpy): Print inlining stack.
17395 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17397 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
17400 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17401 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17402 and -fcheck-pointer-bounds are used together.
17403 (indirect_thunk_prefix): New enum.
17404 (indirect_thunk_need_prefix): New function.
17405 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
17406 "_nt" instead of "_bnd" for NOTRACK prefix.
17407 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17408 (output_indirect_thunk_function): Likewise.
17410 (ix86_code_end): Update output_indirect_thunk_function calls.
17411 (ix86_output_indirect_branch_via_reg): Replace
17412 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17413 (ix86_output_indirect_branch_via_push): Likewise.
17414 (ix86_output_function_return): Likewise.
17415 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17416 incompatible with -fcf-protection=branch and
17417 -fcheck-pointer-bounds.
17419 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17422 * config/aarch64/aarch64.c (aarch64_print_address_internal):
17423 Change gcc_assert call to output_operand_lossage.
17425 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17427 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17429 2018-02-22 DJ Delorie <dj@redhat.com>
17430 Sebastian Perta <sebastian.perta@renesas.com>
17431 Oleg Endo <olegendo@gcc.gnu.org>
17433 * config/rx/rx.c (rx_rtx_costs): New function.
17434 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17436 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
17438 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17440 2018-02-22 Martin Liska <mliska@suse.cz>
17443 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17444 Add "native" as a possible value.
17446 2018-02-22 Martin Liska <mliska@suse.cz>
17449 * config/i386/i386.c (ix86_option_override_internal):
17450 Add "native" as a possible value for -march and -mtune.
17452 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17455 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17456 to all type variants.
17458 PR tree-optimization/84503
17459 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17460 width as info->bitpos + info->bitsize - start.
17461 (merged_store_group::merge_overlapping): Simplify width computation.
17462 (check_no_overlap): New function.
17463 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17464 start + width and last_order of the group, fail if check_no_overlap
17466 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17467 to group if check_no_overlap fails.
17469 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17471 * config/rs6000/altivec.md: Delete contraint arguments to
17472 define_expand, define_split, and define_peephole2, and in
17473 define_insn_and_split if always unused.
17474 * config/rs6000/darwin.md: Ditto.
17475 * config/rs6000/dfp.md: Ditto.
17476 * config/rs6000/rs6000.md: Ditto.
17477 * config/rs6000/sync.md: Ditto.
17478 * config/rs6000/vector.md: Ditto.
17479 * config/rs6000/vsx.md: Ditto.
17481 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17483 * config/rs6000/altivec.md: Write output control strings as braced
17484 blocks instead of double-quoted strings.
17485 * config/rs6000/darwin.md: Ditto.
17486 * config/rs6000/rs6000.md: Ditto.
17487 * config/rs6000/vector.md: Ditto.
17488 * config/rs6000/vsx.md: Ditto.
17490 2018-02-21 Jason Merrill <jason@redhat.com>
17492 PR c++/84314 - ICE with templates and fastcall attribute.
17493 * attribs.c (build_type_attribute_qual_variant): Remove assert.
17495 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17497 * ipa-cp.c (determine_versionability): Fix comment typos.
17499 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17502 * ipa-cp.c (determine_versionability): Do not version functions caling
17505 2018-02-21 Martin Liska <mliska@suse.cz>
17508 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17509 Add "native" as a possible value.
17510 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
17511 the macro when native cpu detection is available.
17513 2018-02-21 Martin Liska <mliska@suse.cz>
17516 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17517 Add "native" as a possible value.
17518 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17519 when native cpu detection is available.
17521 2018-02-21 Jakub Jelinek <jakub@redhat.com>
17522 Martin Sebor <msebor@redhat.com>
17524 PR tree-optimization/84478
17525 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17527 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17528 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17529 support which is conservatively correct, for 2 only stay conservative
17530 for maxlen. Formatting and comment capitalization fixes. Add STRICT
17531 argument to the 2 argument get_range_strlen, adjust 6 arg
17532 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17534 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17535 (gimple_fold_builtin_strlen): Pass true as last argument to
17538 2018-02-20 Martin Sebor <msebor@redhat.com>
17540 PR middle-end/84095
17541 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17542 (builtin_memref::set_base_and_offset): Same. Handle inner references.
17543 (builtin_memref::builtin_memref): Factor out parts into
17544 set_base_and_offset and call it.
17546 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17548 PR middle-end/84406
17549 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17550 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17551 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
17552 search at the associated MODE_INT.
17554 2018-02-20 Jeff Law <law@redhat.com>
17556 PR middle-end/82123
17557 PR tree-optimization/81592
17558 PR middle-end/79257
17559 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17560 for range data rather than using global data.
17561 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17562 range data rather than using global data.
17563 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17564 pass it to children as needed.
17565 (struct directive::fmtresult): Similarly.
17566 (struct directive::set_width): Similarly.
17567 (struct directive::set_precision): Similarly.
17568 (format_integer, format_directive, parse_directive): Similarly.
17569 (format_none): Accept unnamed vr_values parameter.
17570 (format_percent, format_floating, format_character): Similarly.
17571 (format_string, format_plain): Similarly.
17572 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17573 the EVRP range analyzer for range data rather than using global data.
17574 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17575 gimple-ssa-evrp-analyze.h
17576 (class sprintf_dom_walker): Add after_dom_children member function.
17577 Add evrp_range_analyzer member.
17578 (sprintf_dom_walker::before_dom_children): Call into the EVRP
17579 range analyzer as needed.
17580 (sprintf_dom_walker::after_dom_children): New member function.
17581 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17583 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17584 (evrp_range_analyzer::pop_to_marker): Likewise.
17586 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17588 PR tree-optimization/84419
17589 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17590 with the required type if its current type is compatible but
17593 2018-02-20 Jakub Jelinek <jakub@redhat.com>
17595 PR middle-end/82004
17596 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17597 after vectorization.
17599 2018-02-20 Martin Liska <mliska@suse.cz>
17602 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17603 possible values if we don't have a hint.
17605 2018-02-20 Martin Liska <mliska@suse.cz>
17609 * final.c (shorten_branches): Build align_tab array with one
17611 * opts.c (finish_options): Add alignment option limit check.
17612 (MAX_CODE_ALIGN): Likewise.
17613 (MAX_CODE_ALIGN_VALUE): Likewise.
17614 * doc/invoke.texi: Document maximum allowed option value for
17615 all -falign-* options.
17617 2018-02-19 Jakub Jelinek <jakub@redhat.com>
17620 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17621 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17622 * var-tracking.c (emit_note_insn_var_location): Remove all references
17623 to NOTE_INSN_CALL_ARG_LOCATION.
17624 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17625 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17626 Use copy_rtx_if_shared.
17627 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17628 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17629 (dwarf2out_var_location): Remove handling of
17630 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17632 * final.c (final_scan_insn): Remove all references to
17633 NOTE_INSN_CALL_ARG_LOCATION.
17634 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
17635 before dumping final insns.
17636 * except.c (emit_note_eh_region_end): Remove all references to
17637 NOTE_INSN_CALL_ARG_LOCATION.
17638 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17639 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17640 * config/arc/arc.c (hwloop_optimize): Likewise.
17641 * config/arm/arm.c (create_fix_barrier): Likewise.
17642 * config/s390/s390.c (s390_chunkify_start): Likewise.
17643 * config/sh/sh.c (find_barrier): Likewise.
17644 * config/i386/i386.c (rest_of_insert_endbranch,
17645 ix86_seh_fixup_eh_fallthru): Likewise.
17646 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17647 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17648 * config/frv/frv.c (frv_function_prologue): Likewise.
17649 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
17651 (note_outside_basic_block_p): Remove all references to
17652 NOTE_INSN_CALL_ARG_LOCATION.
17653 * gengtype.c (adjust_field_rtx_def): Likewise.
17654 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17656 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17657 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17660 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17663 PR tree-optimization/84452
17664 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17665 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17668 2018-02-19 Martin Liska <mliska@suse.cz>
17671 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17673 2018-02-19 Martin Liska <mliska@suse.cz>
17674 Richard Sandiford <richard.sandiford@linaro.org>
17676 PR tree-optimization/82491
17677 * gimple-fold.c (get_base_constructor): Make earlier bail out
17680 2018-02-19 Carl Love <cel@us.ibm.com>
17682 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17683 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17685 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17686 P8V_BUILTIN_VEC_NEG.
17688 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
17690 * config/rl78/rl78.md (movdf): New define expand.
17692 2018-02-19 Martin Liska <mliska@suse.cz>
17695 * doc/invoke.texi: Fix typo.
17696 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17698 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
17700 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17701 handle rs6000_single_float and rs6000_double_float specially for
17704 2018-02-16 Jeff Law <law@redhat.com>
17706 * config/rx/rx.c (add_pop_cfi_notes): New function.;
17707 (pop_regs): Use it.
17709 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17712 * ipa-inline.c (inline_small_functions): Fix a typo.
17714 2018-02-16 Nathan Sidwell <nathan@acm.org>
17716 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17718 2018-02-16 Carl Love <cel@us.ibm.com>
17720 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
17721 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
17722 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
17723 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
17724 expansion to P8V_BUILTIN_VEC_FLOAT2.
17726 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
17728 PR rtl-optimization/70023
17729 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
17730 src_regno into account.
17732 2018-02-16 Carl Love <cel@us.ibm.com>
17734 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
17735 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
17736 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
17737 * config/rs6000/rs6000.c: Remove case statements for
17738 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
17739 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
17740 and P9V_BUILTIN_VEC_VINSERT4B.
17741 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
17742 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
17743 * config/rs6000/vsx.md:
17744 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17747 2018-02-16 Carl Love <cel@us.ibm.com>
17749 * config/rs6000/altivec.h: Add builtin names vec_extract4b
17751 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17753 * config/rs6000/rs6000-c.c: Add the definitions for
17754 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17755 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17756 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17757 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
17758 definition for insert4b and define insn *insert3b_internal.
17759 * doc/extend.texi: Add documentation for vec_extract4b.
17761 2018-02-16 Nathan Sidwell <nathan@acm.org>
17763 * doc/extend.texi (Backwards Compatibility): Mention friend
17764 injection. Note for-scope is deprecated.
17765 * doc/invoke.texi (-ffriend-injection): Deprecate.
17767 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
17769 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17770 that moved to I2, also allow destinations that are a paradoxical
17771 subreg (instead of a normal reg).
17773 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
17776 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17779 2018-02-16 Richard Biener <rguenther@suse.de>
17781 PR tree-optimization/84037
17782 PR tree-optimization/84016
17784 * config/i386/i386.c (ix86_builtin_vectorization_cost):
17785 Adjust vec_construct for the fact we need additional higher latency
17786 128bit inserts for AVX256 and AVX512 vector builds.
17787 (ix86_add_stmt_cost): Scale vector construction cost for
17790 2018-02-16 Richard Biener <rguenther@suse.de>
17792 PR tree-optimization/84417
17793 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17794 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17795 (non_rewritable_lvalue_p): Likewise, use poly-ints.
17797 2018-02-16 Martin Liska <mliska@suse.cz>
17800 * internal-fn.def (ASAN_CHECK): Set proper flags.
17801 (ASAN_MARK): Likewise.
17803 2018-02-16 Julia Koval <julia.koval@intel.com>
17805 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17806 from PTA_CANNONLAKE.
17808 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17811 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
17812 Use ++iter rather than iter++ for std::list iterators.
17813 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
17814 defer deleting them until all nodes in the forest are processed. Do
17815 free even leaf nodes. Change to_process into auto_vec.
17818 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
17819 * vec.h (vec_default_construct): Use memset instead of placement new
17820 if BROKEN_VALUE_INITIALIZATION is defined.
17821 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
17822 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
17825 PR rtl-optimization/83723
17826 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
17827 * lra.c (lra_substitute_pseudo): Likewise. If true, use
17828 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
17830 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
17832 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
17834 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
17836 PR rtl-optimization/81443
17837 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
17838 from inner REGs to paradoxical SUBREGs.
17840 2018-02-16 Richard Biener <rguenther@suse.de>
17842 PR tree-optimization/84399
17843 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17844 For operands we can analyze at their definition make sure we can
17845 analyze them at each use as well.
17847 2018-02-16 Richard Biener <rguenther@suse.de>
17849 PR tree-optimization/84190
17850 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
17851 volatile accesses if the decl isn't volatile.
17853 2018-02-15 Jason Merrill <jason@redhat.com>
17855 PR c++/84314 - ICE with templates and fastcall attribute.
17856 * attribs.c (build_type_attribute_qual_variant): Don't clobber
17857 TYPE_CANONICAL on an existing type.
17859 2018-02-15 Jakub Jelinek <jakub@redhat.com>
17861 PR tree-optimization/84383
17862 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
17863 dstoff nor call operand_equal_p if dstbase is NULL.
17865 PR tree-optimization/84334
17866 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
17867 also a CONSTANT_CLASS_P, punt.
17869 2018-02-14 Jim Wilson <jimw@sifive.com>
17871 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
17872 first SMALL_OPERAND check. New local min_second_step. Move assert
17873 to where locals are set. Add TARGET_RVC support.
17874 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
17876 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
17878 * doc/invoke.texi: Correct -Wformat-overflow code sample.
17880 2018-02-14 Martin Sebor <msebor@redhat.com>
17882 PR tree-optimization/83698
17883 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
17884 arrays constrain the offset range to their bounds.
17885 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
17886 (builtin_access::overlap): Avoid setting the size of overlap if it's
17888 (maybe_diag_overlap): Also consider arrays when deciding what values
17889 of offsets to include in diagnostics.
17891 2018-02-14 Martin Sebor <msebor@redhat.com>
17894 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
17895 that correspond to the kind of a declaration.
17897 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
17900 * config/pa/pa.md: Load address of PIC label using the linkage table
17901 if the label is nonlocal.
17903 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
17905 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
17906 warning message if user requests -maltivec=be.
17907 * doc/invoke.texi: Document deprecation of -maltivec=be.
17909 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
17912 * config/rs6000/rs6000-c.c: Update definitions for
17913 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
17914 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
17916 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17919 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
17920 add _get_ssp intrinsics. Remove argument from
17921 __builtin_ia32_rdssp[d|q].
17922 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
17923 * config/i386/i386-builtin.def: Remove argument from
17924 __builtin_ia32_rdssp[d|q].
17925 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
17926 ix86_expand_special_args_builtin for _rdssp[d|q].
17927 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
17928 Clear register before usage.
17929 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
17930 Add documentation for new _get_ssp and _inc_ssp intrinsics.
17932 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
17934 PR tree-optimization/84357
17935 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
17936 operand 1 of an ARRAY_REF too.
17938 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
17941 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
17942 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17944 (set_of_reg): New struct.
17945 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
17946 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
17947 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17949 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
17950 Split into bitclr, bitset, bitinvert patterns if appropriate.
17951 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
17952 use rx_fuse_in_memory_bitop.
17953 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
17954 to named insn, correct maximum insn length.
17956 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
17959 * machmode.def: Define a complex mode for PARTIAL_INT.
17960 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
17962 * doc/rtl.texi: Document CSPImode.
17963 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
17965 (msp430_hard_regno_nregs_with_padding): Likewise.
17967 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
17970 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
17972 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
17974 PR rtl-optimization/84169
17975 * combine.c (try_combine): New variable split_i2i3. Set it to true if
17976 we generated a parallel as new i3 and we split that to new i2 and i3
17977 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
17978 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
17979 those to i2, not i1. Partially rewrite this scan code.
17981 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17984 * stor-layout.c (place_field): For variable length fields, adjust
17985 offset_align afterwards not just based on the field's alignment,
17986 but also on the size.
17988 PR middle-end/84309
17989 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
17990 of exps and logs in the use_exp2 case.
17992 2018-02-13 Jeff Law <law@redhat.com>
17994 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
17995 entry for "vector".
17997 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18000 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18004 * common.opt (gas-loc-support, gas-locview-support): New.
18005 (ginline-points, ginternal-reset-location-views): New.
18006 * doc/invoke.texi: Document them. Use @itemx where intended.
18007 (gvariable-location-views): Adjust.
18008 * target.def (reset_location_view): New.
18009 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18010 (TARGET_RESET_LOCATION_VIEW): New.
18011 * doc/tm.texi: Rebuilt.
18012 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18013 (dwarf2out_default_as_locview_support): New.
18014 (output_asm_line_debug_info): Use option variables.
18015 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18016 (output_loc_list): Likewise.
18017 (add_high_low_attributes): Check option variables.
18018 Don't output entry view attribute in strict mode.
18019 (gen_inlined_subroutine_die): Check option variables.
18020 (dwarf2out_inline_entry): Likewise.
18021 (init_sections_and_labels): Likewise.
18022 (dwarf2out_early_finish): Likewise.
18023 (maybe_reset_location_view): New, from...
18024 (dwarf2out_var_location): ... here. Call it.
18025 * debug.h (dwarf2out_default_as_loc_support): Declare.
18026 (dwarf2out_default_as_locview_support): Declare.
18027 * hooks.c (hook_int_rtx_insn_0): New.
18028 * hooks.h (hook_int_rtx_insn_0): Declare.
18029 * toplev.c (process_options): Take -gas-loc-support and
18030 -gas-locview-support from dwarf2out. Enable
18031 -gvariable-location-views by default only with locview
18032 assembler support. Enable -ginternal-reset-location-views by
18033 default only if the target defines the corresponding hook.
18034 Enable -ginline-points by default if location views are
18035 enabled; force it disabled if statement frontiers are
18037 * tree-inline.c (expand_call_inline): Check option variables.
18038 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18040 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18042 PR tree-optimization/84321
18043 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18044 handling. Also check whether the anti-range contains any values
18045 that satisfy the mask; switch to a VR_RANGE if not.
18047 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18050 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18052 2018-02-13 Martin Jambor <mjambor@suse.cz>
18055 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18056 of call statements, also set location of a load to a temporary.
18058 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18060 * config/rl78/rl78.c (add_vector_labels): New function.
18061 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18062 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18063 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18064 which checks that no arguments are passed.
18065 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18066 * doc/extend.texi: Documentation for the new attribute.
18068 2018-02-13 Andreas Schwab <schwab@suse.de>
18070 * config/riscv/linux.h (CPP_SPEC): Define.
18072 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18075 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18076 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18077 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18078 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18079 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18080 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18081 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18082 temporarily for AES and PCLMUL builtins.
18084 PR tree-optimization/84339
18085 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18086 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18089 PR middle-end/84309
18090 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18091 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18092 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18094 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18096 * omp-simd-clone.h: New file.
18097 * omp-simd-clone.c: Include omp-simd-clone.h.
18098 (expand_simd_clones): No longer static.
18099 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18100 cgraph.h and omp-simd-clone.h.
18101 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18102 (vect_recog_widen_shift_pattern): Formatting fix.
18103 (vect_pattern_recog_1): Don't check optab for calls.
18106 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18107 operands[2] into a REG before using gen_lowpart on it.
18109 2018-02-12 Jeff Law <law@redhat.com>
18112 * config/sh/sh.c (find_barrier): Consider a sibling call
18115 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18116 successfully back substituting a reg.
18118 2018-02-12 Richard Biener <rguenther@suse.de>
18120 PR tree-optimization/84037
18121 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18122 parameter, move visited init to caller.
18123 (vect_slp_analyze_operations): Separate cost from validity
18124 check, initialize visited once for all instances.
18125 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18127 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18129 (vect_model_promotion_demotion_cost): Likewise.
18130 (vectorizable_bswap): Guard cost modeling with !slp_node
18131 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18133 (vectorizable_call): Likewise.
18134 (vectorizable_conversion): Likewise.
18135 (vectorizable_assignment): Likewise.
18136 (vectorizable_shift): Likewise.
18137 (vectorizable_operation): Likewise.
18138 (vectorizable_store): Likewise.
18139 (vectorizable_load): Likewise.
18140 (vectorizable_condition): Likewise.
18141 (vectorizable_comparison): Likewise.
18143 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18146 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18147 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18148 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18150 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18152 PR middle-end/83665
18153 * params.def (inline-min-speedup): Increase from 8 to 15.
18154 (max-inline-insns-auto): Decrease from 40 to 30.
18155 * ipa-split.c (consider_split): Add some buffer for function to
18156 be considered inlining candidate.
18157 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18160 2018-02-12 Richard Biener <rguenther@suse.de>
18162 PR tree-optimization/84037
18163 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18164 matched stmts if we cannot swap the non-matched ones.
18166 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18168 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18169 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18170 _mm_maskz_scalef_round_ss): New intrinsics.
18171 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18172 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18173 __builtin_ia32_scalefss_round): Remove.
18174 (__builtin_ia32_scalefsd_mask_round,
18175 __builtin_ia32_scalefss_mask_round): New intrinsics.
18176 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18177 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18178 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18179 "<round_constraint>")): Changed to ...
18180 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18181 "<round_scalar_constraint>")): ... this.
18182 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18183 %0, %1, %2<round_op3>}"): Changed to ...
18184 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18185 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18186 %2<round_scalar_mask_op3>}"): ... this.
18187 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18189 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18191 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18192 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18193 (_mm_maskz_sqrt_round_ss): New intrinsics.
18194 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18195 (__builtin_ia32_sqrtsd_mask_round)
18196 (__builtin_ia32_sqrtss_mask_round): New builtins.
18197 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18198 (__builtin_ia32_sqrtss_round): Remove.
18199 (__builtin_ia32_sqrtsd_mask_round)
18200 (__builtin_ia32_sqrtss_mask_round): New builtins.
18201 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18202 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18203 ((match_operand:VF_128 1 "vector_operand"
18204 "xBm,<round_constraint>")): Changed to ...
18205 ((match_operand:VF_128 1 "vector_operand"
18206 "xBm,<round_scalar_constraint>")): ... this.
18207 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18208 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18209 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18210 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18211 %<iptr>1<round_scalar_mask_op3>}): ... this.
18212 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18213 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18215 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18218 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18219 Cast vec_cmpeq result to correct type.
18220 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18221 Cast vec_cmpgt result to correct type.
18223 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18225 * final.c (final_scan_insn_1): Renamed from...
18226 (final_scan_insn): ... this. New wrapper, to recover
18227 seen from the outermost call in recursive ones.
18228 * config/sparc/sparc.c (output_return): Drop seen from call.
18229 (output_sibcall): Likewise.
18230 * config/visium/visium.c (output_branch): Likewise.
18232 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18234 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18237 2018-02-10 Alan Modra <amodra@gmail.com>
18240 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18241 Specify LR as an input.
18243 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18246 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18247 remove_member_access_dummy_vars): New functions.
18248 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18249 lower_omp_1, execute_lower_omp): Use them.
18251 PR rtl-optimization/84308
18252 * shrink-wrap.c (spread_components): Release todo vector.
18254 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18256 PR rtl-optimization/57193
18257 * ira-color.c (struct allocno_color_data): Add member
18258 conflict_allocno_hard_prefs.
18259 (update_conflict_allocno_hard_prefs): New.
18260 (bucket_allocno_compare_func): Add a preference based on
18261 conflict_allocno_hard_prefs.
18262 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18263 (color_allocnos): Remove a dead code. Initiate
18264 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18266 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18269 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18270 constraint from =wa to wa. Avoid a subreg on the output operand,
18271 instead use a pseudo and subreg it in a move.
18272 (p9_xxbrd_<mode>): Changed to ...
18273 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18274 (p9_xxbrd_v2df): New expander.
18275 (p9_xxbrw_<mode>): Changed to ...
18276 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18277 (p9_xxbrw_v4sf): New expander.
18279 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18281 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18283 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
18286 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18287 multiply in 32-bit mode.
18288 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18289 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18292 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18294 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18295 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18296 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18297 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18299 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
18302 * dwarf2out.c (is_trivial_indirect_ref): New function.
18303 (dwarf2out_late_global_decl): Do not generate a location
18304 attribute for variables that have a non-trivial DECL_VALUE_EXPR
18305 and that are not defined in the current unit.
18307 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18309 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18310 instead of a libcall for UNORDERED.
18312 2018-02-09 Tamar Christina <tamar.christina@arm.com>
18315 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18316 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18318 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18321 * config/s390/s390.c (s390_set_current_function): Invoke
18322 s390_indirect_branch_settings also if fndecl didn't change.
18324 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18326 * config/rs6000/rs6000.md (blockage): Set length to zero.
18328 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18330 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18332 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18335 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18336 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18340 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18341 PARALLEL incoming that failed vt_get_decl_and_offset check.
18343 PR middle-end/84237
18344 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18345 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18347 (get_variable_section): For decls in named .bss* sections pass true as
18348 second argument to bss_initializer_p.
18350 2018-02-09 Marek Polacek <polacek@redhat.com>
18351 Jakub Jelinek <jakub@redhat.com>
18354 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18355 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
18356 Sync some changes from cxx_fold_indirect_ref.
18358 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18360 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18362 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18363 (BLOCK_INLINE_ENTRY_LABEL): New.
18364 (dwarf2out_var_location): Disregard inline entry markers.
18365 (inline_entry_data): New struct.
18366 (inline_entry_data_hasher): New hashtable type.
18367 (inline_entry_data_hasher::hash): New.
18368 (inline_entry_data_hasher::equal): New.
18369 (inline_entry_data_table): New variable.
18370 (add_high_low_attributes): Add DW_AT_entry_pc and
18371 DW_AT_GNU_entry_view attributes if a pending entry is found
18372 in inline_entry_data_table. Add old entry_pc attribute only
18373 if debug nonbinding markers are disabled.
18374 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18375 markers are enabled.
18376 (block_within_block_p, dwarf2out_inline_entry): New.
18377 (dwarf2out_finish): Check that no entries remained in
18378 inline_entry_data_table.
18379 * final.c (reemit_insn_block_notes): Handle inline entry notes.
18380 (final_scan_insn, notice_source_line): Likewise.
18381 (rest_of_clean_state): Skip inline entry markers.
18382 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18384 * gimple.c (gimple_build_debug_inline_entry): New.
18385 * gimple.h (enum gimple_debug_subcode): Add
18386 GIMPLE_DEBUG_INLINE_ENTRY.
18387 (gimple_build_debug_inline_entry): Declare.
18388 (gimple_debug_inline_entry_p): New.
18389 (gimple_debug_nonbind_marker_p): Adjust.
18390 * insn-notes.def (INLINE_ENTRY): New.
18391 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18392 inline entry marker notes.
18393 (print_insn): Likewise.
18394 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18395 (INSN_DEBUG_MARKER_KIND): Likewise.
18396 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18397 * tree-inline.c (expand_call_inline): Build and insert
18398 debug_inline_entry stmt.
18399 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18400 inline entry blocks early, if nonbind markers are enabled.
18401 (dump_scope_block): Dump fragment info.
18402 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18403 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18404 (gimple_build_debug_inline_entry): New.
18405 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18406 Enable/disable inline entry points too.
18407 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18408 (DEBUG_INSN): Describe inline entry markers.
18410 * common.opt (gvariable-location-views): New.
18411 (gvariable-location-views=incompat5): New.
18412 * config.in: Rebuilt.
18413 * configure: Rebuilt.
18414 * configure.ac: Test assembler for view support.
18415 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18416 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18417 * dwarf2out.c (var_loc_view): New typedef.
18418 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18419 (dwarf2out_locviews_in_attribute): New.
18420 (dwarf2out_locviews_in_loclist): New.
18421 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18422 (enum dw_line_info_opcode): Add LI_adv_address.
18423 (struct dw_line_info_table): Add view.
18424 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18425 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18426 (zero_view_p): New variable.
18427 (ZERO_VIEW_P): New macro.
18428 (output_asm_line_debug_info): New.
18429 (struct var_loc_node): Add view.
18430 (add_AT_view_list, AT_loc_list): New.
18431 (add_var_loc_to_decl): Add view param. Test it against last.
18432 (new_loc_list): Add view params. Record them.
18433 (AT_loc_list_ptr): Handle loc and view lists.
18434 (view_list_to_loc_list_val_node): New.
18435 (print_dw_val): Handle dw_val_class_view_list.
18436 (size_of_die): Likewise.
18437 (value_format): Likewise.
18438 (loc_list_has_views): New.
18439 (gen_llsym): Set vl_symbol too.
18440 (maybe_gen_llsym, skip_loc_list_entry): New.
18441 (dwarf2out_maybe_output_loclist_view_pair): New.
18442 (output_loc_list): Output view list or entries too.
18443 (output_view_list_offset): New.
18444 (output_die): Handle dw_val_class_view_list.
18445 (output_dwarf_version): New.
18446 (output_compilation_unit_header): Use it.
18447 (output_skeleton_debug_sections): Likewise.
18448 (output_rnglists, output_line_info): Likewise.
18449 (output_pubnames, output_aranges): Update version comments.
18450 (output_one_line_info_table): Output view numbers in asm comments.
18451 (dw_loc_list): Determine current endview, pass it to new_loc_list.
18452 Call maybe_gen_llsym.
18453 (loc_list_from_tree_1): Adjust.
18454 (add_AT_location_description): Create view list attribute if
18455 needed, check it's absent otherwise.
18456 (convert_cfa_to_fb_loc_list): Adjust.
18457 (maybe_emit_file): Call output_asm_line_debug_info for test.
18458 (dwarf2out_var_location): Reset views as needed. Precompute
18459 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18460 attribute. Set view.
18461 (new_line_info_table): Reset next view.
18462 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18463 (dwarf2out_source_line): Likewise. Output view resets and labels to
18464 the assembler, or select appropriate line info opcodes.
18465 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18466 (optimize_string_length): Catch it. Adjust.
18467 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18468 dw_val_class_view_list, and remove it if no longer needed.
18469 (hash_loc_list): Hash view numbers.
18470 (loc_list_hasher::equal): Compare them.
18471 (optimize_location_lists): Check whether a view list symbol is
18472 needed, and whether the locview attribute is present, and
18473 whether they match. Remove the locview attribute if no longer
18475 (index_location_lists): Call skip_loc_list_entry for test.
18476 (dwarf2out_finish): Call output_asm_line_debug_info for test.
18477 Use output_dwarf_version.
18478 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18479 (struct dw_val_node): Add val_view_list.
18480 * final.c (SEEN_NEXT_VIEW): New.
18481 (set_next_view_needed): New.
18482 (clear_next_view_needed): New.
18483 (maybe_output_next_view): New.
18484 (final_start_function): Rename to...
18485 (final_start_function_1): ... this. Take pointer to FIRST,
18486 add SEEN parameter. Emit param bindings in the initial view.
18487 (final_start_function): Reintroduce SEEN-less interface.
18488 (final): Rename to...
18489 (final_1): ... this. Take SEEN parameter. Output final pending
18490 next view at the end.
18491 (final): Reintroduce seen-less interface.
18492 (final_scan_insn): Output pending next view before switching
18493 sections or ending a block. Mark the next view as needed when
18494 outputting variable locations. Notify debug backend of section
18495 changes, and of location view changes.
18496 (rest_of_handle_final): Adjust.
18497 * toplev.c (process_options): Autodetect value for debug variable
18498 location views option. Warn on incompat5 without -gdwarf-5.
18499 * doc/invoke.texi (gvariable-location-views): New.
18500 (gvariable-location-views=incompat5): New.
18501 (gno-variable-location-views): New.
18503 2018-02-08 David Malcolm <dmalcolm@redhat.com>
18505 PR tree-optimization/84136
18506 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18507 that the result of find_edge is non-NULL.
18509 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18512 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18513 storing integer register in SImode. Fix cost of 256 and 512
18514 byte aligned SSE register store.
18516 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18518 * config/i386/i386.c (ix86_multiplication_cost): Fix
18519 multiplication cost for TARGET_AVX512DQ.
18521 2018-02-08 Marek Polacek <polacek@redhat.com>
18523 PR tree-optimization/84238
18524 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18527 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18529 PR tree-optimization/84265
18530 * tree-vect-stmts.c (vectorizable_store): Don't treat
18531 VMAT_CONTIGUOUS accesses as grouped.
18532 (vectorizable_load): Likewise.
18534 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18536 PR tree-optimization/81635
18537 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18538 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18539 (test_round_for_mask): New functions.
18540 (wide_int_cc_tests): Call test_round_for_mask.
18541 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18542 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18543 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18544 range returned by get_range_info.
18546 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18549 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18550 * symtab.c: Include builtins.h
18551 (symtab_node::output_to_lto_symbol_table_p): Move here
18552 from lto-streamer-out.c:output_symbol_p.
18553 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18554 (output_symbol_p): Move all logic to symtab.c
18555 (produce_symtab): Update.
18557 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18559 * config/s390/s390-opts.h (enum indirect_branch): Define.
18560 * config/s390/s390-protos.h (s390_return_addr_from_memory)
18561 (s390_indirect_branch_via_thunk)
18562 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18563 (enum s390_indirect_branch_type): Define.
18564 * config/s390/s390.c (struct s390_frame_layout, struct
18565 machine_function): Remove.
18566 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18567 (indirect_branch_table_label_no, indirect_branch_table_name):
18569 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18570 (enum s390_indirect_branch_option): Define.
18571 (s390_return_addr_from_memory): New function.
18572 (s390_handle_string_attribute): New function.
18573 (s390_attribute_table): Add new attribute handler.
18574 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18575 (s390_indirect_branch_via_thunk): New function.
18576 (s390_indirect_branch_via_inline_thunk): New function.
18577 (s390_function_ok_for_sibcall): When jumping via thunk disallow
18578 sibling call optimization for non z10 compiles.
18579 (s390_emit_call): Force indirect branch target to be a single
18580 register. Add r1 clobber for non-z10 compiles.
18581 (s390_emit_epilogue): Emit return jump via return_use expander.
18582 (s390_reorg): Handle JUMP_INSNs as execute targets.
18583 (s390_option_override_internal): Perform validity checks for the
18584 new command line options.
18585 (s390_indirect_branch_attrvalue): New function.
18586 (s390_indirect_branch_settings): New function.
18587 (s390_set_current_function): Invoke s390_indirect_branch_settings.
18588 (s390_output_indirect_thunk_function): New function.
18589 (s390_code_end): Implement target hook.
18590 (s390_case_values_threshold): Implement target hook.
18591 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18593 * config/s390/s390.h (struct s390_frame_layout)
18594 (struct machine_function): Move here from s390.c.
18595 (TARGET_INDIRECT_BRANCH_NOBP_RET)
18596 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18597 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18598 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18599 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18600 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18601 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18602 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18603 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18604 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18605 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18606 (mnemonic attribute): Add values which aren't recognized
18608 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18609 pattern for branch conversion. Fix mnemonic attribute.
18610 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18611 indirect branch via thunk if requested.
18612 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18613 ("*indirect_jump"): Disable for branch conversion using out of
18615 ("indirect_jump_via_thunk<mode>_z10")
18616 ("indirect_jump_via_thunk<mode>")
18617 ("indirect_jump_via_inlinethunk<mode>_z10")
18618 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18619 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18620 ("casesi_jump_via_inlinethunk<mode>_z10")
18621 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18622 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18623 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18624 ("*indirect2_jump"): Disable for branch conversion.
18625 ("casesi_jump"): Turn into expander and expand patterns for branch
18627 ("return_use"): New expander.
18628 ("*return"): Emit return via thunk and rename it to ...
18629 ("*return<mode>"): ... this one.
18630 * config/s390/s390.opt: Add new options and and enum for the
18633 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18635 * lra-constraints.c (match_reload): Unconditionally use
18636 gen_lowpart_SUBREG, rather than selecting between that
18637 and equivalent gen_rtx_SUBREG code.
18639 2018-02-08 Richard Biener <rguenther@suse.de>
18641 PR tree-optimization/84233
18642 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18643 changed flag instead of boguously re-using phi_inserted.
18645 2018-02-08 Martin Jambor <mjambor@suse.cz>
18647 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18648 static local variables.
18650 2018-02-08 Richard Biener <rguenther@suse.de>
18652 PR tree-optimization/84278
18653 * tree-vect-stmts.c (vectorizable_store): When looking for
18654 smaller vector types to perform grouped strided loads/stores
18655 make sure the mode is supported by the target.
18656 (vectorizable_load): Likewise.
18658 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18660 * config/aarch64/aarch64.c (aarch64_components_for_bb):
18661 Increase LDP/STP opportunities by adding adjacent callee-saves.
18663 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18665 PR rtl-optimization/84068
18666 PR rtl-optimization/83459
18667 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18669 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
18671 PR tree-optimization/84224
18672 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18673 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18674 non-zero arguments.
18676 2018-02-07 Iain Sandoe <iain@codesourcery.com>
18679 * config/rs6000/altivec.md (*restore_world): Remove LR use.
18680 * config/rs6000/predicates.md (restore_world_operation): Adjust op
18681 count, remove one USE.
18683 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
18685 * doc/install.texi (Configuration): Document the
18686 --with-long-double-format={ibm,ieee} PowerPC configuration
18690 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18691 Convert from define_expand to be define_insn_and_split. Rework
18692 float/double/_Float128 conversions to QI/HI/SImode to work with
18693 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
18694 conversions to QI/HImode types did a store and then a load to
18695 truncate the value. For conversions to VSX registers, don't split
18696 the insn, instead emit the code directly. Use the code iterator
18697 any_fix to combine signed and unsigned conversions.
18698 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18699 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18700 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18701 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18702 (fix_<mode>di2_hw): Likewise.
18703 (fixuns_<mode>di2_hw): Likewise.
18704 (fix_<mode>si2_hw): Likewise.
18705 (fixuns_<mode>si2_hw): Likewise.
18706 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18707 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18708 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18709 fix<uns>_trunc<SFDF:mode>si2_p8.
18710 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18711 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18712 (fix<uns>_<mode>_mem): Likewise.
18713 (fctiw<u>z_<mode>_mem): Likewise.
18714 (fix<uns>_<mode>_mem): Likewise.
18715 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18716 the register allocator from doing a direct move to the GPRs to do
18717 a store, and instead use the ISA 3.0 store byte/half-word from
18718 vector register instruction. For IEEE 128-bit floating point,
18719 also optimize stores of 32-bit ints.
18720 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
18722 2018-02-07 Alan Hayward <alan.hayward@arm.com>
18724 * genextract.c (push_pathstr_operand): New function to support
18726 (walk_rtx): Call push_pathstr_operand.
18727 (print_path): Support [a-zA-Z].
18729 2018-02-07 Richard Biener <rguenther@suse.de>
18731 PR tree-optimization/84037
18732 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
18733 (cse_and_gimplify_to_preheader): Declare.
18734 (vect_get_place_in_interleaving_chain): Likewise.
18735 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18737 (_loop_vec_info::~_loop_vec_info): Delete it.
18738 (cse_and_gimplify_to_preheader): New function.
18739 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
18740 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
18741 (vectorizable_load): Likewise. For grouped stores always base
18742 the IV on the first element.
18743 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
18744 condition before gimplifying.
18746 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18748 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18749 *DIV_EXPR and *MOD_EXPR.
18751 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
18754 * config/i386/i386.c (ix86_option_override_internal): Mask out
18755 the CF_SET bit when checking -fcf-protection.
18757 2018-02-07 Tom de Vries <tom@codesourcery.com>
18760 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18763 2018-02-07 Richard Biener <rguenther@suse.de>
18765 PR tree-optimization/84204
18766 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18769 PR tree-optimization/84205
18770 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18771 special-case isl_ast_op_zdiv_r.
18773 PR tree-optimization/84223
18774 * graphite-scop-detection.c (gather_bbs::before_dom_children):
18775 Only add conditions from within the region.
18776 (gather_bbs::after_dom_children): Adjust.
18778 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
18781 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18782 * config/avr/avr.md: Only post-reload split REG-REG moves if
18783 either register is GENERAL_REG_P.
18785 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18787 PR tree-optimization/84235
18788 * tree-ssa-scopedtables.c
18789 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18790 if the subtraction is performed in floating point type where NaNs are
18791 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18792 build 1. Formatting fix.
18794 2018-02-06 Jakub Jelinek <jakub@redhat.com>
18797 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18798 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18799 and skip it regardless of bb boundaries. Use CALL_P macro,
18800 don't test INSN_P (insn) together with CALL_P or JUMP_P check
18801 unnecessarily, formatting fix.
18803 2018-02-06 Michael Collison <michael.collison@arm.com>
18805 * config/arm/thumb2.md:
18806 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
18807 (*thumb_mov_notscc): Ditto.
18809 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
18812 * config/rs6000/rs6000.md (su code attribute): Use "u" for
18813 unsigned_fix, not "s".
18815 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18817 * configure.ac (gcc_fn_eh_frame_ro): New function.
18818 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
18819 correct .eh_frame permissions.
18820 * configure: Regenerate.
18822 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
18824 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
18825 irrelevant options.
18827 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18829 * config/rs6000/rs6000.c (rs6000_option_override_internal):
18830 Display warning message for -mno-speculate-indirect-jumps.
18832 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
18834 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
18836 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
18838 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
18840 PR tree-optimization/84225
18841 * tree-eh.c (find_trapping_overflow): Only call
18842 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
18844 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18847 * config/i386/i386.c: Reimplement the check of possible options
18848 -mibt/-mshstk conbination. Change error messages.
18849 * doc/invoke.texi: Fix a typo: remove extra '='.
18851 2018-02-06 Marek Polacek <polacek@redhat.com>
18853 PR tree-optimization/84228
18854 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
18856 2018-02-06 Tamar Christina <tamar.christina@arm.com>
18859 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
18860 emitted arch directives.
18861 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
18862 __ARM_FEATURE_COPROC before changing architectures.
18864 2018-02-06 Richard Biener <rguenther@suse.de>
18866 * config/i386/i386.c (print_reg): Fix typo.
18867 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
18869 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
18871 * configure: Regenerate.
18873 2018-02-05 Martin Sebor <msebor@redhat.com>
18875 PR tree-optimization/83369
18876 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
18879 2018-02-05 Martin Liska <mliska@suse.cz>
18881 * doc/invoke.texi: Cherry-pick upstream r323995.
18883 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
18885 * ira.c (ira_init_register_move_cost): Adjust comment.
18887 2018-02-05 Martin Liska <mliska@suse.cz>
18889 PR gcov-profile/84137
18890 * doc/gcov.texi: Fix typo in documentation.
18892 2018-02-05 Martin Liska <mliska@suse.cz>
18894 PR gcov-profile/83879
18895 * doc/gcov.texi: Document necessity of --dynamic-list-data when
18896 using dlopen functionality.
18898 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
18900 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
18901 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
18902 _mm_maskz_range_ss, _mm_mask_range_round_ss,
18903 _mm_maskz_range_round_ss): New intrinsics.
18904 (__builtin_ia32_rangesd128_round)
18905 (__builtin_ia32_rangess128_round): Remove.
18906 (__builtin_ia32_rangesd128_mask_round,
18907 __builtin_ia32_rangess128_mask_round): New builtins.
18908 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
18909 __builtin_ia32_rangess128_round): Remove.
18910 (__builtin_ia32_rangesd128_mask_round,
18911 __builtin_ia32_rangess128_mask_round): New builtins.
18912 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
18913 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
18914 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
18915 "<round_saeonly_constraint>")): Changed to ...
18916 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
18917 "<round_saeonly_scalar_constraint>")): ... this.
18918 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
18919 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
18920 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
18921 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
18922 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
18924 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
18926 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
18928 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
18929 Remove all values except native, 8540 and 8548.
18931 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
18933 * config/i386/i386.c (ix86_output_function_return): Pass
18934 INVALID_REGNUM, instead of -1, as invalid register number to
18935 indirect_thunk_name and output_indirect_thunk.
18937 2018-02-02 Julia Koval <julia.koval@intel.com>
18939 * config.gcc: Add -march=icelake.
18940 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
18941 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
18942 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
18943 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
18944 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
18945 (processor_target_table): Add icelake.
18946 (ix86_option_override_internal): Handle new PTAs.
18947 (get_builtin_code_for_version): Handle icelake.
18948 (M_INTEL_COREI7_ICELAKE): New.
18949 (fold_builtin_cpu): Handle icelake.
18950 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
18951 * doc/invoke.texi: Add -march=icelake.
18953 2018-02-02 Julia Koval <julia.koval@intel.com>
18955 * config/i386/i386.c (ix86_option_override_internal): Change flags type
18956 to wide_int_bitmask.
18957 * wide-int-bitmask.h: New.
18959 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18962 * config/i386/i386.md: Replace Pmode with word_mode in
18963 builtin_setjmp_setup and builtin_longjmp to support x32.
18965 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
18969 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
18971 (rs6000_supported_cpu_names): New static variable.
18972 (linux_cpu_translation_table): Likewise.
18973 (elf_platform) <cpu>: Define new static variable and use it.
18974 Translate kernel AT_PLATFORM name to canonical name if needed.
18975 Error if platform name is unknown.
18977 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
18980 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
18982 2018-02-01 Jeff Law <law@redhat.com>
18985 * config/i386/i386.c (release_scratch_register_on_entry): Add new
18986 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
18987 the scratch if RELEASE_VIA_POP is false.
18988 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
18989 If we have to save a temporary register, decrement SIZE appropriately.
18990 Pass new arguments to release_scratch_register_on_entry.
18991 (ix86_adjust_stack_and_probe): Likewise.
18992 (ix86_emit_probe_stack_range): Pass new arguments to
18993 release_scratch_register_on_entry.
18995 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
18997 PR rtl-optimization/84157
18998 * combine.c (change_zero_ext): Use REG_P predicate in
18999 front of HARD_REGISTER_P predicate.
19001 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19003 * config/avr/avr.c (avr_option_override): Move disabling of
19004 -fdelete-null-pointer-checks to...
19005 * common/config/avr/avr-common.c (avr_option_optimization_table):
19008 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19010 PR tree-optimization/81635
19011 * tree-data-ref.c (split_constant_offset_1): For types that
19012 wrap on overflow, try to use range info to prove that wrapping
19015 2018-02-01 Renlin Li <renlin.li@arm.com>
19018 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19019 TAILCALL_ADDR_REGS.
19020 (aarch64_register_move_cost): Likewise.
19021 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19022 TAILCALL_ADDR_REGS.
19023 (REG_CLASS_NAMES): Likewise.
19024 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19025 TAILCALL_ADDR_REGS. Remove IP registers.
19026 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19028 2018-02-01 Richard Biener <rguenther@suse.de>
19030 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19031 for specifying RPO order and allow NULL for that.
19032 * domwalk.c (dom_walker::dom_walker): Likewise.
19033 (dom_walker::walk): Handle NULL RPO order.
19034 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19036 (rewrite_update_dom_walker): Likewise.
19037 (mark_def_dom_walker): Likewise.
19039 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19041 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19042 (aarch64_maybe_expand_sve_subreg_move): Declare.
19043 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19044 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19046 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19047 that are semantically a reverse operation.
19048 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19049 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19050 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19052 (aarch64_can_change_mode_class): For big-endian, forbid changes
19053 between two SVE modes if they have different element sizes.
19055 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19057 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19058 the TImode handling for big-endian targets.
19060 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19062 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19063 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19065 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19066 Remove BSWAP handing for big-endian targets and use the form of
19067 LD1RQ appropariate for the mode.
19069 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19071 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19072 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19073 duplicated element.
19075 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19078 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19079 check for operands that need to go through aarch64_sve_reload_be.
19081 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19083 PR tree-optimization/81661
19084 PR tree-optimization/84117
19085 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19086 * tree-eh.c: Include gimplify.h.
19087 (find_trapping_overflow, replace_trapping_overflow,
19088 rewrite_to_non_trapping_overflow): New functions.
19089 * tree-vect-loop.c: Include tree-eh.h.
19090 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19091 * tree-data-ref.c: Include tree-eh.h.
19092 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19094 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19096 PR rtl-optimization/84123
19097 * combine.c (change_zero_ext): Check if hard register satisfies
19098 can_change_dest_mode before calling gen_lowpart_SUBREG.
19100 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19103 * ira.c (ira_init_register_move_cost): Remove assert.
19105 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19107 PR rtl-optimization/84071
19108 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19109 * doc/tm.texi: Regenerate.
19111 2018-01-31 Richard Biener <rguenther@suse.de>
19113 PR tree-optimization/84132
19114 * tree-data-ref.c (analyze_miv_subscript): Properly
19115 check whether evolution_function_is_affine_multivariate_p
19116 before calling gcd_of_steps_may_divide_p.
19118 2018-01-31 Julia Koval <julia.koval@intel.com>
19121 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19122 * config/i386/i386.md (rdpid_rex64) New.
19123 (rdpid): Make 32bit only.
19125 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19128 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19129 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19131 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19134 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19136 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19138 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19140 PR rtl-optimization/84071
19141 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19142 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19144 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19146 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19147 (arc_attribute_table): Add 'aux' attribute.
19148 (arc_in_small_data_p): Consider aux like variables.
19149 (arc_is_aux_reg_p): New function.
19150 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19151 (arc_get_aux_arg): New function.
19152 (prepare_move_operands): Handle aux-register access.
19153 (arc_handle_aux_attribute): New function.
19154 * doc/extend.texi (ARC Variable attributes): Add subsection.
19156 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19158 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19159 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19160 (arc_attribute_table): Add 'uncached' attribute.
19161 (arc_print_operand): Print '.di' flag for uncached memory
19163 (arc_in_small_data_p): Do not consider for small data the uncached
19165 (arc_is_uncached_mem_p): New function.
19166 * config/arc/predicates.md (compact_store_memory_operand): Check
19167 for uncached memory accesses.
19168 (nonvol_nonimm_operand): Likewise.
19169 * doc/extend.texi (ARC Type Attribute): New subsection.
19171 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19174 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19175 falign-loops=): Add Optimization flag.
19177 2018-01-30 Jeff Law <law@redhat.com>
19180 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19181 INT_REGISTERS_SAVED. Check it prior to calling
19182 get_scratch_register_on_entry.
19183 (ix86_adjust_stack_and_probe): Similarly.
19184 (ix86_emit_probe_stack_range): Similarly.
19185 (ix86_expand_prologue): Corresponding changes.
19187 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19190 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19191 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19193 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19196 * lra-constraints.c (curr_insn_transform): Process AND in the
19199 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19201 PR rtl-optimization/83986
19202 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19203 dependence against last_pending_memory_flush in addition to
19204 pending_jump_insns.
19206 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19208 PR tree-optimization/81611
19209 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19212 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19215 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19218 2018-01-30 Richard Biener <rguenther@suse.de>
19219 Jakub Jelinek <jakub@redhat.com>
19221 PR tree-optimization/84111
19222 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19223 inner loops added during recursion, as they don't have up-to-date
19226 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19229 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19230 (can_inline_edge_by_limits_p): ... here.
19231 (can_early_inline_edge_p, check_callers,
19232 update_caller_keys, update_callee_keys, recursive_inlining,
19233 add_new_edges_to_heap, speculation_useful_p,
19234 inline_small_functions,
19235 inline_small_functions, flatten_function,
19236 inline_to_all_callers_1): Update.
19238 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19240 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19243 2018-01-30 Richard Biener <rguenther@suse.de>
19245 PR tree-optimization/83008
19246 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19247 invariant and constant vector uses in stmts when they need
19248 more than one stmt.
19250 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19253 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19254 * configure: Regenerate.
19256 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19258 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19260 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19261 Use gen_rtx_REG rather than gen_lowpart.
19263 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19265 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19266 rather than 0 when creating partial subregs.
19268 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19270 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19273 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
19276 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19277 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19278 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19279 flags. This restores the settings used before the 2017-07-24.
19280 Turning off pre increment/decrement/modify allows IVOPTS to
19281 optimize DF/SF loops where the index is an int.
19283 2018-01-29 Richard Biener <rguenther@suse.de>
19284 Kelvin Nilsen <kelvin@gcc.gnu.org>
19287 * tree-vect-stmts.c (vectorizable_call): Don't call
19288 targetm.vectorize_builtin_md_vectorized_function if callee is
19291 2018-01-22 Carl Love <cel@us.ibm.com>
19293 * doc/extend.tex: Fix typo in second arg in
19294 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19296 2018-01-29 Richard Biener <rguenther@suse.de>
19298 PR tree-optimization/84086
19299 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19300 (flush_ssaname_freelist): When SSA names were released reset
19301 the SCEV hash table.
19303 2018-01-29 Richard Biener <rguenther@suse.de>
19305 PR tree-optimization/84057
19306 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19307 removed paths when removing edges.
19309 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
19311 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19312 -mfunction-return=@var{choice}.
19314 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
19316 PR diagnostic/84034
19317 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19318 Handle CR like TAB.
19319 (layout::print_source_line): Likewise.
19320 (test_get_line_width_without_trailing_whitespace): Add test cases.
19322 2018-01-27 Jakub Jelinek <jakub@redhat.com>
19324 PR middle-end/84040
19325 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19328 2018-01-26 Jim Wilson <jimw@sifive.com>
19330 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19332 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19335 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19337 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19338 and CMP + SUB-immediate -> SUBS.
19340 2018-01-26 Martin Sebor <msebor@redhat.com>
19342 PR tree-optimization/83896
19343 * tree-ssa-strlen.c (get_string_len): Rename...
19344 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
19345 Avoid assuming length is constant.
19346 (handle_char_store): Use HOST_WIDE_INT for string length.
19348 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
19351 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19352 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19354 2018-01-26 Richard Biener <rguenther@suse.de>
19356 PR rtl-optimization/84003
19357 * dse.c (record_store): Only record redundant stores when
19358 the earlier store aliases at least all accesses the later one does.
19360 2018-01-26 Jakub Jelinek <jakub@redhat.com>
19362 PR rtl-optimization/83985
19363 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19364 REG_CFA_RESTORE insns.
19365 (delete_unmarked_insns): Don't ignore separate shrink wrapping
19366 REG_CFA_RESTORE insns here.
19369 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19370 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19372 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19374 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19375 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19376 (arc_init): Likewise.
19377 (arc_override_options): Likewise.
19378 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19380 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19382 * config/arc/arc.h (TARGET_DBNZ): Define.
19383 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19384 properly set the tune attribute.
19385 (dbnz): Use TARGET_DBNZ guard.
19386 * config/arc/arc.opt (mtune): Add core3 option.
19388 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19390 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19391 recognize new pic like addresses.
19392 (arc_delegitimize_address): Clean up.
19394 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19396 * config/arc/arc-arches.def: Option mrf16 valid for all
19398 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19399 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19400 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19401 * config/arc/arc-tables.opt: Regenerate.
19402 * config/arc/arc.c (arc_conditional_register_usage): Handle
19403 reduced register file case.
19404 (arc_file_start): Set must have build attributes.
19405 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19406 mrf16 option value.
19407 * config/arc/arc.opt (mrf16): Add new option.
19408 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19409 * config/arc/genmultilib.awk: Handle new mrf16 option.
19410 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19411 * config/arc/t-multilib: Regenerate.
19412 * doc/invoke.texi (ARC Options): Document mrf16 option.
19414 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19416 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19417 * config/arc/arc.c (arc_handle_secure_attribute): New function.
19418 (arc_attribute_table): Add 'secure_call' attribute.
19419 (arc_print_operand): Print secure call operand.
19420 (arc_function_ok_for_sibcall): Don't optimize tail calls when
19422 (arc_is_secure_call_p): New function. * config/arc/arc.md
19423 (call_i): Add support for sjli instruction.
19424 (call_value_i): Likewise.
19425 * config/arc/constraints.md (Csc): New constraint.
19427 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19428 John Eric Martin <John.Martin@emmicro-us.com>
19430 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19431 * config/arc/arc.c (_arc_jli_section): New struct.
19432 (arc_jli_section): New type.
19433 (rc_jli_sections): New static variable.
19434 (arc_handle_jli_attribute): New function.
19435 (arc_attribute_table): Add jli_always and jli_fixed attribute.
19436 (arc_file_end): New function.
19437 (TARGET_ASM_FILE_END): Define.
19438 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19439 (arc_add_jli_section): New function.
19440 (jli_call_scan): Likewise.
19441 (arc_reorg): Call jli_call_scan.
19442 (arc_output_addsi): Remove 'S' from printing asm operand.
19443 (arc_is_jli_call_p): New function.
19444 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19446 (movhi_insn): Likewise.
19447 (movsi_insn): Likewise.
19448 (movsi_set_cc_insn): Likewise.
19449 (loadqi_update): Likewise.
19450 (load_zeroextendqisi_update): Likewise.
19451 (load_signextendqisi_update): Likewise.
19452 (loadhi_update): Likewise.
19453 (load_zeroextendhisi_update): Likewise.
19454 (load_signextendhisi_update): Likewise.
19455 (loadsi_update): Likewise.
19456 (loadsf_update): Likewise.
19457 (movsicc_insn): Likewise.
19458 (bset_insn): Likewise.
19459 (bxor_insn): Likewise.
19460 (bclr_insn): Likewise.
19461 (bmsk_insn): Likewise.
19462 (bicsi3_insn): Likewise.
19463 (cmpsi_cc_c_insn): Likewise.
19464 (movsi_ne): Likewise.
19465 (movsi_cond_exec): Likewise.
19466 (clrsbsi2): Likewise.
19467 (norm_f): Likewise.
19477 (call_i): Remove 'S' asm letter, add jli instruction.
19478 (call_value_i): Likewise.
19479 * config/arc/arc.op (mjli-always): New option.
19480 * config/arc/constraints.md (Cji): New constraint.
19481 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19483 (subsf3_fpx): Likewise.
19484 (mulsf3_fpx): Likewise.
19485 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19487 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19488 function attrbutes.
19489 * doc/invoke.texi (ARC): Document mjli-always option.
19491 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
19493 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19494 avoid addition with 0 and use incw and decw where possible.
19496 2018-01-26 Richard Biener <rguenther@suse.de>
19498 PR tree-optimization/81082
19499 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19500 association if it requires casting to unsigned.
19501 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19502 from fold_plusminus_mult_expr to catch important cases late when
19503 range info is available.
19505 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19507 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19508 * configure.ac (hidden_linkonce): New test.
19509 * configure: Regenerate.
19510 * config.in: Regenerate.
19512 2018-01-26 Julia Koval <julia.koval@intel.com>
19514 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19515 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19516 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19517 _mm_mask_bitshuffle_epi64_mask): Fix type.
19518 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19519 USI_FTYPE_V4DI_V4DI_USI): Remove.
19520 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19521 __builtin_ia32_vpshufbitqmb256_mask,
19522 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19523 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19524 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19526 2018-01-26 Alan Modra <amodra@gmail.com>
19529 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19530 UNSPEC_VBPERMQ. Sort other unspecs.
19532 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
19534 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19536 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
19538 PR middle-end/83055
19539 * predict.c (drop_profile): Do not push/pop cfun; update also
19541 (handle_missing_profiles): Fix logic looking for zero profiles.
19543 2018-01-25 Jakub Jelinek <jakub@redhat.com>
19545 PR middle-end/83977
19546 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19547 on functions with #pragma omp declare simd or functions with simd
19549 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19550 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19551 Remove trailing \n from warning_at calls.
19553 2018-01-25 Tom de Vries <tom@codesourcery.com>
19556 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19557 for neutered workers.
19559 2018-01-24 Joseph Myers <joseph@codesourcery.com>
19562 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19563 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19565 2018-01-24 Jeff Law <law@redhat.com>
19568 * i386.c (get_probe_interval): Move to earlier point.
19569 (ix86_compute_frame_layout): If -fstack-clash-protection and
19570 the frame is larger than the probe interval, then use pushes
19571 to save registers rather than reg->mem moves.
19572 (ix86_expand_prologue): Remove conditional for int_registers_saved
19575 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
19578 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19579 min/max for never referenced object.
19581 2018-01-24 Jakub Jelinek <jakub@redhat.com>
19583 PR middle-end/83977
19584 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19586 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19587 attributes from DECL_ATTRIBUTES (decl) without affecting
19588 DECL_ATTRIBUTES (current_function_decl).
19589 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19590 functions with non-NULL DECL_ABSTRACT_ORIGIN.
19592 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
19594 PR tree-optimization/83979
19595 * fold-const.c (fold_comparison): Use constant_boolean_node
19596 instead of boolean_{true,false}_node.
19598 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
19600 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19603 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19605 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19606 Simplify the clause that sets the length attribute.
19607 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19608 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19609 clause that sets the length attribute.
19610 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19612 2018-01-24 Tom de Vries <tom@codesourcery.com>
19615 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19616 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19617 Add strict parameter.
19618 (prevent_branch_around_nothing): Insert dummy insn between branch to
19619 label and label with no ptx insn inbetween.
19620 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19622 2018-01-24 Tom de Vries <tom@codesourcery.com>
19625 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19626 for neutered threads in warp.
19627 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19629 2018-01-24 Richard Biener <rguenther@suse.de>
19631 PR tree-optimization/83176
19632 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19635 2018-01-24 Richard Biener <rguenther@suse.de>
19637 PR tree-optimization/82819
19638 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19639 code generating pluses that are no-ops in the target precision.
19641 2018-01-24 Richard Biener <rguenther@suse.de>
19643 PR middle-end/84000
19644 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19646 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19648 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19649 to merge probabilities.
19650 * predict.c (probably_never_executed): Also mark as cold functions
19651 with global 0 profile and guessed local profile.
19652 * profile-count.c (profile_probability::combine_with_count): New
19654 * profile-count.h (profile_probability::operator*,
19655 profile_probability::operator*=, profile_probability::operator/,
19656 profile_probability::operator/=): Reduce precision to adjusted
19657 and set value to guessed on contradictory divisions.
19658 (profile_probability::combine_with_freq): Remove.
19659 (profile_probability::combine_wiht_count): Declare.
19660 (profile_count::force_nonzero):: Set to adjusted.
19661 (profile_count::probability_in):: Set quality to adjusted.
19662 * tree-ssa-tail-merge.c (replace_block_by): Use
19663 combine_with_count.
19665 2018-01-23 Andrew Waterman <andrew@sifive.com>
19666 Jim Wilson <jimw@sifive.com>
19668 * config/riscv/riscv.c (riscv_stack_boundary): New.
19669 (riscv_option_override): Set riscv_stack_boundary. Handle
19670 riscv_preferred_stack_boundary_arg.
19671 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19672 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19673 (STACK_BOUNDARY): Set to riscv_stack_boundary.
19674 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19675 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19676 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19678 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
19681 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19682 of struct ix86_frame.
19683 (ix86_expand_epilogue): Likewise. Add a local variable for
19684 the reg_save_offset field in struct ix86_frame.
19686 2018-01-23 Bin Cheng <bin.cheng@arm.com>
19688 PR tree-optimization/82604
19689 * tree-loop-distribution.c (enum partition_kind): New enum item
19690 PKIND_PARTIAL_MEMSET.
19691 (partition_builtin_p): Support above new enum item.
19692 (generate_code_for_partition): Ditto.
19693 (compute_access_range): Differentiate cases that equality can be
19694 proven at all loops, the innermost loops or no loops.
19695 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19696 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
19697 (finalize_partitions, distribute_loop): Don't fuse partition of
19698 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19699 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19700 parloop is enabled.
19702 2018-01-23 Martin Liska <mliska@suse.cz>
19704 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19705 order to ignore the predictor.
19706 (PRED_POLYMORPHIC_CALL): Likewise.
19707 (PRED_RECURSIVE_CALL): Likewise.
19709 2018-01-23 Martin Liska <mliska@suse.cz>
19711 * tree-profile.c (tree_profiling): Print function header to
19712 aware reader which function we are working on.
19713 * value-prof.c (gimple_find_values_to_profile): Do not print
19714 not interesting value histograms.
19716 2018-01-23 Martin Liska <mliska@suse.cz>
19718 * profile-count.h (enum profile_quality): Add
19719 profile_uninitialized as the first value. Do not number values
19720 as they are zero based.
19721 (profile_count::verify): Update sanity check.
19722 (profile_probability::verify): Likewise.
19724 2018-01-23 Nathan Sidwell <nathan@acm.org>
19726 * doc/invoke.texi (ffor-scope): Deprecate.
19728 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19730 PR tree-optimization/83510
19731 * domwalk.c (set_all_edges_as_executable): New function.
19732 (dom_walker::dom_walker): Convert bool param
19733 "skip_unreachable_blocks" to enum reachability. Move setup of
19734 edge flags to set_all_edges_as_executable and only do it when
19735 reachability is REACHABLE_BLOCKS.
19736 * domwalk.h (enum dom_walker::reachability): New enum.
19737 (dom_walker::dom_walker): Convert bool param
19738 "skip_unreachable_blocks" to enum reachability.
19739 (set_all_edges_as_executable): New decl.
19740 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
19741 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
19743 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
19744 but converting true to REACHABLE_BLOCKS.
19745 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19747 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19748 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19749 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19751 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19752 if check_all_array_refs will be called.
19754 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19756 * tree.c (selftest::test_location_wrappers): Add more test
19759 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19761 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19762 (selftest::test_bit_in_range): Likewise.
19764 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19767 * doc/sourcebuild.texi (vect_float): Say that the selector
19768 only describes the situation when -funsafe-math-optimizations is on.
19769 (vect_float_strict): Document.
19771 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19773 PR tree-optimization/83965
19774 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19775 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19776 instead of checking only for a reduction.
19777 (vect_recog_widen_sum_pattern): Likewise.
19779 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19781 * predict.c (probably_never_executed): Only use precise profile info.
19782 (compute_function_frequency): Skip after inlining hack since we now
19783 have quality checking.
19785 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19787 * profile-count.h (profile_probability::very_unlikely,
19788 profile_probability::unlikely, profile_probability::even): Set
19789 precision to guessed.
19791 2018-01-23 Richard Biener <rguenther@suse.de>
19793 PR tree-optimization/83963
19794 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19795 Properly terminate dominator walk when crossing the exit edge not
19796 when visiting its source block.
19798 2018-01-23 Jakub Jelinek <jakub@redhat.com>
19801 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19802 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19804 2018-01-22 Jakub Jelinek <jakub@redhat.com>
19806 PR tree-optimization/83957
19807 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
19808 semicolon after for body surrounded by braces.
19810 PR tree-optimization/83081
19811 * profile-count.h (profile_probability::split): New method.
19812 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
19813 Use profile_probability::split.
19814 (do_compare_rtx_and_jump): Fix adjustment of probabilities
19815 when splitting a single conditional jump into 2.
19817 2018-01-22 David Malcolm <dmalcolm@redhat.com>
19819 PR tree-optimization/69452
19820 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
19823 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19825 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
19826 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
19827 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
19829 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19831 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
19833 * config/rl78/rl78.md (movdi): New define_expand.
19834 * config/rl78/rl78.c (rl78_split_movdi): New function.
19836 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
19839 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
19841 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
19842 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
19843 128-bit to produce an UNSPEC move to get the double word with the
19844 signbit and then a shift directly to do signbit.
19845 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
19846 implementation with a new version that just does either a direct
19847 move or a regular move. Move memory interface to separate insns.
19848 Move insns so they are next to the expander.
19849 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
19850 with signbit move. Split big and little endian case.
19851 (signbit<mode>2_dm_mem_le): Likewise.
19852 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
19853 (signbit<mode>2_dm2): Likewise.
19855 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19857 * config/rl78/rl78.md (anddi3): New define_expand.
19859 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19861 * config/rl78/rl78.md (umindi3): New define_expand.
19863 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19865 * config/rl78/rl78.md (smindi3): New define_expand.
19867 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19869 * config/rl78/rl78.md (smaxdi3): New define_expand.
19871 2018-01-22 Carl Love <cel@us.ibm.com>
19873 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
19874 LVX_V1TI): Add macro expansion.
19875 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
19876 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
19877 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
19878 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
19879 Change check to determine if the instruction is a byte reversing
19880 entry. Fix typo in comment.
19881 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
19882 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
19883 Add def_builtin calls for new builtins.
19884 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
19885 Add define_insn expansion.
19887 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19889 * config/rl78/rl78.md (umaxdi3): New define_expand.
19891 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19893 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
19894 for non-QImode registers.
19896 2018-01-22 Richard Biener <rguenther@suse.de>
19898 PR tree-optimization/83963
19899 * graphite-scop-detection.c (scop_detection::get_sese): Delay
19900 including the loop exit block.
19901 (scop_detection::merge_sese): Likewise.
19902 (scop_detection::add_scop): Do it here instead.
19904 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19906 * doc/sourcebuild.texi (arm_softfloat): Document.
19908 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
19911 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
19912 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
19913 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
19915 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19916 David Edelsohn <dje.gcc@gmail.com>
19919 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19920 Change "crset eq" to "crset 2".
19921 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19922 (*call_indirect_aix<mode>_nospec): Likewise.
19923 (*call_value_indirect_aix<mode>_nospec): Likewise.
19924 (*call_indirect_elfv2<mode>_nospec): Likewise.
19925 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
19926 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
19927 change assembly output from . to $.
19928 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19929 (indirect_jump<mode>_nospec): Change assembly output from . to $.
19930 (*tablejump<mode>_internal1_nospec): Likewise.
19932 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
19935 * config/sh/sh_optimize_sett_clrt.cc:
19936 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
19938 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
19940 PR tree-optimization/83940
19941 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
19942 offset_dt to vect_constant_def rather than vect_unknown_def_type.
19943 (vect_check_load_store_mask): Add a mask_dt_out parameter and
19944 use it to pass back the definition type.
19945 (vect_check_store_rhs): Likewise rhs_dt_out.
19946 (vect_build_gather_load_calls): Add a mask_dt argument and use
19947 it instead of a call to vect_is_simple_use.
19948 (vectorizable_store): Update calls to vect_check_load_store_mask
19949 and vect_check_store_rhs. Use the dt returned by the latter instead
19950 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
19951 instead of calls to vect_is_simple_use. Pass the scalar rather
19952 than the vector operand to vect_is_simple_use when handling
19953 second and subsequent copies of an rhs value.
19954 (vectorizable_load): Update calls to vect_check_load_store_mask
19955 and vect_build_gather_load_calls. Use the cached mask_dt and
19956 gs_info.offset_dt instead of calls to vect_is_simple_use.
19958 2018-01-20 Jakub Jelinek <jakub@redhat.com>
19960 PR middle-end/83945
19961 * tree-emutls.c: Include gimplify.h.
19962 (lower_emutls_2): New function.
19963 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
19964 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
19965 it before further processing.
19968 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
19969 UINTVAL (trueop1) instead of INTVAL (op1).
19971 2018-01-19 Jakub Jelinek <jakub@redhat.com>
19975 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
19976 INCOMING_FRAME_SP_OFFSET if not defined.
19977 (scan_trace): Add ENTRY argument. If true and
19978 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
19979 emit a note to adjust the CFA offset.
19980 (create_cfi_notes): Adjust scan_trace callers.
19981 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
19982 INCOMING_FRAME_SP_OFFSET in the CIE.
19983 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
19984 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
19986 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
19987 * doc/tm.texi: Regenerated.
19989 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19991 PR rtl-optimization/83147
19992 * lra-constraints.c (remove_inheritance_pseudos): Use
19993 lra_substitute_pseudo_within_insn.
19995 2018-01-19 Tom de Vries <tom@codesourcery.com>
19996 Cesar Philippidis <cesar@codesourcery.com>
19999 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20001 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20004 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20005 spaces for function labels.
20007 2018-01-19 Martin Liska <mliska@suse.cz>
20009 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20010 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20011 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20012 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20013 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20014 (PRED_CONST_RETURN): Change from 69 to 65.
20015 (PRED_NULL_RETURN): Change from 91 to 71.
20016 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20017 (PRED_LOOP_GUARD): Change from 66 to 73.
20019 2018-01-19 Martin Liska <mliska@suse.cz>
20021 * predict.c (predict_insn_def): Add new assert.
20022 (struct branch_predictor): Change type to signed integer.
20023 (test_prediction_value_range): Amend test to cover
20024 PROB_UNINITIALIZED.
20025 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20026 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20027 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20028 (PRED_LOOP_IV_COMPARE): Likewise.
20029 * predict.h (PROB_UNINITIALIZED): Define new constant.
20031 2018-01-19 Martin Liska <mliska@suse.cz>
20033 * predict.c (dump_prediction): Add new format for
20034 analyze_brprob.py script which is enabled with -details
20036 * profile-count.h (precise_p): New function.
20038 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20040 PR tree-optimization/83922
20041 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20042 there are no statements that need masking.
20043 (vect_active_double_reduction_p): New function.
20044 (vect_analyze_loop_operations): Use it when handling phis that
20045 are not in the loop header.
20047 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20049 PR tree-optimization/83914
20050 * tree-vect-loop.c (vectorizable_induction): Don't convert
20051 init_expr or apply the peeling adjustment for inductions
20052 that are nested within the vectorized loop.
20054 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20056 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20059 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20063 * function.h (gimplify_parameters): Add gimple_seq * argument.
20064 * function.c: Include gimple.h and options.h.
20065 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20066 for the added local temporaries if needed.
20067 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20068 if there are any parameter cleanups, wrap whole body into a
20069 try/finally with the cleanups.
20071 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20074 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20075 Use GET_MODE_CLASS for scalar floating point.
20077 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20081 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20082 Fix call of call_cgraph_insertion_hooks.
20084 2018-01-18 Martin Sebor <msebor@redhat.com>
20086 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20088 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20091 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20094 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20097 * common.opt: (-ffile-prefix-map): New option.
20098 * opts.c (common_handle_option): Defer it.
20099 * opts-global.c (handle_common_deferred_options): Handle it.
20100 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20101 * file-prefix-map.h: New file.
20102 (remap_debug_filename, add_debug_prefix_map): ...here.
20103 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20104 * final.c (debug_prefix_map, add_debug_prefix_map
20105 remap_debug_filename): Move to...
20106 * file-prefix-map.c: New file.
20107 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20108 generalize, get rid of alloca(), use strrchr() instead of strchr().
20109 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20110 Implement in terms of add_prefix_map().
20111 (remap_macro_filename, remap_debug_filename): Implement in term of
20113 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20114 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20115 * dbxout.c: Include file-prefix-map.h.
20116 * varasm.c: Likewise.
20117 * vmsdbgout.c: Likewise.
20118 * xcoffout.c: Likewise.
20119 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20120 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20121 * doc/invoke.texi (-ffile-prefix-map): Document.
20122 (-fdebug-prefix-map): Update description.
20124 2018-01-18 Martin Liska <mliska@suse.cz>
20126 * config/i386/i386.c (indirect_thunk_name): Document that also
20128 (output_indirect_thunk): Document why both instructions
20129 (pause and lfence) are generated.
20131 2018-01-18 Richard Biener <rguenther@suse.de>
20133 PR tree-optimization/83887
20134 * graphite-scop-detection.c
20135 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20136 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20137 (scop_detection::merge_sese): Re-implement with a flood-fill
20138 algorithm that properly finds a SESE region if it exists.
20140 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20143 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20144 pointer_diff optimizations use view_convert instead of convert.
20146 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20148 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20149 Generate different code for -mno-speculate-indirect-jumps.
20150 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20151 (*call_indirect_aix<mode>): Disable for
20152 -mno-speculate-indirect-jumps.
20153 (*call_indirect_aix<mode>_nospec): New define_insn.
20154 (*call_value_indirect_aix<mode>): Disable for
20155 -mno-speculate-indirect-jumps.
20156 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20157 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20158 -mno-speculate-indirect-jumps.
20159 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20161 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20163 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20164 long double type, set the flags for noting the default long double
20165 type, even if we don't pass or return a long double type.
20167 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20170 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20173 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20175 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20176 support for merge[hl].
20177 (fold_mergehl_helper): New helper function.
20178 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20179 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20180 (altivec_vmrglw_direct): Add xxmrglw insn.
20182 2018-01-17 Andrew Waterman <andrew@sifive.com>
20184 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20185 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20187 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20190 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20191 call the lto_location_cache before reading the
20192 DECL_SOURCE_LOCATION of the types.
20194 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20195 Richard Sandiford <richard.sandiford@linaro.org>
20197 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20198 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20199 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20200 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20201 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20203 * config/aarch64/constraints.md (aarch64_movti_operand):
20205 * config/aarch64/predicates.md (Uti): Add new constraint.
20207 2018-01-17 Carl Love <cel@us.ibm.com>
20209 * config/rs6000/vsx.md (define_expand xl_len_r,
20210 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20211 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20213 (define_expand, define_insn): Move the shift left from the
20214 define_insn to the define_expand for lxvl and stxvl instructions.
20215 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20216 and XL_LEN_R definitions to PURE.
20218 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20220 * config/i386/i386.c (indirect_thunk_name): Declare regno
20221 as unsigned int. Compare regno with INVALID_REGNUM.
20222 (output_indirect_thunk): Ditto.
20223 (output_indirect_thunk_function): Ditto.
20224 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20225 in the call to output_indirect_thunk_function.
20227 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20229 PR middle-end/83884
20230 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20231 rather than the size of inner_type to determine the stack slot size
20232 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20234 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20237 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20240 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20242 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20243 endian Linux systems to optionally enable multilibs for selecting
20244 the long double type if the user configured an explicit type.
20245 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20246 have no long double multilibs if not defined.
20247 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20248 warn if the user used -mabi={ieee,ibm}longdouble and we built
20249 multilibs for long double.
20250 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20251 appropriate multilib option.
20252 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20254 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20255 for building long double multilibs.
20256 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20258 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20260 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20263 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20265 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20268 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20271 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20274 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20276 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20277 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20279 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
20281 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20282 different rtl trees depending on TARGET_64BIT.
20283 (rs6000_gen_lvx): Likewise.
20285 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20287 * config/visium/visium.md (nop): Tweak comment.
20288 (hazard_nop): Likewise.
20290 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20292 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20293 -mspeculate-indirect-jumps.
20294 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20295 for -mno-speculate-indirect-jumps.
20296 (*call_indirect_elfv2<mode>_nospec): New define_insn.
20297 (*call_value_indirect_elfv2<mode>): Disable for
20298 -mno-speculate-indirect-jumps.
20299 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20300 (indirect_jump): Emit different RTL for
20301 -mno-speculate-indirect-jumps.
20302 (*indirect_jump<mode>): Disable for
20303 -mno-speculate-indirect-jumps.
20304 (*indirect_jump<mode>_nospec): New define_insn.
20305 (tablejump): Emit different RTL for
20306 -mno-speculate-indirect-jumps.
20307 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20308 (tablejumpsi_nospec): New define_expand.
20309 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20310 (tablejumpdi_nospec): New define_expand.
20311 (*tablejump<mode>_internal1): Disable for
20312 -mno-speculate-indirect-jumps.
20313 (*tablejump<mode>_internal1_nospec): New define_insn.
20314 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20317 2018-01-16 Artyom Skrobov tyomitch@gmail.com
20319 * caller-save.c (insert_save): Drop unnecessary parameter. All
20322 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20323 Richard Biener <rguenth@suse.de>
20326 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20327 return early, inline manually is_gimple_sizepos. Make sure if we
20328 call gimplify_expr we don't end up with a gimple constant.
20329 * tree.c (variably_modified_type_p): Don't return true for
20330 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
20331 * gimplify.h (is_gimple_sizepos): Remove.
20333 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20335 PR tree-optimization/83857
20336 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20337 vectorizable_live_operation for pure SLP statements.
20338 (vectorizable_live_operation): Handle PHIs.
20340 2018-01-16 Richard Biener <rguenther@suse.de>
20342 PR tree-optimization/83867
20343 * tree-vect-stmts.c (vect_transform_stmt): Precompute
20344 nested_in_vect_loop_p since the scalar stmt may get invalidated.
20346 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20349 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20350 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20351 If off is not INTEGER_CST, issue a may not be aligned warning
20352 rather than isn't aligned. Use isn%'t rather than isn't.
20353 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20355 <case MULT_EXPR>: Improve the case when bottom and one of the
20356 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20357 operand, in that case check if the other operand is multiple of
20358 bottom divided by the INTEGER_CST operand.
20360 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20363 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20364 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20365 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20366 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20367 * config/pa/pa.c (pa_function_arg_advance): Likewise.
20368 (pa_function_arg, pa_arg_partial_bytes): Likewise.
20369 (pa_function_arg_size): New function.
20371 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20373 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20374 in a separate statement.
20376 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20378 PR tree-optimization/83847
20379 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20380 group gathers and scatters.
20382 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20384 PR rtl-optimization/86620
20385 * params.def (max-sched-ready-insns): Bump minimum value to 1.
20387 PR rtl-optimization/83213
20388 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20389 to last if both are JUMP_INSNs.
20391 PR tree-optimization/83843
20392 * gimple-ssa-store-merging.c
20393 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20394 store_immediate_info for bswap/nop orig_stores.
20396 2018-01-15 Andrew Waterman <andrew@sifive.com>
20398 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20400 <UDIV>: Increase cost if !TARGET_DIV.
20402 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
20404 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20405 (define_attr "cr_logical_3op"): New.
20406 (cceq_ior_compare): Adjust.
20407 (cceq_ior_compare_complement): Adjust.
20408 (*cceq_rev_compare): Adjust.
20409 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20410 (is_cracked_insn): Adjust.
20411 (insn_must_be_first_in_group): Adjust.
20412 * config/rs6000/40x.md: Adjust.
20413 * config/rs6000/440.md: Adjust.
20414 * config/rs6000/476.md: Adjust.
20415 * config/rs6000/601.md: Adjust.
20416 * config/rs6000/603.md: Adjust.
20417 * config/rs6000/6xx.md: Adjust.
20418 * config/rs6000/7450.md: Adjust.
20419 * config/rs6000/7xx.md: Adjust.
20420 * config/rs6000/8540.md: Adjust.
20421 * config/rs6000/cell.md: Adjust.
20422 * config/rs6000/e300c2c3.md: Adjust.
20423 * config/rs6000/e500mc.md: Adjust.
20424 * config/rs6000/e500mc64.md: Adjust.
20425 * config/rs6000/e5500.md: Adjust.
20426 * config/rs6000/e6500.md: Adjust.
20427 * config/rs6000/mpc.md: Adjust.
20428 * config/rs6000/power4.md: Adjust.
20429 * config/rs6000/power5.md: Adjust.
20430 * config/rs6000/power6.md: Adjust.
20431 * config/rs6000/power7.md: Adjust.
20432 * config/rs6000/power8.md: Adjust.
20433 * config/rs6000/power9.md: Adjust.
20434 * config/rs6000/rs64.md: Adjust.
20435 * config/rs6000/titan.md: Adjust.
20437 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20439 * config/i386/predicates.md (indirect_branch_operand): Rewrite
20440 ix86_indirect_branch_register logic.
20442 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20444 * config/i386/constraints.md (Bs): Update
20445 ix86_indirect_branch_register check. Don't check
20446 ix86_indirect_branch_register with GOT_memory_operand.
20448 * config/i386/predicates.md (GOT_memory_operand): Don't check
20449 ix86_indirect_branch_register here.
20450 (GOT32_symbol_operand): Likewise.
20452 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20454 * config/i386/predicates.md (constant_call_address_operand):
20455 Rewrite ix86_indirect_branch_register logic.
20456 (sibcall_insn_operand): Likewise.
20458 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20460 * config/i386/constraints.md (Bs): Replace
20461 ix86_indirect_branch_thunk_register with
20462 ix86_indirect_branch_register.
20464 * config/i386/i386.md (indirect_jump): Likewise.
20465 (tablejump): Likewise.
20466 (*sibcall_memory): Likewise.
20467 (*sibcall_value_memory): Likewise.
20468 Peepholes of indirect call and jump via memory: Likewise.
20469 * config/i386/i386.opt: Likewise.
20470 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20471 (GOT_memory_operand): Likewise.
20472 (call_insn_operand): Likewise.
20473 (sibcall_insn_operand): Likewise.
20474 (GOT32_symbol_operand): Likewise.
20476 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20478 PR middle-end/83837
20479 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20480 type rather than type addr's type points to.
20481 (expand_omp_atomic_mutex): Likewise.
20482 (expand_omp_atomic): Likewise.
20484 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20487 * config/i386/i386.c (output_indirect_thunk_function): Use
20488 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20489 for __x86_return_thunk.
20491 2018-01-15 Richard Biener <rguenther@suse.de>
20493 PR middle-end/83850
20494 * expmed.c (extract_bit_field_1): Fix typo.
20496 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20499 * config/arm/iterators.md (VF): New mode iterator.
20500 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20501 Remove integer-related logic from pattern.
20502 (neon_vabd<mode>_3): Likewise.
20504 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20506 PR middle-end/82694
20507 * common.opt (fstrict-overflow): No longer an alias.
20508 (fwrapv-pointer): New option.
20509 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20510 also for pointer types based on flag_wrapv_pointer.
20511 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20512 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20513 opts->x_flag_wrapv got set.
20514 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20515 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20516 POINTER_TYPE_OVERFLOW_UNDEFINED.
20517 * match.pd: Likewise in address comparison pattern.
20518 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20520 2018-01-15 Richard Biener <rguenther@suse.de>
20523 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20524 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
20525 Reset type names to their identifier if their TYPE_DECL doesn't
20526 have linkage (and thus is used for ODR and devirt).
20527 (save_debug_info_for_decl): Remove.
20528 (save_debug_info_for_type): Likewise.
20529 (add_tree_to_fld_list): Adjust.
20530 * tree-pretty-print.c (dump_generic_node): Make dumping of
20531 type names more robust.
20533 2018-01-15 Richard Biener <rguenther@suse.de>
20535 * BASE-VER: Bump to 8.0.1.
20537 2018-01-14 Martin Sebor <msebor@redhat.com>
20540 * builtins.c (check_access): Avoid warning when the no-warning bit
20543 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
20545 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20546 * ira-color (allocno_hard_regs_compare): Likewise.
20548 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
20551 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20552 Use .pushsection/.popsection.
20554 2018-01-14 Martin Sebor <msebor@redhat.com>
20557 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20559 2018-01-14 Jakub Jelinek <jakub@redhat.com>
20561 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20562 entry from extra_headers.
20563 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20564 extra_headers, make the list bitwise identical to the i?86-*-* one.
20566 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20568 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20569 -mcmodel=large with -mindirect-branch=thunk,
20570 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20571 -mfunction-return=thunk-extern.
20572 * doc/invoke.texi: Document -mcmodel=large is incompatible with
20573 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20574 -mfunction-return=thunk and -mfunction-return=thunk-extern.
20576 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20578 * config/i386/i386.c (print_reg): Print the name of the full
20579 integer register without '%'.
20580 (ix86_print_operand): Handle 'V'.
20581 * doc/extend.texi: Document 'V' modifier.
20583 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20585 * config/i386/constraints.md (Bs): Disallow memory operand for
20586 -mindirect-branch-register.
20588 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20589 (GOT_memory_operand): Likewise.
20590 (call_insn_operand): Likewise.
20591 (sibcall_insn_operand): Likewise.
20592 (GOT32_symbol_operand): Likewise.
20593 * config/i386/i386.md (indirect_jump): Call convert_memory_address
20594 for -mindirect-branch-register.
20595 (tablejump): Likewise.
20596 (*sibcall_memory): Likewise.
20597 (*sibcall_value_memory): Likewise.
20598 Disallow peepholes of indirect call and jump via memory for
20599 -mindirect-branch-register.
20600 (*call_pop): Replace m with Bw.
20601 (*call_value_pop): Likewise.
20602 (*sibcall_pop_memory): Replace m with Bs.
20603 * config/i386/i386.opt (mindirect-branch-register): New option.
20604 * doc/invoke.texi: Document -mindirect-branch-register option.
20606 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20608 * config/i386/i386-protos.h (ix86_output_function_return): New.
20609 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20610 set function_return_type.
20611 (indirect_thunk_name): Add ret_p to indicate thunk for function
20613 (output_indirect_thunk_function): Pass false to
20614 indirect_thunk_name.
20615 (ix86_output_indirect_branch_via_reg): Likewise.
20616 (ix86_output_indirect_branch_via_push): Likewise.
20617 (output_indirect_thunk_function): Create alias for function
20618 return thunk if regno < 0.
20619 (ix86_output_function_return): New function.
20620 (ix86_handle_fndecl_attribute): Handle function_return.
20621 (ix86_attribute_table): Add function_return.
20622 * config/i386/i386.h (machine_function): Add
20623 function_return_type.
20624 * config/i386/i386.md (simple_return_internal): Use
20625 ix86_output_function_return.
20626 (simple_return_internal_long): Likewise.
20627 * config/i386/i386.opt (mfunction-return=): New option.
20628 (indirect_branch): Mention -mfunction-return=.
20629 * doc/extend.texi: Document function_return function attribute.
20630 * doc/invoke.texi: Document -mfunction-return= option.
20632 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20634 * config/i386/i386-opts.h (indirect_branch): New.
20635 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20636 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20637 with local indirect jump when converting indirect call and jump.
20638 (ix86_set_indirect_branch_type): New.
20639 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20640 (indirectlabelno): New.
20641 (indirect_thunk_needed): Likewise.
20642 (indirect_thunk_bnd_needed): Likewise.
20643 (indirect_thunks_used): Likewise.
20644 (indirect_thunks_bnd_used): Likewise.
20645 (INDIRECT_LABEL): Likewise.
20646 (indirect_thunk_name): Likewise.
20647 (output_indirect_thunk): Likewise.
20648 (output_indirect_thunk_function): Likewise.
20649 (ix86_output_indirect_branch_via_reg): Likewise.
20650 (ix86_output_indirect_branch_via_push): Likewise.
20651 (ix86_output_indirect_branch): Likewise.
20652 (ix86_output_indirect_jmp): Likewise.
20653 (ix86_code_end): Call output_indirect_thunk_function if needed.
20654 (ix86_output_call_insn): Call ix86_output_indirect_branch if
20656 (ix86_handle_fndecl_attribute): Handle indirect_branch.
20657 (ix86_attribute_table): Add indirect_branch.
20658 * config/i386/i386.h (machine_function): Add indirect_branch_type
20659 and has_local_indirect_jump.
20660 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20662 (tablejump): Likewise.
20663 (*indirect_jump): Use ix86_output_indirect_jmp.
20664 (*tablejump_1): Likewise.
20665 (simple_return_indirect_internal): Likewise.
20666 * config/i386/i386.opt (mindirect-branch=): New option.
20667 (indirect_branch): New.
20670 (thunk-inline): Likewise.
20671 (thunk-extern): Likewise.
20672 * doc/extend.texi: Document indirect_branch function attribute.
20673 * doc/invoke.texi: Document -mindirect-branch= option.
20675 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
20678 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20680 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
20682 * ipa-inline.c (want_inline_small_function_p): Return false if
20683 inlining has already failed with CIF_FINAL_ERROR.
20684 (update_caller_keys): Call want_inline_small_function_p before
20686 (update_callee_keys): Likewise.
20688 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
20690 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20692 (rs6000_quadword_masked_address_p): Likewise.
20693 (quad_aligned_load_p): Likewise.
20694 (quad_aligned_store_p): Likewise.
20695 (const_load_sequence_p): Add comment to describe the outer-most loop.
20696 (mimic_memory_attributes_and_flags): New function.
20697 (rs6000_gen_stvx): Likewise.
20698 (replace_swapped_aligned_store): Likewise.
20699 (rs6000_gen_lvx): Likewise.
20700 (replace_swapped_aligned_load): Likewise.
20701 (replace_swapped_load_constant): Capitalize argument name in
20702 comment describing this function.
20703 (rs6000_analyze_swaps): Add a third pass to search for vector loads
20704 and stores that access quad-word aligned addresses and replace
20705 with stvx or lvx instructions when appropriate.
20706 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20707 New function prototype.
20708 (rs6000_quadword_masked_address_p): Likewise.
20709 (rs6000_gen_lvx): Likewise.
20710 (rs6000_gen_stvx): Likewise.
20711 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20712 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20713 when memory address is aligned.
20714 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20715 this split to select lvx instruction when memory address is aligned.
20716 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20717 instruction when memory address is aligned.
20718 (*vsx_le_perm_load_v16qi): Likewise.
20719 (four unnamed splitters): Modify to select the stvx instruction
20720 when memory is aligned.
20722 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
20724 * predict.c (determine_unlikely_bbs): Handle correctly BBs
20725 which appears in the queue multiple times.
20727 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20728 Alan Hayward <alan.hayward@arm.com>
20729 David Sherwood <david.sherwood@arm.com>
20731 * tree-vectorizer.h (vec_lower_bound): New structure.
20732 (_loop_vec_info): Add check_nonzero and lower_bounds.
20733 (LOOP_VINFO_CHECK_NONZERO): New macro.
20734 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
20735 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
20736 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
20737 fields. Make seg_len the distance travelled, not including the
20739 (dr_direction_indicator): Declare.
20740 (dr_zero_step_indicator): Likewise.
20741 (dr_known_forward_stride_p): Likewise.
20742 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
20744 (runtime_alias_check_p): Allow runtime alias checks with
20746 (operator ==): Compare access_size and align.
20747 (prune_runtime_alias_test_list): Rework for new distinction between
20748 the access_size and seg_len.
20749 (create_intersect_range_checks_index): Likewise. Cope with polynomial
20751 (get_segment_min_max): New function.
20752 (create_intersect_range_checks): Use it.
20753 (dr_step_indicator): New function.
20754 (dr_direction_indicator): Likewise.
20755 (dr_zero_step_indicator): Likewise.
20756 (dr_known_forward_stride_p): Likewise.
20757 * tree-loop-distribution.c (data_ref_segment_size): Return
20758 DR_STEP * (niters - 1).
20759 (compute_alias_check_pairs): Update call to the dr_with_seg_len
20761 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20762 (vect_preserves_scalar_order_p): New function, split out from...
20763 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
20764 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20765 (vect_vfa_access_size): New function.
20766 (vect_vfa_align): Likewise.
20767 (vect_compile_time_alias): Take access_size_a and access_b arguments.
20768 (dump_lower_bound): New function.
20769 (vect_check_lower_bound): Likewise.
20770 (vect_small_gap_p): Likewise.
20771 (vectorizable_with_step_bound_p): Likewise.
20772 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20773 depencies if the vectorization factor is 1. Convert the checks
20774 for nonzero steps into checks on the bounds of DR_STEP. Try using
20775 a bunds check for variable steps if the minimum required step is
20776 relatively small. Update calls to the dr_with_seg_len
20777 constructor and to vect_compile_time_alias.
20778 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20780 (vect_loop_versioning): Call it.
20781 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20783 (vect_estimate_min_profitable_iters): Account for any bounds checks.
20785 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20786 Alan Hayward <alan.hayward@arm.com>
20787 David Sherwood <david.sherwood@arm.com>
20789 * doc/sourcebuild.texi (vect_scatter_store): Document.
20790 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20792 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20794 * genopinit.c (main): Add supports_vec_scatter_store and
20795 supports_vec_scatter_store_cached to target_optabs.
20796 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20797 IFN_MASK_SCATTER_STORE.
20798 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20800 * internal-fn.h (internal_store_fn_p): Declare.
20801 (internal_fn_stored_value_index): Likewise.
20802 * internal-fn.c (scatter_store_direct): New macro.
20803 (expand_scatter_store_optab_fn): New function.
20804 (direct_scatter_store_optab_supported_p): New macro.
20805 (internal_store_fn_p): New function.
20806 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
20807 IFN_MASK_SCATTER_STORE.
20808 (internal_fn_mask_index): Likewise.
20809 (internal_fn_stored_value_index): New function.
20810 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
20811 for scatter stores.
20812 * optabs-query.h (supports_vec_scatter_store_p): Declare.
20813 * optabs-query.c (supports_vec_scatter_store_p): New function.
20814 * tree-vectorizer.h (vect_get_store_rhs): Declare.
20815 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
20816 true for scatter stores.
20817 (vect_gather_scatter_fn_p): Handle scatter stores too.
20818 (vect_check_gather_scatter): Consider using scatter stores if
20819 supports_vec_scatter_store_p.
20820 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
20821 scatter stores too.
20822 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20823 internal_fn_stored_value_index.
20824 (check_load_store_masking): Handle scatter stores too.
20825 (vect_get_store_rhs): Make public.
20826 (vectorizable_call): Use internal_store_fn_p.
20827 (vectorizable_store): Handle scatter store internal functions.
20828 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
20829 when deciding whether the end of the group has been reached.
20830 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
20831 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
20832 (mask_scatter_store<mode>): New insns.
20834 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20835 Alan Hayward <alan.hayward@arm.com>
20836 David Sherwood <david.sherwood@arm.com>
20838 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
20839 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
20840 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
20842 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
20843 Use vect_truncate_gather_scatter_offset if we can't treat the
20844 operation as a normal gather load or scatter store.
20845 (get_group_load_store_type): Take the gather_scatter_info
20846 as argument. Try using a gather load or scatter store for
20847 single-element groups.
20848 (get_load_store_type): Update calls to get_group_load_store_type
20849 and vect_use_strided_gather_scatters_p.
20851 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20852 Alan Hayward <alan.hayward@arm.com>
20853 David Sherwood <david.sherwood@arm.com>
20855 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
20856 optional tree argument.
20857 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
20859 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
20860 but continue to use the current value as a fallback.
20861 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
20862 to compare the updates.
20863 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
20864 (get_load_store_type): Use it when handling a strided access.
20865 (vect_get_strided_load_store_ops): New function.
20866 (vect_get_data_ptr_increment): Likewise.
20867 (vectorizable_load): Handle strided gather loads. Always pass
20868 a step to vect_create_data_ref_ptr and bump_vector_ptr.
20870 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20871 Alan Hayward <alan.hayward@arm.com>
20872 David Sherwood <david.sherwood@arm.com>
20874 * doc/md.texi (gather_load@var{m}): Document.
20875 (mask_gather_load@var{m}): Likewise.
20876 * genopinit.c (main): Add supports_vec_gather_load and
20877 supports_vec_gather_load_cached to target_optabs.
20878 * optabs-tree.c (init_tree_optimization_optabs): Use
20879 ggc_cleared_alloc to allocate target_optabs.
20880 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
20881 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
20883 * internal-fn.h (internal_load_fn_p): Declare.
20884 (internal_gather_scatter_fn_p): Likewise.
20885 (internal_fn_mask_index): Likewise.
20886 (internal_gather_scatter_fn_supported_p): Likewise.
20887 * internal-fn.c (gather_load_direct): New macro.
20888 (expand_gather_load_optab_fn): New function.
20889 (direct_gather_load_optab_supported_p): New macro.
20890 (direct_internal_fn_optab): New function.
20891 (internal_load_fn_p): Likewise.
20892 (internal_gather_scatter_fn_p): Likewise.
20893 (internal_fn_mask_index): Likewise.
20894 (internal_gather_scatter_fn_supported_p): Likewise.
20895 * optabs-query.c (supports_at_least_one_mode_p): New function.
20896 (supports_vec_gather_load_p): Likewise.
20897 * optabs-query.h (supports_vec_gather_load_p): Declare.
20898 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20899 and memory_type field.
20900 (NUM_PATTERNS): Bump to 15.
20901 * tree-vect-data-refs.c: Include internal-fn.h.
20902 (vect_gather_scatter_fn_p): New function.
20903 (vect_describe_gather_scatter_call): Likewise.
20904 (vect_check_gather_scatter): Try using internal functions for
20905 gather loads. Recognize existing calls to a gather load function.
20906 (vect_analyze_data_refs): Consider using gather loads if
20907 supports_vec_gather_load_p.
20908 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
20909 (vect_get_gather_scatter_offset_type): Likewise.
20910 (vect_convert_mask_for_vectype): Likewise.
20911 (vect_add_conversion_to_patterm): Likewise.
20912 (vect_try_gather_scatter_pattern): Likewise.
20913 (vect_recog_gather_scatter_pattern): New pattern recognizer.
20914 (vect_vect_recog_func_ptrs): Add it.
20915 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20916 internal_fn_mask_index and internal_gather_scatter_fn_p.
20917 (check_load_store_masking): Take the gather_scatter_info as an
20918 argument and handle gather loads.
20919 (vect_get_gather_scatter_ops): New function.
20920 (vectorizable_call): Check internal_load_fn_p.
20921 (vectorizable_load): Likewise. Handle gather load internal
20923 (vectorizable_store): Update call to check_load_store_masking.
20924 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
20925 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
20926 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
20927 (aarch64_gather_scale_operand_d): New predicates.
20928 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
20929 (mask_gather_load<mode>): New insns.
20931 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20932 Alan Hayward <alan.hayward@arm.com>
20933 David Sherwood <david.sherwood@arm.com>
20935 * optabs.def (fold_left_plus_optab): New optab.
20936 * doc/md.texi (fold_left_plus_@var{m}): Document.
20937 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
20938 * internal-fn.c (fold_left_direct): Define.
20939 (expand_fold_left_optab_fn): Likewise.
20940 (direct_fold_left_optab_supported_p): Likewise.
20941 * fold-const-call.c (fold_const_fold_left): New function.
20942 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
20943 * tree-parloops.c (valid_reduction_p): New function.
20944 (gather_scalar_reductions): Use it.
20945 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
20946 (vect_finish_replace_stmt): Declare.
20947 * tree-vect-loop.c (fold_left_reduction_fn): New function.
20948 (needs_fold_left_reduction_p): New function, split out from...
20949 (vect_is_simple_reduction): ...here. Accept reductions that
20950 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
20951 (vect_force_simple_reduction): Also store the reduction type in
20952 the assignment's STMT_VINFO_REDUC_TYPE.
20953 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
20954 (merge_with_identity): New function.
20955 (vect_expand_fold_left): Likewise.
20956 (vectorize_fold_left_reduction): Likewise.
20957 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
20958 scalar phi in place for it. Check for target support and reject
20959 cases that would reassociate the operation. Defer the transform
20960 phase to vectorize_fold_left_reduction.
20961 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
20962 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
20963 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
20965 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20967 * tree-if-conv.c (predicate_mem_writes): Remove redundant
20968 call to ifc_temp_var.
20970 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20971 Alan Hayward <alan.hayward@arm.com>
20972 David Sherwood <david.sherwood@arm.com>
20974 * target.def (legitimize_address_displacement): Take the original
20975 offset as a poly_int.
20976 * targhooks.h (default_legitimize_address_displacement): Update
20978 * targhooks.c (default_legitimize_address_displacement): Likewise.
20979 * doc/tm.texi: Regenerate.
20980 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
20981 as an argument, moving assert of ad->disp == ad->disp_term to...
20982 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
20983 Try calling targetm.legitimize_address_displacement before expanding
20984 the address rather than afterwards, and adjust for the new interface.
20985 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
20986 Match the new hook interface. Handle SVE addresses.
20987 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
20988 new hook interface.
20990 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20992 * Makefile.in (OBJS): Add early-remat.o.
20993 * target.def (select_early_remat_modes): New hook.
20994 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
20995 * doc/tm.texi: Regenerate.
20996 * targhooks.h (default_select_early_remat_modes): Declare.
20997 * targhooks.c (default_select_early_remat_modes): New function.
20998 * timevar.def (TV_EARLY_REMAT): New timevar.
20999 * passes.def (pass_early_remat): New pass.
21000 * tree-pass.h (make_pass_early_remat): Declare.
21001 * early-remat.c: New file.
21002 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21004 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21006 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21007 Alan Hayward <alan.hayward@arm.com>
21008 David Sherwood <david.sherwood@arm.com>
21010 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21011 vfm1 with a bound_epilog parameter.
21012 (vect_do_peeling): Update calls accordingly, and move the prologue
21013 call earlier in the function. Treat the base bound_epilog as 0 for
21014 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21015 this base when peeling for gaps.
21016 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21017 with fully-masked loops.
21018 (vect_estimate_min_profitable_iters): Handle the single peeled
21019 iteration in that case.
21021 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21022 Alan Hayward <alan.hayward@arm.com>
21023 David Sherwood <david.sherwood@arm.com>
21025 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21026 single-element interleaving even if the size is not a power of 2.
21027 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21028 accesses for single-element interleaving if the group size is
21031 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21032 Alan Hayward <alan.hayward@arm.com>
21033 David Sherwood <david.sherwood@arm.com>
21035 * doc/md.texi (fold_extract_last_@var{m}): Document.
21036 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21037 * optabs.def (fold_extract_last_optab): New optab.
21038 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21039 * internal-fn.c (fold_extract_direct): New macro.
21040 (expand_fold_extract_optab_fn): Likewise.
21041 (direct_fold_extract_optab_supported_p): Likewise.
21042 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21043 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21044 EXTRACT_LAST_REDUCTION.
21045 (get_initial_def_for_reduction): Do not create an initial vector
21046 for EXTRACT_LAST_REDUCTION reductions.
21047 (vectorizable_reduction): Leave the scalar phi in place for
21048 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21049 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21050 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21051 transform phase to vectorizable_condition.
21052 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21054 (vect_finish_stmt_generation): ...here.
21055 (vect_finish_replace_stmt): New function.
21056 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21057 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21059 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21061 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21062 Alan Hayward <alan.hayward@arm.com>
21063 David Sherwood <david.sherwood@arm.com>
21065 * doc/md.texi (extract_last_@var{m}): Document.
21066 * optabs.def (extract_last_optab): New optab.
21067 * internal-fn.def (EXTRACT_LAST): New internal function.
21068 * internal-fn.c (cond_unary_direct): New macro.
21069 (expand_cond_unary_optab_fn): Likewise.
21070 (direct_cond_unary_optab_supported_p): Likewise.
21071 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21072 loops using EXTRACT_LAST.
21073 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21074 (extract_last_<mode>): ...this optab.
21075 (vec_extract<mode><Vel>): Update accordingly.
21077 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21078 Alan Hayward <alan.hayward@arm.com>
21079 David Sherwood <david.sherwood@arm.com>
21081 * target.def (empty_mask_is_expensive): New hook.
21082 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21083 * doc/tm.texi: Regenerate.
21084 * targhooks.h (default_empty_mask_is_expensive): Declare.
21085 * targhooks.c (default_empty_mask_is_expensive): New function.
21086 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21087 if the target says that empty masks are expensive.
21088 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21090 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21092 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21093 Alan Hayward <alan.hayward@arm.com>
21094 David Sherwood <david.sherwood@arm.com>
21096 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21097 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21098 (vect_use_loop_mask_for_alignment_p): New function.
21099 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21100 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21101 niters_skip argument. Make sure that the first niters_skip elements
21102 of the first iteration are inactive.
21103 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21104 Update call to vect_set_loop_masks_directly.
21105 (get_misalign_in_elems): New function, split out from...
21106 (vect_gen_prolog_loop_niters): ...here.
21107 (vect_update_init_of_dr): Take a code argument that specifies whether
21108 the adjustment should be added or subtracted.
21109 (vect_update_init_of_drs): Likewise.
21110 (vect_prepare_for_masked_peels): New function.
21111 (vect_do_peeling): Skip prologue peeling if we're using a mask
21112 instead. Update call to vect_update_inits_of_drs.
21113 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21115 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21116 alignment. Do not include the number of peeled iterations in
21117 the minimum threshold in that case.
21118 (vectorizable_induction): Adjust the start value down by
21119 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21120 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21121 Take the number of skipped iterations into account when calculating
21123 * tree-vect-stmts.c (vect_gen_while_not): New function.
21125 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21126 Alan Hayward <alan.hayward@arm.com>
21127 David Sherwood <david.sherwood@arm.com>
21129 * doc/sourcebuild.texi (vect_fully_masked): Document.
21130 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21131 default value to 0.
21132 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21134 (vect_analyze_loop_2): ...here. Don't check the vectorization
21135 factor against the number of loop iterations if the loop is
21138 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21139 Alan Hayward <alan.hayward@arm.com>
21140 David Sherwood <david.sherwood@arm.com>
21142 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21143 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21144 (dump_groups): Update accordingly.
21145 (iv_use::mem_type): New member variable.
21146 (address_p): New function.
21147 (record_use): Add a mem_type argument and initialize the new
21149 (record_group_use): Add a mem_type argument. Use address_p.
21150 Remove obsolete null checks of base_object. Update call to record_use.
21151 (find_interesting_uses_op): Update call to record_group_use.
21152 (find_interesting_uses_cond): Likewise.
21153 (find_interesting_uses_address): Likewise.
21154 (get_mem_type_for_internal_fn): New function.
21155 (find_address_like_use): Likewise.
21156 (find_interesting_uses_stmt): Try find_address_like_use before
21157 calling find_interesting_uses_op.
21158 (addr_offset_valid_p): Use the iv mem_type field as the type
21159 of the addressed memory.
21160 (add_autoinc_candidates): Likewise.
21161 (get_address_cost): Likewise.
21162 (split_small_address_groups_p): Use address_p.
21163 (split_address_groups): Likewise.
21164 (add_iv_candidate_for_use): Likewise.
21165 (autoinc_possible_for_pair): Likewise.
21166 (rewrite_groups): Likewise.
21167 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21168 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21169 (get_alias_ptr_type_for_ptr_address): New function.
21170 (rewrite_use_address): Rewrite address uses in calls that were
21171 identified by find_address_like_use.
21173 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21174 Alan Hayward <alan.hayward@arm.com>
21175 David Sherwood <david.sherwood@arm.com>
21177 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21179 * gimple-expr.h (is_gimple_addressable: Likewise.
21180 * gimple-expr.c (is_gimple_address): Likewise.
21181 * internal-fn.c (expand_call_mem_ref): New function.
21182 (expand_mask_load_optab_fn): Use it.
21183 (expand_mask_store_optab_fn): Likewise.
21185 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21186 Alan Hayward <alan.hayward@arm.com>
21187 David Sherwood <david.sherwood@arm.com>
21189 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21190 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21191 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21192 (cond_umax@var{mode}): Document.
21193 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21194 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21195 (cond_umin_optab, cond_umax_optab): New optabs.
21196 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21197 (COND_IOR, COND_XOR): New internal functions.
21198 * internal-fn.h (get_conditional_internal_fn): Declare.
21199 * internal-fn.c (cond_binary_direct): New macro.
21200 (expand_cond_binary_optab_fn): Likewise.
21201 (direct_cond_binary_optab_supported_p): Likewise.
21202 (get_conditional_internal_fn): New function.
21203 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21204 Cope with reduction statements that are vectorized as calls rather
21206 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21207 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21208 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21209 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21210 (UNSPEC_COND_EOR): New unspecs.
21211 (optab): Add mappings for them.
21212 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21213 (sve_int_op, sve_fp_op): New int attributes.
21215 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21216 Alan Hayward <alan.hayward@arm.com>
21217 David Sherwood <david.sherwood@arm.com>
21219 * optabs.def (while_ult_optab): New optab.
21220 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21221 * internal-fn.def (WHILE_ULT): New internal function.
21222 * internal-fn.h (direct_internal_fn_supported_p): New override
21223 that takes two types as argument.
21224 * internal-fn.c (while_direct): New macro.
21225 (expand_while_optab_fn): New function.
21226 (convert_optab_supported_p): Likewise.
21227 (direct_while_optab_supported_p): New macro.
21228 * wide-int.h (wi::udiv_ceil): New function.
21229 * tree-vectorizer.h (rgroup_masks): New structure.
21230 (vec_loop_masks): New typedef.
21231 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21232 and fully_masked_p.
21233 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21234 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21235 (vect_max_vf): New function.
21236 (slpeel_make_loop_iterate_ntimes): Delete.
21237 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21238 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21239 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21240 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21241 internal-fn.h, stor-layout.h and optabs-query.h.
21242 (vect_set_loop_mask): New function.
21243 (add_preheader_seq): Likewise.
21244 (add_header_seq): Likewise.
21245 (interleave_supported_p): Likewise.
21246 (vect_maybe_permute_loop_masks): Likewise.
21247 (vect_set_loop_masks_directly): Likewise.
21248 (vect_set_loop_condition_masked): Likewise.
21249 (vect_set_loop_condition_unmasked): New function, split out from
21250 slpeel_make_loop_iterate_ntimes.
21251 (slpeel_make_loop_iterate_ntimes): Rename to..
21252 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21253 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21254 (vect_do_peeling): Update call accordingly.
21255 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21257 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21258 mask_compare_type, can_fully_mask_p and fully_masked_p.
21259 (release_vec_loop_masks): New function.
21260 (_loop_vec_info): Use it to free the loop masks.
21261 (can_produce_all_loop_masks_p): New function.
21262 (vect_get_max_nscalars_per_iter): Likewise.
21263 (vect_verify_full_masking): Likewise.
21264 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21265 retries, and free the mask rgroups before retrying. Check loop-wide
21266 reasons for disallowing fully-masked loops. Make the final decision
21267 about whether use a fully-masked loop or not.
21268 (vect_estimate_min_profitable_iters): Do not assume that peeling
21269 for the number of iterations will be needed for fully-masked loops.
21270 (vectorizable_reduction): Disable fully-masked loops.
21271 (vectorizable_live_operation): Likewise.
21272 (vect_halve_mask_nunits): New function.
21273 (vect_double_mask_nunits): Likewise.
21274 (vect_record_loop_mask): Likewise.
21275 (vect_get_loop_mask): Likewise.
21276 (vect_transform_loop): Handle the case in which the final loop
21277 iteration might handle a partial vector. Call vect_set_loop_condition
21278 instead of slpeel_make_loop_iterate_ntimes.
21279 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21280 (check_load_store_masking): New function.
21281 (prepare_load_store_mask): Likewise.
21282 (vectorizable_store): Handle fully-masked loops.
21283 (vectorizable_load): Likewise.
21284 (supportable_widening_operation): Use vect_halve_mask_nunits for
21286 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21287 (vect_gen_while): New function.
21288 * config/aarch64/aarch64.md (umax<mode>3): New expander.
21289 (aarch64_uqdec<mode>): New insn.
21291 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21292 Alan Hayward <alan.hayward@arm.com>
21293 David Sherwood <david.sherwood@arm.com>
21295 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21296 (reduc_xor_scal_optab): New optabs.
21297 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21298 (reduc_xor_scal_@var{m}): Document.
21299 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21300 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21301 internal functions.
21302 * fold-const-call.c (fold_const_call): Handle them.
21303 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21304 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21305 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21306 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21307 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21308 (UNSPEC_XORV): New unspecs.
21309 (optab): Add entries for them.
21310 (BITWISEV): New int iterator.
21311 (bit_reduc_op): New int attributes.
21313 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21314 Alan Hayward <alan.hayward@arm.com>
21315 David Sherwood <david.sherwood@arm.com>
21317 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21318 * internal-fn.def (VEC_SHL_INSERT): New internal function.
21319 * optabs.def (vec_shl_insert_optab): New optab.
21320 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21321 (duplicate_and_interleave): Likewise.
21322 * tree-vect-loop.c: Include internal-fn.h.
21323 (neutral_op_for_slp_reduction): New function, split out from
21324 get_initial_defs_for_reduction.
21325 (get_initial_def_for_reduction): Handle option 2 for variable-length
21326 vectors by loading the neutral value into a vector and then shifting
21327 the initial value into element 0.
21328 (get_initial_defs_for_reduction): Replace the code argument with
21329 the neutral value calculated by neutral_op_for_slp_reduction.
21330 Use gimple_build_vector for constant-length vectors.
21331 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21332 but the first group_size elements have a neutral value.
21333 Use duplicate_and_interleave otherwise.
21334 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21335 Update call to get_initial_defs_for_reduction. Handle SLP
21336 reductions for variable-length vectors by creating one vector
21337 result for each scalar result, with the elements associated
21338 with other scalar results stubbed out with the neutral value.
21339 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21340 Require IFN_VEC_SHL_INSERT for double reductions on
21341 variable-length vectors, or SLP reductions that have
21342 a neutral value. Require can_duplicate_and_interleave_p
21343 support for variable-length unchained SLP reductions if there
21344 is no neutral value, such as for MIN/MAX reductions. Also require
21345 the number of vector elements to be a multiple of the number of
21346 SLP statements when doing variable-length unchained SLP reductions.
21347 Update call to vect_create_epilog_for_reduction.
21348 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21349 and remove initial values.
21350 (duplicate_and_interleave): Make public.
21351 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21352 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21354 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21355 Alan Hayward <alan.hayward@arm.com>
21356 David Sherwood <david.sherwood@arm.com>
21358 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21359 (can_duplicate_and_interleave_p): New function.
21360 (vect_get_and_check_slp_defs): Take the vector of statements
21361 rather than just the current one. Remove excess parentheses.
21362 Restriction rejectinon of vect_constant_def and vect_external_def
21363 for variable-length vectors to boolean types, or types for which
21364 can_duplicate_and_interleave_p is false.
21365 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21366 (duplicate_and_interleave): New function.
21367 (vect_get_constant_vectors): Use gimple_build_vector for
21368 constant-length vectors and suitable variable-length constant
21369 vectors. Use duplicate_and_interleave for other variable-length
21370 vectors. Don't defer the update when inserting new statements.
21372 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21373 Alan Hayward <alan.hayward@arm.com>
21374 David Sherwood <david.sherwood@arm.com>
21376 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21377 min_profitable_iters doesn't go negative.
21379 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21380 Alan Hayward <alan.hayward@arm.com>
21381 David Sherwood <david.sherwood@arm.com>
21383 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21384 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21385 * optabs.def (vec_mask_load_lanes_optab): New optab.
21386 (vec_mask_store_lanes_optab): Likewise.
21387 * internal-fn.def (MASK_LOAD_LANES): New internal function.
21388 (MASK_STORE_LANES): Likewise.
21389 * internal-fn.c (mask_load_lanes_direct): New macro.
21390 (mask_store_lanes_direct): Likewise.
21391 (expand_mask_load_optab_fn): Handle masked operations.
21392 (expand_mask_load_lanes_optab_fn): New macro.
21393 (expand_mask_store_optab_fn): Handle masked operations.
21394 (expand_mask_store_lanes_optab_fn): New macro.
21395 (direct_mask_load_lanes_optab_supported_p): Likewise.
21396 (direct_mask_store_lanes_optab_supported_p): Likewise.
21397 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21399 (vect_load_lanes_supported): Likewise.
21400 * tree-vect-data-refs.c (strip_conversion): New function.
21401 (can_group_stmts_p): Likewise.
21402 (vect_analyze_data_ref_accesses): Use it instead of checking
21403 for a pair of assignments.
21404 (vect_store_lanes_supported): Take a masked_p parameter.
21405 (vect_load_lanes_supported): Likewise.
21406 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21407 vect_store_lanes_supported and vect_load_lanes_supported.
21408 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21409 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21410 parameter. Don't allow gaps for masked accesses.
21411 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
21412 and vect_load_lanes_supported.
21413 (get_load_store_type): Take a masked_p parameter and update
21414 call to get_group_load_store_type.
21415 (vectorizable_store): Update call to get_load_store_type.
21416 Handle IFN_MASK_STORE_LANES.
21417 (vectorizable_load): Update call to get_load_store_type.
21418 Handle IFN_MASK_LOAD_LANES.
21420 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21421 Alan Hayward <alan.hayward@arm.com>
21422 David Sherwood <david.sherwood@arm.com>
21424 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21426 * config/aarch64/aarch64-protos.h
21427 (aarch64_sve_struct_memory_operand_p): Declare.
21428 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21429 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21430 (VPRED, vpred): Handle SVE structure modes.
21431 * config/aarch64/constraints.md (Utx): New constraint.
21432 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21433 (aarch64_sve_struct_nonimmediate_operand): New predicates.
21434 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21435 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21436 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21437 structure modes. Split into pieces after RA.
21438 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21439 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21441 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21442 SVE structure modes.
21443 (aarch64_classify_address): Likewise.
21444 (sizetochar): Move earlier in file.
21445 (aarch64_print_operand): Handle SVE register lists.
21446 (aarch64_array_mode): New function.
21447 (aarch64_sve_struct_memory_operand_p): Likewise.
21448 (TARGET_ARRAY_MODE): Redefine.
21450 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21451 Alan Hayward <alan.hayward@arm.com>
21452 David Sherwood <david.sherwood@arm.com>
21454 * target.def (array_mode): New target hook.
21455 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21456 * doc/tm.texi: Regenerate.
21457 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21458 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21459 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21460 targetm.array_mode.
21461 * stor-layout.c (mode_for_array): Likewise. Support polynomial
21464 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21465 Alan Hayward <alan.hayward@arm.com>
21466 David Sherwood <david.sherwood@arm.com>
21468 * fold-const.c (fold_binary_loc): Check the argument types
21469 rather than the result type when testing for a vector operation.
21471 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21473 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21474 * doc/tm.texi: Regenerate.
21476 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21477 Alan Hayward <alan.hayward@arm.com>
21478 David Sherwood <david.sherwood@arm.com>
21480 * doc/invoke.texi (-msve-vector-bits=): Document new option.
21481 (sve): Document new AArch64 extension.
21482 * doc/md.texi (w): Extend the description of the AArch64
21483 constraint to include SVE vectors.
21484 (Upl, Upa): Document new AArch64 predicate constraints.
21485 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21487 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21488 (msve-vector-bits=): New option.
21489 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21490 SVE when these are disabled.
21491 (sve): New extension.
21492 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21493 modes. Adjust their number of units based on aarch64_sve_vg.
21494 (MAX_BITSIZE_MODE_ANY_MODE): Define.
21495 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21496 aarch64_addr_query_type.
21497 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21498 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21499 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21500 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21501 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21502 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21503 (aarch64_simd_imm_zero_p): Delete.
21504 (aarch64_check_zero_based_sve_index_immediate): Declare.
21505 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21506 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21507 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21508 (aarch64_sve_float_mul_immediate_p): Likewise.
21509 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21510 rather than an rtx.
21511 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21512 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21513 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21514 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21515 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21516 (aarch64_regmode_natural_size): Likewise.
21517 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21518 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21520 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21521 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21522 for VG and the SVE predicate registers.
21523 (V_ALIASES): Add a "z"-prefixed alias.
21524 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21525 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21526 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21527 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21528 (REG_CLASS_NAMES): Add entries for them.
21529 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
21530 and the predicate registers.
21531 (aarch64_sve_vg): Declare.
21532 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21533 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21534 (REGMODE_NATURAL_SIZE): Define.
21535 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21537 * config/aarch64/aarch64.c: Include cfgrtl.h.
21538 (simd_immediate_info): Add a constructor for series vectors,
21539 and an associated step field.
21540 (aarch64_sve_vg): New variable.
21541 (aarch64_dbx_register_number): Handle VG and the predicate registers.
21542 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21543 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21544 (VEC_ANY_DATA, VEC_STRUCT): New constants.
21545 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21546 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21547 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21548 (aarch64_get_mask_mode): New functions.
21549 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21550 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21551 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
21552 predicate modes and predicate registers. Explicitly restrict
21553 GPRs to modes of 16 bytes or smaller. Only allow FP registers
21554 to store a vector mode if it is recognized by
21555 aarch64_classify_vector_mode.
21556 (aarch64_regmode_natural_size): New function.
21557 (aarch64_hard_regno_caller_save_mode): Return the original mode
21559 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21560 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21561 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21562 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21564 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
21565 does not overlap dest if the function is frame-related. Handle
21567 (aarch64_split_add_offset): New function.
21568 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21569 them aarch64_add_offset.
21570 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21571 and update call to aarch64_sub_sp.
21572 (aarch64_add_cfa_expression): New function.
21573 (aarch64_expand_prologue): Pass extra temporary registers to the
21574 functions above. Handle the case in which we need to emit new
21575 DW_CFA_expressions for registers that were originally saved
21576 relative to the stack pointer, but now have to be expressed
21577 relative to the frame pointer.
21578 (aarch64_output_mi_thunk): Pass extra temporary registers to the
21580 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
21581 IP0 and IP1 values for SVE frames.
21582 (aarch64_expand_vec_series): New function.
21583 (aarch64_expand_sve_widened_duplicate): Likewise.
21584 (aarch64_expand_sve_const_vector): Likewise.
21585 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21586 Handle SVE constants. Use emit_move_insn to move a force_const_mem
21587 into the register, rather than emitting a SET directly.
21588 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21589 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21590 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21591 (offset_9bit_signed_scaled_p): New functions.
21592 (aarch64_replicate_bitmask_imm): New function.
21593 (aarch64_bitmask_imm): Use it.
21594 (aarch64_cannot_force_const_mem): Reject expressions involving
21595 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
21596 (aarch64_classify_index): Handle SVE indices, by requiring
21597 a plain register index with a scale that matches the element size.
21598 (aarch64_classify_address): Handle SVE addresses. Assert that
21599 the mode of the address is VOIDmode or an integer mode.
21600 Update call to aarch64_classify_symbol.
21601 (aarch64_classify_symbolic_expression): Update call to
21602 aarch64_classify_symbol.
21603 (aarch64_const_vec_all_in_range_p): New function.
21604 (aarch64_print_vector_float_operand): Likewise.
21605 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
21606 "vN" for FP registers with SVE modes. Handle (const ...) vectors
21607 and the FP immediates 1.0 and 0.5.
21608 (aarch64_print_address_internal): Handle SVE addresses.
21609 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21610 (aarch64_regno_regclass): Handle predicate registers.
21611 (aarch64_secondary_reload): Handle big-endian reloads of SVE
21613 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21614 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21615 (aarch64_convert_sve_vector_bits): New function.
21616 (aarch64_override_options): Use it to handle -msve-vector-bits=.
21617 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21618 rather than an rtx.
21619 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21620 Handle SVE vector and predicate modes. Accept VL-based constants
21621 that need only one temporary register, and VL offsets that require
21622 no temporary registers.
21623 (aarch64_conditional_register_usage): Mark the predicate registers
21624 as fixed if SVE isn't available.
21625 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21626 Return true for SVE vector and predicate modes.
21627 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21628 rather than an unsigned int. Handle SVE modes.
21629 (aarch64_preferred_simd_mode): Update call accordingly. Handle
21631 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21633 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21634 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21635 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21636 (aarch64_sve_float_mul_immediate_p): New functions.
21637 (aarch64_sve_valid_immediate): New function.
21638 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21639 Explicitly reject structure modes. Check for INDEX constants.
21640 Handle PTRUE and PFALSE constants.
21641 (aarch64_check_zero_based_sve_index_immediate): New function.
21642 (aarch64_simd_imm_zero_p): Delete.
21643 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21644 vector modes. Accept constants in the range of CNT[BHWD].
21645 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21646 ask for an Advanced SIMD mode.
21647 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21648 (aarch64_simd_vector_alignment): Handle SVE predicates.
21649 (aarch64_vectorize_preferred_vector_alignment): New function.
21650 (aarch64_simd_vector_alignment_reachable): Use it instead of
21652 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21653 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21655 (MAX_VECT_LEN): Delete.
21656 (expand_vec_perm_d): Add a vec_flags field.
21657 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21658 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21659 (aarch64_evpc_ext): Don't apply a big-endian lane correction
21661 (aarch64_evpc_rev): Rename to...
21662 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
21663 (aarch64_evpc_rev_global): New function.
21664 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21665 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21667 (aarch64_evpc_sve_tbl): New function.
21668 (aarch64_expand_vec_perm_const_1): Update after rename of
21669 aarch64_evpc_rev. Handle SVE permutes too, trying
21670 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21671 than aarch64_evpc_tbl.
21672 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21673 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21674 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21675 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21676 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21677 (aarch64_expand_sve_vcond): New functions.
21678 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21679 of aarch64_vector_mode_p.
21680 (aarch64_dwarf_poly_indeterminate_value): New function.
21681 (aarch64_compute_pressure_classes): Likewise.
21682 (aarch64_can_change_mode_class): Likewise.
21683 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21684 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21685 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21686 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21687 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21688 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21689 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21690 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21692 (Dn, Dl, Dr): Accept const as well as const_vector.
21693 (Dz): Likewise. Compare against CONST0_RTX.
21694 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21695 of "vector" where appropriate.
21696 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21697 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21698 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21699 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21700 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21701 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21702 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21703 (v_int_equiv): Extend to SVE modes.
21704 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21706 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21707 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21708 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21709 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21710 (SVE_COND_FP_CMP): New int iterators.
21711 (perm_hilo): Handle the new unpack unspecs.
21712 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21714 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21715 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21716 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21717 (aarch64_equality_operator, aarch64_constant_vector_operand)
21718 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21719 (aarch64_sve_nonimmediate_operand): Likewise.
21720 (aarch64_sve_general_operand): Likewise.
21721 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
21722 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
21723 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
21724 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
21725 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
21726 (aarch64_sve_float_arith_immediate): Likewise.
21727 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
21728 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
21729 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
21730 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
21731 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
21732 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
21733 (aarch64_sve_float_arith_operand): Likewise.
21734 (aarch64_sve_float_arith_with_sub_operand): Likewise.
21735 (aarch64_sve_float_mul_operand): Likewise.
21736 (aarch64_sve_vec_perm_operand): Likewise.
21737 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
21738 (aarch64_mov_operand): Accept const_poly_int and const_vector.
21739 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
21740 as well as const_vector.
21741 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
21742 in file. Use CONST0_RTX and CONSTM1_RTX.
21743 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
21744 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
21745 Use aarch64_simd_imm_zero.
21746 * config/aarch64/aarch64-sve.md: New file.
21747 * config/aarch64/aarch64.md: Include it.
21748 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21749 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21750 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21751 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21752 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21753 (sve): New attribute.
21754 (enabled): Disable instructions with the sve attribute unless
21756 (movqi, movhi): Pass CONST_POLY_INT operaneds through
21757 aarch64_expand_mov_immediate.
21758 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21759 CNT[BHSD] immediates.
21760 (movti): Split CONST_POLY_INT moves into two halves.
21761 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21762 Split additions that need a temporary here if the destination
21763 is the stack pointer.
21764 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21765 (*add<mode>3_poly_1): New instruction.
21766 (set_clobber_cc): New expander.
21768 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21770 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21771 parameter and use it instead of GET_MODE_SIZE (innermode). Use
21772 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21773 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21774 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
21775 Change innermode from fixed_mode_size to machine_mode.
21776 (simplify_subreg): Update call accordingly. Handle a constant-sized
21777 subreg of a variable-length CONST_VECTOR.
21779 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21780 Alan Hayward <alan.hayward@arm.com>
21781 David Sherwood <david.sherwood@arm.com>
21783 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21784 (add_offset_to_base): New function, split out from...
21785 (create_mem_ref): ...here. When handling a scale other than 1,
21786 check first whether the address is valid without the offset.
21787 Add it into the base if so, leaving the index and scale as-is.
21789 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21792 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21793 fold_for_warn before checking if arg2 is INTEGER_CST.
21795 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
21797 * config/rs6000/predicates.md (load_multiple_operation): Delete.
21798 (store_multiple_operation): Delete.
21799 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21800 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21801 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21802 guarded by TARGET_STRING.
21803 (rs6000_output_load_multiple): Delete.
21804 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21805 OPTION_MASK_STRING / TARGET_STRING handling.
21806 (print_operand) <'N', 'O'>: Add comment that these are unused now.
21807 (const rs6000_opt_masks) <"string">: Change mask to 0.
21808 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
21809 (MASK_STRING): Delete.
21810 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
21812 (load_multiple): Delete.
21819 (store_multiple): Delete.
21826 (movmemsi_8reg): Delete.
21827 (corresponding unnamed define_insn): Delete.
21828 (movmemsi_6reg): Delete.
21829 (corresponding unnamed define_insn): Delete.
21830 (movmemsi_4reg): Delete.
21831 (corresponding unnamed define_insn): Delete.
21832 (movmemsi_2reg): Delete.
21833 (corresponding unnamed define_insn): Delete.
21834 (movmemsi_1reg): Delete.
21835 (corresponding unnamed define_insn): Delete.
21836 * config/rs6000/rs6000.opt (mno-string): New.
21837 (mstring): Replace by deprecation warning stub.
21838 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
21840 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21842 * regrename.c (regrename_do_replace): If replacing the same
21843 reg multiple times, try to reuse last created gen_raw_REG.
21846 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
21847 main to workaround a bug in GDB.
21849 2018-01-12 Tom de Vries <tom@codesourcery.com>
21852 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
21854 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
21856 PR rtl-optimization/80481
21857 * ira-color.c (get_cap_member): New function.
21858 (allocnos_conflict_by_live_ranges_p): Use it.
21859 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21860 (setup_slot_coalesced_allocno_live_ranges): Ditto.
21862 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
21865 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
21866 (*saddl_se_1): Ditto.
21867 (*ssubsi_1): Ditto.
21868 (*ssubl_se_1): Ditto.
21870 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21872 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
21873 rather than wi::to_widest for DR_INITs.
21874 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
21875 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
21876 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
21878 (vect_analyze_group_access_1): Note that here.
21880 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21882 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
21883 polynomial type sizes.
21885 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21887 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
21888 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
21889 (gimple_add_tmp_var): Likewise.
21891 2018-01-12 Martin Liska <mliska@suse.cz>
21893 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
21894 (gimple_alloc_sizes): Likewise.
21895 (dump_gimple_statistics): Use PRIu64 in printf format.
21896 * gimple.h: Change uint64_t to int.
21898 2018-01-12 Martin Liska <mliska@suse.cz>
21900 * tree-core.h: Use uint64_t instead of int.
21901 * tree.c (tree_node_counts): Likewise.
21902 (tree_node_sizes): Likewise.
21903 (dump_tree_statistics): Use PRIu64 in printf format.
21905 2018-01-12 Martin Liska <mliska@suse.cz>
21907 * Makefile.in: As qsort_chk is implemented in vec.c, add
21908 vec.o to linkage of gencfn-macros.
21909 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
21910 passing the info to record_node_allocation_statistics.
21911 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
21913 * ggc-common.c (struct ggc_usage): Add operator== and use
21914 it in operator< and compare function.
21915 * mem-stats.h (struct mem_usage): Likewise.
21916 * vec.c (struct vec_usage): Remove operator< and compare
21917 function. Can be simply inherited.
21919 2018-01-12 Martin Jambor <mjambor@suse.cz>
21922 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
21923 * tree-ssa-math-opts.c: Include domwalk.h.
21924 (convert_mult_to_fma_1): New function.
21925 (fma_transformation_info): New type.
21926 (fma_deferring_state): Likewise.
21927 (cancel_fma_deferring): New function.
21928 (result_of_phi): Likewise.
21929 (last_fma_candidate_feeds_initial_phi): Likewise.
21930 (convert_mult_to_fma): Added deferring logic, split actual
21931 transformation to convert_mult_to_fma_1.
21932 (math_opts_dom_walker): New type.
21933 (math_opts_dom_walker::after_dom_children): New method, body moved
21934 here from pass_optimize_widening_mul::execute, added deferring logic
21936 (pass_optimize_widening_mul::execute): Moved most of code to
21937 math_opts_dom_walker::after_dom_children.
21938 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
21939 * config/i386/i386.c (ix86_option_override_internal): Added
21940 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
21942 2018-01-12 Richard Biener <rguenther@suse.de>
21945 * dwarf2out.c (gen_variable_die): Do not reset old_die for
21946 inline instance vars.
21948 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
21951 * config/rx/rx.c (rx_is_restricted_memory_address):
21952 Handle SUBREG case.
21954 2018-01-12 Richard Biener <rguenther@suse.de>
21956 PR tree-optimization/80846
21957 * target.def (split_reduction): New target hook.
21958 * targhooks.c (default_split_reduction): New function.
21959 * targhooks.h (default_split_reduction): Declare.
21960 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
21961 target requests first reduce vectors by combining low and high
21963 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
21964 (get_vectype_for_scalar_type_and_size): Export.
21965 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
21966 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
21967 * doc/tm.texi: Regenerate.
21968 * config/i386/i386.c (ix86_split_reduction): Implement
21969 TARGET_VECTORIZE_SPLIT_REDUCTION.
21971 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21974 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
21975 in PIC mode except for TARGET_VXWORKS_RTP.
21976 * config/sparc/sparc.c: Include cfgrtl.h.
21977 (TARGET_INIT_PIC_REG): Define.
21978 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
21979 (sparc_pic_register_p): New predicate.
21980 (sparc_legitimate_address_p): Use it.
21981 (sparc_legitimize_pic_address): Likewise.
21982 (sparc_delegitimize_address): Likewise.
21983 (sparc_mode_dependent_address_p): Likewise.
21984 (gen_load_pcrel_sym): Remove 4th parameter.
21985 (load_got_register): Adjust call to above. Remove obsolete stuff.
21986 (sparc_expand_prologue): Do not call load_got_register here.
21987 (sparc_flat_expand_prologue): Likewise.
21988 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
21989 (sparc_use_pseudo_pic_reg): New function.
21990 (sparc_init_pic_reg): Likewise.
21991 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
21992 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
21994 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
21996 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
21997 Add item for branch_cost.
21999 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22001 PR rtl-optimization/83565
22002 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22003 not extend the result to a larger mode for rotate operations.
22004 (num_sign_bit_copies1): Likewise.
22006 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22009 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22011 Use values-Xc.o for -pedantic.
22012 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22014 2018-01-12 Martin Liska <mliska@suse.cz>
22017 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22019 (possible_polymorphic_call_targets): Use it.
22020 (ipa_devirt): Likewise.
22022 2018-01-12 Martin Liska <mliska@suse.cz>
22024 * profile-count.h (enum profile_quality): Use 0 as invalid
22025 enum value of profile_quality.
22027 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22029 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22030 -mext-string options.
22032 2018-01-12 Richard Biener <rguenther@suse.de>
22034 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22035 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22036 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22038 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22040 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22042 * configure.ac (--with-long-double-format): Add support for the
22043 configuration option to change the default long double format on
22045 * config.gcc (powerpc*-linux*-*): Likewise.
22046 * configure: Regenerate.
22047 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22048 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22049 used without modification.
22051 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22053 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22054 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22055 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22056 MISC_BUILTIN_SPEC_BARRIER.
22057 (rs6000_init_builtins): Likewise.
22058 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22060 (speculation_barrier): New define_insn.
22061 * doc/extend.texi: Document __builtin_speculation_barrier.
22063 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22066 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22067 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22068 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22070 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22071 integral modes instead of "ss" and "sd".
22072 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22073 vectors with 32-bit and 64-bit elements.
22074 (vecdupssescalarmodesuffix): New mode attribute.
22075 (vec_dup<mode>): Use it.
22077 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22080 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22081 frame if argument is passed on stack.
22083 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22086 * ree.c (combine_reaching_defs): Optimize also
22087 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22088 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22090 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22092 PR middle-end/83189
22093 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22095 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22097 PR middle-end/83718
22098 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22099 after they are computed.
22101 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22103 PR tree-optimization/83695
22104 * gimple-loop-linterchange.cc
22105 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22106 reset cached scev information after interchange.
22107 (pass_linterchange::execute): Remove call to scev_reset_htab.
22109 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22111 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22112 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22113 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22114 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22115 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22116 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22117 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22118 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22119 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22120 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22121 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22122 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22123 (V_lane_reg): Likewise.
22124 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22126 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22127 (vfmal_lane_low<mode>_intrinsic,
22128 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22129 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22130 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22131 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22132 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22133 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22135 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22137 * config/arm/arm-cpus.in (fp16fml): New feature.
22138 (ALL_SIMD): Add fp16fml.
22139 (armv8.2-a): Add fp16fml as an option.
22140 (armv8.3-a): Likewise.
22141 (armv8.4-a): Add fp16fml as part of fp16.
22142 * config/arm/arm.h (TARGET_FP16FML): Define.
22143 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22145 * config/arm/arm-modes.def (V2HF): Define.
22146 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22147 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22148 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22149 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22150 vfmsl_low, vfmsl_high): New set of builtins.
22151 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22152 (vfml_op): New code attribute.
22153 (VFMLHALVES): New int iterator.
22154 (VFML, VFMLSEL): New mode attributes.
22155 (V_reg): Define mapping for V2HF.
22156 (V_hi, V_lo): New mode attributes.
22157 (VF_constraint): Likewise.
22158 (vfml_half, vfml_half_selector): New int attributes.
22159 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22161 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22162 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22164 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22165 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22166 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22167 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22169 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22170 Document new effective target and option set.
22172 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22174 * config/arm/arm-cpus.in (armv8_4): New feature.
22175 (ARMv8_4a): New fgroup.
22176 (armv8.4-a): New arch.
22177 * config/arm/arm-tables.opt: Regenerate.
22178 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22179 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22180 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22181 Add matching rules for -march=armv8.4-a and extensions.
22182 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22184 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22187 * config/rx/rx.md (BW): New mode attribute.
22188 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22190 2018-01-11 Richard Biener <rguenther@suse.de>
22192 PR tree-optimization/83435
22193 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22194 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22195 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22197 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22198 Alan Hayward <alan.hayward@arm.com>
22199 David Sherwood <david.sherwood@arm.com>
22201 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22203 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22204 (aarch64_print_address_internal): Use it to check for a zero offset.
22206 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22207 Alan Hayward <alan.hayward@arm.com>
22208 David Sherwood <david.sherwood@arm.com>
22210 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22211 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22212 Return a poly_int64 rather than a HOST_WIDE_INT.
22213 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22214 rather than a HOST_WIDE_INT.
22215 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22216 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22217 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22218 final_offset from HOST_WIDE_INT to poly_int64.
22219 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22220 to_constant when getting the number of units in an Advanced SIMD
22222 (aarch64_builtin_vectorized_function): Check for a constant number
22224 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22226 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22227 attribute instead of GET_MODE_NUNITS.
22228 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22229 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22230 GET_MODE_SIZE for fixed-size registers.
22231 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22232 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22233 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22234 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22235 (aarch64_print_operand, aarch64_print_address_internal)
22236 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22237 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22238 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22239 Handle polynomial GET_MODE_SIZE.
22240 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22241 wider than SImode without modification.
22242 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22243 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22244 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22245 passing and returning SVE modes.
22246 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22247 rather than GEN_INT.
22248 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22249 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22250 (aarch64_allocate_and_probe_stack_space): Likewise.
22251 (aarch64_layout_frame): Cope with polynomial offsets.
22252 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22253 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22254 polynomial offsets.
22255 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22256 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22257 poly_int64 rather than a HOST_WIDE_INT.
22258 (aarch64_get_separate_components, aarch64_process_components)
22259 (aarch64_expand_prologue, aarch64_expand_epilogue)
22260 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22261 (aarch64_anchor_offset): New function, split out from...
22262 (aarch64_legitimize_address): ...here.
22263 (aarch64_builtin_vectorization_cost): Handle polynomial
22264 TYPE_VECTOR_SUBPARTS.
22265 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22267 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22268 number of elements from the PARALLEL rather than the mode.
22269 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22270 rather than GET_MODE_BITSIZE.
22271 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22272 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22273 (aarch64_expand_vec_perm_const_1): Handle polynomial
22274 d->perm.length () and d->perm elements.
22275 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
22276 Apply to_constant to d->perm elements.
22277 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22278 polynomial CONST_VECTOR_NUNITS.
22279 (aarch64_move_pointer): Take amount as a poly_int64 rather
22281 (aarch64_progress_pointer): Avoid temporary variable.
22282 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22283 the mode attribute instead of GET_MODE.
22285 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22286 Alan Hayward <alan.hayward@arm.com>
22287 David Sherwood <david.sherwood@arm.com>
22289 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22290 x exists before using it.
22291 (aarch64_add_constant_internal): Rename to...
22292 (aarch64_add_offset_1): ...this. Replace regnum with separate
22293 src and dest rtxes. Handle the case in which they're different,
22294 including when the offset is zero. Replace scratchreg with an rtx.
22295 Use 2 additions if there is no spare register into which we can
22296 move a 16-bit constant.
22297 (aarch64_add_constant): Delete.
22298 (aarch64_add_offset): Replace reg with separate src and dest
22299 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
22300 Use aarch64_add_offset_1.
22301 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22302 an rtx rather than an int. Take the delta as a poly_int64
22303 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
22304 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22305 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22306 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22307 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22308 and aarch64_add_sp.
22309 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22310 aarch64_add_constant.
22312 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22314 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22315 Use scalar_float_mode.
22317 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22319 * config/aarch64/aarch64-simd.md
22320 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22321 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22322 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22323 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22324 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22325 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22326 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22327 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22328 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22329 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22331 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22334 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22335 targ_options->x_arm_arch_string is non NULL.
22337 2018-01-11 Tamar Christina <tamar.christina@arm.com>
22339 * config/aarch64/aarch64.h
22340 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
22342 2018-01-11 Sudakshina Das <sudi.das@arm.com>
22345 * expmed.c (emit_store_flag_force): Swap if const op0
22346 and change VOIDmode to mode of op0.
22348 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22350 PR rtl-optimization/83761
22351 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22352 than bytes to mode_for_size.
22354 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22356 PR middle-end/83189
22357 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22358 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22361 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22363 PR middle-end/83575
22364 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22365 when in layout mode.
22366 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22367 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22370 2018-01-10 Michael Collison <michael.collison@arm.com>
22372 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22373 * config/aarch64/aarch64-option-extension.def: Add
22374 AARCH64_OPT_EXTENSION of 'fp16fml'.
22375 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22376 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22377 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22378 * config/aarch64/constraints.md (Ui7): New constraint.
22379 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22380 (VFMLA_SEL_W): Ditto.
22383 (VFMLA16_LOW): New int iterator.
22384 (VFMLA16_HIGH): Ditto.
22385 (UNSPEC_FMLAL): New unspec.
22386 (UNSPEC_FMLSL): Ditto.
22387 (UNSPEC_FMLAL2): Ditto.
22388 (UNSPEC_FMLSL2): Ditto.
22389 (f16mac): New code attribute.
22390 * config/aarch64/aarch64-simd-builtins.def
22391 (aarch64_fmlal_lowv2sf): Ditto.
22392 (aarch64_fmlsl_lowv2sf): Ditto.
22393 (aarch64_fmlalq_lowv4sf): Ditto.
22394 (aarch64_fmlslq_lowv4sf): Ditto.
22395 (aarch64_fmlal_highv2sf): Ditto.
22396 (aarch64_fmlsl_highv2sf): Ditto.
22397 (aarch64_fmlalq_highv4sf): Ditto.
22398 (aarch64_fmlslq_highv4sf): Ditto.
22399 (aarch64_fmlal_lane_lowv2sf): Ditto.
22400 (aarch64_fmlsl_lane_lowv2sf): Ditto.
22401 (aarch64_fmlal_laneq_lowv2sf): Ditto.
22402 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22403 (aarch64_fmlalq_lane_lowv4sf): Ditto.
22404 (aarch64_fmlsl_lane_lowv4sf): Ditto.
22405 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22406 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22407 (aarch64_fmlal_lane_highv2sf): Ditto.
22408 (aarch64_fmlsl_lane_highv2sf): Ditto.
22409 (aarch64_fmlal_laneq_highv2sf): Ditto.
22410 (aarch64_fmlsl_laneq_highv2sf): Ditto.
22411 (aarch64_fmlalq_lane_highv4sf): Ditto.
22412 (aarch64_fmlsl_lane_highv4sf): Ditto.
22413 (aarch64_fmlalq_laneq_highv4sf): Ditto.
22414 (aarch64_fmlsl_laneq_highv4sf): Ditto.
22415 * config/aarch64/aarch64-simd.md:
22416 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22417 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22418 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22419 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22420 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22421 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22422 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22423 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22424 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22425 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22426 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22427 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22428 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22429 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22430 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22431 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22432 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22433 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22434 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22435 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22436 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22437 (vfmlsl_low_u32): Ditto.
22438 (vfmlalq_low_u32): Ditto.
22439 (vfmlslq_low_u32): Ditto.
22440 (vfmlal_high_u32): Ditto.
22441 (vfmlsl_high_u32): Ditto.
22442 (vfmlalq_high_u32): Ditto.
22443 (vfmlslq_high_u32): Ditto.
22444 (vfmlal_lane_low_u32): Ditto.
22445 (vfmlsl_lane_low_u32): Ditto.
22446 (vfmlal_laneq_low_u32): Ditto.
22447 (vfmlsl_laneq_low_u32): Ditto.
22448 (vfmlalq_lane_low_u32): Ditto.
22449 (vfmlslq_lane_low_u32): Ditto.
22450 (vfmlalq_laneq_low_u32): Ditto.
22451 (vfmlslq_laneq_low_u32): Ditto.
22452 (vfmlal_lane_high_u32): Ditto.
22453 (vfmlsl_lane_high_u32): Ditto.
22454 (vfmlal_laneq_high_u32): Ditto.
22455 (vfmlsl_laneq_high_u32): Ditto.
22456 (vfmlalq_lane_high_u32): Ditto.
22457 (vfmlslq_lane_high_u32): Ditto.
22458 (vfmlalq_laneq_high_u32): Ditto.
22459 (vfmlslq_laneq_high_u32): Ditto.
22460 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22461 (AARCH64_FL_FOR_ARCH8_4): New.
22462 (AARCH64_ISA_F16FML): New ISA flag.
22463 (TARGET_F16FML): New feature flag for fp16fml.
22464 (doc/invoke.texi): Document new fp16fml option.
22466 2018-01-10 Michael Collison <michael.collison@arm.com>
22468 * config/aarch64/aarch64-builtins.c:
22469 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22470 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22471 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22472 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22473 (AARCH64_ISA_SHA3): New ISA flag.
22474 (TARGET_SHA3): New feature flag for sha3.
22475 * config/aarch64/iterators.md (sha512_op): New int attribute.
22476 (CRYPTO_SHA512): New int iterator.
22477 (UNSPEC_SHA512H): New unspec.
22478 (UNSPEC_SHA512H2): Ditto.
22479 (UNSPEC_SHA512SU0): Ditto.
22480 (UNSPEC_SHA512SU1): Ditto.
22481 * config/aarch64/aarch64-simd-builtins.def
22482 (aarch64_crypto_sha512hqv2di): New builtin.
22483 (aarch64_crypto_sha512h2qv2di): Ditto.
22484 (aarch64_crypto_sha512su0qv2di): Ditto.
22485 (aarch64_crypto_sha512su1qv2di): Ditto.
22486 (aarch64_eor3qv8hi): Ditto.
22487 (aarch64_rax1qv2di): Ditto.
22488 (aarch64_xarqv2di): Ditto.
22489 (aarch64_bcaxqv8hi): Ditto.
22490 * config/aarch64/aarch64-simd.md:
22491 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22492 (aarch64_crypto_sha512su0qv2di): Ditto.
22493 (aarch64_crypto_sha512su1qv2di): Ditto.
22494 (aarch64_eor3qv8hi): Ditto.
22495 (aarch64_rax1qv2di): Ditto.
22496 (aarch64_xarqv2di): Ditto.
22497 (aarch64_bcaxqv8hi): Ditto.
22498 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22499 (vsha512h2q_u64): Ditto.
22500 (vsha512su0q_u64): Ditto.
22501 (vsha512su1q_u64): Ditto.
22502 (veor3q_u16): Ditto.
22503 (vrax1q_u64): Ditto.
22504 (vxarq_u64): Ditto.
22505 (vbcaxq_u16): Ditto.
22506 * config/arm/types.md (crypto_sha512): New type attribute.
22507 (crypto_sha3): Ditto.
22508 (doc/invoke.texi): Document new sha3 option.
22510 2018-01-10 Michael Collison <michael.collison@arm.com>
22512 * config/aarch64/aarch64-builtins.c:
22513 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22514 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22515 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22516 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22517 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22518 (AARCH64_ISA_SM4): New ISA flag.
22519 (TARGET_SM4): New feature flag for sm4.
22520 * config/aarch64/aarch64-simd-builtins.def
22521 (aarch64_sm3ss1qv4si): Ditto.
22522 (aarch64_sm3tt1aq4si): Ditto.
22523 (aarch64_sm3tt1bq4si): Ditto.
22524 (aarch64_sm3tt2aq4si): Ditto.
22525 (aarch64_sm3tt2bq4si): Ditto.
22526 (aarch64_sm3partw1qv4si): Ditto.
22527 (aarch64_sm3partw2qv4si): Ditto.
22528 (aarch64_sm4eqv4si): Ditto.
22529 (aarch64_sm4ekeyqv4si): Ditto.
22530 * config/aarch64/aarch64-simd.md:
22531 (aarch64_sm3ss1qv4si): Ditto.
22532 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22533 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22534 (aarch64_sm4eqv4si): Ditto.
22535 (aarch64_sm4ekeyqv4si): Ditto.
22536 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22537 (sm3part_op): Ditto.
22538 (CRYPTO_SM3TT): Ditto.
22539 (CRYPTO_SM3PART): Ditto.
22540 (UNSPEC_SM3SS1): New unspec.
22541 (UNSPEC_SM3TT1A): Ditto.
22542 (UNSPEC_SM3TT1B): Ditto.
22543 (UNSPEC_SM3TT2A): Ditto.
22544 (UNSPEC_SM3TT2B): Ditto.
22545 (UNSPEC_SM3PARTW1): Ditto.
22546 (UNSPEC_SM3PARTW2): Ditto.
22547 (UNSPEC_SM4E): Ditto.
22548 (UNSPEC_SM4EKEY): Ditto.
22549 * config/aarch64/constraints.md (Ui2): New constraint.
22550 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22551 * config/arm/types.md (crypto_sm3): New type attribute.
22552 (crypto_sm4): Ditto.
22553 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22554 (vsm3tt1aq_u32): Ditto.
22555 (vsm3tt1bq_u32): Ditto.
22556 (vsm3tt2aq_u32): Ditto.
22557 (vsm3tt2bq_u32): Ditto.
22558 (vsm3partw1q_u32): Ditto.
22559 (vsm3partw2q_u32): Ditto.
22560 (vsm4eq_u32): Ditto.
22561 (vsm4ekeyq_u32): Ditto.
22562 (doc/invoke.texi): Document new sm4 option.
22564 2018-01-10 Michael Collison <michael.collison@arm.com>
22566 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22567 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22568 (AARCH64_FL_FOR_ARCH8_4): New.
22569 (AARCH64_FL_V8_4): New flag.
22570 (doc/invoke.texi): Document new armv8.4-a option.
22572 2018-01-10 Michael Collison <michael.collison@arm.com>
22574 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22575 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22576 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22577 * config/aarch64/aarch64-option-extension.def: Add
22578 AARCH64_OPT_EXTENSION of 'sha2'.
22579 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22580 (crypto): Disable sha2 and aes if crypto disabled.
22581 (crypto): Enable aes and sha2 if enabled.
22582 (simd): Disable sha2 and aes if simd disabled.
22583 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22585 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22586 (TARGET_SHA2): New feature flag for sha2.
22587 (TARGET_AES): New feature flag for aes.
22588 * config/aarch64/aarch64-simd.md:
22589 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22590 conditional on TARGET_AES.
22591 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22592 (aarch64_crypto_sha1hsi): Make pattern conditional
22594 (aarch64_crypto_sha1hv4si): Ditto.
22595 (aarch64_be_crypto_sha1hv4si): Ditto.
22596 (aarch64_crypto_sha1su1v4si): Ditto.
22597 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22598 (aarch64_crypto_sha1su0v4si): Ditto.
22599 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22600 (aarch64_crypto_sha256su0v4si): Ditto.
22601 (aarch64_crypto_sha256su1v4si): Ditto.
22602 (doc/invoke.texi): Document new aes and sha2 options.
22604 2018-01-10 Martin Sebor <msebor@redhat.com>
22606 PR tree-optimization/83781
22607 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22610 2018-01-11 Martin Sebor <msebor@gmail.com>
22611 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22613 PR tree-optimization/83501
22614 PR tree-optimization/81703
22616 * tree-ssa-strlen.c (get_string_cst): Rename...
22617 (get_string_len): ...to this. Handle global constants.
22618 (handle_char_store): Adjust.
22620 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
22621 Jim Wilson <jimw@sifive.com>
22623 * config/riscv/riscv-protos.h (riscv_output_return): New.
22624 * config/riscv/riscv.c (struct machine_function): New naked_p field.
22625 (riscv_attribute_table, riscv_output_return),
22626 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22627 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22628 (riscv_compute_frame_info): Only compute frame->mask if not a naked
22630 (riscv_expand_prologue): Add early return for naked function.
22631 (riscv_expand_epilogue): Likewise.
22632 (riscv_function_ok_for_sibcall): Return false for naked function.
22633 (riscv_set_current_function): New.
22634 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22635 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22636 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22637 * doc/extend.texi (RISC-V Function Attributes): New.
22639 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
22641 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22642 check for 128-bit long double before checking TCmode.
22643 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22644 128-bit long doubles before checking TFmode or TCmode.
22645 (FLOAT128_IBM_P): Likewise.
22647 2018-01-10 Martin Sebor <msebor@redhat.com>
22649 PR tree-optimization/83671
22650 * builtins.c (c_strlen): Unconditionally return zero for the empty
22652 Use -Warray-bounds for warnings.
22653 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22654 for non-constant array indices with COMPONENT_REF, arrays of
22655 arrays, and pointers to arrays.
22656 (gimple_fold_builtin_strlen): Determine and set length range for
22657 non-constant character arrays.
22659 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
22661 PR middle-end/81897
22662 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22665 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
22667 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22669 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22672 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22673 VECTOR_MEM_ALTIVEC_OR_VSX_P.
22674 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22675 indexed_or_indirect_operand predicate.
22676 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22677 (*vsx_le_perm_load_v8hi): Likewise.
22678 (*vsx_le_perm_load_v16qi): Likewise.
22679 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22680 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22681 (*vsx_le_perm_store_v8hi): Likewise.
22682 (*vsx_le_perm_store_v16qi): Likewise.
22683 (eight unnamed splitters): Likewise.
22685 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22687 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22688 * config/rs6000/emmintrin.h: Likewise.
22689 * config/rs6000/mmintrin.h: Likewise.
22690 * config/rs6000/xmmintrin.h: Likewise.
22692 2018-01-10 David Malcolm <dmalcolm@redhat.com>
22695 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22697 * tree.c (tree_nop_conversion): Return true for location wrapper
22699 (maybe_wrap_with_location): New function.
22700 (selftest::check_strip_nops): New function.
22701 (selftest::test_location_wrappers): New function.
22702 (selftest::tree_c_tests): Call it.
22703 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22704 (maybe_wrap_with_location): New decl.
22705 (EXPR_LOCATION_WRAPPER_P): New macro.
22706 (location_wrapper_p): New inline function.
22707 (tree_strip_any_location_wrapper): New inline function.
22709 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
22712 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22713 stack_realign_offset for the largest alignment of stack slot
22715 (ix86_find_max_used_stack_alignment): New function.
22716 (ix86_finalize_stack_frame_flags): Use it. Set
22717 max_used_stack_alignment if we don't realign stack.
22718 * config/i386/i386.h (machine_function): Add
22719 max_used_stack_alignment.
22721 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
22723 * config/arm/arm.opt (-mbranch-cost): New option.
22724 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
22727 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
22730 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
22731 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
22733 2018-01-10 Richard Biener <rguenther@suse.de>
22736 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
22737 early out so it also covers the case where we have a non-NULL
22740 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22742 PR tree-optimization/83753
22743 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
22744 for non-strided grouped accesses if the number of elements is 1.
22746 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22749 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22750 * i386.h (TARGET_USE_GATHER): Define.
22751 * x86-tune.def (X86_TUNE_USE_GATHER): New.
22753 2018-01-10 Martin Liska <mliska@suse.cz>
22756 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22757 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22759 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22760 CLEANUP_NO_PARTITIONING is not set.
22762 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22764 * doc/rtl.texi: Remove documentation of (const ...) wrappers
22765 for vectors, as a partial revert of r254296.
22766 * rtl.h (const_vec_p): Delete.
22767 (const_vec_duplicate_p): Don't test for vector CONSTs.
22768 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22769 * expmed.c (make_tree): Likewise.
22772 * common.md (E, F): Use CONSTANT_P instead of checking for
22774 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22775 checking for CONST_VECTOR.
22777 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22779 PR middle-end/83575
22780 * predict.c (force_edge_cold): Handle in more sane way edges
22781 with no prediction.
22783 2018-01-09 Carl Love <cel@us.ibm.com>
22785 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22787 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22788 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22789 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22790 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
22791 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22792 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
22793 * config/rs6000/rs6000-protos.h: Add extern defition for
22794 rs6000_generate_float2_double_code.
22795 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22797 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22798 (float2_v2df): Add define_expand.
22800 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
22803 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22804 op_mode in the force_to_mode call.
22806 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22808 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
22809 instead of checking each element individually.
22810 (aarch64_evpc_uzp): Likewise.
22811 (aarch64_evpc_zip): Likewise.
22812 (aarch64_evpc_ext): Likewise.
22813 (aarch64_evpc_rev): Likewise.
22814 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
22815 instead of checking each element individually. Return true without
22817 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
22818 whether all selected elements come from the same input, instead of
22819 checking each element individually. Remove calls to gen_rtx_REG,
22820 start_sequence and end_sequence and instead assert that no rtl is
22823 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22825 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
22826 order of HIGH and CONST checks.
22828 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22830 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
22831 if the destination isn't an SSA_NAME.
22833 2018-01-09 Richard Biener <rguenther@suse.de>
22835 PR tree-optimization/83668
22836 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
22838 (canonicalize_loop_form): ... here, renamed from ...
22839 (canonicalize_loop_closed_ssa_form): ... this and amended to
22840 swap successor edges for loop exit blocks to make us use
22841 the RPO order we need for initial schedule generation.
22843 2018-01-09 Joseph Myers <joseph@codesourcery.com>
22845 PR tree-optimization/64811
22846 * match.pd: When optimizing comparisons with Inf, avoid
22847 introducing or losing exceptions from comparisons with NaN.
22849 2018-01-09 Martin Liska <mliska@suse.cz>
22852 * asan.c (shadow_mem_size): Add gcc_assert.
22854 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
22856 Don't save registers in main().
22859 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
22860 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
22861 * config/avr/avr.c (avr_set_current_function): Don't error if
22862 naked, OS_task or OS_main are specified at the same time.
22863 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
22865 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
22867 * common/config/avr/avr-common.c (avr_option_optimization_table):
22868 Switch on -mmain-is-OS_task for optimizing compilations.
22870 2018-01-09 Richard Biener <rguenther@suse.de>
22872 PR tree-optimization/83572
22873 * graphite.c: Include cfganal.h.
22874 (graphite_transform_loops): Connect infinite loops to exit
22875 and remove fake edges at the end.
22877 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22879 * ipa-inline.c (edge_badness): Revert accidental checkin.
22881 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22884 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
22885 symbols; not inline clones.
22887 2018-01-09 Jakub Jelinek <jakub@redhat.com>
22890 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
22891 hard registers. Formatting fixes.
22893 PR preprocessor/83722
22894 * gcc.c (try_generate_repro): Pass
22895 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
22896 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22899 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
22900 Kito Cheng <kito.cheng@gmail.com>
22902 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
22903 (riscv_leaf_function_p): Delete.
22904 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
22906 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22908 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
22910 (do_ifelse): New function.
22911 (do_isel): New function.
22912 (do_sub3): New function.
22913 (do_add3): New function.
22914 (do_load_mask_compare): New function.
22915 (do_overlap_load_compare): New function.
22916 (expand_compare_loop): New function.
22917 (expand_block_compare): Call expand_compare_loop() when appropriate.
22918 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
22919 option description.
22920 (-mblock-compare-inline-loop-limit): New option.
22922 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22925 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
22926 Reverse order of second and third operands in first alternative.
22927 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
22928 of first and second elements in UNSPEC_VPERMR vector.
22929 (altivec_expand_vec_perm_le): Likewise.
22931 2018-01-08 Jeff Law <law@redhat.com>
22933 PR rtl-optimizatin/81308
22934 * tree-switch-conversion.c (cfg_altered): New file scoped static.
22935 (process_switch): If group_case_labels makes a change, then set
22937 (pass_convert_switch::execute): If a switch is converted, then
22938 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
22940 PR rtl-optimization/81308
22941 * recog.c (split_all_insns): Conditionally cleanup the CFG after
22944 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
22946 PR target/83663 - Revert r255946
22947 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
22948 generation for cases where splatting a value is not useful.
22949 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
22950 across a vec_duplicate and a paradoxical subreg forming a vector
22951 mode to a vec_concat.
22953 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22955 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
22956 -march=armv8.3-a variants.
22957 * config/arm/t-multilib: Likewise.
22958 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
22960 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22962 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
22964 (cceq_ior_compare_complement): Give it a name so I can use it, and
22965 change boolean_or_operator predicate to boolean_operator so it can
22966 be used to generate a crand.
22967 (eqne): New code iterator.
22968 (bd/bd_neg): New code_attrs.
22969 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
22970 a single define_insn.
22971 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
22972 decrement (bdnzt/bdnzf/bdzt/bdzf).
22973 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
22974 with the new names of the branch decrement patterns, and added the
22975 names of the branch decrement conditional patterns.
22977 2018-01-08 Richard Biener <rguenther@suse.de>
22979 PR tree-optimization/83563
22980 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
22983 2018-01-08 Richard Biener <rguenther@suse.de>
22985 PR middle-end/83713
22986 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
22988 2018-01-08 Richard Biener <rguenther@suse.de>
22990 PR tree-optimization/83685
22991 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
22992 references to abnormals.
22994 2018-01-08 Richard Biener <rguenther@suse.de>
22997 * dwarf2out.c (output_indirect_strings): Handle empty
22998 skeleton_debug_str_hash.
22999 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23001 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23003 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23004 (emit_store_direct): Likewise.
23005 (arc_trampoline_adjust_address): Likewise.
23006 (arc_asm_trampoline_template): New function.
23007 (arc_initialize_trampoline): Use asm_trampoline_template.
23008 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23009 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23010 * config/arc/arc.md (flush_icache): Delete pattern.
23012 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23014 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23015 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23018 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23021 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23022 by not USED_FOR_TARGET.
23023 (make_pass_resolve_sw_modes): Likewise.
23025 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23027 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23030 2018-01-08 Richard Biener <rguenther@suse.de>
23032 PR middle-end/83580
23033 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23035 2018-01-08 Richard Biener <rguenther@suse.de>
23037 PR middle-end/83517
23038 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23040 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23042 PR middle-end/81897
23043 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23044 basic blocks with a small number of successors.
23045 (convert_control_dep_chain_into_preds): Improve handling of
23047 (dump_predicates): Split apart into...
23048 (dump_pred_chain): ...here...
23049 (dump_pred_info): ...and here.
23050 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23051 (can_chain_union_be_invalidated_p): Improve check for invalidation
23053 (uninit_uses_cannot_happen): Avoid unnecessary if
23054 convert_control_dep_chain_into_preds yielded nothing.
23056 2018-01-06 Martin Sebor <msebor@redhat.com>
23058 PR tree-optimization/83640
23059 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23060 subtracting negative offset from size.
23061 (builtin_access::overlap): Adjust offset bounds of the access to fall
23062 within the size of the object if possible.
23064 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23066 PR rtl-optimization/83699
23067 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23068 extract_bit_field_as_subreg to cases in which the extracted
23069 value is also a vector.
23071 * lra-constraints.c (process_alt_operands): Test for the equivalence
23072 substitutions when detecting a possible reload cycle.
23074 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23077 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23078 by default if flag_selective_schedling{,2}. Formatting fixes.
23080 PR rtl-optimization/83682
23081 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23082 if it has non-VECTOR_MODE element mode.
23083 (vec_duplicate_p): Likewise.
23085 PR middle-end/83694
23086 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23087 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23089 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23092 * config/i386/i386-builtin.def
23093 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23094 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23095 Require also OPTION_MASK_ISA_AVX512F in addition to
23096 OPTION_MASK_ISA_GFNI.
23097 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23098 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23099 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23100 to OPTION_MASK_ISA_GFNI.
23101 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23102 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23103 OPTION_MASK_ISA_AVX512BW.
23104 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23105 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23106 addition to OPTION_MASK_ISA_GFNI.
23107 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23108 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23109 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23110 to OPTION_MASK_ISA_GFNI.
23111 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23112 a requirement for all ISAs rather than any of them with a few
23114 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23116 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23117 bitmasks to be enabled with 3 exceptions, instead of requiring any
23118 enabled ISA with lots of exceptions.
23119 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23120 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23121 Change avx512bw in isa attribute to avx512f.
23122 * config/i386/sgxintrin.h: Add license boilerplate.
23123 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23124 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23125 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23126 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23128 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23129 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23130 temporarily sse2 rather than sse if not enabled already.
23133 * config/i386/sse.md (VI248_VLBW): Rename to ...
23134 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23135 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23136 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23137 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23138 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23139 mode iterator instead of VI248_VLBW.
23141 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23143 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23144 (record_modified): Skip clobbers; add debug output.
23145 (param_change_prob): Use sreal frequencies.
23147 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23149 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23150 punt for user-aligned variables.
23152 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23154 * tree-chrec.c (chrec_contains_symbols): Return true for
23157 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23160 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23161 of (x|y) == x for BICS pattern.
23163 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23165 PR tree-optimization/83605
23166 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23167 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23170 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23172 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23173 * config/epiphany/rtems.h: New file.
23175 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23176 Uros Bizjak <ubizjak@gmail.com>
23179 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23180 QIreg_operand instead of register_operand predicate.
23181 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23182 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23183 comments instead of -fmitigate[-_]rop.
23185 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23188 * cgraphunit.c (symbol_table::compile): Switch to text_section
23189 before calling assembly_start debug hook.
23190 * run-rtl-passes.c (run_rtl_passes): Likewise.
23193 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23195 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23196 range_int_cst_p rather than !symbolic_range_p before calling
23197 extract_range_from_multiplicative_op_1.
23199 2018-01-04 Jeff Law <law@redhat.com>
23201 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23202 redundant test in assertion.
23204 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23206 * doc/rtl.texi: Document machine_mode wrapper classes.
23208 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23210 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23211 using tree_to_uhwi.
23213 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23215 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23216 the VEC_PERM_EXPR fold to fail.
23218 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23221 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23222 to switched_sections.
23224 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23227 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23228 test for d.testing.
23230 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23233 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23234 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23236 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23239 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23240 is BLKmode and bitpos not zero or mode change is needed.
23242 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23245 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23248 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23251 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23252 instead of MULT rtx. Update all corresponding splitters.
23253 (*saddl_se): Ditto.
23254 (*ssub<modesuffix>): Ditto.
23255 (*ssubl_se): Ditto.
23256 (*cmp_sadd_di): Update split patterns.
23257 (*cmp_sadd_si): Ditto.
23258 (*cmp_sadd_sidi): Ditto.
23259 (*cmp_ssub_di): Ditto.
23260 (*cmp_ssub_si): Ditto.
23261 (*cmp_ssub_sidi): Ditto.
23262 * config/alpha/predicates.md (const23_operand): New predicate.
23263 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23264 Look for ASHIFT, not MULT inner operand.
23265 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23267 2018-01-04 Martin Liska <mliska@suse.cz>
23269 PR gcov-profile/83669
23270 * gcov.c (output_intermediate_file): Add version to intermediate
23272 * doc/gcov.texi: Document new field 'version' in intermediate
23273 file format. Fix location of '-k' option of gcov command.
23275 2018-01-04 Martin Liska <mliska@suse.cz>
23278 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23280 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23282 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23284 2018-01-03 Martin Sebor <msebor@redhat.com>
23286 PR tree-optimization/83655
23287 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23288 checking calls with invalid arguments.
23290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23292 * tree-vect-stmts.c (vect_get_store_rhs): New function.
23293 (vectorizable_mask_load_store): Delete.
23294 (vectorizable_call): Return false for masked loads and stores.
23295 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
23296 instead of gimple_assign_rhs1.
23297 (vectorizable_load): Handle IFN_MASK_LOAD.
23298 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23300 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23302 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23304 (vectorizable_mask_load_store): ...here.
23305 (vectorizable_load): ...and here.
23307 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23309 * tree-vect-stmts.c (vect_build_all_ones_mask)
23310 (vect_build_zero_merge_argument): New functions, split out from...
23311 (vectorizable_load): ...here.
23313 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23315 * tree-vect-stmts.c (vect_check_store_rhs): New function,
23317 (vectorizable_mask_load_store): ...here.
23318 (vectorizable_store): ...and here.
23320 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23322 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23324 (vectorizable_mask_load_store): ...here.
23326 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23328 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23329 (vect_model_store_cost): Take a vec_load_store_type instead of a
23331 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23332 (vect_model_store_cost): Take a vec_load_store_type instead of a
23334 (vectorizable_mask_load_store): Update accordingly.
23335 (vectorizable_store): Likewise.
23336 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23338 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23340 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23341 IFN_MASK_LOAD calls here rather than...
23342 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23344 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23345 Alan Hayward <alan.hayward@arm.com>
23346 David Sherwood <david.sherwood@arm.com>
23348 * expmed.c (extract_bit_field_1): For vector extracts,
23349 fall back to extract_bit_field_as_subreg if vec_extract
23352 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23353 Alan Hayward <alan.hayward@arm.com>
23354 David Sherwood <david.sherwood@arm.com>
23356 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23357 they are variable or constant sized.
23358 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23359 slots for constant-sized data.
23361 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23362 Alan Hayward <alan.hayward@arm.com>
23363 David Sherwood <david.sherwood@arm.com>
23365 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23366 handling COND_EXPRs with boolean comparisons, try to find a better
23367 basis for the mask type than the boolean itself.
23369 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23371 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23372 is calculated and how it can be overridden.
23373 * genmodes.c (max_bitsize_mode_any_mode): New variable.
23374 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23376 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23379 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23380 Alan Hayward <alan.hayward@arm.com>
23381 David Sherwood <david.sherwood@arm.com>
23383 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23384 Remove the mode argument.
23385 (aarch64_simd_valid_immediate): Remove the mode and inverse
23387 * config/aarch64/iterators.md (bitsize): New iterator.
23388 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23389 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23390 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23391 aarch64_simd_valid_immediate.
23392 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23393 (aarch64_reg_or_bic_imm): Likewise.
23394 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23395 with an insn_type enum and msl with a modifier_type enum.
23396 Replace element_width with a scalar_mode. Change the shift
23397 to unsigned int. Add constructors for scalar_float_mode and
23398 scalar_int_mode elements.
23399 (aarch64_vect_float_const_representable_p): Delete.
23400 (aarch64_can_const_movi_rtx_p)
23401 (aarch64_simd_scalar_immediate_valid_for_move)
23402 (aarch64_simd_make_constant): Update call to
23403 aarch64_simd_valid_immediate.
23404 (aarch64_advsimd_valid_immediate_hs): New function.
23405 (aarch64_advsimd_valid_immediate): Likewise.
23406 (aarch64_simd_valid_immediate): Remove mode and inverse
23407 arguments. Rewrite to use the above. Use const_vec_duplicate_p
23408 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23409 and aarch64_float_const_representable_p on the result.
23410 (aarch64_output_simd_mov_immediate): Remove mode argument.
23411 Update call to aarch64_simd_valid_immediate and use of
23412 simd_immediate_info.
23413 (aarch64_output_scalar_simd_mov_immediate): Update call
23416 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23417 Alan Hayward <alan.hayward@arm.com>
23418 David Sherwood <david.sherwood@arm.com>
23420 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23421 (mode_nunits): Likewise CONST_MODE_NUNITS.
23422 * machmode.def (ADJUST_NUNITS): Document.
23423 * genmodes.c (mode_data::need_nunits_adj): New field.
23424 (blank_mode): Update accordingly.
23425 (adj_nunits): New variable.
23426 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23428 (emit_mode_size_inline): Set need_bytesize_adj for all modes
23429 listed in adj_nunits.
23430 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23431 listed in adj_nunits. Don't emit case statements for such modes.
23432 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23433 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
23434 nothing if adj_nunits is nonnull.
23435 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23436 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23437 (emit_mode_fbit): Update use of print_maybe_const_decl.
23438 (emit_move_size): Likewise. Treat the array as non-const
23440 (emit_mode_adjustments): Handle adj_nunits.
23442 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23444 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23445 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23446 (VECTOR_MODES): Use it.
23447 (make_vector_modes): Take the prefix as an argument.
23449 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23450 Alan Hayward <alan.hayward@arm.com>
23451 David Sherwood <david.sherwood@arm.com>
23453 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23454 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23455 for MODE_VECTOR_BOOL.
23456 * machmode.def (VECTOR_BOOL_MODE): Document.
23457 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23458 (make_vector_bool_mode): New function.
23459 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23461 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23462 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23464 * stor-layout.c (int_mode_for_mode): Likewise.
23465 * tree.c (build_vector_type_for_mode): Likewise.
23466 * varasm.c (output_constant_pool_2): Likewise.
23467 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23468 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
23469 for MODE_VECTOR_BOOL.
23470 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23471 of mode class checks.
23472 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23473 instead of a list of mode class checks.
23474 (expand_vector_scalar_condition): Likewise.
23475 (type_for_widest_vector_mode): Handle BImode as an inner mode.
23477 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23478 Alan Hayward <alan.hayward@arm.com>
23479 David Sherwood <david.sherwood@arm.com>
23481 * machmode.h (mode_size): Change from unsigned short to
23483 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23484 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23485 or if measurement_type is not polynomial.
23486 (fixed_size_mode::includes_p): Check for constant-sized modes.
23487 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23488 return a poly_uint16 rather than an unsigned short.
23489 (emit_mode_size): Change the type of mode_size from unsigned short
23490 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
23491 (emit_mode_adjustments): Cope with polynomial vector sizes.
23492 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23494 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23496 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23497 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23498 * caller-save.c (setup_save_areas): Likewise.
23499 (replace_reg_with_saved_mem): Likewise.
23500 * calls.c (emit_library_call_value_1): Likewise.
23501 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23502 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23503 (gen_lowpart_for_combine): Likewise.
23504 * convert.c (convert_to_integer_1): Likewise.
23505 * cse.c (equiv_constant, cse_insn): Likewise.
23506 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23507 (cselib_subst_to_values): Likewise.
23508 * dce.c (word_dce_process_block): Likewise.
23509 * df-problems.c (df_word_lr_mark_ref): Likewise.
23510 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23511 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23512 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23513 (rtl_for_decl_location): Likewise.
23514 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23515 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23516 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23517 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23518 (expand_expr_real_1): Likewise.
23519 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23520 (pad_below): Likewise.
23521 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23522 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23523 * ira.c (get_subreg_tracking_sizes): Likewise.
23524 * ira-build.c (ira_create_allocno_objects): Likewise.
23525 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23526 (ira_sort_regnos_for_alter_reg): Likewise.
23527 * ira-costs.c (record_operand_costs): Likewise.
23528 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23529 (resolve_simple_move): Likewise.
23530 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23531 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23532 (lra_constraints): Likewise.
23533 (CONST_POOL_OK_P): Reject variable-sized modes.
23534 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23535 (add_pseudo_to_slot, lra_spill): Likewise.
23536 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23537 * optabs-query.c (get_best_extraction_insn): Likewise.
23538 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23539 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23540 (expand_mult_highpart, valid_multiword_target_p): Likewise.
23541 * recog.c (offsettable_address_addr_space_p): Likewise.
23542 * regcprop.c (maybe_mode_change): Likewise.
23543 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23544 * regrename.c (build_def_use): Likewise.
23545 * regstat.c (dump_reg_info): Likewise.
23546 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23547 (find_reloads, find_reloads_subreg_address): Likewise.
23548 * reload1.c (eliminate_regs_1): Likewise.
23549 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23550 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23551 (simplify_binary_operation_1, simplify_subreg): Likewise.
23552 * targhooks.c (default_function_arg_padding): Likewise.
23553 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23554 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23555 (verify_gimple_assign_ternary): Likewise.
23556 * tree-inline.c (estimate_move_cost): Likewise.
23557 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23558 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23559 (get_address_cost_ainc): Likewise.
23560 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23561 (vect_supportable_dr_alignment): Likewise.
23562 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23563 (vectorizable_reduction): Likewise.
23564 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23565 (vectorizable_operation, vectorizable_load): Likewise.
23566 * tree.c (build_same_sized_truth_vector_type): Likewise.
23567 * valtrack.c (cleanup_auto_inc_dec): Likewise.
23568 * var-tracking.c (emit_note_insn_var_location): Likewise.
23569 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23570 (ADDR_VEC_ALIGN): Likewise.
23572 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23573 Alan Hayward <alan.hayward@arm.com>
23574 David Sherwood <david.sherwood@arm.com>
23576 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23578 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23579 or if measurement_type is polynomial.
23580 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23581 * combine.c (make_extraction): Likewise.
23582 * dse.c (find_shift_sequence): Likewise.
23583 * dwarf2out.c (mem_loc_descriptor): Likewise.
23584 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23585 (extract_bit_field, extract_low_bits): Likewise.
23586 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23587 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23588 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23589 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23590 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23591 * reload.c (find_reloads): Likewise.
23592 * reload1.c (alter_reg): Likewise.
23593 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23594 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23595 * tree-if-conv.c (predicate_mem_writes): Likewise.
23596 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23597 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23598 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23599 * valtrack.c (dead_debug_insert_temp): Likewise.
23600 * varasm.c (mergeable_constant_section): Likewise.
23601 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23603 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23604 Alan Hayward <alan.hayward@arm.com>
23605 David Sherwood <david.sherwood@arm.com>
23607 * expr.c (expand_assignment): Cope with polynomial mode sizes
23608 when assigning to a CONCAT.
23610 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23611 Alan Hayward <alan.hayward@arm.com>
23612 David Sherwood <david.sherwood@arm.com>
23614 * machmode.h (mode_precision): Change from unsigned short to
23616 (mode_to_precision): Return a poly_uint16 rather than an unsigned
23618 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23619 or if measurement_type is not polynomial.
23620 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
23621 in which the mode is already known to be a scalar_int_mode.
23622 * genmodes.c (emit_mode_precision): Change the type of mode_precision
23623 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
23625 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23626 for GET_MODE_PRECISION.
23627 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23628 for GET_MODE_PRECISION.
23629 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23631 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23632 (expand_field_assignment, make_extraction): Likewise.
23633 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23634 (get_last_value): Likewise.
23635 * convert.c (convert_to_integer_1): Likewise.
23636 * cse.c (cse_insn): Likewise.
23637 * expr.c (expand_expr_real_1): Likewise.
23638 * lra-constraints.c (simplify_operand_subreg): Likewise.
23639 * optabs-query.c (can_atomic_load_p): Likewise.
23640 * optabs.c (expand_atomic_load): Likewise.
23641 (expand_atomic_store): Likewise.
23642 * ree.c (combine_reaching_defs): Likewise.
23643 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23644 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23645 * tree.h (type_has_mode_precision_p): Likewise.
23646 * ubsan.c (instrument_si_overflow): Likewise.
23648 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23649 Alan Hayward <alan.hayward@arm.com>
23650 David Sherwood <david.sherwood@arm.com>
23652 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23653 polynomial numbers of units.
23654 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23655 (valid_vector_subparts_p): New function.
23656 (build_vector_type): Remove temporary shim and take the number
23657 of units as a poly_uint64 rather than an int.
23658 (build_opaque_vector_type): Take the number of units as a
23659 poly_uint64 rather than an int.
23660 * tree.c (build_vector_from_ctor): Handle polynomial
23661 TYPE_VECTOR_SUBPARTS.
23662 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23663 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23664 (build_vector_from_val): If the number of units is variable,
23665 use build_vec_duplicate_cst for constant operands and
23666 VEC_DUPLICATE_EXPR otherwise.
23667 (make_vector_type): Remove temporary is_constant ().
23668 (build_vector_type, build_opaque_vector_type): Take the number of
23669 units as a poly_uint64 rather than an int.
23670 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23672 * cfgexpand.c (expand_debug_expr): Likewise.
23673 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23674 (store_constructor, expand_expr_real_1): Likewise.
23675 (const_scalar_mask_from_tree): Likewise.
23676 * fold-const-call.c (fold_const_reduction): Likewise.
23677 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23678 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23679 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23680 (fold_relational_const): Likewise.
23681 (native_interpret_vector): Likewise. Change the size from an
23682 int to an unsigned int.
23683 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23684 TYPE_VECTOR_SUBPARTS.
23685 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23686 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23687 duplicating a non-constant operand into a variable-length vector.
23688 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23689 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23690 * ipa-icf.c (sem_variable::equals): Likewise.
23691 * match.pd: Likewise.
23692 * omp-simd-clone.c (simd_clone_subparts): Likewise.
23693 * print-tree.c (print_node): Likewise.
23694 * stor-layout.c (layout_type): Likewise.
23695 * targhooks.c (default_builtin_vectorization_cost): Likewise.
23696 * tree-cfg.c (verify_gimple_comparison): Likewise.
23697 (verify_gimple_assign_binary): Likewise.
23698 (verify_gimple_assign_ternary): Likewise.
23699 (verify_gimple_assign_single): Likewise.
23700 * tree-pretty-print.c (dump_generic_node): Likewise.
23701 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23702 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23703 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23704 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23705 (vect_shift_permute_load_chain): Likewise.
23706 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23707 (expand_vector_condition, optimize_vector_constructor): Likewise.
23708 (lower_vec_perm, get_compute_type): Likewise.
23709 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23710 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23711 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23712 (vect_recog_mask_conversion_pattern): Likewise.
23713 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23714 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23715 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23716 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23717 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23718 (vectorizable_shift, vectorizable_operation, vectorizable_store)
23719 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
23720 (supportable_widening_operation): Likewise.
23721 (supportable_narrowing_operation): Likewise.
23722 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
23724 * varasm.c (output_constant): Likewise.
23726 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23727 Alan Hayward <alan.hayward@arm.com>
23728 David Sherwood <david.sherwood@arm.com>
23730 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
23731 so that both the length == 3 and length != 3 cases set up their
23732 own permute vectors. Add comments explaining why we know the
23733 number of elements is constant.
23734 (vect_permute_load_chain): Likewise.
23736 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23737 Alan Hayward <alan.hayward@arm.com>
23738 David Sherwood <david.sherwood@arm.com>
23740 * machmode.h (mode_nunits): Change from unsigned char to
23742 (ONLY_FIXED_SIZE_MODES): New macro.
23743 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
23744 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
23745 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23747 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23748 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23749 or if measurement_type is not polynomial.
23750 * genmodes.c (ZERO_COEFFS): New macro.
23751 (emit_mode_nunits_inline): Make mode_nunits_inline return a
23753 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23754 Use ZERO_COEFFS when emitting initializers.
23755 * data-streamer.h (bp_pack_poly_value): New function.
23756 (bp_unpack_poly_value): Likewise.
23757 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23758 for GET_MODE_NUNITS.
23759 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23760 for GET_MODE_NUNITS.
23761 * tree.c (make_vector_type): Remove temporary shim and make
23762 the real function take the number of units as a poly_uint64
23763 rather than an int.
23764 (build_vector_type_for_mode): Handle polynomial nunits.
23765 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23766 * emit-rtl.c (const_vec_series_p_1): Likewise.
23767 (gen_rtx_CONST_VECTOR): Likewise.
23768 * fold-const.c (test_vec_duplicate_folding): Likewise.
23769 * genrecog.c (validate_pattern): Likewise.
23770 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23771 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23772 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23773 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23774 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23775 * rtlanal.c (subreg_get_info): Likewise.
23776 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23777 (vect_grouped_load_supported): Likewise.
23778 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23779 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23780 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23781 (simplify_const_unary_operation, simplify_binary_operation_1)
23782 (simplify_const_binary_operation, simplify_ternary_operation)
23783 (test_vector_ops_duplicate, test_vector_ops): Likewise.
23784 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23785 instead of CONST_VECTOR_NUNITS.
23786 * varasm.c (output_constant_pool_2): Likewise.
23787 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23788 explicit-encoded elements in the XVEC for variable-length vectors.
23790 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23792 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23794 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23795 Alan Hayward <alan.hayward@arm.com>
23796 David Sherwood <david.sherwood@arm.com>
23798 * coretypes.h (fixed_size_mode): Declare.
23799 (fixed_size_mode_pod): New typedef.
23800 * builtins.h (target_builtins::x_apply_args_mode)
23801 (target_builtins::x_apply_result_mode): Change type to
23802 fixed_size_mode_pod.
23803 * builtins.c (apply_args_size, apply_result_size, result_vector)
23804 (expand_builtin_apply_args_1, expand_builtin_apply)
23805 (expand_builtin_return): Update accordingly.
23807 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23809 * cse.c (hash_rtx_cb): Hash only the encoded elements.
23810 * cselib.c (cselib_hash_rtx): Likewise.
23811 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
23812 CONST_VECTOR encoding.
23814 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23815 Jeff Law <law@redhat.com>
23818 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
23819 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
23820 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
23821 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
23824 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
23825 explicitly probe *sp in a noreturn function if there were any callee
23826 register saves or frame pointer is needed.
23828 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23831 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
23832 BLKmode for ternary, binary or unary expressions.
23835 * var-tracking.c (delete_vta_debug_insn): New inline function.
23836 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
23837 insns from get_insns () to NULL instead of each bb separately.
23838 Use delete_vta_debug_insn. No longer static.
23839 (vt_debug_insns_local, variable_tracking_main_1): Adjust
23840 delete_vta_debug_insns callers.
23841 * rtl.h (delete_vta_debug_insns): Declare.
23842 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
23843 instead of variable_tracking_main.
23845 2018-01-03 Martin Sebor <msebor@redhat.com>
23847 PR tree-optimization/83603
23848 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
23849 arguments past the endof the argument list in functions declared
23850 without a prototype.
23851 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
23852 Avoid checking when arguments are null.
23854 2018-01-03 Martin Sebor <msebor@redhat.com>
23857 * doc/extend.texi (attribute const): Fix a typo.
23858 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
23859 issuing -Wsuggest-attribute for void functions.
23861 2018-01-03 Martin Sebor <msebor@redhat.com>
23863 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
23864 offset_int::from instead of wide_int::to_shwi.
23865 (maybe_diag_overlap): Remove assertion.
23866 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
23867 * gimple-ssa-sprintf.c (format_directive): Same.
23868 (parse_directive): Same.
23869 (sprintf_dom_walker::compute_format_length): Same.
23870 (try_substitute_return_value): Same.
23872 2018-01-03 Jeff Law <law@redhat.com>
23874 PR middle-end/83654
23875 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
23876 non-constant residual for zero at runtime and avoid probing in
23877 that case. Reorganize code for trailing problem to mirror handling
23880 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23882 PR tree-optimization/83501
23883 * tree-ssa-strlen.c (get_string_cst): New.
23884 (handle_char_store): Call get_string_cst.
23886 2018-01-03 Martin Liska <mliska@suse.cz>
23888 PR tree-optimization/83593
23889 * tree-ssa-strlen.c: Include tree-cfg.h.
23890 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
23891 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
23892 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
23894 (strlen_dom_walker::before_dom_children): Call
23895 gimple_purge_dead_eh_edges. Dump tranformation with details
23897 (strlen_dom_walker::before_dom_children): Update call by adding
23898 new argument cleanup_eh.
23899 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
23901 2018-01-03 Martin Liska <mliska@suse.cz>
23904 * cif-code.def (VARIADIC_THUNK): New enum value.
23905 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
23908 2018-01-03 Jan Beulich <jbeulich@suse.com>
23910 * sse.md (mov<mode>_internal): Tighten condition for when to use
23911 vmovdqu<ssescalarsize> for TI and OI modes.
23913 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23915 Update copyright years.
23917 2018-01-03 Martin Liska <mliska@suse.cz>
23920 * ipa-visibility.c (function_and_variable_visibility): Skip
23921 functions with noipa attribure.
23923 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23925 * gcc.c (process_command): Update copyright notice dates.
23926 * gcov-dump.c (print_version): Ditto.
23927 * gcov.c (print_version): Ditto.
23928 * gcov-tool.c (print_version): Ditto.
23929 * gengtype.c (create_file): Ditto.
23930 * doc/cpp.texi: Bump @copying's copyright year.
23931 * doc/cppinternals.texi: Ditto.
23932 * doc/gcc.texi: Ditto.
23933 * doc/gccint.texi: Ditto.
23934 * doc/gcov.texi: Ditto.
23935 * doc/install.texi: Ditto.
23936 * doc/invoke.texi: Ditto.
23938 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23940 * vector-builder.h (vector_builder::m_full_nelts): Change from
23941 unsigned int to poly_uint64.
23942 (vector_builder::full_nelts): Update prototype accordingly.
23943 (vector_builder::new_vector): Likewise.
23944 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
23945 (vector_builder::operator ==): Likewise.
23946 (vector_builder::finalize): Likewise.
23947 * int-vector-builder.h (int_vector_builder::int_vector_builder):
23948 Take the number of elements as a poly_uint64 rather than an
23950 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
23951 from unsigned int to poly_uint64.
23952 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
23953 (vec_perm_indices::new_vector): Likewise.
23954 (vec_perm_indices::length): Likewise.
23955 (vec_perm_indices::nelts_per_input): Likewise.
23956 (vec_perm_indices::input_nelts): Likewise.
23957 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
23958 number of elements per input as a poly_uint64 rather than an
23959 unsigned int. Use the original encoding for variable-length
23960 vectors, rather than clamping each individual element.
23961 For the second and subsequent elements in each pattern,
23962 clamp the step and base before clamping their sum.
23963 (vec_perm_indices::series_p): Handle polynomial element counts.
23964 (vec_perm_indices::all_in_range_p): Likewise.
23965 (vec_perm_indices_to_tree): Likewise.
23966 (vec_perm_indices_to_rtx): Likewise.
23967 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
23968 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
23969 (tree_vector_builder::new_binary_operation): Handle polynomial
23970 element counts. Return false if we need to know the number
23971 of elements at compile time.
23972 * fold-const.c (fold_vec_perm): Punt if the number of elements
23973 isn't known at compile time.
23975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23977 * vec-perm-indices.h (vec_perm_builder): Change element type
23978 from HOST_WIDE_INT to poly_int64.
23979 (vec_perm_indices::element_type): Update accordingly.
23980 (vec_perm_indices::clamp): Handle polynomial element_types.
23981 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23982 (vec_perm_indices::all_in_range_p): Likewise.
23983 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
23985 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
23986 polynomial vec_perm_indices element types.
23987 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
23988 * fold-const.c (fold_vec_perm): Likewise.
23989 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
23990 * tree-vect-generic.c (lower_vec_perm): Likewise.
23991 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23992 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
23993 element type to HOST_WIDE_INT.
23995 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23996 Alan Hayward <alan.hayward@arm.com>
23997 David Sherwood <david.sherwood@arm.com>
23999 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24000 rather than an int. Use plus_constant.
24001 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24002 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24004 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24005 Alan Hayward <alan.hayward@arm.com>
24006 David Sherwood <david.sherwood@arm.com>
24008 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24009 a HOST_WIDE_INT to a poly_int64.
24011 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24012 Alan Hayward <alan.hayward@arm.com>
24013 David Sherwood <david.sherwood@arm.com>
24015 * calls.c (load_register_parameters): Cope with polynomial
24016 mode sizes. Require a constant size for BLKmode parameters
24017 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24018 forces a parameter to be padded at the lsb end in order to
24019 fill a complete number of words, require the parameter size
24020 to be ordered wrt UNITS_PER_WORD.
24022 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24023 Alan Hayward <alan.hayward@arm.com>
24024 David Sherwood <david.sherwood@arm.com>
24026 * reload1.c (spill_stack_slot_width): Change element type
24027 from unsigned int to poly_uint64_pod.
24028 (alter_reg): Treat mode sizes as polynomial.
24030 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24031 Alan Hayward <alan.hayward@arm.com>
24032 David Sherwood <david.sherwood@arm.com>
24034 * reload.c (complex_word_subreg_p): New function.
24035 (reload_inner_reg_of_subreg, push_reload): Use it.
24037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24038 Alan Hayward <alan.hayward@arm.com>
24039 David Sherwood <david.sherwood@arm.com>
24041 * lra-constraints.c (process_alt_operands): Reject matched
24042 operands whose sizes aren't ordered.
24043 (match_reload): Refer to this check here.
24045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24046 Alan Hayward <alan.hayward@arm.com>
24047 David Sherwood <david.sherwood@arm.com>
24049 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24050 that the mode size is in the set {1, 2, 4, 8, 16}.
24052 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24053 Alan Hayward <alan.hayward@arm.com>
24054 David Sherwood <david.sherwood@arm.com>
24056 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24057 Use plus_constant instead of gen_rtx_PLUS.
24059 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24060 Alan Hayward <alan.hayward@arm.com>
24061 David Sherwood <david.sherwood@arm.com>
24063 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24064 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24065 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24066 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24067 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24068 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24069 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24070 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24071 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24072 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24074 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24075 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24076 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24077 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24078 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24079 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24080 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24081 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24082 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24083 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24085 * expr.c (emit_move_resolve_push): Treat the input and result
24086 of PUSH_ROUNDING as a poly_int64.
24087 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24088 (emit_push_insn): Likewise.
24089 * lra-eliminations.c (mark_not_eliminable): Likewise.
24090 * recog.c (push_operand): Likewise.
24091 * reload1.c (elimination_effects): Likewise.
24092 * rtlanal.c (nonzero_bits1): Likewise.
24093 * calls.c (store_one_arg): Likewise. Require the padding to be
24094 known at compile time.
24096 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24097 Alan Hayward <alan.hayward@arm.com>
24098 David Sherwood <david.sherwood@arm.com>
24100 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24101 Use plus_constant instead of gen_rtx_PLUS.
24103 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24104 Alan Hayward <alan.hayward@arm.com>
24105 David Sherwood <david.sherwood@arm.com>
24107 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24108 rather than an int.
24110 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24111 Alan Hayward <alan.hayward@arm.com>
24112 David Sherwood <david.sherwood@arm.com>
24114 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24115 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24116 via stack temporaries. Treat the mode size as polynomial too.
24118 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24119 Alan Hayward <alan.hayward@arm.com>
24120 David Sherwood <david.sherwood@arm.com>
24122 * expr.c (expand_expr_real_2): When handling conversions involving
24123 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24124 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24125 as a poly_uint64 too.
24127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24128 Alan Hayward <alan.hayward@arm.com>
24129 David Sherwood <david.sherwood@arm.com>
24131 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24133 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24134 Alan Hayward <alan.hayward@arm.com>
24135 David Sherwood <david.sherwood@arm.com>
24137 * combine.c (can_change_dest_mode): Handle polynomial
24138 REGMODE_NATURAL_SIZE.
24139 * expmed.c (store_bit_field_1): Likewise.
24140 * expr.c (store_constructor): Likewise.
24141 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24142 and polynomial REGMODE_NATURAL_SIZE.
24143 (gen_lowpart_common): Likewise.
24144 * reginfo.c (record_subregs_of_mode): Likewise.
24145 * rtlanal.c (read_modify_subreg_p): Likewise.
24147 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24148 Alan Hayward <alan.hayward@arm.com>
24149 David Sherwood <david.sherwood@arm.com>
24151 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24152 numbers of elements.
24154 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24155 Alan Hayward <alan.hayward@arm.com>
24156 David Sherwood <david.sherwood@arm.com>
24158 * match.pd: Cope with polynomial numbers of vector elements.
24160 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24161 Alan Hayward <alan.hayward@arm.com>
24162 David Sherwood <david.sherwood@arm.com>
24164 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24165 in a POINTER_PLUS_EXPR.
24167 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24168 Alan Hayward <alan.hayward@arm.com>
24169 David Sherwood <david.sherwood@arm.com>
24171 * omp-simd-clone.c (simd_clone_subparts): New function.
24172 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24173 (ipa_simd_modify_function_body): Likewise.
24175 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24176 Alan Hayward <alan.hayward@arm.com>
24177 David Sherwood <david.sherwood@arm.com>
24179 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24180 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24181 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24182 (expand_vector_condition, vector_element): Likewise.
24183 (subparts_gt): New function.
24184 (get_compute_type): Use subparts_gt.
24185 (count_type_subparts): Delete.
24186 (expand_vector_operations_1): Use subparts_gt instead of
24187 count_type_subparts.
24189 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24190 Alan Hayward <alan.hayward@arm.com>
24191 David Sherwood <david.sherwood@arm.com>
24193 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24194 (vect_compile_time_alias): ...this new function. Do the calculation
24195 on poly_ints rather than trees.
24196 (vect_prune_runtime_alias_test_list): Update call accordingly.
24198 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24199 Alan Hayward <alan.hayward@arm.com>
24200 David Sherwood <david.sherwood@arm.com>
24202 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24204 (vect_schedule_slp_instance): Likewise.
24206 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24207 Alan Hayward <alan.hayward@arm.com>
24208 David Sherwood <david.sherwood@arm.com>
24210 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24211 constant and extern definitions for variable-length vectors.
24212 (vect_get_constant_vectors): Note that the number of units
24213 is known to be constant.
24215 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24216 Alan Hayward <alan.hayward@arm.com>
24217 David Sherwood <david.sherwood@arm.com>
24219 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24220 of units as polynomial. Choose between WIDE and NARROW based
24223 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24224 Alan Hayward <alan.hayward@arm.com>
24225 David Sherwood <david.sherwood@arm.com>
24227 * tree-vect-stmts.c (simd_clone_subparts): New function.
24228 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24230 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24231 Alan Hayward <alan.hayward@arm.com>
24232 David Sherwood <david.sherwood@arm.com>
24234 * tree-vect-stmts.c (vectorizable_call): Treat the number of
24235 vectors as polynomial. Use build_index_vector for
24236 IFN_GOMP_SIMD_LANE.
24238 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24239 Alan Hayward <alan.hayward@arm.com>
24240 David Sherwood <david.sherwood@arm.com>
24242 * tree-vect-stmts.c (get_load_store_type): Treat the number of
24243 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24244 for variable-length vectors.
24245 (vectorizable_mask_load_store): Treat the number of units as
24246 polynomial, asserting that it is constant if the condition has
24247 already been enforced.
24248 (vectorizable_store, vectorizable_load): Likewise.
24250 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24251 Alan Hayward <alan.hayward@arm.com>
24252 David Sherwood <david.sherwood@arm.com>
24254 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24255 of units as polynomial. Punt if we can't tell at compile time
24256 which vector contains the final result.
24258 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24259 Alan Hayward <alan.hayward@arm.com>
24260 David Sherwood <david.sherwood@arm.com>
24262 * tree-vect-loop.c (vectorizable_induction): Treat the number
24263 of units as polynomial. Punt on SLP inductions. Use an integer
24264 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24265 cast of such a series for variable-length floating-point
24268 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24269 Alan Hayward <alan.hayward@arm.com>
24270 David Sherwood <david.sherwood@arm.com>
24272 * tree.h (build_index_vector): Declare.
24273 * tree.c (build_index_vector): New function.
24274 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24275 of units as polynomial, forcibly converting it to a constant if
24276 vectorizable_reduction has already enforced the condition.
24277 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
24278 to create a {1,2,3,...} vector.
24279 (vectorizable_reduction): Treat the number of units as polynomial.
24280 Choose vectype_in based on the largest scalar element size rather
24281 than the smallest number of units. Enforce the restrictions
24284 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24285 Alan Hayward <alan.hayward@arm.com>
24286 David Sherwood <david.sherwood@arm.com>
24288 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24289 number of units as polynomial.
24291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24292 Alan Hayward <alan.hayward@arm.com>
24293 David Sherwood <david.sherwood@arm.com>
24295 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24296 * target.def (autovectorize_vector_sizes): Return the vector sizes
24297 by pointer, using vector_sizes rather than a bitmask.
24298 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24299 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24300 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24302 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24303 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24304 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24305 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24306 * omp-general.c (omp_max_vf): Likewise.
24307 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24308 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24309 * tree-vect-loop.c (vect_analyze_loop): Likewise.
24310 * tree-vect-slp.c (vect_slp_bb): Likewise.
24311 * doc/tm.texi: Regenerate.
24312 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24314 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24315 the vector size as a poly_uint64 rather than an unsigned int.
24316 (current_vector_size): Change from an unsigned int to a poly_uint64.
24317 (get_vectype_for_scalar_type): Update accordingly.
24318 * tree.h (build_truth_vector_type): Take the size and number of
24319 units as a poly_uint64 rather than an unsigned int.
24320 (build_vector_type): Add a temporary overload that takes
24321 the number of units as a poly_uint64 rather than an unsigned int.
24322 * tree.c (make_vector_type): Likewise.
24323 (build_truth_vector_type): Take the number of units as a poly_uint64
24324 rather than an unsigned int.
24326 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24327 Alan Hayward <alan.hayward@arm.com>
24328 David Sherwood <david.sherwood@arm.com>
24330 * target.def (get_mask_mode): Take the number of units and length
24331 as poly_uint64s rather than unsigned ints.
24332 * targhooks.h (default_get_mask_mode): Update accordingly.
24333 * targhooks.c (default_get_mask_mode): Likewise.
24334 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24335 * doc/tm.texi: Regenerate.
24337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24338 Alan Hayward <alan.hayward@arm.com>
24339 David Sherwood <david.sherwood@arm.com>
24341 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24342 * omp-general.c (omp_max_vf): Likewise.
24343 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24344 (expand_omp_simd): Handle polynomial safelen.
24345 * omp-low.c (omplow_simd_context): Add a default constructor.
24346 (omplow_simd_context::max_vf): Change from int to poly_uint64.
24347 (lower_rec_simd_input_clauses): Update accordingly.
24348 (lower_rec_input_clauses): Likewise.
24350 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24351 Alan Hayward <alan.hayward@arm.com>
24352 David Sherwood <david.sherwood@arm.com>
24354 * tree-vectorizer.h (vect_nunits_for_cost): New function.
24355 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24356 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24357 (vect_analyze_slp_cost): Likewise.
24358 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24359 (vect_model_load_cost): Likewise.
24361 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24362 Alan Hayward <alan.hayward@arm.com>
24363 David Sherwood <david.sherwood@arm.com>
24365 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24366 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24367 from an unsigned int * to a poly_uint64_pod *.
24368 (calculate_unrolling_factor): New function.
24369 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
24371 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24372 Alan Hayward <alan.hayward@arm.com>
24373 David Sherwood <david.sherwood@arm.com>
24375 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24376 from an unsigned int to a poly_uint64.
24377 (_loop_vec_info::slp_unrolling_factor): Likewise.
24378 (_loop_vec_info::vectorization_factor): Change from an int
24380 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24381 (vect_get_num_vectors): New function.
24382 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24383 (vect_get_num_copies): Use vect_get_num_vectors.
24384 (vect_analyze_data_ref_dependences): Change max_vf from an int *
24385 to an unsigned int *.
24386 (vect_analyze_data_refs): Change min_vf from an int * to a
24388 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24389 than an unsigned HOST_WIDE_INT.
24390 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24391 (vect_analyze_data_ref_dependence): Change max_vf from an int *
24392 to an unsigned int *.
24393 (vect_analyze_data_ref_dependences): Likewise.
24394 (vect_compute_data_ref_alignment): Handle polynomial vf.
24395 (vect_enhance_data_refs_alignment): Likewise.
24396 (vect_prune_runtime_alias_test_list): Likewise.
24397 (vect_shift_permute_load_chain): Likewise.
24398 (vect_supportable_dr_alignment): Likewise.
24399 (dependence_distance_ge_vf): Take the vectorization factor as a
24400 poly_uint64 rather than an unsigned HOST_WIDE_INT.
24401 (vect_analyze_data_refs): Change min_vf from an int * to a
24403 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24404 vfm1 as a poly_uint64 rather than an int. Make the same change
24405 for the returned bound_scalar.
24406 (vect_gen_vector_loop_niters): Handle polynomial vf.
24407 (vect_do_peeling): Likewise. Update call to
24408 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24409 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24411 * tree-vect-loop.c (vect_determine_vectorization_factor)
24412 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24413 (vect_get_known_peeling_cost): Likewise.
24414 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24415 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24416 (vect_transform_loop): Likewise. Use the lowest possible VF when
24417 updating the upper bounds of the loop.
24418 (vect_min_worthwhile_factor): Make static. Return an unsigned int
24419 rather than an int.
24420 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24421 polynomial unroll factors.
24422 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24423 (vect_make_slp_decision): Likewise.
24424 (vect_supported_load_permutation_p): Likewise, and polynomial
24426 (vect_analyze_slp_cost): Handle polynomial vf.
24427 (vect_slp_analyze_node_operations): Likewise.
24428 (vect_slp_analyze_bb_1): Likewise.
24429 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24430 than an unsigned HOST_WIDE_INT.
24431 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24432 (vectorizable_load): Handle polynomial vf.
24433 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24435 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24437 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24438 Alan Hayward <alan.hayward@arm.com>
24439 David Sherwood <david.sherwood@arm.com>
24441 * match.pd: Handle bit operations involving three constants
24442 and try to fold one pair.
24444 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24446 * tree-vect-loop-manip.c: Include gimple-fold.h.
24447 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24448 niters_maybe_zero parameters. Handle other cases besides a step of 1.
24449 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24450 Add a path that uses a step of VF instead of 1, but disable it
24452 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24453 and niters_no_overflow parameters. Update calls to
24454 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24455 Create a new SSA name if the latter choses to use a ste other
24456 than zero, and return it via niters_vector_mult_vf_var.
24457 * tree-vect-loop.c (vect_transform_loop): Update calls to
24458 vect_do_peeling, vect_gen_vector_loop_niters and
24459 slpeel_make_loop_iterate_ntimes.
24460 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24461 (vect_gen_vector_loop_niters): Update declarations after above changes.
24463 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24465 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24466 128-bit round to integer instructions.
24467 (ceil<mode>2): Likewise.
24468 (btrunc<mode>2): Likewise.
24469 (round<mode>2): Likewise.
24471 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24473 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24474 unaligned VSX load/store on P8/P9.
24475 (expand_block_clear): Allow the use of unaligned VSX
24476 load/store on P8/P9.
24478 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24480 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24482 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24483 swap associated with both a load and a store.
24485 2018-01-02 Andrew Waterman <andrew@sifive.com>
24487 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24488 * config/riscv/riscv.md (clear_cache): Use it.
24490 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
24492 * web.c: Remove out-of-date comment.
24494 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24496 * expr.c (fixup_args_size_notes): Check that any existing
24497 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24498 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24499 (emit_single_push_insn): ...here.
24501 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24503 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24504 (const_vector_encoded_nelts): New function.
24505 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24506 (const_vector_int_elt, const_vector_elt): Declare.
24507 * emit-rtl.c (const_vector_int_elt_1): New function.
24508 (const_vector_elt): Likewise.
24509 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24510 of CONST_VECTOR_ELT.
24512 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24514 * expr.c: Include rtx-vector-builder.h.
24515 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24516 directly on the tree encoding.
24517 (const_vector_from_tree): Likewise.
24518 * optabs.c: Include rtx-vector-builder.h.
24519 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24520 sequence of "u" values.
24521 * vec-perm-indices.c: Include rtx-vector-builder.h.
24522 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24523 directly on the vec_perm_indices encoding.
24525 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24527 * doc/rtl.texi (const_vector): Describe new encoding scheme.
24528 * Makefile.in (OBJS): Add rtx-vector-builder.o.
24529 * rtx-vector-builder.h: New file.
24530 * rtx-vector-builder.c: Likewise.
24531 * rtl.h (rtx_def::u2): Add a const_vector field.
24532 (CONST_VECTOR_NPATTERNS): New macro.
24533 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24534 (CONST_VECTOR_DUPLICATE_P): Likewise.
24535 (CONST_VECTOR_STEPPED_P): Likewise.
24536 (CONST_VECTOR_ENCODED_ELT): Likewise.
24537 (const_vec_duplicate_p): Check for a duplicated vector encoding.
24538 (unwrap_const_vec_duplicate): Likewise.
24539 (const_vec_series_p): Check for a non-duplicated vector encoding.
24540 Say that the function only returns true for integer vectors.
24541 * emit-rtl.c: Include rtx-vector-builder.h.
24542 (gen_const_vec_duplicate_1): Delete.
24543 (gen_const_vector): Call gen_const_vec_duplicate instead of
24544 gen_const_vec_duplicate_1.
24545 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24546 (gen_const_vec_duplicate): Use rtx_vector_builder.
24547 (gen_const_vec_series): Likewise.
24548 (gen_rtx_CONST_VECTOR): Likewise.
24549 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24550 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24551 Build a new vector rather than modifying a CONST_VECTOR in-place.
24552 (handle_special_swappables): Update call accordingly.
24553 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24554 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24555 Build a new vector rather than modifying a CONST_VECTOR in-place.
24556 (handle_special_swappables): Update call accordingly.
24558 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24560 * simplify-rtx.c (simplify_const_binary_operation): Use
24561 CONST_VECTOR_ELT instead of XVECEXP.
24563 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24565 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24566 the selector elements to be different from the data elements
24567 if the selector is a VECTOR_CST.
24568 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24569 ssizetype for the selector.
24571 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24573 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24574 before testing each element individually.
24575 * tree-vect-generic.c (lower_vec_perm): Likewise.
24577 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24579 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24580 * selftest-run-tests.c (selftest::run_tests): Call it.
24581 * vector-builder.h (vector_builder::operator ==): New function.
24582 (vector_builder::operator !=): Likewise.
24583 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24584 (vec_perm_indices::all_from_input_p): New function.
24585 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24586 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24587 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24588 instead of reading the VECTOR_CST directly. Detect whether both
24589 vector inputs are the same before constructing the vec_perm_indices,
24590 and update the number of inputs argument accordingly. Use the
24591 utility functions added above. Only construct sel2 if we need to.
24593 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24595 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24596 the broadcast of the low byte.
24597 (expand_mult_highpart): Use an explicit encoding for the permutes.
24598 * optabs-query.c (can_mult_highpart_p): Likewise.
24599 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24600 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24601 (vectorizable_bswap): Likewise.
24602 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24603 explicit encoding for the power-of-2 permutes.
24604 (vect_permute_store_chain): Likewise.
24605 (vect_grouped_load_supported): Likewise.
24606 (vect_permute_load_chain): Likewise.
24608 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24610 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24611 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24612 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24613 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24614 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24615 (vect_gen_perm_mask_any): Likewise.
24617 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24619 * int-vector-builder.h: New file.
24620 * vec-perm-indices.h: Include int-vector-builder.h.
24621 (vec_perm_indices): Redefine as an int_vector_builder.
24622 (auto_vec_perm_indices): Delete.
24623 (vec_perm_builder): Redefine as a stand-alone class.
24624 (vec_perm_indices::vec_perm_indices): New function.
24625 (vec_perm_indices::clamp): Likewise.
24626 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24627 (vec_perm_indices::new_vector): New function.
24628 (vec_perm_indices::new_expanded_vector): Update for new
24629 vec_perm_indices class.
24630 (vec_perm_indices::rotate_inputs): New function.
24631 (vec_perm_indices::all_in_range_p): Operate directly on the
24632 encoded form, without computing elided elements.
24633 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24634 encoding. Update for new vec_perm_indices class.
24635 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24636 the given vec_perm_builder.
24637 (expand_vec_perm_var): Update vec_perm_builder constructor.
24638 (expand_mult_highpart): Use vec_perm_builder instead of
24639 auto_vec_perm_indices.
24640 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24641 vec_perm_indices instead of auto_vec_perm_indices. Use a single
24642 or double series encoding as appropriate.
24643 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24644 vec_perm_indices instead of auto_vec_perm_indices.
24645 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24646 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24647 (vect_permute_store_chain): Likewise.
24648 (vect_grouped_load_supported): Likewise.
24649 (vect_permute_load_chain): Likewise.
24650 (vect_shift_permute_load_chain): Likewise.
24651 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24652 (vect_transform_slp_perm_load): Likewise.
24653 (vect_schedule_slp_instance): Likewise.
24654 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24655 (vectorizable_mask_load_store): Likewise.
24656 (vectorizable_bswap): Likewise.
24657 (vectorizable_store): Likewise.
24658 (vectorizable_load): Likewise.
24659 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24660 vec_perm_indices instead of auto_vec_perm_indices. Use
24661 tree_to_vec_perm_builder to read the vector from a tree.
24662 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24663 vec_perm_builder instead of a vec_perm_indices.
24664 (have_whole_vector_shift): Use vec_perm_builder and
24665 vec_perm_indices instead of auto_vec_perm_indices. Leave the
24666 truncation to calc_vec_perm_mask_for_shift.
24667 (vect_create_epilog_for_reduction): Likewise.
24668 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24669 from auto_vec_perm_indices to vec_perm_indices.
24670 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24671 instead of changing individual elements.
24672 (aarch64_vectorize_vec_perm_const): Use new_vector to install
24673 the vector in d.perm.
24674 * config/arm/arm.c (expand_vec_perm_d::perm): Change
24675 from auto_vec_perm_indices to vec_perm_indices.
24676 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24677 instead of changing individual elements.
24678 (arm_vectorize_vec_perm_const): Use new_vector to install
24679 the vector in d.perm.
24680 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24681 Update vec_perm_builder constructor.
24682 (rs6000_expand_interleave): Likewise.
24683 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24684 (rs6000_expand_interleave): Likewise.
24686 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24688 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24689 to qimode could truncate the indices.
24690 * optabs.c (expand_vec_perm_var): Likewise.
24692 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24694 * Makefile.in (OBJS): Add vec-perm-indices.o.
24695 * vec-perm-indices.h: New file.
24696 * vec-perm-indices.c: Likewise.
24697 * target.h (vec_perm_indices): Replace with a forward class
24699 (auto_vec_perm_indices): Move to vec-perm-indices.h.
24700 * optabs.h: Include vec-perm-indices.h.
24701 (expand_vec_perm): Delete.
24702 (selector_fits_mode_p, expand_vec_perm_var): Declare.
24703 (expand_vec_perm_const): Declare.
24704 * target.def (vec_perm_const_ok): Replace with...
24705 (vec_perm_const): ...this new hook.
24706 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24707 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24708 * doc/tm.texi: Regenerate.
24709 * optabs.def (vec_perm_const): Delete.
24710 * doc/md.texi (vec_perm_const): Likewise.
24711 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24712 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24713 expand_vec_perm for constant permutation vectors. Assert that
24714 the mode of variable permutation vectors is the integer equivalent
24715 of the mode that is being permuted.
24716 * optabs-query.h (selector_fits_mode_p): Declare.
24717 * optabs-query.c: Include vec-perm-indices.h.
24718 (selector_fits_mode_p): New function.
24719 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
24720 is defined, instead of checking whether the vec_perm_const_optab
24721 exists. Use targetm.vectorize.vec_perm_const instead of
24722 targetm.vectorize.vec_perm_const_ok. Check whether the indices
24723 fit in the vector mode before using a variable permute.
24724 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
24725 vec_perm_indices instead of an rtx.
24726 (expand_vec_perm): Replace with...
24727 (expand_vec_perm_const): ...this new function. Take the selector
24728 as a vec_perm_indices rather than an rtx. Also take the mode of
24729 the selector. Update call to shift_amt_for_vec_perm_mask.
24730 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
24731 Use vec_perm_indices::new_expanded_vector to expand the original
24732 selector into bytes. Check whether the indices fit in the vector
24733 mode before using a variable permute.
24734 (expand_vec_perm_var): Make global.
24735 (expand_mult_highpart): Use expand_vec_perm_const.
24736 * fold-const.c: Includes vec-perm-indices.h.
24737 * tree-ssa-forwprop.c: Likewise.
24738 * tree-vect-data-refs.c: Likewise.
24739 * tree-vect-generic.c: Likewise.
24740 * tree-vect-loop.c: Likewise.
24741 * tree-vect-slp.c: Likewise.
24742 * tree-vect-stmts.c: Likewise.
24743 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
24745 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
24746 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24747 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24748 (aarch64_vectorize_vec_perm_const): ...this new function.
24749 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24750 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24751 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24752 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24753 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24754 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24755 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24757 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
24758 check for NEON modes.
24759 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24760 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24761 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24762 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24764 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
24765 the old VEC_PERM_CONST conditions.
24766 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24767 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24768 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24769 (ia64_vectorize_vec_perm_const_ok): Merge into...
24770 (ia64_vectorize_vec_perm_const): ...this new function.
24771 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24772 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24773 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24774 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24775 * config/mips/mips.c (mips_expand_vec_perm_const)
24776 (mips_vectorize_vec_perm_const_ok): Merge into...
24777 (mips_vectorize_vec_perm_const): ...this new function.
24778 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24779 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24780 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24781 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24782 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24783 (rs6000_expand_vec_perm_const): Delete.
24784 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24786 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24787 (altivec_expand_vec_perm_const_le): Take each operand individually.
24788 Operate on constant selectors rather than rtxes.
24789 (altivec_expand_vec_perm_const): Likewise. Update call to
24790 altivec_expand_vec_perm_const_le.
24791 (rs6000_expand_vec_perm_const): Delete.
24792 (rs6000_vectorize_vec_perm_const_ok): Delete.
24793 (rs6000_vectorize_vec_perm_const): New function.
24794 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24795 an element count and rtx array.
24796 (rs6000_expand_extract_even): Update call accordingly.
24797 (rs6000_expand_interleave): Likewise.
24798 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24799 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24800 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24801 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24802 (rs6000_expand_vec_perm_const): Delete.
24803 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24804 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24805 (altivec_expand_vec_perm_const_le): Take each operand individually.
24806 Operate on constant selectors rather than rtxes.
24807 (altivec_expand_vec_perm_const): Likewise. Update call to
24808 altivec_expand_vec_perm_const_le.
24809 (rs6000_expand_vec_perm_const): Delete.
24810 (rs6000_vectorize_vec_perm_const_ok): Delete.
24811 (rs6000_vectorize_vec_perm_const): New function. Remove stray
24812 reference to the SPE evmerge intructions.
24813 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24814 an element count and rtx array.
24815 (rs6000_expand_extract_even): Update call accordingly.
24816 (rs6000_expand_interleave): Likewise.
24817 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
24818 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
24820 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24822 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24824 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
24825 vector mode and that that mode matches the mode of the data
24827 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
24828 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
24829 directly using expand_vec_perm_1 when forcing selectors into
24831 (expand_vec_perm_var): New function, split out from expand_vec_perm.
24833 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24835 * optabs-query.h (can_vec_perm_p): Delete.
24836 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
24837 * optabs-query.c (can_vec_perm_p): Split into...
24838 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
24839 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
24840 particular selector is valid.
24841 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24842 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24843 (vect_grouped_load_supported): Likewise.
24844 (vect_shift_permute_load_chain): Likewise.
24845 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24846 (vect_transform_slp_perm_load): Likewise.
24847 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24848 (vectorizable_bswap): Likewise.
24849 (vect_gen_perm_mask_checked): Likewise.
24850 * fold-const.c (fold_ternary_loc): Likewise. Don't take
24851 implementations of variable permutation vectors into account
24852 when deciding which selector to use.
24853 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
24854 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
24855 with a false third argument.
24856 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
24857 to test whether the constant selector is valid and can_vec_perm_var_p
24858 to test whether a variable selector is valid.
24860 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24862 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
24863 * optabs-query.c (can_vec_perm_p): Likewise.
24864 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
24865 instead of vec_perm_indices.
24866 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
24867 (vect_gen_perm_mask_checked): Likewise,
24868 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
24869 (vect_gen_perm_mask_checked): Likewise,
24871 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24873 * optabs-query.h (qimode_for_vec_perm): Declare.
24874 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
24875 (qimode_for_vec_perm): ...this new function.
24876 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
24878 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24880 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
24881 does not have a conditional at the top.
24883 2018-01-02 Richard Biener <rguenther@suse.de>
24885 * ipa-inline.c (big_speedup_p): Fix expression.
24887 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24890 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
24893 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24897 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24898 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24899 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
24900 cond_taken_branch_cost 3->4.
24902 2018-01-01 Jakub Jelinek <jakub@redhat.com>
24904 PR tree-optimization/83581
24905 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
24906 TODO_cleanup_cfg if any changes have been made.
24908 PR middle-end/83608
24909 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
24910 convert_modes if target mode has the right side, but different mode
24913 PR middle-end/83609
24914 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
24915 last argument when extracting from CONCAT. If either from_real or
24916 from_imag is NULL, use expansion through memory. If result is not
24917 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
24918 the parts directly to inner mode, if even that fails, use expansion
24921 PR middle-end/83623
24922 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
24923 check for bswap in mode rather than HImode and use that in expand_unop
24926 Copyright (C) 2018 Free Software Foundation, Inc.
24928 Copying and distribution of this file, with or without modification,
24929 are permitted in any medium without royalty provided the copyright
24930 notice and this notice are preserved.