1 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
4 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
5 if frame pointer isn't used.
6 (compute_frame_pointer_to_fb_displacement): Likewise.
8 2018-09-04 Jakub Jelinek <jakub@redhat.com>
11 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
12 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
13 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
14 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
15 and OPTION_MASK_ISA_XSAVEC_UNSET.
17 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
19 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
20 XOR operations in NAND case.
22 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
24 * wide-int-range.cc (wide_int_range_convert): New.
25 * wide-int-range.h (wide_int_range_convert): New.
26 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
27 code into wide_int_range_convert.
28 (extract_range_into_wide_ints): Do not munge anti range constants
29 into the entire domain. Just return the range back.
31 2018-09-04 Martin Liska <mliska@suse.cz>
33 * genmatch.c (output_line_directive): Add new argument
35 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
37 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
39 * doc/invoke.texi (Option Summary): Add whitespace.
41 * doc/invoke.texi (Option Summary): Add -Waligned-new.
43 2018-09-04 Richard Biener <rguenther@suse.de>
45 PR tree-optimization/87211
46 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
47 backedge value we're supposed to treat as VARYING also number
48 the PHI to VARYING in case it got a different value-number already.
50 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
52 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
53 (extract_range_from_binary_expr_1): Do not call
54 vrp_can_optimize_bit_op.
55 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
57 (wide_int_range_get_mask_and_bounds): New.
58 (wide_int_range_optimize_bit_op): New.
59 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
60 (wide_int_range_bit_and): Same.
61 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
62 (wide_int_range_optimize_bit_op): New.
63 (wide_int_range_get_mask_and_bounds): New.
65 2018-09-04 Richard Biener <rguenther@suse.de>
67 PR tree-optimization/87176
68 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
69 variable. When value-numbering a virtual PHI node make sure
70 to not value-number to the backedge value.
72 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
74 * doc/extend.texi (Long Long, Hex Floats): Document support for
75 long long and hex floats in more recent versions of ISO C++.
77 2018-09-03 Richard Biener <rguenther@suse.de>
79 PR tree-optimization/87177
80 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
83 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
85 * bb-reorder.c (edge_order): Convert to C-qsort-style
87 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
89 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
91 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
93 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
95 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
97 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
98 (mergesort): ... here as maximum count for using netsort.
99 (gcc_qsort): Set nlim to 3 if stable sort is requested.
100 (gcc_stablesort): New.
101 * system.h (gcc_stablesort): Declare.
103 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
105 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
106 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
107 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
109 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
111 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
112 lxsdx and stxsdx alternatives.
113 (*mov<mode>_hardfloat64): Ditto.
114 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
116 2018-09-03 Richard Biener <rguenther@suse.de>
118 PR tree-optimization/87200
119 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
122 2018-09-03 Martin Liska <mliska@suse.cz>
124 PR tree-optimization/87201
125 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
126 Fix parenthesis in an expression.
128 2018-09-03 Richard Biener <rguenther@suse.de>
130 PR tree-optimization/87197
131 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
132 visited. CSE the VN_INFO hashtable lookup.
134 PR tree-optimization/87169
135 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
136 iterating make sure there's no extra backedges from irreducible
137 regions feeding the header. Mark the destination block
140 2018-09-03 Martin Liska <mliska@suse.cz>
143 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
144 * common/common-targhooks.c (default_get_valid_option_values):
146 * common/common-targhooks.h (default_get_valid_option_values):
148 * common/config/i386/i386-common.c: Move processor_target_table
150 (ix86_get_valid_option_values): New function.
151 (TARGET_GET_VALID_OPTION_VALUES): New macro.
152 * config/i386/i386.c (struct ptt): Move to i386-common.c.
153 (PTA_*): Move all defined masks into i386-common.c.
154 (ix86_function_specific_restore): Use new processor_cost_table.
155 * config/i386/i386.h (struct ptt): Moved from i386.c.
156 (struct pta): Likewise.
157 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
158 * doc/tm.texi.in: Likewise.
159 * opt-suggestions.c (option_proposer::suggest_option):
160 Pass prefix to build_option_suggestions.
161 (option_proposer::get_completions): Likewise.
162 (option_proposer::build_option_suggestions): Use the new target
164 * opts.c (struct option_help_tuple): New struct.
165 (print_filtered_help): Use the new target hook.
167 2018-09-03 Martin Liska <mliska@suse.cz>
170 * predict.c (set_even_probabilities): Add likely_edges
171 argument and handle cases where we have precisely one
173 (combine_predictions_for_bb): Catch also likely_edges.
174 (tree_predict_by_opcode): Handle gswitch statements.
175 * tree-cfg.h (find_case_label_for_value): New declaration.
176 (find_taken_edge_switch_expr): Likewise.
177 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
178 Find pivot in decision tree based on probabily, not by number of
181 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
183 * doc/standards.texi (Standards): Update Objective-C reference.
185 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
187 * doc/install.texi (Prerequisites): Update link for MPC.
189 2018-09-01 Michael Matz <matz@suse.de>
191 PR tree-optimization/87074
192 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
193 PHIs for outer-loop uses.
195 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
197 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
198 * doc/invoke.texi (C Dialect Options): Ditto.
200 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
202 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
204 2018-08-31 Richard Biener <rguenther@suse.de>
206 PR tree-optimization/87168
207 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
208 (rpo_elim::eliminate_avail): When OP was not visited it must
211 2018-08-31 David Malcolm <dmalcolm@redhat.com>
213 * tree-vrp.c (copy_value_range): Convert param "from" from
214 "value_range *" to "const value_range *".
215 (range_is_null): Likewise for param "vr".
216 (range_int_cst_p): Likewise.
217 (range_int_cst_singleton_p): Likewise.
218 (symbolic_range_p): Likewise.
219 (value_ranges_intersect_p): Likewise for both params.
220 (value_range_nonnegative_p): Likewise for param "vr".
221 (value_range_constant_singleton): Likewise.
222 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
223 (extract_range_into_wide_ints): Likewise for param "vr".
224 (extract_range_from_multiplicative_op): Likewise for params "vr0"
226 (vrp_can_optimize_bit_op): Likewise.
227 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
229 (extract_range_from_unary_expr): Likewise.
230 (debug_value_range): Likewise for param "vr".
231 (value_range::dump): Add "const" qualifier.
232 (vrp_prop::check_array_ref): Convert local "vr" from
233 "value_range *" to "const value_range *".
234 (vrp_prop::check_mem_ref): Likewise.
235 (vrp_prop::visit_stmt): Likewise for local "old_vr".
236 (vrp_intersect_ranges_1): Likewise for param "vr_1".
237 (vrp_intersect_ranges): Likewise.
238 (simplify_stmt_for_jump_threading): Likewise for local "vr".
239 (vrp_prop::vrp_finalize): Likewise.
240 * tree-vrp.h (value_range::dump): Add "const" qualifier.
241 (vrp_intersect_ranges): Add "const" qualifier to params as above.
242 (extract_range_from_unary_expr): Likewise.
243 (value_range_constant_singleton): Likewise.
244 (symbolic_range_p): Likewise.
245 (copy_value_range): Likewise.
246 (extract_range_from_binary_expr_1): Likewise.
247 (range_int_cst_p): Likewise.
248 (vrp_set_zero_nonzero_bits): Likewise.
249 (range_int_cst_singleton_p): Likewise.
251 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
253 * config/aarch64/arm_neon.h (vabsd_s64): New.
254 (vnegd_s64): Likewise.
256 2018-08-31 Martin Jambor <mjambor@suse.cz>
258 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
260 2018-08-31 Martin Liska <mliska@suse.cz>
262 * ipa-icf.c (sem_item::add_type): Use
263 sem_item::m_type_hash_cache.
264 * ipa-icf.h: Move the cache from sem_item_optimizer
267 2018-08-31 Nathan Sidwell <nathan@acm.org>
269 * doc/extend.texi (Backwards Compatibility): Remove implicit
270 extern C leeway of () being (...).
272 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
274 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
276 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
280 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
282 2018-08-31 Jakub Jelinek <jakub@redhat.com>
285 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
286 gen_int_mode. Formatting fixes.
288 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
290 * target.def (custom_function_descriptors): Improve documentation.
291 * doc/tm.texi.in (Trampolines): Expand discussion of function
292 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
293 beginning of the section.
294 * doc/tm.texi: Regenerated.
296 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
298 * cfg.h (class auto_edge_flag): Spell out the template-id of the
299 base class in the initializer list. This is a workaround for
300 building with older GCC.
301 (class auto_bb_flag): Likewise.
303 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
305 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
306 (altivec_vcmpequ<VI_char>_p): Remove star.
307 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
309 (expand_strncmp_vec_sequence): New function.
310 (emit_final_str_compare_vec): New function.
311 (expand_strn_compare): Add support for vector strncmp.
312 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
313 length specification to bytes.
314 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
315 (vcmpnezb_p): New pattern.
316 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
317 for option -mstring-compare-inline-limit.
319 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
321 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
322 (PTA_SKYLAKE): Add PTA_AES.
323 (PTA_GOLDMONT): Likewise.
325 2018-08-29 Jan Hubicka <jh@suse.cz>
328 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
329 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
331 2018-08-29 Jan Hubicka <jh@suse.cz>
333 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
335 (hash_tree): Do not visit TYPE_STUB_DECL.
336 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
337 stream TYPE_STUB_DECL.
338 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
339 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
340 after free_lang_data.
341 (type_in_anonymous_namespace_p): Likewise.
343 2018-08-29 Jan Hubicka <jh@suse.cz>
345 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
346 comment that it has to be even number.
347 (class sreal): Change m_sig type to int32_t.
348 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
349 int64_t for temporary calculations.
350 (sreal_verify_basics): Drop one bit from minimum and maximum.
352 2018-08-30 Richard Biener <rguenther@suse.de>
354 PR tree-optimization/87147
355 * tree-ssa-sccvn.c (SSA_VISITED): New function.
356 (visit_phi): When the degenerate result is from the backedge and
357 we didn't visit its definition yet drop to VARYING.
358 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
360 2018-08-29 Jan Hubicka <jh@suse.cz>
362 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
364 (hash_tree): Likewise.
366 2018-08-29 Jan Hubicka <jh@suse.cz>
368 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
369 and TYPE_NEXT_REF_TO.
371 2018-08-29 Jan Hubicka <jh@suse.cz>
373 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
374 comment that it has to be even number.
375 (class sreal): Change m_sig type to int32_t.
376 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
377 int64_t for temporary calculations.
378 (sreal_verify_basics): Drop one bit from minimum and maximum.
380 2018-08-30 Tamar Christina <tamar.christina@arm.com>
382 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
384 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
387 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
388 if to_add is negative.
390 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
393 * builtins.c (c_strlen): Improve range checks.
395 2018-08-29 Martin Sebor <msebor@redhat.com>
396 Jeff Law <law@redhat.com>
398 PR tree-optimization/86714
399 PR tree-optimization/86711
400 * builtins.c (c_strlen): Add arguments to call to string_constant.
401 * expr.c (string_constant): Add argument. Detect missing nul
402 terminator and outermost declaration it's missing in.
403 * expr.h (string_constant): Add argument.
404 * fold-const.c (read_from_constant_string): Add arguments to call to
406 (c_getstr): Likewise.
407 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
409 * tree-ssa-strlen.c (get_stridx): Likewise.
411 2018-08-29 Jan Hubicka <jh@suse.cz>
413 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
414 Do not stream DECL_VINDEX.
415 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
416 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
417 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
419 2018-08-29 Richard Biener <rguenther@suse.de>
421 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
422 virtual operands that are not default defs to honor region
424 (rpo_vn_valueize): Remove ineffective code here.
426 2018-08-29 Richard Biener <rguenther@suse.de>
428 PR tree-optimization/87132
429 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
430 when skipping defs reachable over backedges.
432 2018-08-29 Richard Biener <rguenther@suse.de>
434 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
435 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
436 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
437 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
438 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
439 (vn_reference_lookup_3): Remove use of const_parms.
440 (free_rpo_vn): Do not free const_parms.
441 (do_rpo_vn): Do not call init_const_parms.
442 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
443 SSA_NAME_POINTS_TO_READONLY_MEMORY.
444 (call_may_clobber_ref_p_1): Likewise.
446 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
449 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
451 (-ftree-scev-cprop): Document.
453 2018-08-29 Jan Hubicka <jh@suse.cz>
455 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
457 (sreal constructor): Update.
458 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
459 sreal:operator/): Update.
461 2018-08-29 Martin Liska <mliska@suse.cz>
463 * tree-switch-conversion.c (switch_conversion::expand):
464 Strenghten assumption about gswitch statements.
466 2018-08-29 Richard Biener <rguenther@suse.de>
468 PR tree-optimization/87117
469 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
470 re-value-number released SSA VDEFs.
472 2018-08-29 Richard Biener <rguenther@suse.de>
474 PR tree-optimization/87126
475 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
477 2018-08-28 Jim Wilson <jimw@sifive.com>
479 * config/riscv/pic.md: Rewrite.
480 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
482 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
483 (SOFTF, default_load, softload, softstore): New.
485 2018-08-28 Jeff Law <law@redhat.com>
487 * fold-const.c (fold_binary_loc): Remove recently added assert.
489 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
491 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
492 to OP parmeter of generated function.
494 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
496 PR tree-optimization/87009
497 * match.pd: Add boolean optimizations.
499 2018-08-28 Martin Sebor <msebor@redhat.com>
502 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
503 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
504 (pass_walloca::gate): Use it.
505 (alloca_call_type): Same.
506 (pass_walloca::execute): Same.
507 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
509 2018-08-28 David Malcolm <dmalcolm@redhat.com>
511 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
512 GCC_VERSION for usage of "__gcc_dump_printf__" format from
515 2018-08-28 Richard Biener <rguenther@suse.de>
517 PR tree-optimization/87124
518 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
519 constants before looking up avail.
521 2018-08-28 Jakub Jelinek <jakub@redhat.com>
524 * calls.c (maybe_warn_nonstring_arg): Punt early if
525 warn_stringop_overflow is zero. Don't call get_range_strlen
526 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
527 Swap comparison operands to have constants on rhs. Only use
528 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
531 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
533 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
534 use of tree_to_shwi. Remove duplicated test for the size being
535 a whole number of bytes.
537 2018-08-28 Richard Biener <rguenther@suse.de>
539 PR tree-optimization/87117
540 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
541 Handle removed stmt without LHS (GIMPLE_NOP).
543 2018-08-28 Richard Biener <rguenther@suse.de>
545 PR tree-optimization/87117
546 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
547 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
549 2018-08-28 Richard Biener <rguenther@suse.de>
551 PR tree-optimization/87117
552 * tree-ssa-pre.c (compute_avail): Do not make expressions
553 with predicated values available.
554 (get_expr_value_id): Assert we do not run into predicated value
557 2018-08-28 Richard Biener <rguenther@suse.de>
559 PR tree-optimization/87117
560 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
561 get virtual operands.
562 (get_expr_operands): Handle STRING_CST like other decls.
564 2018-08-28 Martin Liska <mliska@suse.cz>
566 * tree.h: Update documentation of fndecl_built_in_p
570 2018-08-27 Jeff Law <law@redhat.com>
571 PR tree-optimization/87110
572 * tree-ssa-dse.c (compute_trims): Handle non-constant
575 2018-08-27 Martin Sebor <msebor@redhat.com>
577 PR tree-optimization/86914
578 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
580 2018-08-27 Martin Sebor <msebor@redhat.com>
582 PR tree-optimization/87112
583 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
584 the type of the bound argument.
586 2018-08-27 Jeff Law <law@redhat.com>
588 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
589 type does not have a TYPE_SIZE_UNIT.
591 2018-08-27 Steve Ellcey <sellcey@cavium.com>
593 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
594 with include of backend.h.
596 2018-08-27 Richard Biener <rguenther@suse.de>
598 PR tree-optimization/86927
599 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
600 use const cond reduction code.
602 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
604 PR tree-optimization/85758
605 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
607 2018-08-27 David Malcolm <dmalcolm@redhat.com>
610 * diagnostic-show-locus.c (class layout_range): Update for
611 conversion of show_caret_p to a tri-state.
612 (layout_range::layout_range): Likewise.
613 (make_range): Likewise.
614 (layout::maybe_add_location_range): Likewise.
615 (layout::should_print_annotation_line_p): Don't show annotation
616 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
617 (layout::get_state_at_point): Update for conversion of
618 show_caret_p to a tri-state. Bail out early for
619 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
620 underlining or source colorization.
621 (gcc_rich_location::add_location_if_nearby): Update for conversion
622 of show_caret_p to a tri-state.
623 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
624 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
626 (selftest::test_one_liner_labels): Likewise.
627 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
628 conversion of show_caret_p to a tri-state.
629 * pretty-print.c (text_info::set_location): Likewise.
630 * pretty-print.h (text_info::set_location): Likewise.
631 * substring-locations.c (format_warning_n_va): Likewise.
632 * tree-diagnostic.c (default_tree_printer): Likewise.
633 * tree-pretty-print.c (newline_and_indent): Likewise.
635 2018-08-27 David Malcolm <dmalcolm@redhat.com>
638 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
639 line above for line-insertion fix-it hints.
640 (selftest::test_fixit_insert_containing_newline): Update the
641 expected results, and add a test with line-numbering enabled.
643 2018-08-27 Martin Liska <mliska@suse.cz>
646 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
647 params with DECL_HAS_VALUE_EXPR_P.
649 2018-08-27 Martin Liska <mliska@suse.cz>
651 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
652 selected expansion strategy.
654 2018-08-27 Martin Liska <mliska@suse.cz>
656 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
657 * builtins.c (is_builtin_fn): Likewise.
658 * attribs.c (diag_attr_exclusions): Use new function
659 fndecl_built_in_p and remove check for FUNCTION_DECL if
661 (builtin_mathfn_code): Likewise.
662 (fold_builtin_expect): Likewise.
663 (fold_call_expr): Likewise.
664 (fold_builtin_call_array): Likewise.
665 (fold_call_stmt): Likewise.
666 (set_builtin_user_assembler_name): Likewise.
667 (is_simple_builtin): Likewise.
668 * calls.c (gimple_alloca_call_p): Likewise.
669 (maybe_warn_nonstring_arg): Likewise.
670 * cfgexpand.c (expand_call_stmt): Likewise.
671 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
672 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
673 (cgraph_node::verify_node): Likewise.
674 * cgraphclones.c (build_function_decl_skip_args): Likewise.
675 (cgraph_node::create_clone): Likewise.
676 * config/arm/arm.c (arm_insert_attributes): Likewise.
677 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
678 * dse.c (scan_insn): Likewise.
679 * expr.c (expand_expr_real_1): Likewise.
680 * fold-const.c (operand_equal_p): Likewise.
681 (fold_binary_loc): Likewise.
682 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
683 * gimple-low.c (lower_stmt): Likewise.
684 * gimple-pretty-print.c (dump_gimple_call): Likewise.
685 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
686 * gimple.c (gimple_build_call_from_tree): Likewise.
687 (gimple_call_builtin_p): Likewise.
688 (gimple_call_combined_fn): Likewise.
689 * gimplify.c (gimplify_call_expr): Likewise.
690 (gimple_boolify): Likewise.
691 (gimplify_modify_expr): Likewise.
692 (gimplify_addr_expr): Likewise.
693 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
694 * ipa-cp.c (determine_versionability): Likewise.
695 * ipa-fnsummary.c (compute_fn_summary): Likewise.
696 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
697 * ipa-split.c (visit_bb): Likewise.
698 (split_function): Likewise.
699 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
700 * lto-cgraph.c (input_node): Likewise.
701 * lto-streamer-out.c (write_symbol): Likewise.
702 * omp-low.c (setjmp_or_longjmp_p): Likewise.
703 (lower_omp_1): Likewise.
704 * predict.c (strip_predict_hints): Likewise.
705 * print-tree.c (print_node): Likewise.
706 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
707 * trans-mem.c (is_tm_irrevocable): Likewise.
708 (is_tm_load): Likewise.
709 (is_tm_simple_load): Likewise.
710 (is_tm_store): Likewise.
711 (is_tm_simple_store): Likewise.
712 (is_tm_abort): Likewise.
713 (tm_region_init_1): Likewise.
714 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
715 * tree-cfg.c (verify_gimple_call): Likewise.
716 (move_stmt_r): Likewise.
717 (stmt_can_terminate_bb_p): Likewise.
718 * tree-eh.c (lower_eh_constructs_2): Likewise.
719 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
720 * tree-inline.c (remap_gimple_stmt): Likewise.
722 (estimate_num_insns): Likewise.
723 (fold_marked_statements): Likewise.
724 * tree-sra.c (scan_function): Likewise.
725 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
726 (optimize_stack_restore): Likewise.
727 (pass_fold_builtins::execute): Likewise.
728 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
729 (mark_all_reaching_defs_necessary_1): Likewise.
730 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
731 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
732 (pass_forwprop::execute): Likewise.
733 * tree-ssa-loop-im.c (stmt_cost): Likewise.
734 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
735 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
736 * tree-ssa-strlen.c (get_string_length): Likewise.
737 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
738 (find_func_aliases_for_call): Likewise.
739 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
740 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
741 * tree-tailcall.c (find_tail_calls): Likewise.
742 * tree.c (need_assembler_name_p): Likewise.
743 (free_lang_data_in_decl): Likewise.
744 (get_call_combined_fn): Likewise.
745 * ubsan.c (is_ubsan_builtin_p): Likewise.
746 * varasm.c (incorporeal_function_p): Likewise.
747 * tree.h (DECL_BUILT_IN): Remove and replace with
749 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
750 (fndecl_built_in_p): New.
752 2018-08-27 Martin Liska <mliska@suse.cz>
754 PR tree-optimization/86847
755 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
756 Dump also subtree probability.
757 (switch_decision_tree::do_jump_if_equal): New function.
758 (switch_decision_tree::emit_case_nodes): Handle special
759 situations in balanced tree that can be emitted much simpler.
760 Fix calculation of probabilities that happen in tree expansion.
761 * tree-switch-conversion.h (struct cluster): Add
763 (struct simple_cluster): Likewise.
764 (struct case_tree_node): Add new function has_child.
765 (do_jump_if_equal): New.
767 2018-08-27 Martin Liska <mliska@suse.cz>
769 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
770 Add new argument to bit_test_cluster constructor.
771 (bit_test_cluster::emit): Set bits really number of values
773 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
774 probability argument.
775 * tree-switch-conversion.h (struct bit_test_cluster):
776 Add m_handles_entire_switch.
778 2018-08-27 Martin Liska <mliska@suse.cz>
780 PR tree-optimization/86702
781 * tree-switch-conversion.c (jump_table_cluster::emit):
782 Make probabilities even for values in jump table
783 according to number of cases handled.
784 (switch_decision_tree::compute_cases_per_edge): Pass
785 argument to reset_out_edges_aux function.
786 (switch_decision_tree::analyze_switch_statement): Likewise.
787 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
790 2018-08-27 Martin Liska <mliska@suse.cz>
792 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
793 cfun argument explicitly.
794 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
795 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
796 function gimple_switch_default_bb.
797 (convert_switch_statements):
799 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
800 * stmt.c (label_to_block_fn): Use label_to_block and pass
801 cfun argument explicitly and use gimple_switch_label_bb.
802 (expand_case): Likewise.
803 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
804 cfun argument explicitly. Likewise.
805 (make_edges_bb): Likewise.
806 (make_cond_expr_edges): Likewise.
807 (get_cases_for_edge): Likewise.
808 (make_gimple_switch_edges): Likewise.
809 (label_to_block_fn): Likewise.
810 (label_to_block): Likewise.
811 (make_goto_expr_edges): Likewise.
812 (make_gimple_asm_edges): Likewise.
813 (main_block_label): Likewise.
814 (group_case_labels_stmt): Likewise.
815 (find_taken_edge_computed_goto): Likewise.
816 (find_taken_edge_switch_expr): Likewise.
817 (gimple_verify_flow_info): Likewise.
818 (gimple_redirect_edge_and_branch): Likewise.
819 (gimple_switch_label_bb): New function.
820 (gimple_switch_default_bb): Likewise.
821 (gimple_switch_edge): Likewise.
822 (gimple_switch_default_edge): Likewise.
823 * tree-cfg.h (label_to_block_fn): Remove and replace ...
824 (label_to_block): ... with this.
825 (gimple_switch_label_bb): New.
826 (gimple_switch_default_bb): Likewise.
827 (gimple_switch_edge): Likewise.
828 (gimple_switch_default_edge): Likewise.
829 * tree-cfgcleanup.c (convert_single_case_switch): Use
830 new gimple functions and pass new argument to label_to_block.
831 (cleanup_control_flow_bb):
832 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
833 cfun argument explicitly.
834 (make_eh_edges): Likewise.
835 (redirect_eh_dispatch_edge): Likewise.
836 (lower_resx): Likewise.
837 (lower_eh_dispatch): Likewise.
838 (maybe_remove_unreachable_handlers): Likewise.
839 (unsplit_eh): Likewise.
840 (cleanup_empty_eh): Likewise.
841 (verify_eh_edges): Likewise.
842 (verify_eh_dispatch_edge): Likewise.
843 * tree-ssa-dom.c (record_edge_info): Likewise.
844 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
845 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
846 (thread_through_normal_block): Likewise.
847 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
848 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
849 * tree-switch-conversion.c (switch_conversion::collect): Use new
851 (switch_conversion::check_final_bb): Likewise.
852 (switch_conversion::gather_default_values): Pass new argument
854 (switch_conversion::build_constructors): Likewise.
855 (switch_decision_tree::compute_cases_per_edge): Use new
856 gimple_switch_edge function.
857 (switch_decision_tree::analyze_switch_statement): Pass new argument
859 (switch_decision_tree::try_switch_expansion): Use
860 gimple_switch_default_edge.
861 * tree-vrp.c (find_switch_asserts): Pass new argument
863 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
864 (vr_values::simplify_switch_using_ranges): Likewise.
866 2018-08-27 Richard Biener <rguenther@suse.de>
868 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
869 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
871 * tree-ssa-sccvn.h (struct vn_pval): New structure.
872 (struct vn_nary_op_s): Add unwind_to member. Add
873 predicated_values flag and put result into a union together
874 with a linked list of vn_pval.
875 (struct vn_ssa_aux): Add name member to make maintaining
876 a map of SSA name to vn_ssa_aux possible. Remove no longer
877 needed info, dfsnum, low, visited, on_sccstack, use_processed
878 and range_info_anti_range_p members.
879 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
880 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
882 (vn_valueize): New global.
883 (vn_context_bb): Likewise.
884 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
885 VN_INFO_PTR_INFO): Remove.
886 * tree-ssa-sccvn.c: ... (rewrite)
887 (pass_fre::execute): For -O2+ initialize loops and run
888 RPO VN in optimistic mode (iterating). For -O1 and -Og
889 run RPO VN in non-optimistic mode.
890 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
891 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
892 * doc/invoke.texi (sccvn-max-scc-size): Remove.
893 (rpo-vn-max-loop-depth): Document.
894 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
895 when valuezing the VUSE signals we walked out of the region.
896 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
897 (phi_translate): Set VN context block to use for availability
899 (compute_avail): Likewise.
900 (pre_valueize): New function.
901 (pass_pre::execute): Adjust to the RPO VN API.
903 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
904 (propagate_constants_for_unrolling): Remove.
905 (tree_unroll_loops_completely): Perform value-numbering
906 on the unrolled bodies loop parent.
908 2018-08-27 Richard Biener <rguenther@suse.de>
910 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
911 for partial antic compute.
913 2018-08-27 Jakub Jelinek <jakub@redhat.com>
915 PR rtl-optimization/87065
916 * combine.c (simplify_if_then_else): Formatting fix.
917 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
919 (known_cond): Don't return const_true_rtx for vector modes. Use
920 CONST0_RTX instead of const0_rtx. Formatting fixes.
922 2018-08-27 Martin Liska <mliska@suse.cz>
924 PR gcov-profile/87069
925 * gcov.c (process_file): Record files already processed
926 and warn about a file being processed multiple times.
928 2018-08-27 Martin Liska <mliska@suse.cz>
931 * config/aarch64/aarch64.c (aarch64_override_options_internal):
932 Set default values for x_aarch64_*_string strings.
933 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
934 prefix. For -mabi do not print '=ABI' in help and use
935 <option_value> format for -msve-vector-bits and -moverride
938 2018-08-26 Jeff Law <law@redhat.com>
940 * config/mips/frame-header-opt.c: Include "backend.h" rather than
943 2018-08-26 Marek Polacek <polacek@redhat.com>
945 PR c++/87029, Implement -Wredundant-move.
946 * doc/invoke.texi: Document -Wredundant-move.
948 2018-08-25 Martin Sebor <msebor@redhat.com>
950 PR tree-optimization/87059
951 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
952 to the same type as the other.
953 * fold-const.c (fold_binary_loc): Assert expectation.
955 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
957 * config/darwin.c (machopic_legitimize_pic_address): Clean up
958 extraneous parentheses, dead code section and formatting.
960 2018-08-24 David Malcolm <dmalcolm@redhat.com>
963 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
964 wide enough for jumps in the line-numbering to be visible.
965 (layout::print_gap_in_line_numbering): New member function.
966 (layout::calculate_line_spans): When using line numbering, merge
967 line spans that are only 1 line apart.
968 (diagnostic_show_locus): When printing line numbers, show gaps in
969 line numbering directly, rather than printing headers.
970 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
971 line-numbering with multiple line spans.
972 (selftest::test_fixit_insert_containing_newline_2): Add test of
973 line-numbering, in which the spans are close enough to be merged.
975 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
977 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
978 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
979 * tree-vrp.c (range_is_nonnull): Remove.
980 (range_includes_zero_p): Accept value_range instead of min/max.
981 (extract_range_from_binary_expr_1): Do not early bail on
983 Use range_includes_zero_p instead of range_is_nonnull.
984 (extract_range_from_unary_expr): Use range_includes_zero_p instead
986 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
987 special case VR_ANTI_RANGE.
988 (vrp_finalize): Same.
989 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
991 (range_is_nonnull): Remove.
992 * vr-values.c (vrp_stmt_computes_nonzero): Use
993 range_includes_zero_p instead of range_is_nonnull.
994 (extract_range_basic): Pass value_range to range_includes_zero_p
995 instead of range_is_nonnull.
997 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
999 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1000 * emit-rtl.h (rtl_data): Remove return_bnd.
1001 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1002 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1003 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1004 (POINTER_BOUNDS_MODE): Remove definition.
1005 (make_pointer_bounds_mode): Remove.
1006 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1007 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1008 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1009 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1010 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1011 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1012 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1014 * config/i386/i386-modes.def (BND32, BND64): Remove.
1015 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1016 (dbx64_register_map): Ditto.
1017 (svr4_dbx_register_map): Ditto.
1018 (indirect_thunk_bnd_needed): Remove.
1019 (indirect_thunks_bnd_used): Ditto.
1020 (indirect_return_bnd_needed): Ditto.
1021 (indirect_return_via_cx_bnd): Ditto.
1022 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1023 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1024 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1025 (output_indirect_thunk_function): Remove handling of
1026 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1027 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1028 (ix86_save_reg): Remove handling of crtl->return_bnd.
1029 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1030 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1031 and UNSPEC_BNDLX_ADDR.
1032 (ix86_output_indirect_branch_via_reg): Remove handling of
1033 indirect_thunk_prefix_bnd.
1034 (ix86_output_indirect_branch_via_push): Ditto.
1035 (ix86_output_function_return): Ditto.
1036 (ix86_output_indirect_function_return): Ditto.
1037 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1038 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1039 (CALL_USED_REGISTERS): Ditto.
1040 (REG_ALLOC_ORDER): Update for removal of bound registers.
1041 (HI_REGISTER_NAMES): Ditto.
1042 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1043 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1044 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1045 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1046 (FIRST_PSEUDO_REG): Update.
1047 (BND): Remove mode iterator.
1048 * config/i386/predicates.md (bnd_mem_operator): Remove.
1050 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1052 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1055 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1057 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1058 the case in which the permute needs only a single element and
1059 repeats for every vector of the result. Extend that case to
1060 handle variable-length vectors.
1061 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1063 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1066 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1067 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1069 2018-08-24 Richard Biener <rguenther@suse.de>
1071 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1072 bb_flags_allocated members.
1073 (auto_flag): New RAII class for allocating flags.
1074 (auto_edge_flag): New RAII class for allocating edge flags.
1075 (auto_bb_flag): New RAII class for allocating bb flags.
1076 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1078 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1079 in favor of temporarily allocated BB flag.
1080 * hsa-brig.c: Re-order includes.
1081 * hsa-dump.c: Likewise.
1082 * hsa-regalloc.c: Likewise.
1083 * print-rtl.c: Likewise.
1084 * profile-count.c: Likewise.
1086 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1089 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1092 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1095 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1096 from wide_int_range_multiplicative_op.
1098 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1100 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1103 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1105 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1108 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1110 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1111 full GENERIC expression used for replacement.
1113 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1115 * tree-vrp.c (abs_extent_range): Remove.
1116 (extract_range_into_wide_ints): Pass wide ints by reference.
1117 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1118 Pass wide ints by reference in all calls to
1119 extract_range_into_wide_ints.
1120 * wide-int-range.cc (wide_int_range_div): New.
1121 * wide-int-range.h (wide_int_range_div): New.
1122 (wide_int_range_includes_zero_p): New.
1123 (wide_int_range_zero_p): New.
1125 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1127 * config/aarch64/aarch64.md (arches): New enum.
1128 (arch): New enum attr.
1129 (arch_enabled): New attr.
1130 (enabled): Now uses arch_enabled only.
1131 (simd, sve, fp16): Removed attribute.
1132 (fp): Attr now defined in terms of 'arch'.
1133 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1134 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1135 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1136 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1137 attributes into 'arch'.
1138 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1139 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1140 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1141 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1142 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1143 'simd' attribute into 'arch'.
1144 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1145 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1146 Convert use of 'fp' attribute to 'arch'.
1147 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1148 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1150 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1151 (different modes) Merge 'fp' and 'simd' into 'arch'.
1152 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1155 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1157 PR rtl-optimization/87026
1158 * expmed.c (canonicalize_comparison): If we can no longer create
1159 pseudoregisters, don't.
1161 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1164 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1166 * config/arm/arm.c (speculation_barrier_libfunc): New static
1168 (arm_init_libfuncs): Initialize it.
1169 (arm_emit_speculation_barrier): New function.
1170 * config/arm/arm.md (speculation_barrier): Call
1171 arm_emit_speculation_barrier for architectures that do not have
1173 (speculation_barrier_insn): Only match on Armv7 or later.
1175 2018-08-23 Richard Biener <rguenther@suse.de>
1178 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1181 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1183 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1184 of single-vector TBLs.
1185 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1188 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1191 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1192 aarch64_evpc_tbl guard.
1194 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1196 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1199 2018-08-22 Martin Sebor <msebor@redhat.com>
1202 * tree-pretty-print.c (pretty_print_string): Add argument.
1203 (dump_generic_node): Call to pretty_print_string with string size.
1205 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1207 PR rtl-optimization/86771
1208 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1209 of two SETs into those two SETs, one to be placed at i2, if that SETs
1210 destination is modified between i2 and i3.
1212 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1214 PR tree-optimization/86725
1215 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1217 (vect_analyze_scalar_cycles_1): Check it.
1219 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1221 PR tree-optimization/86725
1222 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1223 an outer loop phi as a double reduction, make sure that the
1224 single user of the phi result is an inner loop phi.
1226 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1228 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1229 grouped stores with gaps to a strided group.
1231 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1233 * tree-vect-stmts.c (get_group_load_store_type)
1234 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1235 first statement in a group.
1237 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1239 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1240 the sequence used in gcc/gcc.c.
1242 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1245 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1248 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1250 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1251 Darwin10-specific unwinder-shim.
1252 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1253 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1254 New to cater for Darwin10 Rosetta.
1256 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1258 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1259 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1261 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1266 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1267 (dwarf2out_switch_text_section): Generate a local label for the
1268 second function sub-section and apply it as the second FDE start
1270 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1271 second sub-section start.
1273 2018-08-22 Richard Biener <rguenther@suse.de>
1275 PR tree-optimization/86988
1276 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1278 2018-08-22 Richard Biener <rguenther@suse.de>
1280 PR tree-optimization/86945
1281 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1283 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1285 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1286 a comment about how uses of r2 for .sdata2 come about.
1288 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1290 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1292 2018-08-21 Marek Polacek <polacek@redhat.com>
1294 PR c++/86981, Implement -Wpessimizing-move.
1295 * doc/invoke.texi: Document -Wpessimizing-move.
1297 2018-08-21 Jan Hubicka <jh@suse.cz>
1299 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1300 * tree.h (is_redundant_typedef): Remove.
1301 * dwarf2out.c (is_redundant_typedef): Turn into static function.
1303 2018-08-21 Jan Hubicka <jh@suse.cz>
1305 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1308 2018-08-21 Tamar Christina <tamar.christina@arm.com>
1310 * expmed.c (extract_low_bits): Reject invalid subregs early.
1312 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1315 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1318 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1320 * config/vxworks.h: Guard vxworks_asm_out_constructor and
1321 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1322 * config/vxworks.c: Likewise.
1324 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1326 * config/vxworks.c: Set targetm.have_ctors_dtors
1327 if HAVE_INITFINI_ARRAY_SUPPORT.
1328 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1329 if HAVE_INITFINI_ARRAY_SUPPORT.
1331 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1333 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1334 default search path for VxWorks < 7.
1336 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1338 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1339 (get_format_string): Refer to c_getstr.
1341 2018-08-21 Tom de Vries <tdevries@suse.de>
1343 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1344 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1345 (debuginfo_early_stop): Declare.
1346 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1347 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1348 (debuginfo_early_stop): New function.
1349 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1350 and debuginfo_early_stop.
1351 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1352 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1353 (general_init): Call debuginfo_early_init.
1354 (finalize): Call debuginfo_fini.
1355 (do_compile): Call debuginfo_init.
1356 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1358 (@item -fdump-debug, @item -fdump-earlydebug): Add.
1360 2018-08-21 Tom de Vries <tdevries@suse.de>
1362 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1363 flag_dump_noaddr and flag_dump_unnumbered.
1365 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
1367 * wide-int-range.cc (wide_int_range_abs): New.
1368 (wide_int_range_order_set): Rename from wide_int_range_min_max.
1369 * wide-int-range.h (wide_int_range_abs): New.
1370 (wide_int_range_min_max): New.
1371 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1372 case to call wide_int_range_abs.
1373 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1374 (extract_range_from_abs_expr): Delete.
1376 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
1379 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1380 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1383 2018-08-20 Nathan Sidwell <nathan@acm.org>
1384 Jeff Law <law@redhat.com>
1386 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1387 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1389 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1392 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1393 (decl_attributes): Likewise.
1394 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1396 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1397 * diagnostic-core.h (class auto_diagnostic_group): New class.
1398 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1399 (diagnostic_report_diagnostic): Handle the first diagnostics within
1401 (emit_diagnostic): Add auto_diagnostic_group instance.
1403 (inform_n): Likewise.
1404 (warning): Likewise.
1405 (warning_at): Likewise.
1406 (warning_n): Likewise.
1407 (pedwarn): Likewise.
1408 (permerror): Likewise.
1410 (error_n): Likewise.
1411 (error_at): Likewise.
1413 (fatal_error): Likewise.
1414 (internal_error): Likewise.
1415 (internal_error_no_backtrace): Likewise.
1416 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1417 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1418 * diagnostic.h (struct diagnostic_context): Add fields
1419 "diagnostic_group_nesting_depth",
1420 "diagnostic_group_emission_count", "begin_group_cb",
1422 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1423 Add auto_diagnostic_group instance(s).
1424 (find_explicit_erroneous_behavior): Likewise.
1425 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1426 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1427 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1428 (gimplify_va_arg_expr): Likewise.
1429 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1430 (HSA_SORRY_AT): Likewise.
1431 * ipa-devirt.c (compare_virtual_tables): Likewise.
1432 (warn_odr): Likewise.
1433 * multiple_target.c (expand_target_clones): Likewise.
1434 * opts-common.c (cmdline_handle_error): Likewise.
1435 * reginfo.c (globalize_reg): Likewise.
1436 * substring-locations.c (format_warning_n_va): Likewise.
1437 * tree-inline.c (expand_call_inline): Likewise.
1438 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1439 * tree-ssa-loop-niter.c
1440 (do_warn_aggressive_loop_optimizations): Likewise.
1441 * tree-ssa-uninit.c (warn_uninit): Likewise.
1442 * tree.c (warn_deprecated_use): Likewise.
1444 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
1447 * config/i386/i386.md (eh_return): Always update EH return
1448 address in word_mode.
1450 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
1452 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1453 TARGET_SPLIT_COMPLEX_ARG is defined.
1455 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1457 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1459 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1462 * expr.c (expand_assignment): Assert that bitpos is positive.
1463 (store_field): Likewise
1464 (expand_expr_real_1): Make sure that bitpos is positive.
1465 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1468 2018-08-20 Nathan Sidwell <nathan@acm.org>
1470 * Makefile.in (CPP_ID_DATA_H): Delete.
1471 (CPP_INTERNAL_H): Don't add it.
1472 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1473 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1475 2018-08-20 Richard Biener <rguenther@suse.de>
1477 PR tree-optimization/78655
1478 * tree-vrp.c (extract_range_from_binary_expr_1): Make
1479 pointer + offset nonnull if either operand is nonnull work.
1481 2018-08-20 Tom de Vries <tdevries@suse.de>
1483 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1484 unless the referenced die describes the added property using
1485 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1486 Otherwise, add a DW_AT_location to the referenced die.
1488 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1491 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1492 register_operand when calling ix86_set_reg_reg_cost.
1493 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1494 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1495 predicate and to 1 otherwise.
1497 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1499 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1500 emit a diagnostic that it is not supported and reset the option.
1501 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1502 supported and consume the option. (ASM_FINAL_SPEC): New.
1504 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1506 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1509 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
1511 C-SKY port: Documentation
1513 * doc/extend.texi (C-SKY Function Attributes): New section.
1514 * doc/invoke.texi (Option Summary): Add C-SKY options.
1515 (C-SKY Options): New section.
1516 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1518 2018-08-17 Jojo <jijie_rong@c-sky.com>
1519 Huibin Wang <huibin_wang@c-sky.com>
1520 Sandra Loosemore <sandra@codesourcery.com>
1521 Chung-Lin Tang <cltang@codesourcery.com>
1523 C-SKY port: Backend implementation
1525 * config/csky/*: New.
1526 * common/config/csky/*: New.
1528 2018-08-17 Jojo <jijie_rong@c-sky.com>
1529 Huibin Wang <huibin_wang@c-sky.com>
1530 Sandra Loosemore <sandra@codesourcery.com>
1531 Chung-Lin Tang <cltang@codesourcery.com>
1532 Andrew Jenner <andrew@codesourcery.com>
1534 C-SKY port: Configury
1536 * config.gcc (csky-*-*): New.
1537 * configure.ac: Add csky to targets for dwarf2 debug_line support.
1538 * configure: Regenerated.
1540 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1542 * dump-context.h: Include "dumpfile.h".
1543 (dump_context::dump_printf_va): Convert final param from va_list
1544 to va_list *. Convert from ATTRIBUTE_PRINTF to
1545 ATTRIBUTE_GCC_DUMP_PRINTF.
1546 (dump_context::dump_printf_loc_va): Likewise.
1547 * dumpfile.c: Include "stringpool.h".
1548 (make_item_for_dump_printf_va): Delete.
1549 (make_item_for_dump_printf): Delete.
1550 (class dump_pretty_printer): New class.
1551 (dump_pretty_printer::dump_pretty_printer): New ctor.
1552 (dump_pretty_printer::emit_items): New member function.
1553 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1555 (dump_pretty_printer::emit_item): New member function.
1556 (dump_pretty_printer::stash_item): New member function.
1557 (dump_pretty_printer::format_decoder_cb): New member function.
1558 (dump_pretty_printer::decode_format): New member function.
1559 (dump_context::dump_printf_va): Reimplement in terms of
1560 dump_pretty_printer.
1561 (dump_context::dump_printf_loc_va): Convert final param from va_list
1563 (dump_context::begin_scope): Reimplement call to
1564 make_item_for_dump_printf.
1565 (dump_printf): Update for change to dump_printf_va.
1566 (dump_printf_loc): Likewise.
1567 (selftest::test_capture_of_dump_calls): Convert "stmt" from
1568 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
1569 with %T, %E, and %G.
1570 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1571 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1572 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1573 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1574 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1575 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1576 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1577 within a dump_printf_loc call to "%wu".
1578 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1579 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
1580 missing space after "=".
1581 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1582 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1583 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1584 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1585 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
1586 duplicate "vectorized" from message.
1588 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1590 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1591 polyNxK_t element's TYPE_STRING_FLAG.
1593 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1595 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1596 (they were unnamed before). Fix comments.
1598 2018-08-17 Nathan Sidwell <nathan@acm.org>
1600 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1602 2018-08-17 Richard Biener <rguenther@suse.de>
1604 PR tree-optimization/86841
1605 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1607 2018-08-17 Martin Liska <mliska@suse.cz>
1609 * common.opt: Remove Warn, Init and Report for options with
1610 Ignore/Deprecated flag. Warning is done automatically for
1612 * config/i386/i386.opt: Likewise.
1613 * config/ia64/ia64.opt: Likewise.
1614 * config/rs6000/rs6000.opt: Likewise.
1615 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1616 Remove usage of flag_check_pointer_bounds.
1617 * lto-wrapper.c (merge_and_complain): Do not handle
1618 OPT_fcheck_pointer_bounds.
1619 (append_compiler_options): Likewise.
1620 * opt-functions.awk: Do not handle Deprecated.
1621 * optc-gen.awk: Check that Var, Report and Init are not
1622 used for an option with Ignore/Deprecated flag.
1623 * opts-common.c (decode_cmdline_option): Do not report
1625 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1627 * opts.h (struct cl_option): Remove cl_deprecated flag.
1628 (CL_ERR_DEPRECATED): Remove error enum value.
1630 2018-08-17 Richard Biener <rguenther@suse.de>
1633 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1634 across a va-arg-pack using call adjust its return value accordingly.
1636 2018-08-16 Martin Sebor <msebor@redhat.com>
1638 PR tree-optimization/86853
1639 * gimple-ssa-sprintf.c (struct format_result): Rename member.
1640 (struct fmtresult): Add member and initialize it in ctors.
1641 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
1642 (format_string): Handle %S the same as %ls. Set MAYFAIL.
1643 (format_directive): Set POSUNDER4K when MAYFAIL is set.
1644 (parse_directive): Handle %C same as %c.
1645 (sprintf_dom_walker::compute_format_length): Adjust.
1646 (is_call_safe): Adjust.
1648 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1650 * builtins.c (c_strlen): Add new parameter eltsize. Use it
1651 for determining how to count the elements.
1652 * builtins.h (c_strlen): Adjust prototype.
1653 * expr.c (string_constant): Add new parameter mem_size.
1654 Set *mem_size appropriately.
1655 * expr.h (string_constant): Adjust protoype.
1656 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1657 * gimple-fold.h (get_range_strlen): Adjust prototype.
1658 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1659 (format_string): Call get_string_length with eltsize.
1661 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1663 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1664 to emit the span, rather than setting it as the prefix.
1666 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1668 * diagnostic-show-locus.c (layout::start_annotation_line): Add
1669 "margin_char" parameter, defaulting to space. Use it in place
1670 of pp_space for the initial part of the margin.
1671 (layout::print_leading_fixits): Use '+' when filling the margin
1672 of line-insertion fix-it hints.
1674 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1676 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1679 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1681 * config/rs6000/altivec.md: Don't set length attribute to the default
1683 * config/rs6000/darwin.md: Ditto.
1684 * config/rs6000/dfp.md: Ditto.
1685 * config/rs6000/htm.md: Ditto.
1686 * config/rs6000/rs6000.md: Ditto.
1687 * config/rs6000/sync.md: Ditto.
1688 * config/rs6000/vsx.md: Ditto.
1690 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1692 * config/rs6000/altivec.md: Don't set length attribute to the default
1693 value, for branch instructions.
1694 * config/rs6000/darwin.md: Ditto.
1695 * config/rs6000/rs6000.md: Ditto.
1697 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1699 * config/rs6000/rs6000.md (length): Always define as const_int 4.
1700 (unnamed conditional branch define_insn): Set length to 4 or 8
1701 depending on offset.
1702 (<bd>_<mode>): Similar, for alternative 0.
1703 (<bd>tf_<mode>): Ditto.
1705 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1707 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1709 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
1711 * doc/rtl.texi: Replace old RTX class names with new names.
1714 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
1716 * expmed.h (canonicalize_comparison): New declaration.
1717 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1718 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1719 * optabs.c (prepare_cmp_insn): Likewise.
1720 * rtl.h (unsigned_condition_p): New function which checks if a
1721 comparison operator is unsigned.
1723 2018-08-16 Nathan Sidwell <nathan@acm.org>
1725 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1726 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1728 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1731 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1732 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1733 (mov<mov>): ..this and enable unconditionally.
1735 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1737 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1739 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
1741 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1742 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1743 "Common" with "Target".
1745 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1747 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1748 * doc/invoke.texi (mmitigate-rop): Remove.
1749 * config/i386/i386.c: Do not include "regrename.h".
1750 (ix86_rop_should_change_byte_p, reg_encoded_number)
1751 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
1753 (ix86_reorg): Remove call to ix86_mitigate_rop.
1754 * config/i386/i386.md (attr "modrm_class"): Remove.
1755 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
1756 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
1757 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
1759 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
1761 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
1762 allow folding of mergeh() and mergel() for the float and double types.
1763 (fold_mergehl_helper): Rework to handle building a permute tree
1766 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1768 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
1771 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1773 * common.opt (fdiagnostics-show-labels): New option.
1774 * diagnostic-show-locus.c (class layout_range): Add field
1776 (class layout): Add field "m_show_labels_p".
1777 (layout_range::layout_range): Add param "label" and use it to
1779 (make_range): Pass in NULL for new "label" param of layout_range's
1781 (layout::layout): Initialize m_show_labels_p.
1782 (layout::maybe_add_location_range): Pass in loc_range->m_label
1783 when constructing layout_range instances.
1784 (struct line_label): New struct.
1785 (layout::print_any_labels): New member function.
1786 (layout::print_line): Call it if label-printing is enabled.
1787 (selftest::test_one_liner_labels): New test.
1788 (selftest::test_diagnostic_show_locus_one_liner): Call it.
1789 * diagnostic.c (diagnostic_initialize): Initialize
1790 context->show_labels_p.
1791 * diagnostic.h (struct diagnostic_context): Add field
1793 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1794 -fno-diagnostics-show-labels.
1795 * dwarf2out.c (gen_producer_string): Add
1796 OPT_fdiagnostics_show_labels to the ignored options.
1797 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1799 (gcc_rich_location::maybe_add_expr): Likewise.
1800 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1801 label" param, defaulting to NULL.
1802 (gcc_rich_location::add_expr): Add "label" param.
1803 (gcc_rich_location::maybe_add_expr): Likewise.
1804 (class text_range_label): New class.
1805 (class range_label_for_type_mismatch): New class.
1806 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1807 of format_warning_va.
1808 (fmtwarn_n): Likewise for new params of format_warning_n_va.
1809 * lto-wrapper.c (merge_and_complain): Add
1810 OPT_fdiagnostics_show_labels to the "pick one setting" options.
1811 (append_compiler_options): Likewise to the dropped options.
1812 (append_diag_options): Likewise to the passed-on options.
1813 * opts.c (common_handle_option): Handle the new option.
1814 * selftest-diagnostic.c
1815 (test_diagnostic_context::test_diagnostic_context): Enable
1817 * substring-locations.c: Include "gcc-rich-location.h".
1818 (format_warning_n_va): Add "fmt_label" and "param_label" params
1819 and use them as appropriate.
1820 (format_warning_va): Add "fmt_label" and "param_label" params,
1821 passing them on to format_warning_n_va.
1822 (format_warning_at_substring): Likewise.
1823 (format_warning_at_substring_n): Likewise.
1824 * substring-locations.h (format_warning_va): Add "fmt_label" and
1825 "param_label" params.
1826 (format_warning_n_va): Likewise.
1827 (format_warning_at_substring): Likewise.
1828 (format_warning_at_substring_n): Likewise.
1829 * toplev.c (general_init): Initialize global_dc->show_labels_p.
1831 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
1834 * builtins.c (expand_builtin_memcmp): Do not expand the call
1835 when overflow is detected.
1837 2018-08-15 Martin Sebor <msebor@redhat.com>
1839 PR tree-optimization/71625
1840 * config/aarch64/aarch64-builtins.c
1841 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
1843 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
1845 * config/s390/s390.c (s390_reorg): Remove loop.
1847 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1850 (darwin_function_switched_text_sections): Delete.
1851 * gcc/config/darwin.h
1852 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
1854 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1857 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
1858 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
1859 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
1861 2018-08-15 Martin Liska <mliska@suse.cz>
1863 PR tree-optimization/86925
1864 * predict.c (expr_expected_value_1): When taking
1865 later predictor, assign also probability.
1866 Use fold_build2_initializer_loc in order to fold
1867 the expression in -frounding-math.
1869 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
1871 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
1873 (expand_vec_perm_1): Try the new method.
1875 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
1878 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
1879 Check whether lra_live_max_point is 0 before dividing.
1881 2018-08-14 Martin Sebor <msebor@redhat.com>
1883 PR tree-optimization/86650
1884 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
1885 (vrp_prop::check_mem_ref): Same.
1887 2018-08-13 Liu Hao <lh_mouse@126.com>
1889 * pretty-print.c (eat_esc_sequence): Swap the foreground and
1890 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
1891 and clear it thereafter, as it only works for DBCS.
1893 2018-08-13 Liu Hao <lh_mouse@126.com>
1895 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
1896 handle returned by _get_osf_handle().
1898 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1900 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
1901 for folding vec_perm.
1903 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1905 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
1906 Add support for gimple-folding of vec_pack() and vec_unpack()
1909 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1911 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
1912 vec_xst variants to the list.
1913 (rs6000_gimple_fold_builtin): Add support for folding unaligned
1914 vector loads and stores.
1916 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
1918 * config.gcc (rs6000-ibm-aix4.x): Delete.
1919 (rs6000-ibm-aix5.1): Delete.
1920 (rs6000-ibm-aix5.2): Delete.
1921 (rs6000-ibm-aix5.3): Delete.
1922 * config/rs6000/aix43.h: Delete.
1923 * config/rs6000/aix51.h: Delete.
1924 * config/rs6000/aix52.h: Delete.
1925 * config/rs6000/t-aix43: Delete.
1927 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
1929 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1931 (s390_decompose_address): Factor out constant pool ref
1934 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1936 * config/nds32/nds32-predicates.c
1937 (nds32_can_use_bclr_p): Change return type as bool.
1938 (nds32_can_use_bset_p): Ditto.
1939 (nds32_can_use_btgl_p): Ditto.
1940 (nds32_can_use_bitci_p): Ditto.
1941 * config/nds32/nds32-protos.h
1942 (nds32_can_use_bclr_p): Change declaration.
1943 (nds32_can_use_bset_p): Ditto.
1944 (nds32_can_use_btgl_p): Ditto.
1945 (nds32_can_use_bitci_p): Ditto.
1947 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1949 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
1950 Support -msched-prolog-epilog option.
1951 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
1953 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1955 * common/config/nds32/nds32-common.c
1956 (nds32_option_optimization_table): Enalbe -malways-align.
1958 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1960 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
1962 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
1963 OPT_misr_secure_ case.
1964 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
1965 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
1966 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
1968 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
1969 (nds32_isr_info): New field security_level.
1970 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
1971 * config/nds32/nds32.md (return_internal): Consider critical attribute.
1972 * config/nds32/nds32.opt (misr-secure): New option.
1973 * config/nds32/nds32_init.inc: New file.
1974 * config/nds32/nds32_isr.h: New file.
1976 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
1978 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
1979 Update comment for atomic instructions.
1980 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
1981 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
1983 (atomic_loaddi): Revise fence expansion to only emit fence prior to
1984 load for __ATOMIC_SEQ_CST model.
1985 (atomic_loaddi_1): Remove float register target.
1986 (atomic_storedi): Handle CONST_INT values.
1987 (atomic_storedi_1): Remove float register source. Add special case
1989 (memory_barrier): New expander and insn.
1991 2018-08-11 Jakub Jelinek <jakub@redhat.com>
1993 PR tree-optimization/86835
1994 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
1995 new_stmt after def_gsi, make sure to insert new_square_stmt after
1996 that stmt, not 2 stmts before it.
1998 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2001 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2004 2018-08-10 Martin Liska <mliska@suse.cz>
2007 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2009 * builtins.c (expand_builtin_expect_with_probability):
2011 (expand_builtin_expect_with_probability): New function.
2012 (build_builtin_expect_predicate): Add new argumnet probability
2013 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2014 (fold_builtin_expect):
2017 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2018 * builtins.h (fold_builtin_expect): Set new argument.
2019 * doc/extend.texi: Document __builtin_expect_with_probability.
2020 * doc/invoke.texi: Likewise.
2021 * gimple-fold.c (gimple_fold_call): Pass new argument.
2022 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2023 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2024 * predict.c (get_predictor_value): New function.
2025 (expr_expected_value): Add new argument probability. Assume
2026 that predictor and probability are always non-null.
2027 (expr_expected_value_1): Likewise. For __builtin_expect and
2028 __builtin_expect_with_probability set probability. Handle
2029 combination in binary expressions.
2030 (tree_predict_by_opcode): Simplify code by simply calling
2031 get_predictor_value.
2032 (pass_strip_predict_hints::execute): Add handling of
2033 BUILT_IN_EXPECT_WITH_PROBABILITY.
2034 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2036 * tree.h (DECL_BUILT_IN_P): New function.
2038 2018-08-10 Martin Liska <mliska@suse.cz>
2040 PR tree-optimization/85799
2041 * passes.def: Add argument for pass_strip_predict_hints.
2042 * predict.c (class pass_strip_predict_hints): Add new argument
2044 (strip_predictor_early): New function.
2045 (pass_strip_predict_hints::execute): Call the function to
2047 (strip_predict_hints): New function.
2048 * predict.def: Fix comment.
2050 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2052 * Makefile.in: Clarify which tm.texi to copy over to assert the
2053 right to grant a GFDL license for all.
2055 2018-08-09 Jeff Law <law@redhat.com>
2057 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2060 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2062 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2065 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2067 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2068 reductions for variable-length vectors.
2070 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2073 * common.opt (fdiagnostics-show-line-numbers): New option.
2074 * diagnostic-show-locus.c (class layout): Add fields
2075 "m_show_line_numbers_p" and "m_linenum_width";
2076 (num_digits): New function.
2077 (test_num_digits): New function.
2078 (layout::layout): Initialize new fields. Update m_x_offset
2079 logic to handle any left margin.
2080 (layout::print_source_line): Print line number when requested.
2081 (layout::start_annotation_line): New member function.
2082 (layout::print_annotation_line): Call it.
2083 (layout::print_leading_fixits): Likewise.
2084 (layout::print_trailing_fixits): Likewise. Update calls to
2085 move_to_column for new parameter.
2086 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2087 it to potentially call start_annotation_line.
2088 (layout::show_ruler): Call start_annotation_line.
2089 (selftest::test_line_numbers_multiline_range): New selftest.
2090 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2091 and selftest::test_line_numbers_multiline_range.
2092 * diagnostic.c (diagnostic_initialize): Initialize
2093 show_line_numbers_p.
2094 * diagnostic.h (struct diagnostic_context): Add field
2095 "show_line_numbers_p".
2096 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2097 -fno-diagnostics-show-line-numbers.
2098 * dwarf2out.c (gen_producer_string): Add
2099 OPT_fdiagnostics_show_line_numbers to the ignored options.
2100 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2101 one setting" options.
2102 (append_compiler_options): Likewise to the dropped options.
2103 (append_diag_options): Likewise to the passed-on options.
2104 * opts.c (common_handle_option): Handle the new option.
2105 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2107 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2109 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2110 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2111 third argument of type "const signed char" to descriptions of
2112 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2113 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2114 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2115 __builtin_bcdsub_ov functions.
2117 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2119 PR tree-optimization/86858
2120 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2121 flow_bb_inside_loop_p calls.
2123 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2125 PR tree-optimization/86871
2126 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2127 instead of gimple_assign_lhs.
2129 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2132 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2133 register constraint to operand 0.
2134 (add<mode>3_carryinC): Likewise.
2135 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2137 2018-08-09 Martin Liska <mliska@suse.cz>
2140 * common.opt: Remove extra line.
2142 2018-08-09 Martin Liska <mliska@suse.cz>
2144 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2145 at the end of a line, make first letter capital and end up
2146 a sentence with a dot.
2147 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2148 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2149 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2150 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2151 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2152 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2153 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2154 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2155 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2156 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2157 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2158 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2159 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2160 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2161 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2162 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2163 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2164 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2166 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2169 * config/s390/s390.c (s390_option_override_internal): Reduce the
2170 stack-clash-protection-probe-interval param if it would be too big
2173 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2176 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2177 * config/m68k/m68k.c (handle_move_double): Don't call
2178 m68k_final_prescan_insn.
2179 (m68k_adjust_decorated_operand): Renamed from
2180 m68k_final_prescan_insn, remove first and third operand and
2182 (print_operand): Call it.
2183 (print_operand_address): Call it.
2185 2018-08-08 Nathan Sidwell <nathan@acm.org>
2187 * diagnostic.c (diagnostic_report_current_module): Use
2188 linemap_included_from & linemap_included_from_linemap.
2190 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2192 * config/aarch64/aarch64-cores.def: Add phecda core.
2193 * config/aarch64/aarch64-tune.md: Regenerate.
2194 * doc/invoke.texi: Add phecda core.
2196 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2199 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2201 * config/s390/s390.md ("movti"): Add more alternatives for
2202 constant to GPR copies.
2204 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2206 * config/s390/s390.c: Fix whitespace damage throughout the file.
2207 * config/s390/s390.h: Likewise.
2208 * config/s390/tpf.h: Likewise.
2210 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2212 * config/s390/s390.c (s390_loadrelative_operand_p):
2213 Remove TARGET_CPU_ZARCH usages.
2214 (s390_rtx_costs): Likewise.
2215 (s390_legitimate_constant_p): Likewise.
2216 (s390_cannot_force_const_mem): Likewise.
2217 (legitimate_reload_constant_p): Likewise.
2218 (s390_preferred_reload_class): Likewise.
2219 (legitimize_pic_address): Likewise.
2220 (legitimize_tls_address): Likewise.
2221 (s390_split_branches): Removed.
2222 (s390_add_execute): Removed.
2223 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2224 (s390_mainpool_start): Likewise.
2225 (s390_mainpool_finish): Likewise.
2226 (s390_mainpool_cancel): Removed.
2227 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2228 (s390_chunkify_cancel): Likewise.
2229 (s390_return_addr_rtx): Likewise.
2230 (s390_register_info): Remove split_branches_pending_p uages.
2231 (s390_optimize_register_info): Likewise.
2232 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2233 split_branches_pending_p usages.
2234 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2235 (s390_load_got): Likewise.
2236 (s390_expand_split_stack_prologue): Likewise.
2237 (output_asm_nops): Likewise.
2238 (s390_function_profiler): Likewise.
2239 (s390_emit_call): Likewise.
2240 (s390_conditional_register_usage): Likewise.
2241 (s390_optimize_prologue): Likewise.
2242 (s390_reorg): Remove TARGET_CPU_ZARCH and
2243 split_branches_pending_p usages.
2244 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2246 (s390_output_indirect_thunk_function): Likewise.
2247 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2248 (TARGET_CPU_ZARCH_P): Removed.
2249 (struct machine_function): Remove split_branches_pending_p.
2250 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2252 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2254 * common/config/s390/s390-common.c (processor_flags_table):
2256 * config.gcc: Remove with_arch/with_tune support.
2257 * config/s390/2064.md: Remove cpu attribute comparisons.
2258 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2260 * config/s390/linux.h (ASM_SPEC):
2261 Remove -march support.
2262 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2263 Use a table to get an arch level.
2264 * config/s390/s390-opts.h (enum processor_type):
2266 * config/s390/s390.c
2267 (processor_table): Remove entries, add arch_level values.
2268 (s390_issue_rate): Remove cases.
2269 (s390_option_override): Adjust
2270 s390_option_override_internal() call.
2271 (s390_option_override_internal): Remove deprecation warning.
2272 (s390_valid_target_attribute_tree): Adjust
2273 s390_option_override_internal() call.
2274 * config/s390/s390.h (struct s390_processor):
2275 Share with s390-c.c, add arch_level field.
2276 * config/s390/s390.md:
2277 Remove occurrences in cpu attribute.
2278 * config/s390/s390.opt: Remove -march/-mtune support.
2279 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2280 * doc/invoke.texi: Remove deprecation warning.
2282 2018-08-08 Luis Machado <luis.machado@linaro.org>
2284 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2286 (qdf24xx_tunings): Set vector cost structure to
2287 qdf24xx_vector_cost.
2289 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2290 <register_sextend>: Set to 3.
2292 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2295 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2296 * config/aarch64/aarch64-simd.md
2297 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2298 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2299 (aarch64_frecpx<mode>): ...this new pattern.
2300 * config/aarch64/aarch64-simd-builtins.def: Remove comment
2301 about aarch64_frecp<FRECP:frecp_suffix><mode>.
2303 2018-08-07 Martin Liska <mliska@suse.cz>
2306 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2307 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2308 * predict.def (PRED_MALLOC_NONNULL): New predictor.
2309 * doc/extend.texi: Document that malloc attribute adds
2312 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
2315 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2316 Define to speculation_safe_value_not_needed.
2318 2018-08-06 Jeff Law <law@redhat.com>
2320 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2321 the vr_values instance to cprop_into_stmt.
2322 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2323 (cprop_operand): Also query EVRP to determine if OP is a constant.
2325 2018-08-06 Nathan Sidwell <nathan@acm.org>
2327 * diagnostic.c (diagnostic_report_current_module): Reroll
2328 included-at loop. Translate text.
2330 2018-08-06 David Malcolm <dmalcolm@redhat.com>
2332 * function-tests.c (selftest::test_expansion_to_rtl): Call
2333 free_after_compilation.
2335 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2337 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2339 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
2341 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2342 loops with memory block operations from getting unrolled.
2344 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
2347 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2348 Define to speculation_safe_value_not_needed.
2350 2018-08-06 Jeff Law <law@redhat.com>
2352 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2355 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2358 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2359 with all enabled __intN types.
2361 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2363 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2365 * alias.c (record_set): Check for clobber high.
2366 * cfgexpand.c (expand_gimple_stmt): Likewise.
2367 * combine-stack-adj.c (single_set_for_csa): Likewise.
2368 * combine.c (find_single_use_1): Likewise.
2369 (set_nonzero_bits_and_sign_copies): Likewise.
2370 (get_combine_src_dest): Likewise.
2371 (is_parallel_of_n_reg_sets): Likewise.
2372 (try_combine): Likewise.
2373 (record_dead_and_set_regs_1): Likewise.
2374 (reg_dead_at_p_1): Likewise.
2375 (reg_dead_at_p): Likewise.
2376 * dce.c (deletable_insn_p): Likewise.
2377 (mark_nonreg_stores_1): Likewise.
2378 (mark_nonreg_stores_2): Likewise.
2379 * df-scan.c (df_find_hard_reg_defs): Likewise.
2380 (df_uses_record): Likewise.
2381 (df_get_call_refs): Likewise.
2382 * dwarf2out.c (mem_loc_descriptor): Likewise.
2383 * haifa-sched.c (haifa_classify_rtx): Likewise.
2384 * ira-build.c (create_insn_allocnos): Likewise.
2385 * ira-costs.c (scan_one_insn): Likewise.
2386 * ira.c (equiv_init_movable_p): Likewise.
2387 (rtx_moveable_p): Likewise.
2388 (interesting_dest_for_shprep): Likewise.
2389 * jump.c (mark_jump_label_1): Likewise.
2390 * postreload-gcse.c (record_opr_changes): Likewise.
2391 * postreload.c (reload_cse_simplify): Likewise.
2392 (struct reg_use): Add source expr.
2393 (reload_combine): Check for clobber high.
2394 (reload_combine_note_use): Likewise.
2395 (reload_cse_move2add): Likewise.
2396 (move2add_note_store): Likewise.
2397 * print-rtl.c (print_pattern): Likewise.
2398 * recog.c (decode_asm_operands): Likewise.
2399 (store_data_bypass_p): Likewise.
2400 (if_test_bypass_p): Likewise.
2401 * regcprop.c (kill_clobbered_value): Likewise.
2402 (kill_set_value): Likewise.
2403 * reginfo.c (reg_scan_mark_refs): Likewise.
2404 * reload1.c (maybe_fix_stack_asms): Likewise.
2405 (eliminate_regs_1): Likewise.
2406 (elimination_effects): Likewise.
2407 (mark_not_eliminable): Likewise.
2408 (scan_paradoxical_subregs): Likewise.
2409 (forget_old_reloads_1): Likewise.
2410 * reorg.c (find_end_label): Likewise.
2411 (try_merge_delay_insns): Likewise.
2412 (redundant_insn): Likewise.
2413 (own_thread_p): Likewise.
2414 (fill_simple_delay_slots): Likewise.
2415 (fill_slots_from_thread): Likewise.
2416 (dbr_schedule): Likewise.
2417 * resource.c (update_live_status): Likewise.
2418 (mark_referenced_resources): Likewise.
2419 (mark_set_resources): Likewise.
2420 * rtl.c (copy_rtx): Likewise.
2421 * rtlanal.c (reg_referenced_p): Likewise.
2422 (single_set_2): Likewise.
2423 (noop_move_p): Likewise.
2424 (note_stores): Likewise.
2425 * sched-deps.c (sched_analyze_reg): Likewise.
2426 (sched_analyze_insn): Likewise.
2428 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2430 * cse.c (invalidate_reg): New function extracted from...
2431 (invalidate): ...here.
2432 (canonicalize_insn): Check for clobber high.
2433 (invalidate_from_clobbers): invalidate clobber highs.
2434 (invalidate_from_sets_and_clobbers): Likewise.
2435 (count_reg_usage): Check for clobber high.
2436 (insn_live_p): Likewise.
2437 * cselib.c (cselib_expand_value_rtx_1):Likewise.
2438 (cselib_invalidate_regno): Check for clobber in setter.
2439 (cselib_invalidate_rtx): Pass through setter.
2440 (cselib_invalidate_rtx_note_stores):
2441 (cselib_process_insn): Check for clobber high.
2442 * cselib.h (cselib_invalidate_rtx): Add operand.
2444 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2446 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2447 (mark_not_eliminable): Likewise.
2448 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2449 * lra-lives.c (process_bb_lives): Check for clobber high.
2450 * lra.c (new_insn_reg): Remember clobber highs.
2451 (collect_non_operand_hard_regs): Check for clobber high.
2452 (lra_set_insn_recog_data): Likewise.
2453 (add_regs_to_insn_regno_info): Likewise.
2454 (lra_update_insn_regno_info): Likewise.
2456 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2458 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2459 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2461 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2463 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2464 (copy_insn_1): Likewise.
2465 (gen_hard_reg_clobber_high): New gen function.
2466 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2467 * genemit.c (gen_exp): Likewise.
2468 (gen_emit_seq): Pass through info.
2469 (gen_insn): Check for CLOBBER_HIGH.
2470 (gen_expand): Pass through info.
2471 (gen_split): Likewise.
2472 (output_add_clobbers): Likewise.
2473 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2474 (remove_clobbers): Likewise.
2475 * rtl.h (gen_hard_reg_clobber_high): New declaration.
2477 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2479 * doc/rtl.texi (clobber_high): Add.
2480 (parallel): Add in clobber high
2481 * rtl.c (rtl_check_failed_code3): Add function.
2482 * rtl.def (CLOBBER_HIGH): Add expression.
2483 * rtl.h (RTL_CHECKC3): Add macro.
2484 (rtl_check_failed_code3): Add declaration.
2485 (XC3EXP): Add macro.
2487 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2490 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2491 cfun->machine->max_used_stack_alignment if needed.
2493 2018-08-04 Martin Sebor <msebor@redhat.com>
2495 PR tree-optimization/86571
2496 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2499 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
2502 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2505 2018-08-03 Jeff Law <law@redhat.com>
2508 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2509 Define to speculation_safe_value_not_needed.
2511 2018-08-03 David Malcolm <dmalcolm@redhat.com>
2513 * doc/gcov.texi (-x): Remove duplicate "to".
2514 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2515 (-Wif-not-aligned): Remove duplicate "is".
2516 (-flto): Remove duplicate "the".
2517 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2518 duplicate "v5.00.b".
2519 (MSP430 Options): Remove duplicate "and" from the description
2520 of "-mgprel-sec=regexp".
2521 (x86 Options): Remove duplicate copies of "vmldLog102" and
2522 vmlsLog104 from description of "-mveclibabi=type".
2524 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
2526 * internal-fn.h (first_commutative_argument): Declare.
2527 * internal-fn.c (first_commutative_argument): New function.
2528 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2529 restrictions for pattern statements. Use first_commutative_argument
2530 to look for commutative operands in calls to internal functions.
2532 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
2534 * Makefile.in (wide-int-range.o): New.
2535 * tree-vrp.c: Move all the wide_int_* functions to...
2536 * wide-int-range.cc: ...here.
2537 * tree-vrp.h: Move all the wide_int_* prototypes to...
2538 * wide-int-range.h: ...here.
2540 2018-08-03 Tom de Vries <tdevries@suse.de>
2542 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2544 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2545 * except.c (output_function_exception_table): Do early exit if
2546 targetm_common.except_unwind_info (&global_options) == UI_NONE.
2548 2018-08-03 Martin Liska <mliska@suse.cz>
2550 * predict.c (dump_prediction): Change to 2 digits
2553 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
2555 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2557 (falkor_am_1_gtov_gtov): ... a new insn reservation.
2559 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
2561 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2562 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2563 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2564 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2565 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2567 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2569 * diagnostic-show-locus.c (diagnostic_show_locus): Use
2570 pp_take_prefix when saving the existing prefix.
2571 * diagnostic.c (diagnostic_append_note): Likewise.
2572 * langhooks.c (lhd_print_error_function): Likewise.
2573 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2574 param's type. Free the existing prefix.
2575 (pp_take_prefix): New function.
2576 (pretty_printer::pretty_printer): Drop the prefix parameter.
2577 Rename the length parameter to match the comment.
2578 (pretty_printer::~pretty_printer): Free the prefix.
2579 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2581 (struct pretty_printer): Drop the "const" from "prefix" field's
2582 type and clarify memory management.
2583 (pp_set_prefix): Drop the "const" from the 2nd param.
2584 (pp_take_prefix): New decl.
2586 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2588 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2589 for word_mode_ok here instead of passing as argument.
2590 (expand_block_compare): Change select_block_compare_mode() call.
2591 (expand_strncmp_gpr_sequence): New function.
2592 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2594 2018-08-02 Jeff Law <law@redhat.com>
2597 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2598 Define to speculation_safe_value_not_needed.
2601 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2602 Define to speculation_safe_value_not_needed.
2604 2018-08-02 Tom de Vries <tdevries@suse.de>
2607 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2608 function. Return UI_TARGET unconditionally.
2609 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2610 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2612 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2614 * genemit.c (print_overload_test): Fix typo.
2616 2018-08-02 Richard Biener <rguenther@suse.de>
2618 PR tree-optimization/86816
2619 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2620 which checks for value availability before querying it.
2621 (gvn_uses_equal): Use it.
2622 (same_succ_hash): Likewise.
2623 (gimple_equal_p): Likewise.
2625 2018-08-02 Nick Clifton <nickc@redhat.com>
2628 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2629 Define to speculation_safe_value_not_needed.
2632 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2633 Define to speculation_safe_value_not_needed.
2636 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2637 Define to speculation_safe_value_not_needed.
2640 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2641 Define to speculation_safe_value_not_needed.
2644 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2645 Define to speculation_safe_value_not_needed.
2648 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2649 Define to speculation_safe_value_not_needed.
2652 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2653 Define to speculation_safe_value_not_needed.
2656 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2657 Define to speculation_safe_value_not_needed.
2660 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2661 speculation_safe_value_not_needed.
2664 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2665 to speculation_safe_value_not_needed.
2667 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2669 * doc/md.texi: Expand the documentation of instruction names
2670 to mention port-local uses. Document '@' in pattern names.
2671 * read-md.h (overloaded_instance, overloaded_name): New structs.
2673 (md_reader::handle_overloaded_name): New member function.
2674 (md_reader::get_overloads): Likewise.
2675 (md_reader::m_first_overload): New member variable.
2676 (md_reader::m_next_overload_ptr): Likewise.
2677 (md_reader::m_overloads_htab): Likewise.
2678 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2679 m_next_overload_ptr and m_overloads_htab.
2680 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2681 (get_mode_token, get_code_token, get_int_token): New functions.
2682 (map_attr_string): Add an optional argument that passes back
2683 the associated iterator.
2684 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2685 (md_reader::handle_overloaded_name, add_overload_instance): New
2687 (apply_iterators): Handle '@' names. Report an error if '@'
2688 is used without iterators.
2689 (initialize_iterators): Initialize the new iterator_group fields.
2690 * genopinit.c (handle_overloaded_code_for)
2691 (handle_overloaded_gen): New functions.
2692 (main): Use them to print declarations of maybe_code_for_* and
2693 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2694 * genemit.c (print_overload_arguments, print_overload_test)
2695 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2696 (main): Use it to print definitions of maybe_code_for_* and
2697 maybe_gen_* functions.
2698 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2699 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2700 instead of explicit mode checks.
2701 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2702 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2703 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2704 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2705 (aarch64_expand_compare_and_swap): Likewise
2706 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2707 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2708 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2709 (aarch64_constant_pool_reload_icode): Delete.
2710 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2711 instead of aarch64_constant_pool_reload_icode. Use
2712 code_for_aarch64_reload_mov instead of explicit mode checks.
2713 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2714 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2715 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2716 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2717 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2718 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2719 (aarch64_atomic_load_op_code): Delete.
2720 (aarch64_emit_atomic_load_op): Likewise.
2721 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2722 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
2723 instead of aarch64_emit_atomic_load_op.
2724 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2725 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2726 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2727 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2728 character before the pattern name.
2729 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2730 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2731 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2732 (aarch64_frecps<mode>): Likewise.
2733 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2734 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2735 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2736 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2737 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2739 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2741 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2742 Allow HFmode constants if TARGET_FP_F16INST.
2744 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
2747 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2748 No longer check last store for clobber of address register.
2750 2018-08-02 Martin Liska <mliska@suse.cz>
2752 PR gcov-profile/86817
2753 * gcov.c (process_all_functions): New function.
2755 (process_file): Move functions processing to
2756 process_all_functions.
2758 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2760 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
2761 "const" to the "gimple *" and "rtx_insn *" parameters.
2762 * dumpfile.h (dump_user_location_t::dump_user_location_t):
2764 (dump_location_t::dump_location_t): Likewise.
2766 2018-08-01 Martin Sebor <msebor@redhat.com>
2768 PR tree-optimization/86650
2769 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
2770 rather than a "gcall *". Directly pass the data of interest
2771 to percent_K_format, rather than building a temporary CALL_EXPR
2773 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
2774 (gimple_fold_builtin_strncat): Adjust.
2775 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
2776 gcall* argument with gimple*.
2777 * gimple-ssa-warn-restrict.c (check_call): Same.
2778 (wrestrict_dom_walker::before_dom_children): Same.
2779 (builtin_access::builtin_access): Same.
2780 (check_bounds_or_overlap): Same
2781 (maybe_diag_overlap): Same.
2782 (maybe_diag_offset_bounds): Same.
2783 * tree-diagnostic.c (default_tree_printer): Move usage of
2784 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2786 * tree-pretty-print.c (percent_K_format): Add argument.
2787 * tree-pretty-print.h: Add argument.
2788 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2789 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2790 (maybe_diag_stxncpy_trunc): Same.
2791 (handle_builtin_stxncpy): Same.
2792 (handle_builtin_strcat): Same.
2794 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2796 * match.pd: Optimise pointer range checks.
2798 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2800 PR tree-optimization/86758
2801 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2802 to remove pattern statements.
2804 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2806 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2807 result of dfs_enumerate_from when constructing stmt_vec_infos,
2808 instead of additionally calling get_loop_body.
2810 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2812 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2814 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2815 When creating an iv, assert that the step is not known to be zero.
2816 (vect_setup_realignment): Update call accordingly.
2817 * tree-vect-stmts.c (vectorizable_store): Likewise.
2818 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
2820 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2822 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2823 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2824 (vectorizable_reduction): Likewise.
2825 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2826 (vect_detect_hybrid_slp_stmts): Likewise.
2827 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2829 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
2831 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2832 (wide_int_set_zero_nonzero_bits): ...this.
2833 (zero_nonzero_bits_from_vr): Rename to...
2834 (vrp_set_zero_nonzero_bits): ...this.
2835 (extract_range_from_multiplicative_op_1): Abstract wide int
2837 (wide_int_range_multiplicative_op): ...here.
2838 (extract_range_from_binary_expr_1): Extract wide int binary
2839 operations into their own functions.
2840 (wide_int_range_lshift): New.
2841 (wide_int_range_can_optimize_bit_op): New.
2842 (wide_int_range_shift_undefined_p): New.
2843 (wide_int_range_bit_xor): New.
2844 (wide_int_range_bit_ior): New.
2845 (wide_int_range_bit_and): New.
2846 (wide_int_range_trunc_mod): New.
2847 (extract_range_into_wide_ints): New.
2848 (vrp_shift_undefined_p): New.
2849 (extract_range_from_multiplicative_op): New.
2850 (vrp_can_optimize_bit_op): New.
2851 * tree-vrp.h (value_range::dump): New.
2852 (wide_int_range_multiplicative_op): New.
2853 (wide_int_range_lshift):New.
2854 (wide_int_range_shift_undefined_p): New.
2855 (wide_int_range_bit_xor): New.
2856 (wide_int_range_bit_ior): New.
2857 (wide_int_range_bit_and): New.
2858 (wide_int_range_trunc_mod): New.
2859 (zero_nonzero_bits_from_bounds): Rename to...
2860 (wide_int_set_zero_nonzero_bits): ...this.
2861 (zero_nonzero_bits_from_vr): Rename to...
2862 (vrp_set_zero_nonzero_bits): ...this.
2863 (range_easy_mask_min_max): Rename to...
2864 (wide_int_range_can_optimize_bit_op): this.
2865 * vr-values.c (simplify_bit_ops_using_ranges): Rename
2866 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2868 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2870 * tree-vectorizer.h (vect_orig_stmt): New function.
2871 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
2872 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
2873 (vect_create_epilog_for_reduction): Likewise.
2874 (vectorizable_live_operation): Likewise.
2875 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2876 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
2877 * tree-vect-stmts.c (vectorizable_call): Likewise.
2878 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2880 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2882 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
2884 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
2885 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
2886 (vect_transform_loop): Likewise.
2887 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2889 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2891 * tree-vectorizer.h (vect_schedule_slp): Return void.
2892 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2893 (vect_schedule_slp): Likewise.
2895 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2897 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
2899 (vect_transform_loop): Update calls accordingly. Schedule SLP
2900 instances before the main loop, if any exist.
2902 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2904 PR tree-optimization/86749
2905 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
2906 If the lhs is used in a COND_EXPR, check that it is being used
2907 as the "then" or "else" value.
2909 2018-08-01 Tom de Vries <tdevries@suse.de>
2912 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2913 speculation_safe_value_not_needed.
2915 2018-08-01 Richard Biener <rguenther@suse.de>
2917 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
2920 2018-08-01 Martin Liska <mliska@suse.cz>
2922 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
2923 format how successful transformation is dumped.
2924 (gimple_mod_pow2_value_transform): Likewise.
2925 (gimple_mod_subtract_transform): Likewise.
2926 (gimple_stringops_transform): Likewise.
2928 2018-08-01 Martin Liska <mliska@suse.cz>
2931 * value-prof.c (interesting_stringop_to_profile_p):
2932 Simplify the code and add BUILT_IN_MEMMOVE.
2933 (gimple_stringops_transform): Likewise.
2935 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
2937 * config/aarch64/aarch64-simd.md
2938 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
2939 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
2940 use GPI iterator instead of SI mode.
2942 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2944 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
2945 rs6000_speculation_barrier.
2946 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
2947 new barrier pattern name.
2949 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2951 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
2952 (speculation_barrier): New insn.
2954 2018-08-01 Richard Biener <rguenther@suse.de>
2957 * graphite.h: Include isl/id.h and isl/space.h to allow build
2960 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
2963 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2964 mode for COFF targets.
2965 * defaults.h (TARGET_COFF): Define.
2966 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
2967 TARGET_COFF): Define.
2968 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
2969 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
2970 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
2972 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2974 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
2975 * gimple-streamer-out.c (output_bb): Save it.
2976 * lto-streamer-in.c (input_struct_function_base): Restore
2977 instance discriminator if available. Create map on demand.
2978 * lto-streamer-out.c (output_struct_function_base): Save it if
2980 * final.c (decl_to_instance_map): Document LTO strategy.
2982 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2983 Olivier Hainque <hainque@adacore.com>
2985 * debug.h (decl_to_instance_map_t): New type.
2986 (decl_to_instance_map): Declare.
2987 (maybe_create_decl_to_instance_map): New inline function.
2988 * final.c (bb_discriminator, last_bb_discriminator): New statics,
2989 to track basic block discriminators.
2990 (final_start_function_1): Initialize them.
2991 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
2993 (decl_to_instance_map): New variable.
2994 (map_decl_to_instance, maybe_set_discriminator): New functions.
2995 (notice_source_line): Set discriminator.
2997 2018-07-31 Ian Lance Taylor <iant@golang.org>
2999 * targhooks.c (default_have_speculation_safe_value): Add
3002 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3004 * dump-context.h: Include "pretty-print.h".
3005 (dump_context::refresh_dumps_are_enabled): New decl.
3006 (dump_context::emit_item): New decl.
3007 (class dump_context): Add fields "m_test_pp" and
3009 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3010 (temp_dump_context::get_dumped_text): New decl.
3011 (class temp_dump_context): Add field "m_pp".
3012 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3013 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3015 (set_dump_file): Update for above change.
3016 (set_alt_dump_file): Likewise.
3017 (dump_loc): New overload, taking a pretty_printer *.
3018 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3019 to any test pretty-printer.
3020 (make_item_for_dump_gimple_stmt): New function, adapted from
3021 optinfo::add_gimple_stmt.
3022 (dump_context::dump_gimple_stmt): Call it, and use the result,
3023 eliminating the direct usage of dump_file and alt_dump_file in
3024 favor of indirectly using them via emit_item.
3025 (make_item_for_dump_gimple_expr): New function, adapted from
3026 optinfo::add_gimple_expr.
3027 (dump_context::dump_gimple_expr): Call it, and use the result,
3028 eliminating the direct usage of dump_file and alt_dump_file in
3029 favor of indirectly using them via emit_item.
3030 (make_item_for_dump_generic_expr): New function, adapted from
3032 (dump_context::dump_generic_expr): Call it, and use the result,
3033 eliminating the direct usage of dump_file and alt_dump_file in
3034 favor of indirectly using them via emit_item.
3035 (make_item_for_dump_printf_va): New function, adapted from
3036 optinfo::add_printf_va.
3037 (make_item_for_dump_printf): New function.
3038 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3039 and use the result, eliminating the direct usage of dump_file and
3040 alt_dump_file in favor of indirectly using them via emit_item.
3041 (make_item_for_dump_dec): New function.
3042 (dump_context::dump_dec): Call it, and use the result,
3043 eliminating the direct usage of dump_file and alt_dump_file in
3044 favor of indirectly using them via emit_item.
3045 (make_item_for_dump_symtab_node): New function, adapted from
3046 optinfo::add_symtab_node.
3047 (dump_context::dump_symtab_node): Call it, and use the result,
3048 eliminating the direct usage of dump_file and alt_dump_file in
3049 favor of indirectly using them via emit_item.
3050 (dump_context::begin_scope): Reimplement, avoiding direct usage
3051 of dump_file and alt_dump_file in favor of indirectly using them
3053 (dump_context::emit_item): New member function.
3054 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3055 Set up test pretty-printer on the underlying context. Call
3056 refresh_dumps_are_enabled.
3057 (temp_dump_context::~temp_dump_context): Call
3058 refresh_dumps_are_enabled.
3059 (temp_dump_context::get_dumped_text): New member function.
3060 (selftest::verify_dumped_text): New function.
3061 (ASSERT_DUMPED_TEXT_EQ): New macro.
3062 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3063 and then without optinfo enabled. Add uses of
3064 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3065 * dumpfile.h: Update comment for the dump_* API.
3066 * optinfo-emit-json.cc
3067 (selftest::test_building_json_from_dump_calls): Update for new
3068 param for temp_dump_context ctor.
3069 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3070 and "m_owned" field.
3071 (optinfo_item::~optinfo_item): Likewise.
3072 (optinfo::add_item): New member function.
3073 (optinfo::emit): Update comment.
3074 (optinfo::add_string): Delete.
3075 (optinfo::add_printf): Delete.
3076 (optinfo::add_printf_va): Delete.
3077 (optinfo::add_gimple_stmt): Delete.
3078 (optinfo::add_gimple_expr): Delete.
3079 (optinfo::add_tree): Delete.
3080 (optinfo::add_symtab_node): Delete.
3081 (optinfo::add_dec): Delete.
3082 * optinfo.h (class dump_context): New forward decl.
3083 (optinfo::add_item): New decl.
3084 (optinfo::add_string): Delete.
3085 (optinfo::add_printf): Delete.
3086 (optinfo::add_printf_va): Delete.
3087 (optinfo::add_gimple_stmt): Delete.
3088 (optinfo::add_gimple_expr): Delete.
3089 (optinfo::add_tree): Delete.
3090 (optinfo::add_symtab_node): Delete.
3091 (optinfo::add_dec): Delete.
3092 (optinfo::add_poly_int): Delete.
3093 (optinfo_item::optinfo_item): Remove "owned" param.
3094 (class optinfo_item): Remove field "m_owned".
3096 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3099 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3100 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3101 requested variable alignment.
3102 (expand_one_ssa_partition): Likewise.
3103 (expand_one_var): Likewise.
3105 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3107 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3108 to speculation_safe_value_not_needed.
3110 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3112 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3113 * targhooks.c (speculation_safe_value_not_needed): New function.
3114 * target.def (have_speculation_safe_value): Update documentation.
3115 * doc/tm.texi: Regenerated.
3117 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3119 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3120 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3122 (despeculate_copy<ALLI:mode>_insn): New insn.
3123 (despeculate_copyti_insn): New insn.
3124 (despeculate_simple<ALLI:mode>): New insn
3125 (despeculate_simpleti): New insn.
3126 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3128 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3129 aarch64_speculation_safe_value.
3130 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3132 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3134 * config/aarch64/aarch64-speculation.cc: New file.
3135 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3136 before pass_reorder_blocks.
3137 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3139 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3140 X14 and X15 when tracking speculation.
3141 * config/aarch64/aarch64.md (register name constants): Add
3142 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3143 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3144 (speculation_barrier): New insn attribute.
3145 (cmp<mode>): Allow SP in comparisons.
3146 (speculation_tracker): New insn.
3147 (speculation_barrier): Add speculation_barrier attribute.
3148 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3149 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3150 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3152 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3154 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3155 aarch64_track_speculation is true.
3156 (tb<optab><mode>1): Likewise.
3157 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3158 generate CB[N]Z when tracking speculation.
3159 (aarch64_split_compare_and_swap): Likewise.
3160 (aarch64_split_atomic_op): Likewise.
3162 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3164 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3166 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3168 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3169 (speculation_barrier): New insn.
3171 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3173 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3174 * config/arm/arm.md (speculation_barrier): New expand.
3175 (speculation_barrier_insn): New pattern.
3177 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3179 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3180 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3181 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3182 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3184 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3185 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3186 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3187 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3188 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3189 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3190 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3191 * builtins.c (expand_speculation_safe_value): New function.
3192 (expand_builtin): Call it.
3193 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3194 * doc/extend.texi: Document __builtin_speculation_safe_value.
3195 * doc/md.texi: Document "speculation_barrier" pattern.
3196 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3197 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3198 * doc/tm.texi: Regenerated.
3199 * target.def (have_speculation_safe_value, speculation_safe_value): New
3201 * targhooks.c (default_have_speculation_safe_value): New function.
3202 (default_speculation_safe_value): New function.
3203 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3204 (default_speculation_safe_value): Add prototype.
3206 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3208 * dump-context.h (dump_context::dump_loc): New decl.
3209 * dumpfile.c (dump_context::dump_loc): New member function.
3210 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3211 and dump_gimple_stmt.
3212 (dump_context::dump_gimple_expr_loc): Likewise, using
3214 (dump_context::dump_generic_expr_loc): Likewise, using
3216 (dump_context::dump_printf_loc_va): Likewise, using
3218 (dump_context::begin_scope): Explicitly using the global function
3219 "dump_loc", rather than the member function.
3221 2018-07-31 Martin Sebor <msebor@redhat.com>
3223 PR tree-optimization/86741
3224 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3226 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3228 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3229 depend on whether prefetch instructions will be emitted or not.
3230 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3231 will be emitted or not.
3232 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3233 (TARGET_SETMEM_PFD): New macros.
3235 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3237 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3238 (NULL_STMT_VEC_INFO): Delete.
3239 (stmt_vec_info::operator*): Likewise.
3240 (stmt_vec_info::operator gimple *): Likewise.
3241 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3242 of NULL_STMT_VEC_INFO.
3243 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3244 (vect_reassociating_reduction_p): Likewise.
3245 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3246 (vectorizable_store): Likewise.
3247 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3248 (vec_info::free_stmt_vec_infos): Likewise.
3250 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3252 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3253 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3255 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3257 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3258 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3259 (vec_info::free_stmt_vec_info): New private member functions.
3260 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3261 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3262 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3263 set_stmt_vec_info_vec and free_stmt_vec_infos.
3264 * tree-vect-loop.c (_loop_vec_info): Remove call to
3265 set_stmt_vec_info_vec.
3266 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3267 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3268 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3269 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3270 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3271 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3272 with the clearing in the xcalloc.
3273 (stmt_vec_info_vec): Delete.
3274 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3275 (vectorize_loops): Likewise.
3276 (vec_info::~vec_info): Remove argument from call to
3277 free_stmt_vec_infos.
3278 (vec_info::add_stmt): Remove vinfo argument from call to
3281 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3283 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3284 rather than a gimple stmt.
3285 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3286 information for pattern statements when passed the original
3287 statement; instead wait to be passed the pattern statement itself.
3288 Don't call set_vinfo_for_stmt here.
3289 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3290 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3291 stmt_vec_infos here.
3292 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3293 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3294 stmt_vec_infos entry.
3296 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3298 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3299 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3300 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3301 * tree-vect-stmts.c (vectorizable_call): Likewise.
3302 (vectorizable_simd_clone_call): Likewise.
3304 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3306 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3307 * tree-vectorizer.c (vec_info::remove_stmt): New function.
3308 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3309 * tree-vect-loop.c (vect_transform_loop): Likewise.
3310 * tree-vect-slp.c (vect_schedule_slp): Likewise.
3311 * tree-vect-stmts.c (vect_remove_stores): Likewise.
3313 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3315 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3316 (vect_dr_stmt): Delete.
3317 * tree-vectorizer.c (vec_info::lookup_dr): New function.
3318 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3320 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3321 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3322 (vect_verify_datarefs_alignment, vect_peeling_supportable)
3323 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3324 (vect_analyze_data_refs): Likewise.
3325 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
3327 (vect_find_same_alignment_drs): Likewise.
3328 (vect_slp_analyze_node_dependences): Update calls accordingly.
3329 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3330 instead of DR_VECT_AUX.
3331 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3332 of a vector data references. Use vec_info::lookup_dr instead of
3334 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3335 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3336 instead of DR_VECT_AUX.
3338 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3340 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3342 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3344 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3345 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3346 (vect_gen_prolog_loop_niters): Likewise.
3348 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3350 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3351 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3352 (vect_known_alignment_in_bytes, vect_dr_behavior)
3353 (vect_get_scalar_dr_size): Take references as dr_vec_infos
3354 instead of data_references. Update calls to other routines for
3355 which the same change has been made.
3356 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3357 dr_vec_infos instead of stmt_vec_infos.
3358 (vect_analyze_data_ref_dependence): Update call accordingly.
3359 (vect_slp_analyze_data_ref_dependence)
3360 (vect_record_base_alignments): Use DR_VECT_AUX.
3361 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3362 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3363 (vector_alignment_reachable_p, vect_get_data_access_cost)
3364 (vect_peeling_supportable, vect_analyze_group_access_1)
3365 (vect_analyze_group_access, vect_analyze_data_ref_access)
3366 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3367 (vect_compile_time_alias, vect_small_gap_p)
3368 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3369 (vect_supportable_dr_alignment): Take references as dr_vec_infos
3370 instead of data_references. Update calls to other routines for
3371 which the same change has been made.
3372 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3373 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3374 (vect_slp_analyze_and_verify_node_alignment)
3375 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3376 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3377 (vect_setup_realignment): Use dr_vec_infos. Update calls after
3379 (_vect_peel_info::dr): Replace with...
3380 (_vect_peel_info::dr_info): ...this new field.
3381 (vect_peeling_hash_get_most_frequent)
3382 (vect_peeling_hash_choose_best_peeling): Update accordingly.
3383 (vect_peeling_hash_get_lowest_cost):
3384 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
3385 routines for which the same change has been made.
3386 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
3388 * tree-vect-loop-manip.c (get_misalign_in_elems)
3389 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
3391 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3392 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3393 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3394 (get_group_load_store_type, get_negative_load_store_type)
3395 (vect_get_data_ptr_increment, vectorizable_store)
3396 (vectorizable_load): Likewise.
3397 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3398 Update calls to other routines for which the same change has been made.
3400 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3402 * tree-vectorizer.h (vec_info::move_dr): New member function.
3403 (dataref_aux): Rename to...
3404 (dr_vec_info): ...this and add "dr" and "stmt" fields.
3405 (_stmt_vec_info::dr_aux): Update accordingly.
3406 (_stmt_vec_info::data_ref_info): Delete.
3407 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3408 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3409 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3410 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3412 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
3413 (STMT_VINFO_DR_INFO): New macro.
3414 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3415 (set_dr_misalignment): Update after rename of dataref_aux.
3416 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
3417 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3418 initialization of STMT_VINFO_DATA_REF.
3419 * tree-vectorizer.c (vec_info::move_dr): New function.
3420 * tree-vect-patterns.c (vect_recog_bool_pattern)
3421 (vect_recog_mask_conversion_pattern)
3422 (vect_recog_gather_scatter_pattern): Use it.
3423 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3424 the "dr" and "stmt" fields of dr_vec_info instead of
3425 STMT_VINFO_DATA_REF.
3427 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3429 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3430 (is_pattern_stmt_p): Use it.
3431 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3432 on pattern statements.
3434 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3436 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3437 original stmt as a stmt_vec_info rather than a gimple stmt.
3438 (vect_pattern_recog_1): Take the statement directly as a
3439 stmt_vec_info, rather than via a gimple_stmt_iterator.
3440 Update call to vect_mark_pattern_stmts.
3441 (vect_pattern_recog): Update calls accordingly.
3443 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3445 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3446 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3447 a vect_def_type for the first argument.
3448 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3449 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
3450 operand if it isn't defined by a vectorized statement.
3451 (vect_build_gather_load_calls): Remove the mask_dt argument and
3452 update calls to vect_get_vec_def_for_stmt_copy.
3453 (vectorizable_bswap): Likewise the dt argument.
3454 (vectorizable_call): Update calls to vectorizable_bswap and
3455 vect_get_vec_def_for_stmt_copy.
3456 (vectorizable_simd_clone_call, vectorizable_assignment)
3457 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3458 (vectorizable_comparison): Update calls to
3459 vect_get_vec_def_for_stmt_copy.
3460 (vectorizable_store): Likewise. Remove now-unnecessary calls to
3462 (vect_get_loop_based_defs): Remove dt argument and update call
3463 to vect_get_vec_def_for_stmt_copy.
3464 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3465 and vect_get_vec_def_for_stmt_copy.
3466 (vectorizable_load): Update calls to vect_build_gather_load_calls
3467 and vect_get_vec_def_for_stmt_copy.
3468 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3469 (vectorizable_reduction, vectorizable_live_operation): Update calls
3470 to vect_get_vec_def_for_stmt_copy.
3472 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3474 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3475 and gimple stmt arguments with a stmt_vec_info.
3476 (vect_record_base_alignments): Update calls accordingly.
3477 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3478 and gimple stmt arguments with a stmt_vec_info.
3479 (vect_build_slp_tree_1): Remove vinfo argument and update call
3480 to vect_record_max_nunits.
3481 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3482 and vect_record_max_nunits.
3484 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3486 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3487 file and take a stmt_vec_info instead of a gimple stmt.
3488 (supportable_widening_operation, vect_finish_replace_stmt)
3489 (vect_finish_stmt_generation, vect_get_store_rhs)
3490 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3491 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3492 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3493 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3494 (vect_create_data_ref_ptr, bump_vector_ptr)
3495 (vect_permute_store_chain, vect_setup_realignment)
3496 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3497 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3498 (vectorizable_reduction, vectorizable_induction)
3499 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3500 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3501 than gimple stmts as arguments.
3502 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3503 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3504 (can_group_stmts_p, vect_check_gather_scatter)
3505 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3506 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3507 (vect_permute_load_chain, vect_shift_permute_load_chain)
3508 (vect_transform_grouped_load)
3509 (vect_record_grouped_load_vectors): Likewise.
3510 * tree-vect-loop.c (vect_fixup_reduc_chain)
3511 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3512 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3513 (vectorizable_reduction, vectorizable_induction)
3514 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3515 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3516 (vect_get_load_store_mask): Likewise.
3517 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3518 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3519 * tree-vect-stmts.c (vect_mark_relevant)
3520 (is_simple_and_all_uses_invariant)
3521 (exist_non_indexing_operands_for_use_p, process_use)
3522 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3523 (vect_get_vec_def_for_operand, vect_get_vec_defs)
3524 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3525 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3526 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3527 (get_negative_load_store_type, get_load_store_type)
3528 (vect_check_load_store_mask, vect_check_store_rhs)
3529 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3530 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3531 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3532 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3533 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3534 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3535 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3536 (supportable_widening_operation): Likewise.
3538 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3540 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3541 a stmt_vec_info instead of a gcall.
3542 (vect_check_gather_scatter): Update call accordingly.
3543 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3545 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3546 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3547 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3548 instead of a gimple stmt.
3549 (vect_transform_loop): Update calls accordingly.
3550 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3551 stmt_vec_infos instead of gimple stmts.
3552 (vect_analyze_slp_instance): Update use accordingly.
3553 * tree-vect-stmts.c (read_vector_array, write_vector_array)
3554 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3555 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3556 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3557 (vect_gen_widened_results_half, vect_get_loop_based_defs)
3558 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3559 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3560 down to subroutines.
3562 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3564 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3565 of the worklist from a vector of gimple stmts to a vector of
3567 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3568 (vect_mark_stmts_to_be_vectorized): Likewise
3570 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3572 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3573 statement before passing it to vect_analyze_stmt.
3574 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3575 the chain of phi vector definitions. Track the exit phi via its
3577 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3578 STMT_VINFO_REDUC_DEF.
3579 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3580 stmt_vec_infos to handle the statement chains.
3581 (vect_get_slp_defs): Record the first statement in the node
3582 using a stmt_vec_info.
3583 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3584 statements here and pass their stmt_vec_info down to subroutines.
3585 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3586 down to vect_finish_stmt_generation.
3587 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3588 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3589 stmt_vec_infos to subroutines.
3590 (vect_remove_stores): Use stmt_vec_infos to handle the statement
3593 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3595 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3596 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3597 (vect_permute_store_chain, vect_setup_realignment)
3598 (vect_permute_load_chain, vect_shift_permute_load_chain)
3599 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3600 stmts internally, and when passing values to other vectorizer routines.
3601 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3602 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3603 (vect_analyze_loop_operations, get_initial_def_for_reduction)
3604 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3605 (vectorizable_reduction, vectorizable_induction)
3606 (vectorizable_live_operation, vect_transform_loop_stmt)
3607 (vect_transform_loop): Likewise.
3608 * tree-vect-patterns.c (vect_reassociating_reduction_p)
3609 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3610 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3611 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3612 (vect_slp_analyze_node_operations_1): Likewise.
3613 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3614 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3615 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3616 (vect_finish_stmt_generation_1, get_group_load_store_type)
3617 (get_load_store_type, vect_build_gather_load_calls)
3618 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3619 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3620 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3621 (vectorizable_store, vectorizable_load, vectorizable_condition)
3622 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3623 (supportable_widening_operation): Likewise.
3624 (vect_get_vector_types_for_stmt): Likewise.
3625 * tree-vectorizer.h (vect_dr_behavior): Likewise.
3627 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3629 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3630 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3631 (vect_permute_store_chain, vect_permute_load_chain)
3632 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3633 repeated stmt_vec_info lookups.
3634 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3635 (vect_update_ivs_after_vectorizer): Likewise.
3636 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3637 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3638 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3639 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3640 (vect_bb_slp_scalar_cost): Likewise.
3641 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3643 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3645 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3646 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3647 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3648 to get gassigns and gcalls, rather than operating on generc gimple
3650 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3651 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3652 (vectorizable_load, vect_analyze_stmt): Likewise.
3653 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3655 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3657 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3658 return stmt_vec_infos rather than gimple stmts. Do not accept
3660 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3662 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3663 Update use of get_later_stmt.
3664 (vect_get_constant_vectors): Update call accordingly.
3665 (vect_schedule_slp_instance): Likewise
3666 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3667 (vect_slp_analyze_instance_dependence): Likewise.
3668 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3670 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3672 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3673 (stmt_info_for_cost::stmt_info): ...this new field.
3674 (add_stmt_costs): Update accordingly.
3675 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3676 (vect_get_known_peeling_cost): Likewise.
3677 (vect_estimate_min_profitable_iters): Likewise.
3678 * tree-vect-stmts.c (record_stmt_cost): Likewise.
3680 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3682 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3683 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3684 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3686 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3688 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3690 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3691 a gimple stmt to a stmt_vec_info.
3692 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3694 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3696 * tree-vectorizer.h (vec_info::grouped_stores): Change from
3697 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3698 (_loop_vec_info::reduction_chains): Likewise.
3699 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3701 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3703 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3705 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3706 a gimple stmt to a stmt_vec_info.
3707 (_stmt_vec_info::next_element): Likewise.
3708 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3709 (vect_slp_analyze_and_verify_node_alignment)
3710 (vect_analyze_group_access_1, vect_analyze_group_access)
3711 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3712 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3713 (vect_supportable_dr_alignment): Update accordingly.
3714 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3715 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3716 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3717 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3718 * tree-vect-slp.c (vect_build_slp_tree_1)
3719 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3720 (vect_split_slp_store_group, vect_analyze_slp_instance)
3721 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3722 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3723 (get_group_load_store_type, get_load_store_type)
3724 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3725 (vect_transform_stmt, vect_remove_stores): Likewise.
3727 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3729 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3731 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3732 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3733 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3734 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3735 (vector_alignment_reachable_p, vect_get_data_access_cost)
3736 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3737 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3738 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3739 (vect_analyze_group_access_1, vect_analyze_group_access)
3740 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3741 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3742 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3743 result of vect_dr_stmt and use the stmt_vec_info instead of
3744 the associated gimple stmt.
3745 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3746 (vect_gen_prolog_loop_niters): Likewise.
3747 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3749 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3751 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
3752 to a vec<stmt_vec_info>.
3753 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
3754 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
3756 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
3757 to a vec<stmt_vec_info>.
3758 (bst_traits::value_type, bst_traits::value_type): Likewise.
3759 (bst_traits::hash): Update accordingly.
3760 (vect_get_and_check_slp_defs): Change the stmts parameter from
3761 a vec<gimple *> to a vec<stmt_vec_info>.
3762 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
3763 (vect_build_slp_tree): Likewise.
3764 (vect_build_slp_tree_2): Likewise. Update uses of
3765 SLP_TREE_SCALAR_STMTS.
3766 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
3767 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
3768 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
3769 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
3770 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
3771 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
3772 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
3773 (vect_get_constant_vectors, vect_get_slp_defs)
3774 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
3775 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
3776 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3777 instead of gimple stmts.
3778 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3779 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3780 (vect_slp_analyze_instance_dependence): Update uses of
3781 SLP_TREE_SCALAR_STMTS.
3782 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3783 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3784 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3785 (get_initial_defs_for_reduction): Likewise.
3786 (vect_create_epilog_for_reduction): Likewise.
3787 (vectorize_fold_left_reduction): Likewise.
3788 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3789 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3790 (can_vectorize_live_stmts): Likewise.
3792 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3794 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3795 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3796 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3798 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3800 (gather_scalar_reductions): Update after above interface changes.
3801 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3802 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3804 (vect_force_simple_reduction): Likewise.
3805 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3806 LOOP_VINFO_REDUCTIONS.
3807 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3809 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3811 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3812 a gimple stmt to a stmt_vec_info.
3813 * tree-vect-loop.c (vect_active_double_reduction_p)
3814 (vect_force_simple_reduction, vectorizable_reduction): Update
3817 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3819 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3820 vec<gimple *> to a vec<stmt_vec_info>.
3821 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3822 the reduction_phis argument from a vec<gimple *> to a
3824 (vectorizable_reduction): Likewise the phis local variable that
3825 is passed to vect_create_epilog_for_reduction. Update for new type
3826 of SLP_TREE_VEC_STMTS.
3827 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3828 (vectorizable_live_operation): Likewise.
3829 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3830 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3832 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3834 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3835 a gimple stmt to a stmt_vec_info.
3836 (vectorizable_condition, vectorizable_live_operation)
3837 (vectorizable_reduction, vectorizable_induction): Pass back the
3838 vectorized statement as a stmt_vec_info.
3839 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
3840 use of STMT_VINFO_VEC_STMT.
3841 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
3842 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
3843 as stmt_vec_infos rather than gimple stmts.
3844 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
3846 (vectorizable_live_operation): Likewise.
3847 (vectorizable_reduction, vectorizable_induction): Likewise,
3848 updating use of STMT_VINFO_VEC_STMT.
3849 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
3850 of STMT_VINFO_VEC_STMT.
3851 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
3852 (vectorizable_simd_clone_call, vectorizable_conversion)
3853 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3854 (vectorizable_store, vectorizable_load, vectorizable_condition)
3855 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
3856 from a gimple stmt to a stmt_vec_info.
3857 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
3858 pointer to a stmt_vec_info to the vectorizable_* routines.
3860 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3862 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
3863 a gimple stmt to a stmt_vec_info.
3864 (is_pattern_stmt_p): Update accordingly.
3865 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
3866 (vect_record_grouped_load_vectors): Likewise.
3867 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3868 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
3869 (vect_model_reduction_cost): Likewise.
3870 (vect_create_epilog_for_reduction): Likewise.
3871 (vectorizable_reduction, vectorizable_induction): Likewise.
3872 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3873 Return the stmt_vec_info for the pattern statement.
3874 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
3875 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
3876 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3877 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
3878 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3879 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
3880 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
3881 (free_stmt_vec_info, vect_is_simple_use): Likewise.
3883 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3885 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
3886 (vect_finish_stmt_generation): Likewise.
3887 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3888 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
3889 (vect_build_gather_load_calls): Use the return value of the above
3890 functions instead of a separate call to vinfo_for_stmt. Use narrow
3891 scopes for the input gimple stmt and wider scopes for the associated
3892 stmt_vec_info. Use vec_info::lookup_def when setting these
3893 stmt_vec_infos from an SSA_NAME definition.
3894 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3895 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3896 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3897 (vectorizable_store, vectorizable_load, vectorizable_condition)
3898 (vectorizable_comparison): Likewise.
3899 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
3900 (vectorizable_reduction): Likewise.
3902 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3904 * tree-vectorizer.h (vect_is_simple_use): Add an optional
3905 stmt_vec_info * parameter before the optional gimple **.
3906 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3907 (process_use, vect_get_vec_def_for_operand_1): Update callers.
3908 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
3909 * tree-vect-loop.c (vectorizable_reduction): Likewise.
3910 (vectorizable_live_operation): Likewise.
3911 * tree-vect-patterns.c (type_conversion_p): Likewise.
3912 (vect_look_through_possible_promotion): Likewise.
3913 (vect_recog_rotate_pattern): Likewise.
3914 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3916 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3918 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
3919 a typedef to a wrapper class.
3920 (NULL_STMT_VEC_INFO): New macro.
3921 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
3922 (stmt_vec_info::operator*): New function.
3923 (stmt_vec_info::operator gimple *): Likewise.
3924 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
3925 (add_stmt_costs): Likewise.
3926 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3927 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3928 (vect_get_known_peeling_cost): Likewise.
3929 (vect_estimate_min_profitable_iters): Likewise.
3930 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3931 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
3932 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3933 (vectorizable_store, free_stmt_vec_infos): Likewise.
3934 (new_stmt_vec_info): Change return type of xcalloc to
3937 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3939 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
3940 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
3941 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
3942 a single_imm_use-based sequence.
3943 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
3945 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3947 * tree-vectorizer.h (vec_info::lookup_def): Declare.
3948 * tree-vectorizer.c (vec_info::lookup_def): New function.
3949 * tree-vect-patterns.c (vect_get_internal_def): Use it.
3950 (vect_widened_op_tree): Likewise.
3951 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3952 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
3953 (vectorizable_reduction): Likewise.
3954 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
3956 (vect_is_slp_reduction): Update calls accordingly. Use
3957 vec_info::lookup_def.
3958 (vect_is_simple_reduction): Likewise
3959 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
3961 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3963 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
3964 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
3965 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
3967 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
3968 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
3969 (vect_update_vf_for_slp, vect_analyze_loop_operations)
3970 (vect_is_slp_reduction, vectorizable_induction)
3971 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
3972 * tree-vect-patterns.c (vect_init_pattern_stmt):
3973 (vect_determine_min_output_precision_1, vect_determine_precisions)
3974 (vect_pattern_recog): Likewise.
3975 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
3976 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
3977 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
3978 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3979 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
3980 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
3981 info field from a loop to a loop_vec_info.
3983 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3985 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
3986 (vec_info::add_stmt): Declare.
3987 * tree-vectorizer.c (vec_info::add_stmt): New function.
3988 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
3989 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
3990 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3991 (vectorizable_induction): Likewise.
3992 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
3993 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3994 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
3995 (vectorizable_load): Likewise.
3996 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3997 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
3998 (vect_recog_gather_scatter_pattern): Likewise.
3999 (append_pattern_def_seq): Likewise. Remove a check that is
4000 performed by add_stmt itself.
4002 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4004 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4005 which make_ssa_name was called with new_stmt before new_stmt
4008 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4010 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4012 (vect_is_slp_reduction): ...here...
4013 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4014 that are already known to be false.
4016 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4018 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4019 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4020 STMT_VINFO_NUM_SLP_USES when it's true.
4021 (vect_free_slp_instance): Add a final_p parameter and pass it to
4023 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4024 (vect_analyze_slp_instance): Likewise.
4025 (vect_slp_analyze_operations): Likewise.
4026 (vect_slp_analyze_bb_1): Likewise.
4027 * tree-vectorizer.c (vec_info): Likewise.
4028 * tree-vect-loop.c (vect_transform_loop): Likewise.
4030 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4032 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4033 function is not called for second and subsequent members of
4036 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4038 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4039 cases for nested loops from here to ...
4040 (vect_create_epilog_for_reduction): ...here. Only call
4041 vect_is_simple_use for inner-loop reductions.
4043 2018-07-31 Martin Liska <mliska@suse.cz>
4045 PR gcov-profile/85338
4046 PR gcov-profile/85350
4047 PR gcov-profile/85372
4048 * profile.c (struct location_triplet): New.
4049 (struct location_triplet_hash): Likewise.
4050 (output_location): Do not output a BB that
4051 is already recorded for a line.
4052 (branch_prob): Use streamed_locations.
4054 2018-07-31 Martin Liska <mliska@suse.cz>
4056 PR gcov-profile/85370
4057 * coverage.c (coverage_begin_function): Do not mark target
4058 clones as artificial functions.
4060 2018-07-31 Martin Liska <mliska@suse.cz>
4062 PR gcov-profile/83813
4063 PR gcov-profile/84758
4064 PR gcov-profile/85217
4065 PR gcov-profile/85332
4066 * profile.c (branch_prob): Do not record GOTO expressions
4067 for GIMPLE statements which locations are already streamed.
4069 2018-07-31 Olivier Hainque <hainque@adacore.com>
4071 * gcc.c (handle_spec_function): Accept a soft_matched_part
4072 argument, as do_spec_1. Pass it down to ...
4073 (eval_spec_function): Accept a soft_matched_part argument,
4074 and pass it down to ...
4075 (do_spec_2): Accept a soft_matched_part argument, and pass
4076 it down to do_spec_1.
4077 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4078 (handle_braces): Update call to handle_spec_function.
4079 (driver::set_up_specs): Update calls to do_spec_2.
4080 (compare_debug_dump_opt_spec_function): Likewise.
4081 (compare_debug_self_opt_spec_function): Likewise.
4083 2018-07-31 Olivier Hainque <hainque@adacore.com>
4085 * common.opt (nolibc): New option.
4086 * doc/invoke.texi (Link Options): Document it.
4087 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4088 * config/alpha/linux.h: Likewise.
4089 * config/arc/elf.h: Likewise.
4090 * config/arm/uclinux-elf.h: Likewise.
4091 * config/arm/unknown-elf.h: Likewise.
4092 * config/avr/avrlibc.h: Likewise.
4093 * config/bfin/bfin.h: Likewise.
4094 * config/bfin/linux.h: Likewise.
4095 * config/bfin/uclinux.h: Likewise.
4096 * config/darwin.h: Likewise.
4097 * config/darwin10.h: Likewise.
4098 * config/darwin12.h: Likewise.
4099 * config/gnu-user.h: Likewise.
4100 * config/lm32/uclinux-elf.h: Likewise.
4101 * config/pa/pa-hpux11.h: Likewise.
4102 * config/pa/pa64-hpux.h: Likewise.
4103 * config/sparc/sparc.h: Likewise.
4105 2018-07-31 Olivier Hainque <hainque@adacore.com>
4107 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4108 undefined variables.
4110 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4113 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4116 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4118 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4119 terminated string literal.
4121 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4123 PR rtl-optimization/85160
4124 * combine.c (is_just_move): New function.
4125 (try_combine): Allow combining two instructions into two if neither of
4126 the original instructions was a move.
4128 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4131 * doc/extend.texi (Global Register Variables): Discourage use of type
4133 (Local Register Variables): Likewise.
4135 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4137 PR tree-optimization/86506
4138 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4140 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4143 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4144 hard_regno, make sure no insn between `from` and `to` clobbers it.
4146 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4147 Tom de Vries <tdevries@suse.de>
4149 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4150 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4151 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4152 PTX_DEFAULT_RUNTIME_DIM.
4153 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4155 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4157 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4158 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4159 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4161 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4163 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4165 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4166 predicate to reflect toc fusion has been deleted.
4167 (toc_fusion_mem_raw): Delete, no longer used.
4168 (toc_fusion_mem_wrapped): Likewise.
4169 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4171 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4172 Delete, no longer used.
4173 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4174 meant to be used for toc fusion.
4175 (rs6000_debug_print_mode): Delete toc fusion debugging.
4176 (rs6000_debug_reg_global): Likewise.
4177 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4178 fusion and secondary reload support that were never used.
4179 (rs6000_option_override_internal): Delete TOC fusion, that was only
4180 partially defined, and it did not work unless you also used the
4182 (rs6000_legitimate_address_p): Delete TOC fusion support.
4183 (rs6000_opt_masks): Likewise.
4184 (fusion_wrap_memory_address): Delete function, no longer used.
4185 (fusion_split_address); Delete TOC fusion support.
4186 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4187 longer used with toc fusion being deleted.
4188 (TARGET_TOC_FUSION_FP): Likewise.
4189 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4191 (toc fusion spliter): Delete TOC fusion support.
4192 (toc_fusionload_<mode>): Likewise.
4193 (toc_fusionload_di): Likewise.
4194 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4195 longer needs to be named. Rename predicate to delete TOC fusion.
4196 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4197 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4198 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4199 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4200 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4202 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4204 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4205 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4206 __int128 in built-in function prototypes.
4207 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4208 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4210 2018-07-27 Martin Sebor <msebor@redhat.com>
4212 PR tree-optimization/86696
4213 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4214 types, including enums.
4215 (handle_char_store): Be prepared for the above function to fail.
4217 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4219 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4220 when optimization level is lower than 2 or optimize for size.
4222 2018-07-26 Martin Sebor <msebor@redhat.com>
4224 PR tree-optimization/86043
4225 PR tree-optimization/86042
4226 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4227 (get_string_cst_length): Rename...
4228 (get_min_string_length): ...to this. Add argument.
4229 (handle_char_store): Extend to handle multi-character stores by
4231 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4232 * tree.h (initializer_zerop): Add argument.
4234 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4237 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4238 declare target to variables if they have always,{to,from,tofrom} map
4241 2018-07-26 Martin Liska <mliska@suse.cz>
4244 * lto-wrapper.c: Add linker_output as prefix
4245 for ltrans_output_file.
4247 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4249 PR rtl-optimization/85805
4250 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4251 value for hard registers if that was written in the same mode.
4253 2018-07-26 Martin Liska <mliska@suse.cz>
4255 PR gcov-profile/86536
4256 * gcov.c (format_gcov): Use printf format %.*f directly
4257 and do not handle special values.
4259 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4261 * common/config/arc/arc-common.c (arc_option_optimization_table):
4262 Update default optimizations for size.
4264 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4266 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4267 * config/arc/constraints.md (CfZ): New constraint.
4268 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4269 (subsf3_fpu): Likewise.
4270 (cmpsf_fpu): Likewise.
4271 (cmpsf_fpu_uneq): Likewise.
4273 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4275 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4277 (arc_is_uncached_mem_p): uncached applies to both the variable and
4280 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4282 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4285 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4287 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4288 field "m_scopes" from vec to auto_vec.
4290 2018-07-25 Martin Liska <mliska@suse.cz>
4292 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4295 2018-07-25 Richard Biener <rguenther@suse.de>
4298 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4299 special wrt context_die late.
4300 (gen_subprogram_die): Re-use DIEs in local scope.
4302 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
4304 PR tree-optimization/86644
4305 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
4307 2018-07-25 Martin Liska <mliska@suse.cz>
4310 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4311 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4313 2018-07-25 Martin Liska <mliska@suse.cz>
4316 * params.def: Explain ASan abbreviation and provide
4317 a documentation link.
4319 2018-07-24 Martin Sebor <msebor@redhat.com>
4321 PR tree-optimization/86622
4322 PR tree-optimization/86532
4323 * builtins.h (string_length): Declare.
4324 * builtins.c (c_strlen): Correct handling of non-constant offsets.
4325 (check_access): Be prepared for non-constant length ranges.
4326 (string_length): Make extern.
4327 * expr.c (string_constant): Only handle the minor non-constant
4328 array index. Use string_constant to compute the length of
4329 a generic string constant.
4331 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
4333 PR tree-optimization/86618
4334 * tree-vect-stmts.c (vectorizable_call): Don't take the address
4335 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4337 2018-07-24 David Malcolm <dmalcolm@redhat.com>
4339 PR tree-optimization/86636
4340 * json.cc (json::object::set): Fix comment. Add assertions.
4341 (json::array::append): Move here from json.h. Add comment and an
4343 (json::string::string): Likewise.
4344 * json.h (json::array::append): Move to json.cc.
4345 (json::string::string): Likewise.
4346 * optinfo-emit-json.cc
4347 (optrecord_json_writer::impl_location_to_json): Assert that we
4348 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4349 wrapper around it. Expand the location once, rather than three
4351 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4352 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4354 (optrecord_json_writer::optinfo_to_json): Likewise, in four
4355 places. Fix some overlong lines.
4357 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
4359 * config/aarch64/aarch64-simd.md
4360 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4361 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4362 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4363 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4364 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4365 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4366 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4367 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4368 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4370 2018-07-24 Jakub Jelinek <jakub@redhat.com>
4373 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4374 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
4375 and abs_d == d, do the power of two handling if profitable.
4377 2018-07-24 Richard Biener <rguenther@suse.de>
4379 * match.pd: Add BIT_FIELD_REF canonicalizations.
4381 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4384 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4386 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4388 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4389 terminated STRING_CST object.
4391 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4393 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4395 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4397 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4398 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4399 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4400 the elements into a register.
4401 (rs6000_split_v4si_init_di_reg): Delete.
4402 (rs6000_split_v4si_init): Delete.
4403 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4404 (vsx_init_v4si): Rewrite as a define_expand.
4406 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4408 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4409 zero_extend argument from memory): New.
4411 2018-07-22 Martin Sebor <msebor@redhat.com>
4414 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4415 diagnosing calls with unknown arguments unless -Walloca-larger-than
4416 is restricted to less than PTRDIFF_MAX bytes.
4418 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
4420 * doc/gcov.texi (Invoking Gcov): Editorial changes.
4422 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4424 * pretty-print.c (text_info::set_location): Remove redundant
4425 "line_table" parameter from call to rich_location::set_range.
4427 2018-07-20 Martin Sebor <msebor@redhat.com>
4430 * builtins.c (expand_builtin_alloca): Adjust.
4431 * calls.c (alloc_max_size): Simplify.
4432 * cgraphunit.c (cgraph_node::expand): Adjust.
4433 * common.opt (larger_than_size, warn_frame_larger_than): Remove
4435 (frame_larger_than_size): Same.
4436 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4437 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4439 * doc/invoke.texi (GCC Command Options): Document option arguments.
4440 Explain byte-size arguments and suffixes.
4441 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4442 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4443 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4444 * doc/options.texi (UInteger): Expand.
4445 (Host_Wide_Int, ByteSize): Document new properties.
4446 * final.c (final_start_function_1): Include sizes in an error message.
4447 * function.c (frame_offset_overflow): Same.
4448 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4449 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4450 Diagnose unbounded alloca calls only for limits of less than
4452 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
4453 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
4455 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
4456 only for limits of less than PTRDIFF_MAX.
4457 * langhooks-def.h (lhd_handle_option): Change function argument
4459 * langhooks.c (lhd_handle_option): Same.
4460 * langhooks.h (handle_option): Same.
4461 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4463 (var_type, var_type_struct): Same.
4464 (var_set): Handle ByteSize flag.
4465 * optc-gen.awk: Add comments to output to ease debugging. Make
4466 use of HOST_WIDE_INT where appropriate.
4467 * opts-gen-save.awk: Use %lx to format unsigned long.
4468 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4469 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4470 arguments. Parse bytes-size suffixes.
4471 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4472 (enum_value_to_arg): Same.
4473 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
4474 (handle_option): Adjust.
4475 (generate_option): Change function argument to HOST_WIDE_INT.
4476 (cmdline_handle_error): Adjust.
4477 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4478 (set_option): Change function argument to HOST_WIDE_INT.
4479 (option_enabled): Handle cl_host_wide_int.
4480 (get_option_state): Handle CLVC_SIZE.
4481 (control_warning_option): Same.
4482 * opts.c (common_handle_option): Change function argument to
4483 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4484 OPT_Wvla_larger_than_.
4485 * opts.h (enum cl_var_type): Add an enumerator.
4486 * stor-layout.c (layout_decl): Print a more meaningful warning.
4487 * toplev.c (output_stack_usage): Adjust.
4489 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4491 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4492 call to inline_expand_builtin_string_cmp.
4493 (expand_builtin_strcmp): Likewise.
4494 (expand_builtin_strncmp): Likewise.
4495 (inline_string_cmp): Delete the last parameter, change char_type_node
4496 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4498 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4499 the inlining expansion on target where the type of the call has same or
4500 narrower precision than unsigned char.
4502 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4504 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4505 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4506 * common.opt (fsave-optimization-record): New option.
4507 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4508 * doc/invoke.texi (-fsave-optimization-record): New option.
4509 * dumpfile.c: Include "optinfo-emit-json.h".
4510 (struct kv_pair): Move to coretypes.h.
4511 (optgroup_options): Make non-static.
4512 (dump_context::end_scope): Call
4513 optimization_records_maybe_pop_dump_scope.
4514 * dumpfile.h (optgroup_options): New decl.
4515 * json.cc: New file.
4517 * optinfo-emit-json.cc: New file.
4518 * optinfo-emit-json.h: New file.
4519 * optinfo.cc: Include "optinfo-emit-json.h".
4520 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4521 (optinfo_enabled_p): Check optimization_records_enabled_p.
4522 (optinfo_wants_inlining_info_p): Likewise.
4523 * optinfo.h: Update comment.
4524 * profile-count.c (profile_quality_as_string): New function.
4525 * profile-count.h (profile_quality_as_string): New decl.
4526 (profile_count::quality): New accessor.
4527 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4528 and optinfo_emit_json_cc_tests.
4529 * selftest.h (selftest::json_cc_tests): New decl.
4530 (selftest::optinfo_emit_json_cc_tests): New decl.
4531 * toplev.c: Include "optinfo-emit-json.h".
4532 (compile_file): Call optimization_records_finish.
4533 (do_compile): Call optimization_records_start.
4534 * tree-ssa-live.c: Include optinfo.h.
4535 (remove_unused_scope_block_p): Retain inlining information if
4536 optinfo_wants_inlining_info_p returns true.
4538 2018-07-20 Richard Biener <rguenther@suse.de>
4541 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4542 to cover -flto-partition=none.
4544 2018-07-20 Martin Liska <mliska@suse.cz>
4546 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4547 (get_decl_source_range): Remove unused function.
4549 2018-07-20 Richard Biener <rguenther@suse.de>
4551 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4552 (struct vn_phi_s): Likewise.
4553 (struct vn_reference_s): Likewise.
4554 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4555 for searching the slot of an entry known to be in the hash itself.
4556 (vn_phi_hasher::equal): Likewise.
4557 (vn_reference_hasher::equal): Likewise.
4558 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4560 (optimistic_info, current_info): Remove, keeping only valid_info.
4561 (vn_reference_lookup_1): Remove fallback lookup.
4562 (vn_reference_lookup_2): Likewise.
4563 (vn_nary_op_lookup_1): Likewise.
4564 (vn_phi_lookup): Likewise.
4565 (vn_nary_build_or_lookup_1): Make sure to not chain the built
4567 (vn_reference_insert): Adjust, chain the inserted hash element
4568 at last_inserted_ref.
4569 (vn_reference_insert_pieces): Likewise.
4570 (visit_reference_op_call): Likewise.
4571 (vn_nary_op_insert_into): Chain the inserted hash element at
4573 (vn_nary_op_insert_pieces): Adjust.
4574 (vn_nary_op_insert): Likewise.
4575 (vn_nary_op_insert_stmt): Likewise.
4576 (vn_phi_insert): Adjust, chain the inserted hash element at
4578 (process_scc): Remove clearing and copying the optimistic
4579 table. Instead remove elements inserted during an optimistic
4580 iteration from the single table we maintain.
4581 (init_scc_vn): Adjust.
4582 (free_scc_vn): Likewise.
4583 (sccvn_dom_walker::record_cond): Likewise.
4584 (sccvn_dom_walker::after_dom_children): Likewise.
4586 2018-07-19 Martin Sebor <msebor@redhat.com>
4588 PR tree-optimization/84047
4589 PR tree-optimization/83776
4590 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4591 (check_array_bounds): Call it.
4593 2018-07-19 Martin Sebor <msebor@redhat.com>
4595 * align.h (align_flags): Use member initialization.
4597 2018-07-19 David Malcolm <dmalcolm@redhat.com>
4599 * Makefile.in (OBJS): Add optinfo.o.
4600 * coretypes.h (class symtab_node): New forward decl.
4601 (struct cgraph_node): New forward decl.
4602 (class varpool_node): New forward decl.
4603 * dump-context.h: New file.
4604 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4606 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4607 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4608 (set_alt_dump_file): Likewise.
4609 (dump_context::~dump_context): New dtor.
4610 (dump_gimple_stmt): Move implementation to...
4611 (dump_context::dump_gimple_stmt): ...this new member function.
4612 Add the stmt to any pending optinfo, creating one if need be.
4613 (dump_gimple_stmt_loc): Move implementation to...
4614 (dump_context::dump_gimple_stmt_loc): ...this new member function.
4615 Start a new optinfo and add the stmt to it.
4616 (dump_gimple_expr): Move implementation to...
4617 (dump_context::dump_gimple_expr): ...this new member function.
4618 Add the stmt to any pending optinfo, creating one if need be.
4619 (dump_gimple_expr_loc): Move implementation to...
4620 (dump_context::dump_gimple_expr_loc): ...this new member function.
4621 Start a new optinfo and add the stmt to it.
4622 (dump_generic_expr): Move implementation to...
4623 (dump_context::dump_generic_expr): ...this new member function.
4624 Add the tree to any pending optinfo, creating one if need be.
4625 (dump_generic_expr_loc): Move implementation to...
4626 (dump_context::dump_generic_expr_loc): ...this new member
4627 function. Add the tree to any pending optinfo, creating one if
4629 (dump_printf): Move implementation to...
4630 (dump_context::dump_printf_va): ...this new member function. Add
4631 the text to any pending optinfo, creating one if need be.
4632 (dump_printf_loc): Move implementation to...
4633 (dump_context::dump_printf_loc_va): ...this new member function.
4634 Start a new optinfo and add the stmt to it.
4635 (dump_dec): Move implementation to...
4636 (dump_context::dump_dec): ...this new member function. Add the
4637 value to any pending optinfo, creating one if need be.
4638 (dump_context::dump_symtab_node): New member function.
4639 (dump_context::get_scope_depth): New member function.
4640 (dump_context::begin_scope): New member function.
4641 (dump_context::end_scope): New member function.
4642 (dump_context::ensure_pending_optinfo): New member function.
4643 (dump_context::begin_next_optinfo): New member function.
4644 (dump_context::end_any_optinfo): New member function.
4645 (dump_context::s_current): New global.
4646 (dump_context::s_default): New global.
4647 (dump_scope_depth): Delete global.
4648 (dumpfile_ensure_any_optinfo_are_flushed): New function.
4649 (dump_symtab_node): New function.
4650 (get_dump_scope_depth): Reimplement in terms of dump_context.
4651 (dump_begin_scope): Likewise.
4652 (dump_end_scope): Likewise.
4653 (selftest::temp_dump_context::temp_dump_context): New ctor.
4654 (selftest::temp_dump_context::~temp_dump_context): New dtor.
4655 (selftest::verify_item): New function.
4656 (ASSERT_IS_TEXT): New macro.
4657 (ASSERT_IS_TREE): New macro.
4658 (ASSERT_IS_GIMPLE): New macro.
4659 (selftest::test_capture_of_dump_calls): New test.
4660 (selftest::dumpfile_c_tests): Call it.
4661 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4662 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4663 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4664 descriptive comment.
4665 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4666 (dump_node, dump_bb): Move these unrelated decls.
4667 (class dump_manager): Add leading comment.
4668 * optinfo.cc: New file.
4669 * optinfo.h: New file.
4671 2018-07-19 Michael Collison <michael.collison@arm.com>
4672 Richard Henderson <rth@redhat.com>
4674 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4675 (subti): Handle op1 zero.
4676 (subvti4, usub4ti4): New.
4677 (*sub<GPI>3_compare1_imm): New.
4678 (sub<GPI>3_carryinCV): New.
4679 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4680 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4682 2018-07-19 Michael Collison <michael.collison@arm.com>
4683 Richard Henderson <rth@redhat.com>
4685 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4686 (addti3): Create simpler code if low part is already known to be 0.
4687 (addvti4, uaddvti4): New.
4688 (*add<GPI>3_compareC_cconly_imm): New.
4689 (*add<GPI>3_compareC_cconly): New.
4690 (*add<GPI>3_compareC_imm): New.
4691 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4692 handle constants within this pattern..
4693 (*add<GPI>3_compareV_cconly_imm): New.
4694 (*add<GPI>3_compareV_cconly): New.
4695 (*add<GPI>3_compareV_imm): New.
4696 (add<GPI>3_compareV): New.
4697 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4698 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4699 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4700 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4701 with 'comparison' operator.
4702 (*add<GPI>3_compareV_cconly_imm): Ditto.
4703 (*add<GPI>3_compareV_cconly): Ditto.
4704 (*add<GPI>3_compareV_imm): Ditto.
4705 (add<GPI>3_compareV): Ditto.
4706 (add<mode>3_carryinC): Ditto.
4707 (*add<mode>3_carryinC_zero): Ditto.
4708 (*add<mode>3_carryinC): Ditto.
4709 (add<mode>3_carryinV): Ditto.
4710 (*add<mode>3_carryinV_zero): Ditto.
4711 (*add<mode>3_carryinV): Ditto.
4713 2018-07-19 Michael Collison <michael.collison@arm.com>
4714 Richard Henderson <rth@redhat.com>
4716 * config/aarch64/aarch64-modes.def (CC_V): New.
4717 * config/aarch64/aarch64-protos.h
4718 (aarch64_addti_scratch_regs): Declare
4719 (aarch64_subvti_scratch_regs): Declare.
4720 (aarch64_expand_subvti): Declare.
4721 (aarch64_gen_unlikely_cbranch): Declare
4722 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4723 for signed overflow using CC_Vmode.
4724 (aarch64_get_condition_code_1): Handle CC_Vmode.
4725 (aarch64_gen_unlikely_cbranch): New function.
4726 (aarch64_addti_scratch_regs): New function.
4727 (aarch64_subvti_scratch_regs): New function.
4728 (aarch64_expand_subvti): New function.
4730 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4732 * config/aarch64/aarch64-option-extensions.def: New entry for profile
4734 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4735 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4738 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4741 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4742 address check not strict.
4744 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4746 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4748 (store_pair_lanes<mode>): Likewise.
4749 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
4750 enum value 'ADDR_QUERY_LDP_STP_N'.
4751 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
4752 (aarch64_print_address_internal): Add declaration.
4753 (aarch64_print_ldpstp_address): Remove.
4754 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
4755 (aarch64_print_operand): Change printing of 'y'.
4756 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
4757 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
4758 'true' rather than '1'.
4759 * config/aarch64/constraints.md (Uml): Likewise.
4760 (Uml): Rename to Umn.
4763 2018-07-19 Richard Biener <rguenther@suse.de>
4765 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
4767 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
4768 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
4769 (vn_reference_hasher): Likewise.
4770 (struct vn_tables_s): Remove obstack and alloc-pool members.
4771 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
4772 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
4773 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
4774 (vn_reference_insert_pieces): Likewise.
4775 (alloc_vn_nary_op_noinit): Adjust.
4776 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4777 (vn_phi_eq): Adjust.
4778 (shared_lookup_phiargs): Remove.
4779 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4780 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4781 (visit_reference_op_call): Likewise.
4782 (copy_nary, copy_phi, copy_reference): Remove.
4783 (process_scc): Rewind the obstack when iterating. Do not
4784 copy the elements to valid_info but just move them from one
4785 hashtable to the other.
4786 (allocate_vn_table): Adjust.
4787 (free_vn_table): Likewise.
4788 (init_scc_vn): Likewise.
4789 (free_scc_vn): Likewise.
4791 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
4794 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4795 indirect_return as function type attribute.
4796 (ix86_attribute_table): Change indirect_return to function
4798 * doc/extend.texi: Update indirect_return attribute.
4800 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
4802 * wide-int.h (widest2_int): New.
4803 * gimple-fold.c (arith_overflowed_p): Use it.
4804 * tree.h (widest2_int_cst): New.
4805 * tree-vrp.c (wide_int_binop_overflow): Rename from
4806 vrp_int_const_binop.
4807 Rewrite to work on trees.
4808 (extract_range_from_multiplicative_op_1): Abstract code to...
4809 (wide_int_range_min_max): ...here.
4810 (wide_int_range_cross_product): ...and here.
4811 (extract_range_from_binary_expr_1): Abstract overflow code to...
4812 (wide_int_range_mult_wrapping): ...here.
4813 * tree-vrp.h (wide_int_range_cross_product): New.
4814 (wide_int_range_mult_wrapping): New.
4816 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
4817 Julia Koval <julia.koval@intel.com>
4819 * config/i386/x86-tune-costs.h (skylake_memcpy,
4820 skylake_memset): Replace rep_prefix with unrolling for size 512.
4822 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
4825 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4826 comparision with EQ_EXPR in last stmt.
4828 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
4830 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4831 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4832 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4833 previously known as "PowerPC AltiVec Built-in Functions". Move
4834 some material to new subsubsections "PowerPC AltiVec Built-in
4835 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4837 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
4838 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
4839 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
4840 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
4842 2018-07-18 Richard Biener <rguenther@suse.de>
4844 PR tree-optimization/86557
4845 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
4848 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
4850 * config/s390/s390.c (s390_function_profiler): Generate CFI.
4852 2018-07-17 Jeff Law <law@redhat.com>
4854 * config/arm/arm.c (get_label_padding): Update for recent
4855 changes to label_to_alignment.
4857 PR tree-optimization/86010
4858 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
4860 * config/mips/mips.c (vr4130_align_insns): Update for recent
4861 changes to label_to_alignment.
4863 * config/frv/frv.c (frv_label_align): Update for recent changes
4864 to label_to_alignment.
4866 * config/nios2/nios2.c (nios2_label_align): Update for recent
4867 changes which dropped ALIGN_LABELS_LOG.
4869 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
4871 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
4872 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
4874 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
4876 * config/arc/arc.c (arc_label_align): Use align_labels instead of
4877 deprecated align_labels_log.
4879 2018-07-17 Richard Biener <rguenther@suse.de>
4882 * dwarf2out.c (init_sections_and_labels): Always generate
4883 a debug_line_str_section for early LTO debug.
4884 (dwarf2out_finish): Reset debug_line_str_hash output early.
4885 Bump counter for extra dwarf5 .debug_loc labels to not conflict
4887 (dwarf2out_early_finish): Output debug_line_str.
4889 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4891 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
4892 index register on z196 or later.
4894 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4896 * config/s390/s390.c (s390_default_align): Set default function
4898 (s390_override_options_after_change): Call s390_default align.
4899 (s390_option_override_internal): Call s390_default_align.
4900 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
4902 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4905 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
4906 to _looptemp_ clauses, other than the first two.
4908 2018-07-17 Martin Liska <mliska@suse.cz>
4910 * opts.c: Do not enable OPT_falign_* for -Os.
4912 2018-07-17 Martin Liska <mliska@suse.cz>
4914 * align.h (MAX_CODE_ALIGN): New.
4915 (MAX_CODE_ALIGN_VALUE): New.
4916 * common/config/i386/i386-common.c (ix86_handle_option):
4917 (MAX_CODE_ALIGN): Moved to align.h.
4918 * final.c (MAX_CODE_ALIGN): Likewise.
4919 * opts.c (parse_and_check_align_values):
4920 (MAX_CODE_ALIGN): Likewise.
4921 (MAX_CODE_ALIGN_VALUE): Likewise.
4923 2018-07-17 Martin Liska <mliska@suse.cz>
4925 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
4926 in order to fulfil coding style.
4927 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4928 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4929 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4930 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
4931 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
4932 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
4933 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
4934 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
4935 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4937 2018-07-17 Martin Liska <mliska@suse.cz>
4939 * align.h: New file.
4940 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
4942 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
4943 align_flags of label_to_alignment.
4944 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
4946 * config/m68k/m68k.c: Do not use removed align_labels_value and
4948 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
4949 (LOOP_ALIGN): Likewise.
4950 (LABEL_ALIGN): Likewise.
4951 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4952 Remove not used macro.
4953 (rs6000_loop_align): Change return type to align_flags.
4954 (rs6000_loop_align_max_skip): Remove.
4955 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
4956 Change return type to align_flags.
4957 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4958 Remove not used macro.
4959 (rs6000_loop_align): Change return type to align_flags.
4960 (rs6000_loop_align_max_skip): Remove.
4961 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
4962 * config/rx/rx-protos.h (rx_align_for_label): Make it
4964 * config/rx/rx.c (rx_align_for_label): Change return type
4966 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
4968 into align_flags class.
4969 (LABEL_ALIGN): Likewise.
4970 (LOOP_ALIGN): Likewise.
4971 * config/s390/s390.c (s390_label_align): Use align_flags
4973 (s390_asm_output_function_label): Likewise.
4974 * config/sh/sh.c (sh_override_options_after_change):
4975 Use align_flags class directly without macros.
4976 (find_barrier): Likewise.
4977 (barrier_align): Likewise.
4978 (sh_loop_align): Likewise.
4979 * config/spu/spu.c (spu_option_override):
4980 Use align_flags_tuple::get_value instead of removed macros.
4981 (spu_sched_init): Likewise.
4982 * config/spu/spu.h (GTY): Likewise.
4983 * config/visium/visium.c (visium_option_override):
4984 Set "8" as default secondary alignment.
4985 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
4986 in order to guarantee secondary alignment of 8.
4987 * coretypes.h: Include align.h header file.
4988 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
4989 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
4990 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
4991 * doc/tm.texi.in: Likewise.
4992 * final.c (struct label_alignment): Remove not used structure.
4993 (LABEL_ALIGN): Change type to align_flags.
4994 (LOOP_ALIGN): Likewise.
4995 (JUMP_ALIGN): Likewise.
4996 (default_loop_align_max_skip): Remove.
4997 (default_label_align_max_skip): Likewise.
4998 (default_jump_align_max_skip): Likewise.
4999 (default_label_align_after_barrier_max_skip):
5000 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5001 (LABEL_TO_MAX_SKIP): Remove.
5002 (label_to_alignment): Return align_flags type instead of integer.
5003 (label_to_max_skip): Remove.
5004 (align_fuzz): Use align_flags type.
5005 (compute_alignments): Use align_flags type and use align_flags::max
5006 to combine multiple alignments.
5007 (grow_label_align): Grow vec instead of C array.
5008 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5009 (shorten_branches): Use align_flags type and use align_flags::max
5010 to combine multiple alignments.
5011 (final_scan_insn_1): Remove usage of secondary alignment that comes
5012 from label alignment, but instead use proper secondary alignment
5013 which is computed in grow_label_align.
5014 * flags.h (struct align_flags_tuple): Move to align.h.
5015 (struct align_flags): Likewise.
5016 (state_align_loops): Rename to align_loops.
5017 (state_align_jumps): Rename to align_jumps.
5018 (state_align_labels): Rename to align_labels.
5019 (state_align_functions): Rename to align_functions.
5020 (align_loops_log): Remove.
5021 (align_jumps_log): Remove.
5022 (align_labels_log): Remove.
5023 (align_functions_log): Remove.
5024 (align_loops_max_skip): Remove.
5025 (align_jumps_max_skip): Remove.
5026 (align_labels_max_skip): Remove.
5027 (align_functions_max_skip): Remove.
5028 (align_loops_value): Remove.
5029 (align_jumps_value): Remove.
5030 (align_labels_value): Remove.
5031 (align_functions_value): Remove.
5032 * output.h (label_to_alignment): Change return type to align_flags.
5033 (label_to_max_skip): Remove.
5034 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5035 jump_align_max_skip macros.
5036 * targhooks.h (default_loop_align_max_skip): Remove.
5037 (default_label_align_max_skip): Likewise.
5038 (default_jump_align_max_skip): Likewise.
5039 (default_label_align_after_barrier_max_skip): Remove.
5040 * toplev.c (read_log_maxskip): Use ::normalize function.
5041 (parse_N_M): Remove not used argument and also call ::normalize.
5042 (parse_alignment_opts): Do not pass unused arguments.
5043 * varasm.c (assemble_start_function): Use directly align_functions
5044 instead of removed macros.
5045 * system.h: Do not poison removed macros.
5047 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5050 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5051 and cond temporaries don't have reference type if iterator has
5052 pointer type. For init use &for_pre_body instead of pre_p if
5053 for_pre_body is non-empty.
5055 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5057 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5058 double-double modes to SFmode directly directly.
5059 (trunc<mode>sf2_fprs): Delete.
5061 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5063 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5064 for conversions between IFmode and the decimal floating point modes.
5065 (init_float128_ieee): Use the correct names for conversions between
5066 KFmode and the decimal floating point modes.
5068 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5070 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5071 for the conversions between TDmode and IFmode.
5072 (init_float128_ieee): Use more correct names for the conversions
5073 between TDmode and KFmode.
5075 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5077 PR tree-optimization/86526
5078 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5079 (inline_expand_builtin_string_cmp): Likewise.
5080 (inline_string_cmp): Likewise. Use c_readstr instead of
5081 builtin_memcpy_read_str. Add unit_mode temporary.
5083 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5086 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5087 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5089 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5091 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5092 Alphabetize prototypes of built-in functions, separating out
5093 built-in functions that are listed in this section but should be
5094 described elsewhere.
5096 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5099 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5100 conditional move when trapping comparison was split to a
5101 non-trapping one (and vice versa).
5103 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5105 * config/s390/s390.c (s390_function_profiler): Generate nops
5106 instead of profiler call sequences.
5107 * config/s390/s390.opt: Add the new option.
5109 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5111 * config/s390/s390.c (s390_function_profiler): Generate
5112 __mcount_loc section.
5113 * config/s390/s390.opt: Add the new option.
5115 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5117 * common.opt: Add the new warning.
5118 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5119 %r0,__fentry__" when -mfentry is specified.
5120 (s390_option_override_internal): Disallow -mfentry for 31-bit
5122 * config/s390/s390.opt: Add the new option.
5124 2018-07-16 Richard Biener <rguenther@suse.de>
5127 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5128 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5130 2018-07-16 Martin Liska <mliska@suse.cz>
5133 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5136 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5138 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5140 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5142 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5144 * config/arc/arc-cpus.def (hs4x): New cpu.
5146 * config/arc/arc-tables.opt: Regenerate.
5147 * config/arc/arc.c (arc_sched_issue_rate): New function.
5148 (TARGET_SCHED_ISSUE_RATE): Define.
5149 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5150 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5152 (attr tune): Add ARCHS4x tune values.
5153 (attr tune_dspmpy): Define.
5154 (*tst): Correct instruction type.
5155 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5156 * config/arc/arcHS4x.md: New file.
5157 * config/arc/fpu.md: Update instruction type attributes.
5158 * config/arc/t-multilib: Regenerate.
5160 2018-07-16 Tom de Vries <tdevries@suse.de>
5163 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5165 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5167 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5170 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5172 PR tree-optimization/86514
5173 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5174 conversion to a boolean type from a type with greater precision.
5176 2018-07-16 Tom de Vries <tdevries@suse.de>
5178 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5179 dump_flags request TDF_SLIM.
5181 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5183 * fold-const.c (int_const_binop_1): Abstract...
5184 (wide_int_binop): ...wide int code here.
5185 (poly_int_binop): ...poly int code here.
5186 Abstract the rest of int_const_binop_1 into int_const_binop.
5187 * fold-const.h (wide_int_binop): New.
5188 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5189 Remove useless PLUS/MINUS_EXPR case.
5190 (zero_nonzero_bits_from_vr): Move wide int code...
5191 (zero_nonzero_bits_from_bounds): ...here.
5192 (extract_range_from_binary_expr_1): Move mask optimization code...
5193 (range_easy_mask_min_max): ...here.
5194 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5195 (range_easy_mask_min_max): New.
5197 2018-07-15 Jeff Law <law@redhat.com>
5200 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5203 2018-07-14 Jim Wilson <jimw@sifive.com>
5205 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5207 2018-07-14 Paul Koning <ni1d@arrl.net>
5209 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5211 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5213 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5216 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5217 Steve Munroe <munroesj52@gmail.com>
5219 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5220 (_mm_andnot_si128): Likewise.
5221 (_mm_or_si128): Likewise.
5222 (_mm_xor_si128): Likewise.
5224 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5227 * builtins.c (expand_builtin_memcmp): Inline the calls first
5228 when result_eq is false.
5229 (expand_builtin_strcmp): Inline the calls first.
5230 (expand_builtin_strncmp): Likewise.
5231 (inline_string_cmp): New routine. Expand a string compare
5232 call by using a sequence of char comparison.
5233 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5234 a call to str(n)cmp/memcmp.
5235 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5237 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5239 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5241 * config/arm/driver-arm.c: Include arm-native.h.
5242 (host_detect_local_cpu): Use auto-generated data tables.
5243 (vendors, arm_cpu_table): Delete. Move part information to ...
5244 * config/arm/arm-cpus.in: ... here.
5245 * config/arm/parsecpu.awk (gen_native): New function.
5246 (vendor, part): New CPU fields.
5247 (END): Add support for building the native CPU detection tables.
5248 * config/arm/t-arm (arm-native.h): Add build rule.
5249 (driver-arm.o): Add dependency on arm-native.h.
5251 2018-07-13 Richard Biener <rguenther@suse.de>
5254 * match.pd (addr1 - addr2): Allow either of the operand to
5257 2018-07-13 Tom de Vries <tdevries@suse.de>
5259 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5262 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5264 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5265 arrays instead of numbered variables.
5267 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5269 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5270 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5272 2018-07-13 Richard Biener <rguenther@suse.de>
5275 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5276 instead of get_context_die.
5278 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5279 Richard Biener <rguenther@suse.de>
5282 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5283 that the loop latch destination where phi is defined.
5285 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5287 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5288 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5289 (riscv_set_current_function): Extract getting interrupt type to new
5291 (riscv_get_interrupt_type): New function.
5292 (riscv_merge_decl_attributes): New function, checking interrupt type is
5294 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5296 2018-07-12 Paul Koning <ni1d@arrl.net>
5298 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5301 2018-07-12 Paul Koning <ni1d@arrl.net>
5303 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5304 zero reference, add doloop_end instead.
5305 * doc/md.texi (decrement_and_branch_until_zero): Remove.
5306 (Looping patterns): Remove decrement_and_branch_until_zero. Add
5307 detail for doloop_end.
5309 2018-07-12 Martin Sebor <msebor@redhat.com>
5312 * attribs.c (decl_attributes): Reject conflicting attributes before
5313 calling attribute handlers.
5315 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5317 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5319 (gcc::dump_manager::get_dump_file_name): likewise.
5320 (dump_begin): Likewise.
5321 * dumpfile.h (dump_begin): Update prototype.
5322 (gcc::dump_manager::get_dump_file_name,
5323 gcc::dump_manager::get_dump_file_name): Update prototype.
5325 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5327 * internal-fn.h (vectorizable_internal_fn_p): New function.
5328 * tree-vect-slp.c (compatible_calls_p): Likewise.
5329 (vect_build_slp_tree_1): Remove nops argument. Handle calls
5330 to internal functions.
5331 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5333 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5335 * fold-const.h (inverse_conditions_p): Declare.
5336 * fold-const.c (inverse_conditions_p): New function.
5337 * match.pd: Use inverse_conditions_p. Add folds of view_converts
5338 that test the inverse condition of a conditional internal function.
5339 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5340 * internal-fn.c (internal_fn_mask_index): Handle conditional
5342 (vectorized_internal_fn_supported_p): New function.
5343 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5344 (any_pred_load_store): Replace with...
5345 (need_to_predicate): ...this new variable.
5346 (redundant_ssa_names): New variable.
5347 (ifcvt_can_use_mask_load_store): Move initial checks to...
5348 (ifcvt_can_predicate): ...this new function. Handle tree codes
5349 for which a conditional internal function exists.
5350 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5351 instead of ifcvt_can_use_mask_load_store. Update after variable
5353 (predicate_load_or_store): New function, split out from
5354 predicate_mem_writes.
5355 (check_redundant_cond_expr): New function.
5356 (value_available_p): Likewise.
5357 (predicate_rhs_code): Likewise.
5358 (predicate_mem_writes): Rename to...
5359 (predicate_statements): ...this. Use predicate_load_or_store
5360 and predicate_rhs_code.
5361 (combine_blocks, tree_if_conversion): Update after above name changes.
5362 (ifcvt_local_dce): Handle redundant_ssa_names.
5363 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5364 general conditional functions.
5365 * tree-vect-stmts.c (vectorizable_call): Likewise.
5367 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5368 Alan Hayward <alan.hayward@arm.com>
5369 David Sherwood <david.sherwood@arm.com>
5371 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5372 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5373 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5374 plus and minus and convert them into IFN_COND_FMA-based sequences.
5375 (convert_mult_to_fma): Handle conditional plus and minus.
5377 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5379 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5380 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5381 (cond_fnms_optab): New optabs.
5382 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5384 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5385 * internal-fn.h (get_conditional_internal_fn): Declare.
5386 (get_unconditional_internal_fn): Likewise.
5387 * internal-fn.c (cond_ternary_direct): New macro.
5388 (expand_cond_ternary_optab_fn): Likewise.
5389 (direct_cond_ternary_optab_supported_p): Likewise.
5390 (FOR_EACH_COND_FN_PAIR): Likewise.
5391 (get_conditional_internal_fn): New function.
5392 (get_unconditional_internal_fn): Likewise.
5393 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5394 (gimple_match_op::gimple_match_op): Add a new overload for 5
5396 (gimple_match_op::set_op): Likewise.
5397 (gimple_resimplify5): Declare.
5398 * genmatch.c (decision_tree::gen): Generate simplifications for
5400 * gimple-match-head.c (gimple_simplify): Define an overload for
5401 5 operands. Handle calls with 5 arguments in the top-level overload.
5402 (convert_conditional_op): Handle conversions from unconditional
5403 internal functions to conditional ones.
5404 (gimple_resimplify5): New function.
5405 (build_call_internal): Pass a fifth operand.
5406 (maybe_push_res_to_seq): Likewise.
5407 (try_conditional_simplification): Try converting conditional
5408 internal functions to unconditional internal functions.
5409 Handle 3-operand unconditional forms.
5410 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5411 Define ternary equivalents of the current rules for binary conditional
5413 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5415 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5416 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5417 (optab): Handle them.
5418 (SVE_COND_FP_TERNARY): New int iterator.
5419 (sve_fmla_op, sve_fmad_op): New int attributes.
5420 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5421 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5422 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5424 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5426 * target.def (preferred_else_value): New target hook.
5427 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5428 * doc/tm.texi: Regenerate.
5429 * targhooks.h (default_preferred_else_value): Declare.
5430 * targhooks.c (default_preferred_else_value): New function.
5431 * internal-fn.h (conditional_internal_fn_code): Declare.
5432 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5433 (get_conditional_internal_fn): Use it.
5434 (conditional_internal_fn_code): New function.
5435 * gimple-match.h (gimple_match_cond): New struct.
5436 (gimple_match_op): Add a cond member function.
5437 (gimple_match_op::gimple_match_op): Update all forms to take a
5439 * genmatch.c (expr::gen_transform): Use the same condition as res_op
5440 for the suboperation, but don't specify a particular else_value.
5441 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5442 (visit_nary_op, visit_reference_op_load): Pass
5443 gimple_match_cond::UNCOND to the gimple_match_op constructor.
5444 * gimple-match-head.c: Include tree-eh.h
5445 (convert_conditional_op): New function.
5446 (maybe_resimplify_conditional_op): Likewise.
5447 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5448 (gimple_resimplify2): Likewise.
5449 (gimple_resimplify3): Likewise.
5450 (gimple_resimplify4): Likewise.
5451 (maybe_push_res_to_seq): Return null for conditional operations.
5452 (try_conditional_simplification): New function.
5453 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
5455 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5457 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5459 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5461 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5463 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5465 (hash_tree): Do not hash DECL_FCONTEXT
5466 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5467 Do not stream DECL_FCONTEXT.
5468 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5469 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5471 2018-07-12 Richard Biener <rguenther@suse.de>
5474 * dwarf2out.c (gen_block_die): Only output blocks when they have
5475 at least one !DECL_IGNORED_P variable.
5477 2018-07-12 Richard Biener <rguenther@suse.de>
5480 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5481 Remove -mieee-fp handling.
5483 2018-07-12 Richard Biener <rguenther@suse.de>
5485 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5486 left-over from last patch.
5488 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5490 PR tree-optimization/86492
5491 * gimple-ssa-store-merging.c
5492 (imm_store_chain_info::coalesce_immediate_stores): Call
5493 check_no_overlap even for the merge_overlapping case. Formatting fix.
5495 2018-07-12 Richard Biener <rguenther@suse.de>
5498 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5499 move possibly trapping operations into the conditional.
5501 2018-07-12 Richard Biener <rguenther@suse.de>
5503 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5504 (vn_lookup_simplify_result): Remove recursion limit applied
5506 (vn_nary_build_or_lookup_1): Adjust.
5507 (try_to_simplify): Likewise.
5508 * gimple-match-head.c (gimple_resimplify1): Instead apply one
5510 (gimple_resimplify2): Likewise.
5511 (gimple_resimplify3): Likewise.
5512 (gimple_resimplify4): Likewise.
5514 2018-07-11 Jakub Jelinek <jakub@redhat.com>
5516 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5517 Use __mmask64 type instead of __mmask8 for __M argument.
5518 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5519 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5521 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5522 __mmask16 for __M argument.
5523 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5524 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5525 to __mmask16 instead of __mmask8.
5526 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5527 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5528 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5529 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5530 instead of __mmask16 for __U argument.
5531 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5532 __mmask16 instead of __mmask8 for __U argument.
5533 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5535 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5537 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5539 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5541 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5543 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5545 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5547 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5549 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5551 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5553 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5554 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5555 return type as well as __M argument type and all casts from __mmask8
5557 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5558 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5559 return type as well as __M argument type and all casts from __mmask8
5561 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5562 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5563 return type as well as __M argument type and all casts from __mmask8
5565 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5566 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5567 return type as well as __M argument type and all casts from __mmask8
5569 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5570 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5573 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
5575 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5576 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5579 2018-07-11 Paul Koning <ni1d@arrl.net>
5581 * doc/md.texi (define_subst): Document how multiple occurrences of
5582 the same argument in the replacement pattern are handled.
5584 2018-07-11 Paul Koning <ni1d@arrl.net>
5586 * doc/extend.texi (Common Variable Attributes): Move "mode" into
5588 (Common Type Attributes): Add "mode" attribute.
5590 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
5592 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5593 stream DECL_ORIGINAL_TYPE.
5594 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5595 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5596 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5597 Do not walk original type.
5598 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5600 (write_ts_decl_non_common_tree_pointers): Do not stream
5602 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5603 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5605 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5607 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5608 thread twice from the same starting edge.
5610 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5612 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5613 * gimple.c (gimple_call_nonnull_result_p): ...here...
5614 (gimple_call_nonnull_arg): ...and here.
5615 * gimple.h (gimple_call_nonnull_result_p): New.
5616 (gimple_call_nonnull_arg): New.
5618 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
5620 * config/arm/arm-cpus.in: Move information from fpu field of each
5621 cpu definition to the isa field.
5622 * config/arm/parsecpu.awk (fpu): Delete match rule.
5623 (gen_comm_data): Don't add bits from the CPU's FPU entry.
5625 2018-07-11 Richard Biener <rguenther@suse.de>
5628 * dwarf2out.c (init_sections_and_labels): Use
5629 output_asm_line_debug_info consistently.
5630 (dwarf2out_early_finish): Likewise.
5631 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5634 2018-07-11 Richard Biener <rguenther@suse.de>
5636 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5637 Rework father_bb setting in a way to avoid propagating constants
5638 multiple times on a loop body.
5640 2018-07-10 Mark Wielaard <mark@klomp.org>
5643 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5645 2018-07-10 Richard Biener <rguenther@suse.de>
5647 * hash-map.h (hash_map::iterator::operator*): Return
5648 references to key and value.
5650 2018-07-10 Jakub Jelinek <jakub@redhat.com>
5653 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5654 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5655 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5656 (gimplify_omp_for): For composite loops, move outer
5657 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5658 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
5659 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
5660 TREE_LIST for both the original class iterator and the "last" helper
5661 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
5662 loop, remember has_decl_expr from outer composite loops for the
5663 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5665 2018-07-09 Martin Sebor <msebor@redhat.com>
5669 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5670 accessing implicitly initialized array elements.
5671 * expr.c (string_constant): Handle string initializers of
5672 character arrays within aggregates.
5673 * gimple-fold.c (fold_array_ctor_reference): Add argument.
5674 Store element offset. As a special case, handle zero size.
5675 (fold_nonarray_ctor_reference): Same.
5676 (fold_ctor_reference): Add argument. Store subobject offset.
5677 * gimple-fold.h (fold_ctor_reference): Add argument.
5679 2018-07-09 Paul Koning <ni1d@arrl.net>
5681 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5682 (pdp11_insn_cost): New function.
5683 (pdp11_md_asm_adjust): New function.
5684 (TARGET_INVALID_WITHIN_DOLOOP): Define.
5685 (pdp11_rtx_costs): Update to match machine better.
5686 (output_addr_const_pdp11): Correct format mismatch warnings.
5687 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5688 * config/pdp11/pdp11.md: General change to add base_cost and/or
5689 length attributes for use by new pdp11_insn_cost function.
5690 (MIN_BRANCH): Correct definition.
5692 (doloop_end): Use standard pattern name for looping pattern.
5693 (doloop_end_nocc): New.
5694 (movsf): Add another constraint alternative.
5695 (zero_extendqihi2): Add constraint alternatives for not in place
5697 (zero_extendhisi2): Remove.
5698 (shift patterns): Add CC handling variants.
5702 (define_peephole2): New peephole to recognize mov that sets CC for
5705 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5707 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5708 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5711 2018-07-09 Jakub Jelinek <jakub@redhat.com>
5714 * real.c (real_nextafter): Return true if result is denormal.
5716 2018-07-09 Martin Liska <mliska@suse.cz>
5718 * common.opt: Add back wrongly removed attribute.
5720 2018-07-09 Richard Biener <rguenther@suse.de>
5723 * dwarf2out.c (gen_block_die): For an early generated DIE
5724 always output high/low PC attributes.
5726 2018-07-09 Tom de Vries <tdevries@suse.de>
5728 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5729 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5730 onto VAR_DECL with abstract origin.
5732 2018-07-07 Jim Wilson <jimw@sifive.com>
5734 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5736 2018-07-07 Tom de Vries <tdevries@suse.de>
5738 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5740 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
5742 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5744 (combine_bound): Use wide-int overflow calculation instead of
5746 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5748 * fold-const.c (int_const_binop_2): Same.
5749 (extract_muldiv_1): Same.
5750 (fold_div_compare): Same.
5751 (fold_abs_const): Same.
5753 * poly-int.h (add): Same.
5757 * predict.c (predict_iv_comparison): Same.
5758 * profile-count.c (slow_safe_scale_64bit): Same.
5759 * simplify-rtx.c (simplify_const_binary_operation): Same.
5760 * tree-chrec.c (tree_fold_binomial): Same.
5761 * tree-data-ref.c (split_constant_offset_1): Same.
5762 * tree-if-conv.c (idx_within_array_bound): Same.
5763 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
5764 * tree-ssa-phiopt.c (minmax_replacement): Same.
5765 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
5766 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
5767 * vr-values.c (vr_values::adjust_range_with_scev): Same.
5768 * wide-int.cc (wi::add_large): Same.
5769 (wi::mul_internal): Same.
5770 (wi::sub_large): Same.
5771 (wi::divmod_internal): Same.
5772 * wide-int.h: Change overflow type to overflow_type for neg, add,
5773 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
5774 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
5775 mul_internal, divmod_internal.
5776 (overflow_type): New enum.
5777 (accumulate_overflow): New.
5779 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5781 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5782 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5784 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5786 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5787 argument is checked for zero before entering loop, avoid checking again.
5789 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5791 * gimplify.h (generic_expr_could_trap_p): Set as global function.
5792 * gimplify.h (generic_expr_could_trap_p): Likwise.
5793 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5795 2018-07-06 Jakub Jelinek <jakub@redhat.com>
5797 PR tree-optimization/86401
5798 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5799 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5800 (fold_bit_and_mask): ... here. New helper function for match.pd.
5801 * fold-const.h (fold_bit_and_mask): Declare.
5802 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5804 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
5807 * target.def (translate_mode_attribute): New hook.
5808 * targhooks.h (default_translate_mode_attribute): Declare.
5809 * targhooks.c (default_translate_mode_attribute): New function.
5810 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5811 * doc/tm.texi: Regenerate.
5812 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5813 (rs6000_translate_mode_attribute): New function.
5815 2018-07-06 Paul Koning <ni1d@arrl.net>
5817 * doc/md.texi (define_split): Document DONE and FAIL.
5818 (define_peephole2): Ditto.
5820 2018-07-05 Jeff Law <law@redhat.com>
5822 PR tree-optimization/86010
5823 * tree-ssa-dse.c (compute_trims): More aggressively trim at
5824 both the head and tail of mem* and str* calls.
5826 2018-07-05 Jim Wilson <jimw@sifive.com>
5828 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5830 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
5832 * config/aarch64/aarch64-simd.md: correct flags text for
5833 MIN_EXPR replacement.
5835 2018-07-05 James Clarke <jrtc27@jrtc27.com>
5837 * configure: Regenerated.
5839 2018-07-05 Carl Love <cel@us.ibm.com>
5841 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
5842 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
5843 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
5844 VSX_BUILTIN_DOUBLEL_V4SF.
5846 2018-07-05 Martin Sebor <msebor@redhat.com>
5849 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
5850 than its domain to compute its the upper bound of a char array.
5852 2018-07-05 Nathan Sidwell <nathan@acm.org>
5854 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
5855 * doc/cpp.texi: Update comment.
5856 * doc/tm.texi: Rebuilt.
5857 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
5858 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
5859 * doc/extend.texi (Backwards Compatibility): Clarify it is system
5860 headers affected by extern "C".
5861 * system.h: Poison NO_IMPLICIT_EXTERN_C.
5862 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
5863 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
5864 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
5865 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
5866 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
5867 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
5868 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
5869 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
5870 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
5871 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
5872 config/sparc/sp64-elf.h, config/spu/spu.h,
5873 config/stormy16/stormy16.h, config/v850/v850.h,
5874 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
5875 define NO_IMPLICIT_EXTERN_C.
5876 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
5878 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5881 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5882 instead of GET_MODE_SIZE when comparing Units.
5884 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5887 * rtlanal.c (set_noop_p): Constrain on mode change,
5888 include hard-reg-set.h
5890 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5892 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
5894 2018-07-05 Jakub Jelinek <jakub@redhat.com>
5897 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5900 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5902 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5904 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5907 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5909 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5911 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
5914 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
5916 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
5918 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
5919 neg_*_op* variables.
5921 2018-07-04 Martin Liska <mliska@suse.cz>
5923 * tree-switch-conversion.c: Define
5924 max_ratio_for_speed and max_ratio_for_size constants.
5926 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5927 Martin Liska <mliska@suse.cz>
5932 * common.opt: Rename align options with 'str_' prefix.
5933 * common/config/i386/i386-common.c (set_malign_value): New
5935 (ix86_handle_option): Use it to set -falign-* options/
5936 * config/aarch64/aarch64-protos.h (struct tune_params): Change
5937 type from int to string.
5938 * config/aarch64/aarch64.c: Update default values from int
5940 * config/alpha/alpha.c (alpha_override_options_after_change):
5942 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
5943 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5944 max skip conditionally.
5945 * config/i386/freebsd.h (SUBALIGN_LOG): New.
5946 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5947 max skip conditionally.
5948 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5949 max skip conditionally.
5950 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
5951 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5952 max skip conditionally.
5953 * config/i386/i386.c (struct ptt): Change type from int to
5955 (ix86_default_align): Set default values.
5956 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
5957 max skip conditionally.
5958 * config/i386/iamcu.h (SUBALIGN_LOG): New.
5959 (ASM_OUTPUT_MAX_SKIP_ALIGN):
5960 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
5961 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5962 max skip conditionally.
5963 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
5964 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
5965 * config/i386/x86-64.h (SUBALIGN_LOG): New.
5966 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5967 max skip conditionally.
5968 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5969 * config/ia64/ia64.c (ia64_option_override): Set default values
5970 for alignment options.
5971 * config/m68k/m68k.c: Handle new str_align_* options.
5972 * config/mips/mips.c (mips_set_compression_mode): Change
5974 (mips_option_override): Set default values for options.
5975 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5977 * config/rs6000/rs6000.c (rs6000_option_override_internal):
5979 * config/rx/rx.c (rx_option_override): Likewise.
5980 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
5981 (LABEL_ALIGN): Use align_labels_log.
5982 (LOOP_ALIGN): Use align_loops_align.
5983 * config/s390/s390.c (s390_asm_output_function_label): Use new
5985 * config/sh/sh.c (sh_override_options_after_change):
5986 Change type of constants.
5987 * config/spu/spu.c (spu_sched_init): Likewise.
5988 * config/sparc/sparc.c (sparc_option_override): Set default
5990 * config/visium/visium.c (visium_option_override): Likewise.
5991 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
5992 emit p2align format with last argument if it's not needed.
5993 * doc/invoke.texi: Document extended format of -falign-*.
5994 * final.c: Use align_labels alignment.
5995 * flags.h (struct target_flag_state): Change type to use
5997 (struct align_flags_tuple): New.
5998 (struct align_flags): Likewise.
5999 (align_loops_log): Redefine macro to use new types.
6000 (align_loops_max_skip): Redefine macro to use new types.
6001 (align_jumps_log): Redefine macro to use new types.
6002 (align_jumps_max_skip): Redefine macro to use new types.
6003 (align_labels_log): Redefine macro to use new types.
6004 (align_labels_max_skip): Redefine macro to use new types.
6005 (align_functions_log): Redefine macro to use new types.
6006 (align_loops): Redefine macro to use new types.
6007 (align_jumps): Redefine macro to use new types.
6008 (align_labels): Redefine macro to use new types.
6009 (align_functions): Redefine macro to use new types.
6010 (align_functions_max_skip): Redefine macro to use new types.
6011 (align_loops_value): New macro.
6012 (align_jumps_value): New macro.
6013 (align_labels_value): New macro.
6014 (align_functions_value): New macro.
6015 * function.c (invoke_set_current_function_hook): Propagate
6016 alignment values from flags to global variables default in
6018 * ipa-icf.c (sem_function::equals_wpa): Use
6019 cl_optimization_option_eq instead of memcmp.
6020 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6022 (cl_optimization_stream_in): Likewise.
6023 * optc-save-gen.awk: Support strings in cl_optimization.
6024 * opth-gen.awk: Likewise.
6025 * opts.c (finish_options): Remove error checking of invalid
6027 (MAX_CODE_ALIGN): Remove.
6028 (MAX_CODE_ALIGN_VALUE): Likewise.
6029 (parse_and_check_align_values): New function.
6030 (check_alignment_argument): Likewise.
6031 (common_handle_option): Use check_alignment_argument.
6032 * opts.h (parse_and_check_align_values): Declare.
6033 * toplev.c (init_alignments): Remove.
6034 (read_log_maxskip): New.
6035 (parse_N_M): Likewise.
6036 (parse_alignment_opts): Likewise.
6037 (backend_init_target): Remove usage of init_alignments.
6038 * toplev.h (parse_alignment_opts): Declare.
6039 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6041 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6042 * tree.c (cl_option_hasher::equal): New.
6043 * varasm.c: Use new global macros.
6045 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6047 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6048 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6049 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6050 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6051 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6052 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6053 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6054 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6055 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6056 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6057 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6058 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6059 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6061 2018-07-04 Martin Liska <mliska@suse.cz>
6062 Jonathan Wakely <jwakely@redhat.com>
6064 * coverage.c: Use correct type.
6065 * doc/invoke.texi: Language correction.
6067 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6070 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6071 ENDBRANCH for non-tail call which may return via indirect branch.
6072 * doc/extend.texi: Document indirect_return attribute.
6074 2018-07-03 Martin Sebor <msebor@redhat.com>
6076 PR tree-optimization/86274
6077 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6079 (format_floating): Correct handling of infinities and NaNs.
6081 2018-07-03 Martin Sebor <msebor@redhat.com>
6083 * print-tree.c (print_real_cst): New function.
6084 (print_node_brief): Call it.
6085 (print_node): Ditto.
6087 2018-07-03 Jeff Law <law@redhat.com>
6089 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6090 into a single pattern.
6092 * config/h8300/h8300.md (ors code_iterator): New.
6093 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6094 a single pattern and single splitter.
6095 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6096 (iorqi3_1, xorqi3_1): Likewise.
6097 (iorqi3, xorqi3 expanders): Similarly.
6099 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6100 (movmd_internal) into a single pattern using the P mode iterator.
6101 (movmd splitters): Similarly.
6102 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6103 (movsd splitters): Similarly.
6105 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6106 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6107 right table based on the size of the operand.
6108 * config/h8300/h8300.md (length_table): Corresponding changes. All
6109 references to "addb", "addw" and "addl" changed to "add".
6110 (btst patterns): Merge two variants into a single pattern.
6111 (tstqi, tsthi): Likewise.
6112 (addhi3_incdec, addsi3_incdec): Likewise.
6113 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6114 (mulhi3, mulsi3): Likewise.
6115 (udivhi3, udivsi3): Likewise.
6116 (divhi3, divsi3): Likewise.
6117 (andorqi3, andorhi3, andorsi3): Likewise.
6119 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6122 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6123 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6125 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6127 PR tree-optimization/85694
6128 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6129 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6131 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6132 (<u>avg<mode>3_ceil): New patterns.
6134 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6136 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6137 scan-tree-dump directive.
6138 * gcc.dg/vect/slp-perm-2.c: Likewise.
6139 * gcc.dg/vect/slp-perm-3.c: Likewise.
6140 * gcc.dg/vect/slp-perm-5.c: Likewise.
6141 * gcc.dg/vect/slp-perm-6.c: Likewise.
6142 * gcc.dg/vect/slp-perm-7.c: Likewise.
6143 * gcc.dg/vect/slp-perm-8.c: Likewise.
6145 2018-07-03 Marek Polacek <polacek@redhat.com>
6148 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6150 2018-07-03 Richard Biener <rguenther@suse.de>
6153 * tree-ssa-structalias.c (find_func_clobbers): Properly
6154 handle indirect calls.
6156 2018-07-03 Jeff Law <law@redhat.com>
6158 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6159 (shifts): New code iterator.
6160 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6161 expander. Fix HImode handling on H8/SX.
6162 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6163 (subqi3, subhi3, subsi3 expanders): Likewise.
6164 (andqi3, andhi3, andsi3 expanders): Likewise.
6165 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6166 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6167 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6168 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6169 (zero_extendqihi2, zero_extendqisi2): Likewise.
6170 (extendqihi2, extendqisi2): Likewise.
6171 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6172 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6173 (rotlqi3_1, rotlhi3_1): Likewise.
6174 (logicalhi3_sn, logicalsi3_sn): Likewise.
6175 (logicalhi3, logicalsi3): Likewise.
6177 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6179 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6180 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6181 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6182 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6183 type to append_pattern_def_seq instead of creating a stmt_vec_info
6185 (build_mask_conversion): Likewise. Remove vinfo argument.
6186 (vect_add_conversion_to_patterm): Likewise, renaming to...
6187 (vect_add_conversion_to_pattern): ...this.
6188 (vect_recog_mask_conversion_pattern): Update call to
6189 build_mask_conversion. Pass the vector type to
6190 append_pattern_def_seq here too.
6191 (vect_recog_gather_scatter_pattern): Update call to
6192 vect_add_conversion_to_pattern.
6194 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6196 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6197 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6198 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6199 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6200 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6201 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6202 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6203 append_pattern_def_seq instead of new_pattern_def_seq.
6204 (vect_recog_divmod_pattern): Do both of the above.
6205 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6208 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6210 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6211 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6212 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6213 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6214 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6215 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6216 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6217 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6218 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6219 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6220 parameter with a single stmt_vec_info.
6221 (vect_recog_func_ptr): Likewise.
6222 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6223 (vect_try_gather_scatter_pattern): ...this.
6224 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6225 the stmt_vec_info of the statement to be matched. Don't clear
6226 STMT_VINFO_RELATED_STMT.
6227 (vect_pattern_recog): Update call accordingly.
6229 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6231 PR tree-optimization/85694
6232 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6233 (uavgM3_ceil): Document new optabs.
6234 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6235 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6237 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6238 (savg_ceil_optab): New optabs.
6239 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6240 (vect_vect_recog_func_ptrs): Add it.
6241 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6242 constant directly from the associated lhs.
6244 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6246 * tree-vect-patterns.c (vect_split_statement): New function.
6247 (vect_convert_input): Use it to try to split an existing cast.
6249 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6251 * poly-int.h (print_hex): New function.
6252 * dumpfile.h (dump_dec, dump_hex): Declare.
6253 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6254 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6255 min_input_precision, operation_precision and operation_sign.
6256 * tree-vect-patterns.c (vect_get_range_info): New function.
6257 (vect_same_loop_or_bb_p, vect_single_imm_use)
6258 (vect_operation_fits_smaller_type): Delete.
6259 (vect_look_through_possible_promotion): Add an optional
6260 single_use_p parameter.
6261 (vect_recog_over_widening_pattern): Rewrite to use new
6262 stmt_vec_info infomration. Handle one operation at a time.
6263 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6264 (vect_truncatable_operation_p, vect_set_operation_type)
6265 (vect_set_min_input_precision): New functions.
6266 (vect_determine_min_output_precision_1): Likewise.
6267 (vect_determine_min_output_precision): Likewise.
6268 (vect_determine_precisions_from_range): Likewise.
6269 (vect_determine_precisions_from_users): Likewise.
6270 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6271 (vect_vect_recog_func_ptrs): Put over_widening first.
6273 (vect_pattern_recog): Call vect_determine_precisions.
6275 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6277 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6278 statements that have been replaced by further pattern statements.
6279 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6281 2018-07-03 Richard Biener <rguenther@suse.de>
6283 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6284 always set *dt. Dump vectype in vectype overload.
6285 * dumpfile.h (dump_gimple_expr): New function.
6286 (dump_gimple_expr_loc): Likewise.
6287 * dumpfile.c (dump_gimple_expr): New function.
6288 (dump_gimple_expr_loc): Likewise.
6290 2018-07-02 Jeff Law <law@redhat.com>
6292 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6293 the H8/300, H8/300H and H8/S variants into a single pattern.
6294 (movhi_h8300, movqi_h8300hs): Similarly.
6295 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6296 (QHI mode iterator): New.
6298 * config/h8300/h8300.md: Remove trailing whitespace.
6300 2018-07-02 Jim Wilson <jimw@sifive.com>
6302 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6303 instead of emit_insn for interrupt returns.
6304 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6305 (riscv_sret, riscv_uret): Likewise.
6307 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6309 * pretty-print.c (selftest::test_pp_format): Move save and restore
6310 of quotes to class auto_fix_quotes, and add an instance.
6311 * selftest.c: Include "intl.h".
6312 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6313 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6314 * selftest.h (selftest::auto_fix_quotes): New class.
6316 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
6318 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6319 (aarch64_sve_prepare_conditional_op): Remove.
6320 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6321 Allow aarch64_simd_reg_or_zero as select operand; remove
6322 the aarch64_sve_prepare_conditional_op call.
6323 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6324 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6325 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6326 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6327 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6328 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6329 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6330 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6331 and a splitters to match all of the *_any patterns.
6332 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6334 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6335 (SVE_COND_FP_BINARY_REV): Remove.
6336 (sve_int_op_rev, sve_fp_op_rev): New.
6337 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6338 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6339 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6340 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6341 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6342 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6343 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6344 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6345 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6347 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6348 Remove match_dup 1 from the inner unspec.
6349 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6351 * config/aarch64/aarch64.md (movprfx): New attr.
6352 (length): Default movprfx to 8.
6353 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6354 (*madd<SVE_I>, *msub<SVE_I): Likewise.
6355 (*<su>mul<SVE_I>3_highpart): Likewise.
6356 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6357 (*v<ASHIFT><SVE_I>3): Likewise.
6358 (*<su><MAXMIN><SVE_I>3): Likewise.
6359 (*<su><MAXMIN><SVE_F>3): Likewise.
6360 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6361 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6362 (*div<SVE_F>4): Likewise.
6364 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
6366 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6369 2018-07-02 Richard Biener <rguenther@suse.de>
6371 PR tree-optimization/86363
6372 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6373 memset argument refers to a non-variable address.
6375 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6377 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6378 {PLUS,MINUS}_EXPR code to...
6379 (adjust_symbolic_bound): ...here,
6380 (combine_bound): ...here,
6381 (set_value_range_with_overflow): ...and here.
6383 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6385 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6387 (extract_range_from_abs_expr): ...here.
6389 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
6391 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6392 -fno-omit-frame-pointer when not optimizing.
6394 2018-07-02 Martin Liska <mliska@suse.cz>
6397 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6398 (propagate_nothrow): Likewise.
6400 2018-07-02 Martin Liska <mliska@suse.cz>
6403 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6405 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6407 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6408 function in r262149, changing "loc" param from source_location to
6409 const dump_location_t &.
6410 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6411 declaration, as above.
6413 2018-07-01 Paul Koning <ni1d@arrl.net>
6415 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6416 -munit-asm, -mgnu-asm, -mdec-asm.
6417 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6418 (pdp11_output_labelref): New.
6419 (pdp11_output_def): New.
6420 (pdp11_output_addr_vec_elt): New.
6421 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
6422 %# and %@ format codes.
6423 (pdp11_option_override): New.
6424 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6425 (pdp11_output_ident): New.
6426 (pdp11_asm_named_section): New.
6427 (pdp11_asm_init_sections): New.
6428 (pdp11_file_start): New.
6429 (pdp11_file_end): New.
6430 (output_ascii): Use .ascii/.asciz for -mdec-asm.
6431 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
6432 %o, like %c but octal.
6433 (pdp11_option_override): New.
6434 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6436 (DATA_SECTION_ASM_OP): Ditto.
6437 (READONLY_DATA_SECTION_ASM_OP): New.
6438 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6439 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6440 (ASM_OUTPUT_LABELREF): Ditto.
6441 (ASM_OUTPUT_DEF): Ditto.
6442 (ASM_OUTPUT_EXTERNAL): New.
6443 (ASM_OUTPUT_SOURCE_FILENAME): New.
6444 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6445 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6446 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
6447 %# and %@ format codes.
6448 * config/pdp11/pdp11.opt (mgnu-asm): New.
6449 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6450 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6451 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6453 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
6455 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6456 dereferencing path[] beyond its length.
6458 (debug_all_paths): New.
6459 (rewire_first_differing_edge): New.
6460 (adjust_paths_after_duplication): New.
6461 (duplicate_thread_path): Call adjust_paths_after_duplication.
6463 (thread_through_all_blocks): Add new argument to
6464 duplicate_thread_path.
6466 2018-06-30 Jim Wilson <jimw@sifive.com>
6468 * config/riscv/predicates.md (p2m1_shift_operand): New.
6469 (high_mask_shift_operand): New.
6470 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6471 pattern using p2m1_shift_operand.
6472 (lshsi3_zero_extend_3+2): New combiner pattern using
6473 high_mask_shift_operand.
6475 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6477 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6479 (vect_recog_rotate_pattern): ...here.
6480 (vect_convert_input): Try to insert casts of invariants in the
6482 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6483 preheader to be empty.
6485 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6487 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6488 vector type. If given, install it in the new statement's
6490 (vect_element_precision): New function.
6491 (vect_unpromoted_value): New struct.
6492 (vect_unpromoted_value::vect_unpromoted_value): New function.
6493 (vect_unpromoted_value::set_op): Likewise.
6494 (vect_look_through_possible_promotion): Likewise.
6495 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6496 (vect_widened_op_tree, vect_convert_input): Likewise.
6497 (vect_convert_inputs, vect_convert_output): Likewise.
6498 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6499 to handle the optional cast of the multiplication result and
6500 vect_widened_op_tree to detect the widened multiplication itself.
6501 Do not require the input and output of promotion casts to have
6502 the same sign, but base the signedness of the operation on the
6503 input rather than the result. If the pattern includes two
6504 promotions, check that those promotions have the same sign.
6505 Do not restrict the MULT_EXPR handling to a double-width result;
6506 handle quadruple-width results and wider. Use vect_convert_inputs
6507 to convert the inputs to the common type.
6508 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
6509 to handle the optional cast of the ABS result. Also allow a sign
6510 change or a sign extension between the ABS and MINUS.
6511 Use vect_widened_op_tree to detect the widened subtraction and use
6512 vect_convert_inputs to convert the inputs to the common type.
6513 (vect_handle_widen_op_by_const): Delete.
6514 (vect_recog_widen_op_pattern): New function.
6515 (vect_recog_widen_mult_pattern): Use it.
6516 (vect_recog_widen_shift_pattern): Likewise.
6517 (vect_recog_widen_sum_pattern): Use
6518 vect_look_through_possible_promotion to handle the promoted
6521 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6523 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6524 the containing gimple_seq *.
6525 * gimple-iterator.h (gsi_for_stmt): Declare it.
6526 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6527 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6528 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6529 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6530 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6532 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6534 (vect_mark_pattern_stmts): ...here. Handle cases in which the
6535 statement being replaced is part of an existing pattern
6536 definition sequence, inserting the new pattern statements before
6538 (vect_pattern_recog_1): Don't return a bool. If the statement
6539 is already part of a pattern, instead apply pattern matching
6540 to the pattern definition statements. Don't clear the
6541 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6542 (vect_pattern_recog): Don't break after the first match;
6543 continue processing the pattern definition statements instead.
6544 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6546 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6548 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6549 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6550 (vect_recog_widen_sum_pattern): Use it.
6552 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6554 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6555 phi is not a pattern statement and has not been replaced by
6556 a pattern statement.
6557 * tree-vect-patterns.c (type_conversion_p): Don't check
6558 STMT_VINFO_IN_PATTERN_P.
6559 (vect_recog_vector_vector_shift_pattern): Likewise.
6560 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6561 the pattern statement rather than the original statement; check
6562 directly for a WIDEN_MULT_EXPR here.
6563 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6564 vect_is_simple_use to return the pattern statement rather
6565 than the original statement; use is_pattern_stmt_p to check
6566 for such a pattern statement.
6567 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6568 to return the pattern statement rather than the original statement;
6569 don't do the same transformation here.
6570 (vect_is_simple_use): If the defining statement has been replaced
6571 by a pattern statement, return the pattern statement instead.
6572 Remove the corresponding (local) transformation from the vectype
6575 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6577 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6578 end and default to null.
6579 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6580 (vectorizable_reduction): Update calls accordingly, dropping the
6581 gimple ** argument if the passed-back statement isn't needed.
6582 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6583 (vect_recog_rotate_pattern): Likewise.
6584 (vect_recog_mask_conversion_pattern): Likewise.
6585 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6586 (vect_mask_constant_operand_p): Likewise.
6587 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6588 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6589 (get_group_load_store_type, get_load_store_type): Likewise.
6590 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6591 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6592 (vectorizable_conversion, vectorizable_assignment): Likewise.
6593 (vectorizable_shift, vectorizable_operation): Likewise.
6594 (vectorizable_store, vect_is_simple_cond): Likewise.
6595 (vectorizable_condition, vectorizable_comparison): Likewise.
6596 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6597 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6598 and move it to the end. Cope with null def_stmt_outs.
6600 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6602 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6604 2018-06-29 Jeff Law <law@redhat.com>
6606 * config/v850/v850.c (v850_legitimate_address_p): Handle large
6607 displacements for TARGET_V850E2V3 and newer.
6608 (TARGET_LRA_P): Remove. Defaults to LRA now.
6609 * config/v850/v850.md (sign23byte_load): Remove.
6610 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6611 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6613 2018-06-29 Martin Liska <mliska@suse.cz>
6616 * coverage.c (coverage_init): Mangle full path name.
6617 * doc/invoke.texi: Document the change.
6618 * gcov-io.c (mangle_path): New.
6619 * gcov-io.h (mangle_path): Likewise.
6620 * gcov.c (mangle_name): Use mangle_path for path mangling.
6622 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6624 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6625 if starting source register is not even.
6627 2018-06-29 Martin Liska <mliska@suse.cz>
6629 PR tree-optimization/86263
6630 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6631 Make edge redirection.
6633 2018-06-29 David Malcolm <dmalcolm@redhat.com>
6635 * dumpfile.c (dump_loc): Add indentation based on scope depth.
6636 (dump_scope_depth): New variable.
6637 (get_dump_scope_depth): New function.
6638 (dump_begin_scope): New function.
6639 (dump_end_scope): New function.
6640 * dumpfile.h (get_dump_scope_depth): New declaration.
6641 (dump_begin_scope): New declaration.
6642 (dump_end_scope): New declaration.
6643 (class auto_dump_scope): New class.
6644 (AUTO_DUMP_SCOPE): New macro.
6645 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6648 2018-06-29 Richard Biener <rguenther@suse.de>
6650 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6651 compute_all_dependences succeeds.
6652 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6653 exceed --param loop-max-datarefs-for-datadeps.
6655 2018-06-29 Jakub Jelinek <jakub@redhat.com>
6657 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6659 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
6662 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6663 alternative 0 in preferred_for_speed attribute.
6665 2018-06-28 Paul Koning <ni1d@arrl.net>
6667 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6668 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6669 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6670 * config/pdp11/pdp11.md: Correct "length" attribute calculation
6671 for shift insn patterns.
6673 2018-06-28 David Malcolm <dmalcolm@redhat.com>
6675 * cgraph.c (cgraph_node::get_body): Replace assignments to
6676 "dump_file" with calls to set_dump_file.
6677 * dumpfile.c (alt_dump_file): Make static, and group with...
6678 (alt_flags): ...this definition.
6679 (dumps_are_enabled): New variable.
6680 (refresh_dumps_are_enabled): New function.
6681 (set_dump_file): New function.
6682 (set_alt_dump_file): New function.
6683 (gcc::dump_manager::dump_start): Replace assignments to
6684 "dump_file" and "alt_dump_file" with calls to set_dump_file and
6686 (gcc::dump_manager::dump_finish): Likewise.
6687 * dumpfile.h (alt_dump_file): Delete decl.
6688 (dumps_are_enabled): New variable decl.
6689 (set_dump_file): New function decl.
6690 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6692 * tree-nested.c (lower_nested_functions): Replace assignments to
6693 "dump_file" with calls to set_dump_file.
6695 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6697 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6698 goto_locus of each outgoing edge of each basic block.
6700 2018-06-28 Richard Biener <rguenther@suse.de>
6702 * dwarf2out.c (decl_scope_table): Remove.
6703 (push_decl_scope): Likewise.
6704 (pop_decl_scope): Likewise.
6705 (gen_type_die_for_member): Do not call push/pop_decl_scope.
6706 (gen_struct_or_union_type_die): Likewise.
6707 (gen_tagged_type_die): Likewise.
6708 (dwarf2out_init): Do not initialize decl_scope_table.
6709 (dwarf2out_c_finalize): Do not free it.
6711 2018-06-28 Richard Biener <rguenther@suse.de>
6713 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6714 deciding whether to not re-use a DIE.
6716 2018-06-28 Richard Biener <rguenther@suse.de>
6718 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6719 DW_AT_abstract_origin attribute.
6721 2018-06-28 Martin Liska <mliska@suse.cz>
6723 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6724 Use newly introduced constants.
6725 * tree-switch-conversion.h (struct jump_table_cluster):
6726 Define max_ratio_for_size and max_ratio_for_speed.
6728 2018-06-28 Martin Liska <mliska@suse.cz>
6730 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6731 Add new checking assert to catch invalid state.
6732 (jump_table_cluster::can_be_handled): Handle single case
6734 (jump_table_cluster::is_beneficial): Bail out for such case.
6735 (bit_test_cluster::find_bit_tests):
6736 Add new checking assert to catch invalid state.
6737 (bit_test_cluster::can_be_handled): Handle single case
6739 (bit_test_cluster::is_beneficial): Bail out for such case.
6740 (switch_decision_tree::analyze_switch_statement):
6743 2018-06-28 Martin Liska <mliska@suse.cz>
6745 * common.opt: Introduce -completion option.
6746 * gcc.c (driver_handle_option): Handle it.
6747 (driver::main): Print completions if completion
6749 * opt-suggestions.c (option_proposer::get_completions):
6751 (option_proposer::suggest_completion): Likewise.
6752 (option_proposer::find_param_completions): Likewise.
6753 (verify_autocompletions): Likewise.
6754 (test_completion_valid_options): Likewise.
6755 (test_completion_valid_params): Likewise.
6756 (in_completion_p): Likewise.
6757 (empty_completion_p): Likewise.
6758 (test_completion_partial_match): Likewise.
6759 (test_completion_garbage): Likewise.
6760 (opt_proposer_c_tests): Likewise.
6761 * opt-suggestions.h: Declare new functions.
6762 * opts.c (common_handle_option): Handle OPT__completion_.
6763 * selftest-run-tests.c (selftest::run_tests): Add
6764 opt_proposer_c_tests.
6765 * selftest.c (assert_str_startswith): New.
6766 * selftest.h (assert_str_startswith): Likewise.
6767 (opt_proposer_c_tests): New.
6768 (ASSERT_STR_STARTSWITH): Likewise.
6770 2018-06-28 Martin Liska <mliska@suse.cz>
6772 * Makefile.in: Add opt-suggestions.o.
6773 * gcc-main.c: Include opt-suggestions.h.
6774 * gcc.c (driver::driver): Likewise.
6775 (driver::~driver): Remove m_option_suggestions.
6776 (driver::build_option_suggestions): Moved to option_proposer.
6777 (driver::suggest_option): Likewise.
6778 (driver::handle_unrecognized_options): Use option_proposer.
6779 * gcc.h (class driver): Add new memver m_option_proposer.
6780 * opt-suggestions.c: New file.
6781 * opt-suggestions.h: New file.
6783 2018-06-28 Martin Liska <mliska@suse.cz>
6785 * vec.h (class auto_string_vec): New (moved from auto_argvec).
6786 (auto_string_vec::~auto_string_vec): Likewise.
6788 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6790 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6791 prevent_decl_creation_for_types fields up and add reset_location field.
6792 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6793 statement if id->reset_location is true.
6794 (copy_edges_for_bb): Do not set goto_locus on the new edges if
6795 id->reset_location is true.
6796 (copy_phis_for_bb): Force input_location on the arguments if
6797 id->reset_location is true.
6798 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6799 is set on the function to be inlined.
6801 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
6803 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6805 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
6807 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6808 registers for Pmode.
6809 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6810 hard registers for the clobbered pseudo.
6812 2018-06-27 Paul Koning <ni1d@arrl.net>
6814 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6815 mutually exclusive options.
6816 * config/pdp11/constraints.md (h): New constraint.
6817 (O): Update definition to match shift code generation.
6818 (D): New constraint.
6819 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6821 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6823 (output_jump): Change arguments.
6824 (pdp11_fixed_cc_regs): New function.
6825 (pdp11_cc_mode): Ditto.
6826 (pdp11_expand_shift): Ditto.
6827 (pdp11_assemble_shift): Ditto.
6828 (pdp11_small_shift): Ditto.
6829 (pdp11_branch_cost): Remove.
6830 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6832 (pdp11_register_move_cost): Update for CC registers.
6833 (pdp11_rtx_costs): Add case for LSHIFTRT.
6834 (pdp11_output_jump): Add CCNZ mode conditional branches.
6835 (notice_update_cc_on_set): Remove.
6836 (pdp11_cc_mode): New function.
6837 (simple_memory_operand): Correct pre/post decrement case.
6838 (no_side_effect_operand): New function.
6839 (pdp11_regno_reg_class): Add CC_REGS class.
6840 (pdp11_fixed_cc_regs): New function.
6841 (pdp11_small_shift): New function.
6842 (pdp11_expand_shift): New function to expand shift insns.
6843 (pdp11_assemble_shift): New function to output shifts.
6844 (pdp11_branch_cost): Remove.
6845 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
6846 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
6847 (WCHAR_TYPE): Ditto.
6848 (PTRDIFF_TYPE): Ditto.
6849 (ADJUST_INSN_LENGTH): New macro.
6850 (FIXED_REGISTERS): Add CC registers.
6851 (CALL_USED_REGISTERS): Ditto.
6853 (REG_CLASS_NAMES): Ditto.
6854 (REG_CLASS_CONTENTS): Ditto.
6855 (SELECT_CC_MODE): Use new function.
6856 (TARGET_FLAGS_REGNUM): New macro.
6857 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
6858 (cc0_reg_rtx): Remove.
6859 (CC_STATUS_MDEP): Remove.
6860 (CC_STATUS_MDEFP_INIT): Remove.
6861 (CC_IN_FPU): Remove.
6862 (NOTICE_UPDATE_CC): Remove.
6863 (REGISTER_NAMES): Add CC registers.
6864 (BRANCH_COST): Change to constant 1.
6865 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
6867 * config/pdp11/pdp11.opt (mbcopy): Remove.
6868 (mbcopy-builtin): Remove.
6869 (mbranch-cheap): Remove.
6870 (mbranch-expensive): Remove.
6871 * config/pdp11/predicates.md (expand_shift_operand): Update to
6872 match shift code generation.
6873 (ccnz_operator): New predicate.
6874 * doc/invoke.texi (PDP-11 Options): Remove deleted options
6875 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
6876 Remove non-existent option -mabshi, -mno-abshi. Document mutually
6878 * doc/md.texi (PDP-11): Document new D and h constraints. Update
6879 description of O constraint.
6881 2018-06-27 Jeff Law <law@redhat.com>
6882 Austin Law <austinklaw@gmail.com>
6884 * config/v850/v850.md (addsi3_set_flags): New pattern.
6885 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
6886 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
6887 (zero_extendhisi2_v850_set_flags): Likewise.
6888 (zero_extendqisi2_v850_set_flags): Likewise.
6889 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
6890 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
6891 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
6893 * config/v850/v850-protos.h (notice_update_cc): Remove.
6894 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
6895 (v850_print_operand): Handle 'D' and "d".
6896 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
6897 Add handling of arithmetic/logical operations compared against zero.
6898 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
6899 Do not look at v850_compare_op, instead get mode from last argument.
6900 (v850_gen_compare): Remove
6901 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
6902 after reload for prologue insns.
6903 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
6905 (construct_save_jarl): Likewise.
6906 (TARGET_FLAGS_REGNUM): Define.
6907 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
6908 (NOTICE_UPDATE_CC): Remove.
6909 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
6910 than cc0. Conditionalize on reload_completed.
6911 (cmpsi_insn, setfcc_insn): Likewise.
6912 (tst1 splitter): Turn into define_and_split which sets the flags
6914 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
6915 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
6916 (cstoresf4, cstoredf4): Clobber the flags.
6917 (cmpsi, cmpsf, cmpdf): Remove expanders.
6918 (setf_insn): Remove pattern.
6919 (addsi3): Turn into define_and_split which clobbers the flags after
6920 reload and a suitable pattern (addsi3_clobber_flags) for use after
6922 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
6923 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
6924 (ashrsi3, ashrsi3_v850e2): Likewise.
6925 (bins): Clobber the flags.
6926 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6927 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6928 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6929 (call_value_internal_short, call_value_internal_long): Likewise.
6930 (callt_save_interrupt, callt_return_interrupt): Likewise.
6931 (save_interrupt, return_interrupt): Likewise.
6932 (callt_save_all_interrupt, save_all_interrupt): Likewise.
6933 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
6934 (restore_all_interrupt, _restore_all_interrupt): Likewise.
6935 (All FP comparisons): Only allow after reload has completed.
6937 (divh, divhu): Tweak output template.
6938 (branch_z_normal, branch_z_invert): Remove
6939 (branch_nz_normal, branch_nz_invert): Likewise.
6940 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
6942 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
6943 * config/v850/v850.c (notice_update_cc): Remove.
6944 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
6945 (CC_NO_CARRY): Likewise.
6946 (NOTICE_UPDATE_CC): Define to nothing.
6947 * config/v850/v850.md: Remove block comment on cc0 handling
6948 Remove "cc" attribute from all patterns. Remove cc_status handling
6949 from all patterns. Minor formatting fixes.
6951 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6953 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
6954 (cortex-a76.cortex-a55): Likewise.
6955 * config/aarch64/aarch64-tune.md: Regenerate.
6956 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
6957 cortex-a76.cortex-a55.
6959 2018-06-27 Jeff Law <law@redhat.com>
6961 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
6962 (MULTILIB_DIRNAMES): Similarly.
6964 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
6966 * gimple.h (gimple_return_retbnd): Delete.
6967 (gimple_return_set_retbnd): Likewise.
6968 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
6969 gimple_return_set_retbnd.
6970 * gimple-pretty-print.c (dump_gimple_return): Remove call to
6971 gimple_return_retbnd and adjust.
6972 * tree-inline.h (struct copy_body_data): Remove retbnd field.
6973 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
6974 Explicitly return NULL in a couple more cases. Move assertion
6975 on debug statements and remove unreachable code.
6976 (reset_debug_binding): Do not test id->retbnd.
6977 (expand_call_inline): Do not set it.
6979 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6981 * configure.ac: Add --disable-gcov option.
6982 * configure: Regenerate.
6983 * Makefile.in: Honour @enable_gcov@.
6984 * doc/install.texi: Document --disable-gcov.
6986 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6988 * config/arm/arm-cpus.in (cortex-a76): New entry.
6989 (cortex-a76.cortex-a55): Likewise.
6990 * config/arm/arm-tables.opt: Regenerate.
6991 * config/arm/arm-tune.md: Likewise.
6992 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
6993 * doc/invoke.texi (ARM Options): Document cortex-a76 and
6994 cortex-a76.cortex-a55.
6996 2018-06-27 Tamar Christina <tamar.christina@arm.com>
6999 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7001 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7003 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7005 (EPILOGUE_USES): Likewise.
7007 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7009 * tree-inline.c (remap_location): New function extracted from...
7010 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7011 (copy_phis_for_bb): ...here. Call remap_location.
7012 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7014 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7016 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7017 unaligned vsx for 16B memset.
7019 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7022 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7023 ieee128_float_type_node to long_double_type_node unless
7024 TARGET_LONG_DOUBLE_128 is set.
7026 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7028 * cfgloop.c (get_loop_location): Convert return type from
7029 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7030 by implicit construction from rtx_insn *, and using
7031 dump_user_location_t::from_function_decl for the fallback case.
7032 * cfgloop.h (get_loop_location): Convert return type from
7033 location_t to dump_user_location_t.
7034 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7035 dump_printf_loc to pass in a dump_location_t rather than a
7036 location_t, via the gimple stmt.
7037 * coverage.c (get_coverage_counts): Update calls to
7038 dump_printf_loc to pass in dump_location_t rather than a
7040 * doc/optinfo.texi (Dump types): Convert example of
7041 dump_printf_loc from taking "locus" to taking "insn". Update
7042 description of the "_loc" calls to cover dump_location_t.
7043 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7045 (dump_user_location_t::dump_user_location_t): New constructors,
7046 from gimple *stmt and rtx_insn *.
7047 (dump_user_location_t::from_function_decl): New function.
7048 (dump_loc): Make static.
7049 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7050 const dump_location_t &.
7051 (dump_generic_expr_loc): Delete.
7052 (dump_printf_loc): Convert param "loc" from location_t to
7053 const dump_location_t &.
7054 (selftest::test_impl_location): New function.
7055 (selftest::dumpfile_c_tests): New function.
7056 * dumpfile.h: Include "profile-count.h".
7057 (class dump_user_location_t): New class.
7058 (struct dump_impl_location_t): New struct.
7059 (class dump_location_t): New class.
7060 (dump_printf_loc): Convert 2nd param from source_location to
7061 const dump_location_t &.
7062 (dump_generic_expr_loc): Delete.
7063 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7064 const dump_location_t &.
7065 * gimple-fold.c (fold_gimple_assign): Update call to
7066 dump_printf_loc to pass in a dump_location_t rather than a
7067 location_t, via the gimple stmt.
7068 (gimple_fold_call): Likewise.
7069 * gimple-loop-interchange.cc
7070 (loop_cand::analyze_iloop_reduction_var): Update for change to
7071 check_reduction_path.
7072 (tree_loop_interchange::interchange): Update for change to
7074 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7075 change in return-type of find_loop_location.
7076 (graphite_regenerate_ast_isl): Likewise.
7077 * graphite-optimize-isl.c (optimize_isl): Likewise.
7078 * graphite.c (graphite_transform_loops): Likewise.
7079 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7080 pass in a dump_location_t rather than a location_t, via the
7082 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7083 * ipa.c (walk_polymorphic_call_targets): Likewise.
7084 * loop-unroll.c (report_unroll): Convert "locus" param from
7085 location_t to dump_location_t.
7086 (decide_unrolling): Update for change to get_loop_location's
7088 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7089 location_t to dump_user_location_t.
7090 (grid_find_single_omp_among_assignments_1): Updates calls to
7091 dump_printf_loc to pass in a dump_location_t rather than a
7092 location_t, via the gimple stmt.
7093 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7094 location_t to dump_location_t. Updates calls to dump_printf_loc
7095 to pass in a dump_location_t rather than a location_t, via the
7097 (grid_inner_loop_gridifiable_p): Likewise.
7098 (grid_dist_follows_simple_pattern): Likewise.
7099 (grid_gfor_follows_tiling_pattern): Likewise.
7100 (grid_target_follows_gridifiable_pattern): Likewise.
7101 (grid_attempt_target_gridification): Convert initialization
7102 of local "grid" from memset to zero-initialization; FIXME: does
7103 this require C++11? Update call to dump_printf_loc to pass in a
7104 optinfo_location rather than a location_t, via the gimple stmt.
7105 * profile.c (read_profile_edge_counts): Updates call to
7106 dump_printf_loc to pass in a dump_location_t rather than a
7108 (compute_branch_probabilities): Likewise.
7109 * selftest-run-tests.c (selftest::run_tests): Call
7111 * selftest.h (dumpfile_c_tests): New decl.
7112 * tree-loop-distribution.c (pass_loop_distribution::execute):
7113 Update for change in return type of find_loop_location.
7114 * tree-parloops.c (parallelize_loops): Likewise.
7115 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7116 "locus" from location_t to dump_user_location_t.
7117 (canonicalize_loop_induction_variables): Likewise.
7118 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7119 for change in return type of find_loop_location.
7120 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7121 to dump_printf_loc to pass in a dump_location_t rather than a
7122 location_t, via the stmt.
7123 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7125 * tree-vect-loop-manip.c (find_loop_location): Convert return
7126 type from source_location to dump_user_location_t.
7127 (vect_do_peeling): Update for above change.
7128 (vect_loop_versioning): Update for change in type of
7130 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7131 from location_t to dump_user_location_t.
7132 (vect_estimate_min_profitable_iters): Update for change in type
7134 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7135 location_t to dump_location_t.
7136 (vect_slp_bb): Update for change in type of vect_location.
7137 * tree-vectorizer.c (vect_location): Convert from source_location
7138 to dump_user_location_t.
7139 (try_vectorize_loop_1): Update for change in vect_location's type.
7140 (vectorize_loops): Likewise.
7141 (increase_alignment): Likewise.
7142 * tree-vectorizer.h (vect_location): Convert from source_location
7143 to dump_user_location_t.
7144 (find_loop_location): Convert return type from source_location to
7145 dump_user_location_t.
7146 (check_reduction_path): Convert 1st param from location_t to
7147 dump_user_location_t.
7148 * value-prof.c (check_counter): Update call to dump_printf_loc to
7149 pass in a dump_user_location_t rather than a location_t; update
7150 call to error_at for change in type of "locus".
7151 (check_ic_target): Update call to dump_printf_loc to
7152 pass in a dump_user_location_t rather than a location_t, via the
7155 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7157 * config/s390/s390.h (enum processor_flags): Do not use
7158 default tune parameter when -march was specified.
7160 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7163 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7164 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7167 2018-06-26 Richard Biener <rguenther@suse.de>
7169 PR tree-optimization/86287
7171 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7172 (vect_analyze_loop): Initialize n_stmts.
7174 2018-06-26 Richard Biener <rguenther@suse.de>
7177 * fold-const.c (fold_convertible_p): Pointer extension
7180 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7183 * dwarf2out.c (loc_list_has_views): Adjust comments.
7184 (dw_loc_list): Split single cross-partition range with
7187 2018-06-25 Jeff Law <law@redhat.com>
7189 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7190 on -mbig-switch by default.
7192 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7194 (const_float_0_operand): Remove unused predicate.
7195 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7196 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7197 (recipsf2): New expander. Original pattern now called
7199 (recipdf2, recipdf2_insn): Similarly.
7200 (rsqrtsf2, rsqrtsf2_insn): Similarly
7201 (rsqrtdf2, rsqrtdf2_insn): Similarly
7203 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7205 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7206 Simplify logic for FreeBSD (twice).
7208 2018-06-25 Martin Sebor <msebor@redhat.com>
7210 PR tree-optimization/86204
7211 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7212 a strnlen result if it's less than the length of the string.
7214 2018-06-25 Martin Sebor <msebor@redhat.com>
7216 PR tree-optimization/85700
7217 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7218 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7219 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7221 2018-06-25 Martin Sebor <msebor@redhat.com>
7223 * doc/extend.texi (Zero-length arrays): Update and clarify.
7225 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7227 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7228 added IEEE/IBM long double multilib support on PowerPC little
7229 endian Linux systems.
7230 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7231 (MULTILIB_DEFAULTS): Likewise.
7232 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7234 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7235 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7236 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7238 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7241 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7242 (REORDER_45): Likewise.
7244 2018-06-25 Jeff Law <law@redhat.com>
7246 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7247 dividend to 32 bits. Adjust length.
7248 (udivmodhi4): Cleanup output template. Fix length.
7250 2018-06-25 Carl Love <cel@us.ibm.com>
7252 * config/rs6000/vsx.md: Change word selector to prefered location.
7254 2018-06-25 Richard Biener <rguenther@suse.de>
7256 PR tree-optimization/86304
7257 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7258 epilogue-if-converted loops as well.
7260 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7262 * lto-section-out.c (lto_begin_section): Do not print section
7263 name for noaddr and unnumbered dumps.
7265 2018-06-25 Richard Biener <rguenther@suse.de>
7267 * tree-vectorizer.h (struct vec_info_shared): New structure
7268 with parts split out from struct vec_info and loop_nest from
7269 struct _loop_vec_info.
7270 (struct vec_info): Adjust accordingly.
7271 (struct _loop_vec_info): Likewise.
7272 (LOOP_VINFO_LOOP_NEST): Adjust.
7273 (LOOP_VINFO_DATAREFS): Likewise.
7274 (LOOP_VINFO_DDRS): Likewise.
7275 (struct _bb_vec_info): Likewise.
7276 (BB_VINFO_DATAREFS): Likewise.
7277 (BB_VINFO_DDRS): Likewise.
7278 (struct _stmt_vec_info): Add dr_aux member.
7279 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7280 (DR_MISALIGNMENT_UNINITIALIZED): New.
7281 (set_dr_misalignment): Adjust.
7282 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7283 (vect_analyze_loop): Adjust prototype.
7284 (vect_analyze_loop_form): Likewise.
7285 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7286 Compute dependences lazily.
7287 (vect_record_base_alignments): Use shared datarefs/ddrs.
7288 (vect_verify_datarefs_alignment): Likewise.
7289 (vect_analyze_data_refs_alignment): Likewise.
7290 (vect_analyze_data_ref_accesses): Likewise.
7291 (vect_analyze_data_refs): Likewise.
7292 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7293 constructor parameter for shared part.
7294 (vect_analyze_loop_form): Pass in shared part and adjust.
7295 (vect_analyze_loop_2): Pass in storage for the number of
7296 stmts. Move loop nest finding to the caller. Compute
7298 (vect_analyze_loop): Pass in shared part.
7299 (vect_transform_loop): Verify shared datarefs are unchanged.
7300 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7301 constructor parameter for shared part.
7302 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7303 (vect_slp_bb): Verify shared datarefs are unchanged before
7305 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7307 (new_stmt_vec_info): Initialize DR_AUX misalignment to
7308 DR_MISALIGNMENT_UNINITIALIZED.
7309 * tree-vectorizer.c (vec_info::vec_info): Add constructor
7310 parameter for shared part.
7311 (vec_info::~vec_info): Adjust.
7312 (vec_info_shared::vec_info_shared): New.
7313 (vec_info_shared::~vec_info_shared): Likewise.
7314 (vec_info_shared::save_datarefs): Likewise.
7315 (vec_info_shared::check_datarefs): Likewise.
7316 (try_vectorize_loop_1): Construct shared part live for analyses
7317 of a single loop for multiple vector sizes.
7318 * tree-parloops.c (gather_scalar_reductions): Adjust.
7320 2018-06-25 Richard Biener <rguenther@suse.de>
7322 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7323 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7324 (vect_analyze_data_refs): Remove similar code from here and
7325 simplify accordingly.
7327 2018-06-25 Richard Biener <rguenther@suse.de>
7329 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7330 for reverse storage order accesses rather than asserting
7331 they cannot happen here.
7333 2018-06-25 Tom de Vries <tdevries@suse.de>
7336 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7337 Use data16 instead of .byte for insn prefix.
7339 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
7342 * parser.c (make_char_string_pack): Pass this literal chars
7343 through cpp_interpret_string.
7344 (cp_parser_userdef_numeric_literal): Check the result of
7345 make_char_string_pack.
7347 2018-06-24 Maya Rashish <coypu@sdf.org>
7349 * ginclude/stddef.h: Simplify conditions around avoiding
7350 re-definition of __size_t.
7352 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7354 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7355 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7357 2018-06-22 Maya Rashish <coypu@sdf.org>
7359 * doc/invoke.texi (mno-fancy-math-387): Update for changes
7360 made to OpenBSD and NetBSD through the years.
7362 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7364 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7365 behavior of vec_pack (vector double, vector double) to match
7366 behavior of vec_float2 (vector double, vector double).
7368 2018-06-22 Olivier Hainque <hainque@adacore.com>
7370 * gimplify.c (gimplify_function_tree): Prevent creation
7371 of a trampoline for the address of the current function
7372 passed to entry/exit instrumentation hooks.
7374 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
7377 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7380 2018-06-22 Martin Liska <mliska@suse.cz>
7382 PR tree-optimization/86263
7383 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7384 Bail out if is_enabled is false.
7385 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7387 (jump_table_cluster::is_enabled): New function.
7389 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7391 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7392 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7393 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7394 (lto_input_ts_binfo_tree_pointers): Likewise.
7395 * tree-streamer-out.c (streamer_write_tree_bitfields,
7396 write_ts_binfo_tree_pointers): Likewise.
7397 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7399 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7401 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7403 2018-06-22 Martin Liska <mliska@suse.cz>
7405 * symbol-summary.h (get): Make it pure and inline move
7406 functionality from ::get function.
7407 (get): Remove and inline into ::get and ::get_create.
7408 (get_create): Move code from ::get function.
7410 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7413 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7414 -x assembler-with-cpp.
7416 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7418 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7419 _FILE_OFFSET_BITS=64 for C++.
7421 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
7423 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7424 conversion insn that shows up when pr85657-3.c is compiled using
7425 IEEE 128-bit long double.
7426 (neg<mode>2_internal): Use the correct mode to check whether the
7427 mode is IBM extended.
7428 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7429 multiply and divide external functions from being created more
7432 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7434 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7436 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
7437 the edge can be forwarded.
7438 (cfg_layout_merge_blocks): Likewise.
7440 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7442 * except.c (finish_eh_generation): Commit edge insertions only after
7443 the EH edges have been redirected from post-landing to landing pads.
7445 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7447 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7448 create_tmp_var_for to create the FRAME decl.
7449 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7451 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7453 * tree-inline.c (copy_edges_for_bb): Minor tweak.
7454 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7455 debug statement when resetting its value.
7456 (expand_call_inline): Copy the locus of the call onto the assignment
7457 of the return value, if any. Use local variable in more cases.
7459 2018-06-21 Martin Liska <mliska@suse.cz>
7461 * ipa-pure-const.c (propagate_nothrow): Use
7462 funct_state_summaries->get.
7463 (dump_malloc_lattice): Likewise.
7464 (propagate_malloc): Likewise.
7466 2018-06-21 Richard Biener <rguenther@suse.de>
7468 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7469 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7470 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7472 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7473 BLOCK_ABSTRACT_ORIGIN unconditionally.
7475 2018-06-21 David Malcolm <dmalcolm@redhat.com>
7477 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7479 * ipa-reference.c (ipa_reference_c_finalize): Delete
7480 ipa_ref_opt_sum_summaries and set it to NULL.
7482 2018-06-21 Tom de Vries <tdevries@suse.de>
7484 PR tree-optimization/85859
7485 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7486 test with comment from bb_no_side_effects_p.
7488 2018-06-21 Richard Biener <rguenther@suse.de>
7490 PR tree-optimization/86232
7491 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7492 max for constant niter.
7494 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7496 * config/aarch64/aarch64-simd.md
7497 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7499 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7501 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7502 Make opernads of the unspec commutative.
7504 2018-06-21 Richard Biener <rguenther@suse.de>
7506 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7507 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7508 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7509 (vect_analyze_data_ref_dependence): Re-order checks to deal with
7511 (vect_record_base_alignments): Do not record base alignment
7512 for gathers or scatters.
7513 (vect_compute_data_ref_alignment): Drop return value that is always
7514 true. Bail out early for gathers or scatters.
7515 (vect_enhance_data_refs_alignment): Bail out early for gathers
7517 (vect_find_same_alignment_drs): Likewise.
7518 (vect_analyze_data_refs_alignment): Remove dead code.
7519 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7520 (vect_analyze_data_refs): For possible gathers or scatters do
7521 not create an alternate DR, just check their possible validity
7522 and mark them. Adjust DECL_NONALIASED handling to not rely
7524 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7525 update inits of gathers or scatters.
7526 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7527 Also copy gather/scatter flag to pattern vinfo.
7529 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
7531 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7532 behavior of vec_packsu (vector unsigned long long, vector unsigned
7533 long long) to match behavior of vec_packs with same signature.
7535 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
7536 Thomas Schwinge <thomas@codesourcery.com>
7537 Cesar Philippidis <cesar@codesourcery.com>
7539 * gimplify.c (gimplify_scan_omp_clauses): Add support for
7540 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7541 (gimplify_adjust_omp_clauses): Likewise.
7542 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7543 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7544 (gimplify_omp_target_update): Update handling of acc update and
7546 * omp-low.c (install_var_field): Remove unused parameter
7547 base_pointers_restrict.
7548 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7549 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7551 (omp_target_base_pointers_restrict_p): Delete.
7552 (scan_omp_target): Update call to scan_sharing_clauses.
7553 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7555 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7556 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7557 (convert_local_omp_clauses): Likewise.
7558 * tree-pretty-print.c (dump_omp_clause): Likewise.
7559 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
7561 (omp_clause_code_name): Likewise.
7563 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7566 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7569 PR tree-optimization/86231
7570 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
7571 anti-range don't overwrite *vr0min before using it to compute *vr0max.
7573 2018-06-20 Tom de Vries <tdevries@suse.de>
7575 PR tree-optimization/86097
7576 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7577 iv type if signedness of iv type is not the same as that of *nit.
7579 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7581 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
7582 EDGE_EH edges, verify they are all EDGE_EH.
7584 2018-06-20 Maya Rashish <coypu@sdf.org>
7586 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7588 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7590 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7591 * config/aarch64/aarch64.c (xgene1_tunings): Add
7592 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7593 (aarch64_mode_valid_for_sched_fusion_p):
7594 Allow 16-byte modes.
7595 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7596 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7598 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7600 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7601 * config/aarch64/iterators.md (VQ2): New mode iterator.
7603 2018-06-20 Martin Liska <mliska@suse.cz>
7605 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7606 Change default ratio from 10 to 8.
7608 2018-06-20 Martin Liska <mliska@suse.cz>
7610 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7612 (bit_test_cluster::find_bit_tests): Likewise.
7613 (switch_decision_tree::analyze_switch_statement): Find clusters.
7614 * tree-switch-conversion.h (struct jump_table_cluster): Document
7617 2018-06-20 Martin Liska <mliska@suse.cz>
7619 * tree-switch-conversion.c (switch_conversion::collect):
7620 Record m_uniq property.
7621 (switch_conversion::expand): Bail out for special conditions.
7622 (group_cluster::~group_cluster): New.
7623 (group_cluster::group_cluster): Likewise.
7624 (group_cluster::dump): Likewise.
7625 (jump_table_cluster::emit): New.
7626 (switch_decision_tree::fix_phi_operands_for_edges): New.
7627 (struct case_node): Remove struct.
7628 (jump_table_cluster::can_be_handled): New.
7629 (case_values_threshold): Moved to header.
7630 (reset_out_edges_aux): Likewise.
7631 (jump_table_cluster::is_beneficial): New.
7632 (bit_test_cluster::can_be_handled): Likewise.
7633 (add_case_node): Remove.
7634 (bit_test_cluster::is_beneficial): New.
7635 (case_bit_test::cmp): New.
7636 (bit_test_cluster::emit): New.
7637 (expand_switch_as_decision_tree_p): Remove.
7638 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7639 (fix_phi_operands_for_edge): Likewise.
7640 (switch_decision_tree::analyze_switch_statement): New.
7641 (compute_cases_per_edge): Move ...
7642 (switch_decision_tree::compute_cases_per_edge): ... here.
7643 (try_switch_expansion): Likewise.
7644 (switch_decision_tree::try_switch_expansion): Likewise.
7645 (record_phi_operand_mapping): Likewise.
7646 (switch_decision_tree::record_phi_operand_mapping): Likewise.
7647 (emit_case_decision_tree): Likewise.
7648 (switch_decision_tree::emit): Likewise.
7649 (balance_case_nodes): Likewise.
7650 (switch_decision_tree::balance_case_nodes): Likewise.
7651 (dump_case_nodes): Likewise.
7652 (switch_decision_tree::dump_case_nodes): Likewise.
7653 (emit_jump): Likewise.
7654 (switch_decision_tree::emit_jump): Likewise.
7655 (emit_cmp_and_jump_insns): Likewise.
7656 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7657 (emit_case_nodes): Likewise.
7658 (switch_decision_tree::emit_case_nodes): Likewise.
7659 (conditional_probability): Remove.
7660 * tree-switch-conversion.h (enum cluster_type): New.
7662 (struct cluster): Likewise.
7663 (cluster::cluster): Likewise.
7664 (struct simple_cluster): Likewise.
7665 (simple_cluster::simple_cluster): Likewise.
7666 (struct group_cluster): Likewise.
7667 (struct jump_table_cluster): Likewise.
7668 (struct bit_test_cluster): Likewise.
7669 (struct min_cluster_item): Likewise.
7670 (struct case_tree_node): Likewise.
7671 (case_tree_node::case_tree_node): Likewise.
7672 (jump_table_cluster::case_values_threshold): Likewise.
7673 (struct case_bit_test): Likewise.
7674 (struct switch_decision_tree): Likewise.
7675 (struct switch_conversion): Likewise.
7676 (switch_decision_tree::reset_out_edges_aux): Likewise.
7678 2018-06-20 Martin Liska <mliska@suse.cz>
7680 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7681 (hoist_edge_and_branch_if_true): Likewise.
7682 (expand_switch_using_bit_tests_p): Likewise.
7683 (struct case_bit_test): Likewise.
7684 (case_bit_test_cmp): Likewise.
7685 (emit_case_bit_tests): Likewise.
7686 (switch_conversion::switch_conversion): New class.
7687 (struct switch_conv_info): Remove old struct.
7688 (collect_switch_conv_info): More to ...
7689 (switch_conversion::collect): ... this.
7690 (check_range): Likewise.
7691 (switch_conversion::check_range): Likewise.
7692 (check_all_empty_except_final): Likewise.
7693 (switch_conversion::check_all_empty_except_final): Likewise.
7694 (check_final_bb): Likewise.
7695 (switch_conversion::check_final_bb): Likewise.
7696 (create_temp_arrays): Likewise.
7697 (switch_conversion::create_temp_arrays): Likewise.
7698 (free_temp_arrays): Likewise.
7699 (gather_default_values): Likewise.
7700 (switch_conversion::gather_default_values): Likewise.
7701 (build_constructors): Likewise.
7702 (switch_conversion::build_constructors): Likewise.
7703 (constructor_contains_same_values_p): Likewise.
7704 (switch_conversion::contains_same_values_p): Likewise.
7705 (array_value_type): Likewise.
7706 (switch_conversion::array_value_type): Likewise.
7707 (build_one_array): Likewise.
7708 (switch_conversion::build_one_array): Likewise.
7709 (build_arrays): Likewise.
7710 (switch_conversion::build_arrays): Likewise.
7711 (gen_def_assigns): Likewise.
7712 (switch_conversion::gen_def_assigns): Likewise.
7713 (prune_bbs): Likewise.
7714 (switch_conversion::prune_bbs): Likewise.
7715 (fix_phi_nodes): Likewise.
7716 (switch_conversion::fix_phi_nodes): Likewise.
7717 (gen_inbound_check): Likewise.
7718 (switch_conversion::gen_inbound_check): Likewise.
7719 (process_switch): Use the newly created class.
7720 (switch_conversion::expand): New.
7721 (switch_conversion::~switch_conversion): New.
7722 * tree-switch-conversion.h: New file.
7724 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7726 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7727 tree-vect-patterns.c.
7728 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7729 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
7730 (vect_recog_sad_pattern): Likewise.
7731 (vect_recog_widen_sum_pattern): Likewise.
7732 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
7733 (vect_recog_widen_shift_pattern): Remove the type_in argument.
7734 (vect_recog_rotate_pattern): Likewise.
7735 (vect_recog_mult_pattern): Likewise.
7736 (vect_recog_vector_vector_shift_pattern): Likewise.
7737 (vect_recog_divmod_pattern): Likewise.
7738 (vect_recog_mixed_size_cond_pattern): Likewise.
7739 (vect_recog_bool_pattern): Likewise.
7740 (vect_recog_mask_conversion_pattern): Likewise.
7741 (vect_try_gather_scatter_pattern): Likewise.
7742 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
7743 (vect_recog_over_widening_pattern): Likewise.
7744 (vect_recog_gather_scatter_pattern): Likewise.
7745 (vect_recog_func_ptr): Move from tree-vectorizer.h
7746 (vect_vect_recog_func_ptrs): Move further down the file.
7747 (vect_recog_func): Likewise. Remove the third argument.
7748 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7749 (vect_pattern_recog_1): Expect the pattern function to do any
7750 necessary target tests. Also expect it to provide a vector type.
7751 Remove the type_in handling.
7753 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7755 * tree-vect-patterns.c (vect_pattern_detected): New function.
7756 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
7757 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
7758 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
7759 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
7760 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7761 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7762 (vect_recog_mask_conversion_pattern)
7763 (vect_try_gather_scatter_pattern): Likewise.
7765 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7767 * tree-vect-patterns.c (vect_get_internal_def): New function.
7768 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7769 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
7770 (search_type_for_mask_1): Use it.
7772 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7774 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7775 redundant WIDEN_SUM_EXPR handling.
7776 (vect_recog_sad_pattern): Likewise.
7778 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7780 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7781 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7782 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7783 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7784 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7786 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7788 * tree-vect-stmts.c (vectorizable_call): Make sure that we
7789 use the stmt_vec_info of the original bb statement for the
7790 new zero assignment, even if the call is part of a pattern.
7792 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7794 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7795 that the sequence is attached to the original statement rather
7796 than the pattern statement.
7797 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7798 PATTERN_DEF_SEQ from the original statement rather than
7799 the main pattern statement.
7800 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7801 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7802 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7804 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7806 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7807 definition statements before the early exit for statements that aren't
7809 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7811 (vect_transform_loop): ...here. Process pattern definition
7812 statements without first checking whether the main pattern
7813 statement is live or relevant.
7815 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7817 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7818 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7820 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
7822 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7823 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7824 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7825 (expand_block_compare): Change select_block_compare_mode call.
7826 (expand_strncmp_align_check): Use new functions, fix comment.
7827 (emit_final_str_compare_gpr): New function.
7828 (expand_strn_compare): Refactor and clean up code.
7829 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7831 2018-06-19 Tony Reix <tony.reix@atos.com>
7832 Damien Bergamini <damien.bergamini@atos.com>
7833 David Edelsohn <dje.gcc@gmail.com>
7835 * collect2.c (static_obj): New variable.
7836 (static_libs): New variable.
7837 (is_in_list): Uncomment declaration.
7838 (main): Track AIX libraries linked statically.
7839 (is_in_list): Uncomment definition.
7840 (scan_prog_file): Don't add AIX shared libraries initializer
7841 to constructor list if linking statically.
7843 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
7845 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
7847 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
7849 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
7851 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
7854 2018-06-19 Martin Liska <mliska@suse.cz>
7856 * config/i386/i386.c (ix86_can_inline_p): Do not use
7857 ipa_fn_summaries::get_create.
7858 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
7860 (devirtualization_time_bonus): Likewise.
7861 (ipcp_propagate_stage): Likewise.
7862 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7863 (edge_set_predicate): Likewise.
7864 (evaluate_conditions_for_known_args): Likewise.
7865 (evaluate_properties_for_edge): Likewise.
7866 (ipa_call_summary::reset): Tranform to ...
7867 (ipa_call_summary::~ipa_call_summary): ... this.
7868 (ipa_fn_summary::reset): Transform to ...
7869 (ipa_fn_summary::~ipa_fn_summary): ... this.
7870 (ipa_fn_summary_t::remove): Rename to ...
7871 (ipa_fn_summary_t::remove_callees): ... this.
7872 (ipa_fn_summary_t::duplicate): Use placement new
7873 instead of memory copy.
7874 (ipa_call_summary_t::duplicate): Likewise.
7875 (ipa_call_summary_t::remove): Remove.
7876 (dump_ipa_call_summary): Change get_create to get.
7877 (ipa_dump_fn_summary): Dump only when summary exists.
7878 (analyze_function_body): Use symbol_summary::get instead
7880 (compute_fn_summary): Likewise.
7881 (estimate_edge_devirt_benefit): Likewise.
7882 (estimate_edge_size_and_time): Likewise.
7883 (inline_update_callee_summaries): Likewise.
7884 (remap_edge_change_prob): Likewise.
7885 (remap_edge_summaries): Likewise.
7886 (ipa_merge_fn_summary_after_inlining): Likewise.
7887 (write_ipa_call_summary): Likewise.
7888 (ipa_fn_summary_write): Likewise.
7889 (ipa_free_fn_summary): Likewise.
7890 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
7891 (struct ipa_call_summary): Likewise.
7892 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
7894 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
7895 (estimate_size_after_inlining): Likewise.
7896 (estimate_growth): Likewise.
7897 (growth_likely_positive): Likewise.
7898 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7899 (inline_call): Likewise.
7900 * ipa-inline.c (caller_growth_limits): Likewise.
7901 (can_inline_edge_p): Likewise.
7902 (can_inline_edge_by_limits_p): Likewise.
7903 (compute_uninlined_call_time): Likewise.
7904 (compute_inlined_call_time): Likewise.
7905 (want_inline_small_function_p): Likewise.
7906 (edge_badness): Likewise.
7907 (update_caller_keys): Likewise.
7908 (update_callee_keys): Likewise.
7909 (inline_small_functions): Likewise.
7910 (inline_to_all_callers_1): Likewise.
7911 (dump_overall_stats): Likewise.
7912 (early_inline_small_functions): Likewise.
7913 (early_inliner): Likewise.
7914 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7915 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7916 * ipa-pure-const.c (malloc_candidate_p): Likewise.
7917 * ipa-split.c (execute_split_functions): Likewise.
7918 * symbol-summary.h: Likewise.
7919 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7921 2018-06-19 Richard Biener <rguenther@suse.de>
7923 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
7924 (vectorize_loops): ... here. Fix dbgcnt handling.
7925 (try_vectorize_loop): Wrap try_vectorize_loop_1.
7927 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
7930 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
7931 ieee128 argument takes up only one (vector) register, not two (floating
7934 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7936 * gimplify.c (gimplify_init_constructor): Really never clear for an
7937 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
7939 2018-06-19 Richard Biener <rguenther@suse.de>
7941 PR tree-optimization/86179
7942 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
7943 after failed recognition.
7945 2018-06-18 Martin Sebor <msebor@redhat.com>
7948 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
7949 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
7950 Handle integer subtraction.
7951 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
7952 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
7954 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7956 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
7957 param from rtx to rtx_insn *.
7958 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
7960 (frv_ifcvt_modify_insn): Likwise.
7961 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
7962 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
7963 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
7964 as_a <rtx_insn *> cast to local "unprotected_region" once
7965 it's been established that it's not NULL or pc_rtx.
7966 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
7967 param "sethi" from rtx to rtx_insn *.
7968 (nds32_group_float_insns): Likewise for param "insn".
7969 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
7971 (vax_output_int_subtract): Likewise.
7972 * config/vax/vax.c (vax_output_int_add): Likewise for param
7974 (vax_output_int_subtract): Likewise.
7975 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
7976 (emit_pattern_after): Likewise for param "after".
7977 (emit_insn_after): Likewise.
7978 (emit_jump_insn_after): Likewise.
7979 (emit_call_insn_after): Likewise.
7980 (emit_debug_insn_after): Likewise.
7981 (emit_pattern_before): Likewise for param "before".
7982 (emit_insn_before): Likewise.
7983 (emit_jump_insn_before): Likewise.
7984 * final.c (get_insn_template): Likewise for param "insn", removing
7986 * output.h (get_insn_template): Likewise for 2nd param.
7987 * rtl.h (emit_insn_before): Likewise.
7988 (emit_jump_insn_before): Likewise.
7989 (emit_debug_insn_before_noloc): Likewise.
7990 (emit_insn_after): Likewise.
7991 (emit_jump_insn_after): Likewise.
7992 (emit_call_insn_after): Likewise.
7993 (emit_debug_insn_after): Likewise.
7994 (set_insn_deleted): Likewise for param.
7996 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
7999 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8000 floating point modes, so that IFmode is numerically greater than
8001 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8002 to declare the ordering. This prevents IFmode from being
8003 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8004 machine. Include rs6000-modes.h to share the fractional values
8005 between genmodes* and the rest of the compiler.
8009 * config/rs6000/rs6000-modes.h: New file.
8010 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8011 meaning of rs6000_long_double_size so that 126..128 selects an
8012 appropriate 128-bit floating point type.
8013 (rs6000_option_override_internal): Likewise.
8014 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8015 (TARGET_LONG_DOUBLE_128): Change the meaning of
8016 rs6000_long_double_size so that 126..128 selects an appropriate
8017 128-bit floating point type.
8018 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8019 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8020 source and destination to match the standard usage.
8021 (truncifkf2): Likewise.
8022 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8023 ISA 2.07 to use an explicit clobber, instead of passing in a
8025 (copysign<mode>3_soft): Likewise.
8027 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8029 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8030 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8031 (vect_slp_analyze_instance_dependence): Likewise.
8032 (vect_enhance_data_refs_alignment): Likewise.
8033 (vect_analyze_data_refs_alignment): Likewise.
8034 (vect_slp_analyze_and_verify_instance_alignment
8035 (vect_analyze_data_ref_accesses): Likewise.
8036 (vect_prune_runtime_alias_test_list): Likewise.
8037 (vect_analyze_data_refs): Likewise.
8038 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8039 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8040 (vect_analyze_scalar_cycles_1): Likewise.
8041 (vect_get_loop_niters): Likewise.
8042 (vect_analyze_loop_form_1): Likewise.
8043 (vect_update_vf_for_slp): Likewise.
8044 (vect_analyze_loop_operations): Likewise.
8045 (vect_analyze_loop): Likewise.
8046 (vectorizable_induction): Likewise.
8047 (vect_transform_loop): Likewise.
8048 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8049 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8050 (vect_make_slp_decision): Likewise.
8051 (vect_detect_hybrid_slp): Likewise.
8052 (vect_slp_analyze_operations): Likewise.
8053 (vect_slp_bb): Likewise.
8054 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8055 (vectorizable_bswap): Likewise.
8056 (vectorizable_call): Likewise.
8057 (vectorizable_simd_clone_call): Likewise.
8058 (vectorizable_conversion): Likewise.
8059 (vectorizable_assignment): Likewise.
8060 (vectorizable_shift): Likewise.
8061 (vectorizable_operation): Likewise.
8062 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8064 2018-06-18 Martin Sebor <msebor@redhat.com>
8066 PR tree-optimization/81384
8067 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8068 * builtins.c (expand_builtin_strnlen): New function.
8069 (expand_builtin): Call it.
8070 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8071 * builtins.def (BUILT_IN_STRNLEN): New.
8072 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8073 Warn for bounds in excess of maximum object size.
8074 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8075 single-value ranges. Handle strnlen.
8076 (handle_builtin_strlen): Handle strnlen.
8077 (strlen_check_and_optimize_stmt): Same.
8078 * doc/extend.texi (Other Builtins): Document strnlen.
8080 2018-06-18 Maya Rashish <coypu@sdf.org>
8082 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8083 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8084 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8086 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8088 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8090 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8092 * tree.c (escaped_string::escape): Replace cast to char * by
8093 const_cast<char *> (unescaped).
8095 2018-06-18 Nick Clifton <nickc@redhat.com>
8098 * tree.c (escaped_string): New class. Converts an unescaped
8099 string into its escaped equivalent.
8100 (warn_deprecated_use): Use the new class to convert the
8101 deprecation message, if present.
8102 (test_escaped_strings): New self test.
8103 (test_c_tests): Add test_escaped_strings.
8104 * doc/extend.texi (deprecated): Add a note that the
8105 deprecation message is affected by the -fmessage-length
8106 option, and that control characters will be escaped.
8107 (#pragma GCC error): Document this pragma.
8108 (#pragma GCC warning): Likewise.
8109 * doc/invoke.texi (-fmessage-length): Document this option's
8110 effect on the #warning and #error preprocessor directives and
8111 the deprecated attribute.
8113 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8115 * tree.c (decl_value_expr_lookup): Revert latest change.
8116 (decl_value_expr_insert): Likewise.
8118 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8120 * gimplify.c (nonlocal_vlas): Delete.
8121 (nonlocal_vla_vars): Likewise.
8122 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8124 (gimplify_body): Do not create and destroy nonlocal_vlas.
8125 * tree-nested.c: Include diagnostic.h.
8126 (use_pointer_in_frame): Tweak.
8127 (lookup_field_for_decl): Add assertion and declare the transformation.
8128 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8129 internal error when the reference is in a wrong context. Do not
8130 create a debug decl by default.
8131 (note_nonlocal_block_vlas): Delete.
8132 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8133 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8134 create a debug decl by default.
8135 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8136 call is in a wrong context.
8137 (fixup_vla_decls): New function.
8138 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8139 debug variables were created.
8140 * tree.c (decl_value_expr_lookup): Add checking assertion.
8141 (decl_value_expr_insert): Likewise.
8143 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8146 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8147 * tree-scalar-evolution.c (interpret_expr): Likewise.
8148 (expression_expensive_p): Likewise.
8149 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8150 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8151 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8152 (ssa_defined_by_minus_one_stmt_p): New.
8154 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8157 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8158 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8159 * dojump.c (do_jump): Likewise.
8160 * expr.c (expand_expr_real_2): Check operand type's sign.
8161 * fold-const.c (const_unop): Handle ABSU_EXPR.
8162 (fold_abs_const): Likewise.
8163 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8164 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8165 (strip_sign_op_1): Likesise.
8166 * match.pd: Add new pattern to generate ABSU_EXPR.
8167 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8168 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8169 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8170 * tree-inline.c (estimate_operator_cost): Likewise.
8171 * tree-pretty-print.c (dump_generic_node): Likewise.
8172 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8173 * tree.def (ABSU_EXPR): New.
8175 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8178 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8179 documented as preserved for backward compatibility only.
8180 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8182 PR rtl-optimization/86108
8183 * bb-reorder.c (create_forwarder_block): Renamed to ...
8184 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8185 jump from new landing pad to the second part.
8186 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8189 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8192 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8193 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8194 Only call store_expr for halves if the mode is the same.
8197 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8198 Fix up comment formatting.
8200 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8202 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8203 (typed_splay_tree::closure,
8204 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8205 (typed_splay_tree::typed_splay_tree,
8206 typed_splay_tree::operator =): Declared private.
8207 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8208 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8209 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8210 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8211 typed_splay_tree::splay_tree_splay,
8212 typed_splay_tree::splay_tree_foreach_helper,
8213 typed_splay_tree::splay_tree_insert,
8214 typed_splay_tree::splay_tree_remove,
8215 typed_splay_tree::splay_tree_lookup,
8216 typed_splay_tree::splay_tree_predecessor,
8217 typed_splay_tree::splay_tree_successor,
8218 typed_splay_tree::splay_tree_min,
8219 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8220 (typed_splay_tree::root, typed_splay_tree::comp,
8221 typed_splay_tree::delete_key,
8222 typed_splay_tree::delete_value): New data members.
8223 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8224 typed_splay_tree::remove.
8226 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8228 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8229 -mginv and -mno-ginv to the assembler.
8230 * config/mips/mips.opt (-mcrc): New option.
8232 * doc/invoke.text (-mcrc): Document.
8235 2018-06-15 Nick Clifton <nickc@redhat.com>
8238 * tree.c (escaped_string): New class. Converts an unescaped
8239 string into its escaped equivalent.
8240 (warn_deprecated_use): Use the new class to convert the
8241 deprecation message, if present.
8242 (test_escaped_strings): New self test.
8243 (test_c_tests): Add test_escaped_strings.
8244 * doc/extend.texi (deprecated): Add a note that the
8245 deprecation message is affected by the -fmessage-length
8246 option, and that control characters will be escaped.
8247 (#pragma GCC error): Document this pragma.
8248 (#pragma GCC warning): Likewise.
8249 * doc/invoke.texi (-fmessage-length): Document this option's
8250 effect on the #warning and #error preprocessor directives and
8251 the deprecated attribute.
8253 2018-06-15 Richard Biener <rguenther@suse.de>
8255 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8256 here, also noting vector size used.
8257 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8258 size used in MSG_OPTIMIZED_LOCATIONS dump.
8259 (pass_slp_vectorize::execute): Adjust.
8261 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8264 * config/arc/arc.c (arc_return_address_register): Fix
8267 2018-06-15 Richard Biener <rguenther@suse.de>
8270 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8271 leave useless conversion stripping to force_gimple_operand_gsi.
8272 (gimplify_build2): Likewise.
8273 (gimplify_build1): Likewise.
8275 2018-06-15 Richard Biener <rguenther@suse.de>
8278 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8279 before adjusting their block.
8281 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8283 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8284 multilibs for *-*-rtems*.
8285 * config/riscv/t-rtems: New file.
8287 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8290 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8291 unsigned_type_for returns NULL.
8294 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8295 subregs of multi-word pseudos unless the float mode has word size.
8297 2018-06-14 Richard Biener <rguenther@suse.de>
8300 * tree-vect-generic.c (build_word_mode_vector_type): Remove
8301 duplicate and harmful type_hash_canon.
8302 * tree.c (type_hash_canon): Assert we didn't find ourselves.
8304 2018-06-14 Richard Biener <rguenther@suse.de>
8307 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8310 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
8312 * config/rtems.h (STDINT_LONG32): Define.
8314 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
8315 Prachi Godbole <prachi.godbole@imgtec.com>
8317 * config/mips/mips-cpus.def: Define P6600.
8318 * config/mips/mips-tables.opt: Regenerate.
8319 * config/mips/mips.c (mips_ucbranch_type): New enum.
8320 (mips_rtx_cost_data): Add support for P6600.
8321 (mips_issue_rate): Likewise.
8322 (mips_multipass_dfa_lookahead): Likewise.
8323 (mips_avoid_hazard): Likewise.
8324 (mips_reorg_process_insns): Likewise.
8325 (mips_classify_branch_p6600): New function.
8326 * config/mips/mips.h (TUNE_P6600): New define.
8327 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8328 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8329 * config/mips/mips.md: Include p6600.md.
8330 (processor): Add p6600.
8331 * config/mips/p6600.md: New file.
8332 * doc/invoke.texi: Add p6600 to supported architectures.
8334 2018-06-13 Martin Sebor <msebor@redhat.com>
8336 PR tree-optimization/86114
8337 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8339 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8341 2018-06-13 Richard Biener <rguenther@suse.de>
8343 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8344 Properly set vector type of the intermediate stmt.
8345 * tree-vect-stmts.c (vectorizable_operation): The destination
8346 var always has vectype_out type.
8348 2018-06-13 Jeff Law <law@redhat.com>
8350 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8351 integer 0 for argument to print_rtl_with_bb.
8352 (rl78_reorg): Likewise.
8354 2018-06-13 David Malcolm <dmalcolm@redhat.com>
8356 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8357 from rtx to rtx_insn *.
8358 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8360 (add_sched_insns_for_speculation): Likewise for local "target",
8361 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8362 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8363 from rtx_insn ** to rtx_code_label **.
8364 (reorg_emit_nops): Likewise.
8365 (c6x_reorg): Likewise for local "call_labels".
8366 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8368 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8369 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8370 the loops over LABEL_REFS.
8371 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8373 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8374 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8375 (split_branches): Strengthen local "olabel" from rtx to
8376 rtx_insn *, adding a safe_as_a cast.
8377 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8379 (add_insn_after): Likewise for first two params.
8380 (add_insn_before): Likewise.
8381 (remove_insn): Likewise for param.
8382 (emit_pattern_before_noloc): Likewise for second and third params.
8383 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8384 (emit_call_insn_before_noloc): Likewise.
8385 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8387 (emit_barrier_before): Likewise.
8388 (emit_label_before): Strengthen "label" param from "rtx" to
8389 "rtx_code_label *". Strengthen "before" param from "rtx" to
8391 (emit_insn_after_1): Strengthen "after" param from "rtx" to
8393 (emit_pattern_after_noloc): Likewise.
8394 (emit_insn_after_noloc): Likewise.
8395 (emit_jump_insn_after_noloc): Likewise.
8396 (emit_call_insn_after_noloc): Likewise.
8397 (emit_debug_insn_after_noloc): Likewise.
8398 (emit_barrier_after): Likewise.
8399 (emit_label_after): Likewise for both params.
8400 (emit_pattern_after_setloc): Likewise for "after" param. Convert
8401 "loc" param from "int" to "location_t".
8402 (emit_insn_after_setloc): Likewise.
8403 (emit_jump_insn_after_setloc): Likewise.
8404 (emit_call_insn_after_setloc): Likewise.
8405 (emit_debug_insn_after_setloc): Likewise.
8406 (emit_pattern_before_setloc): Likewise for "before" param. Convert
8407 "loc" param from "int" to "location_t".
8408 (emit_pattern_before): Convert NULL_RTX to NULL.
8409 (emit_insn_before_setloc): Convert "loc" param from "int" to
8411 (emit_jump_insn_before_setloc): Likewise.
8412 (emit_call_insn_before_setloc): Likewise.
8413 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8414 rtx_insn *. Convert "loc" param from "int" to "location_t".
8415 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8416 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8417 Convert 3rd param from "int" to "location_t".
8418 (emit_barrier_before, emit_barrier_after, next_real_insn):
8419 Strengthen param from rtx to rtx_insn *.
8420 (emit_label_before): Strengthen 1st param from "rtx" to
8421 "rtx_code_label *". Strengthen 2nd param from "rtx" to
8423 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8424 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8425 Strengthen 2nd param from "rtx" to "rtx_insn *".
8426 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8427 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8428 Likewise. Convert 3rd param from "int" to "location_t".
8429 (emit_label_after): Strengthen 1st param from "rtx" to
8431 (next_real_insn, remove_insn): Strengthen param from "rtx" to
8433 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8434 from "rtx" to "rtx_insn *".
8436 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
8438 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8439 bodies streamed in with -Q.
8440 * dumpfile.c (dump_files): Add lto-stream-out dump file.
8441 * dumpfile.h (tree_dump_index): Add lto_stream_out.
8442 * gimple-streamer-out.c: Include gimple-pretty-print.h
8443 (output_bb): Dump stmts streamed.
8444 * lto-section-out.c: Include print-tree.h
8445 (lto_begin_section): Dump sections created.
8446 (lto_output_decl_index): Dump decl encoded.
8447 * lto-streamer-out.c: Include print-tree.h
8448 (create_output_block): Dump output block created.
8449 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8450 (output_function): Dump function output.
8451 (output_constructor): Dump constructor streamed.
8452 (write_global_stream): Output indexes encoded.
8453 (produce_asm_for_decls): Dump streams encoded.
8454 * lto-streamer.c (streamer_dump_file): New global var.
8455 * lto-streamer.h (streamer_dump_file): Declare.
8456 * passes.c (ipa_write_summaries): Initialize streamer dump.
8457 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8460 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
8463 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8464 offsets for register save directives. Emit a second batch of save
8465 directives, if need be, when the function accesses prior frames.
8467 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8469 * config/arc/fpu.md (fmasf4): Force operand to register.
8470 (fnmasf4): Likewise.
8472 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8474 * config/arc/arc-protos.h (arc_pad_return): Remove.
8475 * config/arc/arc.c (machine_function): Remove force_short_suffix
8477 (arc_print_operand): Adjust printing of '&'.
8478 (arc_verify_short): Remove conditional printing of short suffix.
8479 (arc_final_prescan_insn): Remove reference to size_reason.
8480 (pad_return): New function.
8481 (arc_reorg): Call pad_return.
8482 (arc_pad_return): Remove.
8483 (arc_init_machine_status): Remove reference to force_short_suffix.
8484 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8485 (attr length): When attribute iscompact is true force to 2
8486 regardless; in the case of maybe check if we want to force the
8487 instruction to have 4 bytes length.
8488 (nopv): Change it to generate 4 byte long nop as well.
8489 (blockage): New pattern.
8490 (simple_return): Remove call to arc_pad_return.
8491 (p_return_i): Likewise.
8493 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8495 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8497 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8499 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8502 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8504 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8505 for ARC700 and ARCv2.
8507 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
8510 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8511 operands[2] instead of operands[1].
8514 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8516 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8517 case, check whether the outer register overlaps an unallocatable
8518 register, not just whether it fits the required class.
8520 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8522 * poly-int.h (can_div_trunc_p): Add new overload in which all values
8524 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8525 (memrefs_conflict_p): Likewise.
8526 (init_alias_analysis): Likewise.
8527 * cfgexpand.c (expand_debug_expr): Likewise.
8528 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8529 * cse.c (fold_rtx): Likewise.
8530 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8531 * expr.c (emit_block_move_hints): Likewise.
8532 (clear_storage_hints, push_block, emit_push_insn): Likewise.
8533 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8534 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8535 (emit_group_store): Likewise.
8536 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
8537 to read the PRE/POST_MODIFY increment.
8538 * calls.c (store_one_arg): Use strip_offset.
8539 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8541 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8543 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8544 (simplify_binary_operation_1): Extend CONST_INT handling to
8546 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8547 than a HOST_WIDE_INT.
8548 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8550 (adjust_mems, add_stores): Update accodingly.
8551 (vt_canonicalize_addr): Track polynomial offsets.
8552 (emit_note_insn_var_location): Likewise.
8553 (vt_add_function_parameter): Likewise.
8554 (vt_initialize): Likewise.
8556 2018-06-12 Jeff Law <law@redhat.com>
8558 * config.gcc (alpha*-*-freebsd*): Remove.
8559 * config/alpha/freebsd.h: Remove.
8561 2018-06-12 David Malcolm <dmalcolm@redhat.com>
8564 * spellcheck-tree.c (levenshtein_distance): Rename to...
8565 (get_edit_distance): ...this, and update for underlying renaming.
8566 * spellcheck-tree.h (levenshtein_distance): Rename to...
8567 (get_edit_distance): ...this.
8568 * spellcheck.c (levenshtein_distance): Rename to...
8569 (get_edit_distance): ...this. Convert from Levenshtein distance
8570 to Damerau-Levenshtein distance by supporting transpositions of
8571 adjacent characters. Rename "v1" to "v_next" and "v0" to
8573 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8574 (selftest::test_edit_distance_unit_test_oneway): ...this, and
8575 update for underlying renaming.
8576 (selftest::levenshtein_distance_unit_test): Rename to...
8577 (selftest::test_get_edit_distance_unit): ...this, and update for
8578 underlying renaming.
8579 (selftest::test_find_closest_string): Add example from PR 69968
8580 where transposition helps
8581 (selftest::test_metric_conditions): Update for renaming.
8582 (selftest::test_metric_conditions): Likewise.
8583 (selftest::spellcheck_c_tests): Likewise.
8584 * spellcheck.h (levenshtein_distance): Rename both overloads to...
8585 (get_edit_distance): ...this.
8586 (best_match::consider): Update for renaming.
8588 2018-06-12 Martin Sebor <msebor@redhat.com>
8590 PR tree-optimization/85259
8591 * builtins.c (compute_objsize): Handle constant offsets.
8592 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8593 true iff a warning has been issued.
8594 * gimple.h (gimple_nonartificial_location): New function.
8595 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8596 gimple_nonartificial_location and handle -Wno-system-headers.
8597 (handle_builtin_stxncpy): Same.
8599 2018-06-12 Martin Sebor <msebor@redhat.com>
8602 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8604 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
8606 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8607 BUILTIN_VEC_XST entries for pointer to double and long long.
8609 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
8612 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8614 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8617 2018-06-12 Martin Liska <mliska@suse.cz>
8619 * doc/options.texi: Document IntegerRange.
8621 2018-06-12 Martin Liska <mliska@suse.cz>
8623 * config/i386/i386.opt: Make MPX-related options as Deprecated.
8624 * opt-functions.awk: Handle Deprecated flag.
8625 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8627 (read_cmdline_option): Report warning for a deprecated option.
8628 * opts.h (struct cl_option): Add new field cl_deprecated.
8629 (CL_ERR_DEPRECATED): New.
8631 2018-06-12 Martin Liska <mliska@suse.cz>
8633 * doc/options.texi: Document Deprecated option flag.
8635 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8637 * config/arc/arc-arch.h (arc_extras): New enum.
8638 (arc_cpu_t):Add field extra.
8639 (arc_cpu_types): Consider the extras.
8640 * config/arc/arc-cpus.def: Add extras info.
8641 * config/arc/arc-opts.h (processor_type): Consider extra field.
8642 * config/arc/arc.c (arc_override_options): Handle extra field.
8644 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8646 * config/arc/arc-arch.h: Update ARC_OPTX macro.
8647 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8649 * config/arc/arc.c (arc_init): Update pic warning.
8650 (irq_range): Update irq range parsing warnings.
8651 (arc_override_options): Update various warning messages.
8652 (arc_handle_aux_attribute): Likewise.
8654 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
8656 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8658 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8660 * doc/sourcebuild.texi: Document usage of line number 0 in verify
8661 compiler messages directives.
8663 2018-06-12 Matthew Fortune <mfortune@gmail.com>
8665 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8666 * config/mips/mips-tables.opt: Regenerate.
8667 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8669 * doc/invoke.texi: Document -march=i6500.
8671 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
8673 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8674 (i6400_gpmul): Add cpu_unit.
8675 (i6400_gpdiv): Likewise.
8676 (i6400_msa_add_d): Update reservations.
8677 (i6400_msa_int_add) Likewise.
8678 (i6400_msa_short_logic3) Likewise.
8679 (i6400_msa_short_logic2) Likewise.
8680 (i6400_msa_short_logic) Likewise.
8681 (i6400_msa_move) Likewise.
8682 (i6400_msa_cmp) Likewise.
8683 (i6400_msa_short_float2) Likewise.
8684 (i6400_msa_div_d) Likewise.
8685 (i6400_msa_long_logic1) Likewise.
8686 (i6400_msa_long_logic2) Likewise.
8687 (i6400_msa_mult) Likewise.
8688 (i6400_msa_long_float2) Likewise.
8689 (i6400_msa_long_float4) Likewise.
8690 (i6400_msa_long_float5) Likewise.
8691 (i6400_msa_long_float8) Likewise.
8692 (i6400_fpu_fadd): Include frint type.
8693 (i6400_fpu_store): New define_insn_reservation.
8694 (i6400_fpu_load): Likewise.
8695 (i6400_fpu_move): Likewise.
8696 (i6400_fpu_fcmp): Likewise.
8697 (i6400_fpu_fmadd): Likewise.
8698 (i6400_int_mult): Include imul3nc type and update reservation.
8699 (i6400_int_div): Include idiv3 type and update reservation.
8700 (i6400_int_load): Update to check type not move_type.
8701 (i6400_int_store): Likewise.
8702 (i6400_int_prefetch): Set zero latency.
8704 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
8706 * gcc.c: Document new %@{...} sequence.
8707 (LINK_COMMAND_SPEC): Use it for the -L switches.
8708 (cpp_unique_options): Use it for the -I switches.
8709 (at_file_argbuf): New global variable.
8710 (in_at_file): Likewise.
8711 (alloc_args): Create at_file_argbuf.
8712 (clear_args): Truncate at_file_argbuf.
8713 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8714 (open_at_file): New function.
8715 (close_at_file): Likewise.
8716 (create_at_file): Delete.
8717 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8720 (validate_switches_from_spec): Deal with %@{...} sequence.
8721 (validate_switches): Likewise.
8722 (driver::finalize): Call clear_args.
8724 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
8726 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8728 2018-06-11 Martin Sebor <msebor@redhat.com>
8730 * doc/invoke.texi (-Wall): List -Wc++17-compat.
8731 (Wno-class-memaccess): Add @opindex.
8732 (Wno-templates, Wno-multiple-inheritance): Same.
8733 (Wno-virtual-inheritance, Wno-namespaces): Same.
8734 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8735 (Wno-format-overflow, Wno-format-truncation): Same.
8736 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8737 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8738 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8739 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8740 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8741 (Wno-misspelled-isr): Same.
8743 2018-06-11 Martin Sebor <msebor@redhat.com>
8745 * PR tree-optimization/86083
8746 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8748 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
8750 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
8752 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
8755 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
8756 on the correct operand.
8757 (*movdi_internal64): Ditto.
8759 2018-06-11 Martin Liska <mliska@suse.cz>
8761 PR tree-optimization/86089
8762 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
8764 2018-06-11 Julia Koval <julia.koval@intel.com>
8766 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
8767 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
8768 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
8770 2018-06-11 Olivier Hainque <hainque@adacore.com>
8772 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
8773 for Ada with strict dwarf2.
8775 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
8778 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8781 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
8783 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8785 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
8787 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8790 2018-06-08 Martin Liska <mliska@suse.cz>
8792 * tree-cfg.h (debug_function): Fix argument type to match
8795 2018-06-08 Martin Liska <mliska@suse.cz>
8797 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8798 Remove usage of MPX-related (and removed) fields.
8799 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8801 2018-06-08 David Malcolm <dmalcolm@redhat.com>
8803 * cfg.c (debug): Use TDF_NONE rather than 0.
8804 * cfghooks.c (debug): Likewise.
8805 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8806 (struct dump_option_value_info): Convert to...
8807 (struct kv_pair): ...this template type.
8808 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8810 (optinfo_verbosity_options): Likewise.
8811 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8813 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8814 than int for "optgroup_flags" param.
8815 (dump_generic_expr_loc): Use dump_flags_t rather than int for
8817 (dump_dec): Likewise.
8818 (dump_finish): Use TDF_NONE rather than 0.
8819 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8820 rather than int for "optgroup_flags" param. Use TDF_NONE rather
8821 than 0. Update for change to option_ptr.
8822 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8823 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
8824 0. Update for changes to optinfo_verbosity_options and
8826 (opt_info_switch_p): Convert optgroup_flags from int to
8828 (dump_basic_block): Use dump_flags_t rather than int
8829 for "dump_kind" param.
8830 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8831 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8832 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8833 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8834 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8835 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8836 TDF_NONE): Convert from macros to...
8837 (enum dump_flag): ...this new enum.
8838 (dump_flags_t): Update to use enum.
8839 (operator|, operator&, operator~, operator|=, operator&=):
8840 Implement for dump_flags_t.
8841 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
8842 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
8843 Convert from macros to...
8844 (enum optgroup_flag): ...this new enum.
8845 (optgroup_flags_t): New typedef.
8846 (operator|, operator|=): Implement for optgroup_flags_t.
8847 (struct dump_file_info): Convert field "alt_flags" to
8848 dump_flags_t. Convert field "optgroup_flags" to
8850 (dump_basic_block): Use dump_flags_t rather than int for param.
8851 (dump_generic_expr_loc): Likewise.
8852 (dump_dec): Likewise.
8853 (dump_register): Convert param "optgroup_flags" to
8855 (opt_info_enable_passes): Likewise.
8856 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
8858 * gimple-pretty-print.c (debug): Likewise.
8859 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
8860 (merged_store_group::apply_stores): Likewise.
8861 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
8862 * gimple.c (verify_gimple_pp): Likewise.
8863 * graphite-poly.c (print_pbb_body): Likewise.
8864 * passes.c (pass_manager::register_one_dump_file): Convert
8865 local "optgroup_flags" to optgroup_flags_t.
8866 * print-tree.c (print_node): Use TDF_NONE rather than 0.
8868 (debug_body): Likewise.
8869 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
8870 to optgroup_flags_t.
8871 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
8873 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
8874 (convert_mult_to_fma): Likewise.
8875 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
8876 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
8877 * tree-vect-data-refs.c (dump_lower_bound): Convert param
8878 "dump_kind" to dump_flags_t.
8880 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8882 * config/rs6000/rs6000.c (min, max): Delete.
8884 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8886 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
8887 -mabi=spe and -mabi=no-spe.
8889 2018-06-08 Martin Liska <mliska@suse.cz>
8891 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
8892 where we expect an existing summary.
8894 2018-06-08 Martin Liska <mliska@suse.cz>
8896 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
8897 * ipa-inline.h (estimate_edge_growth): Likewise.
8899 2018-06-08 Martin Liska <mliska@suse.cz>
8901 * cgraph.c (function_version_hasher::hash): Use
8902 cgraph_node::get_uid ().
8903 (function_version_hasher::equal):
8904 * cgraph.h (cgraph_node::get_uid): New method.
8905 * ipa-inline.c (update_caller_keys): Use
8906 cgraph_node::get_uid ().
8907 (update_callee_keys): Likewise.
8908 * ipa-utils.c (searchc): Likewise.
8909 (ipa_reduced_postorder): Likewise.
8910 * lto-cgraph.c (input_node): Likewise.
8911 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
8912 * symbol-summary.h (symtab_insertion): Likewise.
8913 (symtab_removal): Likewise.
8914 (symtab_duplication): Likewise.
8915 * tree-pretty-print.c (dump_function_header): Likewise.
8916 * tree-sra.c (convert_callers_for_node): Likewise.
8918 2018-06-08 Martin Liska <mliska@suse.cz>
8920 * cgraph.c (symbol_table::create_edge): Always assign a new
8922 (symbol_table::free_edge): Do not recycle numbers.
8923 * cgraph.h (cgraph_edge::get): New method.
8924 * symbol-summary.h (symtab_removal): Use it.
8925 (symtab_duplication): Likewise.
8926 (call_summary::hashable_uid): Remove.
8928 2018-06-08 Martin Liska <mliska@suse.cz>
8930 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
8931 (initialize_growth_caches): Remove.
8932 (free_growth_caches): Likewise.
8933 (do_estimate_edge_time): Use edge_growth_cache.
8934 (do_estimate_edge_size): Likewise.
8935 (do_estimate_edge_hints): Likewise.
8936 * ipa-inline.c (reset_edge_caches): Likewise.
8937 (recursive_inlining): Likewise.
8938 (inline_small_functions): Likewise.
8939 * ipa-inline.h (initialize_growth_caches): Remove.
8940 (estimate_edge_size): Likewise.
8941 (estimate_edge_time): Likewise.
8942 (estimate_edge_hints): Likewise.
8943 (reset_edge_growth_cache): Likewise.
8944 * symbol-summary.h (call_summary::remove): New method.
8946 2018-06-08 Martin Liska <mliska@suse.cz>
8948 * ipa-cp.c (class edge_clone_summary): New summary.
8949 (grow_edge_clone_vectors): Remove.
8950 (ipcp_edge_duplication_hook): Remove.
8951 (class edge_clone_summary_t): New call_summary class.
8952 (ipcp_edge_removal_hook): Remove.
8953 (edge_clone_summary_t::duplicate): New function.
8954 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
8955 (create_specialized_node): Likewise.
8956 (ipcp_driver): Initialize edge_clone_summaries and do not
8959 2018-06-08 Martin Liska <mliska@suse.cz>
8961 * symbol-summary.h (get): New function.
8962 (call_summary::m_initialize_when_cloning): New class member.
8964 2018-06-08 Martin Liska <mliska@suse.cz>
8966 * cgraph.c (cgraph_node::remove): Do not recycle uid.
8967 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
8968 (symbol_table::allocate_cgraph_symbol): Do not set uid.
8969 * passes.c (uid_hash_t): Record removed_nodes by their uids.
8970 (remove_cgraph_node_from_order): Use the removed_nodes set.
8971 (do_per_function_toporder): Likwise.
8972 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
8973 instead of summary_uid.
8974 (symtab_removal): Likewise.
8975 (symtab_duplication): Likewise.
8977 2018-06-08 Martin Liska <mliska@suse.cz>
8979 * ipa-cp.c (ipcp_store_bits_results): Use
8980 ipcp_transformation_sum.
8981 (ipcp_store_vr_results): Likewise.
8982 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
8984 (ipcp_transformation_initialize): ... this.
8985 (ipa_set_node_agg_value_chain):
8986 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
8987 (write_ipcp_transformation_info): Likewise.
8988 (read_ipcp_transformation_info): Likewise.
8989 (ipcp_update_bits): Likewise.
8990 (ipcp_update_vr): Likewise.
8991 (ipcp_transform_function): Likewise.
8992 * ipa-prop.h: Rename ipcp_transformation_summary to
8993 ipcp_transformation.
8994 (class ipcp_transformation_t): New function summary.
8995 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
8996 (ipa_get_agg_replacements_for_node): Likewise.
8998 2018-06-08 Martin Liska <mliska@suse.cz>
9000 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9002 (class funct_state_summary_t): New function_summary class.
9003 (has_function_state): Remove.
9004 (get_function_state): Likewise.
9005 (set_function_state): Likewise.
9006 (add_new_function): Likewise.
9007 (funct_state_summary_t::insert): New function.
9008 (duplicate_node_data): Remove.
9009 (remove_node_data): Remove.
9010 (funct_state_summary_t::duplicate): New function.
9011 (register_hooks): Create new funct_state_summaries.
9012 (pure_const_generate_summary): Use it.
9013 (pure_const_write_summary): Likewise.
9014 (pure_const_read_summary): Likewise.
9015 (propagate_pure_const): Likewise.
9016 (propagate_nothrow): Likewise.
9017 (dump_malloc_lattice): Likewise.
9018 (propagate_malloc): Likewise.
9019 (execute): Do not register hooks, just remove summary
9021 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9024 2018-06-08 Martin Liska <mliska@suse.cz>
9026 * ipa-reference.c (remove_node_data): Remove.
9027 (duplicate_node_data): Likewise.
9028 (class ipa_ref_var_info_summary_t): New class.
9029 (class ipa_ref_opt_summary_t): Likewise.
9030 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9031 (get_reference_optimization_summary): Use
9032 ipa_ref_opt_sum_summaries.
9033 (set_reference_vars_info): Remove.
9034 (set_reference_optimization_summary): Likewise.
9035 (ipa_init): Create summaries.
9036 (init_function_info): Use function summary.
9037 (ipa_ref_opt_summary_t::duplicate): New function.
9038 (ipa_ref_opt_summary_t::remove): New function.
9039 (get_read_write_all_from_node): Fix GNU coding style.
9040 (propagate): Use function summary.
9041 (write_node_summary_p): Fix GNU coding style.
9042 (stream_out_bitmap): Likewise.
9043 (ipa_reference_read_optimization_summary): Use function summary.
9044 (ipa_reference_c_finalize): Do not release hooks.
9046 2018-06-08 Martin Liska <mliska@suse.cz>
9048 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9049 (analyze_function_body): Extract multiple calls of get_create.
9050 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9051 * ipa-inline.c (recursive_inlining): Use ::get method.
9052 * ipa-inline.h (estimate_edge_growth): Likewise.
9054 2018-06-08 Martin Liska <mliska@suse.cz>
9056 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9058 (hsa_function_summary::hsa_function_summary): Use the new enum
9060 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9061 * hsa-gen.c (hsa_get_host_function): Likewise.
9062 (get_brig_function_name): Likewise.
9063 * ipa-hsa.c (process_hsa_functions): Likewise.
9064 (ipa_hsa_write_summary): Likewise.
9065 * symbol-summary.h (symtab_duplication): Use ::get function/
9066 (get): New function.
9068 2018-06-08 Martin Liska <mliska@suse.cz>
9070 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9072 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9073 (hsa_register_kernel): Likewise.
9074 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9075 * hsa-gen.c (hsa_get_host_function): Likewise.
9076 (get_brig_function_name): Likewise.
9077 (generate_hsa): Likewise.
9078 (pass_gen_hsail::execute): Likewise.
9079 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9080 (devirtualization_time_bonus): Likewise.
9081 (ipcp_propagate_stage): Likewise.
9082 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9083 (edge_set_predicate): Likewise.
9084 (evaluate_conditions_for_known_args): Likewise.
9085 (evaluate_properties_for_edge): Likewise.
9086 (ipa_fn_summary::reset): Likewise.
9087 (ipa_fn_summary_t::duplicate): Likewise.
9088 (dump_ipa_call_summary): Likewise.
9089 (ipa_dump_fn_summary): Likewise.
9090 (analyze_function_body): Likewise.
9091 (compute_fn_summary): Likewise.
9092 (estimate_edge_devirt_benefit): Likewise.
9093 (estimate_edge_size_and_time): Likewise.
9094 (estimate_calls_size_and_time): Likewise.
9095 (estimate_node_size_and_time): Likewise.
9096 (inline_update_callee_summaries): Likewise.
9097 (remap_edge_change_prob): Likewise.
9098 (remap_edge_summaries): Likewise.
9099 (ipa_merge_fn_summary_after_inlining): Likewise.
9100 (ipa_update_overall_fn_summary): Likewise.
9101 (read_ipa_call_summary): Likewise.
9102 (inline_read_section): Likewise.
9103 (write_ipa_call_summary): Likewise.
9104 (ipa_fn_summary_write): Likewise.
9105 (ipa_free_fn_summary): Likewise.
9106 * ipa-hsa.c (process_hsa_functions): Likewise.
9107 (ipa_hsa_write_summary): Likewise.
9108 (ipa_hsa_read_section): Likewise.
9109 * ipa-icf.c (sem_function::merge): Likewise.
9110 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9111 (do_estimate_edge_time): Likewise.
9112 (estimate_size_after_inlining): Likewise.
9113 (estimate_growth): Likewise.
9114 (growth_likely_positive): Likewise.
9115 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9116 (inline_call): Likewise.
9117 * ipa-inline.c (caller_growth_limits): Likewise.
9118 (can_inline_edge_p): Likewise.
9119 (can_inline_edge_by_limits_p): Likewise.
9120 (compute_uninlined_call_time): Likewise.
9121 (compute_inlined_call_time): Likewise.
9122 (want_inline_small_function_p): Likewise.
9123 (edge_badness): Likewise.
9124 (update_caller_keys): Likewise.
9125 (update_callee_keys): Likewise.
9126 (recursive_inlining): Likewise.
9127 (inline_small_functions): Likewise.
9128 (inline_to_all_callers_1): Likewise.
9129 (dump_overall_stats): Likewise.
9130 (early_inline_small_functions): Likewise.
9131 (early_inliner): Likewise.
9132 * ipa-inline.h (estimate_edge_growth): Likewise.
9133 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9134 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9135 * ipa-prop.h (IPA_NODE_REF): Likewise.
9136 (IPA_EDGE_REF): Likewise.
9137 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9138 (propagate_malloc): Likewise.
9139 * ipa-split.c (execute_split_functions): Likewise.
9140 * symbol-summary.h: Rename get to get_create.
9142 (get_create): Likewise.
9143 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9145 2018-06-08 Martin Liska <mliska@suse.cz>
9147 * symbol-summary.h (release): Move definition out of class
9149 (symtab_removal): Likewise.
9150 (symtab_duplication): Likewise.
9152 2018-06-08 Martin Liska <mliska@suse.cz>
9154 * symbol-summary.h (function_summary): Move constructor
9155 implementation out of class declaration.
9156 (release): Likewise.
9157 (symtab_insertion): Likewise.
9158 (symtab_removal): Likewise.
9159 (symtab_duplication): Likewise.
9162 2018-06-08 Martin Liska <mliska@suse.cz>
9164 * Makefile.in: Remove support for MPX (macros, related functions,
9165 fields in cgraph_node, ...).
9166 * builtin-types.def (BT_BND): Likewise.
9167 (BT_FN_BND_CONST_PTR): Likewise.
9168 (BT_FN_CONST_PTR_BND): Likewise.
9169 (BT_FN_VOID_PTR_BND): Likewise.
9170 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9171 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9172 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9173 (expand_builtin_mempcpy_with_bounds): Likewise.
9174 (expand_builtin_memset_with_bounds): Likewise.
9175 (expand_builtin_memset_args): Likewise.
9176 (std_expand_builtin_va_start): Likewise.
9177 (expand_builtin): Likewise.
9178 (expand_builtin_with_bounds): Likewise.
9179 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9180 (DEF_LIB_BUILTIN_CHKP): Likewise.
9181 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9182 (DEF_CHKP_BUILTIN): Likewise.
9183 (BUILT_IN_MEMCPY): Likewise.
9184 (BUILT_IN_MEMMOVE): Likewise.
9185 (BUILT_IN_MEMPCPY): Likewise.
9186 (BUILT_IN_MEMSET): Likewise.
9187 (BUILT_IN_STPCPY): Likewise.
9188 (BUILT_IN_STRCAT): Likewise.
9189 (BUILT_IN_STRCHR): Likewise.
9190 (BUILT_IN_STRCPY): Likewise.
9191 (BUILT_IN_STRLEN): Likewise.
9192 (BUILT_IN_MEMCPY_CHK): Likewise.
9193 (BUILT_IN_MEMMOVE_CHK): Likewise.
9194 (BUILT_IN_MEMPCPY_CHK): Likewise.
9195 (BUILT_IN_MEMSET_CHK): Likewise.
9196 (BUILT_IN_STPCPY_CHK): Likewise.
9197 (BUILT_IN_STRCAT_CHK): Likewise.
9198 (BUILT_IN_STRCPY_CHK): Likewise.
9199 * calls.c (store_bounds): Likewise.
9200 (emit_call_1): Likewise.
9201 (special_function_p): Likewise.
9202 (maybe_warn_nonstring_arg): Likewise.
9203 (initialize_argument_information): Likewise.
9204 (finalize_must_preallocate): Likewise.
9205 (compute_argument_addresses): Likewise.
9206 (expand_call): Likewise.
9207 * cfgexpand.c (expand_call_stmt): Likewise.
9208 (expand_return): Likewise.
9209 (expand_gimple_stmt_1): Likewise.
9210 (pass_expand::execute): Likewise.
9211 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9212 (cgraph_node::remove): Likewise.
9213 (cgraph_node::dump): Likewise.
9214 (cgraph_node::verify_node): Likewise.
9215 * cgraph.h (chkp_function_instrumented_p): Likewise.
9216 (symtab_node::get_alias_target): Likewise.
9217 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9218 (cgraph_local_p): Likewise.
9219 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9220 (cgraph_edge::rebuild_references): Likewise.
9221 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9222 (walk_polymorphic_call_targets): Likewise.
9223 (cgraph_node::expand_thunk): Likewise.
9224 (symbol_table::output_weakrefs): Likewise.
9225 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9226 (ix86_handle_option): Likewise.
9227 * config/i386/constraints.md: Likewise.
9228 * config/i386/i386-builtin-types.def (BND): Likewise.
9232 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9233 (BDESC_FIRST): Likewise.
9235 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9236 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9237 * config/i386/i386.c (enum reg_class): Likewise.
9238 (ix86_target_string): Likewise.
9239 (ix86_option_override_internal): Likewise.
9240 (ix86_conditional_register_usage): Likewise.
9241 (ix86_valid_target_attribute_inner_p): Likewise.
9242 (ix86_set_indirect_branch_type): Likewise.
9243 (ix86_set_current_function): Likewise.
9244 (ix86_function_arg_regno_p): Likewise.
9245 (init_cumulative_args): Likewise.
9246 (ix86_function_arg_advance): Likewise.
9247 (ix86_function_arg): Likewise.
9248 (ix86_pass_by_reference): Likewise.
9249 (ix86_function_value_regno_p): Likewise.
9250 (ix86_function_value_1): Likewise.
9251 (ix86_function_value_bounds): Likewise.
9252 (ix86_return_in_memory): Likewise.
9253 (ix86_setup_incoming_vararg_bounds): Likewise.
9254 (ix86_va_start): Likewise.
9255 (indirect_thunk_need_prefix): Likewise.
9256 (print_reg): Likewise.
9257 (ix86_print_operand): Likewise.
9258 (ix86_expand_call): Likewise.
9259 (ix86_output_function_return): Likewise.
9260 (reg_encoded_number): Likewise.
9261 (BDESC_VERIFYS): Likewise.
9262 (ix86_init_mpx_builtins): Likewise.
9263 (ix86_init_builtins): Likewise.
9264 (ix86_emit_cmove): Likewise.
9265 (ix86_emit_move_max): Likewise.
9266 (ix86_expand_builtin): Likewise.
9267 (ix86_builtin_mpx_function): Likewise.
9268 (ix86_get_arg_address_for_bt): Likewise.
9269 (ix86_load_bounds): Likewise.
9270 (ix86_store_bounds): Likewise.
9271 (ix86_load_returned_bounds): Likewise.
9272 (ix86_store_returned_bounds): Likewise.
9273 (ix86_class_likely_spilled_p): Likewise.
9274 (ix86_hard_regno_mode_ok): Likewise.
9275 (x86_order_regs_for_local_alloc): Likewise.
9276 (ix86_mitigate_rop): Likewise.
9277 (ix86_bnd_prefixed_insn_p): Likewise.
9278 (ix86_mpx_bound_mode): Likewise.
9279 (ix86_make_bounds_constant): Likewise.
9280 (ix86_initialize_bounds): Likewise.
9281 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9282 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9283 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9284 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9285 (TARGET_CHKP_BOUND_MODE): Likewise.
9286 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9287 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9288 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9289 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9290 * config/i386/i386.h (TARGET_MPX): Likewise.
9291 (TARGET_MPX_P): Likewise.
9292 (VALID_BND_REG_MODE): Likewise.
9293 (FIRST_BND_REG): Likewise.
9294 (LAST_BND_REG): Likewise.
9295 (enum reg_class): Likewise.
9296 (BND_REG_P): Likewise.
9297 (BND_REGNO_P): Likewise.
9298 (BNDmode): Likewise.
9299 (ADJUST_INSN_LENGTH): Likewise.
9300 * config/i386/i386.md: Likewise.
9301 * config/i386/i386.opt: Likewise.
9302 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9303 (defined): Likewise.
9304 (LINK_MPX): Likewise.
9305 (MPX_SPEC): Likewise.
9306 (LIBMPX_SPEC): Likewise.
9307 (LIBMPXWRAPPERS_SPEC): Likewise.
9308 (CHKP_SPEC): Likewise.
9309 * config/i386/predicates.md: Likewise.
9310 * dbxout.c (dbxout_type): Likewise.
9311 * doc/extend.texi: Likewise.
9312 * doc/invoke.texi: Likewise.
9313 * doc/md.texi: Likewise.
9314 * doc/tm.texi: Likewise.
9315 * doc/tm.texi.in: Likewise.
9316 * dwarf2out.c (is_base_type): Likewise.
9317 (gen_formal_types_die): Likewise.
9318 (gen_subprogram_die): Likewise.
9319 (gen_type_die_with_usage): Likewise.
9320 (gen_decl_die): Likewise.
9321 (dwarf2out_late_global_decl): Likewise.
9322 * expr.c (expand_assignment): Likewise.
9323 (emit_storent_insn): Likewise.
9324 (store_expr_with_bounds): Likewise.
9325 (store_expr): Likewise.
9326 (expand_expr_real_1): Likewise.
9327 * expr.h (store_expr_with_bounds): Likewise.
9328 * function.c (use_register_for_decl): Likewise.
9329 (struct bounds_parm_data): Likewise.
9330 (assign_parms_augmented_arg_list): Likewise.
9331 (assign_parm_find_entry_rtl): Likewise.
9332 (assign_parm_is_stack_parm): Likewise.
9333 (assign_parm_load_bounds): Likewise.
9334 (assign_bounds): Likewise.
9335 (assign_parms): Likewise.
9336 (expand_function_start): Likewise.
9337 * gcc.c (CHKP_SPEC): Likewise.
9338 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9339 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9340 (wrestrict_dom_walker::check_call): Likewise.
9341 * gimple.c (gimple_build_call_from_tree): Likewise.
9342 * gimple.h (enum gf_mask): Likewise.
9343 (gimple_call_with_bounds_p): Likewise.
9344 (gimple_call_set_with_bounds): Likewise.
9345 * gimplify.c (gimplify_init_constructor): Likewise.
9346 * ipa-cp.c (initialize_node_lattices): Likewise.
9347 (propagate_constants_across_call): Likewise.
9348 (find_more_scalar_values_for_callers_subset): Likewise.
9349 * ipa-hsa.c (process_hsa_functions): Likewise.
9350 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9351 * ipa-icf.c (sem_function::merge): Likewise.
9352 * ipa-inline.c (early_inliner): Likewise.
9353 * ipa-pure-const.c (warn_function_noreturn): Likewise.
9354 (warn_function_cold): Likewise.
9355 (propagate_pure_const): Likewise.
9356 * ipa-ref.h (enum GTY): Likewise.
9357 * ipa-split.c (find_retbnd): Likewise.
9358 (consider_split): Likewise.
9359 (split_function): Likewise.
9360 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9361 * ipa.c (walk_polymorphic_call_targets): Likewise.
9362 (symbol_table::remove_unreachable_nodes): Likewise.
9363 (process_references): Likewise.
9364 (cgraph_build_static_cdtor_1): Likewise.
9365 * lto-cgraph.c (lto_output_node): Likewise.
9366 (output_refs): Likewise.
9367 (compute_ltrans_boundary): Likewise.
9368 (input_overwrite_node): Likewise.
9369 (input_node): Likewise.
9370 (input_cgraph_1): Likewise.
9371 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9372 * passes.c (pass_manager::execute_early_local_passes): Likewise.
9373 (class pass_chkp_instrumentation_passes): Likewise.
9374 (make_pass_chkp_instrumentation_passes): Likewise.
9375 * passes.def: Likewise.
9376 * rtl.h (struct GTY): Likewise.
9377 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9378 * stor-layout.c (layout_type): Likewise.
9379 * symtab.c: Likewise.
9380 * target.def: Likewise.
9381 * targhooks.c (default_chkp_bound_type): Likewise.
9382 (default_chkp_bound_mode): Likewise.
9383 (default_builtin_chkp_function): Likewise.
9384 (default_chkp_function_value_bounds): Likewise.
9385 (default_chkp_make_bounds_constant): Likewise.
9386 (default_chkp_initialize_bounds): Likewise.
9387 * targhooks.h (default_chkp_bound_type): Likewise.
9388 (default_chkp_bound_mode): Likewise.
9389 (default_builtin_chkp_function): Likewise.
9390 (default_chkp_function_value_bounds): Likewise.
9391 (default_chkp_make_bounds_constant): Likewise.
9392 (default_chkp_initialize_bounds): Likewise.
9393 * toplev.c (compile_file): Likewise.
9394 (process_options): Likewise.
9395 * tree-core.h (DEF_BUILTIN): Likewise.
9396 (DEF_BUILTIN_CHKP): Likewise.
9397 * tree-inline.c (declare_return_variable): Likewise.
9398 (remap_gimple_stmt): Likewise.
9399 (copy_bb): Likewise.
9400 (initialize_inlined_parameters): Likewise.
9401 (expand_call_inline): Likewise.
9402 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9403 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9404 (make_pass_ipa_chkp_produce_thunks): Likewise.
9405 (make_pass_chkp): Likewise.
9406 (make_pass_chkp_opt): Likewise.
9407 (make_pass_chkp_instrumentation_passes): Likewise.
9408 * tree-pretty-print.c (dump_generic_node): Likewise.
9409 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9410 * tree-ssa-dce.c (propagate_necessity): Likewise.
9411 (eliminate_unnecessary_stmts): Likewise.
9412 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9413 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9414 * tree-ssa-sccvn.h: Likewise.
9415 * tree-ssa-strlen.c (get_string_length): Likewise.
9416 (valid_builtin_call): Likewise.
9417 (adjust_last_stmt): Likewise.
9418 (handle_builtin_strchr): Likewise.
9419 (handle_builtin_strcpy): Likewise.
9420 (handle_builtin_stxncpy): Likewise.
9421 (handle_builtin_memcpy): Likewise.
9422 (handle_builtin_strcat): Likewise.
9423 (strlen_check_and_optimize_stmt): Likewise.
9424 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9425 * tree-streamer-in.c: Likewise.
9426 * tree-streamer.c (record_common_node): Likewise.
9427 * tree.c (tree_code_size): Likewise.
9428 (wide_int_to_tree_1): Likewise.
9429 (type_contains_placeholder_1): Likewise.
9430 (build_common_tree_nodes): Likewise.
9431 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9432 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9433 (POINTER_BOUNDS_P): Likewise.
9434 (BOUNDED_TYPE_P): Likewise.
9435 (BOUNDED_P): Likewise.
9436 (CALL_WITH_BOUNDS_P): Likewise.
9437 (pointer_bounds_type_node): Likewise.
9438 * value-prof.c (gimple_ic): Likewise.
9439 * var-tracking.c (vt_add_function_parameters): Likewise.
9440 * varasm.c (make_decl_rtl): Likewise.
9441 (assemble_start_function): Likewise.
9442 (output_constant): Likewise.
9443 (maybe_assemble_visibility): Likewise.
9444 * varpool.c (ctor_for_folding): Likewise.
9445 * chkp-builtins.def: Remove.
9446 * ipa-chkp.c: Remove.
9447 * ipa-chkp.h: Remove.
9448 * rtl-chkp.c: Remove.
9449 * rtl-chkp.h: Remove.
9450 * tree-chkp-opt.c: Remove.
9451 * tree-chkp.c: Remove.
9452 * tree-chkp.h: Remove.
9454 2018-06-07 Carl Love <cel@us.ibm.com>
9456 * config/rs6000/vsx.md (vextract_fp_from_shorth,
9457 vextract_fp_from_shortl): Add BE support.
9459 2018-06-07 Paul Koning <ni1d@arrl.net>
9461 * compare-elim.c (try_merge_compare): Don't merge compare if
9462 address contains a side effect.
9463 (try_eliminate_compare): Likewise.
9465 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
9467 * config.gcc: Support "tremont".
9468 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9469 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9471 * config/i386/i386.c (m_TREMONT): Define.
9472 (processor_target_table): Add "tremont".
9473 (PTA_TREMONT): Define.
9474 (ix86_lea_outperforms): Add TARGET_TREMONT.
9475 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9476 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9477 and M_INTEL_GOLDMONT_PLUS.
9478 (fold_builtin_cpu): Add "tremont".
9479 (ix86_add_stmt_cost): Add TARGET_TREMONT.
9480 (ix86_option_override_internal): Add "tremont".
9481 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9482 (processor_type): Add PROCESSOR_TREMONT.
9483 * config/i386/x86-tune.def: Add m_TREMONT.
9484 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9486 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9488 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9489 symbol defined for msp430i* devices to be lower case.
9491 2018-06-07 Richard Biener <rguenther@suse.de>
9493 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9494 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9495 Properly wrap signed arithmetic if overflow wraps.
9497 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9499 PR tree-optimization/69615
9500 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9501 of a cast from a same precision integral SSA_NAME in a bb dominated
9502 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
9503 cast to utype if rhs2 has already a compatible type.
9505 2018-06-07 Richard Biener <rguenther@suse.de>
9507 PR tree-optimization/85935
9508 * graphite-scop-detection.c (find_params_in_bb): Analyze
9509 condition operands with respect to the correct loop. Assert
9510 the analysis doesn't fail.
9512 2018-06-04 Carl Love <cel@us.ibm.com>
9514 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9515 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
9516 as it is slightly cheaper.
9517 (first_match_or_eos_index_<mode>):
9518 Calculate index using natural element order.
9519 (first_match_index_<mode>):
9520 Calculate index using natural element order.
9521 (first_match_or_eos_index_<mode>):
9522 Calculate index using natural order.
9523 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9524 for BE and LE modes.
9525 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9526 P9V_BUILTIN_VCLZLSBB_V16QI.
9527 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9530 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9532 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9533 indentation and line wrap for many prototypes. Add missing
9534 @smallexample directives around block of prototypes for vec_xl and
9537 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
9539 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9540 track if we pass or return IEEE 128-bit floating point.
9541 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9542 C++ mangling that is compatible with GCC 8.1.
9543 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9544 (init_cumulative_args): Note if we pass or return IEEE 128-bit
9545 floating point types.
9546 (rs6000_function_arg_advance_1): Likewise.
9547 (rs6000_mangle_type): Optionally generate mangled names that match
9548 what GCC 8.1 generated for IEEE 128-bit floating point types.
9549 (rs6000_globalize_decl_name): If we have an external function that
9550 passes or returns IEEE 128-bit types, generate a weak reference
9551 from the mangled name used in GCC 8.1 to the current mangled
9553 (rs6000_init_builtins): Make __ibm128 use the long double type if
9554 long double is IBM extended double. Make __float128 use the long
9555 double type if long double is IEEE 128-bit.
9558 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9559 macro for __ibm128 built-in functions.
9560 (PACK_IF): Add __ibm128 pack/unpack functions.
9561 (UNPACK_IF): Likewise.
9562 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9563 enable long double built-in functions if long double is IEEE
9564 128-bit floating point.
9565 (rs6000_invalid_builtin): Update long double built-in function
9567 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9568 functions, adjust the built-in function to use the long double
9569 built-in function if __ibm128 and long double are the same type.
9570 * doc/extend.texi (PowerPC builtins): Update documention for
9571 __builtin_{,un}pack_longdouble. Add documentation for
9572 __builtin_{,un}pack_ibm128.
9574 2018-06-06 Jim Wilson <jimw@sifive.com>
9576 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9577 (struct machine_function): New field interrupt_mode.
9578 (riscv_handle_type_attribute): New function. Add forward declaration.
9579 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9580 (riscv_expand_epilogue): Check interrupt_mode field.
9581 (riscv_set_current_function): Check interrupt attribute args and
9582 set interrupt_mode field.
9583 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9584 (riscv_sret, riscv_uret): New.
9585 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9586 new arguments to interrupt attribute.
9588 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
9591 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9592 Don't handle -mcpu=power8 if -mpower9-vector is also used.
9594 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9596 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9597 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9598 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9599 several redundant entries.
9601 2018-06-06 David Malcolm <dmalcolm@redhat.com>
9603 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9604 type from "rtx" to "rtx_insn *".
9605 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9606 for local "call_insn", removing cast.
9607 (ix86_expand_call): Likewise, introducing a "call_insn" local.
9609 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
9611 PR tree-optimization/86066
9612 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9613 for BIT_INSERT_EXPR stores.
9615 2018-06-06 Richard Biener <rguenther@suse.de>
9617 PR tree-optimization/86062
9618 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9619 component refs ontop
9620 of to be offsetted base.
9622 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9624 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9625 to be static and remove check on interrupt attribute name.
9627 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
9629 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9630 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9632 2018-06-05 Steve Ellcey <sellcey@cavium.com>
9635 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9637 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9638 Remove second argument, change how error is called.
9639 (aarch64_layout_arg): Remove second argument from
9640 aarch64_err_no_fpadvsimd call.
9641 (aarch64_init_cumulative_args): Ditto.
9642 (aarch64_gimplify_va_arg_expr): Ditto.
9643 * config/aarch64/aarch64.md (mov<mode>): Ditto.
9645 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
9647 * config/i386/i386.md (simple_return_indirect_internal): New expander.
9648 (*simple_return_indirect_internal<mode>): Rename from
9649 simple_return_indirect_internal. Use W mode iterator.
9650 (rstorssp): New expander.
9651 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
9652 (clrssbsy): New expander.
9653 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
9655 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
9657 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9659 (cmse_check_pointed_object): Likewise.
9661 2018-06-05 Martin Liska <mliska@suse.cz>
9663 PR gcov-profile/47618
9664 * doc/invoke.texi: Document how -fprofile-dir format
9667 2018-06-05 Richard Biener <rguenther@suse.de>
9669 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9670 removal pretend DOM info isn't available so we do not update
9671 it and only remove edges, not dominated blocks. Actually free
9672 DOM info in case we removed something. Remove unreachable blocks.
9673 (mfb_keep_latches): Work with either DOM info or marked backedges.
9674 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9675 first. Mark backedges if DOM info isn't available.
9676 (Re-)compute DOM info after cleanup_control_flow_pre.
9678 2018-06-05 Richard Biener <rguenther@suse.de>
9680 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9681 (locus_discrim_hasher::hash): Adjust.
9682 (locus_discrim_hasher::equal): Likewise.
9683 (next_discriminator_for_locus): Work on line directly.
9684 (same_line_p): Pass in expanded locus1 as well.
9685 (assign_discriminators): Avoid redundant location expansions.
9687 2018-06-05 Richard Biener <rguenther@suse.de>
9689 PR tree-optimization/86046
9690 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9691 if required after clearing TREE_ADDRESSABLE.
9693 2018-06-05 Richard Biener <rguenther@suse.de>
9695 PR tree-optimization/86047
9696 * tree-ssa-loop.c (for_each_index): Glob handling of all
9697 decls and constants and really handle all of them.
9699 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9702 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9703 qualifier_void_pointer and qualifier_const_void_pointer.
9704 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9705 (arm_init_builtins): Handle the above.
9706 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9707 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9708 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9711 2018-06-05 Martin Liska <mliska@suse.cz>
9713 * auto-profile.c (read_autofdo_file): Do not use
9714 gcov_ctr_summary struct.
9715 (afdo_callsite_hot_enough_for_early_inline): Likewise.
9716 * coverage.c (struct counts_entry): Likewise.
9717 (read_counts_file): Read just single summary entry.
9718 (get_coverage_counts): Use gcov_summary struct.
9719 * coverage.h (get_coverage_counts): Likewise.
9720 * gcov-dump.c (dump_working_sets): Likewise.
9721 (tag_summary): Dump just single summary.
9722 * gcov-io.c (gcov_write_summary): Write just histogram
9724 (gcov_read_summary): Read just single summary.
9725 (compute_working_sets): Use gcov_summary struct.
9726 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9727 of GCOV_COUNTERS_SUMMABLE.
9728 (GCOV_COUNTERS_SUMMABLE): Remove.
9729 (GCOV_FIRST_VALUE_COUNTER): Replace with
9730 GCOV_COUNTER_V_INTERVAL.
9731 (struct gcov_ctr_summary): Remove.
9732 (struct gcov_summary): Directly use fields of former
9734 (compute_working_sets): Use gcov_summary struct.
9735 * gcov.c (read_count_file): Do not use ctrs fields.
9736 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9738 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9740 * profile.c: Likewise.
9741 * profile.h: Likewise.
9743 2018-06-05 Martin Liska <mliska@suse.cz>
9745 PR gcov-profile/84846
9746 * gcov.c (output_lines): Print working directory only
9747 in intermediate format.
9749 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
9751 * config/s390/s390-builtin-types.def: Add void function type.
9752 * config/s390/s390-builtins.def: Use the function type for the
9755 2018-06-04 Jim Wilson <jimw@sifive.com>
9757 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
9759 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
9760 and maybe_eh_return. Change regno to unsigned int. Use new args to
9761 handle EH_RETURN_DATA_REGNO registers properly.
9762 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
9763 (riscv_expand_epilogue): Update comment. Change argument name and
9764 type. Update code to use new name and type. Pass new args to
9765 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
9767 * config/riscv/riscv.md (NORMAL_RETURN): New.
9768 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
9769 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
9770 (eh_return): Call gen_eh_return_internal and emit barrier.
9771 (eh_return_internal): Call riscv_expand_epilogue.
9773 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
9775 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
9776 bit_insertion field and declare can_be_merged_into method.
9777 (merged_store_group::can_be_merged_into): New method.
9778 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9779 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
9780 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9782 2018-06-04 Richard Biener <rguenther@suse.de>
9784 PR tree-optimization/85955
9785 * builtins.c (fold_builtin_sincos): Convert pointers to
9786 destination to appropriate type before dereferencing.
9788 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
9790 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9792 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
9794 * expr.c (expand_expr_real_1): Force the operand into memory if
9795 its TYPE_MODE is BLKmode and if there is no integer mode for
9796 the number of bits being extracted.
9798 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9802 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9803 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9805 2018-06-04 Richard Biener <rguenther@suse.de>
9807 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9808 (cleanup_tree_cfg_noloop): ... single caller. Do
9809 start_recording_case_labels later.
9811 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
9813 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9814 to _IMMINTRIN_H_INCLUDED.
9815 * config/i386/pconfigintrin.h: Ditto.
9816 * config/i386/waitpkgintrin.h: Ditto.
9817 * config/i386/immintrin.h: Add includes for sgxintrin.h,
9818 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9819 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9820 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9821 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9822 waitpkgintrin.h and cldemoteintrin.h.
9824 2018-06-04 Richard Biener <rguenther@suse.de>
9826 PR tree-optimization/86038
9827 * tracer.c (find_best_successor): Check probability for
9828 being initialized, bail out if not.
9830 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
9833 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9834 of bits to ignore when comparing architectures.
9836 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9838 PR tree-optimization/69615
9839 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
9840 maximum or minimum of the type, try to merge it also as if
9841 range1 is + [-, x - 1] or + [x + 1, -].
9844 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
9846 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
9848 PR tree-optimization/86034
9849 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
9850 the unsigned bitfield type in a bit insertion sequence if it does not
9851 have a larger precision than the bitfield size.
9852 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
9854 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
9856 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
9858 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9860 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
9861 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
9862 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
9863 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
9865 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9867 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
9868 Disable -fdelete-null-pointer-checks for ELF toolchain.
9870 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9871 Kito Cheng <kito.cheng@gmail.com>
9873 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
9874 (nds32le-*-*, nds32be-*-*): Integrate checking process.
9875 (nds32*-*-*): Add glibc and uclibc conditions.
9876 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
9877 (TARGET_EXCEPT_UNWIND_INFO): Define.
9878 * config/nds32/elf.h: New file.
9879 * config/nds32/linux.h: New file.
9880 * config/nds32/nds32-elf.opt: New file.
9881 * config/nds32/nds32-linux.opt: New file.
9882 * config/nds32/nds32-fp-as-gp.c
9883 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
9884 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
9886 (nds32_asm_file_end): Ditto.
9887 (nds32_print_operand): Ditto.
9888 (nds32_insert_attributes): Ditto.
9889 (nds32_init_libfuncs): New function.
9890 (TARGET_HAVE_TLS): Define.
9891 (TARGET_INIT_LIBFUNCS): Define.
9892 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
9894 (TARGET_ELF): Apply different mcmodel setting.
9895 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
9896 been migrated into elf.h and linux.h files.
9897 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
9898 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
9899 (mcmodel): The content has been migrated into nds32-elf.opt and
9900 nds32-linux.opt files.
9901 * config/nds32/t-elf: New file.
9902 * config/nds32/t-linux: New file.
9904 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9905 Shiva Chen <shiva0217@gmail.com>
9907 * config/nds32/constants.md (unspec_volatile_element): Add
9908 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
9909 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
9911 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
9912 (make_pass_nds32_fp_as_gp): Declare.
9913 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
9915 (nds32_asm_function_end_prologue): Remove unused asm output.
9916 (nds32_asm_function_begin_epilogue): Remove unused asm output.
9917 (nds32_asm_file_start): Output necessary fp_as_gp information.
9918 (nds32_option_override): Adjust register usage.
9919 (nds32_expand_prologue): Consider fp_as_gp situation.
9920 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
9921 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
9924 (simple_return): Ditto.
9925 (omit_fp_begin): Output special directive for fp_as_gp.
9926 (omit_fp_end): Output special directive for fp_as_gp.
9927 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9928 mforbid-fp-as-gp): New options.
9930 2018-06-01 Mark Wielaard <mark@klomp.org>
9932 * dwarf2out.c (dwarf2out_finish): Remove generation of
9933 DW_AT_loclists_base.
9935 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
9937 * gimple-ssa-store-merging.c: Include gimple-fold.h.
9938 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
9939 (struct merged_store_group): Add bit_insertion field.
9940 (dump_char_array): Use standard hexadecimal format.
9941 (merged_store_group::merged_store_group): Set bit_insertion to false.
9942 (merged_store_group::apply_stores): Use optimal buffer size. Deal
9943 with BIT_INSERT_EXPR stores. Move up code updating the mask and
9944 also print the mask in the dump file.
9945 (pass_store_merging::gate): Minor tweak.
9946 (imm_store_chain_info::coalesce_immediate): Fix wrong association
9947 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
9948 stores with INTEGER_CST stores.
9949 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
9950 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
9951 and use it throughout. Generate bit insertion sequences if need be.
9952 (pass_store_merging::process_store): Remove redundant condition.
9953 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
9955 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
9957 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
9958 the 128-bit floating point types. Fix function comment.
9960 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9962 * config/aarch64/aarch64-simd.md
9963 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
9965 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
9968 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9970 PR tree-optimization/85989
9971 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
9973 (backprop::intersect_uses): Check it when deciding whether this
9974 is a backedge reference.
9975 (backprop::process_block): Add each phi to m_visited_phis
9976 after visiting it, then clear it at the end.
9978 2018-06-01 Richard Biener <rguenther@suse.de>
9980 * tree-vectorizer.h (vect_dr_stmt): New function.
9981 (vect_get_load_cost): Adjust.
9982 (vect_get_store_cost): Likewise.
9983 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
9984 Use vect_dr_stmt instead of DR_SMTT.
9985 (vect_record_base_alignments): Likewise.
9986 (vect_calculate_target_alignment): Likewise.
9987 (vect_compute_data_ref_alignment): Likewise and make static.
9988 (vect_update_misalignment_for_peel): Likewise.
9989 (vect_verify_datarefs_alignment): Likewise.
9990 (vector_alignment_reachable_p): Likewise.
9991 (vect_get_data_access_cost): Likewise. Pass down
9992 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
9993 (vect_get_peeling_costs_all_drs): Likewise.
9994 (vect_peeling_hash_get_lowest_cost): Likewise.
9995 (vect_enhance_data_refs_alignment): Likewise.
9996 (vect_find_same_alignment_drs): Likewise.
9997 (vect_analyze_data_refs_alignment): Likewise.
9998 (vect_analyze_group_access_1): Likewise.
9999 (vect_analyze_group_access): Likewise.
10000 (vect_analyze_data_ref_access): Likewise.
10001 (vect_analyze_data_ref_accesses): Likewise.
10002 (vect_vfa_segment_size): Likewise.
10003 (vect_small_gap_p): Likewise.
10004 (vectorizable_with_step_bound_p): Likewise.
10005 (vect_prune_runtime_alias_test_list): Likewise.
10006 (vect_analyze_data_refs): Likewise.
10007 (vect_supportable_dr_alignment): Likewise.
10008 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10009 (vect_gen_prolog_loop_niters): Likewise.
10010 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10011 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10013 (vect_recog_mask_conversion_pattern): Likewise.
10014 (vect_try_gather_scatter_pattern): Likewise.
10015 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10016 to vect_get_store_cost.
10017 (vect_get_store_cost): Get stmt_info instead of DR.
10018 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10019 (vect_get_load_cost): Get stmt_info instead of DR.
10021 2018-06-01 Richard Biener <rguenther@suse.de>
10023 PR middle-end/86017
10024 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10025 vars wrapped in MEM_REFs.
10027 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10029 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10030 Fix subreg tests so that we only return a choice between
10031 GENERAL_REGS and FP_REGS if the original classes included both.
10033 2018-06-01 Richard Biener <rguenther@suse.de>
10036 * tree-ssa-structalias.c (get_function_part_constraint):
10037 Handle NULL fi->decl.
10038 (find_func_aliases_for_call): Properly handle indirect
10039 fi from direct call.
10040 (find_func_clobbers): Likewise.
10041 (ipa_pta_execute): Likewise.
10042 (create_variable_info_for): For functions that are ifunc_resolver
10043 resolve to a varinfo that contains the result of the resolver call.
10044 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10047 2018-05-31 Michael Collison <michael.collison@arm.com>
10049 * config/aarch64/aarch64.md:
10050 (*fix_to_zero_extenddfdi2): New pattern.
10051 * gcc.target/aarch64/fix_extend1.c: New testcase.
10053 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10055 PR middle-end/78809
10056 PR middle-end/83026
10057 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10058 and BUILT_IN_STRNCMP_EQ.
10059 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10060 BUILT_IN_STRNCMP_EQ.
10061 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10062 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10063 (gimple_fold_builtin): Likewise.
10064 * tree-ssa-strlen.c (compute_string_length): New function.
10065 (determine_min_obsize): New function.
10066 (handle_builtin_string_cmp): New function to handle calls to
10067 string compare functions.
10068 (strlen_optimize_stmt): Add handling to builtin string compare
10070 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10071 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10072 * tree.c (build_common_builtin_nodes): Add new defines of
10073 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10075 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10078 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10079 functions with naked attribute.
10081 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10083 * config/i386/sse.md (avx_vec_concat<mode>):
10084 Substitute concat_tg_mode mode attribute with xtg_mode.
10085 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10086 (concat_tg_mode): Remove mode attribute.
10088 2018-05-31 Martin Sebor <msebor@redhat.com>
10091 * calls.c (alloc_max_size): Correct a logic error/typo.
10092 Treat excessive arguments as infinite. Warn for invalid arguments.
10093 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10095 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10098 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10099 and movx for Haswell.
10101 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10102 Cesar Philippidis <cesar@codesourcery.com>
10104 PR middle-end/85879
10105 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10106 when emitting error on private/firstprivate reductions.
10107 * omp-low.c (lower_omp_target): Avoid reference-type processing
10108 on pointers for firstprivate clause.
10110 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10112 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10115 * config/aarch64/aarch64-simd.md
10116 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10117 (aarch64_ld1_x3_<mode>): Likewise
10118 (aarch64_st1x2<VALLDIF:mode>): Likewise
10119 (aarch64_st1_x2_<mode>): Likewise
10120 (aarch64_st1x3<VALLDIF:mode>): Likewise
10121 (aarch64_st1_x3_<mode>): Likewise
10122 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10123 (vld1_s8_x3): Likewise.
10124 (vld1_u16_x3): Likewise.
10125 (vld1_s16_x3): Likewise.
10126 (vld1_u32_x3): Likewise.
10127 (vld1_s32_x3): Likewise.
10128 (vld1_u64_x3): Likewise.
10129 (vld1_s64_x3): Likewise.
10130 (vld1_f16_x3): Likewise.
10131 (vld1_f32_x3): Likewise.
10132 (vld1_f64_x3): Likewise.
10133 (vld1_p8_x3): Likewise.
10134 (vld1_p16_x3): Likewise.
10135 (vld1_p64_x3): Likewise.
10136 (vld1q_u8_x3): Likewise.
10137 (vld1q_s8_x3): Likewise.
10138 (vld1q_u16_x3): Likewise.
10139 (vld1q_s16_x3): Likewise.
10140 (vld1q_u32_x3): Likewise.
10141 (vld1q_s32_x3): Likewise.
10142 (vld1q_u64_x3): Likewise.
10143 (vld1q_s64_x3): Likewise.
10144 (vld1q_f16_x3): Likewise.
10145 (vld1q_f32_x3): Likewise.
10146 (vld1q_f64_x3): Likewise.
10147 (vld1q_p8_x3): Likewise.
10148 (vld1q_p16_x3): Likewise.
10149 (vld1q_p64_x3): Likewise.
10150 (vst1_s64_x2): Likewise.
10151 (vst1_u64_x2): Likewise.
10152 (vst1_f64_x2): Likewise.
10153 (vst1_s8_x2): Likewise.
10154 (vst1_p8_x2): Likewise.
10155 (vst1_s16_x2): Likewise.
10156 (vst1_p16_x2): Likewise.
10157 (vst1_s32_x2): Likewise.
10158 (vst1_u8_x2): Likewise.
10159 (vst1_u16_x2): Likewise.
10160 (vst1_u32_x2): Likewise.
10161 (vst1_f16_x2): Likewise.
10162 (vst1_f32_x2): Likewise.
10163 (vst1_p64_x2): Likewise.
10164 (vst1q_s8_x2): Likewise.
10165 (vst1q_p8_x2): Likewise.
10166 (vst1q_s16_x2): Likewise.
10167 (vst1q_p16_x2): Likewise.
10168 (vst1q_s32_x2): Likewise.
10169 (vst1q_s64_x2): Likewise.
10170 (vst1q_u8_x2): Likewise.
10171 (vst1q_u16_x2): Likewise.
10172 (vst1q_u32_x2): Likewise.
10173 (vst1q_u64_x2): Likewise.
10174 (vst1q_f16_x2): Likewise.
10175 (vst1q_f32_x2): Likewise.
10176 (vst1q_f64_x2): Likewise.
10177 (vst1q_p64_x2): Likewise.
10178 (vst1_s64_x3): Likewise.
10179 (vst1_u64_x3): Likewise.
10180 (vst1_f64_x3): Likewise.
10181 (vst1_s8_x3): Likewise.
10182 (vst1_p8_x3): Likewise.
10183 (vst1_s16_x3): Likewise.
10184 (vst1_p16_x3): Likewise.
10185 (vst1_s32_x3): Likewise.
10186 (vst1_u8_x3): Likewise.
10187 (vst1_u16_x3): Likewise.
10188 (vst1_u32_x3): Likewise.
10189 (vst1_f16_x3): Likewise.
10190 (vst1_f32_x3): Likewise.
10191 (vst1_p64_x3): Likewise.
10192 (vst1q_s8_x3): Likewise.
10193 (vst1q_p8_x3): Likewise.
10194 (vst1q_s16_x3): Likewise.
10195 (vst1q_p16_x3): Likewise.
10196 (vst1q_s32_x3): Likewise.
10197 (vst1q_s64_x3): Likewise.
10198 (vst1q_u8_x3): Likewise.
10199 (vst1q_u16_x3): Likewise.
10200 (vst1q_u32_x3): Likewise.
10201 (vst1q_u64_x3): Likewise.
10202 (vst1q_f16_x3): Likewise.
10203 (vst1q_f32_x3): Likewise.
10204 (vst1q_f64_x3): Likewise.
10205 (vst1q_p64_x3): Likewise.
10207 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10209 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10210 user_label_prefix to name.
10212 * tree-core.h: Update comment about the format of NAME string
10213 passed to handler in attribute_spec.
10215 * config/msp430/msp430.md: Remove erroneous subreg expression from
10216 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10217 zero_extend{q,h}isi2.
10219 2018-05-30 Borislav Petkov <bp@suse.de>
10221 * doc/extend.texi: Document some architecture specific
10222 constraints and sort entries.
10224 2018-05-30 Martin Sebor <msebor@redhat.com>
10226 PR middle-end/85369
10227 * builtins.c (expand_builtin_stpcpy_1): New function.
10228 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10229 only if the former succeeds.
10231 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10233 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10236 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10238 * doc/invoke.texi (-flinker-output): Document
10240 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10242 * passes.c (ipa_write_summaries): Only modify statements if body
10244 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10245 incrementally linking.
10246 (ipa_passes): Likewise.
10247 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10248 pass down resolution info.
10249 * common.opt (flag_incremental_link): Update info.
10250 * gcc.c (plugin specs): Turn flinker-output=* to
10251 -plugin-opt=-linker-output-known
10252 * toplev.c (compile_file): Also cut compilation when doing incremental
10254 * flag-types. (enum lto_partition_model): Add
10255 LTO_LINKER_OUTPUT_NOLTOREL.
10256 (invoke.texi): Add -flinker-output docs.
10257 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10258 link same way as WPA; do not stream in dead initializers.
10260 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10261 darf2out_register_external_decl): Support incremental link.
10263 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10265 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10267 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10269 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10270 it down to simple_object_copy_lto_debug_sections.
10271 (run_gcc): Determine incremental LTO link time and configure
10272 lto1 into non-wpa mode, disable renaming of debug sections.
10274 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10276 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10277 descriptions of various incorrectly documented functions.
10279 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10282 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10283 address check not strict.
10285 2018-05-30 Richard Biener <rguenther@suse.de>
10287 PR tree-optimization/85964
10288 * tracer.c (better_p): Drop initialized count check, we only
10289 call the function with initialized counts now.
10290 (find_best_successor): Do find a best edge if one
10291 has uninitialized count.
10292 (find_best_predecessor): Likewise. Do BB frequency check only
10293 if count is initialized.
10295 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10297 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10298 (aarch64_ldrstr_offset_compare): New.
10299 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10300 load/store orderings.
10301 (aarch64_gen_adjusted_ldpstp): Likewise.
10303 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
10305 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10306 Check for subset of GENERAL_REGS and FP_REGS.
10307 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10310 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
10312 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10313 and wi::to_poly_offset. Add the current offset and then check
10314 whether the sum fits, rather than using an unchecked addition of
10315 a checked term. Check for a shwi rather than a uhwi.
10316 * expr.c (get_bit_range): Use tree_to_poly_uint64.
10317 (store_constructor): Use poly_int_tree_p.
10318 (expand_expr_real_1): Likewise.
10319 * function.c (assign_temp): Likewise.
10320 * fold-const.c (const_binop): Use poly_int_tree_p and
10321 wi::to_poly_offset.
10322 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
10324 * ipa-icf-gimple.c (func_checker::compare_operand): Use
10325 to_poly_offset for MEM offsets.
10326 * ipa-icf.c (sem_variable::equals): Likewise.
10327 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10328 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10329 wi::to_poly_offset for BIT_FIELD_REF offsets.
10330 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10331 wi::to_poly_offset.
10332 * var-tracking.c (emit_note_insn_var_location): Use
10333 tree_to_poly_uint64.
10335 2018-05-29 Jim Wilson <jimw@sifive.com>
10337 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10339 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
10342 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10343 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10345 (sse4_1_round<mode>2): Use nonimmediate_operand
10346 for operand 1 predicate.
10348 2018-05-29 Martin Sebor <msebor@redhat.com>
10349 Richard Biener <rguenther@suse.de>
10352 * calls.c (get_size_range): Call determine_value_range instead
10353 of get_value_range..
10354 * tree-vrp.h (determine_value_range): Declared new function.
10355 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10357 2018-05-29 Richard Biener <rguenther@suse.de>
10359 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10360 sure to use non-pattern stmts for get_earlier_stmt arguments.
10361 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10362 called on pattern stmts.
10363 (get_later_stmt): Likewise.
10365 2018-05-29 Martin Liska <mliska@suse.cz>
10367 PR gcov-profile/85759
10368 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10371 2018-05-29 Jakub Jelinek <jakub@redhat.com>
10373 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10375 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10379 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10380 VEC_PACK_FLOAT_EXPR): New tree codes.
10381 * tree-pretty-print.c (op_code_prio): Handle
10382 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10383 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10384 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10385 * tree-inline.c (estimate_operator_cost): Likewise.
10386 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10387 * fold-const.c (const_binop): Likewise.
10388 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10389 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10390 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10391 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10392 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10393 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10394 * expr.c (expand_expr_real_2): Likewise.
10395 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10396 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10397 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10399 * optabs.c (expand_widen_pattern_expr): For
10400 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10401 sign from result type rather than operand's type.
10402 (expand_binop_directly): For vec_packu_float_optab and
10403 vec_packs_float_optab allow result type to be different from operand's
10405 * optabs-tree.c (optab_for_tree_code): Handle
10406 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10407 VEC_PACK_FLOAT_EXPR. Formatting fixes.
10408 * tree-vect-generic.c (expand_vector_operations_1): Handle
10409 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10410 VEC_PACK_FLOAT_EXPR.
10411 * tree-vect-stmts.c (supportable_widening_operation): Handle
10413 (supportable_narrowing_operation): Handle FLOAT_EXPR.
10414 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10415 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10416 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
10417 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10419 (vec_pack<floatprefix>_float_<mode>): New expander.
10420 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10422 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10423 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10424 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10425 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10426 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10428 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10429 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10430 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10431 VEC_PACK_FLOAT_EXPR): Document.
10433 2018-05-29 Richard Biener <rguenther@suse.de>
10435 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10437 (stmt_vec_info_vec): Make pointer.
10438 (init_stmt_vec_info_vec): Remove.
10439 (free_stmt_vec_info_vec): Likewise.
10440 (set_stmt_vec_info_vec): New function.
10441 (free_stmt_vec_infos): Likewise.
10442 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10443 (set_vinfo_for_stmt): Likewise.
10444 (get_earlier_stmt): Likewise.
10445 (get_later_stmt): Likewise.
10446 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10447 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10448 (vec_info::~vec_info): Free stmt_vec_infos.
10449 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10450 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10451 (pass_slp_vectorize::execute): Likewise.
10452 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10453 (free_stmt_vec_info_vec): Likewise.
10454 (set_stmt_vec_info_vec): New function.
10455 (free_stmt_vec_infos): Likewise.
10456 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10457 the global stmt_vec_info_vec.
10458 * tree-parloops.c (gather_scalar_reductions): Use
10459 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10462 2018-05-29 Richard Biener <rguenther@suse.de>
10464 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10466 2018-05-29 Martin Liska <mliska@suse.cz>
10467 David Malcolm <dmalcolm@redhat.com>
10469 * vec.c (test_reverse): New.
10470 (vec_c_tests): Add new test.
10471 * vec.h (vl_ptr>::reverse): New function.
10473 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
10475 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10477 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10480 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
10482 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10484 2018-05-28 Richard Biener <rguenther@suse.de>
10486 PR tree-optimization/85933
10487 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10488 look at stmts marked as vectorizable.
10490 2018-05-28 Richard Biener <rguenther@suse.de>
10492 PR tree-optimization/85934
10493 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10494 vector boolean check before scalar optimization.
10496 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10498 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10501 2018-05-28 Mark Wielaard <mark@klomp.org>
10503 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10504 if it is an expression containing a minus sign.
10506 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
10508 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10510 2018-05-27 Paul Koning <ni1d@arrl.net>
10512 * config/pdp11/pdp11.md (truncsihi2): Remove.
10514 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
10515 Chung-Ju Wu <jasonwucj@gmail.com>
10517 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10519 (unaligned_store_dw): Ditto.
10520 * config/nds32/nds32-memory-manipulation.c
10521 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10522 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10523 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10524 (emit_setmem_word_loop): Rename to ...
10525 (emit_setmem_doubleword_loop): ... this.
10526 (nds32_gen_dup_4_byte_to_word_value): New function.
10527 (nds32_gen_dup_8_byte_to_double_word_value): New function.
10528 (nds32_expand_setmem_loop): Refine implementation.
10529 (nds32_expand_setmem_loop_v3m): Ditto.
10530 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10533 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10535 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10537 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10539 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10540 (nds32_init_machine_status): Initialize machine->attr_naked_p and
10541 machine->attr_no_prologue_p.
10542 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10543 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10544 (nds32_expand_epilogue): Consider attr_naked_p.
10545 (nds32_expand_epilogue_v3pop): Likewise.
10546 (nds32_can_use_return_insn): Likewise.
10547 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10548 attr_no_prologue_p fields.
10549 * config/nds32/nds32.opt (mret-in-naked-func): New option.
10551 2018-05-27 Jakub Jelinek <jakub@redhat.com>
10554 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10556 * config/i386/sse.md
10557 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10559 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10561 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10563 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10565 (*<floatsuffix>floatv2div2sf2): Rename to ...
10566 (*float<floatunssuffix>v2div2sf2): ... this.
10567 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10568 (float<floatunssuffix>v2div2sf2_mask): ... this.
10569 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10570 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10571 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10573 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10575 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10577 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10579 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10581 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10583 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10584 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10585 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10586 gen_ufix_truncv8dfv8si2.
10587 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10588 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10589 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10590 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10591 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10592 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10593 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10594 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10596 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10600 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10602 2018-05-25 Jim Wilson <jimw@sifive.com>
10604 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10605 * config/riscv/riscv.c (struct machine_function): Add
10606 interrupt_handler_p and attribute_checked_p fields.
10607 (riscv_attribute_table): Add interrupt.
10608 (riscv_interrupt_type_p): New.
10609 (riscv_save_reg_p): Save extra regs for interrupt handler.
10610 (riscv_use_save_libcall): Return false for interrupt handler.
10611 (riscv_first_stack_step): Add forward declaration.
10612 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
10613 for interrupt handler with large frame. Use it for saved reg list.
10614 (riscv_expand_prologue): Move flag_stack_usage_info support to
10615 eliminate duplication.
10616 (riscv_expand_epilogue): Generate mret for interrupt handler.
10617 (riscv_epilogue_uses): New.
10618 (riscv_can_use_return_insn): Return false for interrupt handler.
10619 (riscv_function_ok_for_sibcall): Likewise.
10620 (riscv_set_current_function): Add interrupt handler support.
10621 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10622 * config/riscv/riscv.md (UNSPECV_MRET): New.
10624 (riscv_frflags, riscv_fsflags): Use tab after opcode.
10626 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10628 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
10630 PR tree-optimization/85712
10631 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10632 this candidate has already been replaced in-situ by a copy.
10634 2018-05-25 Jason Merrill <jason@redhat.com>
10636 PR c++/80485 - inline function non-zero address.
10637 * symtab.c (nonzero_address): Check DECL_COMDAT.
10639 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
10642 * config/alpha/alpha.md (ashlsi3): New insn pattern.
10643 (*ashlsi_se): Rename from *ashldi_se. Define as sign
10644 extension of SImode operation. Use const123_operand predicate.
10645 (*saddsi_1): Remove.
10646 (*saddl_se_1): Ditto.
10647 (*ssubsi_1): Ditto.
10648 (*ssubl_se_1): Ditto.
10649 * config/alpha/predicates.md (const123_operand): New predicate.
10650 * config/alpha/constraints.md (P): Use IN_RANGE.
10652 2018-05-25 Richard Biener <rguenther@suse.de>
10654 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10656 (ref_maybe_used_by_stmt_p): Likewise.
10657 (stmt_may_clobber_ref_p): Likewise.
10658 (stmt_may_clobber_ref_p_1): Likewise.
10659 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10661 (ref_maybe_used_by_stmt_p): Likewise.
10662 (stmt_may_clobber_ref_p): Likewise.
10663 (stmt_may_clobber_ref_p_1): Likewise.
10664 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10665 the alias oracle to disambiguate DRs with stmts DR analysis
10667 (vect_analyze_data_refs): Do not give up on not analyzable
10668 DRs for BB vectorization. Remove code truncating the dataref
10671 2018-05-25 Jakub Jelinek <jakub@redhat.com>
10674 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10675 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
10676 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10678 2018-05-25 Richard Biener <rguenther@suse.de>
10680 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10681 function, combining stmt data ref gathering and fatal analysis
10683 (vect_analyze_data_refs): Remove now redudnant code and simplify.
10684 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10685 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10686 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10687 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10689 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10691 PR tree-optimization/85720
10692 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10693 SCC if all partitions are builtins.
10694 (version_loop_by_alias_check): New parameter. Generate cancelable
10695 runtime alias check if all partitions are builtins.
10696 (distribute_loop): Update call to above function.
10698 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10700 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10701 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10702 (parm_default_def_partition_arg): Ditto.
10703 (set_parm_default_def_partition): Ditto.
10704 (get_parm_default_def_partitions): Ditto and make it static.
10705 (get_undefined_value_partitions): Ditto and make it static.
10706 (remove_ssa_form): Refactor call to init_var_map here.
10707 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10708 computation for loop region.
10709 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10710 (register_default_def): Delete.
10711 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10712 (parm_default_def_partition_arg): Ditto.
10713 (set_parm_default_def_partition): Ditto.
10714 (get_parm_default_def_partitions): Ditto and make it static.
10715 (get_undefined_value_partitions): Ditto and make it static.
10716 (coalesce_with_default, coalesce_with_default): Update comment.
10717 (create_coalesce_list_for_region): New func factored out from
10718 create_outofssa_var_map.
10719 (populate_coalesce_list_for_outofssa): New func factored out from
10720 create_outofssa_var_map and coalesce_ssa_name.
10721 (create_outofssa_var_map): Delete.
10722 (coalesce_ssa_name): Refactor to support live range computation.
10723 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10724 (get_parm_default_def_partitions): Delete.
10725 (get_undefined_value_partitions): Ditto.
10726 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10727 computation for loop region.
10728 (new_tree_live_info, loe_visit_block): Ditto.
10729 (live_worklist, set_var_live_on_entry): Ditto.
10730 (calculate_live_on_exit, verify_live_on_entry): Ditto.
10731 * tree-ssa-live.h (struct _var_map): New fields.
10732 (init_var_map): Change decl.
10733 (region_contains_p): New.
10735 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10737 * tree-ssa-live.h (live_merge_and_clear): Delete.
10739 2018-05-25 Richard Biener <rguenther@suse.de>
10742 * tree-dump.c (dequeue_and_dump): Remove access to removed
10743 operand 2 of a SWITCH_EXPR.
10745 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10747 * doc/sourcebuild.texi (vect_double_cond_arith): Include
10748 multiplication and division.
10749 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
10750 (cond_udiv@var{m}, cond_umod@var{m}): Document.
10751 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
10752 (cond_udiv_optab, cond_umod_optab): New optabs.
10753 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10754 (IFN_COND_RDIV): New internal functions.
10755 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
10756 TRUNC_MOD_EXPR and RDIV_EXPR.
10757 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
10758 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
10760 (SVE_INT_BINARY): Include mult.
10761 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
10762 (optab, sve_int_op): Handle mult.
10763 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
10765 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
10766 for SVE_INT_BINARY_SD.
10768 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10770 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
10771 (optab, sve_int_op): Handle div and udiv.
10772 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
10773 for SVE_INT_BINARY_SD.
10774 (*<optab><mode>3): New insn for the same.
10776 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10778 * tree-vect-patterns.c: Include predict.h.
10779 (vect_recog_divmod_pattern): Restrict check for division support
10780 to when optimizing for size.
10782 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10784 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10785 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10786 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10787 (gimple_match_op::set_op): Likewise.
10788 (gimple_resimplify4): Declare.
10789 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10790 (expr::gen_transform): Likewise.
10791 (decision_tree::gen): Generate a simplification routine for 4 operands.
10792 * gimple-match-head.c (gimple_simplify): Add an overload for
10793 4 operands. In the top-level function, handle up to 4 call
10794 arguments and call gimple_resimplify4.
10795 (gimple_resimplify4): New function.
10796 (build_call_internal): Pass a fourth operand.
10797 (maybe_push_to_seq): Likewise.
10798 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10799 Fold VEC_COND_EXPRs of an operation and a default value into
10800 an IFN_COND_* function if possible.
10801 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10803 (SVE_COND_FP_BINARY): Include them.
10804 (optab, sve_fp_op): Handle them.
10805 (SVE_INT_BINARY_REV): New code iterator.
10806 (SVE_COND_FP_BINARY_REV): New int iterator.
10807 (commutative): New int attribute.
10808 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10810 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10812 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10813 (*cond_<optab><mode>): New patterns for reversed operands.
10815 2018-05-25 Richard Biener <rguenther@suse.de>
10817 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10818 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10819 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10820 (STMT_VINFO_GROUPED_ACCESS): Adjust.
10821 * tree-vect-data-refs.c (everywhere): Adjust users.
10822 * tree-vect-loop.c (everywhere): Likewise.
10823 * tree-vect-slp.c (everywhere): Likewise.
10824 * tree-vect-stmts.c (everywhere): Likewise.
10825 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10827 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10829 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10831 (gcc_cv_as_section_exclude): ... this.
10832 Try Solaris as #exclude syntax.
10833 * configure: Regenerate.
10834 * config.in: Regenerate.
10835 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10837 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
10838 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
10840 * varasm.c (default_elf_asm_named_section): Don't check if
10841 HAVE_GAS_SECTION_EXCLUDE is defined.
10843 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10845 * doc/md.texi: Update the documentation of the cond_* optabs
10846 to mention the new final operand. Fix GET_MODE_NUNITS call.
10847 Describe the scalar case too.
10848 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
10849 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
10851 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
10852 (get_conditional_internal_fn): Update comment.
10853 * tree-vect-loop.c (vectorizable_reduction): Pass the original
10854 accumulator value as a final argument to conditional functions.
10855 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
10856 a define_expand and add an "else" operand. Assert for now that
10857 the else operand is equal to operand 2. Use SVE_INT_BINARY and
10858 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
10859 (*cond_<optab><mode>): New patterns.
10860 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
10861 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10862 (UNSPEC_COND_EOR): Delete.
10863 (optab): Remove associated mappings.
10864 (SVE_INT_BINARY): New code iterator.
10865 (sve_int_op): Remove int attribute and add "minus" to the code
10867 (SVE_COND_INT_OP): Delete.
10868 (SVE_COND_FP_OP): Rename to...
10869 (SVE_COND_FP_BINARY): ...this.
10871 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10873 * optabs.c (can_reuse_operands_p): New function.
10874 (maybe_legitimize_operands): Try to reuse the results for
10877 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10879 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
10880 Add {q} suffix to insn mnemonic.
10882 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10884 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
10885 (msp430_warn_func_return): New.
10887 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
10889 * fold-const.c (tree_nonzero_bits): New function.
10890 * fold-const.h (tree_nonzero_bits): Likewise.
10891 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
10892 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
10894 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10898 * varasm.c (assemble_alias): Check ifunc_resolver only on
10901 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10904 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
10905 when memory input operand is handled.
10907 2018-05-24 Luis Machado <luis.machado@linaro.org>
10909 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
10911 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
10913 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10915 * match.pd: Delay FMA folds until after vectorization.
10917 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
10920 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10921 address check not strict.
10923 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10925 * gimple-match.h (gimple_match_op): New class.
10926 (mprts_hook): Replace parameters with a gimple_match_op *.
10927 (maybe_build_generic_op): Likewise.
10928 (gimple_simplified_result_is_gimple_val): Replace parameters with
10929 a const gimple_match_op *.
10930 (gimple_simplify): Replace code_helper * and tree * parameters with
10931 a gimple_match_op * parameter.
10932 (gimple_resimplify1): Replace code_helper *, tree and tree *
10933 parameters with a gimple_match_op * parameter.
10934 (gimple_resimplify2): Likewise.
10935 (gimple_resimplify3): Likewise.
10936 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
10937 parameters with a gimple_match_op * parameter.
10938 * gimple-match-head.c (gimple_simplify): Change prototypes of
10939 auto-generated functions to take a gimple_match_op * instead of
10940 separate code_helper * and tree * parameters. Make the same
10941 change in the top-level overload and update calls to the
10942 gimple_resimplify routines. Update calls to the auto-generated
10943 functions and to maybe_push_res_to_seq in the publicly-facing
10944 operation-specific gimple_simplify overloads.
10945 (gimple_match_op::MAX_NUM_OPS): Define.
10946 (gimple_resimplify1): Replace rcode and ops with a single res_op
10947 parameter. Update call to gimple_simplify.
10948 (gimple_resimplify2): Likewise.
10949 (gimple_resimplify3): Likewise.
10950 (mprts_hook): Replace parameters with a gimple_match_op *.
10951 (maybe_build_generic_op): Likewise.
10952 (build_call_internal): Replace type, nargs and ops with
10953 a gimple_match_op *.
10954 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
10955 with a single gimple_match_op *. Update calls to mprts_hook,
10956 build_call_internal and gimple_simplified_result_is_gimple_val.
10957 Factor out code that is common to the tree_code and combined_fn cases.
10958 * genmatch.c (expr::gen_transform): Replace tem_code and
10959 tem_ops with a gimple_match_op called tem_op. Update calls
10960 to the gimple_resimplify functions and maybe_push_res_to_seq.
10961 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
10962 res_ops. Update call to the gimple_resimplify functions.
10963 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
10964 (decision_tree::gen): Make the functions take a gimple_match_op *
10965 called res_op instead of separate res_code and res_ops parameters.
10966 Update call accordingly.
10967 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
10968 and ops with a single res_op parameter. Update calls to
10969 maybe_build_generic_op and maybe_push_res_to_seq.
10970 (fold_stmt_1): Update calls to gimple_simplify and
10971 replace_stmt_with_simplification.
10972 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
10973 and gimple_simplified_result_is_gimple_val.
10974 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
10976 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
10977 with a gimple_match_op *.
10978 (vn_nary_build_or_lookup): Likewise. Update call to
10979 vn_nary_build_or_lookup_1.
10980 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
10981 gimple_match_op *. Update calls to the gimple_resimplify routines
10982 and to gimple_simplified_result_is_gimple_val.
10983 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
10984 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
10985 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
10986 (visit_nary_op): Likewise.
10987 (visit_reference_op_load): Likewise.
10989 2018-05-23 Luis Machado <luis.machado@linaro.org>
10991 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
10992 modifier for printing the step amount.
10994 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
10997 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11000 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11002 * doc/sourcebuild.texi (Endianness): New subsubsection.
11004 2018-05-23 Luis Machado <luis.machado@linaro.org>
11006 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11007 <prefetch_dynamic_strides>: New const bool field.
11008 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11009 prefetch_dynamic_strides.
11010 (exynosm1_prefetch_tune): Likewise.
11011 (thunderxt88_prefetch_tune): Likewise.
11012 (thunderx_prefetch_tune): Likewise.
11013 (thunderx2t99_prefetch_tune): Likewise.
11014 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11016 (aarch64_override_options_internal): Update to set
11017 PARAM_PREFETCH_DYNAMIC_STRIDES.
11018 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11019 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11020 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11021 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11022 prefetch-dynamic-strides setting.
11024 2018-05-23 Luis Machado <luis.machado@linaro.org>
11026 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11027 <minimum_stride>: New const int field.
11028 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11029 minimum_stride field defaulting to -1.
11030 (exynosm1_prefetch_tune): Likewise.
11031 (thunderxt88_prefetch_tune): Likewise.
11032 (thunderx_prefetch_tune): Likewise.
11033 (thunderx2t99_prefetch_tune): Likewise.
11034 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11035 <default_opt_level>: Set to 3.
11036 (aarch64_override_options_internal): Update to set
11037 PARAM_PREFETCH_MINIMUM_STRIDE.
11038 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11039 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11040 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11041 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11042 stride is constant and is below the minimum stride threshold.
11044 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11046 * config/arm/arm-cpus.in (mode26): Delete.
11047 (armv4): Delete mode26 reference.
11048 * config/arm/arm.c (arm_configure_build_target): Delete use of
11051 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11053 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11055 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11056 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11058 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11059 (floatunsdidf2): Ditto.
11061 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11063 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11064 (fixuns_trunc<mode>si2_avx512f): Ditto.
11065 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11066 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11067 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11069 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11071 PR rtl-optimization/79985
11072 * df-scan.c (df_insn_refs_collect): Remove special case for
11073 global registers and asm statements.
11075 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11077 * extend.texi (Global Register Variables): Rewrite the bullet list.
11078 Note that the register is available for allocation. Note that access
11079 via inline asm must use constraints. Add note about async-signal
11080 handlers. Remove paragraph about automagic register selection.
11082 2018-05-23 Richard Biener <rguenther@suse.de>
11084 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11085 of fixed offset from memset VN.
11087 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11089 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11090 first_interp field.
11091 (alloc_cand_and_find_basis): Initialize first_interp field.
11092 (slsr_process_mul): Modify first_interp field.
11093 (slsr_process_add): Likewise.
11094 (slsr_process_cast): Modify first_interp field for each new
11096 (slsr_process_copy): Likewise.
11097 (dump_candidate): Dump first_interp field.
11098 (replace_mult_candidate): Process all interpretations, not just
11100 (replace_rhs_if_not_dup): Likewise.
11101 (replace_one_candidate): Likewise.
11103 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11105 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11107 (aarch64_needs_frame_chain): New function.
11108 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11110 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11113 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11114 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11115 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11116 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11117 as true for strict-align.
11118 (aarch64_can_inline_p): Perform checks even when callee has no
11119 attributes to check for strict alignment.
11120 * doc/extend.texi (AArch64 Function Attributes): Document
11122 * doc/invoke.texi: (AArch64 Options): Likewise.
11124 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11126 PR tree-optimization/85853
11127 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11128 the handling of the root of the node to...
11129 (vect_slp_analyze_node_operations_1): ...this new function,
11130 and run the whole thing with the child nodes' def types
11131 set according to their SLP node's def type.
11133 2018-05-23 Richard Biener <rguenther@suse.de>
11135 PR middle-end/85874
11136 * tree-data-ref.c (create_runtime_alias_checks): Defer
11137 and ignore overflow warnings.
11139 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11141 PR tree-optimization/85822
11142 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11145 2018-05-23 Richard Biener <rguenther@suse.de>
11147 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11148 memset constants via native_interpret_expr.
11150 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11153 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11155 (cgraph_node::create_alias): Likewise.
11156 (cgraph_node::get_availability): Check ifunc_resolver instead
11157 of looking up ifunc attribute.
11158 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11159 * varasm.c (do_assemble_alias): Likewise.
11160 (assemble_alias): Likewise.
11161 (default_binds_local_p_3): Likewise.
11162 * cgraph.h (cgraph_node): Add ifunc_resolver.
11163 (cgraph_node::only_called_directly_or_aliased_p): Return false
11164 for IFUNC resolver.
11165 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11167 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11168 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11169 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11170 instead of looking up ifunc attribute.
11172 2018-05-22 Luis Machado <luis.machado@linaro.org>
11174 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11176 2018-05-22 Martin Sebor <msebor@redhat.com>
11178 PR middle-end/85359
11179 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11180 only when expasion succeeds.
11181 (expand_builtin_strcmp): Same.
11182 (expand_builtin_strncmp): Same.
11184 2018-05-22 Martin Sebor <msebor@redhat.com>
11186 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11188 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11189 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11191 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11192 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11194 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11195 Add check for legitimate_address.
11196 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11197 (aarch64_swap_ldrstr_operands): New.
11198 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11201 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11202 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11204 * config/aarch64/aarch64.md: New patterns to generate stp
11206 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11207 single words and double words.
11208 (load_pair_sw, load_pair_dw): Likewise.
11209 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11211 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11213 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11214 for different mode ldpstp and add peephole for merged zero stores.
11215 Likewise for loads.
11216 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11218 (aarch64_gen_store_pair): Rename calls to match new patterns.
11219 (aarch64_gen_load_pair): Rename calls to match new patterns.
11220 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11221 (load_pair<DREG:mode><DREG2:mode>): ... This.
11222 (store_pair<mode>): Rename to...
11223 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11224 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11225 New mode iterators.
11226 (V_INT_EQUIV): Handle SImode.
11227 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11230 2018-05-22 Martin Sebor <msebor@redhat.com>
11233 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11234 or ajust the presumed bound on an operation to avoid unnecessary
11237 2018-05-22 Martin Sebor <msebor@redhat.com>
11239 PR tree-optimization/85826
11240 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11241 assuming that a DECL necesarily has a constant size.
11243 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11245 PR middle-end/85862
11246 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11248 2018-05-22 Richard Biener <rguenther@suse.de>
11250 PR tree-optimization/85834
11251 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11252 non-constant and non-zero memset arguments.
11254 2018-05-22 Martin Liska <mliska@suse.cz>
11257 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11259 2018-05-22 Richard Biener <rguenther@suse.de>
11261 PR tree-optimization/85863
11262 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11263 comparisons when vectype is specified.
11264 (vectorizable_condition): Do not specify vectype for
11265 vect_is_simple_cond when SLP vectorizing.
11267 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11270 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11271 define __ibm128 as long double.
11272 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11273 as a distinct type when IEEE 128-bit support is enabled.
11274 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11275 128-bit types to use the correct functions.
11276 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11277 convert between 128-bit floating point types that have different
11278 modes but the same representation, instead of using gen_lowpart to
11280 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11282 (IFKF_reg): New attributes to give the register constraints for
11284 (extend<mode>tf2_internal): New insns to mark an explicit
11285 conversion between 128-bit floating point types that have a
11286 different mode but share the same representation.
11288 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11290 PR tree-optimization/85814
11291 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11292 a null return from get_strinfo when unsharing the next
11293 strinfo in the chain.
11295 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11298 * varasm.c (weak_finish): Clean up weak_decls.
11300 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11302 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11303 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11304 UNSPEC_UADALP values.
11305 * config/aarch64/iterators.md (ABAL): New int iterator.
11308 (sur): Add mappings for the above.
11309 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11311 (aarch64_<sur>abal<mode>_4): Likewise.
11312 (aarch64_<sur>adalp<mode>_3): Likewise.
11313 (<sur>sadv16qi): New define_expand.
11315 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
11317 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11318 (*movdf_internal): Ditto.
11319 (*rcpsf2_sse): Ditto.
11320 (*rsqrtsf2_sse): Ditto.
11321 (*sqrt<mode>2_sse): Ditto.
11323 2018-05-21 Tamar Christina <tamar.christina@arm.com>
11325 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11327 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11328 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11329 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11330 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11332 * config/aarch64/arm_neon.h: Likewise.
11333 * config/aarch64/iterators.md (VQ_I): New.
11335 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
11337 * config.gcc: Add arc/t-multilib-linux to tmake_file for
11339 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11342 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11344 * config/nds32/constraints.md (S): New constraint.
11345 * config/nds32/nds32.md (call_internal): Use constraint S.
11346 (call_value_internal): Likewise.
11347 (sibcall_internal): Likewise.
11348 (sibcall_value_internal): Likewise.
11350 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11351 Chung-Ju Wu <jasonwucj@gmail.com>
11353 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11354 into consideration.
11356 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11357 Chung-Ju Wu <jasonwucj@gmail.com>
11359 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11360 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11361 (nds32_rtx_costs_impl): Simplify.
11362 (nds32_address_cost_impl): Simplify.
11363 (nds32_init_rtx_costs): New function.
11364 (nds32_rtx_costs_speed_prefer): Likewise.
11365 (nds32_rtx_costs_size_prefer): Likewise.
11366 (nds32_address_cost_speed_prefer): Likewise.
11367 (nds32_address_cost_speed_fwprop): Likewise.
11368 (nds32_address_cost_size_prefer): Likewise.
11369 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11370 * config/nds32/nds32.c (nds32_option_override): Use
11371 nds32_init_rtx_costs function.
11373 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11375 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11376 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11377 (TARGET_PIPELINE_N8): Likewise.
11378 (TARGET_PIPELINE_N10): Likewise.
11379 (TARGET_PIPELINE_N13): Likewise.
11380 (TARGET_PIPELINE_GRAYWOLF): Likewise.
11382 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
11384 * config/nds32/nds32-fpu.md: Update copyright year.
11386 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11388 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11390 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11392 * config/nds32/nds32.c
11393 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11394 * config/nds32/nds32.opt (minline-asm-r15): New option.
11396 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11398 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11400 * config/nds32/nds32.md (abssi2): New pattern.
11402 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
11404 * config/i386/i386.md (rex64namesuffix): New mode attribute.
11405 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11406 Merge insn pattern from sse_cvtsi2ss<round_name> and
11407 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11408 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11409 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11410 using SWI48 mode iterator.
11411 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11412 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11413 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11414 pattern from sse_cvttss2si<round_saeonly_name>
11415 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11416 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11417 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11418 using SWI48 mode iterator.
11419 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11420 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11421 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11422 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11423 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11424 using SWI48 mode iterator.
11425 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11426 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11427 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11428 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11429 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11430 SWI48 mode iterator.
11431 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11432 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11433 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11434 pattern from sse_cvttsd2si<round_saeonly_name>
11435 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11437 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11439 * config/nds32/nds32-md-auxiliary.c
11440 (nds32_valid_smw_lwm_base_p): Refine.
11441 (nds32_output_smw_single_word): Refine.
11442 (nds32_output_smw_double_word): New.
11443 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11445 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11447 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11448 (nds32_output_stack_pop): Refine.
11449 (nds32_expand_unaligned_load): Refine.
11450 (nds32_expand_unaligned_store): Refine.
11452 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11453 Chung-Ju Wu <jasonwucj@gmail.com>
11455 * config/nds32/constants.md: Add TP_REGNUM constant.
11456 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11457 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11459 * config/nds32/nds32-doubleword.md: Consider flag_pic.
11460 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11461 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11462 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11463 and PIC code generation.
11464 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11466 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11468 * config/nds32/nds32.md: Support TLS and PIC.
11469 * config/nds32/nds32.c: Support TLS and PIC.
11470 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11471 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11474 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11476 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11477 mode with E_ prefix.
11479 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11480 Chung-Ju Wu <jasonwucj@gmail.com>
11482 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11483 * config/nds32/nds32-md-auxiliary.c
11484 (symbolic_reference_mentioned_p): New.
11485 (nds32_legitimize_ict_address): New.
11486 (nds32_expand_ict_move): New.
11487 (nds32_indirect_call_referenced_p): New.
11488 (nds32_symbol_binds_local_p): Delete.
11489 (nds32_long_call_p): Modify.
11490 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11491 * config/nds32/nds32-protos.h
11492 (symbolic_reference_mentioned_p): Declare.
11493 (nds32_legitimize_ict_address): Declare.
11494 (nds32_expand_ict_move): Declare.
11495 (nds32_indirect_call_referenced_p): Declare.
11496 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11497 (nds32_relax_group): Use nds32_ict_const_p as condition.
11498 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11499 (nds32_asm_file_start): Output ict_model directive in asm code.
11500 (nds32_legitimate_address_p): Consider indirect call.
11501 (nds32_print_operand): Consider indirect call.
11502 (nds32_print_operand_address): Consider indirect call.
11503 (nds32_insert_attributes): Handle "indirect_call" attribute.
11504 (TARGET_LEGITIMATE_ADDRESS_P): Define.
11505 (TARGET_LEGITIMATE_CONSTANT_P): Define.
11506 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11507 (TARGET_DELEGITIMIZE_ADDRESS): Define.
11508 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11509 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11510 (TARGET_ICT_MODEL_SMALL): Define.
11511 (TARGET_ICT_MODEL_LARGE): Define.
11512 * config/nds32/nds32.md (movsi): Consider ict model.
11513 (call, call_value): Consider ict model.
11514 (sibcall, sibcall_value): Consider ict model.
11515 * config/nds32/nds32.opt (mict-model): New option.
11516 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11519 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
11520 Monk Chiang <sh.chiang04@gmail.com>
11521 Jim Wilson <jimw@sifive.com>
11523 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11524 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
11525 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11526 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11527 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
11528 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11529 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11530 compute save_libcall_adjustment properly.
11531 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11532 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11533 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11534 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11535 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11536 (ABI_SPEC): Handle mabi=ilp32e.
11537 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11538 (RVE): Add RVE mask.
11539 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11540 <-march>: Add rv32e as an example.
11542 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
11545 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11546 (intra_create_variable_infos): Handle C++ constructors.
11548 2018-05-18 Martin Liska <mliska@suse.cz>
11550 * passes.def: Remove a redundant pass.
11552 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
11555 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11557 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11559 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11561 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11563 (armv2, armv2a, armv3, armv3m): Delete architectures.
11564 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11565 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11566 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11568 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11569 (*mulsidi3adddi): Likewise.
11570 (mulsidi3): Likewise.
11571 (*mulsidi3_nov6): Likewise.
11572 (umulsidi3): Likewise.
11573 (umulsidi3_nov6): Likewise.
11574 (umaddsidi4): Likewise.
11575 (*umulsidi3adddi): Likewise.
11576 (smulsi3_highpart): Likewise.
11577 (*smulsi3_highpart_nov6): Likewise.
11578 (umulsi3_highpart): Likewise.
11579 (*umulsi3_highpart_nov6): Likewise.
11580 * config/arm/arm.h (arm_arch3m): Delete.
11581 * config/arm/arm.c (arm_arch3m): Delete.
11582 (arm_option_override_internal): Update armv3-related comment.
11583 (arm_configure_build_target): Delete use of isa_bit_mode32.
11584 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11585 (arm_rtx_costs_internal): Delete check of arm_arch3m.
11586 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11587 (mulsa3): Likewise.
11588 (mulusa3): Likewise.
11589 * config/arm/arm-protos.h (arm_arch3m): Delete.
11590 * config/arm/arm-tables.opt: Regenerate.
11591 * config/arm/arm-tune.md: Likewise.
11592 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11593 deleted architectures.
11595 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11597 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11598 (armv5t, armv5te): New features.
11599 (ARMv5, ARMv5e): Delete fgroups.
11600 (ARMv5t, ARMv5te): Adjust for above changes.
11601 (ARMv6m): Likewise.
11602 (armv5, armv5e): Delete arches.
11603 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11605 (*call_reg_arm): Likewise.
11606 (*call_value_reg_armv5): Likewise.
11607 (*call_value_reg_arm): Likewise.
11608 (*call_symbol): Likewise.
11609 (*call_value_symbol): Likewise.
11610 (*sibcall_insn): Likewise.
11611 (*sibcall_value_insn): Likewise.
11612 (clzsi2): Likewise.
11613 (prefetch): Likewise.
11614 (define_split and define_peephole2 dependent on arm_arch5):
11616 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11618 (TARGET_ARM_QBIT): Likewise.
11619 (TARGET_DSP_MULTIPLY): Likewise.
11620 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11621 (arm_arch5, arm_arch5e): Delete.
11622 (arm_arch5t, arm_arch5te): Declare.
11623 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11624 (arm_arch5t): Declare.
11625 (arm_option_reconfigure_globals): Update for the above.
11626 (arm_options_perform_arch_sanity_checks): Update comment, replace
11627 use of arm_arch5 with arm_arch5t.
11628 (use_return_insn): Likewise.
11629 (arm_emit_call_insn): Likewise.
11630 (output_return_instruction): Likewise.
11631 (arm_final_prescan_insn): Likewise.
11632 (arm_coproc_builtin_available): Likewise.
11633 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11634 arm_arch5e with arm_arch5t and arm_arch5te.
11635 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11636 (arm_arch5t, arm_arch5te): Declare.
11637 * config/arm/arm-tables.opt: Regenerate.
11638 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11639 * config/arm/t-multilib: Likewise.
11640 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11641 instead of arm_arch5.
11642 (*call_reg_thumb1): Likewise.
11643 (*call_value_reg_thumb1_v5): Likewise.
11644 (*call_value_reg_thumb1): Likewise.
11645 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11647 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11649 2018-05-18 Martin Liska <mliska@suse.cz>
11651 PR gcov-profile/84846
11652 * doc/gcov.texi: Document -t option of gcov tool.
11654 2018-05-18 Martin Liska <mliska@suse.cz>
11656 PR gcov-profile/84846
11657 * gcov.c (print_usage): Add new -t option.
11658 (process_args): Handle the option.
11659 (generate_results): Use stdout as output when requested by
11662 2018-05-18 Martin Liska <mliska@suse.cz>
11664 PR gcov-profile/84846
11665 * coverage.c (coverage_init): Write PWD to .gcno file.
11666 * doc/gcov.texi: Document how working directory is printed.
11667 * gcov-dump.c (dump_gcov_file): Print PWD.
11668 * gcov.c (output_intermediate_file): Likewise.
11669 (read_graph_file): Read PWD string.
11670 (output_lines): Print PWD.
11672 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11674 PR middle-end/85817
11675 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11676 for retval and return false if all args to phi are zero.
11678 2018-05-18 Richard Biener <rguenther@suse.de>
11680 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11682 (evrp_dom_walker::before_dom_children): Call it.
11684 2018-05-18 Richard Biener <rguenther@suse.de>
11686 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11687 results when processing array refs with variable index.
11689 2018-05-18 Toon Moene <toon@moene.org>
11691 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11692 directly after that of -floop-interchange. Indicate that both
11693 options are enabled by default when specifying -O3.
11695 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11697 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11698 iterator. Delete separate integer-mode vec_set<mode> expander.
11699 (aarch64_simd_vec_setv2di): Delete.
11700 (vec_setv2di): Delete.
11701 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11702 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
11703 the "w, r" alternative.
11705 2018-05-18 Martin Liska <mliska@suse.cz>
11707 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11708 * tree-pass.h (make_pass_lower_switch_O0): New function.
11709 * tree-switch-conversion.c (node_has_low_bound): Remove.
11710 (node_has_high_bound): Likewise.
11711 (node_is_bounded): Likewise.
11712 (class pass_lower_switch): Make it a template type and create
11714 (pass_lower_switch::execute): Add template argument.
11715 (make_pass_lower_switch): New function.
11716 (make_pass_lower_switch_O0): New function.
11717 (do_jump_if_equal): Remove.
11718 (emit_case_nodes): Simplify to just handle all 3 cases and leave
11719 all the hard work to tree optimization passes.
11721 2018-05-18 Martin Liska <mliska@suse.cz>
11723 * dbgcnt.c (limit_low): Renamed from limit.
11724 (limit_high): New variable.
11725 (dbg_cnt_is_enabled): Check for upper limit.
11726 (dbg_cnt): Adjust dumping.
11727 (dbg_cnt_set_limit_by_index): Add new argument for high
11729 (dbg_cnt_set_limit_by_name): Likewise.
11730 (dbg_cnt_process_single_pair): Parse new format.
11731 (dbg_cnt_process_opt): Use strtok.
11732 (dbg_cnt_list_all_counters): Remove 'value' and add
11734 * doc/invoke.texi: Document changes.
11736 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
11738 * doc/sourcebuild.texi (scalar_all_fma): Document.
11739 * tree.def (FMA_EXPR): Delete.
11740 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11741 * internal-fn.c (ternary_direct): New macro.
11742 (expand_ternary_optab_fn): Likewise.
11743 (direct_ternary_optab_supported_p): Likewise.
11744 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11745 * builtins.c (fold_builtin_fma): Delete.
11746 (fold_builtin_3): Don't call it.
11747 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11748 * expr.c (expand_expr_real_2): Likewise.
11749 * fold-const.c (operand_equal_p): Likewise.
11750 (fold_ternary_loc): Likewise.
11751 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
11752 * gimple.c (DEFTREECODE): Likewise.
11753 * gimplify.c (gimplify_expr): Likewise.
11754 * optabs-tree.c (optab_for_tree_code): Likewise.
11755 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
11756 * tree-eh.c (operation_could_trap_p): Likewise.
11757 (stmt_could_throw_1_p): Likewise.
11758 * tree-inline.c (estimate_operator_cost): Likewise.
11759 * tree-pretty-print.c (dump_generic_node): Likewise.
11760 (op_code_prio): Likewise.
11761 * tree-ssa-loop-im.c (stmt_cost): Likewise.
11762 * tree-ssa-operands.c (get_expr_operands): Likewise.
11763 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
11764 * fold-const-call.h (fold_fma): Delete.
11765 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
11766 CFN_FNMA and CFN_FNMS.
11767 (fold_fma): Delete.
11768 * genmatch.c (combined_fn): New enum.
11769 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
11770 (commutative_op): New function.
11771 (commutate): Use it. Handle more than 2 operands.
11772 (dt_operand::gen_gimple_expr): Use commutative_op.
11773 (parser::parse_expr): Allow :c to be used with non-binary
11774 operators if the commutative operand is known.
11775 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
11776 CFN_FMS, CFN_FNMA and CFN_FNMS.
11777 (backprop::process_assign_use): Remove FMA_EXPR handling.
11778 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11779 (gen_hsa_fma): New function.
11780 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11781 IFN_FNMA and IFN_FNMS.
11782 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11783 * gimple-fold.h (follow_all_ssa_edges): Declare.
11784 * gimple-fold.c (follow_all_ssa_edges): New function.
11785 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11786 gimple_build interface and use follow_all_ssa_edges to fold the result.
11787 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11788 instead of checking for optabs directly.
11789 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11790 rather than FMA_EXPRs.
11791 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11792 call to IFN_FMA instead of an FMA_EXPR.
11794 2018-05-17 Jim Wilson <jimw@sifive.com>
11796 * expr.c (do_tablejump): When converting index to Pmode, if we have a
11797 sign extended promoted subreg, and the range does not have the sign bit
11798 set, then do a sign extend.
11800 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11801 test, check for sign extended subreg and/or constant operands, and
11802 do a sign extend in that case.
11804 2018-05-17 Steve Ellcey <sellcey@cavium.com>
11806 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11807 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11809 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11810 Change logics_shift_reg to logics_shift_imm.
11811 (thunderx2t99_fp_loadpair_basic): Delete.
11812 (thunderx2t99_fp_storepair_basic): Delete.
11813 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11814 (thunderx2t99_asimd_polynomial): Delete.
11815 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11816 and neon_fp_mul_d_scalar_q.
11817 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11818 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11819 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11820 (thunderx2t99_asimd_lut): Add missing tbl types.
11821 (thunderx2t99_asimd_ext): Delete.
11822 (thunderx2t99_asimd_load1_1_mult): Delete.
11823 (thunderx2t99_asimd_load1_2_mult): Delete.
11824 (thunderx2t99_asimd_load1_ldp): New.
11825 (thunderx2t99_asimd_load1): New.
11826 (thunderx2t99_asimd_load2): Add missing *load2* types.
11827 (thunderx2t99_asimd_load3): New.
11828 (thunderx2t99_asimd_load4): New.
11829 (thunderx2t99_asimd_store1_1_mult): Delete.
11830 (thunderx2t99_asimd_store1_2_mult): Delete.
11831 (thunderx2t99_asimd_store2_mult): Delete.
11832 (thunderx2t99_asimd_store2_onelane): Delete.
11833 (thunderx2t99_asimd_store_stp): New.
11834 (thunderx2t99_asimd_store1): New.
11835 (thunderx2t99_asimd_store2): New.
11836 (thunderx2t99_asimd_store3): New.
11837 (thunderx2t99_asimd_store4): New.
11839 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
11841 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
11842 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
11844 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
11845 Segher Boessenkool <segher@kernel.crashing.org>
11848 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
11851 2018-05-17 Richard Biener <rguenther@suse.de>
11853 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
11854 for pruning loop and prune defs feeding only already visited PHIs.
11856 2018-05-17 Richard Biener <rguenther@suse.de>
11858 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
11860 2018-05-17 Bin Cheng <bin.cheng@arm.com>
11861 Richard Biener <rguenther@suse.de>
11863 PR tree-optimization/85793
11864 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
11865 for VMAT_ELEMENTWISE.
11867 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11869 * internal-fn.h (lookup_internal_fn): Declare
11870 * internal-fn.c (lookup_internal_fn): New function.
11871 * gimple.c (gimple_build_call_from_tree): Handle calls to
11872 internal functions.
11873 * gimple-pretty-print.c (dump_gimple_call): Print "." before
11874 internal function names.
11875 * tree-pretty-print.c (dump_generic_node): Likewise.
11876 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
11878 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11880 * gimple-fold.h (gimple_build): Make the function forms take
11881 combined_fn rather than built_in_function.
11882 (gimple_simplify): Likewise.
11883 * gimple-match-head.c (gimple_simplify): Likewise.
11884 * gimple-fold.c (gimple_build): Likewise.
11885 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
11886 rather than gimple_build_call_internal.
11887 (get_initial_defs_for_reduction): Likewise.
11888 (vect_create_epilog_for_reduction): Likewise.
11889 (vectorizable_live_operation): Likewise.
11891 2018-05-17 Martin Liska <mliska@suse.cz>
11893 * gimple-ssa-sprintf.c (format_directive): Do not use
11894 space in between 'G_' and '('.
11896 2018-05-17 Jakub Jelinek <jakub@redhat.com>
11899 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
11900 even if the mask is not all ones.
11903 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
11905 (ix86_gimple_fold_builtin): Likewise.
11908 * config/i386/i386.c: Include tree-vector-builder.h.
11909 (ix86_vector_shift_count): New function.
11910 (ix86_fold_builtin): Fold shift builtins by scalar count.
11911 (ix86_gimple_fold_builtin): Likewise.
11913 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
11914 _mm512_setzero): New intrinsics.
11916 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
11917 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11919 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
11920 code generation for cases where splatting a value is not useful.
11921 * simplify-rtx.c (simplify_ternary_operation): Simplify
11922 vec_merge across a vec_duplicate and a paradoxical subreg forming
11923 a vector mode to a vec_concat.
11925 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
11927 * config.gcc: Support "goldmont-plus".
11928 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11930 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11931 PROCESSOR_GOLDMONT_PLUS.
11932 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
11933 (processor_target_table): Add "goldmont-plus".
11934 (PTA_GOLDMONT_PLUS): Define.
11935 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
11936 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
11937 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
11938 (fold_builtin_cpu): Add "goldmont-plus".
11939 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
11940 (ix86_option_override_internal): Add "goldmont-plus".
11941 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
11942 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
11943 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
11944 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
11946 2018-05-17 Richard Biener <rguenther@suse.de>
11948 PR tree-optimization/85757
11949 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
11950 remove defs that only feed that PHI from further processing.
11952 2018-05-16 Jim Wilson <jimw@sifive.com>
11954 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
11956 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
11958 2018-05-16 Mark Wielaard <mark@klomp.org>
11960 * dwarf2out.c (count_index_strings): New function.
11961 (output_indirect_strings): Call count_index_strings and generate
11962 header for dwarf_version >= 5.
11964 2018-05-16 Mark Wielaard <mark@klomp.org>
11966 * dwarf2out.c (dwarf_FORM): New function.
11967 (set_indirect_string): Use dwarf_FORM.
11968 (reset_indirect_string): Likewise.
11969 (size_of_die): Likewise.
11970 (value_format): Likewise.
11971 (output_die): Likewise.
11972 (add_skeleton_AT_string): Likewise.
11973 (output_macinfo_op): Likewise.
11974 (index_string): Likewise.
11975 (output_index_string_offset): Likewise.
11976 (output_index_string): Likewise.
11977 (count_index_strings): Likewise.
11979 2018-05-16 Carl Love <cel@us.ibm.com>
11981 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11982 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
11984 2018-05-16 Martin Jambor <mjambor@suse.cz>
11986 * ipa-prop.c (ipa_free_all_edge_args): Remove.
11987 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
11989 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
11991 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
11992 (fnma<mode>4): Likewise.
11993 (fms<mode>4): Likewise.
11994 (fnms<mode>4): Likewise.
11995 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
11996 (aarch64_fnma<mode>4): Likewise.
11997 (aarch64_fms<mode>4): Likewise.
11998 (aarch64_fnms<mode>4): Likewise.
11999 (aarch64_fnmadd<mode>4): Likewise.
12001 2018-05-16 Jason Merrill <jason@redhat.com>
12003 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12005 2018-05-16 Richard Biener <rguenther@suse.de>
12007 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12008 (dump_stmt_cost): Declare.
12009 (add_stmt_cost): Dump cost we add.
12010 (add_stmt_costs): New function.
12011 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12012 No longer exported.
12013 (vect_analyze_stmt): Adjust prototype.
12014 (vectorizable_condition): Likewise.
12015 (vectorizable_live_operation): Likewise.
12016 (vectorizable_reduction): Likewise.
12017 (vectorizable_induction): Likewise.
12018 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12019 cost vector to pass to vectorizable_ and record afterwards.
12020 (vect_model_reduction_cost): Take cost vector argument and adjust.
12021 (vect_model_induction_cost): Likewise.
12022 (vectorizable_reduction): Likewise.
12023 (vectorizable_induction): Likewise.
12024 (vectorizable_live_operation): Likewise.
12025 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12026 SLP_TREE_NUMBER_OF_VEC_STMTS.
12027 (vect_analyze_slp_cost_1): Remove.
12028 (vect_analyze_slp_cost): Likewise.
12029 (vect_slp_analyze_node_operations): Take visited args and
12030 a target cost vector. Avoid processing already visited stmt sets.
12031 (vect_slp_analyze_operations): Use a local cost vector to gather
12032 costs and register those of non-discarded instances.
12033 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12034 (vect_schedule_slp_instance): Remove copying of
12035 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12037 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12038 adding cost. Record cost entry location.
12039 (vect_prologue_cost_for_slp_op): Function to compute cost of
12040 a constant or invariant generated for SLP vect in the prologue,
12041 split out from vect_analyze_slp_cost_1.
12042 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12043 (vect_model_promotion_demotion_cost): Likewise.
12044 (vect_model_store_cost): Likewise, make static.
12045 (vect_model_load_cost): Likewise.
12046 (vectorizable_bswap): Add cost vector arg and adjust.
12047 (vectorizable_call): Likewise.
12048 (vectorizable_simd_clone_call): Likewise.
12049 (vectorizable_conversion): Likewise.
12050 (vectorizable_assignment): Likewise.
12051 (vectorizable_shift): Likewise.
12052 (vectorizable_operation): Likewise.
12053 (vectorizable_store): Likewise.
12054 (vectorizable_load): Likewise.
12055 (vectorizable_condition): Likewise.
12056 (vectorizable_comparison): Likewise.
12057 (can_vectorize_live_stmts): Likewise.
12058 (vect_analyze_stmt): Likewise.
12059 (vect_transform_stmt): Adjust calls to vectorizable_*.
12060 * tree-vectorizer.c: Include gimple-pretty-print.h.
12061 (dump_stmt_cost): New function.
12063 2018-05-16 Richard Biener <rguenther@suse.de>
12065 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12066 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12067 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12068 (check_name): New callback.
12069 (dse_classify_store): Track cycles via a visited bitmap of PHI
12070 defs and simplify handling of in-loop and across loop dead stores
12071 and properly fail for loop-variant refs. Handle byte-tracking with
12072 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12075 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12077 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12078 (vect_get_mask_type_for_stmt): Likewise.
12079 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12081 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12082 to determine the statement's vector type and the vector type that
12083 should be used for calculating nunits. Deal with cases in which
12084 the type has to be deferred.
12085 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12086 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12087 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12088 (vect_determine_vf_for_stmt): New functions, split out from...
12089 (vect_determine_vectorization_factor): ...here.
12090 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12091 (vect_get_mask_type_for_stmt): New functions, split out from
12092 vect_determine_vectorization_factor.
12094 2018-05-16 Richard Biener <rguenther@suse.de>
12096 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12097 verify the [VEC_]COND_EXPR embedded comparison.
12099 2018-05-15 Martin Sebor <msebor@redhat.com>
12101 PR tree-optimization/85753
12102 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12103 RECORD_TYPE in addition to ARRAY_TYPE.
12105 2018-05-15 Martin Sebor <msebor@redhat.com>
12107 PR middle-end/85643
12108 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12110 2018-05-15 Richard Biener <rguenther@suse.de>
12112 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12113 add by_clobber_p one. Change algorithm to collect all defs
12114 representing uses we need to walk and try reducing them to
12115 a single one before failing.
12116 (dse_dom_walker::dse_optimize_stmt): Adjust.
12118 2018-05-13 Mark Wielaard <mark@klomp.org>
12120 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12121 (size_of_loc_descr): Likewise.
12122 (output_loc_operands): Likewise.
12123 (output_loc_operands_raw): Likewise.
12124 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12125 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12126 (hash_loc_operands): Likewise.
12127 (compare_loc_operands): Likewise.
12129 2018-05-14 Mark Wielaard <mark@klomp.org>
12131 * dwarf2out.c (count_index_addrs): New function.
12132 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12134 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12136 PR tree-optimization/83648
12137 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12138 return value as malloc candidate.
12140 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12143 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12144 param as true in call to suggest_attribute.
12146 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12148 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12149 -mreadonly-in-sdata.
12151 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12153 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12155 (aarch64_crypto_aesd_fused): Likewise.
12157 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12159 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12160 (movsi_aarch64): Likewise.
12161 (load_pairsi): Likewise.
12162 (load_pairdi): Likewise.
12163 (store_pairsi): Likewise.
12164 (store_pairdi): Likewise.
12165 (load_pairsf): Likewise.
12166 (load_pairdf): Likewise.
12167 (store_pairsf): Likewise.
12168 (store_pairdf): Likewise.
12169 (zero_extend): Likewise.
12170 (trunc): Swap alternatives.
12171 (fcvt_target): Add '?' to prefer w over r.
12173 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12176 * config/i386/i386.md: Disallow non-commutative arithmetics in
12177 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12178 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12179 in the peephole2 before it.
12181 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12183 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12184 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12185 (ix86_handle_option): Handle -mcldemote.
12186 * config.gcc: New header.
12187 * config/i386/cldemoteintrin.h: New file.
12188 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12189 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12191 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12192 OPTION_MASK_ISA_CLDEMOTE.
12193 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12194 (ix86_valid_target_attribute_inner_p): Ditto.
12195 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12196 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12197 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12198 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12199 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12201 * config/i386/i386.opt: Add -mcldemote.
12202 * config/i386/x86intrin.h: New header.
12203 * doc/invoke.texi: Add -mcldemote.
12205 2018-05-14 Richard Biener <rguenther@suse.de>
12207 * doc/match-and-simplify.texi: Adjust :s documentation.
12209 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12211 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12212 intended memcpy size.
12213 (REORDER_45): Likewise.
12215 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12217 * sort.cc: New file.
12218 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12219 * vec.c (qsort_chk): Use gcc_qsort.
12220 * Makefile.in (OBJS-libcommon): Add sort.o.
12221 (build/sort.o): New target. Use it...
12222 (BUILD_RTL): ... here, and...
12223 (build/gencfn-macros): ... here, and...
12224 (build/genmatch): ... here.
12226 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12227 Chung-Ju Wu <jasonwucj@gmail.com>
12229 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12230 * config/nds32/nds32-graywolf.md: New file.
12231 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12232 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12234 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12235 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12236 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12237 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12238 * config/nds32/pipelines.md: Include n15 settings.
12240 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12241 Chung-Ju Wu <jasonwucj@gmail.com>
12243 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12244 * config/nds32/nds32-n13.md: New file.
12245 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12246 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12248 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12249 * config/nds32/nds32.md (pipeline_model): Add n13.
12250 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12251 * config/nds32/pipelines.md: Include n13 settings.
12253 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12254 Chung-Ju Wu <jasonwucj@gmail.com>
12256 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12257 * config/nds32/nds32-n10.md: New file.
12258 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12259 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12261 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12262 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12263 * config/nds32/nds32.md (pipeline_model): Add n10.
12264 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12265 * config/nds32/pipelines.md: Include n10 settings.
12267 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12268 Kito Cheng <kito.cheng@gmail.com>
12269 Chung-Ju Wu <jasonwucj@gmail.com>
12271 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12272 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12273 Add enum values for DSP extension instructions.
12274 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12276 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12277 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12278 New code iterators.
12279 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12280 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12281 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12282 * config/nds32/nds32-intrinsic.md: Likewise.
12283 * config/nds32/nds32_intrinsic.h: Likewise.
12284 * config/nds32/nds32-md-auxiliary.c: Likewise.
12285 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12286 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12287 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12288 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12289 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12290 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12291 TYPE_DMAC in switch statement.
12292 * config/nds32/nds32.c: New checking and implementation for DSP
12293 extension instructions.
12294 * config/nds32/nds32.h: Likewise.
12295 * config/nds32/nds32.md: Likewise.
12296 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12297 * config/nds32/predicates.md: Implement new predicates for DSP
12300 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12302 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12303 Reformat alternatives and attributes so it is easier to identify
12304 which constraints/attributes go with which instruction.
12305 (mov<mode>_hardfloat32, FMOVE64): Likewise.
12306 (mov<mode>_softfloat32, FMOVE64): Likewise.
12307 (mov<mode>_hardfloat64, FMOVE64): Likewise.
12308 (mov<mode>_softfloat64, FMOVE64): Likewise.
12310 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
12312 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12314 (Basic PowerPC Built-in Functions): The new name of the
12315 subsection previously known as "PowerPC Built-in Functions".
12316 (Basic PowerPC Built-in Functions Available on all Configurations):
12318 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12319 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12320 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12321 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12323 2018-05-11 Martin Jambor <mjambor@suse.cz>
12326 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12329 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12332 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12334 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
12336 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12337 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12338 (ix86_handle_option): Handle -mwaitpkg.
12339 * config.gcc: New header.
12340 * config/i386/cpuid.h (bit_WAITPKG): New bit.
12341 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12342 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12344 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12345 OPTION_MASK_ISA_WAITPKG.
12346 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12347 (ix86_option_override_internal): Add PTA_WAITPKG.
12348 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12349 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12350 IX86_BUILTIN_TPAUSE.
12351 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12352 __builtin_ia32_umwait and __builtin_ia32_tpause.
12353 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12354 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12355 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12356 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12357 UNSPECV_TPAUSE): New.
12358 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12359 * config/i386/i386.opt: Add -mwaitpkg.
12360 * config/i386/waitpkgintrin.h: New file.
12361 * config/i386/x86intrin.h: New header.
12362 * doc/invoke.texi: Add -mwaitpkg.
12364 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12367 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12369 (cortex-m0): Use armv6s-m isa.
12370 (cortex-m0plus): Likewise.
12371 (cortex-m1): Likewise.
12372 (cortex-m0.small-multiply): Likewise.
12373 (cortex-m0plus.small-multiply): Likewise.
12374 (cortex-m1.small-multiply): Likewise.
12376 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
12377 Jakub Jelinek <jakub@redhat.com>
12379 PR tree-optimization/85692
12380 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12381 source permute as well.
12383 2018-05-11 Martin Liska <mliska@suse.cz>
12386 * doc/extend.texi: Document LLVM style format for no_sanitize
12389 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12391 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12392 mode_supports_vsx_dform_quad to mode_supports_dq_form.
12393 (mode_supports_vsx_dform_quad): Likewise.
12394 (mode_supports_vmx_dform): Move these functions to be next to the
12395 other mode_supports functions.
12396 (mode_supports_dq_form): Likewise.
12397 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12398 mode_supports_dq_form.
12399 (reg_offset_addressing_ok_p): Likewise.
12400 (offsettable_ok_by_alignment): Likewise.
12401 (rs6000_legitimate_offset_address_p): Likewise.
12402 (legitimate_lo_sum_address_p): Likewise.
12403 (rs6000_legitimize_address): Likewise.
12404 (rs6000_legitimize_reload_address): Likewise.
12405 (rs6000_secondary_reload_inner): Likewise.
12406 (rs6000_preferred_reload_class): Likewise.
12407 (rs6000_output_move_128bit): Likewise.
12409 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12411 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12412 Generate SImode target register for null target.
12413 <case IX86_BUILTIN_XGETBV>: Ditto.
12414 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12415 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12417 2018-05-10 Carl Love <cel@us.ibm.com>
12419 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12420 dcbtt and dcbtstt if operands[2] is 0.
12422 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12425 * config/i386/sse.md (usadv64qi): New expander.
12427 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
12429 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12430 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12431 -maltivec=be support.
12432 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12433 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12434 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12435 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12436 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12437 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12438 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12439 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12440 altivec_vsumsws): Adjust.
12441 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12442 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12443 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12445 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12446 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12447 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12448 (altivec_lve<VI_char>x): Delete expand.
12449 (*altivec_lve<VI_char>x_internal): Rename to...
12450 (altivec_lve<VI_char>x): ... this.
12451 (altivec_lvxl_<mode>): Delete expand.
12452 (*altivec_lvxl_<mode>_internal): Rename to ...
12453 (altivec_lvxl_<mode>): ... this.
12454 (altivec_stvxl_<mode>): Delete expand.
12455 (*altivec_stvxl_<mode>_internal): Rename to ...
12456 (altivec_stvxl_<mode>): ... this.
12457 (altivec_stve<VI_char>x): Delete expand.
12458 (*altivec_stve<VI_char>x_internal): Rename to ...
12459 (altivec_stve<VI_char>x): ... this.
12460 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12461 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12462 reduc_plus_scal_<mode>): Adjust.
12463 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12465 (rs6000_cpu_cpp_builtins): Adjust.
12466 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12467 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12468 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12469 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12470 -maltivec=be support.
12471 (rs6000_split_vec_extract_var): Adjust.
12472 (rs6000_split_v4si_init): Adjust.
12473 (swap_selector_for_mode): Delete.
12474 (altivec_expand_lvx_be, altivec_expand_stvx_be,
12475 altivec_expand_stvex_be): Delete.
12476 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12477 -maltivec=be support.
12478 (rs6000_gimple_fold_builtin): Ditto.
12479 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12481 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12482 (TARGET_DIRECT_MOVE_64BIT): Adjust.
12483 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12484 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12485 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12486 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12487 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12488 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12489 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12490 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12491 anonymous split): Adjust.
12492 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12493 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12495 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12497 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12498 when --with-gxx-include-dir is also specified.
12499 * configure: Regenerate.
12501 2018-05-09 Jim Wilson <jimw@sifive.com>
12504 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12505 * config/riscv/t-withmultilib: New.
12506 * config/riscv/withmultilib.h: New.
12507 * doc/install.texi: Document RISC-V --with-multilib-list support.
12509 2018-05-09 Richard Biener <rguenther@suse.de>
12511 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12513 (vect_bb_vectorization_profitable_p): Adjust. Compute
12514 actual scalar cost using the cost vector and the add_stmt_cost
12517 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12519 PR rtl-optimization/85645
12520 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12521 in the REG_CFA_REGISTER note for LR, don't leave it empty.
12523 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12525 PR rtl-optimization/85645
12526 * shrink-wrap.c (spread_components): Return a boolean saying if
12527 anything was changed.
12528 (try_shrink_wrapping_separate): Iterate spread_components until
12529 nothing changes anymore.
12531 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12533 PR rtl-optimization/85645
12534 * regrename.c (build_def_use): Also kill the chains that include the
12535 destination of a REG_CFA_REGISTER note.
12537 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12539 PR rtl-optimization/85645
12540 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12541 insn that has a REG_CFA_REGISTER note.
12543 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
12545 * cfgexpand.c (expand_clobber): New function.
12546 (expand_gimple_stmt_1): Use it.
12547 * tree-vect-stmts.c (vect_clobber_variable): New function,
12549 (vectorizable_simd_clone_call): ...here.
12550 (vectorizable_store): Emit a clobber either side of an
12551 IFN_STORE_LANES sequence.
12552 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12554 2018-05-09 Tom de Vries <tom@codesourcery.com>
12557 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12558 (define_insn "trap_if_false"): Add exit after trap.
12560 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
12562 PR rtl-optimization/85638
12563 * bb-reorder.c: Include common/common-target.h.
12564 (create_forwarder_block): New function extracted from...
12565 (fix_up_crossing_landing_pad): ...here. Rename into...
12566 (dw2_fix_up_crossing_landing_pad): ...this.
12567 (sjlj_fix_up_crossing_landing_pad): New function.
12568 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12569 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12570 from both partitions and exit the loop after one iteration.
12572 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12575 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12577 (Basic PowerPC Built-in Functions): The new name of the
12578 subsection previously known as "PowerPC Built-in Functions".
12579 (Basic PowerPC Built-in Functions Available on all Configurations):
12581 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12583 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12585 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12587 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12590 2018-05-08 Jim Wilson <jimw@sifive.com>
12592 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12593 (LD_EMUL_SUFFIX): New.
12594 (LINK_SPEC): Use it.
12596 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12598 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12600 (Basic PowerPC Built-in Functions): The new name of the
12601 subsection previously known as "PowerPC Built-in Functions".
12602 (Basic PowerPC Built-in Functions Available on all Configurations):
12604 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12606 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12608 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12610 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12613 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12616 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12617 after cmpelim optimization.
12619 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
12621 * config.gcc: Support "goldmont".
12622 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12623 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12624 PROCESSOR_GOLDMONT.
12625 * config/i386/i386.c (m_GOLDMONT): Define.
12626 (processor_target_table): Add "goldmont".
12627 (PTA_GOLDMONT): Define.
12628 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12629 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12630 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12631 (fold_builtin_cpu): Add "goldmont".
12632 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12633 (ix86_option_override_internal): Add "goldmont".
12634 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12635 (processor_type): Add PROCESSOR_GOLDMONT.
12636 * config/i386/i386.md: Add CPU "glm".
12637 * config/i386/glm.md: New file.
12638 * config/i386/x86-tune.def: Add m_GOLDMONT.
12639 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12641 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12644 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12646 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12647 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
12648 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
12651 * config/i386/i386.c (ix86_fold_builtin): Handle
12652 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12655 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12656 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12658 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
12661 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12662 (check_arch): Likewise.
12663 (check_fpu): Return the result rather than printing it.
12664 (end arch): Fix operator precedence.
12665 (end cpu): Likewise.
12666 (END): Print the result from check_fpu.
12668 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12669 Alan Hayward <alan.hayward@arm.com>
12670 David Sherwood <david.sherwood@arm.com>
12672 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12673 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12674 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12675 (*fcmuo<mode>_and): New patterns.
12677 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12679 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12680 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12681 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12682 (cmp_op, sve_imm_con): New code attributes.
12683 (SVE_COND_INT_CMP, imm_con): Delete.
12684 (cmp_op): Remove above unspecs from int attribute.
12685 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12687 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
12688 comparison-specific unspecs.
12689 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12690 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12691 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12692 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12693 (*vec_fcm<cmp_op><mode>): Rename to...
12694 (*fcm<cmp_op><mode>): ...this and adjust likewise.
12695 (*vec_fcmuo<mode>): Rename to...
12696 (*fcmuo<mode>): ...this and adjust likewise.
12697 (*pred_fcm<cmp_op><mode>): New pattern.
12698 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12699 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12701 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12703 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12704 (aarch64_emit_sve_predicated_cond): New function.
12705 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12706 (aarch64_emit_unspec_cond_or): Replace with...
12707 (aarch64_emit_sve_or_conds): ...this new function. Use
12708 aarch64_emit_sve_ptrue_op for the individual comparisons and
12709 aarch64_emit_binop to OR them together.
12710 (aarch64_emit_inverted_unspec_cond): Replace with...
12711 (aarch64_emit_sve_inverted_cond): ...this new function. Use
12712 aarch64_emit_sve_ptrue_op for the comparison and
12713 aarch64_emit_unop to invert the result.
12714 (aarch64_expand_sve_vec_cmp_float): Update after the above
12715 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
12717 2018-05-07 Nathan Sidwell <nathan@acm.org>
12719 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12720 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12721 (Backwards Compatibility): Likewise.
12723 2018-05-07 Luis Machado <luis.machado@linaro.org>
12727 2018-05-07 Luis Machado <luis.machado@linaro.org>
12729 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12730 <prefetch_dynamic_strides>: New const bool field.
12731 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12732 prefetch_dynamic_strides.
12733 (exynosm1_prefetch_tune): Likewise.
12734 (thunderxt88_prefetch_tune): Likewise.
12735 (thunderx_prefetch_tune): Likewise.
12736 (thunderx2t99_prefetch_tune): Likewise.
12737 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12739 (aarch64_override_options_internal): Update to set
12740 PARAM_PREFETCH_DYNAMIC_STRIDES.
12741 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12742 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12743 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12744 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12745 prefetch-dynamic-strides setting.
12747 2018-05-07 Luis Machado <luis.machado@linaro.org>
12749 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12750 <minimum_stride>: New const int field.
12751 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12752 minimum_stride field.
12753 (exynosm1_prefetch_tune): Likewise.
12754 (thunderxt88_prefetch_tune): Likewise.
12755 (thunderx_prefetch_tune): Likewise.
12756 (thunderx2t99_prefetch_tune): Likewise.
12757 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12758 (aarch64_override_options_internal): Update to set
12759 PARAM_PREFETCH_MINIMUM_STRIDE.
12760 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12761 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12762 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12763 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12764 stride is constant and is below the minimum stride threshold.
12766 2018-05-07 Luis Machado <luis.machado@linaro.org>
12768 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
12771 2018-05-07 Luis Machado <luis.machado@linaro.org>
12773 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12774 <prefetch_dynamic_strides>: New const bool field.
12775 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12776 prefetch_dynamic_strides.
12777 (exynosm1_prefetch_tune): Likewise.
12778 (thunderxt88_prefetch_tune): Likewise.
12779 (thunderx_prefetch_tune): Likewise.
12780 (thunderx2t99_prefetch_tune): Likewise.
12781 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12783 (aarch64_override_options_internal): Update to set
12784 PARAM_PREFETCH_DYNAMIC_STRIDES.
12785 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12786 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12787 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12788 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12789 prefetch-dynamic-strides setting.
12791 2018-05-07 Luis Machado <luis.machado@linaro.org>
12793 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12794 <minimum_stride>: New const int field.
12795 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12796 minimum_stride field.
12797 (exynosm1_prefetch_tune): Likewise.
12798 (thunderxt88_prefetch_tune): Likewise.
12799 (thunderx_prefetch_tune): Likewise.
12800 (thunderx2t99_prefetch_tune): Likewise.
12801 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12802 (aarch64_override_options_internal): Update to set
12803 PARAM_PREFETCH_MINIMUM_STRIDE.
12804 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12805 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12806 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12807 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12808 stride is constant and is below the minimum stride threshold.
12810 2018-05-06 Jakub Jelinek <jakub@redhat.com>
12813 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12814 the type is addressable. Don't force op into register if it has
12817 2018-05-05 Roland McGrath <mcgrathr@google.com>
12820 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12821 any section for which we don't know a specific type it should have,
12822 regardless of name. Previously this was done only for the exact
12823 names ".init_array", ".fini_array", and ".preinit_array".
12824 (default_elf_asm_named_section): Add comment about
12825 relationship with default_section_type_flags and SECTION_NOTYPE.
12826 (get_section): Don't consider it a type conflict if one side has
12827 SECTION_NOTYPE and the other doesn't, as long as neither has the
12828 SECTION_BSS et al used in the default_section_type_flags logic.
12830 2018-05-05 Tom de Vries <tom@codesourcery.com>
12833 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12834 (workaround_barsyncs): New function.
12835 (nvptx_reorg): Use workaround_barsyncs.
12836 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12837 (define_expand "nvptx_membar_cta"): New define_expand.
12838 (define_insn "*nvptx_membar_cta"): New insn.
12840 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
12842 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
12843 To improve optimization opportunities.
12844 * builtin-types.def: The new needed builtin types for the above.
12846 2018-05-04 Richard Biener <rguenther@suse.de>
12848 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
12849 * gimple-ssa-store-merging.c
12850 (imm_store_chain_info::output_merged_store): Remove redundant create,
12851 release split_store vector contents on failure.
12852 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
12853 scalar stmt vector on cache hit.
12855 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
12857 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
12859 * config.gcc (powerpc-xilinx-eabi*): Remove.
12860 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
12862 (fusion_addis_mem_combo_load): Ditto.
12863 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
12865 (rs6000_cpu_cpp_builtins): Ditto.
12866 * config/rs6000/rs6000-linux.c
12867 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
12868 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
12869 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
12871 (rs6000_setup_reg_addr_masks): Ditto.
12872 (rs6000_init_hard_regno_mode_ok): Ditto.
12873 (rs6000_option_override_internal): Ditto.
12874 (legitimate_lo_sum_address_p): Ditto.
12875 (rs6000_legitimize_address): Ditto.
12876 (rs6000_legitimize_reload_address): Ditto.
12877 (rs6000_legitimate_address_p): Ditto.
12878 (abi_v4_pass_in_fpr): Ditto.
12879 (setup_incoming_varargs): Ditto.
12880 (rs6000_gimplify_va_arg): Ditto.
12881 (rs6000_split_multireg_move): Ditto.
12882 (rs6000_savres_strategy): Ditto.
12883 (rs6000_emit_prologue_components): Ditto.
12884 (rs6000_emit_epilogue_components): Ditto.
12885 (rs6000_emit_prologue): Ditto.
12886 (rs6000_emit_epilogue): Ditto.
12887 (rs6000_elf_file_end): Ditto.
12888 (rs6000_function_value): Ditto.
12889 (rs6000_libcall_value): Ditto.
12890 * config/rs6000/rs6000.h: Ditto.
12891 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
12892 (TARGET_MINMAX): ... this. New.
12893 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
12894 * config/rs6000/rs6000.md: Remove Xilinx FP support.
12895 (*movsi_internal1_single): Delete.
12896 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
12897 mfpu=, mxilinx-fpu): Delete.
12898 * config/rs6000/singlefp.h: Delete.
12899 * config/rs6000/sysv4.h: Remove Xilinx FP support.
12900 * config/rs6000/t-rs6000: Ditto.
12901 * config/rs6000/t-xilinx: Delete.
12902 * config/rs6000/titan.md: Adjust for fp_type removal.
12903 * config/rs6000/vsx.md: Remove Xilinx FP support.
12904 (VStype_simple): Delete.
12905 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
12906 * config/rs6000/xfpu.h: Delete.
12907 * config/rs6000/xfpu.md: Delete.
12908 * config/rs6000/xilinx.h: Delete.
12909 * config/rs6000/xilinx.opt: Delete.
12910 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
12911 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
12913 2018-05-04 Tom de Vries <tom@codesourcery.com>
12916 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
12919 2018-05-04 Richard Biener <rguenther@suse.de>
12921 PR middle-end/85627
12922 * tree-complex.c (update_complex_assignment): We are always in SSA form.
12923 (expand_complex_div_wide): Likewise.
12924 (expand_complex_operations_1): Likewise.
12925 (expand_complex_libcall): Preserve EH info of the original stmt.
12926 (tree_lower_complex): Handle removed blocks.
12927 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12928 on complex multiplication and division libcall builtins.
12930 2018-05-04 Richard Biener <rguenther@suse.de>
12932 PR middle-end/85574
12933 * fold-const.c (negate_expr_p): Restrict negation of operand
12934 zero of a division to when we know that can happen without
12936 (fold_negate_expr_1): Likewise.
12938 2018-05-04 Jakub Jelinek <jakub@redhat.com>
12941 * real.h (real_nextafter): Declare.
12942 * real.c (real_nextafter): New function.
12943 * fold-const-call.c (fold_const_nextafter): New function.
12944 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
12945 CASE_CFN_NEXTTOWARD.
12946 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
12947 even when arg1_mode is different from arg0_mode.
12949 2018-05-03 Nathan Sidwell <nathan@acm.org>
12951 * doc/extend.texi (Deprecated Features): Remove
12952 -ffriend-injection.
12953 (Backwards Compatibility): Likewise.
12954 * doc/invoke.texi (C++ Language Options): Likewise.
12955 (C++ Dialect Options): Likewise.
12957 2018-05-03 Jakub Jelinek <jakub@redhat.com>
12960 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
12961 _mm512_mask_mullox_epi64): New intrinsics.
12963 2018-05-03 Tom de Vries <tom@codesourcery.com>
12966 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12967 dump files): Add offload-tree.
12969 2018-05-03 Richard Biener <rguenther@suse.de>
12971 PR tree-optimization/85615
12972 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
12973 to loops not nested in BBs loop father to avoid creating multi-entry
12976 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12978 PR tree-optimization/70291
12979 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
12980 arguments. Change return type to tree. Emit libcall as a new
12981 statement rather than replacing existing one when inplace_p is true.
12982 (expand_complex_multiplication_components): New function.
12983 (expand_complex_multiplication): Expand floating-point complex
12984 multiplication using the above.
12985 (expand_complex_division): Rename inner_type parameter to type.
12986 Update expand_complex_libcall call-site.
12987 (expand_complex_operations_1): Update expand_complex_multiplication
12988 and expand_complex_division call-sites.
12990 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12993 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12994 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12995 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
12996 the highest significant bit of the shift count mask is clear. In
12997 check whether and[sq]i3 is needed verify that all significant bits
12998 of the shift count other than the highest are set.
13000 2018-05-02 Tom de Vries <tom@codesourcery.com>
13003 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13004 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13005 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13006 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13007 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13008 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13009 __builtin_goacc_parlevel_size.
13011 2018-05-02 Richard Biener <rguenther@suse.de>
13013 PR tree-optimization/85597
13014 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13015 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13018 2018-05-02 Tom de Vries <tom@codesourcery.com>
13021 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13022 dump files): Add ltrans-tree.
13024 2018-05-02 Tom de Vries <tom@codesourcery.com>
13027 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13028 dump files): Add wpa-ipa.
13030 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13032 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13033 powerpc*-*-linux*paired* target.
13034 * config/rs6000/750cl.h: Delete.
13035 * config/rs6000/paired.h: Delete.
13036 * config/rs6000/paired.md: Delete.
13037 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13039 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13040 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13041 comment. Remove paired float support.
13042 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13043 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13045 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13046 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13048 * config/rs6000/rs6000.c: Remove paired float support.
13049 (paired_expand_vector_init, paired_expand_vector_move,
13050 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13051 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13052 paired_expand_builtin, paired_expand_predicate_builtin,
13053 paired_init_builtins): Delete.
13054 * config/rs6000/rs6000.h: Remove paired float support.
13055 * config/rs6000/rs6000.md: Remove paired float support.
13056 (move_from_CR_ov_bit): Delete.
13057 * config/rs6000/rs6000.opt (mpaired): Delete.
13058 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13059 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13061 2018-05-02 Richard Biener <rguenther@suse.de>
13063 PR middle-end/85567
13064 * gimplify.c (gimplify_save_expr): When in SSA form allow
13065 SAVE_EXPRs to compute to SSA vars.
13067 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13070 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13071 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13072 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13073 clobber operands[2], instead use a new pseudo. Formatting fixes.
13075 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13077 PR tree-optimization/85586
13078 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13079 exit early for statements in the same group if the accesses are
13082 2018-05-02 Tom de Vries <tom@codesourcery.com>
13085 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13088 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13090 PR tree-optimization/85143
13091 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13093 2018-05-01 Tom de Vries <tom@codesourcery.com>
13096 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13097 not found" error message.
13099 2018-05-01 Tom de Vries <tom@codesourcery.com>
13102 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13103 * vec.c (test_ordered_remove_if): New function.
13104 (vec_c_tests): Call test_ordered_remove_if.
13105 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13106 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13107 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13108 VEC_ORDERED_REMOVE_IF.
13110 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13112 PR tree-optimization/82665
13113 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13114 pointer subtraction where arguments come from a memchr call.
13116 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13118 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13119 --push-state --as-needed and --pop-state instead of --as-needed and
13120 --no-as-needed if ld supports it.
13121 * configure: Regenerated.
13124 * doc/install.texi2html: Replace _002d with - and _002a with * in
13125 generated html files using sed.
13127 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13130 * gcc-rich-location.c (blank_line_before_p): New function.
13131 (use_new_line): New function.
13132 (gcc_rich_location::add_fixit_insert_formatted): New function.
13133 * gcc-rich-location.h
13134 (gcc_rich_location::add_fixit_insert_formatted): New function.
13136 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13138 * selftest.c (assert_streq): Rename "expected" and "actual" to
13139 "val1" and "val2". Extend NULL-handling to cover both inputs
13140 symmetrically, while still requiring both to be non-NULL for a pass.
13141 * selftest.h (assert_streq): Rename "expected" and "actual" to
13143 (ASSERT_EQ): Likewise.
13144 (ASSERT_EQ_AT): Likewise.
13145 (ASSERT_KNOWN_EQ): Likewise.
13146 (ASSERT_KNOWN_EQ_AT): Likewise.
13147 (ASSERT_NE): Likewise.
13148 (ASSERT_MAYBE_NE): Likewise.
13149 (ASSERT_MAYBE_NE_AT): Likewise.
13150 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13151 the assertion to pass.
13152 (ASSERT_STREQ_AT): Likewise.
13154 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13156 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13157 interaction with -pie.
13159 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13161 * selftest.h: Fix alphabetization of per-source-file selftest
13164 2018-04-30 Jason Merrill <jason@redhat.com>
13166 PR c++/61982 - dead stores to destroyed objects.
13167 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13170 2018-04-30 Jason Merrill <jason@redhat.com>
13172 * tree.c (build_clobber): New.
13173 * tree.h: Declare it.
13174 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13176 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13178 * diagnostic-show-locus.c (layout::layout): Update for
13179 location_get_source_line returning a char_span.
13180 (struct char_span): Move to input.h.
13181 (struct correction): Update for fields in char_span becoming
13183 (struct source_line): Update for location_get_source_line
13184 returning a char_span.
13185 (layout::print_line): Likewise.
13186 * edit-context.c (edited_file::print_content): Likewise.
13187 (edited_file::print_diff_hunk): Likewise.
13188 (edited_file::print_run_of_changed_lines): Likewise.
13189 (edited_file::get_num_lines): Likewise.
13190 (edited_line::edited_line): Likewise.
13191 * final.c (asm_show_source): Likewise.
13192 * input.c (location_get_source_line): Convert return type
13193 from const char * to char_span, losing the final "line_len"
13195 (dump_location_info): Update for the above.
13196 (get_substring_ranges_for_loc): Likewise. Use a char_span
13197 when handling the literal within the line.
13198 (test_reading_source_line): Update for location_get_source_line
13199 returning a char_span.
13200 * input.h (class char_span): Move here from
13201 diagnostic-show-locus.c, converting from a struct to a class.
13202 Make data members private.
13203 (char_span::operator bool): New.
13204 (char_span::length): New.
13205 (char_span::get_buffer): New.
13206 (char_span::operator[]): New.
13207 (char_span::subspan): Make const.
13208 (char_span::xstrdup): New.
13209 (location_get_source_line): Convert return type from const char *
13210 to char_span, losing the final "line_size" param.
13212 2018-04-30 Jan Hubicka <jh@suse.cz>
13214 * lto-wrapper.c (ltrans_priorities): New static var.
13215 (cmp_priority): New.
13216 (run_gcc): Read priorities and if doing parallel build order
13217 the Makefile by them.
13219 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13221 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13223 2018-04-30 Richard Biener <rguenther@suse.de>
13225 * tree-cfg.c (verify_address): Remove base argument, add
13226 flag whether to check TREE_ADDRESSABLE and do that.
13227 (verify_expr): Remove.
13228 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13229 (verify_gimple_assign_single): Likewise.
13230 (verify_gimple_switch): Likewise.
13231 (verify_expr_location_1): Dereference tp once. Add (disabled)
13232 piece from verify_expr.
13233 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13235 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13237 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13239 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13241 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13242 (small_data_pattern): Likewise.
13243 (arc_rewrite_small_data): Likewise.
13244 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13245 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13246 (get_symbol_alignment): New function.
13247 (legitimate_small_data_address_p): Likewise.
13248 (legitimate_scaled_address): Update, call
13249 legitimate_small_data_address_p.
13250 (output_sdata): New static variable.
13251 (arc_print_operand): Update how we handle small data operands.
13252 (arc_print_operand_address): Likewise.
13253 (arc_legitimate_address_p): Update, use
13254 legitimate_small_data_address_p.
13255 (arc_rewrite_small_data_p): Remove.
13256 (arc_rewrite_small_data_1): Likewise.
13257 (arc_rewrite_small_data): Likewise.
13258 (small_data_pattern): Likewise.
13259 (compact_sda_memory_operand): Update to use
13260 legitimate_small_data_address_p and get_symbol_alignment.
13261 (prepare_move_operands): Don't rewite sdata pattern.
13262 (prepare_extend_operands): Remove.
13263 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13265 (zero_extendqisi2): Likewise.
13266 (zero_extendhisi2): Likewise.
13267 (extendqihi2): Likewise.
13268 (extendqisi2): Likewise.
13269 (extendhisi2): Likewise.
13270 (addsi3): Likewise.
13271 (subsi3): Likewise.
13272 (andsi3): Likewise.
13273 * config/arc/constraints.md (Usd): Change it to memory constraint.
13275 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13277 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13278 as source of std instructions.
13279 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13280 allow 6-bit constants as source for store instructions.
13281 (movdi_insn): Update instruction pattern to allow 6-bit constants
13282 as source for store instructions.
13284 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13286 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13288 2018-04-30 Nathan Sidwell <nathan@acm.org>
13289 Sandra Loosemore <sandra@codesourcery.com>
13291 * dumpfile.c (dump_open): Allow '-' for stdout.
13292 * doc/invoke.texi (Developer Options): Document dump filename
13293 determination early. Document stdin/stdout selection.
13295 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13297 Microblaze Target: PIC data text relative
13299 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13300 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13302 * config/microblaze/microblaze.h (microblaze_constant_address_p):
13303 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13304 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13305 New addressing mode for data-text relative position indepenedent code.
13306 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13307 'ADDRESS_SYMBOLIC_TXT_REL'.
13308 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13309 (microblaze_legitimate_pic_operand): Exclude function calls from
13310 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13311 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13313 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13314 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13315 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13316 for 'address + offset'.
13317 (microblaze_expand_prologue): Add new function prologue call for
13319 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13320 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13321 table in case of TARGET_PIC_DATA_TEXT_REL.
13322 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13323 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13324 Add new macros 'UNSPEC_TEXT',
13325 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13326 + exclude function calls from 'UNSPEC_PLT' in case of data text
13328 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13329 new target hook for generating address diff vector tables in case of
13331 * doc/tm.texi : Regenerate.
13332 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13333 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13334 of addr diff vector generation.
13335 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13336 target hook definition.
13337 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13338 Add default function for generate_pic_addr_diff_vec -> flag_pic.
13339 * doc/invoke.texi (Add new pic option): Add new microblaze pic
13340 option for data text relative.
13342 2018-04-30 Richard Biener <rguenther@suse.de>
13344 * tree-chrec.h (evolution_function_is_constant_p): Remove
13346 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13348 2018-04-30 Richard Biener <rguenther@suse.de>
13351 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13353 2018-04-30 Richard Biener <rguenther@suse.de>
13355 PR tree-optimization/28364
13356 PR tree-optimization/85275
13357 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13358 copying first exit test.
13360 2018-04-28 Mark Wielaard <mark@klomp.org>
13362 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13363 dwarf_version >= 5.
13364 (dwarf_AT): Handle DW_AT_addr_base.
13365 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13367 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
13370 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13371 (*ashl<dwi>3_doubleword_mask_1): Ditto.
13372 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13373 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13375 2018-04-28 Richard Biener <rguenther@suse.de>
13377 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13378 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13379 to reflect use. Only add interesting stmts.
13381 2018-04-27 Martin Jambor <mjambor@suse.cz>
13384 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13385 the jump function allows for passing through aggregate values.
13387 2018-04-27 David Malcolm <dmalcolm@redhat.com>
13389 * input.h (in_system_header_at): Convert from macro to inline
13391 (from_macro_expansion_at): Likewise.
13392 (from_macro_definition_at): Likewise.
13394 2018-04-27 Jeff Law <law@redhat.com>
13396 * config.gcc: Mark tile* targets as deprecated/obsolete.
13398 2018-04-27 Richard Biener <rguenther@suse.de>
13400 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13403 2018-04-27 Richard Biener <rguenther@suse.de>
13405 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13407 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
13409 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13410 with Yd constraint. Set "preferred_for_speed" attribute from
13411 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13412 with Yd constraint.
13413 (*movdi_internal): Ditto.
13414 (movti_interunit splitters): Remove
13415 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13416 (movdi_interunit splitters): Ditto.
13417 * config/i386/constraints.md (Ye): Remove.
13418 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13420 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13423 * config/aarch64/constraints.md (Usg): Limit to 31.
13424 (Usj): Limit to 63.
13426 2018-04-27 Jakub Jelinek <jakub@redhat.com>
13428 PR tree-optimization/85529
13429 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13430 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13431 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13432 zero extension or masking of the MSB bit.
13433 (optimize_range_tests): Add FIRST_BB argument, pass it through
13434 to optimize_range_tests_var_bound.
13435 (maybe_optimize_range_tests, reassociate_bb): Adjust
13436 optimize_range_tests callers.
13438 2018-04-26 Richard Biener <rguenther@suse.de>
13439 Jakub Jelinek <jakub@redhat.com>
13441 * cgraph.h (symbol_table): Just declare debug method here.
13442 * symtab.c (symbol_table::debug): Define.
13444 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
13446 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13448 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
13450 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13451 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13452 (*movdi_internal): Substitute Yi and Yj constraint with x
13453 and Ym and Yn constraint with y constraint. Update "isa"
13454 attribute and set "preferred_for_speed" attribute from
13455 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13456 (*movsi_internal): Ditto.
13457 (*movdf_internal): Ditto.
13458 (*movsf_internal): Ditto.
13459 (*zero_extendsidi2): Ditto.
13460 * config/i386/sse.md (vec_set<mode>_0): Ditto.
13461 (sse2_loadld): Ditto.
13462 (*vec_extract<ssevecmodelower>_0): Ditto.
13463 (*vec_extractv4si_0_zext_sse4): Ditto.
13464 (vec_concatv2di): Ditto.
13465 (*vec_dup<mode>): Ditto.
13466 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13467 * config/i386/constraints.md (Yi): Remove.
13472 2018-04-26 Nathan Sidwell <nathan@acm.org>
13474 * dumpfile.c (dump_open): New.
13475 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13476 (dump_finish): Detect stdio/stderr by value not name.
13478 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
13480 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13482 2018-04-26 Tom de Vries <tom@codesourcery.com>
13485 * config/nvptx/nvptx.c (verify_neutering_jumps)
13486 (verify_neutering_labels): New function
13487 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13489 2018-04-26 Tom de Vries <tom@codesourcery.com>
13492 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13493 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13496 2018-04-26 Richard Biener <rguenther@suse.de>
13497 Tom de Vries <tom@codesourcery.com>
13500 * lto-streamer-out.c (output_function): Fixup loops if required to match
13501 discovery done in the reader.
13503 2018-04-26 Richard Biener <rguenther@suse.de>
13505 PR tree-optimization/85116
13506 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13507 have a loop exit from the single latch predecessor. Remove
13508 case of header with just condition.
13509 (ch_base::copy_headers): Exclude infinite loops from any
13511 (pass_ch::execute): Record exits.
13513 2018-04-26 Richard Biener <rguenther@suse.de>
13515 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13516 prologue cost vector and pass it to vect_get_load_cost.
13517 (vect_get_peeling_costs_all_drs): Likewise.
13518 (vect_peeling_hash_get_lowest_cost): Likewise.
13519 (vect_enhance_data_refs_alignment): Likewise.
13521 2018-04-26 Richard Biener <rguenther@suse.de>
13523 PR middle-end/85450
13524 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13525 checking of integer<->pointer conversions.
13526 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13527 sign-/zero-extending pointer types.
13528 (expand_omp_for_static_chunk): Likewise.
13530 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
13531 Jean Lee <xiaoyur347@gmail.com>
13533 * config/mips/mips.c (mips_asan_shadow_offset): New function.
13534 (TARGET_ASAN_SHADOW_OFFSET): Define.
13535 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13536 true for -fsanitize=address.
13538 2018-04-25 Mark Wielaard <mark@klomp.org>
13540 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13543 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13545 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13546 than "alu", remove explicit "memory" and "imm_disp" attributes.
13547 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13549 PR middle-end/85414
13550 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13551 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13552 gen_lowpart_no_emit.
13554 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
13557 * config/i386/i386.c (ix86_expand_builtin): Change memory
13558 operand to XI, extend p0 to Pmode.
13559 * config/i386/i386.md: Change unspec volatile and operand
13560 1 mode to XI, change operand 0 mode to P.
13562 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13564 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13565 GET_MODE_MASK before any checking.
13566 (nds32_can_use_bset_p): Likewise.
13567 (nds32_can_use_btgl_p): Likewise.
13569 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13571 * config/nds32/nds32-doubleword.md: New define_split pattern for
13572 illegal register number.
13574 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13576 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13578 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13580 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13582 2018-04-25 Richard Biener <rguenther@suse.de>
13584 * lto-streamer.h (LTO_major_version): Bump to 8.
13586 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13588 * BASE-VER: Set to 9.0.0.
13590 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
13592 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13593 in __abskf2 and __powikf2.
13595 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13598 * config/aarch64/constraints.md (Usg, Usj): New constraints.
13599 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13600 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13601 Use the above on operand 2. Reindent.
13602 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13604 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13607 * common/config/i386/i386-common.c (ix86_handle_option): Don't
13609 * config/i386/i386.opt (mcet): Removed.
13610 * doc/install.texi: Remove -mcet documentation.
13611 * doc/invoke.texi: Likewise.
13613 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13616 * doc/install.texi: Remove -mcet from bootstrap-cet.
13618 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13621 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13622 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13626 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13627 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13628 containing a CONST_VECTOR.
13630 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
13632 * doc/install.texi: Update newlib dependency for nvptx.
13634 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13637 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13638 instead of INTVAL when shifting x left.
13640 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
13642 PR tree-optimization/85478
13643 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13644 vect_grouped_store_supported for single element vectors.
13646 2018-04-24 Richard Biener <rguenther@suse.de>
13649 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13650 load cost increase to the case of non-constant step.
13652 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13655 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13656 destination if any_malformed_asm.
13658 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
13660 PR middle-end/85496
13661 * expr.c (store_field): In the bitfield case, if the value comes from
13662 a function call and is returned in registers by means of a PARALLEL,
13663 do not change the mode of the temporary unless BLKmode and VOIDmode.
13665 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
13667 PR rtl-optimization/85423
13668 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13669 dependencies to debug insns when the previous insn is non-debug.
13671 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13673 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13674 enums into a single definition.
13675 (fls): Fix predicates and printing.
13678 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13680 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13681 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13682 and short u6 immediate.
13683 (check_if_valid_sleep_operand): Remove.
13684 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13686 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13688 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13689 flag_always_save_lp condition.
13690 * config/nds32/nds32.opt (malways-save-lp): New option.
13692 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13694 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13695 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13696 * config/nds32/nds32.h
13697 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13698 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13700 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13702 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13703 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13705 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13706 Chung-Ju Wu <jasonwucj@gmail.com>
13708 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13710 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13711 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13713 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13715 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13717 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13719 * config/nds32/nds32-protos.h (nds32_data_alignment,
13720 nds32_local_alignment): Declare.
13721 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13722 nds32_local_alignment): New functions.
13723 (TARGET_CONSTANT_ALIGNMENT): Define.
13724 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13726 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13728 * config/nds32/nds32.c
13729 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13730 (TARGET_MODES_TIEABLE_P): Likewise.
13732 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13734 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13735 level Ofast and Og.
13737 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
13738 Chung-Ju Wu <jasonwucj@gmail.com>
13740 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13741 for unaligned access.
13742 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13744 * config/nds32/nds32-intrinsic.md: Likewise.
13745 * config/nds32/nds32_intrinsic.h: Likewise.
13746 * config/nds32/nds32.h (nds32_builtins): Likewise.
13747 * config/nds32/nds32.opt (munaligned-access): New option.
13748 * config/nds32/nds32.c (nds32_asm_file_start): Display
13749 flag_unaligned_access status.
13751 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13753 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
13754 -mno-relax is present.
13755 * config/riscv/linux.h (LINK_SPEC): Ditto.
13757 2018-04-20 Martin Sebor <msebor@redhat.com>
13760 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
13762 (gimple_fold_builtin_stxcpy_chk): Same.
13763 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
13765 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
13768 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
13769 __powikf2 when long double is IEEE 128-bit.
13771 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13773 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
13774 step to make sure stack always aligned.
13776 2018-04-20 Carl Love <cel@us.ibm.com>
13779 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13780 size check for arg0.
13782 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
13783 Tom de Vries <tom@codesourcery.com>
13786 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13787 Emit insns for calls too.
13788 (nvptx_find_par): Always look for worker-level predecessor insn.
13789 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
13791 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13792 (nvptx_process_pars): Propagate frames for calls.
13794 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
13797 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13799 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13800 (ix86_handle_option): Don't handle OPT_mibt.
13801 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13803 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13805 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13806 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13807 (ix86_target_macros): Define __CET__ with flag_cf_protection
13808 for -fcf-protection.
13809 * config/i386/i386.c (isa2_opts): Remove -mibt.
13810 * config/i386/i386.h (TARGET_IBT): Removed.
13811 (TARGET_IBT_P): Likewise.
13812 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13813 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13814 * config/i386/i386.opt (mcet): Update help message.
13815 (mshstk): Likewise.
13817 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
13818 -mcet as an alias for -mshstk.
13820 2018-04-20 Richard Biener <rguenther@suse.de>
13822 PR middle-end/85475
13823 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13824 complexity by forcing a single use of the multiply operand.
13826 2018-04-20 Martin Jambor <mjambor@suse.cz>
13829 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13830 recursion dependency to only apply to non-clones.
13832 2018-04-20 Martin Jambor <mjambor@suse.cz>
13835 * ipa-cp.c (create_specialized_node): Check that clones of
13836 self-recursive edges exist during IPA-CP.
13838 2018-04-19 Toon Moene <toon@moene.org>
13840 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
13843 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13845 PR tree-optimization/85467
13846 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
13847 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
13848 VECTOR_CST element to type.
13850 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13853 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
13854 * config/i386/i386.md (builtin_setjmp_setup): Removed.
13855 (builtin_longjmp): Likewise.
13856 (save_stack_nonlocal): New pattern.
13857 (restore_stack_nonlocal): Likewise.
13859 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13862 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13863 Replace ASM_OUTPUT_LABEL with fprintf.
13865 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13868 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13869 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
13870 * config/i386/i386-c.c (ix86_target_macros_internal): Also
13871 define __IBT__ and __SHSTK__ for -fcf-protection.
13872 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
13874 (ix86_trampoline_init): Likewise.
13875 (x86_output_mi_thunk): Likewise.
13876 (ix86_notrack_prefixed_insn_p): Likewise.
13877 (ix86_option_override_internal): Don't disallow -fcf-protection.
13878 * config/i386/i386.md (rdssp<mode>): Also enable for
13880 (incssp<mode>): Likewise.
13881 (nop_endbr): Likewise.
13882 * config/i386/i386.opt (mcet): Change help message to built-in
13885 (mshstk): Likewise.
13886 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
13887 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
13888 enable CET built-in functions.
13890 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
13892 * common/config/i386/i386-common.c
13893 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
13894 OPTION_MASK_ISA_MOVDIRI_UNSET,
13895 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
13896 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
13897 * config.gcc (movdirintrin.h): New header.
13898 * config/i386/cpuid.h (bit_MOVDIRI,
13899 bit_MOVDIR64B): New bits.
13900 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
13902 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
13903 (VOID, PVOID, PCVOID)): New function types.
13904 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
13905 __builtin_ia32_directstoreu_u64,
13906 __builtin_ia32_movdir64b): New builtins.
13907 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
13908 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
13910 (ix86_valid_target_attribute_inner_p): Ditto.
13911 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
13912 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
13913 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
13914 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
13915 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
13916 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
13917 (movdiri<mode>, movdir64b_<mode>): New.
13918 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
13919 * config/i386/immintrin.h: Include movdirintrin.h.
13920 * config/i386/movdirintrin.h: New file.
13921 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
13923 2018-04-19 Richard Biener <rguenther@suse.de>
13925 PR middle-end/85455
13926 * cfg.c (clear_bb_flags): When loop state says we have
13927 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13929 2018-04-19 Richard Biener <rguenther@suse.de>
13931 PR tree-optimization/84737
13932 * tree-vect-data-refs.c (vect_copy_ref_info): New function
13933 copying restrict info.
13934 (vect_setup_realignment): Use it.
13935 * tree-vectorizer.h (vect_copy_ref_info): Declare.
13936 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
13937 the first DR to all generated stores.
13938 (vectorizable_load): Likewise for loads.
13940 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13942 PR tree-optimization/85446
13943 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
13944 the integral and pointer types to have the same precision.
13946 * doc/install.texi: Document --disable-cet being the default and
13949 2018-04-18 Martin Liska <mliska@suse.cz>
13951 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
13954 2018-04-18 Martin Liska <mliska@suse.cz>
13957 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13960 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13961 arguments if they are comparable.
13963 2018-04-18 Martin Liska <mliska@suse.cz>
13966 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13969 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13972 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
13975 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
13976 ENDBR after calling __morestack.
13978 2018-04-18 David Malcolm <dmalcolm@redhat.com>
13981 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
13982 by using gcc_base_ver to generate a gcc_driver_version, and use
13983 it when generating GCC_DRIVER_NAME.
13984 * configure: Regenerate.
13986 2018-04-18 Jakub Jelinek <jakub@redhat.com>
13989 * config.gcc: Obsolete powerpc*-*-*spe*.
13991 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13994 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
13995 (stabstr_D): Change type of unum from unsigned int to
13996 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
13999 2018-04-17 Jim Wilson <jimw@sifive.com>
14002 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14003 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14004 Set arg_pointer_offset after using pretend_args_size.
14006 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14008 PR rtl-optimization/85431
14009 * dse.c (record_store): Ignore zero width stores.
14012 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14013 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14014 __builtin_stack_restore rather than after it.
14015 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14016 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14017 argument instead of virtual_dynamic_stack_rtx.
14019 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14021 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14023 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14024 Add note to error message to explain internal mapping of overloaded
14025 built-in function name to non-overloaded built-in function name.
14026 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14029 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14032 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14033 where the inputs overlap with the output.
14035 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14037 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14038 (=v, v) alternative and explicit "memory" attribute.
14039 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14040 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14042 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14043 "sselog1" type instead of "sselog".
14044 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14045 "sselog". Remove explicit "memory" attribute.
14046 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14047 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14049 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14050 "sselog1" type instead of "sselog". Remove explicit "memory"
14052 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14053 use "sselog1" type instead of "sselog". Remove explicit "memory"
14055 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14056 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14058 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14059 "sselog1" type instead of "sselog". Remove explicit "memory"
14061 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14062 use "sselog1" type instead of "sselog". Remove explicit "memory"
14066 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14068 PR middle-end/85414
14069 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14072 2018-04-17 Martin Jambor <mjambor@suse.cz>
14075 * ipa-cp.c (create_specialized_node): Call
14076 expand_all_artificial_thunks if necessary.
14078 2018-04-17 Martin Liska <mliska@suse.cz>
14081 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14082 in message, remote space in between '_G' and '('.
14084 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14087 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14088 avx512f_vmcmp<mode>3<round_saeonly_name>,
14089 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14090 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14091 avx512f_rndscale<mode><round_saeonly_name>,
14092 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14093 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14094 Use %<iptr>2 instead of %2 for -masm=intel.
14095 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14096 avx512f_vcvttss2usi<round_saeonly_name>,
14097 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14099 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14100 avx512f_vcvttsd2usi<round_saeonly_name>,
14101 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14102 Use %q1 instead of %1 for -masm=intel.
14103 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14104 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14105 of %3 for -masm=intel.
14106 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14108 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14110 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14112 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14113 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14115 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14117 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14118 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14119 %g1 and one with %0 and %1.
14120 (avx512er_vmrcp28<mode><round_saeonly_name>,
14121 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14122 %1 for -masm=intel.
14123 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14124 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14125 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14126 of %0 and %{%4%} for -masm=intel.
14127 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14128 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14129 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14130 order of %0 and %{%5%}%{z%} for -masm=intel.
14132 2018-04-17 Jan Hubicka <jh@suse.cz>
14135 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14137 2018-04-17 Martin Liska <mliska@suse.cz>
14140 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14141 for target_clone error message. Make default implementation
14142 clone to be a local declaration.
14143 (separate_attrs): Add new argument and check for an empty
14145 (expand_target_clones): Handle it.
14146 (ipa_target_clone): Make redirection just for target_clones
14149 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14150 Tom de Vries <tom@codesourcery.com>
14152 PR middle-end/84955
14153 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14154 tiled basic blocks without omp continue statements.
14156 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14159 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14160 vec_extract expression as having side effects to make sure it gets
14163 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14166 * config/i386/i386.c (get_builtin_code_for_version): Check
14169 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14172 * config.gcc: Support "skylake".
14173 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14175 * config/i386/i386.c (m_SKYLAKE): Define.
14176 (processor_target_table): Add "skylake".
14177 (ix86_option_override_internal): Add "skylake".
14178 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14179 PROCESSOR_CANNONLAKE.
14180 (get_builtin_code_for_version): Fix priority for
14181 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14182 PROCESSOR_SKYLAKE-AVX512.
14183 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14184 (processor_type): Add PROCESSOR_SKYLAKE.
14186 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14187 Jason Merrill <jason@redhat.com>
14190 * convert.c (convert_to_integer_1): Use direct recursion for
14191 enumeral types and types with a precision less than the number
14192 of bits in their mode.
14194 2018-04-16 Julia Koval <julia.koval@intel.com>
14197 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14198 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14200 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14203 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14204 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14205 and -mno-direct-move.
14207 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14210 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14211 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14212 Ensure negative shifts result in {0}.
14214 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14216 PR rtl-optimization/79916
14217 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14218 regs (if any) to define how to gnerate SD moves when LRA is in
14221 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14223 PR rtl-optimization/85393
14224 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14225 * except.c (expand_dw2_landing_pad_for_region): Make static.
14226 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14227 a label and unconditional jump to old_bb, rather than
14228 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14231 PR rtl-optimization/85376
14232 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14233 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14234 instead of a specific value.
14236 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14237 Bin Cheng <bin.cheng@arm.com>
14239 PR tree-optimization/82965
14240 PR tree-optimization/83991
14241 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14242 by_profile_only parameter.
14243 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14244 information if the loop was predicted to iterate too many times.
14245 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14247 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14250 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14253 2018-04-13 Martin Liska <mliska@suse.cz>
14254 Jakub Jelinek <jakub@redhat.com>
14256 PR middle-end/81657
14257 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14258 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14259 * builtins.c (expand_builtin_memory_copy_args): Use
14260 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14261 handle dest_addr == pc_rtx.
14263 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14266 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14267 asked to not generate direct moves.
14268 (fix_trunc<mode>si2_stfiwx): Similar.
14269 (fix_trunc<mode>si2_internal): Similar.
14271 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14274 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14275 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14276 lookup if dest in some wider mode is known to be const0_rtx and
14277 if so, record permanent equivalence for it to be ZERO_EXTEND of
14278 the narrower mode destination.
14280 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14282 * lto-streamer-out.c (output_function): Revert 259346.
14283 * omp-expand.c (expand_oacc_for): Likewise.
14285 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14287 PR rtl-optimization/85354
14288 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14289 * sel-sched.c (sel_global_init): ... here.
14291 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14294 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14295 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14296 mode for PE-COFF targets.
14297 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14298 (i386_pe_asm_lto_end): Likewise.
14299 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14300 (TARGET_ASM_LTO_END): Likewise.
14301 * config/i386/winnt.c (saved_debug_info_level): New static variable.
14302 (i386_pe_asm_lto_start): New function.
14303 (i386_pe_asm_lto_end): Likewise.
14305 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14306 Richard Biener <rguenther@suse.de>
14308 PR middle-end/84955
14309 * lto-streamer-out.c (output_function): Fix CFG loop state before
14311 * omp-expand.c (expand_oacc_for): Handle calls to internal
14312 functions like regular functions.
14314 2018-04-12 Richard Biener <rguenther@suse.de>
14317 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14318 for the early LTO debug to properly generate references to it
14319 during DIE emission. Do not re-use that for the skeleton for
14321 (dwarf2out_early_finish): Likewise.
14323 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14326 * config/i386/sse.md
14327 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14328 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14329 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14330 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14331 and output is a reg, avoid creating invalid lowpart subreg, but
14332 instead split into a 512-bit move. Don't split if not AVX512VL,
14333 input is xmm16+ reg and output is a mem.
14334 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14335 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14336 xmm16+ reg and output is a mem.
14338 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14340 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14341 also for flag_dwarf2_cfi_asm.
14343 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14345 PR rtl-optimization/85342
14346 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14347 a bool scalar var inside of the loop instead. Don't try to update
14348 recog_data.operand after failed apply_change_group.
14350 2018-04-12 Tom de Vries <tom@codesourcery.com>
14353 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14354 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
14355 array with flexible array member as array without given dimension.
14356 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14357 argument for undefined param to true.
14359 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
14362 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14363 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14364 from PowerPC section.
14365 * config/rs6000/sysv4.opt (mcall-): Improve help text.
14366 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14367 help text that is too long.
14368 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14369 help text that is too long.
14370 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14371 help text that is too long.
14373 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
14375 * config/alpha/alpha.md (stack_probe_internal): Rename
14376 from "probe_stack". Update all callers.
14378 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14380 PR rtl-optimization/84566
14381 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14382 sched_macro_fuse_insns.
14384 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14387 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14388 (compute_block_dependences): ... from here.
14390 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14392 PR tree-optimization/85331
14393 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14394 from int to HOST_WIDE_INT.
14396 2018-04-11 Martin Jambor <mjambor@suse.cz>
14399 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14400 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14401 not the same as the source val.
14402 (cgraph_edge_brings_value_p): New parameter.
14403 (gather_edges_for_value): Pass destination value to
14404 cgraph_edge_brings_value_p.
14405 (perhaps_add_new_callers): Likewise.
14406 (get_info_about_necessary_edges): Likewise and exclude values brought
14407 only by self-recursive edges.
14408 (create_specialized_node): Redirect only clones of self-calling edges.
14409 (+self_recursive_pass_through_p): New function.
14410 (find_more_scalar_values_for_callers_subset): Use it.
14411 (find_aggregate_values_for_callers_subset): Likewise.
14412 (known_aggs_to_agg_replacement_list): Removed.
14413 (decide_whether_version_node): Re-calculate known constants for all
14414 remaining context clones.
14416 2018-04-11 Richard Biener <rguenther@suse.de>
14419 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14420 from early DWARF output.
14421 (dwarf2out_early_finish): Output line info unconditionally into
14422 early DWARF and add reference to it.
14424 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14427 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14428 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14429 other than V2DFmode using iptr mode attribute.
14430 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14432 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14434 PR rtl-optimization/84659
14435 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14437 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14440 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14442 (output_loc_list): Pass address of a dummy size variable even in the
14443 locview handling loop.
14444 (index_location_lists): Add comment on why skip_loc_list_entry can't
14447 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
14450 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14453 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
14456 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14457 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14458 and -mstring-compare-inline-limit.
14460 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14463 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14464 for stack clash protection in a register whenever we need it to be in
14467 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14469 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14470 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14472 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14475 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14477 (mlong-double-): Ditto.
14478 * config/rs6000/sysv4.opt (msdata=): Ditto.
14479 (mtls-size=): Ditto.
14481 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14483 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14484 erroneous entries for
14485 "vector int vec_ldl (int, long int *)", and
14486 "vector unsigned int vec_ldl (int, unsigned long int *)".
14487 Add comments and entries for
14488 "vector bool char vec_ldl (int, bool char *)",
14489 "vector bool short vec_ldl (int, bool short *)",
14490 "vector bool int vec_ldl (int, bool int *)",
14491 "vector bool long long vec_ldl (int, bool long long *)",
14492 "vector pixel vec_ldl (int, pixel *)",
14493 "vector long long vec_ldl (int, long long *)",
14494 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14495 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14496 type tree bool_long_long_type_node and correct definition of
14497 bool_V2DI_type_node to make reference to this new type tree.
14498 (rs6000_mangle_type): Replace erroneous reference to
14499 bool_long_type_node with bool_long_long_type_node.
14500 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14501 comments to emphasize sign distinctions for char and int types and
14502 replace RS6000_BTI_bool_long constant with
14503 RS6000_BTI_bool_long_long constant. Also add comment to restrict
14504 use of RS6000_BTI_pixel.
14505 (bool_long_type_node): Remove this macro definition.
14506 (bool_long_long_type_node): New macro definition
14508 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14510 PR rtl-optimization/85300
14511 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14512 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14513 simplify_unary_operation fails.
14515 2018-04-10 Martin Liska <mliska@suse.cz>
14517 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14518 cgraph_edge and ipa_ref.
14520 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14524 * config/i386/sse.md
14525 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14526 computation of the VEC_MERGE selector from mask.
14527 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14528 Fix decoding of the VEC_MERGE selector into mask.
14530 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14532 PR tree-optimization/85286
14533 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14535 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14537 * final.c (final_1): Set insn_last_address as well as
14538 insn_current_address.
14540 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14543 * explow.c (emit_stack_probe): Call validize_mem on memory location
14544 before passing it to gen_probe_stack. Create address operand and
14545 legitimize it for the probe_stack_address case.
14547 2018-04-09 Jan Hubicka <jh@suse.cz>
14550 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14551 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14552 * tree.c (free_lang_data_in_type): Fix handling of binfos;
14554 (free_lang_data): Rebuild type inheritance graph.
14556 2018-04-09 Martin Sebor <msebor@redhat.com>
14558 * invoke.texi (-finline-small-functions): Mention other optimization
14560 (-findirect-inlining, -fpartial-inlining): Same.
14561 (-finline-functions-called-once): Same.
14562 (-freorder-blocks-and-partition): Same.
14564 2018-04-09 Jan Hubicka <jh@suse.cz>
14567 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14568 jumps; choose last target that matches the criteria (i.e.
14569 no partition changes for non-crossing jumps).
14570 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14571 support for redirecting crossing jumps to non-crossing.
14573 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
14575 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14576 also for naked functions.
14578 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
14580 * config/arc/arc.md (add_shift): New pattern.
14581 (add_shift2): Likewise.
14582 (sub_shift): Likewise.
14583 (sub_shift_cmp0_noout): Likewise.
14584 (compare_si_ashiftsi): Likewise.
14585 (xbfu_cmp0_noout): New combine pattern.
14586 (xbfu_cmp0"): Likewise.
14587 (movsi_set_cc_insn): Place the predicable variant first.
14588 (commutative_binary_cmp0_noout): Remove clobber.
14589 (commutative_binary_cmp0): New pattern.
14590 (noncommutative_binary_cmp0): Likewise.
14591 (noncommutative_binary_cmp0_noout): Likewise.
14592 (noncommutative_binary_comparison_result_used): Removed.
14593 (rsub_cmp0): New pattern.
14594 (rsub_cmp0_noout): Likewise.
14595 (extzvsi): Changed, keep only meaningful variants.
14596 (SQH, SEZ): New iterators.
14597 (SQH_postfix): New mode attribute.
14598 (SEZ_prefix): New code attribute.
14599 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14600 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14601 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14602 of numerical value.
14603 (noncommutative_operator): Check the availability of barrel
14606 2018-04-09 Richard Biener <rguenther@suse.de>
14608 PR tree-optimization/85284
14609 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14610 Only use the niter constraining form of simple_iv when the exit
14611 is always executed.
14613 2018-04-09 Tom de Vries <tom@codesourcery.com>
14616 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14617 (define_expand "*memory_barrier"): New define_expand.
14618 (define_insn "memory_barrier"): New insn.
14620 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14622 PR rtl-optimization/80463
14623 PR rtl-optimization/83972
14624 PR rtl-optimization/83480
14626 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14627 correct producer for the insn.
14628 (tidy_control_flow): Fixup seqnos in case of debug insns.
14630 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14632 PR rtl-optimization/83913
14634 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14635 different sched-times when merging exprs.
14637 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14639 PR rtl-optimization/83962
14641 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14642 tidy_fallthru_edge and tidy_control_flow.
14644 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14646 PR rtl-optimization/83530
14648 * sel-sched.c (force_next_insn): New global variable.
14649 (remove_insn_for_debug): When force_next_insn is true, also leave only
14650 next insn in the ready list.
14651 (sel_sched_region): When the region wasn't scheduled, make another pass
14652 over it with force_next_insn set to 1.
14654 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14656 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14658 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14659 for interrupt control.
14660 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14661 functions for interrupt control.
14662 * config/nds32/nds32-intrinsic.md: Likewise.
14663 * config/nds32/nds32_intrinsic.h: Likewise.
14664 * config/nds32/nds32.h (nds32_builtins): Likewise.
14666 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14668 * config/nds32/nds32.c (nds32_init_machine_status,
14669 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14670 strict_aligned_p field.
14671 (nds32_expand_to_rtl_hook): New function.
14672 (TARGET_EXPAND_TO_RTL_HOOK): Define.
14673 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14675 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14676 Chung-Ju Wu <jasonwucj@gmail.com>
14678 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14679 * config/nds32/nds32-n7.md: New file.
14680 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14681 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14683 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14684 * config/nds32/nds32.md (pipeline_model): Add n7.
14685 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14686 * config/nds32/pipelines.md: Include n7 settings.
14688 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14689 Chung-Ju Wu <jasonwucj@gmail.com>
14691 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14692 * config/nds32/nds32-e8.md: New file.
14693 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14694 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14696 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14697 * config/nds32/nds32.md (pipeline_model): Add e8.
14698 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14699 * config/nds32/pipelines.md: Include e8 settings.
14701 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14702 Chung-Ju Wu <jasonwucj@gmail.com>
14704 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14705 * config/nds32/nds32-n8.md: New file.
14706 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14707 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14709 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14710 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14711 * config/nds32/nds32.md (pipeline_model): Add n8.
14712 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14713 * config/nds32/pipelines.md: Include n8 settings.
14715 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14716 Chung-Ju Wu <jasonwucj@gmail.com>
14718 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14719 * config/nds32/nds32-n9-2r1w.md: New file.
14720 * config/nds32/nds32-n9-3r2w.md: New file.
14721 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14722 nds32_register_ports): New or modify for cpu n9.
14723 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14725 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14726 * config/nds32/nds32-utils.c: New file.
14727 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14728 TARGET_MUL_SLOW): Define.
14729 * config/nds32/nds32.md (pipeline_model): New attribute.
14730 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14731 New options that support cpu n9.
14732 * config/nds32/pipelines.md: Include n9 settings.
14733 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14735 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14737 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14738 information if necessary.
14739 (output_cond_branch_compare_zero): Likewise.
14740 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14741 (nds32_target_alignment): Refine for alignment.
14742 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14743 (FUNCTION_BOUNDARY): Modify.
14744 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14746 * config/nds32/nds32.opt (malways-align, malign-functions): New.
14748 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14750 * config/nds32/constants.md (unspec_volatile_element): Add values for
14751 TLB operation and data prefetch.
14752 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14753 functions for TLB operation and data prefetch.
14754 * config/nds32/nds32-intrinsic.md: Likewise.
14755 * config/nds32/nds32_intrinsic.h: Likewise.
14756 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
14757 (nds32_print_operand): Likewise.
14758 * config/nds32/nds32.h (nds32_builtins): Likewise.
14760 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
14761 Andrew Pinski <pinsika@gcc.gnu.org>
14763 PR middle-end/82976
14764 * match.pd: Use constant_boolean_node of correct type instead of
14765 boolean_true_node or boolean_false_node for simplifying
14766 pointer comparisons to zero.
14768 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14770 PR tree-optimization/80021
14771 * tree.c (verify_type_variant): Make error call in verify_variant_match
14772 translatable and remove final full stop.
14774 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14776 * config/nds32/constants.md (unspec_volatile_element): Add
14777 UNSPEC_VOLATILE_EH_RETURN.
14778 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14779 nds32_output_stack_pop): Support dwarf exception handling process.
14780 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14781 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14782 exception handling process.
14783 (nds32_compute_stack_frame): Likewise.
14784 (nds32_return_addr_rtx): Likewise.
14785 (nds32_initial_elimination_offset): Likewise.
14786 (nds32_expand_prologue): Likewise.
14787 (nds32_expand_epilogue): Likewise.
14788 (nds32_dynamic_chain_address): New function.
14789 * config/nds32/nds32.h (machine_function): Add fields for dwarf
14790 exception handling.
14791 (DYNAMIC_CHAIN_ADDRESS): Define.
14792 (EH_RETURN_DATA_REGNO): Define.
14793 (EH_RETURN_STACKADJ_RTX): Define.
14794 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14795 patterns for dwarf exception handling.
14797 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14799 * config/nds32/nds32.h: Clean up obsolete macros.
14801 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14803 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14804 Add enum values for particular instructions.
14805 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14806 particular intrinsic functions.
14807 * config/nds32/nds32-intrinsic.md: Likewise.
14808 * config/nds32/nds32_intrinsic.h: Likewise.
14809 * config/nds32/nds32.h (nds32_builtins): Likewise.
14810 * config/nds32/nds32.md (type): Add pbsad and pbsada.
14811 (btst, ave): New patterns for particular instructions.
14813 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14815 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14816 Add enum values for atomic load/store and memory sync.
14817 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14819 * config/nds32/nds32-intrinsic.md: Likewise.
14820 * config/nds32/nds32_intrinsic.h: Likewise.
14821 * config/nds32/nds32.h (nds32_builtins): Likewise.
14823 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14825 PR tree-optimization/85257
14826 * fold-const.c (native_encode_vector): If not all elts could fit
14827 and off is -1, return 0 rather than offset.
14828 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14829 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14830 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
14831 adjust buffer in native_interpret_expr call.
14833 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14835 * config/nds32/constants.md (unspec_volatile_element): Add cache
14836 control enum values.
14837 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
14838 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
14839 * config/nds32/nds32.c (nds32_cctl_names): New.
14840 (nds32_print_operand): Handle cache control register names.
14841 * config/nds32/nds32.h (nds32_builtins): New enum values.
14842 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
14844 * config/nds32/nds32.md (type): Add mmu.
14845 * config/nds32/pipelines.md (simple_insn): Add mmu.
14847 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14849 * config/nds32/nds32.md (type): Remove call.
14850 * config/nds32/pipelines.md (simple_insn): Likewise.
14852 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14854 * config/nds32/constants.md (unspec_volatile_element): Add
14855 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
14856 UNSPEC_VOLATILE_FMFCFG.
14857 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
14858 description for fmfcfg and fmfcsr.
14859 (bdesc_1arg): Add fmtcsr.
14860 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
14861 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
14862 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
14863 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
14864 unspec_fmfcfg): New patterns.
14865 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
14866 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
14867 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
14868 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
14869 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
14870 __nds32__fmfcfg): Define.
14872 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14874 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
14875 intrinsic register names.
14876 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
14877 intrinsic register enum values and macros.
14879 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14881 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
14882 for load/store addressing form.
14883 (nds32_print_operand_address): Likewise.
14885 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
14888 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
14889 based on LABEL_REF. Remove useless assertion.
14890 (pic_address_needs_scratch): Fix formatting.
14891 (sparc_legitimize_pic_address): Minor tweaks.
14892 (sparc_delegitimize_address): Adjust assertion accordingly.
14893 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
14894 into symbolic_operand.
14895 (movsi_high_pic_label_ref): Likewise.
14896 (movsi_lo_sum_pic_label_ref): Likewise.
14897 (movdi_pic_label_ref): Likewise.
14898 (movdi_high_pic_label_ref): Likewise.
14899 (movdi_lo_sum_pic_label_ref): Likewise.
14901 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
14903 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
14904 custom LIB_SPEC setup.
14906 2018-04-06 Ruslan Bukin <br@bsdpad.com>
14907 Kito Cheng <kito.cheng@gmail.com>
14909 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
14910 * config/riscv/freebsd.h: New.
14912 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14914 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
14915 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
14918 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14919 Kito Cheng <kito.cheng@gmail.com>
14921 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
14922 nds32_output_call, nds32_symbol_binds_local_p): New functions.
14923 * config/nds32/nds32-protos.h (nds32_output_call,
14924 nds32_output_return): Declare.
14925 * config/nds32/nds32.md: Refine all the call and return patterns.
14927 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14930 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
14931 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
14933 PR rtl-optimization/84872
14934 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
14935 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
14936 EDGE_CROSSING edge.
14938 2018-04-06 Tamar Christina <tamar.christina@arm.com>
14940 * expr.c (copy_blkmode_to_reg): Revert 254862.
14941 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
14943 2018-04-06 Richard Biener <rguenther@suse.de>
14945 PR middle-end/85244
14946 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
14947 after seeing a component reference with an adjacent field. Treat
14948 refs to arrays at struct end of external decls similar to
14949 refs to unconstrained commons.
14951 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14954 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
14955 look through SAVE_EXPRs with non-side-effects argument. Adjust
14957 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
14960 2018-04-06 Richard Biener <rguenther@suse.de>
14962 PR middle-end/85180
14963 * alias.c (find_base_term): New wrapper around find_base_term
14964 unwinding CSELIB_VAL_PTR changes.
14965 (find_base_term): Do not restore CSELIB_VAL_PTR during the
14968 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14970 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
14972 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
14973 constant definitions.
14974 ("nop"): lr 0,0 -> nopr r0
14975 ("nop_lr0", "nop_lr1"): New insn definitions.
14977 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14979 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
14980 NDS32_V3PUSH_AVAILABLE_P macro.
14982 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
14983 Chung-Ju Wu <jasonwucj@gmail.com>
14985 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
14986 (nds32*-*-*): Add float and fpu_config into supported_defaults.
14987 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
14988 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
14989 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
14990 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
14991 * config/nds32/constraints.md: New constraints and checking for hard
14992 float configuration.
14993 * config/nds32/iterators.md: New mode iterator and attribute for hard
14994 float configuration.
14995 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
14997 * config/nds32/nds32-fpu.md: New file.
14998 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
14999 deal with hard float code generation.
15000 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15002 (abi_type, float_reg_number): New enum type.
15003 * config/nds32/nds32-predicates.c: New predicates for hard float.
15004 * config/nds32/nds32-protos.h: Declare functions for hard float.
15005 * config/nds32/nds32.c: Implementation for hard float configuration.
15006 * config/nds32/nds32.h: Definitions for hard float configuration.
15007 * config/nds32/nds32.md: Include hard float machine description and
15008 modify patterns for hard float configuration.
15009 * config/nds32/nds32.opt: New options for hard float configuration.
15010 * config/nds32/predicates.md: New predicates for hard float
15013 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15015 * common/config/nds32/nds32-common.c
15016 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15018 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15020 PR middle-end/85195
15021 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15022 CONSTRUCTOR_ELT (ctor, ...)->value.
15024 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15027 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15029 2018-04-05 Tom de Vries <tom@codesourcery.com>
15032 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15035 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15036 Kito Cheng <kito.cheng@gmail.com>
15038 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15039 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15040 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15041 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15043 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15044 Kito Cheng <kito.cheng@gmail.com>
15046 * config/nds32/constraints.md (Ufe): New memory constraint.
15047 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15048 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15049 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15051 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15052 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15054 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15056 * config/nds32/nds32.md: Use optimize_size in the condition for
15057 alu-shift instructions.
15059 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15061 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15063 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15065 * config/nds32/nds32.md (negsi2): Refine pattern.
15067 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15068 Chung-Ju Wu <jasonwucj@gmail.com>
15070 * config/nds32/iterators.md (shift_rotate): New code iterator.
15071 (shift): New code attribute.
15072 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15073 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15074 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15075 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15076 bit-wise operations.
15077 (andsi3, *andsi3): Ditto.
15078 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15079 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15080 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15081 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15082 nds32_ior_operand, nds32_xor_operand): New predicates.
15084 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15086 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15087 (addsi3, subsi3): ... this.
15089 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15091 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15093 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15095 * config/nds32/nds32.md: Adjust indention.
15097 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15099 * config/nds32/nds32.md (feature): New attribute.
15101 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15103 * config/nds32/nds32.md (subtype): New attribute.
15105 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15108 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15109 expansion to perform a bitwise AND of the argument followed by a
15110 boolean negation of the result.
15112 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15114 PR rtl-optimization/84878
15115 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15116 the basic block. Assert the use reference is not artificial and that
15117 it has an associated insn.
15119 2018-04-04 Michael Matz <matz@suse.de>
15121 * builtins.c (compute_objsize): Pass correct operand
15122 to array_at_struct_end_p.
15124 2018-04-04 Richard Biener <rguenther@suse.de>
15127 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15128 from contexts for DINFO_LEVEL_TERSE and below.
15130 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15132 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15133 resiter_operand condition.
15134 * config/nds32/nds32.md (*move<mode>): Ditto.
15136 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15137 Monk Chiang <sh.chiang04@gmail.com>
15139 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15141 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15143 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15145 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15146 Kito Cheng <kito.cheng@gmail.com>
15148 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15149 nds32_cond_code_str, output_cond_branch,
15150 output_cond_branch_compare_zero, nds32_expand_cbranch,
15151 nds32_expand_cstore, nds32_expand_movcc,
15152 nds32_output_cbranchsi4_equality_zero,
15153 nds32_output_cbranchsi4_equality_reg,
15154 nds32_output_cbranchsi4_equality_reg_or_const_int,
15155 nds32_output_cbranchsi4_greater_less_zero: New functions.
15156 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15157 nds32_expand_cstore, nds32_expand_movcc,
15158 nds32_output_cbranchsi4_equality_zero,
15159 nds32_output_cbranchsi4_equality_reg,
15160 nds32_output_cbranchsi4_equality_reg_or_const_int,
15161 nds32_output_cbranchsi4_greater_less_zero): Declare.
15162 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15163 nds32_rimm11s_operand): New predicates.
15164 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15165 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15168 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15170 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15171 * config/nds32/nds32.md: Ditto.
15172 * config/nds32/pipelines.md: Ditto.
15174 2018-04-04 Richard Biener <rguenther@suse.de>
15176 PR tree-optimization/85168
15177 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15178 propagating abnormals.
15180 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15182 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15184 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15185 Kito Cheng <kito.cheng@gmail.com>
15187 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15188 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15189 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15190 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15191 * config/nds32/nds32.md (sibcall_internal): New.
15192 (sibcall_register): Remove.
15193 (sibcall_immediate): Remove.
15194 (sibcall_value_internal): New.
15195 (sibcall_value_register): Remove.
15196 (sibcall_value_immediate): Remove.
15197 * config/nds32/predicates.md (nds32_general_register_operand): New.
15198 (nds32_call_address_operand): New.
15200 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15202 PR rtl-optimization/85167
15203 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15204 bb_defs if *split_p, instead preinitialize it to NULL.
15206 PR tree-optimization/85156
15207 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15208 evaluating the argument multiple times.
15210 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15212 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15214 (_mm_cvtpd_ps): Likewise.
15215 (_mm_cvttpd_epi32): Likewise.
15216 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15217 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15218 vector, pixel, and bool following altivec.h include.
15220 2018-04-03 Martin Sebor <msebor@redhat.com>
15222 * doc/extend.texi (Common Function Attributes): Clarify.
15223 (const attribute): Likewise.
15224 (pure attribute): Likewise.
15226 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15229 * config/i386/i386.c (ix86_expand_vector_set): Use
15230 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15232 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15234 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15235 instructions when changing rounding bits to preserve precision bits
15236 in the x87 control word.
15238 2018-04-03 Martin Liska <mliska@suse.cz>
15240 PR tree-optimization/82491
15241 * rtl.h (strip_offset_and_add): Replace += suboffset with
15242 poly_uint64 () + suboffset.
15244 2018-03-29 Martin Liska <mliska@suse.cz>
15245 Martin Jambor <mjambor@suse.cz>
15248 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15249 param_type is not an integral or pointer type.
15251 2018-04-03 Richard Biener <rguenther@suse.de>
15253 * sese.h (recompute_all_dominators): Remove.
15255 2018-04-02 Martin Sebor <msebor@redhat.com>
15257 * doc/invoke.texi (-Wrestrict): Fix typos.
15259 2018-04-02 Jim Wilson <jimw@sifive.com>
15261 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15262 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15263 (<optab>di3, <optab>si3_extend): Likewise.
15264 (<optab>si3_mask, <optab>si3_mask_1): New.
15265 (<optab>di3_mask, <optab>di3_mask_1): New.
15266 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15267 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15268 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15270 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15272 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15275 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15277 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15278 (nds32_canonicalize_comparison): New function.
15280 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15281 Kito Cheng <kito.cheng@gmail.com>
15282 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15284 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15285 * config/nds32/constants.md (unspec_volatile_element): Add
15286 UNSPEC_VOLATILE_RELAX_GROUP.
15287 * config/nds32/nds32-relax-opt.c: New file.
15288 * config/nds32/nds32-predicates.c
15289 (nds32_symbol_load_store_p): New function.
15290 * config/nds32/nds32-protos.h
15291 (nds32_symbol_load_store_p): Declare function.
15292 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15293 * config/nds32/nds32.c
15294 (nds32_register_pass): New function to register pass.
15295 (nds32_register_passes): New function to register passes.
15296 * config/nds32/nds32.md (relax_group): New pattern.
15297 * config/nds32/nds32.opt (mrelax-hint): New option.
15298 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15300 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
15302 * config/nds32/t-nds32: Modify files dependency.
15304 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15306 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15307 (PROFILE_HOOK): Define its implementation.
15309 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15311 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15312 type and 32-bit size.
15314 2018-04-01 Jakub Jelinek <jakub@redhat.com>
15316 PR middle-end/85090
15317 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15318 (V_128_256): New mode iterator.
15319 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15320 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15321 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15323 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15324 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15326 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
15329 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15330 NaN inputs correctly.
15332 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
15335 * config/rs6000/vsx.md (??r): New mode attribute.
15336 (*vsx_mov<mode>_64bit): Use it.
15337 (*vsx_mov<mode>_32bit): Likewise.
15339 2018-03-30 Martin Sebor <msebor@redhat.com>
15341 PR tree-optimization/84818
15342 * builtins.c (check_access): Use warning_n.
15344 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15347 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15349 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15352 2018-03-30 Julia Koval <julia.koval@intel.com>
15355 * x86-tune.def (movx, partial_reg_dependency): Enable for
15358 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
15360 PR inline-asm/84985
15361 * lra-constraints.c (process_alt_operands): Move setting
15362 this_alternative_matches below.
15364 2018-03-29 Martin Liska <mliska@suse.cz>
15367 * doc/invoke.texi: Document how LTO works with debug info.
15368 Describe auto-load support of binutils. Mention 'x86-64'
15369 as valid option value of -march option.
15371 2018-03-29 Jakub Jelinek <jakub@redhat.com>
15373 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15376 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15377 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15378 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15381 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15384 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15385 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15386 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15387 for RS6000_BTM_POWERPC64.
15388 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15389 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15390 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15393 (DIVDEU): Likewise.
15395 2018-03-28 Carl Love <cel@us.ibm.com>
15398 2017-09-27 Carl Love <cel@us.ibm.com>
15400 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15401 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15402 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15405 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15407 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15408 instead of __vector bool.
15409 (_mm_max_pu8): Likewise.
15410 (_mm_min_pi16): Likewise.
15412 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15415 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15416 (DIVWEUO): Likewise.
15417 (DIVDEO): Likewise.
15418 (DIVDEUO): Likewise.
15419 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15420 DIVWEUO and DIVDEUO.
15421 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15422 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15423 (div_extend): Likewise.
15424 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15426 (__builtin_divweuo): Likewise.
15427 (__builtin_divdeo): Likewise.
15428 (__builtin_divdeuo): Likewise.
15430 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15433 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15434 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15436 PR tree-optimization/82004
15437 * gimple-match-head.c (optimize_pow_to_exp): New function.
15438 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15439 Don't fold to exp if optimize_pow_to_exp is false.
15441 2018-03-28 Martin Liska <mliska@suse.cz>
15444 * calls.c (initialize_argument_information): Fix trailing space.
15445 * common.opt: Fix typo and provide better explanation for
15446 -fsanitize-coverage option.
15447 * config/i386/i386.opt: Fix typo.
15449 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15450 Martin Liska <mliska@suse.cz>
15453 * gimplify.c (asan_poison_variable): Don't do the check for
15454 gimplify_omp_ctxp here.
15455 (gimplify_decl_expr): Do it here.
15456 (gimplify_target_expr): Likewise.
15458 2018-03-28 Martin Liska <mliska@suse.cz>
15461 * config/i386/i386.c (ix86_function_arg_advance): Do not call
15462 chkp_type_bounds_count if MPX is not enabled.
15464 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
15466 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15468 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
15471 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15472 function to create the function decl for complex long double
15473 multiply and divide for -mabi=ieeelongdouble.
15474 (init_float128_ieee): Call it.
15476 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
15479 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15480 -fcf-protection=branch -mibt.
15481 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15483 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15486 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15487 arm_word_relocations.
15489 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15492 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15493 extern array declarations.
15495 2018-03-27 Richard Biener <rguenther@suse.de>
15497 PR middle-end/84067
15498 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15499 explicit single_use checks.
15501 2018-03-27 Richard Biener <rguenther@suse.de>
15503 PR tree-optimization/85082
15504 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15507 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15509 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15510 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15511 Turn on fasynchronous-unwind-tables and funwind-tables.
15513 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
15516 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15517 (*bmi_blsr_<mode>_ccz): Ditto.
15519 2018-03-26 Tom de Vries <tom@codesourcery.com>
15521 PR tree-optimization/85063
15522 * omp-general.c (offloading_function_p): New function. Factor out
15524 * omp-offload.c (pass_omp_target_link::gate): ... here.
15525 * omp-general.h (offloading_function_p): Declare.
15526 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15527 with attribute omp declare target for offloading functions.
15529 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
15531 PR tree-optimization/84005
15532 * tree-data-ref.h (get_base_for_alignment): Declare.
15533 * tree-data-ref.c (get_base_for_alignment_1): New function.
15534 (get_base_for_alignment): Likewise.
15535 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15536 get_base_for_alignment to find a suitable base object, instead
15537 of always using drb->base_address.
15539 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15541 PR inline-asm/85022
15542 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15543 known size by default.
15545 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
15547 PR inline-asm/85030
15548 * lra-constraints.c (process_alt_operands): Don't match BLKmode
15549 and non BLKmode operands.
15551 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15554 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15555 Clean up attributes.
15557 2018-03-23 Richard Biener <rguenther@suse.de>
15560 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15561 we are going to emit early debug for LTO.
15563 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15565 PR inline-asm/85034
15566 * function.c (match_asm_constraints_1): Don't optimize if input
15567 doesn't satisfy general_operand predicate for output's mode.
15569 PR inline-asm/85022
15570 * alias.c (write_dependence_p): Don't require for x_canonicalized
15571 non-VOIDmode if x has VOIDmode.
15574 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15575 just don't try to optimize it rather than assert it never happens.
15577 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15579 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15580 macro expansions for definition of ST_INTERNAL_<mode> and
15581 LD_INTERNAL_<mode> builtins.
15582 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15584 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15586 (altivec_expand_st_builtin): Likewise.
15587 (altivec_expand_builtin): Remove calls to deleted functions.
15588 (rs6000_address_for_altivec): Delete this function.
15589 * config/rs6000/vector.md: Remove expands for
15590 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15592 2018-03-22 Sudakshina Das <sudi.das@arm.com>
15595 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15596 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15597 re-computing once computed.
15598 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15599 (arm_init_machine_status): Initialize
15600 machine->static_chain_stack_bytes.
15602 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15605 * doc/extend.texi: Add four new prototypes for vec_ld.
15606 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15607 definitions for more logical presentation.
15608 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15609 entries for V1TI variants of __builtin_altivec_ld builtin.
15610 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15611 handling of V1TI variant of LVX icode pattern.
15612 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15613 (rs6000_gimple_fold_builtin): Likewise.
15614 (altivec_init_builtins): Add code to define
15615 __builtin_altivec_lvx_v1ti function.
15617 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15619 PR inline-asm/84941
15620 * function.c (match_asm_constraints_1): Don't do the optimization
15621 if input isn't a REG, SUBREG, MEM or constant.
15623 2018-03-22 Tom de Vries <tom@codesourcery.com>
15625 PR tree-optimization/84956
15626 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15627 bb_has_abnormal_pred.
15629 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15632 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15633 DECL_INITIAL (decl) to decl at the end.
15634 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15635 adjust the comment.
15637 2018-03-21 Joseph Myers <joseph@codesourcery.com>
15639 * doc/extend.texi (__builtin_tgmath): Document when complex
15640 integer types are treated as _Complex _Float64.
15642 2018-03-21 Tom de Vries <tom@codesourcery.com>
15644 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15646 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15648 PR tree-optimization/84960
15649 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15650 if it is ENTRY block, move them into single succ of ENTRY in that case.
15652 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
15654 PR tree-optimization/84811
15655 * poly-int.h (poly_span_traits): Remove the T3 parameter and
15656 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15657 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15658 (known_subrange_p): Update accordingly. Cast each value involved
15659 in the size comparison, rather than casting the result of the
15662 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15664 PR tree-optimization/84982
15665 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15666 by flipping the least significant bit rather than all bits from
15667 bitpos to bitpos + bitsize - 1.
15669 2018-03-21 Nathan Sidwell <nathan@acm.org>
15671 * doc/extend.texi (Deprecated Features): Remove mention of
15672 long-deleted deprecations.
15674 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15677 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15678 * configure: Regenerate.
15680 2018-03-21 Tom de Vries <tom@codesourcery.com>
15682 PR tree-optimization/83126
15683 * tree-parloops.c (num_phis): New function.
15684 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15686 2018-03-21 Nathan Sidwell <nathan@acm.org>
15688 * doc/extend.texi (Deprecated Features): Update deprecated flags,
15689 mention anon-struct/union members and trailing attributes.
15691 2018-03-21 Bin Cheng <bin.cheng@arm.com>
15693 PR tree-optimization/84969
15694 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15695 builtin memset partitions if they set different rhs values.
15697 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15699 PR rtl-optimization/84989
15700 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15701 VEC_DUPLICATE with scalar result mode.
15703 2018-03-21 Martin Liska <mliska@suse.cz>
15706 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15707 not intended return statement.
15709 2018-03-21 Martin Liska <mliska@suse.cz>
15712 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15713 (chkp_find_bound_slots_1): Limit number of iterations.
15715 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
15718 * Minor grammar fixes for x86 options.
15720 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15723 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15724 holding REG_CFA_RESTORE notes, instead turn them into a USE.
15726 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
15729 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15730 (altivec_lvx_<mode>_1op): Likewise.
15731 (altivec_stvx_<mode>_2op): Likewise.
15732 (altivec_stvx_<mode>_1op): Likewise.
15733 (altivec_lvx_<VM2:mode>): New define_expand.
15734 (altivec_stvx_<VM2:mode>): Likewise.
15735 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15736 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15737 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15738 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15739 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15740 (rs6000_gen_lvx): Likewise.
15741 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15742 (altivec_expand_stv_builtin): Likewise.
15743 (altivec_expand_builtin): Likewise.
15744 * config/rs6000/vector.md: Likewise.
15746 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15749 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
15752 2018-03-20 Richard Biener <rguenther@suse.de>
15755 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
15756 sign-conversions as zero, fall back to standard scalar_stmt
15759 2018-03-20 Martin Liska <mliska@suse.cz>
15762 * predict.c (rebuild_frequencies): Handle case when we have
15763 PROFILE_ABSENT, but flag_guess_branch_prob is false.
15765 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15768 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
15769 flag_section_anchors.
15770 * varasm.c (use_blocks_for_decl_p): Remove hack for
15771 dw2_force_const_mem.
15774 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
15776 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
15777 be created, use lowpart_subreg of operands[0] rather than operands[0]
15779 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15780 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15781 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15782 and n constraint instead of aarch64_shift_imm_di and Usd.
15783 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15784 (*aarch64_<optab>_reg_minus<mode>3): ... this.
15786 2018-03-20 Sudakshina Das <sudi.das@arm.com>
15789 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15790 to favor GPR over NEON registers.
15791 (<shift>di3_neon): Likewise.
15793 2018-03-20 Tom de Vries <tom@codesourcery.com>
15796 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15797 (nvptx_process_pars): Emit bar.sync asap and alap.
15799 2018-03-20 Tom de Vries <tom@codesourcery.com>
15802 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15803 seen_label if seen_label is already set.
15805 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15808 * config/i386/i386.c (fold_builtin_cpu): For features above 31
15809 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15810 Use 1U instead of 1. Formatting fixes.
15813 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15814 instead of TREE_TYPE (s1) for the return value.
15816 2018-03-19 Jakub Jelinek <jakub@redhat.com>
15818 PR tree-optimization/84946
15819 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15820 bitsize + bitsize in poly_uint64 rather than poly_int64.
15823 * dwarf2asm.c: Include fold-const.c.
15824 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15825 of decl rather than decl itself.
15827 PR rtl-optimization/84643
15828 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15830 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
15833 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15834 calling assemble_variable.
15836 2018-03-19 Sudakshina Das <sudi.das@arm.com>
15839 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
15840 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
15842 2018-03-19 Jim Wilson <jimw@sifive.com>
15845 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
15846 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
15847 (riscv_first_stack_step): Likewise.
15848 (riscv_option_override): Use STACK_BOUNDARY instead of
15849 MIN_STACK_BOUNDARY.
15850 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
15851 MIN_STACK_BOUNDARY.
15852 (BIGGEST_ALIGNMENT): Set to 128.
15853 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
15854 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
15857 2018-03-19 Richard Biener <rguenther@suse.de>
15859 PR tree-optimization/84933
15860 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
15861 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
15863 2018-03-19 Richard Biener <rguenther@suse.de>
15865 PR tree-optimization/84859
15866 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
15867 (cond_if_else_store_replacement): Perform sinking operation on
15868 single-store BBs regardless of MAX_STORES_TO_SINK setting.
15869 Generalize what a BB with a single eligible store is.
15871 2018-03-19 Richard Biener <rguenther@suse.de>
15873 PR tree-optimization/84929
15874 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
15875 chrec_is_positive against non-chrec arg.
15877 2018-03-19 Tamar Christina <tamar.christina@arm.com>
15880 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
15882 2018-03-18 Martin Liska <mliska@suse.cz>
15884 PR rtl-optimization/84635
15885 * regrename.c (build_def_use): Use matches_mode only when
15888 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
15890 PR tree-optimization/84913
15891 * tree-vect-loop.c (vectorizable_reduction): Don't try to
15892 vectorize chains of COND_EXPRs.
15894 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15896 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
15898 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15900 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
15902 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15904 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
15906 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15907 Kito Cheng <kito.cheng@gmail.com>
15909 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
15910 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
15911 (nds32_adjust_reg_alloc_order): New function.
15912 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
15914 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
15916 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
15917 nds32_print_operand, nds32_print_operand_address): Use
15918 HOST_WIDE_INT_PRINT_DEC instead.
15920 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15922 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
15924 2018-03-17 Jakub Jelinek <jakub@redhat.com>
15927 * config/i386/i386.c (initial_ix86_tune_features,
15928 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15929 unsigned long long.
15930 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
15931 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
15932 rather than 1u << ix86_tune. Formatting fix.
15933 (ix86_option_override_internal): Change ix86_arch_mask from
15934 unsigned int to unsigned HOST_WIDE_INT, initialize to
15935 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
15936 (ix86_function_specific_restore): Likewise.
15938 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15941 * postreload.c (reload_combine_recognize_pattern): Perform
15942 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
15943 truncate_int_for_mode the result for the destination's mode.
15946 * hsa-gen.c (mem_type_for_type): Fix comment typo.
15947 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
15949 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15952 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
15955 * lra-assigns.c (lra_split_hard_reg_for): Don't use
15956 regno_allocno_class_array and sorted_pseudos.
15957 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
15958 insns where regno is used.
15960 2018-03-16 Martin Liska <mliska@suse.cz>
15963 * multiple_target.c (create_dispatcher_calls): Redirect
15964 reference in the symbol table.
15966 2018-03-16 Martin Liska <mliska@suse.cz>
15969 * multiple_target.c (create_dispatcher_calls): Redirect also
15972 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15976 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
15977 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
15978 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
15980 2018-03-16 Julia Koval <julia.koval@intel.com>
15982 * doc/invoke.texi (Skylake Server): Add CLWB.
15983 Cannonlake): Remove CLWB.
15985 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15987 PR tree-optimization/84841
15988 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
15990 (FLOAT_ONE_CONST_TYPE): Define.
15991 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
15992 (sort_by_operand_rank): Put entries with higher constant_type last
15993 rather than first to match comments.
15995 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
15997 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16000 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16003 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16004 check and use address of target always.
16006 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16009 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16010 (indirect_thunk_bnd_needed): Likewise.
16011 (indirect_thunks_used): Likewise.
16012 (indirect_thunks_bnd_used): Likewise.
16013 (indirect_return_needed): New.
16014 (indirect_return_bnd_needed): Likewise.
16015 (output_indirect_thunk_function): Add a bool argument for
16017 (output_indirect_thunk_function): Don't generate alias for
16018 function return thunk.
16019 (ix86_code_end): Call output_indirect_thunk_function to generate
16020 function return thunks.
16021 (ix86_output_function_return): Set indirect_return_bnd_needed
16022 and indirect_return_needed instead of indirect_thunk_bnd_needed
16023 and indirect_thunk_needed.
16025 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16027 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16028 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16029 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16031 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16032 Paul Hua <paul.hua.gm@gmail.com>
16035 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16037 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16039 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16040 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16041 resp. SFmode cases.
16043 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16046 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16047 instead of GET_MODE_SIZE when comparing Units.
16049 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16052 * varasm.c (hash_section): Return an unchangeble hash value
16053 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16054 Return !aarch64_can_use_per_function_literal_pools_p ().
16056 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16059 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16060 rather than address of cmode as last argument to prepare_cmp_insn.
16062 2018-03-15 Julia Koval <julia.koval@intel.com>
16064 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16065 F_AVX512VNNI, F_AVX512BITALG): New.
16067 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16070 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16071 insn for floating-point loads and stores.
16073 2018-03-14 Carl Love <cel@us.ibm.com>
16075 * config/rs6000/rs6000-c.c: Add macro definitions for
16076 ALTIVEC_BUILTIN_VEC_PERMXOR.
16077 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16078 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16079 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16080 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16082 * config/doc/extend.texi: Add prototypes for vec_permxor.
16084 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16087 * diagnostic-show-locus.c (class layout_point): Convert m_line
16088 from int to linenum_type.
16089 (line_span::comparator): Use linenum "compare" function when
16090 comparing line numbers.
16091 (test_line_span): New function.
16092 (layout_range::contains_point): Convert param "row" from int to
16094 (layout_range::intersects_line_p): Likewise.
16095 (layout::will_show_line_p): Likewise.
16096 (layout::print_source_line): Likewise.
16097 (layout::should_print_annotation_line_p): Likewise.
16098 (layout::print_annotation_line): Likewise.
16099 (layout::print_leading_fixits): Likewise.
16100 (layout::annotation_line_showed_range_p): Likewise.
16101 (struct line_corrections): Likewise for field m_row.
16102 (line_corrections::line_corrections): Likewise for param "row".
16103 (layout::print_trailing_fixits): Likewise.
16104 (layout::get_state_at_point): Likewise.
16105 (layout::get_x_bound_for_row): Likewise.
16106 (layout::print_line): Likewise.
16107 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16108 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16109 * input.c (selftest::test_linenum_comparisons): New function.
16110 (selftest::input_c_tests): Call it.
16111 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16112 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16113 * selftest.h (ASSERT_GT): New macro.
16114 (ASSERT_GT_AT): New macro.
16115 (ASSERT_LT): New macro.
16116 (ASSERT_LT_AT): New macro.
16118 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16120 PR rtl-optimization/84780
16121 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16123 2018-03-14 Martin Liska <mliska@suse.cz>
16125 * tree.c (record_node_allocation_statistics): Use
16126 get_stats_node_kind.
16127 (get_stats_node_kind): New function extracted from
16128 record_node_allocation_statistics.
16129 (free_node): Use get_stats_node_kind.
16131 2018-03-14 Richard Biener <rguenther@suse.de>
16133 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16134 that the value-set of ANTIC_IN doesn't grow.
16137 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16139 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16140 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16142 2018-03-14 Julia Koval <julia.koval@intel.com>
16144 * config.gcc (icelake-client, icelake-server): New.
16146 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16147 (initial_ix86_arch_features): Ditto.
16148 (PTA_SKYLAKE): Add SGX.
16149 (PTA_ICELAKE): Remove.
16150 (PTA_ICELAKE_CLIENT): New.
16151 (PTA_ICELAKE_SERVER): New.
16152 (ix86_option_override_internal): Split up icelake on icelake client and
16154 (get_builtin_code_for_version): Ditto.
16155 (fold_builtin_cpu): Ditto.
16156 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16157 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16158 * config/i386/i386.h (processor_type): Ditto.
16159 * doc/invoke.texi: Ditto.
16161 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16164 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16165 INTEGER_CST offset, add it together with bitpos / 8 and
16166 sign extend based on POINTER_SIZE.
16170 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16173 * config/i386/constraints.md (Yc): New register constraint.
16174 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16175 Use Yc constraint for alternative 2 of operand 0. Remove
16176 preferred_for_speed attribute.
16178 2018-03-14 Richard Biener <rguenther@suse.de>
16180 PR tree-optimization/84830
16181 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16182 with the old one to avoid oscillations.
16184 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16187 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16189 (assign_by_spills): Return a flag of reload assignment failure.
16190 Do not process the reload assignment failures. Do not spill other
16191 reload pseudos if they has the same reg class. Update n if
16193 (lra_assign): Add a return arg. Set up from the result of
16194 assign_by_spills call.
16195 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16196 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16197 usage_insns if it is not NULL.
16198 (spill_hard_reg_in_range): New function.
16199 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16200 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16201 function prototypes.
16202 (lra_assign): Change prototype.
16203 * lra.c (lra): Add code to deal with fails by splitting hard reg
16206 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16208 * config/riscv/riscv.opt (mrelax): New option.
16209 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16210 "norelax" when riscv_mrelax is disabled.
16211 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16213 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16216 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16217 reassociation for int modes.
16219 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16221 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16222 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16224 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16225 * config/aarch64/aarch64-sve.md
16226 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16227 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16228 (*extend<mode><Vwide>2): Rename to...
16229 (aarch64_sve_extend<mode><Vwide>2): ...this.
16230 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16231 renaming the old pattern to...
16232 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16234 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16235 define_expand, renaming the old pattern to...
16236 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16237 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16238 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16239 account when deciding which SVE instruction the optab should use.
16240 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16242 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16244 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16245 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16246 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16247 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16248 (tlsdesc_small_<mode>): Turn a define_expand and use
16249 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16250 (tlsdesc_small_advsimd_<mode>): ...this.
16251 (tlsdesc_small_sve_<mode>): New pattern.
16253 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16255 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16256 (UNSPEC_UMUL_HIGHPART): New constants.
16257 (MUL_HIGHPART): New int iteraor.
16258 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16259 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16261 (*<su>mul<mode>3_highpart): New define_insn.
16263 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16266 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16269 2018-03-13 Martin Liska <mliska@suse.cz>
16272 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16274 (sem_item_optimizer::~sem_item_optimizer): Release it.
16275 (sem_item_optimizer::merge_classes): Register variable aliases.
16276 (sem_item_optimizer::fixup_pt_set): New function.
16277 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16278 * ipa-icf.h: Declare new variables and functions.
16280 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16282 PR middle-end/84834
16283 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16284 integer_pow2p@2 and test integer_pow2p in condition.
16285 (A < 0 ? C : 0): Similarly for @1.
16287 PR middle-end/84831
16288 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16289 characters starting at p contain '\0' character, don't look beyond
16293 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16294 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16297 * reg-stack.c (change_stack): Change update_end var from int to
16298 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16299 also call set_block_for_insn on the newly added insns and rescan.
16302 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16303 on the last operand.
16306 * tree.c (stabilize_reference_1): Return save_expr (e) for
16307 STATEMENT_LIST even if it doesn't have side-effects.
16309 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
16311 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16313 2018-03-12 Renlin Li <renlin.li@arm.com>
16315 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16316 aarch64_output_scalar_simd_mov_immediate.
16318 2018-03-12 Martin Sebor <msebor@redhat.com>
16320 PR tree-optimization/83456
16321 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16322 for perfectly overlapping calls to memcpy.
16323 (gimple_fold_builtin_memory_chk): Same.
16324 (gimple_fold_builtin_strcpy): Handle no-warning.
16325 (gimple_fold_builtin_stxcpy_chk): Same.
16326 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16328 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16330 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16331 parameter. Use it for SFmode.
16332 (rs6000_function_arg_advance_1): Adjust.
16333 (rs6000_function_arg): Adjust.
16334 (rs6000_gimplify_va_arg): Pass false for that new parameter.
16336 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16338 PR rtl-optimization/84169
16339 PR rtl-optimization/84780
16340 * combine.c (can_combine_p): Check for a 2-insn combination whether
16341 the destination register is used between the two insns, too.
16343 2018-03-12 Richard Biener <rguenther@suse.de>
16345 PR tree-optimization/84803
16346 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16347 for refs DR analysis didn't process.
16349 2018-03-12 Richard Biener <rguenther@suse.de>
16351 PR tree-optimization/84777
16352 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16353 force-vectorize loops ignore whether we are optimizing for size.
16355 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
16357 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16358 (TARGET_MD_ASM_ADJUST): Define.
16360 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
16361 Kito Cheng <kito.cheng@gmail.com>
16362 Chung-Ju Wu <jasonwucj@gmail.com>
16364 * config/nds32/nds32.c (nds32_compute_stack_frame,
16365 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16366 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16367 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16368 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16369 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16370 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16371 * config/nds32/nds32.md (prologue, epilogue): Use macro
16372 NDS32_V3PUSH_AVAILABLE_P to do checking.
16374 2018-03-11 Jakub Jelinek <jakub@redhat.com>
16377 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16378 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16379 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
16380 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
16381 addition of most attributes on !orig_type_die or the attribute not
16382 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16384 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16385 Chung-Ju Wu <jasonwucj@gmail.com>
16387 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16388 __NDS32_VH__ macro.
16389 * config/nds32/nds32.opt (mvh): New option.
16391 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16392 Chung-Ju Wu <jasonwucj@gmail.com>
16394 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16396 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16397 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16400 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16401 Chung-Ju Wu <jasonwucj@gmail.com>
16403 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16405 * config/nds32/nds32-multiple.md (strlensi): New pattern.
16406 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16408 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
16409 Kito Cheng <kito.cheng@gmail.com>
16410 Chung-Ju Wu <jasonwucj@gmail.com>
16412 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16413 UNSPEC_FFMISM and UNSPEC_FLMISM.
16414 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16415 for ffb, ffmism and flmism.
16416 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16417 (unspec_ffmism): Ditto.
16418 (unspec_flmism): Ditto.
16419 (nds32_expand_builtin_impl): Check if string extension is available.
16420 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16421 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16423 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
16426 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16429 * lra-assigns.c (assign_by_spills): Return a flag of reload
16430 assignment failure. Do not process the reload assignment
16431 failures. Do not spill other reload pseudos if they has the same
16433 (lra_assign): Add a return arg. Set up from the result of
16434 assign_by_spills call.
16435 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16436 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16437 usage_insns if it is not NULL.
16438 (spill_hard_reg_in_range): New function.
16439 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16440 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16441 function prototypes.
16442 (lra_assign): Change prototype.
16443 * lra.c (lra): Add code to deal with fails by splitting hard reg
16446 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
16449 * config/i386/i386.opt: Replace Enforcment with Enforcement.
16451 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
16454 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16455 (dw_val_node): Add val_symbolic_view.
16456 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16457 (symview_upper_bound): New.
16458 (new_line_info_table): Initialize symviews_since_reset.
16459 (dwarf2out_source_line): Count symviews_since_reset and set
16460 symview_upper_bound.
16461 (dw_val_equal_p): Handle symview.
16462 (add_AT_symview): New.
16463 (print_dw_val): Handle symview.
16464 (attr_checksum, attr_checksum_ordered): Likewise.
16465 (same_dw_val_p, size_of_die): Likewise.
16466 (value_format, output_die): Likewise.
16467 (add_high_low_attributes): Use add_AT_symview for entry_view.
16468 (dwarf2out_finish): Reset symview_upper_bound, clear
16471 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
16474 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16475 Add strict argument and use it.
16476 (rs6000_split_multireg_move): Update for new strict argument.
16477 (mem_operand_gpr): Disallow all non-offsettable addresses.
16478 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16480 2018-03-09 Jakub Jelinek <jakub@redhat.com>
16483 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16484 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16485 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16488 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16489 decl, use remap_type if we want to use the type.
16491 2018-03-09 Martin Sebor <msebor@redhat.com>
16493 PR tree-optimization/84526
16494 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16496 (builtin_access::generic_overlap): Be prepared to handle non-array
16499 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
16501 PR rtl-optimization/84682
16502 * lra-constraints.c (process_address_1): Check is_address flag
16503 for address constraints.
16504 (process_alt_operands): Likewise.
16505 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16506 preprocess_constraints.
16507 * recog.h (preprocess_constraints): Add oploc parameter.
16509 * recog.c (preprocess_constraints): Test address_operand for
16510 CT_ADDRESS constraints.
16512 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16515 * lra-assigns.c (assign_by_spills): Return a flag of reload
16516 assignment failure. Do not process the reload assignment
16517 failures. Do not spill other reload pseudos if they has the same
16519 (lra_assign): Add a return arg. Set up from the result of
16520 assign_by_spills call.
16521 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16522 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16523 usage_insns if it is not NULL.
16524 (spill_hard_reg_in_range): New function.
16525 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16526 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16527 function prototypes.
16528 (lra_assign): Change prototype.
16529 * lra.c (lra): Add code to deal with fails by splitting hard reg
16532 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16535 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16536 Accept complain bool parameter. Only emit errors if it is true.
16537 (arm_parse_cpu_option_name): Likewise.
16538 (arm_target_thumb_only): Adjust callers of the above.
16539 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16540 prototype to take a default true bool parameter.
16541 (arm_parse_arch_option_name): Likewise.
16543 2018-03-09 David Malcolm <dmalcolm@redhat.com>
16544 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
16548 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16549 * configure: Regenerate.
16550 * configure.ac ("linker --version-script option"): New.
16551 ("linker soname option"): New.
16553 2018-03-09 Richard Biener <rguenther@suse.de>
16555 PR tree-optimization/84775
16556 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16557 immediate uses of predicate stmts and mark them modified.
16560 PR tree-optimization/84178
16561 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16563 (version_loop_for_if_conversion): Delay update_ssa call.
16564 (tree_if_conversion): Delay update_ssa until after predicate
16567 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
16570 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16571 when the function accesses prior frames.
16573 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16576 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16577 gen_llsym, otherwise call maybe_gen_llsym.
16579 PR inline-asm/84742
16580 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16581 has ',' character inside of it.
16583 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16586 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16587 as clobbering CC_REGNUM.
16589 2018-03-08 Richard Biener <rguenther@suse.de>
16591 PR middle-end/84552
16592 * tree-scalar-evolution.c: Include tree-into-ssa.h.
16593 (follow_copies_to_constant): Do not follow SSA names registered
16596 2018-03-08 Richard Biener <rguenther@suse.de>
16598 PR tree-optimization/84178
16599 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16601 (version_loop_for_if_conversion): Delay update_ssa call.
16602 (tree_if_conversion): Delay update_ssa until after predicate
16605 2018-03-08 David Malcolm <dmalcolm@redhat.com>
16607 PR tree-optimization/84178
16608 * tree-if-conv.c (release_bb_predicate): Remove the
16609 the assertion that the stmts have NULL use_ops.
16610 Discard the statements, asserting that they haven't
16611 yet been added to a BB.
16613 2018-03-08 Richard Biener <rguenther@suse.de>
16615 PR tree-optimization/84746
16616 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16617 (phi_translate): Pass in destination ANTIC_OUT set.
16618 (phi_translate_1): Likewise. For a simplified result lookup
16619 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16620 (phi_translate_set): Adjust.
16621 (do_pre_regular_insertion): Likewise.
16622 (do_pre_partial_partial_insertion): Likewise.
16624 2018-03-08 Martin Liska <mliska@suse.cz>
16626 PR gcov-profile/84735
16627 * doc/gcov.texi: Document usage of profile files.
16628 * gcov-io.h: Document changes in the format.
16630 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
16634 * dwarf2out.c (struct dw_line_info_table): Update comments for
16636 (FORCE_RESET_NEXT_VIEW): New.
16637 (FORCE_RESETTING_VIEW_P): New.
16638 (RESETTING_VIEW_P): Check for -1 too.
16639 (ZERO_VIEW_P): Likewise.
16640 (new_line_info_table): Force-reset next view.
16641 (dwarf2out_begin_function): Likewise.
16642 (dwarf2out_source_line): Simplify zero_view_p initialization.
16643 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16644 view directly. Omit view when omitting .loc at line 0.
16646 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16648 PR tree-optimization/84740
16649 * tree-switch-conversion.c (process_switch): Call build_constructors
16650 only if info.phi_count is non-zero.
16652 PR tree-optimization/84739
16653 * tree-tailcall.c (find_tail_calls): Check call arguments against
16654 DECL_ARGUMENTS (current_function_decl) rather than
16655 DECL_ARGUMENTS (func) when checking for tail recursion.
16657 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16659 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16660 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16661 Volker Reichelt's entry and add entries for people that perform
16662 GCC fuzzy testing and report numerous bugs.
16664 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
16667 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16668 readonly data in sdata, if that is disabled.
16669 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16670 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16671 -mreadonly-in-sdata option.
16673 2018-03-07 Martin Sebor <msebor@redhat.com>
16675 PR tree-optimization/84468
16676 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16677 basic block when looking for nul assignment.
16679 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
16682 * except.h (output_function_exception_table): Adjust prototype.
16683 * except.c (output_function_exception_table): Remove FNNAME parameter
16684 and add SECTION parameter. Ouput one part of the table at a time.
16685 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16686 the first part of the exception table and emit unwind directives.
16687 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16688 (i386_pe_seh_cold_init): Likewise.
16689 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16690 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16691 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16692 (ix86_output_call_insn): Emit a nop in one more case for SEH.
16693 * config/i386/winnt.c: Include except.h.
16694 (struct seh_frame_state): Add reg_offset, after_prologue and
16695 in_cold_section fields.
16696 (i386_pe_seh_end_prologue): Set seh->after_prologue.
16697 (i386_pe_seh_cold_init): New function.
16698 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16699 to seh->in_cold_section.
16700 (seh_emit_push): Record the offset of the push.
16701 (seh_emit_save): Record the offet of the save.
16702 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16703 Test seh->after_prologue to disregard the epilogue.
16704 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16705 (i386_pe_end_cold_function): New function.
16707 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16710 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16711 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16714 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16716 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16717 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16719 PR middle-end/84723
16720 * multiple_target.c: Include tree-inline.h and intl.h.
16721 (expand_target_clones): Diagnose and fail if node->definition and
16722 !tree_versionable_function_p (node->decl).
16724 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
16726 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16728 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16729 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16730 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16732 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16735 * combine.c (try_combine): Use reg_or_subregno instead of handling
16736 just paradoxical SUBREGs and REGs.
16738 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
16740 * config/arc/arc.c (arc_finalize_pic): Remove function.
16741 (arc_must_save_register): We use single base PIC register, remove
16742 checks to save/restore the PIC register.
16743 (arc_expand_prologue): Likewise.
16744 * config/arc/arc-protos.h (arc_set_default_type_attributes):
16746 (arc_verify_short): Likewise.
16747 (arc_attr_type): Likewise.
16748 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16749 (walk_stores): Likewise.
16750 (arc_address_cost): Make it static.
16751 (arc_verify_short): Likewise.
16752 (branch_dest): Likewise.
16753 (arc_attr_type): Likewise.
16754 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
16755 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
16756 (arc_final_prescan_insn): Remove inserting the nops due to
16757 hardware hazards. It is done in reorg step.
16758 (insn_length_variant_t): Remove.
16759 (insn_length_parameters_t): Likewise.
16760 (arc_insn_length_parameters): Likewise.
16761 (arc_get_insn_variants): Likewise.
16762 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
16764 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16766 PR inline-asm/84683
16767 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
16770 PR tree-optimization/84687
16771 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
16773 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
16775 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16777 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16778 Rename to ppc_speculation_barrier.
16779 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16780 __builtin_ppc_speculation_barrier.
16782 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16785 * combine.c (combine_simplify_rtx): Don't try to simplify if
16786 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16789 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
16791 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16792 to 32 bytes when compiling for POWER9.
16794 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16797 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16798 regparm >= 3 with no arg reg available also for calls with
16799 flag_force_indirect_call. Pass decl to ix86_function_regparm.
16802 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16804 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
16806 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
16809 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16811 2018-03-05 Richard Biener <rguenther@suse.de>
16813 PR tree-optimization/84486
16814 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16815 When inserting a __builtin_assume_aligned call set the LHS
16816 SSA name alignment info accordingly.
16818 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
16820 PR tree-optimization/84114
16821 * config/aarch64/aarch64.c (aarch64_reassociation_width)
16822 Avoid reassociation of FLOAT_MODE addition.
16824 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
16826 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16827 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16828 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16829 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16830 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16831 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16832 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16834 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16835 __builtin_ia32_wbinvd): New builtins.
16836 (SPECIAL_ARGS2): New.
16837 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
16838 (SPECIAL_ARGS2): New.
16839 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
16840 (ix86_valid_target_attribute_inner_p): Ditto.
16841 (ix86_init_mmx_sse_builtins): Add special_args2.
16842 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
16843 TARGET_WBNOINVD_P): New.
16844 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
16845 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
16846 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
16847 * config/i386/immintrin.h (_wbinvd): New intrinsic.
16848 * config/i386/pconfigintrin.h: New file.
16849 * config/i386/wbnoinvdintrin.h: Ditto.
16850 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
16852 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
16854 2018-03-05 Richard Biener <rguenther@suse.de>
16856 PR tree-optimization/84670
16857 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16859 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16860 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16861 (compute_antic_aux): Only assert the number of values in ANTIC_IN
16862 doesn't grow if all successors (recursively) were visited at least
16865 2018-03-05 Richard Biener <rguenther@suse.de>
16867 PR tree-optimization/84650
16868 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
16869 if executed in the loop pipeline.
16871 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
16873 * doc/configfiles.texi (Configuration Files): Move info about
16874 conditionalizing $target-protos.h to...
16875 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
16876 differs from $target-protos.h.
16878 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
16879 Chung-Ju Wu <jasonwucj@gmail.com>
16881 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
16882 * config/nds32/nds32-multiple.md (setmemsi): Define.
16883 * config/nds32/nds32-memory-manipulation.c
16884 (nds32_gen_dup_4_byte_to_word_value): New.
16885 (emit_setmem_word_loop): New.
16886 (emit_setmem_byte_loop): New.
16887 (nds32_expand_setmem_loop): New.
16888 (nds32_expand_setmem_loop_v3m): New.
16889 (nds32_expand_setmem_unroll): New.
16890 (nds32_expand_setmem): New.
16892 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16893 Chung-Ju Wu <jasonwucj@gmail.com>
16895 * config/nds32/nds32-memory-manipulation.c
16896 (nds32_emit_load_store): New.
16897 (nds32_emit_post_inc_load_store): New.
16898 (nds32_emit_mem_move): New.
16899 (nds32_emit_mem_move_block): New.
16900 (nds32_expand_movmemsi_loop_unknown_size): New.
16901 (nds32_expand_movmemsi_loop_known_size): New.
16902 (nds32_expand_movmemsi_loop): New.
16903 (nds32_expand_movmemsi_unroll): New.
16904 (nds32_expand_movmemqi): Rename ...
16905 (nds32_expand_movmemsi): ... to this.
16906 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
16907 (movmemsi): ... to this.
16908 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
16909 (nds32_expand_movmemsi): ... to this.
16911 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16912 Monk Chiang <sh.chiang04@gmail.com>
16913 Chung-Ju Wu <jasonwucj@gmail.com>
16915 * config/nds32/nds32-protos.h
16916 (nds32_expand_load_multiple): New arguments.
16917 (nds32_expand_store_multiple): Ditto.
16918 (nds32_valid_multiple_load_store): Rename ...
16919 (nds32_valid_multiple_load_store_p): ... to this.
16920 * config/nds32/nds32-memory-manipulation.c
16921 (nds32_expand_load_multiple): Refine implementation.
16922 (nds32_expand_store_multiple): Ditto.
16923 * config/nds32/nds32-multiple.md
16924 (load_multiple): Update nds32_expand_load_multiple interface.
16925 (store_multiple): Update nds32_expand_store_multiple interface.
16926 * config/nds32/nds32-predicates.c
16927 (nds32_valid_multiple_load_store): Rename ...
16928 (nds32_valid_multiple_load_store_p): ... to this and refine
16930 * config/nds32/predicates.md
16931 (nds32_load_multiple_and_update_address_operation): New predicate.
16932 (nds32_store_multiple_and_update_address_operation): New predicate.
16934 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16935 Chung-Ju Wu <jasonwucj@gmail.com>
16937 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
16938 (combo): New attribute.
16939 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
16941 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
16943 * config/nds32/nds32.opt: Change -mcmodel= default value.
16945 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
16946 Monk Chiang <sh.chiang04@gmail.com>
16947 Chung-Ju Wu <jasonwucj@gmail.com>
16949 * config/nds32/constants.md (unspec_element): New enum.
16950 * config/nds32/constraints.md (Umw): New constraint.
16951 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
16952 * config/nds32/nds32-intrinsic.md: Likewise.
16953 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
16954 (nds32_valid_smw_lwm_base_p): New.
16955 (nds32_output_smw_single_word): New.
16956 (nds32_output_lmw_single_word): New.
16957 (nds32_expand_unaligned_load): New.
16958 (nds32_expand_unaligned_store): New.
16959 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
16960 (nds32_output_smw_single_word): Declare.
16961 (nds32_output_lmw_single_word): Declare.
16962 (nds32_expand_unaligned_load): Declare.
16963 (nds32_expand_unaligned_store): Declare.
16964 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
16965 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
16966 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
16967 NDS32_BUILTIN_UASTORE_DW.
16968 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
16971 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
16972 Kito Cheng <kito.cheng@gmail.com>
16973 Chung-Ju Wu <jasonwucj@gmail.com>
16975 * config/nds32/nds32-intrinsic.c
16976 (nds32_expand_builtin_null_ftype_reg): Delete.
16977 (nds32_expand_builtin_reg_ftype_imm): Ditto.
16978 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
16979 (nds32_read_argument): New.
16980 (nds32_legitimize_target): Ditto.
16981 (nds32_legitimize_argument): Ditto.
16982 (nds32_check_constant_argument): Ditto.
16983 (nds32_expand_unop_builtin): Ditto.
16984 (nds32_expand_unopimm_builtin): Ditto.
16985 (nds32_expand_binop_builtin): Ditto.
16986 (nds32_builtin_decl_impl): Ditto.
16987 (builtin_description): Ditto.
16988 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
16989 (nds32_init_builtins_impl): Ditto.
16990 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
16991 (nds32_builtin_decl): New.
16992 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
16993 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
16995 2018-03-02 Jeff Law <law@redhat.com>
16997 * reorg.c (stop_search_p): Handle DEBUG_INSN.
16998 (redundant_insn, fill_simple_delay_slots): Likewise.
16999 (fill_slots_from_thread): Likewise.
17000 * resource.c (mark_referenced_resources): Likewise.
17001 (mark_set_resources, find_dead_or_set_registers): Likewise.
17003 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17005 * substring-locations.h (format_warning_va): Formatting fix for
17006 ATTRIBUTE_GCC_DIAG.
17007 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17009 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17010 * substring-locations.c: Include intl.h.
17011 (format_warning_va): Turned into small wrapper around
17012 format_warning_n_va, renamed to ...
17013 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17014 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17016 (format_warning_at_substring_n): New function.
17017 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17018 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17019 format_warning_at_substring with just a shorter name instead of
17020 const function pointer.
17021 (fmtwarn_n): New function.
17022 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17023 appropriate, get rid of all the fmtstr temporaries, move conditionals
17024 with G_() wrapped string literals directly into fmtwarn arguments,
17025 cast dir.len to (int), formatting fixes.
17027 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17029 * doc/invoke.texi: Remove "Cilk Plus" references.
17031 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17032 Richard Biener <rguenther@suse.de>
17035 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17036 for error or warning attributes if CALL_FROM_THUNK_P is set.
17039 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17042 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17043 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17046 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17047 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17049 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17050 instead of -1U in last predictors element's probability member.
17052 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17055 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17056 arguments if they are comparable.
17058 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17060 PR tree-optimization/84634
17061 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17062 masks and masked_loop_p with a single loop_masks, making sure it's
17063 null for bb vectorization.
17065 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17067 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17068 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17069 loop->force_vectorize to check whether there is no alias.
17071 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17074 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17076 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17078 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17079 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17080 instead of a loop around prev_real_insn.
17081 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17084 PR inline-asm/84625
17085 * config/i386/i386.c (ix86_print_operand): Use conditional
17086 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17089 2018-03-02 Richard Biener <rguenther@suse.de>
17091 PR tree-optimization/84427
17092 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17093 (bitmap_set_subtract_values): Rewrite to handle multiple
17096 (prune_clobbered_mems): Likewise.
17097 (phi_translate): Take edge instead of pred/phiblock.
17098 (phi_translate_1): Likewise.
17099 (phi_translate_set): Likewise. Insert all translated
17100 exprs for a value into the set, keeping possibly multiple
17101 expressions per value.
17102 (compute_antic_aux): Adjust for phi_translate changes.
17103 When intersecting union the expressions and prune those
17104 not in the final value set, keeping possibly multiple
17105 expressions per value. Do not use value-insertion
17106 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17107 all expressions. Add verification that the value-sets
17108 only shrink during iteration.
17109 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17110 (do_pre_regular_insertion): Likewise.
17111 (do_pre_partial_partial_insertion): Likewise.
17113 2018-03-02 Richard Biener <rguenther@suse.de>
17116 * config/darwin.c (saved_debug_info_level): New static global.
17117 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17118 (darwin_asm_lto_end): Restore debug info generation settings.
17120 2018-03-01 Martin Liska <mliska@suse.cz>
17123 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17124 volatile arguments.
17126 2018-03-01 Richard Biener <rguenther@suse.de>
17129 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17130 type annotation with LTO when debug was disabled at compile-time.
17132 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17134 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17136 (mips_final_postscan_insn): Likewise.
17138 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17140 PR rtl-optimization/84528
17141 * alias.c (init_alias_target): Add commentary.
17142 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17143 a unique base value if the frame pointer is not eliminated
17144 to the stack pointer.
17146 2018-03-01 Tom de Vries <tom@codesourcery.com>
17148 PR rtl-optimization/83327
17149 * lra-int.h (hard_regs_spilled_into): Declare.
17150 * lra.c (hard_regs_spilled_into): Define.
17151 (init_reg_info): Init hard_regs_spilled_into.
17152 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17153 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17154 (process_bb_lives): Handle hard_regs_spilled_into.
17155 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17156 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17158 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17160 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17161 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17162 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17163 * config/rs6000/aix72.h: New file.
17165 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17167 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17168 instead of warning_at with conditional singular and plural messages
17172 * stor-layout.c (update_alignment_for_field): For
17173 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17174 && !DECL_PACKED (field), do the alignment update, just use
17175 only desired_align instead of MAX (type_align, desired_align)
17177 (place_field): Don't do known_align < desired_align handling
17178 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17179 is non-NULL, instead do it after rli->prev_field handling and
17180 only if not within a bitfield word. For DECL_PACKED (field)
17181 use type_align of BITS_PER_UNIT.
17183 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17185 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17186 superfluous parentheses and trailing spaces.
17188 2018-02-28 Richard Biener <rguenther@suse.de>
17190 PR tree-optimization/84584
17191 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17192 SCoPs with fake exit edge.
17194 2018-02-28 Martin Liska <mliska@suse.cz>
17197 * timevar.c (timer::print): Fix format to properly print 100%
17200 2018-02-28 Richard Biener <rguenther@suse.de>
17202 PR middle-end/84607
17203 * genmatch.c (capture_info::walk_match): Do not mark
17204 captured expressions without operands as expr_p given
17205 they act more like predicates and should be subject to
17206 "lost tail" side-effect preserving.
17208 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17210 PR rtl-optimization/81611
17211 * auto-inc-dec.c (attempt_change): Move dead note from
17212 mem_insn if it's the next use of regno
17213 (find_address): Take address use of reg holding
17214 non-incremented value. Add parm to limit search to the named
17216 (merge_in_block): Attempt to use a mem insn that is the next
17217 use of the original regno.
17219 2018-02-27 Martin Sebor <msebor@redhat.com>
17222 * doc/invoke.texi (-Wmissing-attributes): New option.
17223 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17225 2018-02-27 Martin Sebor <msebor@redhat.com>
17227 PR translation/84207
17228 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17229 n argument to unsigned HOST_WIDE_INT.
17230 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17231 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17232 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17233 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17235 2018-02-27 Richard Biener <rguenther@suse.de>
17237 PR tree-optimization/84512
17238 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17239 Do not use the estimate returned from record_stmt_cost for
17240 the scalar iteration cost but sum properly using add_stmt_cost.
17242 2018-02-27 Richard Biener <rguenther@suse.de>
17244 PR tree-optimization/84466
17245 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17246 Adjust last change to less strictly validate use operands.
17248 2018-02-27 Martin Liska <mliska@suse.cz>
17250 PR gcov-profile/84548
17251 * gcov.c (process_file): Allow partial overlap and consider it
17252 also as group functions.
17253 (output_lines): Properly calculate range of lines for a group.
17255 2018-02-27 Martin Liska <mliska@suse.cz>
17257 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17258 'ggc' suffixes. Change first column width.
17259 (timer::print): Fix formatting of the column.
17261 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17263 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17264 preserve inline entry blocks for the sake of debug inline
17265 entry point markers alone.
17266 (remove_unused_locals): Suggest in comments a better place to
17267 force the preservation of inline entry blocks that are
17268 otherwise unused, but do not preserve them.
17270 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17272 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17274 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17277 * config/i386/constraints.md (Bs): Replace
17278 ix86_indirect_branch_register with
17279 TARGET_INDIRECT_BRANCH_REGISTER.
17281 * config/i386/i386.md (indirect_jump): Likewise.
17282 (tablejump): Likewise.
17283 (*sibcall_memory): Likewise.
17284 (*sibcall_value_memory): Likewise.
17285 Peepholes of indirect call and jump via memory: Likewise.
17286 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17287 (*sibcall_value_GOT_32): Likewise.
17288 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17289 (GOT_memory_operand): Likewise.
17290 (call_insn_operand): Likewise.
17291 (sibcall_insn_operand): Likewise.
17292 (GOT32_symbol_operand): Likewise.
17293 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17295 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17297 PR rtl-optimization/83496
17298 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17299 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17300 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17301 redundant insn, if any.
17302 (relax_delay_slots): Likewise.
17303 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17305 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
17307 PR tree-optimization/83965
17308 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17309 that grouped statements are part of a reduction chain. Return
17310 true if the statement is not marked as a reduction itself but
17311 is part of a group.
17312 (vect_recog_dot_prod_pattern): Don't check whether the statement
17313 is part of a group here.
17314 (vect_recog_sad_pattern): Likewise.
17315 (vect_recog_widen_sum_pattern): Likewise.
17317 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17320 * final.c (rest_of_clean_state): Also look for calls inside sequences.
17322 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17325 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17327 (ix86_output_indirect_function_return): New prototype.
17328 (ix86_split_simple_return_pop_internal): Likewise.
17329 * config/i386/i386.c (indirect_return_via_cx): New.
17330 (indirect_return_via_cx_bnd): Likewise.
17331 (indirect_thunk_name): Handle return va CX_REG.
17332 (output_indirect_thunk_function): Create alias for
17333 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17334 (ix86_output_indirect_jmp): Remove the bool argument.
17335 (ix86_output_indirect_function_return): New function.
17336 (ix86_split_simple_return_pop_internal): Likewise.
17337 * config/i386/i386.md (*indirect_jump): Don't pass false
17338 to ix86_output_indirect_jmp.
17339 (*tablejump_1): Likewise.
17340 (simple_return_pop_internal): Change it to define_insn_and_split.
17341 Call ix86_split_simple_return_pop_internal to split it for
17342 -mfunction-return=.
17343 (simple_return_indirect_internal): Call
17344 ix86_output_indirect_function_return instead of
17345 ix86_output_indirect_jmp.
17347 2018-02-26 Jakub Jelinek <jakub@redhat.com>
17350 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17351 memset and value initialization afterwards.
17353 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
17355 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17357 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17360 * common/config/aarch64/aarch64-common.c
17361 (aarch_option_optimization_table[]): Switch
17362 off fomit-frame-pointer
17364 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17365 Chung-Ju Wu <jasonwucj@gmail.com>
17367 * config/nds32/nds32-multiple.md (load_multiple): Disallow
17369 (store_multiple): Ditto.
17371 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17373 * config.gcc: Add --with-cpu support for nds32 target.
17374 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17375 * config/nds32/nds32.opt: Add -mcpu= option.
17377 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
17379 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17380 isel=yes): Warn for these deprecated options.
17382 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
17384 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17385 ISA_2_5_MASKS_EMBEDDED.
17387 2018-02-23 Jakub Jelinek <jakub@redhat.com>
17389 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17390 p->max as pointers rather than using iterative_hash_expr.
17392 2018-02-23 Carl Love <cel@us.ibm.com>
17394 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17395 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17397 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17398 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17399 P8V_BUILTIN_VEC_VUNSIGNED2.
17401 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
17404 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17405 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17407 * lra-constraints.c (curr_insn_transform): Set up
17408 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
17410 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17411 * lra-eliminations.c (spill_pseudos): Ditto.
17412 (process_insn_for_elimination): Ditto.
17413 * lra-lives.c (reg_early_clobber_p): Use the new macros.
17414 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17415 LRA_NON_CLOBBERED_ALT.
17417 2018-02-22 Martin Sebor <msebor@redhat.com>
17419 PR tree-optimization/84480
17420 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17421 to maybe_diag_stxncpy_trunc. Call it.
17422 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17423 from gimple_fold_builtin_strcpy. Print inlining stack.
17424 (handle_builtin_stxncpy): Print inlining stack.
17425 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17427 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
17430 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17431 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17432 and -fcheck-pointer-bounds are used together.
17433 (indirect_thunk_prefix): New enum.
17434 (indirect_thunk_need_prefix): New function.
17435 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
17436 "_nt" instead of "_bnd" for NOTRACK prefix.
17437 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17438 (output_indirect_thunk_function): Likewise.
17440 (ix86_code_end): Update output_indirect_thunk_function calls.
17441 (ix86_output_indirect_branch_via_reg): Replace
17442 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17443 (ix86_output_indirect_branch_via_push): Likewise.
17444 (ix86_output_function_return): Likewise.
17445 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17446 incompatible with -fcf-protection=branch and
17447 -fcheck-pointer-bounds.
17449 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17452 * config/aarch64/aarch64.c (aarch64_print_address_internal):
17453 Change gcc_assert call to output_operand_lossage.
17455 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17457 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17459 2018-02-22 DJ Delorie <dj@redhat.com>
17460 Sebastian Perta <sebastian.perta@renesas.com>
17461 Oleg Endo <olegendo@gcc.gnu.org>
17463 * config/rx/rx.c (rx_rtx_costs): New function.
17464 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17466 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
17468 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17470 2018-02-22 Martin Liska <mliska@suse.cz>
17473 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17474 Add "native" as a possible value.
17476 2018-02-22 Martin Liska <mliska@suse.cz>
17479 * config/i386/i386.c (ix86_option_override_internal):
17480 Add "native" as a possible value for -march and -mtune.
17482 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17485 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17486 to all type variants.
17488 PR tree-optimization/84503
17489 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17490 width as info->bitpos + info->bitsize - start.
17491 (merged_store_group::merge_overlapping): Simplify width computation.
17492 (check_no_overlap): New function.
17493 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17494 start + width and last_order of the group, fail if check_no_overlap
17496 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17497 to group if check_no_overlap fails.
17499 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17501 * config/rs6000/altivec.md: Delete contraint arguments to
17502 define_expand, define_split, and define_peephole2, and in
17503 define_insn_and_split if always unused.
17504 * config/rs6000/darwin.md: Ditto.
17505 * config/rs6000/dfp.md: Ditto.
17506 * config/rs6000/rs6000.md: Ditto.
17507 * config/rs6000/sync.md: Ditto.
17508 * config/rs6000/vector.md: Ditto.
17509 * config/rs6000/vsx.md: Ditto.
17511 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17513 * config/rs6000/altivec.md: Write output control strings as braced
17514 blocks instead of double-quoted strings.
17515 * config/rs6000/darwin.md: Ditto.
17516 * config/rs6000/rs6000.md: Ditto.
17517 * config/rs6000/vector.md: Ditto.
17518 * config/rs6000/vsx.md: Ditto.
17520 2018-02-21 Jason Merrill <jason@redhat.com>
17522 PR c++/84314 - ICE with templates and fastcall attribute.
17523 * attribs.c (build_type_attribute_qual_variant): Remove assert.
17525 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17527 * ipa-cp.c (determine_versionability): Fix comment typos.
17529 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17532 * ipa-cp.c (determine_versionability): Do not version functions caling
17535 2018-02-21 Martin Liska <mliska@suse.cz>
17538 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17539 Add "native" as a possible value.
17540 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
17541 the macro when native cpu detection is available.
17543 2018-02-21 Martin Liska <mliska@suse.cz>
17546 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17547 Add "native" as a possible value.
17548 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17549 when native cpu detection is available.
17551 2018-02-21 Jakub Jelinek <jakub@redhat.com>
17552 Martin Sebor <msebor@redhat.com>
17554 PR tree-optimization/84478
17555 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17557 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17558 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17559 support which is conservatively correct, for 2 only stay conservative
17560 for maxlen. Formatting and comment capitalization fixes. Add STRICT
17561 argument to the 2 argument get_range_strlen, adjust 6 arg
17562 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17564 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17565 (gimple_fold_builtin_strlen): Pass true as last argument to
17568 2018-02-20 Martin Sebor <msebor@redhat.com>
17570 PR middle-end/84095
17571 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17572 (builtin_memref::set_base_and_offset): Same. Handle inner references.
17573 (builtin_memref::builtin_memref): Factor out parts into
17574 set_base_and_offset and call it.
17576 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17578 PR middle-end/84406
17579 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17580 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17581 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
17582 search at the associated MODE_INT.
17584 2018-02-20 Jeff Law <law@redhat.com>
17586 PR middle-end/82123
17587 PR tree-optimization/81592
17588 PR middle-end/79257
17589 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17590 for range data rather than using global data.
17591 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17592 range data rather than using global data.
17593 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17594 pass it to children as needed.
17595 (struct directive::fmtresult): Similarly.
17596 (struct directive::set_width): Similarly.
17597 (struct directive::set_precision): Similarly.
17598 (format_integer, format_directive, parse_directive): Similarly.
17599 (format_none): Accept unnamed vr_values parameter.
17600 (format_percent, format_floating, format_character): Similarly.
17601 (format_string, format_plain): Similarly.
17602 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17603 the EVRP range analyzer for range data rather than using global data.
17604 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17605 gimple-ssa-evrp-analyze.h
17606 (class sprintf_dom_walker): Add after_dom_children member function.
17607 Add evrp_range_analyzer member.
17608 (sprintf_dom_walker::before_dom_children): Call into the EVRP
17609 range analyzer as needed.
17610 (sprintf_dom_walker::after_dom_children): New member function.
17611 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17613 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17614 (evrp_range_analyzer::pop_to_marker): Likewise.
17616 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17618 PR tree-optimization/84419
17619 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17620 with the required type if its current type is compatible but
17623 2018-02-20 Jakub Jelinek <jakub@redhat.com>
17625 PR middle-end/82004
17626 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17627 after vectorization.
17629 2018-02-20 Martin Liska <mliska@suse.cz>
17632 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17633 possible values if we don't have a hint.
17635 2018-02-20 Martin Liska <mliska@suse.cz>
17639 * final.c (shorten_branches): Build align_tab array with one
17641 * opts.c (finish_options): Add alignment option limit check.
17642 (MAX_CODE_ALIGN): Likewise.
17643 (MAX_CODE_ALIGN_VALUE): Likewise.
17644 * doc/invoke.texi: Document maximum allowed option value for
17645 all -falign-* options.
17647 2018-02-19 Jakub Jelinek <jakub@redhat.com>
17650 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17651 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17652 * var-tracking.c (emit_note_insn_var_location): Remove all references
17653 to NOTE_INSN_CALL_ARG_LOCATION.
17654 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17655 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17656 Use copy_rtx_if_shared.
17657 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17658 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17659 (dwarf2out_var_location): Remove handling of
17660 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17662 * final.c (final_scan_insn): Remove all references to
17663 NOTE_INSN_CALL_ARG_LOCATION.
17664 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
17665 before dumping final insns.
17666 * except.c (emit_note_eh_region_end): Remove all references to
17667 NOTE_INSN_CALL_ARG_LOCATION.
17668 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17669 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17670 * config/arc/arc.c (hwloop_optimize): Likewise.
17671 * config/arm/arm.c (create_fix_barrier): Likewise.
17672 * config/s390/s390.c (s390_chunkify_start): Likewise.
17673 * config/sh/sh.c (find_barrier): Likewise.
17674 * config/i386/i386.c (rest_of_insert_endbranch,
17675 ix86_seh_fixup_eh_fallthru): Likewise.
17676 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17677 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17678 * config/frv/frv.c (frv_function_prologue): Likewise.
17679 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
17681 (note_outside_basic_block_p): Remove all references to
17682 NOTE_INSN_CALL_ARG_LOCATION.
17683 * gengtype.c (adjust_field_rtx_def): Likewise.
17684 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17686 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17687 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17690 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17693 PR tree-optimization/84452
17694 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17695 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17698 2018-02-19 Martin Liska <mliska@suse.cz>
17701 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17703 2018-02-19 Martin Liska <mliska@suse.cz>
17704 Richard Sandiford <richard.sandiford@linaro.org>
17706 PR tree-optimization/82491
17707 * gimple-fold.c (get_base_constructor): Make earlier bail out
17710 2018-02-19 Carl Love <cel@us.ibm.com>
17712 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17713 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17715 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17716 P8V_BUILTIN_VEC_NEG.
17718 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
17720 * config/rl78/rl78.md (movdf): New define expand.
17722 2018-02-19 Martin Liska <mliska@suse.cz>
17725 * doc/invoke.texi: Fix typo.
17726 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17728 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
17730 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17731 handle rs6000_single_float and rs6000_double_float specially for
17734 2018-02-16 Jeff Law <law@redhat.com>
17736 * config/rx/rx.c (add_pop_cfi_notes): New function.;
17737 (pop_regs): Use it.
17739 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17742 * ipa-inline.c (inline_small_functions): Fix a typo.
17744 2018-02-16 Nathan Sidwell <nathan@acm.org>
17746 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17748 2018-02-16 Carl Love <cel@us.ibm.com>
17750 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
17751 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
17752 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
17753 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
17754 expansion to P8V_BUILTIN_VEC_FLOAT2.
17756 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
17758 PR rtl-optimization/70023
17759 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
17760 src_regno into account.
17762 2018-02-16 Carl Love <cel@us.ibm.com>
17764 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
17765 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
17766 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
17767 * config/rs6000/rs6000.c: Remove case statements for
17768 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
17769 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
17770 and P9V_BUILTIN_VEC_VINSERT4B.
17771 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
17772 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
17773 * config/rs6000/vsx.md:
17774 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17777 2018-02-16 Carl Love <cel@us.ibm.com>
17779 * config/rs6000/altivec.h: Add builtin names vec_extract4b
17781 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17783 * config/rs6000/rs6000-c.c: Add the definitions for
17784 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17785 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17786 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17787 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
17788 definition for insert4b and define insn *insert3b_internal.
17789 * doc/extend.texi: Add documentation for vec_extract4b.
17791 2018-02-16 Nathan Sidwell <nathan@acm.org>
17793 * doc/extend.texi (Backwards Compatibility): Mention friend
17794 injection. Note for-scope is deprecated.
17795 * doc/invoke.texi (-ffriend-injection): Deprecate.
17797 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
17799 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17800 that moved to I2, also allow destinations that are a paradoxical
17801 subreg (instead of a normal reg).
17803 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
17806 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17809 2018-02-16 Richard Biener <rguenther@suse.de>
17811 PR tree-optimization/84037
17812 PR tree-optimization/84016
17814 * config/i386/i386.c (ix86_builtin_vectorization_cost):
17815 Adjust vec_construct for the fact we need additional higher latency
17816 128bit inserts for AVX256 and AVX512 vector builds.
17817 (ix86_add_stmt_cost): Scale vector construction cost for
17820 2018-02-16 Richard Biener <rguenther@suse.de>
17822 PR tree-optimization/84417
17823 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17824 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17825 (non_rewritable_lvalue_p): Likewise, use poly-ints.
17827 2018-02-16 Martin Liska <mliska@suse.cz>
17830 * internal-fn.def (ASAN_CHECK): Set proper flags.
17831 (ASAN_MARK): Likewise.
17833 2018-02-16 Julia Koval <julia.koval@intel.com>
17835 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17836 from PTA_CANNONLAKE.
17838 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17841 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
17842 Use ++iter rather than iter++ for std::list iterators.
17843 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
17844 defer deleting them until all nodes in the forest are processed. Do
17845 free even leaf nodes. Change to_process into auto_vec.
17848 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
17849 * vec.h (vec_default_construct): Use memset instead of placement new
17850 if BROKEN_VALUE_INITIALIZATION is defined.
17851 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
17852 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
17855 PR rtl-optimization/83723
17856 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
17857 * lra.c (lra_substitute_pseudo): Likewise. If true, use
17858 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
17860 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
17862 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
17864 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
17866 PR rtl-optimization/81443
17867 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
17868 from inner REGs to paradoxical SUBREGs.
17870 2018-02-16 Richard Biener <rguenther@suse.de>
17872 PR tree-optimization/84399
17873 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17874 For operands we can analyze at their definition make sure we can
17875 analyze them at each use as well.
17877 2018-02-16 Richard Biener <rguenther@suse.de>
17879 PR tree-optimization/84190
17880 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
17881 volatile accesses if the decl isn't volatile.
17883 2018-02-15 Jason Merrill <jason@redhat.com>
17885 PR c++/84314 - ICE with templates and fastcall attribute.
17886 * attribs.c (build_type_attribute_qual_variant): Don't clobber
17887 TYPE_CANONICAL on an existing type.
17889 2018-02-15 Jakub Jelinek <jakub@redhat.com>
17891 PR tree-optimization/84383
17892 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
17893 dstoff nor call operand_equal_p if dstbase is NULL.
17895 PR tree-optimization/84334
17896 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
17897 also a CONSTANT_CLASS_P, punt.
17899 2018-02-14 Jim Wilson <jimw@sifive.com>
17901 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
17902 first SMALL_OPERAND check. New local min_second_step. Move assert
17903 to where locals are set. Add TARGET_RVC support.
17904 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
17906 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
17908 * doc/invoke.texi: Correct -Wformat-overflow code sample.
17910 2018-02-14 Martin Sebor <msebor@redhat.com>
17912 PR tree-optimization/83698
17913 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
17914 arrays constrain the offset range to their bounds.
17915 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
17916 (builtin_access::overlap): Avoid setting the size of overlap if it's
17918 (maybe_diag_overlap): Also consider arrays when deciding what values
17919 of offsets to include in diagnostics.
17921 2018-02-14 Martin Sebor <msebor@redhat.com>
17924 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
17925 that correspond to the kind of a declaration.
17927 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
17930 * config/pa/pa.md: Load address of PIC label using the linkage table
17931 if the label is nonlocal.
17933 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
17935 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
17936 warning message if user requests -maltivec=be.
17937 * doc/invoke.texi: Document deprecation of -maltivec=be.
17939 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
17942 * config/rs6000/rs6000-c.c: Update definitions for
17943 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
17944 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
17946 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17949 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
17950 add _get_ssp intrinsics. Remove argument from
17951 __builtin_ia32_rdssp[d|q].
17952 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
17953 * config/i386/i386-builtin.def: Remove argument from
17954 __builtin_ia32_rdssp[d|q].
17955 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
17956 ix86_expand_special_args_builtin for _rdssp[d|q].
17957 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
17958 Clear register before usage.
17959 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
17960 Add documentation for new _get_ssp and _inc_ssp intrinsics.
17962 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
17964 PR tree-optimization/84357
17965 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
17966 operand 1 of an ARRAY_REF too.
17968 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
17971 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
17972 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17974 (set_of_reg): New struct.
17975 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
17976 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
17977 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17979 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
17980 Split into bitclr, bitset, bitinvert patterns if appropriate.
17981 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
17982 use rx_fuse_in_memory_bitop.
17983 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
17984 to named insn, correct maximum insn length.
17986 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
17989 * machmode.def: Define a complex mode for PARTIAL_INT.
17990 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
17992 * doc/rtl.texi: Document CSPImode.
17993 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
17995 (msp430_hard_regno_nregs_with_padding): Likewise.
17997 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18000 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18002 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18004 PR rtl-optimization/84169
18005 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18006 we generated a parallel as new i3 and we split that to new i2 and i3
18007 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18008 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18009 those to i2, not i1. Partially rewrite this scan code.
18011 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18014 * stor-layout.c (place_field): For variable length fields, adjust
18015 offset_align afterwards not just based on the field's alignment,
18016 but also on the size.
18018 PR middle-end/84309
18019 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18020 of exps and logs in the use_exp2 case.
18022 2018-02-13 Jeff Law <law@redhat.com>
18024 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18025 entry for "vector".
18027 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18030 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18034 * common.opt (gas-loc-support, gas-locview-support): New.
18035 (ginline-points, ginternal-reset-location-views): New.
18036 * doc/invoke.texi: Document them. Use @itemx where intended.
18037 (gvariable-location-views): Adjust.
18038 * target.def (reset_location_view): New.
18039 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18040 (TARGET_RESET_LOCATION_VIEW): New.
18041 * doc/tm.texi: Rebuilt.
18042 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18043 (dwarf2out_default_as_locview_support): New.
18044 (output_asm_line_debug_info): Use option variables.
18045 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18046 (output_loc_list): Likewise.
18047 (add_high_low_attributes): Check option variables.
18048 Don't output entry view attribute in strict mode.
18049 (gen_inlined_subroutine_die): Check option variables.
18050 (dwarf2out_inline_entry): Likewise.
18051 (init_sections_and_labels): Likewise.
18052 (dwarf2out_early_finish): Likewise.
18053 (maybe_reset_location_view): New, from...
18054 (dwarf2out_var_location): ... here. Call it.
18055 * debug.h (dwarf2out_default_as_loc_support): Declare.
18056 (dwarf2out_default_as_locview_support): Declare.
18057 * hooks.c (hook_int_rtx_insn_0): New.
18058 * hooks.h (hook_int_rtx_insn_0): Declare.
18059 * toplev.c (process_options): Take -gas-loc-support and
18060 -gas-locview-support from dwarf2out. Enable
18061 -gvariable-location-views by default only with locview
18062 assembler support. Enable -ginternal-reset-location-views by
18063 default only if the target defines the corresponding hook.
18064 Enable -ginline-points by default if location views are
18065 enabled; force it disabled if statement frontiers are
18067 * tree-inline.c (expand_call_inline): Check option variables.
18068 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18070 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18072 PR tree-optimization/84321
18073 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18074 handling. Also check whether the anti-range contains any values
18075 that satisfy the mask; switch to a VR_RANGE if not.
18077 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18080 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18082 2018-02-13 Martin Jambor <mjambor@suse.cz>
18085 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18086 of call statements, also set location of a load to a temporary.
18088 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18090 * config/rl78/rl78.c (add_vector_labels): New function.
18091 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18092 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18093 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18094 which checks that no arguments are passed.
18095 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18096 * doc/extend.texi: Documentation for the new attribute.
18098 2018-02-13 Andreas Schwab <schwab@suse.de>
18100 * config/riscv/linux.h (CPP_SPEC): Define.
18102 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18105 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18106 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18107 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18108 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18109 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18110 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18111 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18112 temporarily for AES and PCLMUL builtins.
18114 PR tree-optimization/84339
18115 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18116 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18119 PR middle-end/84309
18120 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18121 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18122 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18124 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18126 * omp-simd-clone.h: New file.
18127 * omp-simd-clone.c: Include omp-simd-clone.h.
18128 (expand_simd_clones): No longer static.
18129 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18130 cgraph.h and omp-simd-clone.h.
18131 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18132 (vect_recog_widen_shift_pattern): Formatting fix.
18133 (vect_pattern_recog_1): Don't check optab for calls.
18136 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18137 operands[2] into a REG before using gen_lowpart on it.
18139 2018-02-12 Jeff Law <law@redhat.com>
18142 * config/sh/sh.c (find_barrier): Consider a sibling call
18145 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18146 successfully back substituting a reg.
18148 2018-02-12 Richard Biener <rguenther@suse.de>
18150 PR tree-optimization/84037
18151 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18152 parameter, move visited init to caller.
18153 (vect_slp_analyze_operations): Separate cost from validity
18154 check, initialize visited once for all instances.
18155 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18157 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18159 (vect_model_promotion_demotion_cost): Likewise.
18160 (vectorizable_bswap): Guard cost modeling with !slp_node
18161 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18163 (vectorizable_call): Likewise.
18164 (vectorizable_conversion): Likewise.
18165 (vectorizable_assignment): Likewise.
18166 (vectorizable_shift): Likewise.
18167 (vectorizable_operation): Likewise.
18168 (vectorizable_store): Likewise.
18169 (vectorizable_load): Likewise.
18170 (vectorizable_condition): Likewise.
18171 (vectorizable_comparison): Likewise.
18173 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18176 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18177 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18178 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18180 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18182 PR middle-end/83665
18183 * params.def (inline-min-speedup): Increase from 8 to 15.
18184 (max-inline-insns-auto): Decrease from 40 to 30.
18185 * ipa-split.c (consider_split): Add some buffer for function to
18186 be considered inlining candidate.
18187 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18190 2018-02-12 Richard Biener <rguenther@suse.de>
18192 PR tree-optimization/84037
18193 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18194 matched stmts if we cannot swap the non-matched ones.
18196 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18198 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18199 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18200 _mm_maskz_scalef_round_ss): New intrinsics.
18201 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18202 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18203 __builtin_ia32_scalefss_round): Remove.
18204 (__builtin_ia32_scalefsd_mask_round,
18205 __builtin_ia32_scalefss_mask_round): New intrinsics.
18206 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18207 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18208 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18209 "<round_constraint>")): Changed to ...
18210 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18211 "<round_scalar_constraint>")): ... this.
18212 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18213 %0, %1, %2<round_op3>}"): Changed to ...
18214 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18215 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18216 %2<round_scalar_mask_op3>}"): ... this.
18217 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18219 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18221 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18222 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18223 (_mm_maskz_sqrt_round_ss): New intrinsics.
18224 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18225 (__builtin_ia32_sqrtsd_mask_round)
18226 (__builtin_ia32_sqrtss_mask_round): New builtins.
18227 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18228 (__builtin_ia32_sqrtss_round): Remove.
18229 (__builtin_ia32_sqrtsd_mask_round)
18230 (__builtin_ia32_sqrtss_mask_round): New builtins.
18231 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18232 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18233 ((match_operand:VF_128 1 "vector_operand"
18234 "xBm,<round_constraint>")): Changed to ...
18235 ((match_operand:VF_128 1 "vector_operand"
18236 "xBm,<round_scalar_constraint>")): ... this.
18237 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18238 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18239 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18240 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18241 %<iptr>1<round_scalar_mask_op3>}): ... this.
18242 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18243 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18245 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18248 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18249 Cast vec_cmpeq result to correct type.
18250 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18251 Cast vec_cmpgt result to correct type.
18253 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18255 * final.c (final_scan_insn_1): Renamed from...
18256 (final_scan_insn): ... this. New wrapper, to recover
18257 seen from the outermost call in recursive ones.
18258 * config/sparc/sparc.c (output_return): Drop seen from call.
18259 (output_sibcall): Likewise.
18260 * config/visium/visium.c (output_branch): Likewise.
18262 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18264 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18267 2018-02-10 Alan Modra <amodra@gmail.com>
18270 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18271 Specify LR as an input.
18273 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18276 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18277 remove_member_access_dummy_vars): New functions.
18278 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18279 lower_omp_1, execute_lower_omp): Use them.
18281 PR rtl-optimization/84308
18282 * shrink-wrap.c (spread_components): Release todo vector.
18284 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18286 PR rtl-optimization/57193
18287 * ira-color.c (struct allocno_color_data): Add member
18288 conflict_allocno_hard_prefs.
18289 (update_conflict_allocno_hard_prefs): New.
18290 (bucket_allocno_compare_func): Add a preference based on
18291 conflict_allocno_hard_prefs.
18292 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18293 (color_allocnos): Remove a dead code. Initiate
18294 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18296 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18299 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18300 constraint from =wa to wa. Avoid a subreg on the output operand,
18301 instead use a pseudo and subreg it in a move.
18302 (p9_xxbrd_<mode>): Changed to ...
18303 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18304 (p9_xxbrd_v2df): New expander.
18305 (p9_xxbrw_<mode>): Changed to ...
18306 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18307 (p9_xxbrw_v4sf): New expander.
18309 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18311 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18313 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
18316 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18317 multiply in 32-bit mode.
18318 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18319 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18322 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18324 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18325 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18326 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18327 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18329 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
18332 * dwarf2out.c (is_trivial_indirect_ref): New function.
18333 (dwarf2out_late_global_decl): Do not generate a location
18334 attribute for variables that have a non-trivial DECL_VALUE_EXPR
18335 and that are not defined in the current unit.
18337 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18339 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18340 instead of a libcall for UNORDERED.
18342 2018-02-09 Tamar Christina <tamar.christina@arm.com>
18345 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18346 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18348 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18351 * config/s390/s390.c (s390_set_current_function): Invoke
18352 s390_indirect_branch_settings also if fndecl didn't change.
18354 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18356 * config/rs6000/rs6000.md (blockage): Set length to zero.
18358 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18360 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18362 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18365 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18366 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18370 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18371 PARALLEL incoming that failed vt_get_decl_and_offset check.
18373 PR middle-end/84237
18374 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18375 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18377 (get_variable_section): For decls in named .bss* sections pass true as
18378 second argument to bss_initializer_p.
18380 2018-02-09 Marek Polacek <polacek@redhat.com>
18381 Jakub Jelinek <jakub@redhat.com>
18384 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18385 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
18386 Sync some changes from cxx_fold_indirect_ref.
18388 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18390 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18392 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18393 (BLOCK_INLINE_ENTRY_LABEL): New.
18394 (dwarf2out_var_location): Disregard inline entry markers.
18395 (inline_entry_data): New struct.
18396 (inline_entry_data_hasher): New hashtable type.
18397 (inline_entry_data_hasher::hash): New.
18398 (inline_entry_data_hasher::equal): New.
18399 (inline_entry_data_table): New variable.
18400 (add_high_low_attributes): Add DW_AT_entry_pc and
18401 DW_AT_GNU_entry_view attributes if a pending entry is found
18402 in inline_entry_data_table. Add old entry_pc attribute only
18403 if debug nonbinding markers are disabled.
18404 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18405 markers are enabled.
18406 (block_within_block_p, dwarf2out_inline_entry): New.
18407 (dwarf2out_finish): Check that no entries remained in
18408 inline_entry_data_table.
18409 * final.c (reemit_insn_block_notes): Handle inline entry notes.
18410 (final_scan_insn, notice_source_line): Likewise.
18411 (rest_of_clean_state): Skip inline entry markers.
18412 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18414 * gimple.c (gimple_build_debug_inline_entry): New.
18415 * gimple.h (enum gimple_debug_subcode): Add
18416 GIMPLE_DEBUG_INLINE_ENTRY.
18417 (gimple_build_debug_inline_entry): Declare.
18418 (gimple_debug_inline_entry_p): New.
18419 (gimple_debug_nonbind_marker_p): Adjust.
18420 * insn-notes.def (INLINE_ENTRY): New.
18421 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18422 inline entry marker notes.
18423 (print_insn): Likewise.
18424 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18425 (INSN_DEBUG_MARKER_KIND): Likewise.
18426 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18427 * tree-inline.c (expand_call_inline): Build and insert
18428 debug_inline_entry stmt.
18429 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18430 inline entry blocks early, if nonbind markers are enabled.
18431 (dump_scope_block): Dump fragment info.
18432 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18433 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18434 (gimple_build_debug_inline_entry): New.
18435 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18436 Enable/disable inline entry points too.
18437 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18438 (DEBUG_INSN): Describe inline entry markers.
18440 * common.opt (gvariable-location-views): New.
18441 (gvariable-location-views=incompat5): New.
18442 * config.in: Rebuilt.
18443 * configure: Rebuilt.
18444 * configure.ac: Test assembler for view support.
18445 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18446 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18447 * dwarf2out.c (var_loc_view): New typedef.
18448 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18449 (dwarf2out_locviews_in_attribute): New.
18450 (dwarf2out_locviews_in_loclist): New.
18451 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18452 (enum dw_line_info_opcode): Add LI_adv_address.
18453 (struct dw_line_info_table): Add view.
18454 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18455 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18456 (zero_view_p): New variable.
18457 (ZERO_VIEW_P): New macro.
18458 (output_asm_line_debug_info): New.
18459 (struct var_loc_node): Add view.
18460 (add_AT_view_list, AT_loc_list): New.
18461 (add_var_loc_to_decl): Add view param. Test it against last.
18462 (new_loc_list): Add view params. Record them.
18463 (AT_loc_list_ptr): Handle loc and view lists.
18464 (view_list_to_loc_list_val_node): New.
18465 (print_dw_val): Handle dw_val_class_view_list.
18466 (size_of_die): Likewise.
18467 (value_format): Likewise.
18468 (loc_list_has_views): New.
18469 (gen_llsym): Set vl_symbol too.
18470 (maybe_gen_llsym, skip_loc_list_entry): New.
18471 (dwarf2out_maybe_output_loclist_view_pair): New.
18472 (output_loc_list): Output view list or entries too.
18473 (output_view_list_offset): New.
18474 (output_die): Handle dw_val_class_view_list.
18475 (output_dwarf_version): New.
18476 (output_compilation_unit_header): Use it.
18477 (output_skeleton_debug_sections): Likewise.
18478 (output_rnglists, output_line_info): Likewise.
18479 (output_pubnames, output_aranges): Update version comments.
18480 (output_one_line_info_table): Output view numbers in asm comments.
18481 (dw_loc_list): Determine current endview, pass it to new_loc_list.
18482 Call maybe_gen_llsym.
18483 (loc_list_from_tree_1): Adjust.
18484 (add_AT_location_description): Create view list attribute if
18485 needed, check it's absent otherwise.
18486 (convert_cfa_to_fb_loc_list): Adjust.
18487 (maybe_emit_file): Call output_asm_line_debug_info for test.
18488 (dwarf2out_var_location): Reset views as needed. Precompute
18489 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18490 attribute. Set view.
18491 (new_line_info_table): Reset next view.
18492 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18493 (dwarf2out_source_line): Likewise. Output view resets and labels to
18494 the assembler, or select appropriate line info opcodes.
18495 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18496 (optimize_string_length): Catch it. Adjust.
18497 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18498 dw_val_class_view_list, and remove it if no longer needed.
18499 (hash_loc_list): Hash view numbers.
18500 (loc_list_hasher::equal): Compare them.
18501 (optimize_location_lists): Check whether a view list symbol is
18502 needed, and whether the locview attribute is present, and
18503 whether they match. Remove the locview attribute if no longer
18505 (index_location_lists): Call skip_loc_list_entry for test.
18506 (dwarf2out_finish): Call output_asm_line_debug_info for test.
18507 Use output_dwarf_version.
18508 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18509 (struct dw_val_node): Add val_view_list.
18510 * final.c (SEEN_NEXT_VIEW): New.
18511 (set_next_view_needed): New.
18512 (clear_next_view_needed): New.
18513 (maybe_output_next_view): New.
18514 (final_start_function): Rename to...
18515 (final_start_function_1): ... this. Take pointer to FIRST,
18516 add SEEN parameter. Emit param bindings in the initial view.
18517 (final_start_function): Reintroduce SEEN-less interface.
18518 (final): Rename to...
18519 (final_1): ... this. Take SEEN parameter. Output final pending
18520 next view at the end.
18521 (final): Reintroduce seen-less interface.
18522 (final_scan_insn): Output pending next view before switching
18523 sections or ending a block. Mark the next view as needed when
18524 outputting variable locations. Notify debug backend of section
18525 changes, and of location view changes.
18526 (rest_of_handle_final): Adjust.
18527 * toplev.c (process_options): Autodetect value for debug variable
18528 location views option. Warn on incompat5 without -gdwarf-5.
18529 * doc/invoke.texi (gvariable-location-views): New.
18530 (gvariable-location-views=incompat5): New.
18531 (gno-variable-location-views): New.
18533 2018-02-08 David Malcolm <dmalcolm@redhat.com>
18535 PR tree-optimization/84136
18536 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18537 that the result of find_edge is non-NULL.
18539 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18542 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18543 storing integer register in SImode. Fix cost of 256 and 512
18544 byte aligned SSE register store.
18546 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18548 * config/i386/i386.c (ix86_multiplication_cost): Fix
18549 multiplication cost for TARGET_AVX512DQ.
18551 2018-02-08 Marek Polacek <polacek@redhat.com>
18553 PR tree-optimization/84238
18554 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18557 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18559 PR tree-optimization/84265
18560 * tree-vect-stmts.c (vectorizable_store): Don't treat
18561 VMAT_CONTIGUOUS accesses as grouped.
18562 (vectorizable_load): Likewise.
18564 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18566 PR tree-optimization/81635
18567 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18568 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18569 (test_round_for_mask): New functions.
18570 (wide_int_cc_tests): Call test_round_for_mask.
18571 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18572 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18573 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18574 range returned by get_range_info.
18576 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18579 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18580 * symtab.c: Include builtins.h
18581 (symtab_node::output_to_lto_symbol_table_p): Move here
18582 from lto-streamer-out.c:output_symbol_p.
18583 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18584 (output_symbol_p): Move all logic to symtab.c
18585 (produce_symtab): Update.
18587 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18589 * config/s390/s390-opts.h (enum indirect_branch): Define.
18590 * config/s390/s390-protos.h (s390_return_addr_from_memory)
18591 (s390_indirect_branch_via_thunk)
18592 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18593 (enum s390_indirect_branch_type): Define.
18594 * config/s390/s390.c (struct s390_frame_layout, struct
18595 machine_function): Remove.
18596 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18597 (indirect_branch_table_label_no, indirect_branch_table_name):
18599 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18600 (enum s390_indirect_branch_option): Define.
18601 (s390_return_addr_from_memory): New function.
18602 (s390_handle_string_attribute): New function.
18603 (s390_attribute_table): Add new attribute handler.
18604 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18605 (s390_indirect_branch_via_thunk): New function.
18606 (s390_indirect_branch_via_inline_thunk): New function.
18607 (s390_function_ok_for_sibcall): When jumping via thunk disallow
18608 sibling call optimization for non z10 compiles.
18609 (s390_emit_call): Force indirect branch target to be a single
18610 register. Add r1 clobber for non-z10 compiles.
18611 (s390_emit_epilogue): Emit return jump via return_use expander.
18612 (s390_reorg): Handle JUMP_INSNs as execute targets.
18613 (s390_option_override_internal): Perform validity checks for the
18614 new command line options.
18615 (s390_indirect_branch_attrvalue): New function.
18616 (s390_indirect_branch_settings): New function.
18617 (s390_set_current_function): Invoke s390_indirect_branch_settings.
18618 (s390_output_indirect_thunk_function): New function.
18619 (s390_code_end): Implement target hook.
18620 (s390_case_values_threshold): Implement target hook.
18621 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18623 * config/s390/s390.h (struct s390_frame_layout)
18624 (struct machine_function): Move here from s390.c.
18625 (TARGET_INDIRECT_BRANCH_NOBP_RET)
18626 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18627 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18628 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18629 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18630 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18631 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18632 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18633 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18634 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18635 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18636 (mnemonic attribute): Add values which aren't recognized
18638 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18639 pattern for branch conversion. Fix mnemonic attribute.
18640 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18641 indirect branch via thunk if requested.
18642 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18643 ("*indirect_jump"): Disable for branch conversion using out of
18645 ("indirect_jump_via_thunk<mode>_z10")
18646 ("indirect_jump_via_thunk<mode>")
18647 ("indirect_jump_via_inlinethunk<mode>_z10")
18648 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18649 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18650 ("casesi_jump_via_inlinethunk<mode>_z10")
18651 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18652 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18653 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18654 ("*indirect2_jump"): Disable for branch conversion.
18655 ("casesi_jump"): Turn into expander and expand patterns for branch
18657 ("return_use"): New expander.
18658 ("*return"): Emit return via thunk and rename it to ...
18659 ("*return<mode>"): ... this one.
18660 * config/s390/s390.opt: Add new options and and enum for the
18663 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18665 * lra-constraints.c (match_reload): Unconditionally use
18666 gen_lowpart_SUBREG, rather than selecting between that
18667 and equivalent gen_rtx_SUBREG code.
18669 2018-02-08 Richard Biener <rguenther@suse.de>
18671 PR tree-optimization/84233
18672 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18673 changed flag instead of boguously re-using phi_inserted.
18675 2018-02-08 Martin Jambor <mjambor@suse.cz>
18677 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18678 static local variables.
18680 2018-02-08 Richard Biener <rguenther@suse.de>
18682 PR tree-optimization/84278
18683 * tree-vect-stmts.c (vectorizable_store): When looking for
18684 smaller vector types to perform grouped strided loads/stores
18685 make sure the mode is supported by the target.
18686 (vectorizable_load): Likewise.
18688 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18690 * config/aarch64/aarch64.c (aarch64_components_for_bb):
18691 Increase LDP/STP opportunities by adding adjacent callee-saves.
18693 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18695 PR rtl-optimization/84068
18696 PR rtl-optimization/83459
18697 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18699 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
18701 PR tree-optimization/84224
18702 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18703 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18704 non-zero arguments.
18706 2018-02-07 Iain Sandoe <iain@codesourcery.com>
18709 * config/rs6000/altivec.md (*restore_world): Remove LR use.
18710 * config/rs6000/predicates.md (restore_world_operation): Adjust op
18711 count, remove one USE.
18713 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
18715 * doc/install.texi (Configuration): Document the
18716 --with-long-double-format={ibm,ieee} PowerPC configuration
18720 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18721 Convert from define_expand to be define_insn_and_split. Rework
18722 float/double/_Float128 conversions to QI/HI/SImode to work with
18723 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
18724 conversions to QI/HImode types did a store and then a load to
18725 truncate the value. For conversions to VSX registers, don't split
18726 the insn, instead emit the code directly. Use the code iterator
18727 any_fix to combine signed and unsigned conversions.
18728 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18729 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18730 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18731 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18732 (fix_<mode>di2_hw): Likewise.
18733 (fixuns_<mode>di2_hw): Likewise.
18734 (fix_<mode>si2_hw): Likewise.
18735 (fixuns_<mode>si2_hw): Likewise.
18736 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18737 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18738 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18739 fix<uns>_trunc<SFDF:mode>si2_p8.
18740 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18741 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18742 (fix<uns>_<mode>_mem): Likewise.
18743 (fctiw<u>z_<mode>_mem): Likewise.
18744 (fix<uns>_<mode>_mem): Likewise.
18745 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18746 the register allocator from doing a direct move to the GPRs to do
18747 a store, and instead use the ISA 3.0 store byte/half-word from
18748 vector register instruction. For IEEE 128-bit floating point,
18749 also optimize stores of 32-bit ints.
18750 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
18752 2018-02-07 Alan Hayward <alan.hayward@arm.com>
18754 * genextract.c (push_pathstr_operand): New function to support
18756 (walk_rtx): Call push_pathstr_operand.
18757 (print_path): Support [a-zA-Z].
18759 2018-02-07 Richard Biener <rguenther@suse.de>
18761 PR tree-optimization/84037
18762 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
18763 (cse_and_gimplify_to_preheader): Declare.
18764 (vect_get_place_in_interleaving_chain): Likewise.
18765 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18767 (_loop_vec_info::~_loop_vec_info): Delete it.
18768 (cse_and_gimplify_to_preheader): New function.
18769 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
18770 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
18771 (vectorizable_load): Likewise. For grouped stores always base
18772 the IV on the first element.
18773 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
18774 condition before gimplifying.
18776 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18778 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18779 *DIV_EXPR and *MOD_EXPR.
18781 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
18784 * config/i386/i386.c (ix86_option_override_internal): Mask out
18785 the CF_SET bit when checking -fcf-protection.
18787 2018-02-07 Tom de Vries <tom@codesourcery.com>
18790 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18793 2018-02-07 Richard Biener <rguenther@suse.de>
18795 PR tree-optimization/84204
18796 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18799 PR tree-optimization/84205
18800 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18801 special-case isl_ast_op_zdiv_r.
18803 PR tree-optimization/84223
18804 * graphite-scop-detection.c (gather_bbs::before_dom_children):
18805 Only add conditions from within the region.
18806 (gather_bbs::after_dom_children): Adjust.
18808 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
18811 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18812 * config/avr/avr.md: Only post-reload split REG-REG moves if
18813 either register is GENERAL_REG_P.
18815 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18817 PR tree-optimization/84235
18818 * tree-ssa-scopedtables.c
18819 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18820 if the subtraction is performed in floating point type where NaNs are
18821 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18822 build 1. Formatting fix.
18824 2018-02-06 Jakub Jelinek <jakub@redhat.com>
18827 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18828 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18829 and skip it regardless of bb boundaries. Use CALL_P macro,
18830 don't test INSN_P (insn) together with CALL_P or JUMP_P check
18831 unnecessarily, formatting fix.
18833 2018-02-06 Michael Collison <michael.collison@arm.com>
18835 * config/arm/thumb2.md:
18836 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
18837 (*thumb_mov_notscc): Ditto.
18839 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
18842 * config/rs6000/rs6000.md (su code attribute): Use "u" for
18843 unsigned_fix, not "s".
18845 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18847 * configure.ac (gcc_fn_eh_frame_ro): New function.
18848 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
18849 correct .eh_frame permissions.
18850 * configure: Regenerate.
18852 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
18854 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
18855 irrelevant options.
18857 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18859 * config/rs6000/rs6000.c (rs6000_option_override_internal):
18860 Display warning message for -mno-speculate-indirect-jumps.
18862 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
18864 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
18866 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
18868 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
18870 PR tree-optimization/84225
18871 * tree-eh.c (find_trapping_overflow): Only call
18872 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
18874 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18877 * config/i386/i386.c: Reimplement the check of possible options
18878 -mibt/-mshstk conbination. Change error messages.
18879 * doc/invoke.texi: Fix a typo: remove extra '='.
18881 2018-02-06 Marek Polacek <polacek@redhat.com>
18883 PR tree-optimization/84228
18884 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
18886 2018-02-06 Tamar Christina <tamar.christina@arm.com>
18889 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
18890 emitted arch directives.
18891 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
18892 __ARM_FEATURE_COPROC before changing architectures.
18894 2018-02-06 Richard Biener <rguenther@suse.de>
18896 * config/i386/i386.c (print_reg): Fix typo.
18897 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
18899 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
18901 * configure: Regenerate.
18903 2018-02-05 Martin Sebor <msebor@redhat.com>
18905 PR tree-optimization/83369
18906 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
18909 2018-02-05 Martin Liska <mliska@suse.cz>
18911 * doc/invoke.texi: Cherry-pick upstream r323995.
18913 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
18915 * ira.c (ira_init_register_move_cost): Adjust comment.
18917 2018-02-05 Martin Liska <mliska@suse.cz>
18919 PR gcov-profile/84137
18920 * doc/gcov.texi: Fix typo in documentation.
18922 2018-02-05 Martin Liska <mliska@suse.cz>
18924 PR gcov-profile/83879
18925 * doc/gcov.texi: Document necessity of --dynamic-list-data when
18926 using dlopen functionality.
18928 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
18930 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
18931 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
18932 _mm_maskz_range_ss, _mm_mask_range_round_ss,
18933 _mm_maskz_range_round_ss): New intrinsics.
18934 (__builtin_ia32_rangesd128_round)
18935 (__builtin_ia32_rangess128_round): Remove.
18936 (__builtin_ia32_rangesd128_mask_round,
18937 __builtin_ia32_rangess128_mask_round): New builtins.
18938 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
18939 __builtin_ia32_rangess128_round): Remove.
18940 (__builtin_ia32_rangesd128_mask_round,
18941 __builtin_ia32_rangess128_mask_round): New builtins.
18942 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
18943 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
18944 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
18945 "<round_saeonly_constraint>")): Changed to ...
18946 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
18947 "<round_saeonly_scalar_constraint>")): ... this.
18948 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
18949 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
18950 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
18951 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
18952 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
18954 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
18956 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
18958 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
18959 Remove all values except native, 8540 and 8548.
18961 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
18963 * config/i386/i386.c (ix86_output_function_return): Pass
18964 INVALID_REGNUM, instead of -1, as invalid register number to
18965 indirect_thunk_name and output_indirect_thunk.
18967 2018-02-02 Julia Koval <julia.koval@intel.com>
18969 * config.gcc: Add -march=icelake.
18970 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
18971 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
18972 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
18973 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
18974 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
18975 (processor_target_table): Add icelake.
18976 (ix86_option_override_internal): Handle new PTAs.
18977 (get_builtin_code_for_version): Handle icelake.
18978 (M_INTEL_COREI7_ICELAKE): New.
18979 (fold_builtin_cpu): Handle icelake.
18980 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
18981 * doc/invoke.texi: Add -march=icelake.
18983 2018-02-02 Julia Koval <julia.koval@intel.com>
18985 * config/i386/i386.c (ix86_option_override_internal): Change flags type
18986 to wide_int_bitmask.
18987 * wide-int-bitmask.h: New.
18989 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18992 * config/i386/i386.md: Replace Pmode with word_mode in
18993 builtin_setjmp_setup and builtin_longjmp to support x32.
18995 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
18999 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19001 (rs6000_supported_cpu_names): New static variable.
19002 (linux_cpu_translation_table): Likewise.
19003 (elf_platform) <cpu>: Define new static variable and use it.
19004 Translate kernel AT_PLATFORM name to canonical name if needed.
19005 Error if platform name is unknown.
19007 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19010 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19012 2018-02-01 Jeff Law <law@redhat.com>
19015 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19016 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19017 the scratch if RELEASE_VIA_POP is false.
19018 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19019 If we have to save a temporary register, decrement SIZE appropriately.
19020 Pass new arguments to release_scratch_register_on_entry.
19021 (ix86_adjust_stack_and_probe): Likewise.
19022 (ix86_emit_probe_stack_range): Pass new arguments to
19023 release_scratch_register_on_entry.
19025 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19027 PR rtl-optimization/84157
19028 * combine.c (change_zero_ext): Use REG_P predicate in
19029 front of HARD_REGISTER_P predicate.
19031 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19033 * config/avr/avr.c (avr_option_override): Move disabling of
19034 -fdelete-null-pointer-checks to...
19035 * common/config/avr/avr-common.c (avr_option_optimization_table):
19038 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19040 PR tree-optimization/81635
19041 * tree-data-ref.c (split_constant_offset_1): For types that
19042 wrap on overflow, try to use range info to prove that wrapping
19045 2018-02-01 Renlin Li <renlin.li@arm.com>
19048 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19049 TAILCALL_ADDR_REGS.
19050 (aarch64_register_move_cost): Likewise.
19051 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19052 TAILCALL_ADDR_REGS.
19053 (REG_CLASS_NAMES): Likewise.
19054 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19055 TAILCALL_ADDR_REGS. Remove IP registers.
19056 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19058 2018-02-01 Richard Biener <rguenther@suse.de>
19060 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19061 for specifying RPO order and allow NULL for that.
19062 * domwalk.c (dom_walker::dom_walker): Likewise.
19063 (dom_walker::walk): Handle NULL RPO order.
19064 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19066 (rewrite_update_dom_walker): Likewise.
19067 (mark_def_dom_walker): Likewise.
19069 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19071 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19072 (aarch64_maybe_expand_sve_subreg_move): Declare.
19073 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19074 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19076 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19077 that are semantically a reverse operation.
19078 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19079 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19080 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19082 (aarch64_can_change_mode_class): For big-endian, forbid changes
19083 between two SVE modes if they have different element sizes.
19085 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19087 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19088 the TImode handling for big-endian targets.
19090 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19092 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19093 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19095 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19096 Remove BSWAP handing for big-endian targets and use the form of
19097 LD1RQ appropariate for the mode.
19099 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19101 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19102 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19103 duplicated element.
19105 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19108 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19109 check for operands that need to go through aarch64_sve_reload_be.
19111 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19113 PR tree-optimization/81661
19114 PR tree-optimization/84117
19115 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19116 * tree-eh.c: Include gimplify.h.
19117 (find_trapping_overflow, replace_trapping_overflow,
19118 rewrite_to_non_trapping_overflow): New functions.
19119 * tree-vect-loop.c: Include tree-eh.h.
19120 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19121 * tree-data-ref.c: Include tree-eh.h.
19122 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19124 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19126 PR rtl-optimization/84123
19127 * combine.c (change_zero_ext): Check if hard register satisfies
19128 can_change_dest_mode before calling gen_lowpart_SUBREG.
19130 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19133 * ira.c (ira_init_register_move_cost): Remove assert.
19135 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19137 PR rtl-optimization/84071
19138 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19139 * doc/tm.texi: Regenerate.
19141 2018-01-31 Richard Biener <rguenther@suse.de>
19143 PR tree-optimization/84132
19144 * tree-data-ref.c (analyze_miv_subscript): Properly
19145 check whether evolution_function_is_affine_multivariate_p
19146 before calling gcd_of_steps_may_divide_p.
19148 2018-01-31 Julia Koval <julia.koval@intel.com>
19151 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19152 * config/i386/i386.md (rdpid_rex64) New.
19153 (rdpid): Make 32bit only.
19155 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19158 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19159 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19161 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19164 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19166 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19168 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19170 PR rtl-optimization/84071
19171 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19172 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19174 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19176 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19177 (arc_attribute_table): Add 'aux' attribute.
19178 (arc_in_small_data_p): Consider aux like variables.
19179 (arc_is_aux_reg_p): New function.
19180 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19181 (arc_get_aux_arg): New function.
19182 (prepare_move_operands): Handle aux-register access.
19183 (arc_handle_aux_attribute): New function.
19184 * doc/extend.texi (ARC Variable attributes): Add subsection.
19186 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19188 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19189 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19190 (arc_attribute_table): Add 'uncached' attribute.
19191 (arc_print_operand): Print '.di' flag for uncached memory
19193 (arc_in_small_data_p): Do not consider for small data the uncached
19195 (arc_is_uncached_mem_p): New function.
19196 * config/arc/predicates.md (compact_store_memory_operand): Check
19197 for uncached memory accesses.
19198 (nonvol_nonimm_operand): Likewise.
19199 * doc/extend.texi (ARC Type Attribute): New subsection.
19201 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19204 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19205 falign-loops=): Add Optimization flag.
19207 2018-01-30 Jeff Law <law@redhat.com>
19210 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19211 INT_REGISTERS_SAVED. Check it prior to calling
19212 get_scratch_register_on_entry.
19213 (ix86_adjust_stack_and_probe): Similarly.
19214 (ix86_emit_probe_stack_range): Similarly.
19215 (ix86_expand_prologue): Corresponding changes.
19217 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19220 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19221 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19223 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19226 * lra-constraints.c (curr_insn_transform): Process AND in the
19229 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19231 PR rtl-optimization/83986
19232 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19233 dependence against last_pending_memory_flush in addition to
19234 pending_jump_insns.
19236 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19238 PR tree-optimization/81611
19239 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19242 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19245 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19248 2018-01-30 Richard Biener <rguenther@suse.de>
19249 Jakub Jelinek <jakub@redhat.com>
19251 PR tree-optimization/84111
19252 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19253 inner loops added during recursion, as they don't have up-to-date
19256 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19259 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19260 (can_inline_edge_by_limits_p): ... here.
19261 (can_early_inline_edge_p, check_callers,
19262 update_caller_keys, update_callee_keys, recursive_inlining,
19263 add_new_edges_to_heap, speculation_useful_p,
19264 inline_small_functions,
19265 inline_small_functions, flatten_function,
19266 inline_to_all_callers_1): Update.
19268 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19270 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19273 2018-01-30 Richard Biener <rguenther@suse.de>
19275 PR tree-optimization/83008
19276 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19277 invariant and constant vector uses in stmts when they need
19278 more than one stmt.
19280 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19283 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19284 * configure: Regenerate.
19286 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19288 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19290 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19291 Use gen_rtx_REG rather than gen_lowpart.
19293 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19295 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19296 rather than 0 when creating partial subregs.
19298 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19300 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19303 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
19306 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19307 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19308 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19309 flags. This restores the settings used before the 2017-07-24.
19310 Turning off pre increment/decrement/modify allows IVOPTS to
19311 optimize DF/SF loops where the index is an int.
19313 2018-01-29 Richard Biener <rguenther@suse.de>
19314 Kelvin Nilsen <kelvin@gcc.gnu.org>
19317 * tree-vect-stmts.c (vectorizable_call): Don't call
19318 targetm.vectorize_builtin_md_vectorized_function if callee is
19321 2018-01-22 Carl Love <cel@us.ibm.com>
19323 * doc/extend.tex: Fix typo in second arg in
19324 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19326 2018-01-29 Richard Biener <rguenther@suse.de>
19328 PR tree-optimization/84086
19329 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19330 (flush_ssaname_freelist): When SSA names were released reset
19331 the SCEV hash table.
19333 2018-01-29 Richard Biener <rguenther@suse.de>
19335 PR tree-optimization/84057
19336 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19337 removed paths when removing edges.
19339 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
19341 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19342 -mfunction-return=@var{choice}.
19344 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
19346 PR diagnostic/84034
19347 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19348 Handle CR like TAB.
19349 (layout::print_source_line): Likewise.
19350 (test_get_line_width_without_trailing_whitespace): Add test cases.
19352 2018-01-27 Jakub Jelinek <jakub@redhat.com>
19354 PR middle-end/84040
19355 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19358 2018-01-26 Jim Wilson <jimw@sifive.com>
19360 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19362 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19365 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19367 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19368 and CMP + SUB-immediate -> SUBS.
19370 2018-01-26 Martin Sebor <msebor@redhat.com>
19372 PR tree-optimization/83896
19373 * tree-ssa-strlen.c (get_string_len): Rename...
19374 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
19375 Avoid assuming length is constant.
19376 (handle_char_store): Use HOST_WIDE_INT for string length.
19378 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
19381 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19382 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19384 2018-01-26 Richard Biener <rguenther@suse.de>
19386 PR rtl-optimization/84003
19387 * dse.c (record_store): Only record redundant stores when
19388 the earlier store aliases at least all accesses the later one does.
19390 2018-01-26 Jakub Jelinek <jakub@redhat.com>
19392 PR rtl-optimization/83985
19393 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19394 REG_CFA_RESTORE insns.
19395 (delete_unmarked_insns): Don't ignore separate shrink wrapping
19396 REG_CFA_RESTORE insns here.
19399 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19400 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19402 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19404 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19405 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19406 (arc_init): Likewise.
19407 (arc_override_options): Likewise.
19408 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19410 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19412 * config/arc/arc.h (TARGET_DBNZ): Define.
19413 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19414 properly set the tune attribute.
19415 (dbnz): Use TARGET_DBNZ guard.
19416 * config/arc/arc.opt (mtune): Add core3 option.
19418 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19420 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19421 recognize new pic like addresses.
19422 (arc_delegitimize_address): Clean up.
19424 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19426 * config/arc/arc-arches.def: Option mrf16 valid for all
19428 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19429 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19430 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19431 * config/arc/arc-tables.opt: Regenerate.
19432 * config/arc/arc.c (arc_conditional_register_usage): Handle
19433 reduced register file case.
19434 (arc_file_start): Set must have build attributes.
19435 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19436 mrf16 option value.
19437 * config/arc/arc.opt (mrf16): Add new option.
19438 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19439 * config/arc/genmultilib.awk: Handle new mrf16 option.
19440 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19441 * config/arc/t-multilib: Regenerate.
19442 * doc/invoke.texi (ARC Options): Document mrf16 option.
19444 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19446 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19447 * config/arc/arc.c (arc_handle_secure_attribute): New function.
19448 (arc_attribute_table): Add 'secure_call' attribute.
19449 (arc_print_operand): Print secure call operand.
19450 (arc_function_ok_for_sibcall): Don't optimize tail calls when
19452 (arc_is_secure_call_p): New function. * config/arc/arc.md
19453 (call_i): Add support for sjli instruction.
19454 (call_value_i): Likewise.
19455 * config/arc/constraints.md (Csc): New constraint.
19457 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19458 John Eric Martin <John.Martin@emmicro-us.com>
19460 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19461 * config/arc/arc.c (_arc_jli_section): New struct.
19462 (arc_jli_section): New type.
19463 (rc_jli_sections): New static variable.
19464 (arc_handle_jli_attribute): New function.
19465 (arc_attribute_table): Add jli_always and jli_fixed attribute.
19466 (arc_file_end): New function.
19467 (TARGET_ASM_FILE_END): Define.
19468 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19469 (arc_add_jli_section): New function.
19470 (jli_call_scan): Likewise.
19471 (arc_reorg): Call jli_call_scan.
19472 (arc_output_addsi): Remove 'S' from printing asm operand.
19473 (arc_is_jli_call_p): New function.
19474 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19476 (movhi_insn): Likewise.
19477 (movsi_insn): Likewise.
19478 (movsi_set_cc_insn): Likewise.
19479 (loadqi_update): Likewise.
19480 (load_zeroextendqisi_update): Likewise.
19481 (load_signextendqisi_update): Likewise.
19482 (loadhi_update): Likewise.
19483 (load_zeroextendhisi_update): Likewise.
19484 (load_signextendhisi_update): Likewise.
19485 (loadsi_update): Likewise.
19486 (loadsf_update): Likewise.
19487 (movsicc_insn): Likewise.
19488 (bset_insn): Likewise.
19489 (bxor_insn): Likewise.
19490 (bclr_insn): Likewise.
19491 (bmsk_insn): Likewise.
19492 (bicsi3_insn): Likewise.
19493 (cmpsi_cc_c_insn): Likewise.
19494 (movsi_ne): Likewise.
19495 (movsi_cond_exec): Likewise.
19496 (clrsbsi2): Likewise.
19497 (norm_f): Likewise.
19507 (call_i): Remove 'S' asm letter, add jli instruction.
19508 (call_value_i): Likewise.
19509 * config/arc/arc.op (mjli-always): New option.
19510 * config/arc/constraints.md (Cji): New constraint.
19511 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19513 (subsf3_fpx): Likewise.
19514 (mulsf3_fpx): Likewise.
19515 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19517 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19518 function attrbutes.
19519 * doc/invoke.texi (ARC): Document mjli-always option.
19521 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
19523 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19524 avoid addition with 0 and use incw and decw where possible.
19526 2018-01-26 Richard Biener <rguenther@suse.de>
19528 PR tree-optimization/81082
19529 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19530 association if it requires casting to unsigned.
19531 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19532 from fold_plusminus_mult_expr to catch important cases late when
19533 range info is available.
19535 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19537 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19538 * configure.ac (hidden_linkonce): New test.
19539 * configure: Regenerate.
19540 * config.in: Regenerate.
19542 2018-01-26 Julia Koval <julia.koval@intel.com>
19544 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19545 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19546 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19547 _mm_mask_bitshuffle_epi64_mask): Fix type.
19548 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19549 USI_FTYPE_V4DI_V4DI_USI): Remove.
19550 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19551 __builtin_ia32_vpshufbitqmb256_mask,
19552 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19553 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19554 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19556 2018-01-26 Alan Modra <amodra@gmail.com>
19559 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19560 UNSPEC_VBPERMQ. Sort other unspecs.
19562 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
19564 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19566 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
19568 PR middle-end/83055
19569 * predict.c (drop_profile): Do not push/pop cfun; update also
19571 (handle_missing_profiles): Fix logic looking for zero profiles.
19573 2018-01-25 Jakub Jelinek <jakub@redhat.com>
19575 PR middle-end/83977
19576 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19577 on functions with #pragma omp declare simd or functions with simd
19579 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19580 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19581 Remove trailing \n from warning_at calls.
19583 2018-01-25 Tom de Vries <tom@codesourcery.com>
19586 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19587 for neutered workers.
19589 2018-01-24 Joseph Myers <joseph@codesourcery.com>
19592 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19593 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19595 2018-01-24 Jeff Law <law@redhat.com>
19598 * i386.c (get_probe_interval): Move to earlier point.
19599 (ix86_compute_frame_layout): If -fstack-clash-protection and
19600 the frame is larger than the probe interval, then use pushes
19601 to save registers rather than reg->mem moves.
19602 (ix86_expand_prologue): Remove conditional for int_registers_saved
19605 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
19608 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19609 min/max for never referenced object.
19611 2018-01-24 Jakub Jelinek <jakub@redhat.com>
19613 PR middle-end/83977
19614 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19616 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19617 attributes from DECL_ATTRIBUTES (decl) without affecting
19618 DECL_ATTRIBUTES (current_function_decl).
19619 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19620 functions with non-NULL DECL_ABSTRACT_ORIGIN.
19622 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
19624 PR tree-optimization/83979
19625 * fold-const.c (fold_comparison): Use constant_boolean_node
19626 instead of boolean_{true,false}_node.
19628 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
19630 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19633 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19635 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19636 Simplify the clause that sets the length attribute.
19637 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19638 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19639 clause that sets the length attribute.
19640 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19642 2018-01-24 Tom de Vries <tom@codesourcery.com>
19645 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19646 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19647 Add strict parameter.
19648 (prevent_branch_around_nothing): Insert dummy insn between branch to
19649 label and label with no ptx insn inbetween.
19650 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19652 2018-01-24 Tom de Vries <tom@codesourcery.com>
19655 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19656 for neutered threads in warp.
19657 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19659 2018-01-24 Richard Biener <rguenther@suse.de>
19661 PR tree-optimization/83176
19662 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19665 2018-01-24 Richard Biener <rguenther@suse.de>
19667 PR tree-optimization/82819
19668 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19669 code generating pluses that are no-ops in the target precision.
19671 2018-01-24 Richard Biener <rguenther@suse.de>
19673 PR middle-end/84000
19674 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19676 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19678 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19679 to merge probabilities.
19680 * predict.c (probably_never_executed): Also mark as cold functions
19681 with global 0 profile and guessed local profile.
19682 * profile-count.c (profile_probability::combine_with_count): New
19684 * profile-count.h (profile_probability::operator*,
19685 profile_probability::operator*=, profile_probability::operator/,
19686 profile_probability::operator/=): Reduce precision to adjusted
19687 and set value to guessed on contradictory divisions.
19688 (profile_probability::combine_with_freq): Remove.
19689 (profile_probability::combine_wiht_count): Declare.
19690 (profile_count::force_nonzero):: Set to adjusted.
19691 (profile_count::probability_in):: Set quality to adjusted.
19692 * tree-ssa-tail-merge.c (replace_block_by): Use
19693 combine_with_count.
19695 2018-01-23 Andrew Waterman <andrew@sifive.com>
19696 Jim Wilson <jimw@sifive.com>
19698 * config/riscv/riscv.c (riscv_stack_boundary): New.
19699 (riscv_option_override): Set riscv_stack_boundary. Handle
19700 riscv_preferred_stack_boundary_arg.
19701 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19702 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19703 (STACK_BOUNDARY): Set to riscv_stack_boundary.
19704 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19705 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19706 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19708 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
19711 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19712 of struct ix86_frame.
19713 (ix86_expand_epilogue): Likewise. Add a local variable for
19714 the reg_save_offset field in struct ix86_frame.
19716 2018-01-23 Bin Cheng <bin.cheng@arm.com>
19718 PR tree-optimization/82604
19719 * tree-loop-distribution.c (enum partition_kind): New enum item
19720 PKIND_PARTIAL_MEMSET.
19721 (partition_builtin_p): Support above new enum item.
19722 (generate_code_for_partition): Ditto.
19723 (compute_access_range): Differentiate cases that equality can be
19724 proven at all loops, the innermost loops or no loops.
19725 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19726 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
19727 (finalize_partitions, distribute_loop): Don't fuse partition of
19728 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19729 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19730 parloop is enabled.
19732 2018-01-23 Martin Liska <mliska@suse.cz>
19734 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19735 order to ignore the predictor.
19736 (PRED_POLYMORPHIC_CALL): Likewise.
19737 (PRED_RECURSIVE_CALL): Likewise.
19739 2018-01-23 Martin Liska <mliska@suse.cz>
19741 * tree-profile.c (tree_profiling): Print function header to
19742 aware reader which function we are working on.
19743 * value-prof.c (gimple_find_values_to_profile): Do not print
19744 not interesting value histograms.
19746 2018-01-23 Martin Liska <mliska@suse.cz>
19748 * profile-count.h (enum profile_quality): Add
19749 profile_uninitialized as the first value. Do not number values
19750 as they are zero based.
19751 (profile_count::verify): Update sanity check.
19752 (profile_probability::verify): Likewise.
19754 2018-01-23 Nathan Sidwell <nathan@acm.org>
19756 * doc/invoke.texi (ffor-scope): Deprecate.
19758 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19760 PR tree-optimization/83510
19761 * domwalk.c (set_all_edges_as_executable): New function.
19762 (dom_walker::dom_walker): Convert bool param
19763 "skip_unreachable_blocks" to enum reachability. Move setup of
19764 edge flags to set_all_edges_as_executable and only do it when
19765 reachability is REACHABLE_BLOCKS.
19766 * domwalk.h (enum dom_walker::reachability): New enum.
19767 (dom_walker::dom_walker): Convert bool param
19768 "skip_unreachable_blocks" to enum reachability.
19769 (set_all_edges_as_executable): New decl.
19770 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
19771 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
19773 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
19774 but converting true to REACHABLE_BLOCKS.
19775 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19777 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19778 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19779 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19781 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19782 if check_all_array_refs will be called.
19784 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19786 * tree.c (selftest::test_location_wrappers): Add more test
19789 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19791 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19792 (selftest::test_bit_in_range): Likewise.
19794 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19797 * doc/sourcebuild.texi (vect_float): Say that the selector
19798 only describes the situation when -funsafe-math-optimizations is on.
19799 (vect_float_strict): Document.
19801 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19803 PR tree-optimization/83965
19804 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19805 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19806 instead of checking only for a reduction.
19807 (vect_recog_widen_sum_pattern): Likewise.
19809 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19811 * predict.c (probably_never_executed): Only use precise profile info.
19812 (compute_function_frequency): Skip after inlining hack since we now
19813 have quality checking.
19815 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19817 * profile-count.h (profile_probability::very_unlikely,
19818 profile_probability::unlikely, profile_probability::even): Set
19819 precision to guessed.
19821 2018-01-23 Richard Biener <rguenther@suse.de>
19823 PR tree-optimization/83963
19824 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19825 Properly terminate dominator walk when crossing the exit edge not
19826 when visiting its source block.
19828 2018-01-23 Jakub Jelinek <jakub@redhat.com>
19831 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19832 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19834 2018-01-22 Jakub Jelinek <jakub@redhat.com>
19836 PR tree-optimization/83957
19837 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
19838 semicolon after for body surrounded by braces.
19840 PR tree-optimization/83081
19841 * profile-count.h (profile_probability::split): New method.
19842 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
19843 Use profile_probability::split.
19844 (do_compare_rtx_and_jump): Fix adjustment of probabilities
19845 when splitting a single conditional jump into 2.
19847 2018-01-22 David Malcolm <dmalcolm@redhat.com>
19849 PR tree-optimization/69452
19850 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
19853 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19855 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
19856 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
19857 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
19859 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19861 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
19863 * config/rl78/rl78.md (movdi): New define_expand.
19864 * config/rl78/rl78.c (rl78_split_movdi): New function.
19866 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
19869 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
19871 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
19872 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
19873 128-bit to produce an UNSPEC move to get the double word with the
19874 signbit and then a shift directly to do signbit.
19875 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
19876 implementation with a new version that just does either a direct
19877 move or a regular move. Move memory interface to separate insns.
19878 Move insns so they are next to the expander.
19879 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
19880 with signbit move. Split big and little endian case.
19881 (signbit<mode>2_dm_mem_le): Likewise.
19882 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
19883 (signbit<mode>2_dm2): Likewise.
19885 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19887 * config/rl78/rl78.md (anddi3): New define_expand.
19889 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19891 * config/rl78/rl78.md (umindi3): New define_expand.
19893 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19895 * config/rl78/rl78.md (smindi3): New define_expand.
19897 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19899 * config/rl78/rl78.md (smaxdi3): New define_expand.
19901 2018-01-22 Carl Love <cel@us.ibm.com>
19903 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
19904 LVX_V1TI): Add macro expansion.
19905 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
19906 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
19907 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
19908 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
19909 Change check to determine if the instruction is a byte reversing
19910 entry. Fix typo in comment.
19911 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
19912 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
19913 Add def_builtin calls for new builtins.
19914 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
19915 Add define_insn expansion.
19917 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19919 * config/rl78/rl78.md (umaxdi3): New define_expand.
19921 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19923 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
19924 for non-QImode registers.
19926 2018-01-22 Richard Biener <rguenther@suse.de>
19928 PR tree-optimization/83963
19929 * graphite-scop-detection.c (scop_detection::get_sese): Delay
19930 including the loop exit block.
19931 (scop_detection::merge_sese): Likewise.
19932 (scop_detection::add_scop): Do it here instead.
19934 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19936 * doc/sourcebuild.texi (arm_softfloat): Document.
19938 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
19941 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
19942 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
19943 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
19945 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19946 David Edelsohn <dje.gcc@gmail.com>
19949 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19950 Change "crset eq" to "crset 2".
19951 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19952 (*call_indirect_aix<mode>_nospec): Likewise.
19953 (*call_value_indirect_aix<mode>_nospec): Likewise.
19954 (*call_indirect_elfv2<mode>_nospec): Likewise.
19955 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
19956 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
19957 change assembly output from . to $.
19958 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19959 (indirect_jump<mode>_nospec): Change assembly output from . to $.
19960 (*tablejump<mode>_internal1_nospec): Likewise.
19962 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
19965 * config/sh/sh_optimize_sett_clrt.cc:
19966 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
19968 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
19970 PR tree-optimization/83940
19971 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
19972 offset_dt to vect_constant_def rather than vect_unknown_def_type.
19973 (vect_check_load_store_mask): Add a mask_dt_out parameter and
19974 use it to pass back the definition type.
19975 (vect_check_store_rhs): Likewise rhs_dt_out.
19976 (vect_build_gather_load_calls): Add a mask_dt argument and use
19977 it instead of a call to vect_is_simple_use.
19978 (vectorizable_store): Update calls to vect_check_load_store_mask
19979 and vect_check_store_rhs. Use the dt returned by the latter instead
19980 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
19981 instead of calls to vect_is_simple_use. Pass the scalar rather
19982 than the vector operand to vect_is_simple_use when handling
19983 second and subsequent copies of an rhs value.
19984 (vectorizable_load): Update calls to vect_check_load_store_mask
19985 and vect_build_gather_load_calls. Use the cached mask_dt and
19986 gs_info.offset_dt instead of calls to vect_is_simple_use.
19988 2018-01-20 Jakub Jelinek <jakub@redhat.com>
19990 PR middle-end/83945
19991 * tree-emutls.c: Include gimplify.h.
19992 (lower_emutls_2): New function.
19993 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
19994 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
19995 it before further processing.
19998 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
19999 UINTVAL (trueop1) instead of INTVAL (op1).
20001 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20005 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20006 INCOMING_FRAME_SP_OFFSET if not defined.
20007 (scan_trace): Add ENTRY argument. If true and
20008 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20009 emit a note to adjust the CFA offset.
20010 (create_cfi_notes): Adjust scan_trace callers.
20011 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20012 INCOMING_FRAME_SP_OFFSET in the CIE.
20013 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20014 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20016 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20017 * doc/tm.texi: Regenerated.
20019 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20021 PR rtl-optimization/83147
20022 * lra-constraints.c (remove_inheritance_pseudos): Use
20023 lra_substitute_pseudo_within_insn.
20025 2018-01-19 Tom de Vries <tom@codesourcery.com>
20026 Cesar Philippidis <cesar@codesourcery.com>
20029 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20031 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20034 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20035 spaces for function labels.
20037 2018-01-19 Martin Liska <mliska@suse.cz>
20039 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20040 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20041 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20042 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20043 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20044 (PRED_CONST_RETURN): Change from 69 to 65.
20045 (PRED_NULL_RETURN): Change from 91 to 71.
20046 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20047 (PRED_LOOP_GUARD): Change from 66 to 73.
20049 2018-01-19 Martin Liska <mliska@suse.cz>
20051 * predict.c (predict_insn_def): Add new assert.
20052 (struct branch_predictor): Change type to signed integer.
20053 (test_prediction_value_range): Amend test to cover
20054 PROB_UNINITIALIZED.
20055 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20056 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20057 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20058 (PRED_LOOP_IV_COMPARE): Likewise.
20059 * predict.h (PROB_UNINITIALIZED): Define new constant.
20061 2018-01-19 Martin Liska <mliska@suse.cz>
20063 * predict.c (dump_prediction): Add new format for
20064 analyze_brprob.py script which is enabled with -details
20066 * profile-count.h (precise_p): New function.
20068 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20070 PR tree-optimization/83922
20071 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20072 there are no statements that need masking.
20073 (vect_active_double_reduction_p): New function.
20074 (vect_analyze_loop_operations): Use it when handling phis that
20075 are not in the loop header.
20077 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20079 PR tree-optimization/83914
20080 * tree-vect-loop.c (vectorizable_induction): Don't convert
20081 init_expr or apply the peeling adjustment for inductions
20082 that are nested within the vectorized loop.
20084 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20086 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20089 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20093 * function.h (gimplify_parameters): Add gimple_seq * argument.
20094 * function.c: Include gimple.h and options.h.
20095 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20096 for the added local temporaries if needed.
20097 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20098 if there are any parameter cleanups, wrap whole body into a
20099 try/finally with the cleanups.
20101 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20104 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20105 Use GET_MODE_CLASS for scalar floating point.
20107 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20111 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20112 Fix call of call_cgraph_insertion_hooks.
20114 2018-01-18 Martin Sebor <msebor@redhat.com>
20116 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20118 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20121 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20124 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20127 * common.opt: (-ffile-prefix-map): New option.
20128 * opts.c (common_handle_option): Defer it.
20129 * opts-global.c (handle_common_deferred_options): Handle it.
20130 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20131 * file-prefix-map.h: New file.
20132 (remap_debug_filename, add_debug_prefix_map): ...here.
20133 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20134 * final.c (debug_prefix_map, add_debug_prefix_map
20135 remap_debug_filename): Move to...
20136 * file-prefix-map.c: New file.
20137 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20138 generalize, get rid of alloca(), use strrchr() instead of strchr().
20139 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20140 Implement in terms of add_prefix_map().
20141 (remap_macro_filename, remap_debug_filename): Implement in term of
20143 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20144 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20145 * dbxout.c: Include file-prefix-map.h.
20146 * varasm.c: Likewise.
20147 * vmsdbgout.c: Likewise.
20148 * xcoffout.c: Likewise.
20149 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20150 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20151 * doc/invoke.texi (-ffile-prefix-map): Document.
20152 (-fdebug-prefix-map): Update description.
20154 2018-01-18 Martin Liska <mliska@suse.cz>
20156 * config/i386/i386.c (indirect_thunk_name): Document that also
20158 (output_indirect_thunk): Document why both instructions
20159 (pause and lfence) are generated.
20161 2018-01-18 Richard Biener <rguenther@suse.de>
20163 PR tree-optimization/83887
20164 * graphite-scop-detection.c
20165 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20166 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20167 (scop_detection::merge_sese): Re-implement with a flood-fill
20168 algorithm that properly finds a SESE region if it exists.
20170 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20173 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20174 pointer_diff optimizations use view_convert instead of convert.
20176 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20178 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20179 Generate different code for -mno-speculate-indirect-jumps.
20180 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20181 (*call_indirect_aix<mode>): Disable for
20182 -mno-speculate-indirect-jumps.
20183 (*call_indirect_aix<mode>_nospec): New define_insn.
20184 (*call_value_indirect_aix<mode>): Disable for
20185 -mno-speculate-indirect-jumps.
20186 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20187 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20188 -mno-speculate-indirect-jumps.
20189 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20191 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20193 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20194 long double type, set the flags for noting the default long double
20195 type, even if we don't pass or return a long double type.
20197 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20200 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20203 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20205 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20206 support for merge[hl].
20207 (fold_mergehl_helper): New helper function.
20208 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20209 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20210 (altivec_vmrglw_direct): Add xxmrglw insn.
20212 2018-01-17 Andrew Waterman <andrew@sifive.com>
20214 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20215 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20217 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20220 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20221 call the lto_location_cache before reading the
20222 DECL_SOURCE_LOCATION of the types.
20224 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20225 Richard Sandiford <richard.sandiford@linaro.org>
20227 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20228 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20229 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20230 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20231 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20233 * config/aarch64/constraints.md (aarch64_movti_operand):
20235 * config/aarch64/predicates.md (Uti): Add new constraint.
20237 2018-01-17 Carl Love <cel@us.ibm.com>
20239 * config/rs6000/vsx.md (define_expand xl_len_r,
20240 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20241 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20243 (define_expand, define_insn): Move the shift left from the
20244 define_insn to the define_expand for lxvl and stxvl instructions.
20245 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20246 and XL_LEN_R definitions to PURE.
20248 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20250 * config/i386/i386.c (indirect_thunk_name): Declare regno
20251 as unsigned int. Compare regno with INVALID_REGNUM.
20252 (output_indirect_thunk): Ditto.
20253 (output_indirect_thunk_function): Ditto.
20254 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20255 in the call to output_indirect_thunk_function.
20257 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20259 PR middle-end/83884
20260 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20261 rather than the size of inner_type to determine the stack slot size
20262 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20264 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20267 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20270 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20272 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20273 endian Linux systems to optionally enable multilibs for selecting
20274 the long double type if the user configured an explicit type.
20275 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20276 have no long double multilibs if not defined.
20277 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20278 warn if the user used -mabi={ieee,ibm}longdouble and we built
20279 multilibs for long double.
20280 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20281 appropriate multilib option.
20282 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20284 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20285 for building long double multilibs.
20286 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20288 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20290 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20293 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20295 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20298 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20301 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20304 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20306 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20307 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20309 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
20311 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20312 different rtl trees depending on TARGET_64BIT.
20313 (rs6000_gen_lvx): Likewise.
20315 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20317 * config/visium/visium.md (nop): Tweak comment.
20318 (hazard_nop): Likewise.
20320 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20322 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20323 -mspeculate-indirect-jumps.
20324 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20325 for -mno-speculate-indirect-jumps.
20326 (*call_indirect_elfv2<mode>_nospec): New define_insn.
20327 (*call_value_indirect_elfv2<mode>): Disable for
20328 -mno-speculate-indirect-jumps.
20329 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20330 (indirect_jump): Emit different RTL for
20331 -mno-speculate-indirect-jumps.
20332 (*indirect_jump<mode>): Disable for
20333 -mno-speculate-indirect-jumps.
20334 (*indirect_jump<mode>_nospec): New define_insn.
20335 (tablejump): Emit different RTL for
20336 -mno-speculate-indirect-jumps.
20337 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20338 (tablejumpsi_nospec): New define_expand.
20339 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20340 (tablejumpdi_nospec): New define_expand.
20341 (*tablejump<mode>_internal1): Disable for
20342 -mno-speculate-indirect-jumps.
20343 (*tablejump<mode>_internal1_nospec): New define_insn.
20344 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20347 2018-01-16 Artyom Skrobov tyomitch@gmail.com
20349 * caller-save.c (insert_save): Drop unnecessary parameter. All
20352 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20353 Richard Biener <rguenth@suse.de>
20356 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20357 return early, inline manually is_gimple_sizepos. Make sure if we
20358 call gimplify_expr we don't end up with a gimple constant.
20359 * tree.c (variably_modified_type_p): Don't return true for
20360 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
20361 * gimplify.h (is_gimple_sizepos): Remove.
20363 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20365 PR tree-optimization/83857
20366 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20367 vectorizable_live_operation for pure SLP statements.
20368 (vectorizable_live_operation): Handle PHIs.
20370 2018-01-16 Richard Biener <rguenther@suse.de>
20372 PR tree-optimization/83867
20373 * tree-vect-stmts.c (vect_transform_stmt): Precompute
20374 nested_in_vect_loop_p since the scalar stmt may get invalidated.
20376 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20379 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20380 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20381 If off is not INTEGER_CST, issue a may not be aligned warning
20382 rather than isn't aligned. Use isn%'t rather than isn't.
20383 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20385 <case MULT_EXPR>: Improve the case when bottom and one of the
20386 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20387 operand, in that case check if the other operand is multiple of
20388 bottom divided by the INTEGER_CST operand.
20390 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20393 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20394 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20395 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20396 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20397 * config/pa/pa.c (pa_function_arg_advance): Likewise.
20398 (pa_function_arg, pa_arg_partial_bytes): Likewise.
20399 (pa_function_arg_size): New function.
20401 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20403 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20404 in a separate statement.
20406 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20408 PR tree-optimization/83847
20409 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20410 group gathers and scatters.
20412 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20414 PR rtl-optimization/86620
20415 * params.def (max-sched-ready-insns): Bump minimum value to 1.
20417 PR rtl-optimization/83213
20418 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20419 to last if both are JUMP_INSNs.
20421 PR tree-optimization/83843
20422 * gimple-ssa-store-merging.c
20423 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20424 store_immediate_info for bswap/nop orig_stores.
20426 2018-01-15 Andrew Waterman <andrew@sifive.com>
20428 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20430 <UDIV>: Increase cost if !TARGET_DIV.
20432 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
20434 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20435 (define_attr "cr_logical_3op"): New.
20436 (cceq_ior_compare): Adjust.
20437 (cceq_ior_compare_complement): Adjust.
20438 (*cceq_rev_compare): Adjust.
20439 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20440 (is_cracked_insn): Adjust.
20441 (insn_must_be_first_in_group): Adjust.
20442 * config/rs6000/40x.md: Adjust.
20443 * config/rs6000/440.md: Adjust.
20444 * config/rs6000/476.md: Adjust.
20445 * config/rs6000/601.md: Adjust.
20446 * config/rs6000/603.md: Adjust.
20447 * config/rs6000/6xx.md: Adjust.
20448 * config/rs6000/7450.md: Adjust.
20449 * config/rs6000/7xx.md: Adjust.
20450 * config/rs6000/8540.md: Adjust.
20451 * config/rs6000/cell.md: Adjust.
20452 * config/rs6000/e300c2c3.md: Adjust.
20453 * config/rs6000/e500mc.md: Adjust.
20454 * config/rs6000/e500mc64.md: Adjust.
20455 * config/rs6000/e5500.md: Adjust.
20456 * config/rs6000/e6500.md: Adjust.
20457 * config/rs6000/mpc.md: Adjust.
20458 * config/rs6000/power4.md: Adjust.
20459 * config/rs6000/power5.md: Adjust.
20460 * config/rs6000/power6.md: Adjust.
20461 * config/rs6000/power7.md: Adjust.
20462 * config/rs6000/power8.md: Adjust.
20463 * config/rs6000/power9.md: Adjust.
20464 * config/rs6000/rs64.md: Adjust.
20465 * config/rs6000/titan.md: Adjust.
20467 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20469 * config/i386/predicates.md (indirect_branch_operand): Rewrite
20470 ix86_indirect_branch_register logic.
20472 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20474 * config/i386/constraints.md (Bs): Update
20475 ix86_indirect_branch_register check. Don't check
20476 ix86_indirect_branch_register with GOT_memory_operand.
20478 * config/i386/predicates.md (GOT_memory_operand): Don't check
20479 ix86_indirect_branch_register here.
20480 (GOT32_symbol_operand): Likewise.
20482 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20484 * config/i386/predicates.md (constant_call_address_operand):
20485 Rewrite ix86_indirect_branch_register logic.
20486 (sibcall_insn_operand): Likewise.
20488 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20490 * config/i386/constraints.md (Bs): Replace
20491 ix86_indirect_branch_thunk_register with
20492 ix86_indirect_branch_register.
20494 * config/i386/i386.md (indirect_jump): Likewise.
20495 (tablejump): Likewise.
20496 (*sibcall_memory): Likewise.
20497 (*sibcall_value_memory): Likewise.
20498 Peepholes of indirect call and jump via memory: Likewise.
20499 * config/i386/i386.opt: Likewise.
20500 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20501 (GOT_memory_operand): Likewise.
20502 (call_insn_operand): Likewise.
20503 (sibcall_insn_operand): Likewise.
20504 (GOT32_symbol_operand): Likewise.
20506 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20508 PR middle-end/83837
20509 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20510 type rather than type addr's type points to.
20511 (expand_omp_atomic_mutex): Likewise.
20512 (expand_omp_atomic): Likewise.
20514 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20517 * config/i386/i386.c (output_indirect_thunk_function): Use
20518 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20519 for __x86_return_thunk.
20521 2018-01-15 Richard Biener <rguenther@suse.de>
20523 PR middle-end/83850
20524 * expmed.c (extract_bit_field_1): Fix typo.
20526 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20529 * config/arm/iterators.md (VF): New mode iterator.
20530 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20531 Remove integer-related logic from pattern.
20532 (neon_vabd<mode>_3): Likewise.
20534 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20536 PR middle-end/82694
20537 * common.opt (fstrict-overflow): No longer an alias.
20538 (fwrapv-pointer): New option.
20539 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20540 also for pointer types based on flag_wrapv_pointer.
20541 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20542 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20543 opts->x_flag_wrapv got set.
20544 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20545 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20546 POINTER_TYPE_OVERFLOW_UNDEFINED.
20547 * match.pd: Likewise in address comparison pattern.
20548 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20550 2018-01-15 Richard Biener <rguenther@suse.de>
20553 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20554 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
20555 Reset type names to their identifier if their TYPE_DECL doesn't
20556 have linkage (and thus is used for ODR and devirt).
20557 (save_debug_info_for_decl): Remove.
20558 (save_debug_info_for_type): Likewise.
20559 (add_tree_to_fld_list): Adjust.
20560 * tree-pretty-print.c (dump_generic_node): Make dumping of
20561 type names more robust.
20563 2018-01-15 Richard Biener <rguenther@suse.de>
20565 * BASE-VER: Bump to 8.0.1.
20567 2018-01-14 Martin Sebor <msebor@redhat.com>
20570 * builtins.c (check_access): Avoid warning when the no-warning bit
20573 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
20575 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20576 * ira-color (allocno_hard_regs_compare): Likewise.
20578 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
20581 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20582 Use .pushsection/.popsection.
20584 2018-01-14 Martin Sebor <msebor@redhat.com>
20587 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20589 2018-01-14 Jakub Jelinek <jakub@redhat.com>
20591 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20592 entry from extra_headers.
20593 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20594 extra_headers, make the list bitwise identical to the i?86-*-* one.
20596 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20598 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20599 -mcmodel=large with -mindirect-branch=thunk,
20600 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20601 -mfunction-return=thunk-extern.
20602 * doc/invoke.texi: Document -mcmodel=large is incompatible with
20603 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20604 -mfunction-return=thunk and -mfunction-return=thunk-extern.
20606 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20608 * config/i386/i386.c (print_reg): Print the name of the full
20609 integer register without '%'.
20610 (ix86_print_operand): Handle 'V'.
20611 * doc/extend.texi: Document 'V' modifier.
20613 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20615 * config/i386/constraints.md (Bs): Disallow memory operand for
20616 -mindirect-branch-register.
20618 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20619 (GOT_memory_operand): Likewise.
20620 (call_insn_operand): Likewise.
20621 (sibcall_insn_operand): Likewise.
20622 (GOT32_symbol_operand): Likewise.
20623 * config/i386/i386.md (indirect_jump): Call convert_memory_address
20624 for -mindirect-branch-register.
20625 (tablejump): Likewise.
20626 (*sibcall_memory): Likewise.
20627 (*sibcall_value_memory): Likewise.
20628 Disallow peepholes of indirect call and jump via memory for
20629 -mindirect-branch-register.
20630 (*call_pop): Replace m with Bw.
20631 (*call_value_pop): Likewise.
20632 (*sibcall_pop_memory): Replace m with Bs.
20633 * config/i386/i386.opt (mindirect-branch-register): New option.
20634 * doc/invoke.texi: Document -mindirect-branch-register option.
20636 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20638 * config/i386/i386-protos.h (ix86_output_function_return): New.
20639 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20640 set function_return_type.
20641 (indirect_thunk_name): Add ret_p to indicate thunk for function
20643 (output_indirect_thunk_function): Pass false to
20644 indirect_thunk_name.
20645 (ix86_output_indirect_branch_via_reg): Likewise.
20646 (ix86_output_indirect_branch_via_push): Likewise.
20647 (output_indirect_thunk_function): Create alias for function
20648 return thunk if regno < 0.
20649 (ix86_output_function_return): New function.
20650 (ix86_handle_fndecl_attribute): Handle function_return.
20651 (ix86_attribute_table): Add function_return.
20652 * config/i386/i386.h (machine_function): Add
20653 function_return_type.
20654 * config/i386/i386.md (simple_return_internal): Use
20655 ix86_output_function_return.
20656 (simple_return_internal_long): Likewise.
20657 * config/i386/i386.opt (mfunction-return=): New option.
20658 (indirect_branch): Mention -mfunction-return=.
20659 * doc/extend.texi: Document function_return function attribute.
20660 * doc/invoke.texi: Document -mfunction-return= option.
20662 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20664 * config/i386/i386-opts.h (indirect_branch): New.
20665 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20666 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20667 with local indirect jump when converting indirect call and jump.
20668 (ix86_set_indirect_branch_type): New.
20669 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20670 (indirectlabelno): New.
20671 (indirect_thunk_needed): Likewise.
20672 (indirect_thunk_bnd_needed): Likewise.
20673 (indirect_thunks_used): Likewise.
20674 (indirect_thunks_bnd_used): Likewise.
20675 (INDIRECT_LABEL): Likewise.
20676 (indirect_thunk_name): Likewise.
20677 (output_indirect_thunk): Likewise.
20678 (output_indirect_thunk_function): Likewise.
20679 (ix86_output_indirect_branch_via_reg): Likewise.
20680 (ix86_output_indirect_branch_via_push): Likewise.
20681 (ix86_output_indirect_branch): Likewise.
20682 (ix86_output_indirect_jmp): Likewise.
20683 (ix86_code_end): Call output_indirect_thunk_function if needed.
20684 (ix86_output_call_insn): Call ix86_output_indirect_branch if
20686 (ix86_handle_fndecl_attribute): Handle indirect_branch.
20687 (ix86_attribute_table): Add indirect_branch.
20688 * config/i386/i386.h (machine_function): Add indirect_branch_type
20689 and has_local_indirect_jump.
20690 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20692 (tablejump): Likewise.
20693 (*indirect_jump): Use ix86_output_indirect_jmp.
20694 (*tablejump_1): Likewise.
20695 (simple_return_indirect_internal): Likewise.
20696 * config/i386/i386.opt (mindirect-branch=): New option.
20697 (indirect_branch): New.
20700 (thunk-inline): Likewise.
20701 (thunk-extern): Likewise.
20702 * doc/extend.texi: Document indirect_branch function attribute.
20703 * doc/invoke.texi: Document -mindirect-branch= option.
20705 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
20708 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20710 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
20712 * ipa-inline.c (want_inline_small_function_p): Return false if
20713 inlining has already failed with CIF_FINAL_ERROR.
20714 (update_caller_keys): Call want_inline_small_function_p before
20716 (update_callee_keys): Likewise.
20718 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
20720 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20722 (rs6000_quadword_masked_address_p): Likewise.
20723 (quad_aligned_load_p): Likewise.
20724 (quad_aligned_store_p): Likewise.
20725 (const_load_sequence_p): Add comment to describe the outer-most loop.
20726 (mimic_memory_attributes_and_flags): New function.
20727 (rs6000_gen_stvx): Likewise.
20728 (replace_swapped_aligned_store): Likewise.
20729 (rs6000_gen_lvx): Likewise.
20730 (replace_swapped_aligned_load): Likewise.
20731 (replace_swapped_load_constant): Capitalize argument name in
20732 comment describing this function.
20733 (rs6000_analyze_swaps): Add a third pass to search for vector loads
20734 and stores that access quad-word aligned addresses and replace
20735 with stvx or lvx instructions when appropriate.
20736 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20737 New function prototype.
20738 (rs6000_quadword_masked_address_p): Likewise.
20739 (rs6000_gen_lvx): Likewise.
20740 (rs6000_gen_stvx): Likewise.
20741 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20742 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20743 when memory address is aligned.
20744 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20745 this split to select lvx instruction when memory address is aligned.
20746 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20747 instruction when memory address is aligned.
20748 (*vsx_le_perm_load_v16qi): Likewise.
20749 (four unnamed splitters): Modify to select the stvx instruction
20750 when memory is aligned.
20752 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
20754 * predict.c (determine_unlikely_bbs): Handle correctly BBs
20755 which appears in the queue multiple times.
20757 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20758 Alan Hayward <alan.hayward@arm.com>
20759 David Sherwood <david.sherwood@arm.com>
20761 * tree-vectorizer.h (vec_lower_bound): New structure.
20762 (_loop_vec_info): Add check_nonzero and lower_bounds.
20763 (LOOP_VINFO_CHECK_NONZERO): New macro.
20764 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
20765 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
20766 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
20767 fields. Make seg_len the distance travelled, not including the
20769 (dr_direction_indicator): Declare.
20770 (dr_zero_step_indicator): Likewise.
20771 (dr_known_forward_stride_p): Likewise.
20772 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
20774 (runtime_alias_check_p): Allow runtime alias checks with
20776 (operator ==): Compare access_size and align.
20777 (prune_runtime_alias_test_list): Rework for new distinction between
20778 the access_size and seg_len.
20779 (create_intersect_range_checks_index): Likewise. Cope with polynomial
20781 (get_segment_min_max): New function.
20782 (create_intersect_range_checks): Use it.
20783 (dr_step_indicator): New function.
20784 (dr_direction_indicator): Likewise.
20785 (dr_zero_step_indicator): Likewise.
20786 (dr_known_forward_stride_p): Likewise.
20787 * tree-loop-distribution.c (data_ref_segment_size): Return
20788 DR_STEP * (niters - 1).
20789 (compute_alias_check_pairs): Update call to the dr_with_seg_len
20791 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20792 (vect_preserves_scalar_order_p): New function, split out from...
20793 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
20794 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20795 (vect_vfa_access_size): New function.
20796 (vect_vfa_align): Likewise.
20797 (vect_compile_time_alias): Take access_size_a and access_b arguments.
20798 (dump_lower_bound): New function.
20799 (vect_check_lower_bound): Likewise.
20800 (vect_small_gap_p): Likewise.
20801 (vectorizable_with_step_bound_p): Likewise.
20802 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20803 depencies if the vectorization factor is 1. Convert the checks
20804 for nonzero steps into checks on the bounds of DR_STEP. Try using
20805 a bunds check for variable steps if the minimum required step is
20806 relatively small. Update calls to the dr_with_seg_len
20807 constructor and to vect_compile_time_alias.
20808 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20810 (vect_loop_versioning): Call it.
20811 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20813 (vect_estimate_min_profitable_iters): Account for any bounds checks.
20815 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20816 Alan Hayward <alan.hayward@arm.com>
20817 David Sherwood <david.sherwood@arm.com>
20819 * doc/sourcebuild.texi (vect_scatter_store): Document.
20820 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20822 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20824 * genopinit.c (main): Add supports_vec_scatter_store and
20825 supports_vec_scatter_store_cached to target_optabs.
20826 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20827 IFN_MASK_SCATTER_STORE.
20828 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20830 * internal-fn.h (internal_store_fn_p): Declare.
20831 (internal_fn_stored_value_index): Likewise.
20832 * internal-fn.c (scatter_store_direct): New macro.
20833 (expand_scatter_store_optab_fn): New function.
20834 (direct_scatter_store_optab_supported_p): New macro.
20835 (internal_store_fn_p): New function.
20836 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
20837 IFN_MASK_SCATTER_STORE.
20838 (internal_fn_mask_index): Likewise.
20839 (internal_fn_stored_value_index): New function.
20840 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
20841 for scatter stores.
20842 * optabs-query.h (supports_vec_scatter_store_p): Declare.
20843 * optabs-query.c (supports_vec_scatter_store_p): New function.
20844 * tree-vectorizer.h (vect_get_store_rhs): Declare.
20845 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
20846 true for scatter stores.
20847 (vect_gather_scatter_fn_p): Handle scatter stores too.
20848 (vect_check_gather_scatter): Consider using scatter stores if
20849 supports_vec_scatter_store_p.
20850 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
20851 scatter stores too.
20852 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20853 internal_fn_stored_value_index.
20854 (check_load_store_masking): Handle scatter stores too.
20855 (vect_get_store_rhs): Make public.
20856 (vectorizable_call): Use internal_store_fn_p.
20857 (vectorizable_store): Handle scatter store internal functions.
20858 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
20859 when deciding whether the end of the group has been reached.
20860 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
20861 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
20862 (mask_scatter_store<mode>): New insns.
20864 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20865 Alan Hayward <alan.hayward@arm.com>
20866 David Sherwood <david.sherwood@arm.com>
20868 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
20869 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
20870 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
20872 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
20873 Use vect_truncate_gather_scatter_offset if we can't treat the
20874 operation as a normal gather load or scatter store.
20875 (get_group_load_store_type): Take the gather_scatter_info
20876 as argument. Try using a gather load or scatter store for
20877 single-element groups.
20878 (get_load_store_type): Update calls to get_group_load_store_type
20879 and vect_use_strided_gather_scatters_p.
20881 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20882 Alan Hayward <alan.hayward@arm.com>
20883 David Sherwood <david.sherwood@arm.com>
20885 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
20886 optional tree argument.
20887 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
20889 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
20890 but continue to use the current value as a fallback.
20891 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
20892 to compare the updates.
20893 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
20894 (get_load_store_type): Use it when handling a strided access.
20895 (vect_get_strided_load_store_ops): New function.
20896 (vect_get_data_ptr_increment): Likewise.
20897 (vectorizable_load): Handle strided gather loads. Always pass
20898 a step to vect_create_data_ref_ptr and bump_vector_ptr.
20900 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20901 Alan Hayward <alan.hayward@arm.com>
20902 David Sherwood <david.sherwood@arm.com>
20904 * doc/md.texi (gather_load@var{m}): Document.
20905 (mask_gather_load@var{m}): Likewise.
20906 * genopinit.c (main): Add supports_vec_gather_load and
20907 supports_vec_gather_load_cached to target_optabs.
20908 * optabs-tree.c (init_tree_optimization_optabs): Use
20909 ggc_cleared_alloc to allocate target_optabs.
20910 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
20911 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
20913 * internal-fn.h (internal_load_fn_p): Declare.
20914 (internal_gather_scatter_fn_p): Likewise.
20915 (internal_fn_mask_index): Likewise.
20916 (internal_gather_scatter_fn_supported_p): Likewise.
20917 * internal-fn.c (gather_load_direct): New macro.
20918 (expand_gather_load_optab_fn): New function.
20919 (direct_gather_load_optab_supported_p): New macro.
20920 (direct_internal_fn_optab): New function.
20921 (internal_load_fn_p): Likewise.
20922 (internal_gather_scatter_fn_p): Likewise.
20923 (internal_fn_mask_index): Likewise.
20924 (internal_gather_scatter_fn_supported_p): Likewise.
20925 * optabs-query.c (supports_at_least_one_mode_p): New function.
20926 (supports_vec_gather_load_p): Likewise.
20927 * optabs-query.h (supports_vec_gather_load_p): Declare.
20928 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20929 and memory_type field.
20930 (NUM_PATTERNS): Bump to 15.
20931 * tree-vect-data-refs.c: Include internal-fn.h.
20932 (vect_gather_scatter_fn_p): New function.
20933 (vect_describe_gather_scatter_call): Likewise.
20934 (vect_check_gather_scatter): Try using internal functions for
20935 gather loads. Recognize existing calls to a gather load function.
20936 (vect_analyze_data_refs): Consider using gather loads if
20937 supports_vec_gather_load_p.
20938 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
20939 (vect_get_gather_scatter_offset_type): Likewise.
20940 (vect_convert_mask_for_vectype): Likewise.
20941 (vect_add_conversion_to_patterm): Likewise.
20942 (vect_try_gather_scatter_pattern): Likewise.
20943 (vect_recog_gather_scatter_pattern): New pattern recognizer.
20944 (vect_vect_recog_func_ptrs): Add it.
20945 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20946 internal_fn_mask_index and internal_gather_scatter_fn_p.
20947 (check_load_store_masking): Take the gather_scatter_info as an
20948 argument and handle gather loads.
20949 (vect_get_gather_scatter_ops): New function.
20950 (vectorizable_call): Check internal_load_fn_p.
20951 (vectorizable_load): Likewise. Handle gather load internal
20953 (vectorizable_store): Update call to check_load_store_masking.
20954 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
20955 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
20956 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
20957 (aarch64_gather_scale_operand_d): New predicates.
20958 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
20959 (mask_gather_load<mode>): New insns.
20961 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20962 Alan Hayward <alan.hayward@arm.com>
20963 David Sherwood <david.sherwood@arm.com>
20965 * optabs.def (fold_left_plus_optab): New optab.
20966 * doc/md.texi (fold_left_plus_@var{m}): Document.
20967 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
20968 * internal-fn.c (fold_left_direct): Define.
20969 (expand_fold_left_optab_fn): Likewise.
20970 (direct_fold_left_optab_supported_p): Likewise.
20971 * fold-const-call.c (fold_const_fold_left): New function.
20972 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
20973 * tree-parloops.c (valid_reduction_p): New function.
20974 (gather_scalar_reductions): Use it.
20975 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
20976 (vect_finish_replace_stmt): Declare.
20977 * tree-vect-loop.c (fold_left_reduction_fn): New function.
20978 (needs_fold_left_reduction_p): New function, split out from...
20979 (vect_is_simple_reduction): ...here. Accept reductions that
20980 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
20981 (vect_force_simple_reduction): Also store the reduction type in
20982 the assignment's STMT_VINFO_REDUC_TYPE.
20983 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
20984 (merge_with_identity): New function.
20985 (vect_expand_fold_left): Likewise.
20986 (vectorize_fold_left_reduction): Likewise.
20987 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
20988 scalar phi in place for it. Check for target support and reject
20989 cases that would reassociate the operation. Defer the transform
20990 phase to vectorize_fold_left_reduction.
20991 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
20992 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
20993 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
20995 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20997 * tree-if-conv.c (predicate_mem_writes): Remove redundant
20998 call to ifc_temp_var.
21000 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21001 Alan Hayward <alan.hayward@arm.com>
21002 David Sherwood <david.sherwood@arm.com>
21004 * target.def (legitimize_address_displacement): Take the original
21005 offset as a poly_int.
21006 * targhooks.h (default_legitimize_address_displacement): Update
21008 * targhooks.c (default_legitimize_address_displacement): Likewise.
21009 * doc/tm.texi: Regenerate.
21010 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21011 as an argument, moving assert of ad->disp == ad->disp_term to...
21012 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21013 Try calling targetm.legitimize_address_displacement before expanding
21014 the address rather than afterwards, and adjust for the new interface.
21015 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21016 Match the new hook interface. Handle SVE addresses.
21017 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21018 new hook interface.
21020 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21022 * Makefile.in (OBJS): Add early-remat.o.
21023 * target.def (select_early_remat_modes): New hook.
21024 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21025 * doc/tm.texi: Regenerate.
21026 * targhooks.h (default_select_early_remat_modes): Declare.
21027 * targhooks.c (default_select_early_remat_modes): New function.
21028 * timevar.def (TV_EARLY_REMAT): New timevar.
21029 * passes.def (pass_early_remat): New pass.
21030 * tree-pass.h (make_pass_early_remat): Declare.
21031 * early-remat.c: New file.
21032 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21034 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21036 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21037 Alan Hayward <alan.hayward@arm.com>
21038 David Sherwood <david.sherwood@arm.com>
21040 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21041 vfm1 with a bound_epilog parameter.
21042 (vect_do_peeling): Update calls accordingly, and move the prologue
21043 call earlier in the function. Treat the base bound_epilog as 0 for
21044 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21045 this base when peeling for gaps.
21046 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21047 with fully-masked loops.
21048 (vect_estimate_min_profitable_iters): Handle the single peeled
21049 iteration in that case.
21051 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21052 Alan Hayward <alan.hayward@arm.com>
21053 David Sherwood <david.sherwood@arm.com>
21055 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21056 single-element interleaving even if the size is not a power of 2.
21057 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21058 accesses for single-element interleaving if the group size is
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 (fold_extract_last_@var{m}): Document.
21066 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21067 * optabs.def (fold_extract_last_optab): New optab.
21068 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21069 * internal-fn.c (fold_extract_direct): New macro.
21070 (expand_fold_extract_optab_fn): Likewise.
21071 (direct_fold_extract_optab_supported_p): Likewise.
21072 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21073 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21074 EXTRACT_LAST_REDUCTION.
21075 (get_initial_def_for_reduction): Do not create an initial vector
21076 for EXTRACT_LAST_REDUCTION reductions.
21077 (vectorizable_reduction): Leave the scalar phi in place for
21078 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21079 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21080 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21081 transform phase to vectorizable_condition.
21082 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21084 (vect_finish_stmt_generation): ...here.
21085 (vect_finish_replace_stmt): New function.
21086 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21087 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21089 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21091 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21092 Alan Hayward <alan.hayward@arm.com>
21093 David Sherwood <david.sherwood@arm.com>
21095 * doc/md.texi (extract_last_@var{m}): Document.
21096 * optabs.def (extract_last_optab): New optab.
21097 * internal-fn.def (EXTRACT_LAST): New internal function.
21098 * internal-fn.c (cond_unary_direct): New macro.
21099 (expand_cond_unary_optab_fn): Likewise.
21100 (direct_cond_unary_optab_supported_p): Likewise.
21101 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21102 loops using EXTRACT_LAST.
21103 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21104 (extract_last_<mode>): ...this optab.
21105 (vec_extract<mode><Vel>): Update accordingly.
21107 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21108 Alan Hayward <alan.hayward@arm.com>
21109 David Sherwood <david.sherwood@arm.com>
21111 * target.def (empty_mask_is_expensive): New hook.
21112 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21113 * doc/tm.texi: Regenerate.
21114 * targhooks.h (default_empty_mask_is_expensive): Declare.
21115 * targhooks.c (default_empty_mask_is_expensive): New function.
21116 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21117 if the target says that empty masks are expensive.
21118 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21120 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21122 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21123 Alan Hayward <alan.hayward@arm.com>
21124 David Sherwood <david.sherwood@arm.com>
21126 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21127 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21128 (vect_use_loop_mask_for_alignment_p): New function.
21129 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21130 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21131 niters_skip argument. Make sure that the first niters_skip elements
21132 of the first iteration are inactive.
21133 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21134 Update call to vect_set_loop_masks_directly.
21135 (get_misalign_in_elems): New function, split out from...
21136 (vect_gen_prolog_loop_niters): ...here.
21137 (vect_update_init_of_dr): Take a code argument that specifies whether
21138 the adjustment should be added or subtracted.
21139 (vect_update_init_of_drs): Likewise.
21140 (vect_prepare_for_masked_peels): New function.
21141 (vect_do_peeling): Skip prologue peeling if we're using a mask
21142 instead. Update call to vect_update_inits_of_drs.
21143 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21145 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21146 alignment. Do not include the number of peeled iterations in
21147 the minimum threshold in that case.
21148 (vectorizable_induction): Adjust the start value down by
21149 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21150 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21151 Take the number of skipped iterations into account when calculating
21153 * tree-vect-stmts.c (vect_gen_while_not): New function.
21155 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21156 Alan Hayward <alan.hayward@arm.com>
21157 David Sherwood <david.sherwood@arm.com>
21159 * doc/sourcebuild.texi (vect_fully_masked): Document.
21160 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21161 default value to 0.
21162 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21164 (vect_analyze_loop_2): ...here. Don't check the vectorization
21165 factor against the number of loop iterations if the loop is
21168 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21169 Alan Hayward <alan.hayward@arm.com>
21170 David Sherwood <david.sherwood@arm.com>
21172 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21173 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21174 (dump_groups): Update accordingly.
21175 (iv_use::mem_type): New member variable.
21176 (address_p): New function.
21177 (record_use): Add a mem_type argument and initialize the new
21179 (record_group_use): Add a mem_type argument. Use address_p.
21180 Remove obsolete null checks of base_object. Update call to record_use.
21181 (find_interesting_uses_op): Update call to record_group_use.
21182 (find_interesting_uses_cond): Likewise.
21183 (find_interesting_uses_address): Likewise.
21184 (get_mem_type_for_internal_fn): New function.
21185 (find_address_like_use): Likewise.
21186 (find_interesting_uses_stmt): Try find_address_like_use before
21187 calling find_interesting_uses_op.
21188 (addr_offset_valid_p): Use the iv mem_type field as the type
21189 of the addressed memory.
21190 (add_autoinc_candidates): Likewise.
21191 (get_address_cost): Likewise.
21192 (split_small_address_groups_p): Use address_p.
21193 (split_address_groups): Likewise.
21194 (add_iv_candidate_for_use): Likewise.
21195 (autoinc_possible_for_pair): Likewise.
21196 (rewrite_groups): Likewise.
21197 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21198 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21199 (get_alias_ptr_type_for_ptr_address): New function.
21200 (rewrite_use_address): Rewrite address uses in calls that were
21201 identified by find_address_like_use.
21203 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21204 Alan Hayward <alan.hayward@arm.com>
21205 David Sherwood <david.sherwood@arm.com>
21207 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21209 * gimple-expr.h (is_gimple_addressable: Likewise.
21210 * gimple-expr.c (is_gimple_address): Likewise.
21211 * internal-fn.c (expand_call_mem_ref): New function.
21212 (expand_mask_load_optab_fn): Use it.
21213 (expand_mask_store_optab_fn): Likewise.
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 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21220 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21221 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21222 (cond_umax@var{mode}): Document.
21223 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21224 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21225 (cond_umin_optab, cond_umax_optab): New optabs.
21226 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21227 (COND_IOR, COND_XOR): New internal functions.
21228 * internal-fn.h (get_conditional_internal_fn): Declare.
21229 * internal-fn.c (cond_binary_direct): New macro.
21230 (expand_cond_binary_optab_fn): Likewise.
21231 (direct_cond_binary_optab_supported_p): Likewise.
21232 (get_conditional_internal_fn): New function.
21233 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21234 Cope with reduction statements that are vectorized as calls rather
21236 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21237 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21238 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21239 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21240 (UNSPEC_COND_EOR): New unspecs.
21241 (optab): Add mappings for them.
21242 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21243 (sve_int_op, sve_fp_op): New int attributes.
21245 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21246 Alan Hayward <alan.hayward@arm.com>
21247 David Sherwood <david.sherwood@arm.com>
21249 * optabs.def (while_ult_optab): New optab.
21250 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21251 * internal-fn.def (WHILE_ULT): New internal function.
21252 * internal-fn.h (direct_internal_fn_supported_p): New override
21253 that takes two types as argument.
21254 * internal-fn.c (while_direct): New macro.
21255 (expand_while_optab_fn): New function.
21256 (convert_optab_supported_p): Likewise.
21257 (direct_while_optab_supported_p): New macro.
21258 * wide-int.h (wi::udiv_ceil): New function.
21259 * tree-vectorizer.h (rgroup_masks): New structure.
21260 (vec_loop_masks): New typedef.
21261 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21262 and fully_masked_p.
21263 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21264 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21265 (vect_max_vf): New function.
21266 (slpeel_make_loop_iterate_ntimes): Delete.
21267 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21268 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21269 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21270 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21271 internal-fn.h, stor-layout.h and optabs-query.h.
21272 (vect_set_loop_mask): New function.
21273 (add_preheader_seq): Likewise.
21274 (add_header_seq): Likewise.
21275 (interleave_supported_p): Likewise.
21276 (vect_maybe_permute_loop_masks): Likewise.
21277 (vect_set_loop_masks_directly): Likewise.
21278 (vect_set_loop_condition_masked): Likewise.
21279 (vect_set_loop_condition_unmasked): New function, split out from
21280 slpeel_make_loop_iterate_ntimes.
21281 (slpeel_make_loop_iterate_ntimes): Rename to..
21282 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21283 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21284 (vect_do_peeling): Update call accordingly.
21285 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21287 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21288 mask_compare_type, can_fully_mask_p and fully_masked_p.
21289 (release_vec_loop_masks): New function.
21290 (_loop_vec_info): Use it to free the loop masks.
21291 (can_produce_all_loop_masks_p): New function.
21292 (vect_get_max_nscalars_per_iter): Likewise.
21293 (vect_verify_full_masking): Likewise.
21294 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21295 retries, and free the mask rgroups before retrying. Check loop-wide
21296 reasons for disallowing fully-masked loops. Make the final decision
21297 about whether use a fully-masked loop or not.
21298 (vect_estimate_min_profitable_iters): Do not assume that peeling
21299 for the number of iterations will be needed for fully-masked loops.
21300 (vectorizable_reduction): Disable fully-masked loops.
21301 (vectorizable_live_operation): Likewise.
21302 (vect_halve_mask_nunits): New function.
21303 (vect_double_mask_nunits): Likewise.
21304 (vect_record_loop_mask): Likewise.
21305 (vect_get_loop_mask): Likewise.
21306 (vect_transform_loop): Handle the case in which the final loop
21307 iteration might handle a partial vector. Call vect_set_loop_condition
21308 instead of slpeel_make_loop_iterate_ntimes.
21309 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21310 (check_load_store_masking): New function.
21311 (prepare_load_store_mask): Likewise.
21312 (vectorizable_store): Handle fully-masked loops.
21313 (vectorizable_load): Likewise.
21314 (supportable_widening_operation): Use vect_halve_mask_nunits for
21316 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21317 (vect_gen_while): New function.
21318 * config/aarch64/aarch64.md (umax<mode>3): New expander.
21319 (aarch64_uqdec<mode>): New insn.
21321 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21322 Alan Hayward <alan.hayward@arm.com>
21323 David Sherwood <david.sherwood@arm.com>
21325 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21326 (reduc_xor_scal_optab): New optabs.
21327 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21328 (reduc_xor_scal_@var{m}): Document.
21329 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21330 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21331 internal functions.
21332 * fold-const-call.c (fold_const_call): Handle them.
21333 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21334 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21335 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21336 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21337 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21338 (UNSPEC_XORV): New unspecs.
21339 (optab): Add entries for them.
21340 (BITWISEV): New int iterator.
21341 (bit_reduc_op): New int attributes.
21343 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21344 Alan Hayward <alan.hayward@arm.com>
21345 David Sherwood <david.sherwood@arm.com>
21347 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21348 * internal-fn.def (VEC_SHL_INSERT): New internal function.
21349 * optabs.def (vec_shl_insert_optab): New optab.
21350 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21351 (duplicate_and_interleave): Likewise.
21352 * tree-vect-loop.c: Include internal-fn.h.
21353 (neutral_op_for_slp_reduction): New function, split out from
21354 get_initial_defs_for_reduction.
21355 (get_initial_def_for_reduction): Handle option 2 for variable-length
21356 vectors by loading the neutral value into a vector and then shifting
21357 the initial value into element 0.
21358 (get_initial_defs_for_reduction): Replace the code argument with
21359 the neutral value calculated by neutral_op_for_slp_reduction.
21360 Use gimple_build_vector for constant-length vectors.
21361 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21362 but the first group_size elements have a neutral value.
21363 Use duplicate_and_interleave otherwise.
21364 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21365 Update call to get_initial_defs_for_reduction. Handle SLP
21366 reductions for variable-length vectors by creating one vector
21367 result for each scalar result, with the elements associated
21368 with other scalar results stubbed out with the neutral value.
21369 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21370 Require IFN_VEC_SHL_INSERT for double reductions on
21371 variable-length vectors, or SLP reductions that have
21372 a neutral value. Require can_duplicate_and_interleave_p
21373 support for variable-length unchained SLP reductions if there
21374 is no neutral value, such as for MIN/MAX reductions. Also require
21375 the number of vector elements to be a multiple of the number of
21376 SLP statements when doing variable-length unchained SLP reductions.
21377 Update call to vect_create_epilog_for_reduction.
21378 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21379 and remove initial values.
21380 (duplicate_and_interleave): Make public.
21381 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21382 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21384 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21385 Alan Hayward <alan.hayward@arm.com>
21386 David Sherwood <david.sherwood@arm.com>
21388 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21389 (can_duplicate_and_interleave_p): New function.
21390 (vect_get_and_check_slp_defs): Take the vector of statements
21391 rather than just the current one. Remove excess parentheses.
21392 Restriction rejectinon of vect_constant_def and vect_external_def
21393 for variable-length vectors to boolean types, or types for which
21394 can_duplicate_and_interleave_p is false.
21395 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21396 (duplicate_and_interleave): New function.
21397 (vect_get_constant_vectors): Use gimple_build_vector for
21398 constant-length vectors and suitable variable-length constant
21399 vectors. Use duplicate_and_interleave for other variable-length
21400 vectors. Don't defer the update when inserting new statements.
21402 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21403 Alan Hayward <alan.hayward@arm.com>
21404 David Sherwood <david.sherwood@arm.com>
21406 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21407 min_profitable_iters doesn't go negative.
21409 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21410 Alan Hayward <alan.hayward@arm.com>
21411 David Sherwood <david.sherwood@arm.com>
21413 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21414 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21415 * optabs.def (vec_mask_load_lanes_optab): New optab.
21416 (vec_mask_store_lanes_optab): Likewise.
21417 * internal-fn.def (MASK_LOAD_LANES): New internal function.
21418 (MASK_STORE_LANES): Likewise.
21419 * internal-fn.c (mask_load_lanes_direct): New macro.
21420 (mask_store_lanes_direct): Likewise.
21421 (expand_mask_load_optab_fn): Handle masked operations.
21422 (expand_mask_load_lanes_optab_fn): New macro.
21423 (expand_mask_store_optab_fn): Handle masked operations.
21424 (expand_mask_store_lanes_optab_fn): New macro.
21425 (direct_mask_load_lanes_optab_supported_p): Likewise.
21426 (direct_mask_store_lanes_optab_supported_p): Likewise.
21427 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21429 (vect_load_lanes_supported): Likewise.
21430 * tree-vect-data-refs.c (strip_conversion): New function.
21431 (can_group_stmts_p): Likewise.
21432 (vect_analyze_data_ref_accesses): Use it instead of checking
21433 for a pair of assignments.
21434 (vect_store_lanes_supported): Take a masked_p parameter.
21435 (vect_load_lanes_supported): Likewise.
21436 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21437 vect_store_lanes_supported and vect_load_lanes_supported.
21438 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21439 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21440 parameter. Don't allow gaps for masked accesses.
21441 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
21442 and vect_load_lanes_supported.
21443 (get_load_store_type): Take a masked_p parameter and update
21444 call to get_group_load_store_type.
21445 (vectorizable_store): Update call to get_load_store_type.
21446 Handle IFN_MASK_STORE_LANES.
21447 (vectorizable_load): Update call to get_load_store_type.
21448 Handle IFN_MASK_LOAD_LANES.
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 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21456 * config/aarch64/aarch64-protos.h
21457 (aarch64_sve_struct_memory_operand_p): Declare.
21458 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21459 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21460 (VPRED, vpred): Handle SVE structure modes.
21461 * config/aarch64/constraints.md (Utx): New constraint.
21462 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21463 (aarch64_sve_struct_nonimmediate_operand): New predicates.
21464 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21465 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21466 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21467 structure modes. Split into pieces after RA.
21468 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21469 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21471 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21472 SVE structure modes.
21473 (aarch64_classify_address): Likewise.
21474 (sizetochar): Move earlier in file.
21475 (aarch64_print_operand): Handle SVE register lists.
21476 (aarch64_array_mode): New function.
21477 (aarch64_sve_struct_memory_operand_p): Likewise.
21478 (TARGET_ARRAY_MODE): Redefine.
21480 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21481 Alan Hayward <alan.hayward@arm.com>
21482 David Sherwood <david.sherwood@arm.com>
21484 * target.def (array_mode): New target hook.
21485 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21486 * doc/tm.texi: Regenerate.
21487 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21488 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21489 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21490 targetm.array_mode.
21491 * stor-layout.c (mode_for_array): Likewise. Support polynomial
21494 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21495 Alan Hayward <alan.hayward@arm.com>
21496 David Sherwood <david.sherwood@arm.com>
21498 * fold-const.c (fold_binary_loc): Check the argument types
21499 rather than the result type when testing for a vector operation.
21501 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21503 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21504 * doc/tm.texi: Regenerate.
21506 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21507 Alan Hayward <alan.hayward@arm.com>
21508 David Sherwood <david.sherwood@arm.com>
21510 * doc/invoke.texi (-msve-vector-bits=): Document new option.
21511 (sve): Document new AArch64 extension.
21512 * doc/md.texi (w): Extend the description of the AArch64
21513 constraint to include SVE vectors.
21514 (Upl, Upa): Document new AArch64 predicate constraints.
21515 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21517 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21518 (msve-vector-bits=): New option.
21519 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21520 SVE when these are disabled.
21521 (sve): New extension.
21522 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21523 modes. Adjust their number of units based on aarch64_sve_vg.
21524 (MAX_BITSIZE_MODE_ANY_MODE): Define.
21525 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21526 aarch64_addr_query_type.
21527 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21528 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21529 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21530 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21531 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21532 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21533 (aarch64_simd_imm_zero_p): Delete.
21534 (aarch64_check_zero_based_sve_index_immediate): Declare.
21535 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21536 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21537 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21538 (aarch64_sve_float_mul_immediate_p): Likewise.
21539 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21540 rather than an rtx.
21541 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21542 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21543 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21544 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21545 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21546 (aarch64_regmode_natural_size): Likewise.
21547 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21548 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21550 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21551 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21552 for VG and the SVE predicate registers.
21553 (V_ALIASES): Add a "z"-prefixed alias.
21554 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21555 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21556 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21557 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21558 (REG_CLASS_NAMES): Add entries for them.
21559 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
21560 and the predicate registers.
21561 (aarch64_sve_vg): Declare.
21562 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21563 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21564 (REGMODE_NATURAL_SIZE): Define.
21565 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21567 * config/aarch64/aarch64.c: Include cfgrtl.h.
21568 (simd_immediate_info): Add a constructor for series vectors,
21569 and an associated step field.
21570 (aarch64_sve_vg): New variable.
21571 (aarch64_dbx_register_number): Handle VG and the predicate registers.
21572 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21573 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21574 (VEC_ANY_DATA, VEC_STRUCT): New constants.
21575 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21576 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21577 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21578 (aarch64_get_mask_mode): New functions.
21579 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21580 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21581 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
21582 predicate modes and predicate registers. Explicitly restrict
21583 GPRs to modes of 16 bytes or smaller. Only allow FP registers
21584 to store a vector mode if it is recognized by
21585 aarch64_classify_vector_mode.
21586 (aarch64_regmode_natural_size): New function.
21587 (aarch64_hard_regno_caller_save_mode): Return the original mode
21589 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21590 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21591 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21592 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21594 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
21595 does not overlap dest if the function is frame-related. Handle
21597 (aarch64_split_add_offset): New function.
21598 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21599 them aarch64_add_offset.
21600 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21601 and update call to aarch64_sub_sp.
21602 (aarch64_add_cfa_expression): New function.
21603 (aarch64_expand_prologue): Pass extra temporary registers to the
21604 functions above. Handle the case in which we need to emit new
21605 DW_CFA_expressions for registers that were originally saved
21606 relative to the stack pointer, but now have to be expressed
21607 relative to the frame pointer.
21608 (aarch64_output_mi_thunk): Pass extra temporary registers to the
21610 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
21611 IP0 and IP1 values for SVE frames.
21612 (aarch64_expand_vec_series): New function.
21613 (aarch64_expand_sve_widened_duplicate): Likewise.
21614 (aarch64_expand_sve_const_vector): Likewise.
21615 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21616 Handle SVE constants. Use emit_move_insn to move a force_const_mem
21617 into the register, rather than emitting a SET directly.
21618 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21619 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21620 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21621 (offset_9bit_signed_scaled_p): New functions.
21622 (aarch64_replicate_bitmask_imm): New function.
21623 (aarch64_bitmask_imm): Use it.
21624 (aarch64_cannot_force_const_mem): Reject expressions involving
21625 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
21626 (aarch64_classify_index): Handle SVE indices, by requiring
21627 a plain register index with a scale that matches the element size.
21628 (aarch64_classify_address): Handle SVE addresses. Assert that
21629 the mode of the address is VOIDmode or an integer mode.
21630 Update call to aarch64_classify_symbol.
21631 (aarch64_classify_symbolic_expression): Update call to
21632 aarch64_classify_symbol.
21633 (aarch64_const_vec_all_in_range_p): New function.
21634 (aarch64_print_vector_float_operand): Likewise.
21635 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
21636 "vN" for FP registers with SVE modes. Handle (const ...) vectors
21637 and the FP immediates 1.0 and 0.5.
21638 (aarch64_print_address_internal): Handle SVE addresses.
21639 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21640 (aarch64_regno_regclass): Handle predicate registers.
21641 (aarch64_secondary_reload): Handle big-endian reloads of SVE
21643 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21644 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21645 (aarch64_convert_sve_vector_bits): New function.
21646 (aarch64_override_options): Use it to handle -msve-vector-bits=.
21647 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21648 rather than an rtx.
21649 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21650 Handle SVE vector and predicate modes. Accept VL-based constants
21651 that need only one temporary register, and VL offsets that require
21652 no temporary registers.
21653 (aarch64_conditional_register_usage): Mark the predicate registers
21654 as fixed if SVE isn't available.
21655 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21656 Return true for SVE vector and predicate modes.
21657 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21658 rather than an unsigned int. Handle SVE modes.
21659 (aarch64_preferred_simd_mode): Update call accordingly. Handle
21661 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21663 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21664 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21665 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21666 (aarch64_sve_float_mul_immediate_p): New functions.
21667 (aarch64_sve_valid_immediate): New function.
21668 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21669 Explicitly reject structure modes. Check for INDEX constants.
21670 Handle PTRUE and PFALSE constants.
21671 (aarch64_check_zero_based_sve_index_immediate): New function.
21672 (aarch64_simd_imm_zero_p): Delete.
21673 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21674 vector modes. Accept constants in the range of CNT[BHWD].
21675 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21676 ask for an Advanced SIMD mode.
21677 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21678 (aarch64_simd_vector_alignment): Handle SVE predicates.
21679 (aarch64_vectorize_preferred_vector_alignment): New function.
21680 (aarch64_simd_vector_alignment_reachable): Use it instead of
21682 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21683 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21685 (MAX_VECT_LEN): Delete.
21686 (expand_vec_perm_d): Add a vec_flags field.
21687 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21688 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21689 (aarch64_evpc_ext): Don't apply a big-endian lane correction
21691 (aarch64_evpc_rev): Rename to...
21692 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
21693 (aarch64_evpc_rev_global): New function.
21694 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21695 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21697 (aarch64_evpc_sve_tbl): New function.
21698 (aarch64_expand_vec_perm_const_1): Update after rename of
21699 aarch64_evpc_rev. Handle SVE permutes too, trying
21700 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21701 than aarch64_evpc_tbl.
21702 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21703 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21704 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21705 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21706 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21707 (aarch64_expand_sve_vcond): New functions.
21708 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21709 of aarch64_vector_mode_p.
21710 (aarch64_dwarf_poly_indeterminate_value): New function.
21711 (aarch64_compute_pressure_classes): Likewise.
21712 (aarch64_can_change_mode_class): Likewise.
21713 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21714 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21715 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21716 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21717 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21718 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21719 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21720 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21722 (Dn, Dl, Dr): Accept const as well as const_vector.
21723 (Dz): Likewise. Compare against CONST0_RTX.
21724 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21725 of "vector" where appropriate.
21726 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21727 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21728 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21729 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21730 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21731 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21732 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21733 (v_int_equiv): Extend to SVE modes.
21734 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21736 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21737 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21738 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21739 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21740 (SVE_COND_FP_CMP): New int iterators.
21741 (perm_hilo): Handle the new unpack unspecs.
21742 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21744 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21745 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21746 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21747 (aarch64_equality_operator, aarch64_constant_vector_operand)
21748 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21749 (aarch64_sve_nonimmediate_operand): Likewise.
21750 (aarch64_sve_general_operand): Likewise.
21751 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
21752 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
21753 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
21754 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
21755 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
21756 (aarch64_sve_float_arith_immediate): Likewise.
21757 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
21758 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
21759 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
21760 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
21761 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
21762 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
21763 (aarch64_sve_float_arith_operand): Likewise.
21764 (aarch64_sve_float_arith_with_sub_operand): Likewise.
21765 (aarch64_sve_float_mul_operand): Likewise.
21766 (aarch64_sve_vec_perm_operand): Likewise.
21767 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
21768 (aarch64_mov_operand): Accept const_poly_int and const_vector.
21769 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
21770 as well as const_vector.
21771 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
21772 in file. Use CONST0_RTX and CONSTM1_RTX.
21773 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
21774 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
21775 Use aarch64_simd_imm_zero.
21776 * config/aarch64/aarch64-sve.md: New file.
21777 * config/aarch64/aarch64.md: Include it.
21778 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21779 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21780 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21781 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21782 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21783 (sve): New attribute.
21784 (enabled): Disable instructions with the sve attribute unless
21786 (movqi, movhi): Pass CONST_POLY_INT operaneds through
21787 aarch64_expand_mov_immediate.
21788 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21789 CNT[BHSD] immediates.
21790 (movti): Split CONST_POLY_INT moves into two halves.
21791 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21792 Split additions that need a temporary here if the destination
21793 is the stack pointer.
21794 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21795 (*add<mode>3_poly_1): New instruction.
21796 (set_clobber_cc): New expander.
21798 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21800 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21801 parameter and use it instead of GET_MODE_SIZE (innermode). Use
21802 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21803 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21804 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
21805 Change innermode from fixed_mode_size to machine_mode.
21806 (simplify_subreg): Update call accordingly. Handle a constant-sized
21807 subreg of a variable-length CONST_VECTOR.
21809 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21810 Alan Hayward <alan.hayward@arm.com>
21811 David Sherwood <david.sherwood@arm.com>
21813 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21814 (add_offset_to_base): New function, split out from...
21815 (create_mem_ref): ...here. When handling a scale other than 1,
21816 check first whether the address is valid without the offset.
21817 Add it into the base if so, leaving the index and scale as-is.
21819 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21822 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21823 fold_for_warn before checking if arg2 is INTEGER_CST.
21825 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
21827 * config/rs6000/predicates.md (load_multiple_operation): Delete.
21828 (store_multiple_operation): Delete.
21829 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21830 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21831 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21832 guarded by TARGET_STRING.
21833 (rs6000_output_load_multiple): Delete.
21834 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21835 OPTION_MASK_STRING / TARGET_STRING handling.
21836 (print_operand) <'N', 'O'>: Add comment that these are unused now.
21837 (const rs6000_opt_masks) <"string">: Change mask to 0.
21838 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
21839 (MASK_STRING): Delete.
21840 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
21842 (load_multiple): Delete.
21849 (store_multiple): Delete.
21856 (movmemsi_8reg): Delete.
21857 (corresponding unnamed define_insn): Delete.
21858 (movmemsi_6reg): Delete.
21859 (corresponding unnamed define_insn): Delete.
21860 (movmemsi_4reg): Delete.
21861 (corresponding unnamed define_insn): Delete.
21862 (movmemsi_2reg): Delete.
21863 (corresponding unnamed define_insn): Delete.
21864 (movmemsi_1reg): Delete.
21865 (corresponding unnamed define_insn): Delete.
21866 * config/rs6000/rs6000.opt (mno-string): New.
21867 (mstring): Replace by deprecation warning stub.
21868 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
21870 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21872 * regrename.c (regrename_do_replace): If replacing the same
21873 reg multiple times, try to reuse last created gen_raw_REG.
21876 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
21877 main to workaround a bug in GDB.
21879 2018-01-12 Tom de Vries <tom@codesourcery.com>
21882 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
21884 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
21886 PR rtl-optimization/80481
21887 * ira-color.c (get_cap_member): New function.
21888 (allocnos_conflict_by_live_ranges_p): Use it.
21889 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21890 (setup_slot_coalesced_allocno_live_ranges): Ditto.
21892 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
21895 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
21896 (*saddl_se_1): Ditto.
21897 (*ssubsi_1): Ditto.
21898 (*ssubl_se_1): Ditto.
21900 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21902 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
21903 rather than wi::to_widest for DR_INITs.
21904 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
21905 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
21906 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
21908 (vect_analyze_group_access_1): Note that here.
21910 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21912 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
21913 polynomial type sizes.
21915 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21917 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
21918 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
21919 (gimple_add_tmp_var): Likewise.
21921 2018-01-12 Martin Liska <mliska@suse.cz>
21923 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
21924 (gimple_alloc_sizes): Likewise.
21925 (dump_gimple_statistics): Use PRIu64 in printf format.
21926 * gimple.h: Change uint64_t to int.
21928 2018-01-12 Martin Liska <mliska@suse.cz>
21930 * tree-core.h: Use uint64_t instead of int.
21931 * tree.c (tree_node_counts): Likewise.
21932 (tree_node_sizes): Likewise.
21933 (dump_tree_statistics): Use PRIu64 in printf format.
21935 2018-01-12 Martin Liska <mliska@suse.cz>
21937 * Makefile.in: As qsort_chk is implemented in vec.c, add
21938 vec.o to linkage of gencfn-macros.
21939 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
21940 passing the info to record_node_allocation_statistics.
21941 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
21943 * ggc-common.c (struct ggc_usage): Add operator== and use
21944 it in operator< and compare function.
21945 * mem-stats.h (struct mem_usage): Likewise.
21946 * vec.c (struct vec_usage): Remove operator< and compare
21947 function. Can be simply inherited.
21949 2018-01-12 Martin Jambor <mjambor@suse.cz>
21952 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
21953 * tree-ssa-math-opts.c: Include domwalk.h.
21954 (convert_mult_to_fma_1): New function.
21955 (fma_transformation_info): New type.
21956 (fma_deferring_state): Likewise.
21957 (cancel_fma_deferring): New function.
21958 (result_of_phi): Likewise.
21959 (last_fma_candidate_feeds_initial_phi): Likewise.
21960 (convert_mult_to_fma): Added deferring logic, split actual
21961 transformation to convert_mult_to_fma_1.
21962 (math_opts_dom_walker): New type.
21963 (math_opts_dom_walker::after_dom_children): New method, body moved
21964 here from pass_optimize_widening_mul::execute, added deferring logic
21966 (pass_optimize_widening_mul::execute): Moved most of code to
21967 math_opts_dom_walker::after_dom_children.
21968 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
21969 * config/i386/i386.c (ix86_option_override_internal): Added
21970 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
21972 2018-01-12 Richard Biener <rguenther@suse.de>
21975 * dwarf2out.c (gen_variable_die): Do not reset old_die for
21976 inline instance vars.
21978 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
21981 * config/rx/rx.c (rx_is_restricted_memory_address):
21982 Handle SUBREG case.
21984 2018-01-12 Richard Biener <rguenther@suse.de>
21986 PR tree-optimization/80846
21987 * target.def (split_reduction): New target hook.
21988 * targhooks.c (default_split_reduction): New function.
21989 * targhooks.h (default_split_reduction): Declare.
21990 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
21991 target requests first reduce vectors by combining low and high
21993 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
21994 (get_vectype_for_scalar_type_and_size): Export.
21995 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
21996 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
21997 * doc/tm.texi: Regenerate.
21998 * config/i386/i386.c (ix86_split_reduction): Implement
21999 TARGET_VECTORIZE_SPLIT_REDUCTION.
22001 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22004 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22005 in PIC mode except for TARGET_VXWORKS_RTP.
22006 * config/sparc/sparc.c: Include cfgrtl.h.
22007 (TARGET_INIT_PIC_REG): Define.
22008 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22009 (sparc_pic_register_p): New predicate.
22010 (sparc_legitimate_address_p): Use it.
22011 (sparc_legitimize_pic_address): Likewise.
22012 (sparc_delegitimize_address): Likewise.
22013 (sparc_mode_dependent_address_p): Likewise.
22014 (gen_load_pcrel_sym): Remove 4th parameter.
22015 (load_got_register): Adjust call to above. Remove obsolete stuff.
22016 (sparc_expand_prologue): Do not call load_got_register here.
22017 (sparc_flat_expand_prologue): Likewise.
22018 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22019 (sparc_use_pseudo_pic_reg): New function.
22020 (sparc_init_pic_reg): Likewise.
22021 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22022 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22024 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22026 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22027 Add item for branch_cost.
22029 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22031 PR rtl-optimization/83565
22032 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22033 not extend the result to a larger mode for rotate operations.
22034 (num_sign_bit_copies1): Likewise.
22036 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22039 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22041 Use values-Xc.o for -pedantic.
22042 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22044 2018-01-12 Martin Liska <mliska@suse.cz>
22047 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22049 (possible_polymorphic_call_targets): Use it.
22050 (ipa_devirt): Likewise.
22052 2018-01-12 Martin Liska <mliska@suse.cz>
22054 * profile-count.h (enum profile_quality): Use 0 as invalid
22055 enum value of profile_quality.
22057 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22059 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22060 -mext-string options.
22062 2018-01-12 Richard Biener <rguenther@suse.de>
22064 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22065 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22066 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22068 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22070 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22072 * configure.ac (--with-long-double-format): Add support for the
22073 configuration option to change the default long double format on
22075 * config.gcc (powerpc*-linux*-*): Likewise.
22076 * configure: Regenerate.
22077 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22078 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22079 used without modification.
22081 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22083 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22084 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22085 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22086 MISC_BUILTIN_SPEC_BARRIER.
22087 (rs6000_init_builtins): Likewise.
22088 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22090 (speculation_barrier): New define_insn.
22091 * doc/extend.texi: Document __builtin_speculation_barrier.
22093 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22096 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22097 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22098 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22100 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22101 integral modes instead of "ss" and "sd".
22102 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22103 vectors with 32-bit and 64-bit elements.
22104 (vecdupssescalarmodesuffix): New mode attribute.
22105 (vec_dup<mode>): Use it.
22107 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22110 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22111 frame if argument is passed on stack.
22113 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22116 * ree.c (combine_reaching_defs): Optimize also
22117 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22118 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22120 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22122 PR middle-end/83189
22123 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22125 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22127 PR middle-end/83718
22128 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22129 after they are computed.
22131 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22133 PR tree-optimization/83695
22134 * gimple-loop-linterchange.cc
22135 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22136 reset cached scev information after interchange.
22137 (pass_linterchange::execute): Remove call to scev_reset_htab.
22139 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22141 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22142 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22143 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22144 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22145 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22146 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22147 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22148 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22149 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22150 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22151 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22152 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22153 (V_lane_reg): Likewise.
22154 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22156 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22157 (vfmal_lane_low<mode>_intrinsic,
22158 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22159 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22160 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22161 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22162 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22163 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22165 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22167 * config/arm/arm-cpus.in (fp16fml): New feature.
22168 (ALL_SIMD): Add fp16fml.
22169 (armv8.2-a): Add fp16fml as an option.
22170 (armv8.3-a): Likewise.
22171 (armv8.4-a): Add fp16fml as part of fp16.
22172 * config/arm/arm.h (TARGET_FP16FML): Define.
22173 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22175 * config/arm/arm-modes.def (V2HF): Define.
22176 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22177 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22178 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22179 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22180 vfmsl_low, vfmsl_high): New set of builtins.
22181 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22182 (vfml_op): New code attribute.
22183 (VFMLHALVES): New int iterator.
22184 (VFML, VFMLSEL): New mode attributes.
22185 (V_reg): Define mapping for V2HF.
22186 (V_hi, V_lo): New mode attributes.
22187 (VF_constraint): Likewise.
22188 (vfml_half, vfml_half_selector): New int attributes.
22189 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22191 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22192 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22194 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22195 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22196 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22197 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22199 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22200 Document new effective target and option set.
22202 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22204 * config/arm/arm-cpus.in (armv8_4): New feature.
22205 (ARMv8_4a): New fgroup.
22206 (armv8.4-a): New arch.
22207 * config/arm/arm-tables.opt: Regenerate.
22208 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22209 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22210 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22211 Add matching rules for -march=armv8.4-a and extensions.
22212 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22214 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22217 * config/rx/rx.md (BW): New mode attribute.
22218 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22220 2018-01-11 Richard Biener <rguenther@suse.de>
22222 PR tree-optimization/83435
22223 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22224 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22225 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22227 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22228 Alan Hayward <alan.hayward@arm.com>
22229 David Sherwood <david.sherwood@arm.com>
22231 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22233 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22234 (aarch64_print_address_internal): Use it to check for a zero offset.
22236 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22237 Alan Hayward <alan.hayward@arm.com>
22238 David Sherwood <david.sherwood@arm.com>
22240 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22241 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22242 Return a poly_int64 rather than a HOST_WIDE_INT.
22243 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22244 rather than a HOST_WIDE_INT.
22245 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22246 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22247 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22248 final_offset from HOST_WIDE_INT to poly_int64.
22249 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22250 to_constant when getting the number of units in an Advanced SIMD
22252 (aarch64_builtin_vectorized_function): Check for a constant number
22254 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22256 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22257 attribute instead of GET_MODE_NUNITS.
22258 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22259 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22260 GET_MODE_SIZE for fixed-size registers.
22261 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22262 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22263 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22264 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22265 (aarch64_print_operand, aarch64_print_address_internal)
22266 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22267 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22268 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22269 Handle polynomial GET_MODE_SIZE.
22270 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22271 wider than SImode without modification.
22272 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22273 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22274 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22275 passing and returning SVE modes.
22276 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22277 rather than GEN_INT.
22278 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22279 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22280 (aarch64_allocate_and_probe_stack_space): Likewise.
22281 (aarch64_layout_frame): Cope with polynomial offsets.
22282 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22283 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22284 polynomial offsets.
22285 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22286 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22287 poly_int64 rather than a HOST_WIDE_INT.
22288 (aarch64_get_separate_components, aarch64_process_components)
22289 (aarch64_expand_prologue, aarch64_expand_epilogue)
22290 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22291 (aarch64_anchor_offset): New function, split out from...
22292 (aarch64_legitimize_address): ...here.
22293 (aarch64_builtin_vectorization_cost): Handle polynomial
22294 TYPE_VECTOR_SUBPARTS.
22295 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22297 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22298 number of elements from the PARALLEL rather than the mode.
22299 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22300 rather than GET_MODE_BITSIZE.
22301 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22302 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22303 (aarch64_expand_vec_perm_const_1): Handle polynomial
22304 d->perm.length () and d->perm elements.
22305 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
22306 Apply to_constant to d->perm elements.
22307 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22308 polynomial CONST_VECTOR_NUNITS.
22309 (aarch64_move_pointer): Take amount as a poly_int64 rather
22311 (aarch64_progress_pointer): Avoid temporary variable.
22312 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22313 the mode attribute instead of GET_MODE.
22315 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22316 Alan Hayward <alan.hayward@arm.com>
22317 David Sherwood <david.sherwood@arm.com>
22319 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22320 x exists before using it.
22321 (aarch64_add_constant_internal): Rename to...
22322 (aarch64_add_offset_1): ...this. Replace regnum with separate
22323 src and dest rtxes. Handle the case in which they're different,
22324 including when the offset is zero. Replace scratchreg with an rtx.
22325 Use 2 additions if there is no spare register into which we can
22326 move a 16-bit constant.
22327 (aarch64_add_constant): Delete.
22328 (aarch64_add_offset): Replace reg with separate src and dest
22329 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
22330 Use aarch64_add_offset_1.
22331 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22332 an rtx rather than an int. Take the delta as a poly_int64
22333 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
22334 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22335 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22336 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22337 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22338 and aarch64_add_sp.
22339 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22340 aarch64_add_constant.
22342 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22344 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22345 Use scalar_float_mode.
22347 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22349 * config/aarch64/aarch64-simd.md
22350 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22351 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22352 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22353 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22354 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22355 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22356 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22357 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22358 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22359 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22361 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22364 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22365 targ_options->x_arm_arch_string is non NULL.
22367 2018-01-11 Tamar Christina <tamar.christina@arm.com>
22369 * config/aarch64/aarch64.h
22370 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
22372 2018-01-11 Sudakshina Das <sudi.das@arm.com>
22375 * expmed.c (emit_store_flag_force): Swap if const op0
22376 and change VOIDmode to mode of op0.
22378 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22380 PR rtl-optimization/83761
22381 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22382 than bytes to mode_for_size.
22384 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22386 PR middle-end/83189
22387 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22388 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22391 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22393 PR middle-end/83575
22394 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22395 when in layout mode.
22396 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22397 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22400 2018-01-10 Michael Collison <michael.collison@arm.com>
22402 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22403 * config/aarch64/aarch64-option-extension.def: Add
22404 AARCH64_OPT_EXTENSION of 'fp16fml'.
22405 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22406 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22407 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22408 * config/aarch64/constraints.md (Ui7): New constraint.
22409 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22410 (VFMLA_SEL_W): Ditto.
22413 (VFMLA16_LOW): New int iterator.
22414 (VFMLA16_HIGH): Ditto.
22415 (UNSPEC_FMLAL): New unspec.
22416 (UNSPEC_FMLSL): Ditto.
22417 (UNSPEC_FMLAL2): Ditto.
22418 (UNSPEC_FMLSL2): Ditto.
22419 (f16mac): New code attribute.
22420 * config/aarch64/aarch64-simd-builtins.def
22421 (aarch64_fmlal_lowv2sf): Ditto.
22422 (aarch64_fmlsl_lowv2sf): Ditto.
22423 (aarch64_fmlalq_lowv4sf): Ditto.
22424 (aarch64_fmlslq_lowv4sf): Ditto.
22425 (aarch64_fmlal_highv2sf): Ditto.
22426 (aarch64_fmlsl_highv2sf): Ditto.
22427 (aarch64_fmlalq_highv4sf): Ditto.
22428 (aarch64_fmlslq_highv4sf): Ditto.
22429 (aarch64_fmlal_lane_lowv2sf): Ditto.
22430 (aarch64_fmlsl_lane_lowv2sf): Ditto.
22431 (aarch64_fmlal_laneq_lowv2sf): Ditto.
22432 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22433 (aarch64_fmlalq_lane_lowv4sf): Ditto.
22434 (aarch64_fmlsl_lane_lowv4sf): Ditto.
22435 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22436 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22437 (aarch64_fmlal_lane_highv2sf): Ditto.
22438 (aarch64_fmlsl_lane_highv2sf): Ditto.
22439 (aarch64_fmlal_laneq_highv2sf): Ditto.
22440 (aarch64_fmlsl_laneq_highv2sf): Ditto.
22441 (aarch64_fmlalq_lane_highv4sf): Ditto.
22442 (aarch64_fmlsl_lane_highv4sf): Ditto.
22443 (aarch64_fmlalq_laneq_highv4sf): Ditto.
22444 (aarch64_fmlsl_laneq_highv4sf): Ditto.
22445 * config/aarch64/aarch64-simd.md:
22446 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22447 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22448 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22449 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22450 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22451 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22452 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22453 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22454 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22455 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22456 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22457 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22458 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22459 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22460 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22461 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22462 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22463 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22464 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22465 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22466 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22467 (vfmlsl_low_u32): Ditto.
22468 (vfmlalq_low_u32): Ditto.
22469 (vfmlslq_low_u32): Ditto.
22470 (vfmlal_high_u32): Ditto.
22471 (vfmlsl_high_u32): Ditto.
22472 (vfmlalq_high_u32): Ditto.
22473 (vfmlslq_high_u32): Ditto.
22474 (vfmlal_lane_low_u32): Ditto.
22475 (vfmlsl_lane_low_u32): Ditto.
22476 (vfmlal_laneq_low_u32): Ditto.
22477 (vfmlsl_laneq_low_u32): Ditto.
22478 (vfmlalq_lane_low_u32): Ditto.
22479 (vfmlslq_lane_low_u32): Ditto.
22480 (vfmlalq_laneq_low_u32): Ditto.
22481 (vfmlslq_laneq_low_u32): Ditto.
22482 (vfmlal_lane_high_u32): Ditto.
22483 (vfmlsl_lane_high_u32): Ditto.
22484 (vfmlal_laneq_high_u32): Ditto.
22485 (vfmlsl_laneq_high_u32): Ditto.
22486 (vfmlalq_lane_high_u32): Ditto.
22487 (vfmlslq_lane_high_u32): Ditto.
22488 (vfmlalq_laneq_high_u32): Ditto.
22489 (vfmlslq_laneq_high_u32): Ditto.
22490 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22491 (AARCH64_FL_FOR_ARCH8_4): New.
22492 (AARCH64_ISA_F16FML): New ISA flag.
22493 (TARGET_F16FML): New feature flag for fp16fml.
22494 (doc/invoke.texi): Document new fp16fml option.
22496 2018-01-10 Michael Collison <michael.collison@arm.com>
22498 * config/aarch64/aarch64-builtins.c:
22499 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22500 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22501 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22502 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22503 (AARCH64_ISA_SHA3): New ISA flag.
22504 (TARGET_SHA3): New feature flag for sha3.
22505 * config/aarch64/iterators.md (sha512_op): New int attribute.
22506 (CRYPTO_SHA512): New int iterator.
22507 (UNSPEC_SHA512H): New unspec.
22508 (UNSPEC_SHA512H2): Ditto.
22509 (UNSPEC_SHA512SU0): Ditto.
22510 (UNSPEC_SHA512SU1): Ditto.
22511 * config/aarch64/aarch64-simd-builtins.def
22512 (aarch64_crypto_sha512hqv2di): New builtin.
22513 (aarch64_crypto_sha512h2qv2di): Ditto.
22514 (aarch64_crypto_sha512su0qv2di): Ditto.
22515 (aarch64_crypto_sha512su1qv2di): Ditto.
22516 (aarch64_eor3qv8hi): Ditto.
22517 (aarch64_rax1qv2di): Ditto.
22518 (aarch64_xarqv2di): Ditto.
22519 (aarch64_bcaxqv8hi): Ditto.
22520 * config/aarch64/aarch64-simd.md:
22521 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22522 (aarch64_crypto_sha512su0qv2di): Ditto.
22523 (aarch64_crypto_sha512su1qv2di): Ditto.
22524 (aarch64_eor3qv8hi): Ditto.
22525 (aarch64_rax1qv2di): Ditto.
22526 (aarch64_xarqv2di): Ditto.
22527 (aarch64_bcaxqv8hi): Ditto.
22528 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22529 (vsha512h2q_u64): Ditto.
22530 (vsha512su0q_u64): Ditto.
22531 (vsha512su1q_u64): Ditto.
22532 (veor3q_u16): Ditto.
22533 (vrax1q_u64): Ditto.
22534 (vxarq_u64): Ditto.
22535 (vbcaxq_u16): Ditto.
22536 * config/arm/types.md (crypto_sha512): New type attribute.
22537 (crypto_sha3): Ditto.
22538 (doc/invoke.texi): Document new sha3 option.
22540 2018-01-10 Michael Collison <michael.collison@arm.com>
22542 * config/aarch64/aarch64-builtins.c:
22543 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22544 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22545 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22546 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22547 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22548 (AARCH64_ISA_SM4): New ISA flag.
22549 (TARGET_SM4): New feature flag for sm4.
22550 * config/aarch64/aarch64-simd-builtins.def
22551 (aarch64_sm3ss1qv4si): Ditto.
22552 (aarch64_sm3tt1aq4si): Ditto.
22553 (aarch64_sm3tt1bq4si): Ditto.
22554 (aarch64_sm3tt2aq4si): Ditto.
22555 (aarch64_sm3tt2bq4si): Ditto.
22556 (aarch64_sm3partw1qv4si): Ditto.
22557 (aarch64_sm3partw2qv4si): Ditto.
22558 (aarch64_sm4eqv4si): Ditto.
22559 (aarch64_sm4ekeyqv4si): Ditto.
22560 * config/aarch64/aarch64-simd.md:
22561 (aarch64_sm3ss1qv4si): Ditto.
22562 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22563 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22564 (aarch64_sm4eqv4si): Ditto.
22565 (aarch64_sm4ekeyqv4si): Ditto.
22566 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22567 (sm3part_op): Ditto.
22568 (CRYPTO_SM3TT): Ditto.
22569 (CRYPTO_SM3PART): Ditto.
22570 (UNSPEC_SM3SS1): New unspec.
22571 (UNSPEC_SM3TT1A): Ditto.
22572 (UNSPEC_SM3TT1B): Ditto.
22573 (UNSPEC_SM3TT2A): Ditto.
22574 (UNSPEC_SM3TT2B): Ditto.
22575 (UNSPEC_SM3PARTW1): Ditto.
22576 (UNSPEC_SM3PARTW2): Ditto.
22577 (UNSPEC_SM4E): Ditto.
22578 (UNSPEC_SM4EKEY): Ditto.
22579 * config/aarch64/constraints.md (Ui2): New constraint.
22580 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22581 * config/arm/types.md (crypto_sm3): New type attribute.
22582 (crypto_sm4): Ditto.
22583 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22584 (vsm3tt1aq_u32): Ditto.
22585 (vsm3tt1bq_u32): Ditto.
22586 (vsm3tt2aq_u32): Ditto.
22587 (vsm3tt2bq_u32): Ditto.
22588 (vsm3partw1q_u32): Ditto.
22589 (vsm3partw2q_u32): Ditto.
22590 (vsm4eq_u32): Ditto.
22591 (vsm4ekeyq_u32): Ditto.
22592 (doc/invoke.texi): Document new sm4 option.
22594 2018-01-10 Michael Collison <michael.collison@arm.com>
22596 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22597 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22598 (AARCH64_FL_FOR_ARCH8_4): New.
22599 (AARCH64_FL_V8_4): New flag.
22600 (doc/invoke.texi): Document new armv8.4-a option.
22602 2018-01-10 Michael Collison <michael.collison@arm.com>
22604 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22605 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22606 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22607 * config/aarch64/aarch64-option-extension.def: Add
22608 AARCH64_OPT_EXTENSION of 'sha2'.
22609 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22610 (crypto): Disable sha2 and aes if crypto disabled.
22611 (crypto): Enable aes and sha2 if enabled.
22612 (simd): Disable sha2 and aes if simd disabled.
22613 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22615 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22616 (TARGET_SHA2): New feature flag for sha2.
22617 (TARGET_AES): New feature flag for aes.
22618 * config/aarch64/aarch64-simd.md:
22619 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22620 conditional on TARGET_AES.
22621 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22622 (aarch64_crypto_sha1hsi): Make pattern conditional
22624 (aarch64_crypto_sha1hv4si): Ditto.
22625 (aarch64_be_crypto_sha1hv4si): Ditto.
22626 (aarch64_crypto_sha1su1v4si): Ditto.
22627 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22628 (aarch64_crypto_sha1su0v4si): Ditto.
22629 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22630 (aarch64_crypto_sha256su0v4si): Ditto.
22631 (aarch64_crypto_sha256su1v4si): Ditto.
22632 (doc/invoke.texi): Document new aes and sha2 options.
22634 2018-01-10 Martin Sebor <msebor@redhat.com>
22636 PR tree-optimization/83781
22637 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22640 2018-01-11 Martin Sebor <msebor@gmail.com>
22641 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22643 PR tree-optimization/83501
22644 PR tree-optimization/81703
22646 * tree-ssa-strlen.c (get_string_cst): Rename...
22647 (get_string_len): ...to this. Handle global constants.
22648 (handle_char_store): Adjust.
22650 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
22651 Jim Wilson <jimw@sifive.com>
22653 * config/riscv/riscv-protos.h (riscv_output_return): New.
22654 * config/riscv/riscv.c (struct machine_function): New naked_p field.
22655 (riscv_attribute_table, riscv_output_return),
22656 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22657 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22658 (riscv_compute_frame_info): Only compute frame->mask if not a naked
22660 (riscv_expand_prologue): Add early return for naked function.
22661 (riscv_expand_epilogue): Likewise.
22662 (riscv_function_ok_for_sibcall): Return false for naked function.
22663 (riscv_set_current_function): New.
22664 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22665 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22666 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22667 * doc/extend.texi (RISC-V Function Attributes): New.
22669 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
22671 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22672 check for 128-bit long double before checking TCmode.
22673 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22674 128-bit long doubles before checking TFmode or TCmode.
22675 (FLOAT128_IBM_P): Likewise.
22677 2018-01-10 Martin Sebor <msebor@redhat.com>
22679 PR tree-optimization/83671
22680 * builtins.c (c_strlen): Unconditionally return zero for the empty
22682 Use -Warray-bounds for warnings.
22683 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22684 for non-constant array indices with COMPONENT_REF, arrays of
22685 arrays, and pointers to arrays.
22686 (gimple_fold_builtin_strlen): Determine and set length range for
22687 non-constant character arrays.
22689 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
22691 PR middle-end/81897
22692 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22695 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
22697 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22699 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22702 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22703 VECTOR_MEM_ALTIVEC_OR_VSX_P.
22704 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22705 indexed_or_indirect_operand predicate.
22706 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22707 (*vsx_le_perm_load_v8hi): Likewise.
22708 (*vsx_le_perm_load_v16qi): Likewise.
22709 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22710 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22711 (*vsx_le_perm_store_v8hi): Likewise.
22712 (*vsx_le_perm_store_v16qi): Likewise.
22713 (eight unnamed splitters): Likewise.
22715 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22717 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22718 * config/rs6000/emmintrin.h: Likewise.
22719 * config/rs6000/mmintrin.h: Likewise.
22720 * config/rs6000/xmmintrin.h: Likewise.
22722 2018-01-10 David Malcolm <dmalcolm@redhat.com>
22725 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22727 * tree.c (tree_nop_conversion): Return true for location wrapper
22729 (maybe_wrap_with_location): New function.
22730 (selftest::check_strip_nops): New function.
22731 (selftest::test_location_wrappers): New function.
22732 (selftest::tree_c_tests): Call it.
22733 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22734 (maybe_wrap_with_location): New decl.
22735 (EXPR_LOCATION_WRAPPER_P): New macro.
22736 (location_wrapper_p): New inline function.
22737 (tree_strip_any_location_wrapper): New inline function.
22739 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
22742 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22743 stack_realign_offset for the largest alignment of stack slot
22745 (ix86_find_max_used_stack_alignment): New function.
22746 (ix86_finalize_stack_frame_flags): Use it. Set
22747 max_used_stack_alignment if we don't realign stack.
22748 * config/i386/i386.h (machine_function): Add
22749 max_used_stack_alignment.
22751 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
22753 * config/arm/arm.opt (-mbranch-cost): New option.
22754 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
22757 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
22760 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
22761 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
22763 2018-01-10 Richard Biener <rguenther@suse.de>
22766 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
22767 early out so it also covers the case where we have a non-NULL
22770 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22772 PR tree-optimization/83753
22773 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
22774 for non-strided grouped accesses if the number of elements is 1.
22776 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22779 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22780 * i386.h (TARGET_USE_GATHER): Define.
22781 * x86-tune.def (X86_TUNE_USE_GATHER): New.
22783 2018-01-10 Martin Liska <mliska@suse.cz>
22786 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22787 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22789 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22790 CLEANUP_NO_PARTITIONING is not set.
22792 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22794 * doc/rtl.texi: Remove documentation of (const ...) wrappers
22795 for vectors, as a partial revert of r254296.
22796 * rtl.h (const_vec_p): Delete.
22797 (const_vec_duplicate_p): Don't test for vector CONSTs.
22798 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22799 * expmed.c (make_tree): Likewise.
22802 * common.md (E, F): Use CONSTANT_P instead of checking for
22804 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22805 checking for CONST_VECTOR.
22807 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22809 PR middle-end/83575
22810 * predict.c (force_edge_cold): Handle in more sane way edges
22811 with no prediction.
22813 2018-01-09 Carl Love <cel@us.ibm.com>
22815 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22817 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22818 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22819 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22820 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
22821 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22822 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
22823 * config/rs6000/rs6000-protos.h: Add extern defition for
22824 rs6000_generate_float2_double_code.
22825 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22827 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22828 (float2_v2df): Add define_expand.
22830 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
22833 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22834 op_mode in the force_to_mode call.
22836 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22838 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
22839 instead of checking each element individually.
22840 (aarch64_evpc_uzp): Likewise.
22841 (aarch64_evpc_zip): Likewise.
22842 (aarch64_evpc_ext): Likewise.
22843 (aarch64_evpc_rev): Likewise.
22844 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
22845 instead of checking each element individually. Return true without
22847 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
22848 whether all selected elements come from the same input, instead of
22849 checking each element individually. Remove calls to gen_rtx_REG,
22850 start_sequence and end_sequence and instead assert that no rtl is
22853 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22855 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
22856 order of HIGH and CONST checks.
22858 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22860 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
22861 if the destination isn't an SSA_NAME.
22863 2018-01-09 Richard Biener <rguenther@suse.de>
22865 PR tree-optimization/83668
22866 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
22868 (canonicalize_loop_form): ... here, renamed from ...
22869 (canonicalize_loop_closed_ssa_form): ... this and amended to
22870 swap successor edges for loop exit blocks to make us use
22871 the RPO order we need for initial schedule generation.
22873 2018-01-09 Joseph Myers <joseph@codesourcery.com>
22875 PR tree-optimization/64811
22876 * match.pd: When optimizing comparisons with Inf, avoid
22877 introducing or losing exceptions from comparisons with NaN.
22879 2018-01-09 Martin Liska <mliska@suse.cz>
22882 * asan.c (shadow_mem_size): Add gcc_assert.
22884 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
22886 Don't save registers in main().
22889 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
22890 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
22891 * config/avr/avr.c (avr_set_current_function): Don't error if
22892 naked, OS_task or OS_main are specified at the same time.
22893 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
22895 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
22897 * common/config/avr/avr-common.c (avr_option_optimization_table):
22898 Switch on -mmain-is-OS_task for optimizing compilations.
22900 2018-01-09 Richard Biener <rguenther@suse.de>
22902 PR tree-optimization/83572
22903 * graphite.c: Include cfganal.h.
22904 (graphite_transform_loops): Connect infinite loops to exit
22905 and remove fake edges at the end.
22907 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22909 * ipa-inline.c (edge_badness): Revert accidental checkin.
22911 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22914 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
22915 symbols; not inline clones.
22917 2018-01-09 Jakub Jelinek <jakub@redhat.com>
22920 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
22921 hard registers. Formatting fixes.
22923 PR preprocessor/83722
22924 * gcc.c (try_generate_repro): Pass
22925 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
22926 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22929 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
22930 Kito Cheng <kito.cheng@gmail.com>
22932 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
22933 (riscv_leaf_function_p): Delete.
22934 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
22936 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22938 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
22940 (do_ifelse): New function.
22941 (do_isel): New function.
22942 (do_sub3): New function.
22943 (do_add3): New function.
22944 (do_load_mask_compare): New function.
22945 (do_overlap_load_compare): New function.
22946 (expand_compare_loop): New function.
22947 (expand_block_compare): Call expand_compare_loop() when appropriate.
22948 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
22949 option description.
22950 (-mblock-compare-inline-loop-limit): New option.
22952 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22955 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
22956 Reverse order of second and third operands in first alternative.
22957 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
22958 of first and second elements in UNSPEC_VPERMR vector.
22959 (altivec_expand_vec_perm_le): Likewise.
22961 2018-01-08 Jeff Law <law@redhat.com>
22963 PR rtl-optimizatin/81308
22964 * tree-switch-conversion.c (cfg_altered): New file scoped static.
22965 (process_switch): If group_case_labels makes a change, then set
22967 (pass_convert_switch::execute): If a switch is converted, then
22968 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
22970 PR rtl-optimization/81308
22971 * recog.c (split_all_insns): Conditionally cleanup the CFG after
22974 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
22976 PR target/83663 - Revert r255946
22977 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
22978 generation for cases where splatting a value is not useful.
22979 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
22980 across a vec_duplicate and a paradoxical subreg forming a vector
22981 mode to a vec_concat.
22983 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22985 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
22986 -march=armv8.3-a variants.
22987 * config/arm/t-multilib: Likewise.
22988 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
22990 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22992 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
22994 (cceq_ior_compare_complement): Give it a name so I can use it, and
22995 change boolean_or_operator predicate to boolean_operator so it can
22996 be used to generate a crand.
22997 (eqne): New code iterator.
22998 (bd/bd_neg): New code_attrs.
22999 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23000 a single define_insn.
23001 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23002 decrement (bdnzt/bdnzf/bdzt/bdzf).
23003 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23004 with the new names of the branch decrement patterns, and added the
23005 names of the branch decrement conditional patterns.
23007 2018-01-08 Richard Biener <rguenther@suse.de>
23009 PR tree-optimization/83563
23010 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23013 2018-01-08 Richard Biener <rguenther@suse.de>
23015 PR middle-end/83713
23016 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23018 2018-01-08 Richard Biener <rguenther@suse.de>
23020 PR tree-optimization/83685
23021 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23022 references to abnormals.
23024 2018-01-08 Richard Biener <rguenther@suse.de>
23027 * dwarf2out.c (output_indirect_strings): Handle empty
23028 skeleton_debug_str_hash.
23029 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23031 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23033 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23034 (emit_store_direct): Likewise.
23035 (arc_trampoline_adjust_address): Likewise.
23036 (arc_asm_trampoline_template): New function.
23037 (arc_initialize_trampoline): Use asm_trampoline_template.
23038 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23039 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23040 * config/arc/arc.md (flush_icache): Delete pattern.
23042 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23044 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23045 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23048 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23051 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23052 by not USED_FOR_TARGET.
23053 (make_pass_resolve_sw_modes): Likewise.
23055 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23057 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23060 2018-01-08 Richard Biener <rguenther@suse.de>
23062 PR middle-end/83580
23063 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23065 2018-01-08 Richard Biener <rguenther@suse.de>
23067 PR middle-end/83517
23068 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23070 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23072 PR middle-end/81897
23073 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23074 basic blocks with a small number of successors.
23075 (convert_control_dep_chain_into_preds): Improve handling of
23077 (dump_predicates): Split apart into...
23078 (dump_pred_chain): ...here...
23079 (dump_pred_info): ...and here.
23080 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23081 (can_chain_union_be_invalidated_p): Improve check for invalidation
23083 (uninit_uses_cannot_happen): Avoid unnecessary if
23084 convert_control_dep_chain_into_preds yielded nothing.
23086 2018-01-06 Martin Sebor <msebor@redhat.com>
23088 PR tree-optimization/83640
23089 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23090 subtracting negative offset from size.
23091 (builtin_access::overlap): Adjust offset bounds of the access to fall
23092 within the size of the object if possible.
23094 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23096 PR rtl-optimization/83699
23097 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23098 extract_bit_field_as_subreg to cases in which the extracted
23099 value is also a vector.
23101 * lra-constraints.c (process_alt_operands): Test for the equivalence
23102 substitutions when detecting a possible reload cycle.
23104 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23107 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23108 by default if flag_selective_schedling{,2}. Formatting fixes.
23110 PR rtl-optimization/83682
23111 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23112 if it has non-VECTOR_MODE element mode.
23113 (vec_duplicate_p): Likewise.
23115 PR middle-end/83694
23116 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23117 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23119 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23122 * config/i386/i386-builtin.def
23123 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23124 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23125 Require also OPTION_MASK_ISA_AVX512F in addition to
23126 OPTION_MASK_ISA_GFNI.
23127 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23128 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23129 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23130 to OPTION_MASK_ISA_GFNI.
23131 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23132 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23133 OPTION_MASK_ISA_AVX512BW.
23134 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23135 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23136 addition to OPTION_MASK_ISA_GFNI.
23137 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23138 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23139 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23140 to OPTION_MASK_ISA_GFNI.
23141 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23142 a requirement for all ISAs rather than any of them with a few
23144 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23146 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23147 bitmasks to be enabled with 3 exceptions, instead of requiring any
23148 enabled ISA with lots of exceptions.
23149 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23150 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23151 Change avx512bw in isa attribute to avx512f.
23152 * config/i386/sgxintrin.h: Add license boilerplate.
23153 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23154 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23155 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23156 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23158 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23159 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23160 temporarily sse2 rather than sse if not enabled already.
23163 * config/i386/sse.md (VI248_VLBW): Rename to ...
23164 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23165 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23166 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23167 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23168 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23169 mode iterator instead of VI248_VLBW.
23171 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23173 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23174 (record_modified): Skip clobbers; add debug output.
23175 (param_change_prob): Use sreal frequencies.
23177 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23179 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23180 punt for user-aligned variables.
23182 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23184 * tree-chrec.c (chrec_contains_symbols): Return true for
23187 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23190 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23191 of (x|y) == x for BICS pattern.
23193 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23195 PR tree-optimization/83605
23196 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23197 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23200 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23202 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23203 * config/epiphany/rtems.h: New file.
23205 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23206 Uros Bizjak <ubizjak@gmail.com>
23209 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23210 QIreg_operand instead of register_operand predicate.
23211 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23212 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23213 comments instead of -fmitigate[-_]rop.
23215 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23218 * cgraphunit.c (symbol_table::compile): Switch to text_section
23219 before calling assembly_start debug hook.
23220 * run-rtl-passes.c (run_rtl_passes): Likewise.
23223 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23225 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23226 range_int_cst_p rather than !symbolic_range_p before calling
23227 extract_range_from_multiplicative_op_1.
23229 2018-01-04 Jeff Law <law@redhat.com>
23231 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23232 redundant test in assertion.
23234 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23236 * doc/rtl.texi: Document machine_mode wrapper classes.
23238 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23240 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23241 using tree_to_uhwi.
23243 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23245 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23246 the VEC_PERM_EXPR fold to fail.
23248 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23251 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23252 to switched_sections.
23254 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23257 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23258 test for d.testing.
23260 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23263 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23264 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23266 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23269 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23270 is BLKmode and bitpos not zero or mode change is needed.
23272 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23275 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23278 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23281 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23282 instead of MULT rtx. Update all corresponding splitters.
23283 (*saddl_se): Ditto.
23284 (*ssub<modesuffix>): Ditto.
23285 (*ssubl_se): Ditto.
23286 (*cmp_sadd_di): Update split patterns.
23287 (*cmp_sadd_si): Ditto.
23288 (*cmp_sadd_sidi): Ditto.
23289 (*cmp_ssub_di): Ditto.
23290 (*cmp_ssub_si): Ditto.
23291 (*cmp_ssub_sidi): Ditto.
23292 * config/alpha/predicates.md (const23_operand): New predicate.
23293 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23294 Look for ASHIFT, not MULT inner operand.
23295 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23297 2018-01-04 Martin Liska <mliska@suse.cz>
23299 PR gcov-profile/83669
23300 * gcov.c (output_intermediate_file): Add version to intermediate
23302 * doc/gcov.texi: Document new field 'version' in intermediate
23303 file format. Fix location of '-k' option of gcov command.
23305 2018-01-04 Martin Liska <mliska@suse.cz>
23308 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23310 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23312 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23314 2018-01-03 Martin Sebor <msebor@redhat.com>
23316 PR tree-optimization/83655
23317 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23318 checking calls with invalid arguments.
23320 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23322 * tree-vect-stmts.c (vect_get_store_rhs): New function.
23323 (vectorizable_mask_load_store): Delete.
23324 (vectorizable_call): Return false for masked loads and stores.
23325 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
23326 instead of gimple_assign_rhs1.
23327 (vectorizable_load): Handle IFN_MASK_LOAD.
23328 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23330 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23332 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23334 (vectorizable_mask_load_store): ...here.
23335 (vectorizable_load): ...and here.
23337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23339 * tree-vect-stmts.c (vect_build_all_ones_mask)
23340 (vect_build_zero_merge_argument): New functions, split out from...
23341 (vectorizable_load): ...here.
23343 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23345 * tree-vect-stmts.c (vect_check_store_rhs): New function,
23347 (vectorizable_mask_load_store): ...here.
23348 (vectorizable_store): ...and here.
23350 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23352 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23354 (vectorizable_mask_load_store): ...here.
23356 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23358 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23359 (vect_model_store_cost): Take a vec_load_store_type instead of a
23361 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23362 (vect_model_store_cost): Take a vec_load_store_type instead of a
23364 (vectorizable_mask_load_store): Update accordingly.
23365 (vectorizable_store): Likewise.
23366 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23368 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23370 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23371 IFN_MASK_LOAD calls here rather than...
23372 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23374 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23375 Alan Hayward <alan.hayward@arm.com>
23376 David Sherwood <david.sherwood@arm.com>
23378 * expmed.c (extract_bit_field_1): For vector extracts,
23379 fall back to extract_bit_field_as_subreg if vec_extract
23382 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23383 Alan Hayward <alan.hayward@arm.com>
23384 David Sherwood <david.sherwood@arm.com>
23386 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23387 they are variable or constant sized.
23388 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23389 slots for constant-sized data.
23391 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23392 Alan Hayward <alan.hayward@arm.com>
23393 David Sherwood <david.sherwood@arm.com>
23395 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23396 handling COND_EXPRs with boolean comparisons, try to find a better
23397 basis for the mask type than the boolean itself.
23399 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23401 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23402 is calculated and how it can be overridden.
23403 * genmodes.c (max_bitsize_mode_any_mode): New variable.
23404 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23406 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23409 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23410 Alan Hayward <alan.hayward@arm.com>
23411 David Sherwood <david.sherwood@arm.com>
23413 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23414 Remove the mode argument.
23415 (aarch64_simd_valid_immediate): Remove the mode and inverse
23417 * config/aarch64/iterators.md (bitsize): New iterator.
23418 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23419 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23420 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23421 aarch64_simd_valid_immediate.
23422 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23423 (aarch64_reg_or_bic_imm): Likewise.
23424 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23425 with an insn_type enum and msl with a modifier_type enum.
23426 Replace element_width with a scalar_mode. Change the shift
23427 to unsigned int. Add constructors for scalar_float_mode and
23428 scalar_int_mode elements.
23429 (aarch64_vect_float_const_representable_p): Delete.
23430 (aarch64_can_const_movi_rtx_p)
23431 (aarch64_simd_scalar_immediate_valid_for_move)
23432 (aarch64_simd_make_constant): Update call to
23433 aarch64_simd_valid_immediate.
23434 (aarch64_advsimd_valid_immediate_hs): New function.
23435 (aarch64_advsimd_valid_immediate): Likewise.
23436 (aarch64_simd_valid_immediate): Remove mode and inverse
23437 arguments. Rewrite to use the above. Use const_vec_duplicate_p
23438 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23439 and aarch64_float_const_representable_p on the result.
23440 (aarch64_output_simd_mov_immediate): Remove mode argument.
23441 Update call to aarch64_simd_valid_immediate and use of
23442 simd_immediate_info.
23443 (aarch64_output_scalar_simd_mov_immediate): Update call
23446 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23447 Alan Hayward <alan.hayward@arm.com>
23448 David Sherwood <david.sherwood@arm.com>
23450 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23451 (mode_nunits): Likewise CONST_MODE_NUNITS.
23452 * machmode.def (ADJUST_NUNITS): Document.
23453 * genmodes.c (mode_data::need_nunits_adj): New field.
23454 (blank_mode): Update accordingly.
23455 (adj_nunits): New variable.
23456 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23458 (emit_mode_size_inline): Set need_bytesize_adj for all modes
23459 listed in adj_nunits.
23460 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23461 listed in adj_nunits. Don't emit case statements for such modes.
23462 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23463 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
23464 nothing if adj_nunits is nonnull.
23465 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23466 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23467 (emit_mode_fbit): Update use of print_maybe_const_decl.
23468 (emit_move_size): Likewise. Treat the array as non-const
23470 (emit_mode_adjustments): Handle adj_nunits.
23472 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23474 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23475 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23476 (VECTOR_MODES): Use it.
23477 (make_vector_modes): Take the prefix as an argument.
23479 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23480 Alan Hayward <alan.hayward@arm.com>
23481 David Sherwood <david.sherwood@arm.com>
23483 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23484 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23485 for MODE_VECTOR_BOOL.
23486 * machmode.def (VECTOR_BOOL_MODE): Document.
23487 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23488 (make_vector_bool_mode): New function.
23489 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23491 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23492 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23494 * stor-layout.c (int_mode_for_mode): Likewise.
23495 * tree.c (build_vector_type_for_mode): Likewise.
23496 * varasm.c (output_constant_pool_2): Likewise.
23497 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23498 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
23499 for MODE_VECTOR_BOOL.
23500 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23501 of mode class checks.
23502 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23503 instead of a list of mode class checks.
23504 (expand_vector_scalar_condition): Likewise.
23505 (type_for_widest_vector_mode): Handle BImode as an inner mode.
23507 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23508 Alan Hayward <alan.hayward@arm.com>
23509 David Sherwood <david.sherwood@arm.com>
23511 * machmode.h (mode_size): Change from unsigned short to
23513 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23514 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23515 or if measurement_type is not polynomial.
23516 (fixed_size_mode::includes_p): Check for constant-sized modes.
23517 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23518 return a poly_uint16 rather than an unsigned short.
23519 (emit_mode_size): Change the type of mode_size from unsigned short
23520 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
23521 (emit_mode_adjustments): Cope with polynomial vector sizes.
23522 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23524 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23526 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23527 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23528 * caller-save.c (setup_save_areas): Likewise.
23529 (replace_reg_with_saved_mem): Likewise.
23530 * calls.c (emit_library_call_value_1): Likewise.
23531 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23532 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23533 (gen_lowpart_for_combine): Likewise.
23534 * convert.c (convert_to_integer_1): Likewise.
23535 * cse.c (equiv_constant, cse_insn): Likewise.
23536 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23537 (cselib_subst_to_values): Likewise.
23538 * dce.c (word_dce_process_block): Likewise.
23539 * df-problems.c (df_word_lr_mark_ref): Likewise.
23540 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23541 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23542 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23543 (rtl_for_decl_location): Likewise.
23544 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23545 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23546 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23547 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23548 (expand_expr_real_1): Likewise.
23549 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23550 (pad_below): Likewise.
23551 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23552 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23553 * ira.c (get_subreg_tracking_sizes): Likewise.
23554 * ira-build.c (ira_create_allocno_objects): Likewise.
23555 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23556 (ira_sort_regnos_for_alter_reg): Likewise.
23557 * ira-costs.c (record_operand_costs): Likewise.
23558 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23559 (resolve_simple_move): Likewise.
23560 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23561 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23562 (lra_constraints): Likewise.
23563 (CONST_POOL_OK_P): Reject variable-sized modes.
23564 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23565 (add_pseudo_to_slot, lra_spill): Likewise.
23566 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23567 * optabs-query.c (get_best_extraction_insn): Likewise.
23568 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23569 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23570 (expand_mult_highpart, valid_multiword_target_p): Likewise.
23571 * recog.c (offsettable_address_addr_space_p): Likewise.
23572 * regcprop.c (maybe_mode_change): Likewise.
23573 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23574 * regrename.c (build_def_use): Likewise.
23575 * regstat.c (dump_reg_info): Likewise.
23576 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23577 (find_reloads, find_reloads_subreg_address): Likewise.
23578 * reload1.c (eliminate_regs_1): Likewise.
23579 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23580 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23581 (simplify_binary_operation_1, simplify_subreg): Likewise.
23582 * targhooks.c (default_function_arg_padding): Likewise.
23583 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23584 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23585 (verify_gimple_assign_ternary): Likewise.
23586 * tree-inline.c (estimate_move_cost): Likewise.
23587 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23588 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23589 (get_address_cost_ainc): Likewise.
23590 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23591 (vect_supportable_dr_alignment): Likewise.
23592 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23593 (vectorizable_reduction): Likewise.
23594 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23595 (vectorizable_operation, vectorizable_load): Likewise.
23596 * tree.c (build_same_sized_truth_vector_type): Likewise.
23597 * valtrack.c (cleanup_auto_inc_dec): Likewise.
23598 * var-tracking.c (emit_note_insn_var_location): Likewise.
23599 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23600 (ADDR_VEC_ALIGN): Likewise.
23602 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23603 Alan Hayward <alan.hayward@arm.com>
23604 David Sherwood <david.sherwood@arm.com>
23606 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23608 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23609 or if measurement_type is polynomial.
23610 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23611 * combine.c (make_extraction): Likewise.
23612 * dse.c (find_shift_sequence): Likewise.
23613 * dwarf2out.c (mem_loc_descriptor): Likewise.
23614 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23615 (extract_bit_field, extract_low_bits): Likewise.
23616 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23617 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23618 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23619 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23620 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23621 * reload.c (find_reloads): Likewise.
23622 * reload1.c (alter_reg): Likewise.
23623 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23624 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23625 * tree-if-conv.c (predicate_mem_writes): Likewise.
23626 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23627 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23628 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23629 * valtrack.c (dead_debug_insert_temp): Likewise.
23630 * varasm.c (mergeable_constant_section): Likewise.
23631 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23633 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23634 Alan Hayward <alan.hayward@arm.com>
23635 David Sherwood <david.sherwood@arm.com>
23637 * expr.c (expand_assignment): Cope with polynomial mode sizes
23638 when assigning to a CONCAT.
23640 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23641 Alan Hayward <alan.hayward@arm.com>
23642 David Sherwood <david.sherwood@arm.com>
23644 * machmode.h (mode_precision): Change from unsigned short to
23646 (mode_to_precision): Return a poly_uint16 rather than an unsigned
23648 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23649 or if measurement_type is not polynomial.
23650 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
23651 in which the mode is already known to be a scalar_int_mode.
23652 * genmodes.c (emit_mode_precision): Change the type of mode_precision
23653 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
23655 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23656 for GET_MODE_PRECISION.
23657 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23658 for GET_MODE_PRECISION.
23659 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23661 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23662 (expand_field_assignment, make_extraction): Likewise.
23663 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23664 (get_last_value): Likewise.
23665 * convert.c (convert_to_integer_1): Likewise.
23666 * cse.c (cse_insn): Likewise.
23667 * expr.c (expand_expr_real_1): Likewise.
23668 * lra-constraints.c (simplify_operand_subreg): Likewise.
23669 * optabs-query.c (can_atomic_load_p): Likewise.
23670 * optabs.c (expand_atomic_load): Likewise.
23671 (expand_atomic_store): Likewise.
23672 * ree.c (combine_reaching_defs): Likewise.
23673 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23674 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23675 * tree.h (type_has_mode_precision_p): Likewise.
23676 * ubsan.c (instrument_si_overflow): Likewise.
23678 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23679 Alan Hayward <alan.hayward@arm.com>
23680 David Sherwood <david.sherwood@arm.com>
23682 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23683 polynomial numbers of units.
23684 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23685 (valid_vector_subparts_p): New function.
23686 (build_vector_type): Remove temporary shim and take the number
23687 of units as a poly_uint64 rather than an int.
23688 (build_opaque_vector_type): Take the number of units as a
23689 poly_uint64 rather than an int.
23690 * tree.c (build_vector_from_ctor): Handle polynomial
23691 TYPE_VECTOR_SUBPARTS.
23692 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23693 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23694 (build_vector_from_val): If the number of units is variable,
23695 use build_vec_duplicate_cst for constant operands and
23696 VEC_DUPLICATE_EXPR otherwise.
23697 (make_vector_type): Remove temporary is_constant ().
23698 (build_vector_type, build_opaque_vector_type): Take the number of
23699 units as a poly_uint64 rather than an int.
23700 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23702 * cfgexpand.c (expand_debug_expr): Likewise.
23703 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23704 (store_constructor, expand_expr_real_1): Likewise.
23705 (const_scalar_mask_from_tree): Likewise.
23706 * fold-const-call.c (fold_const_reduction): Likewise.
23707 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23708 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23709 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23710 (fold_relational_const): Likewise.
23711 (native_interpret_vector): Likewise. Change the size from an
23712 int to an unsigned int.
23713 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23714 TYPE_VECTOR_SUBPARTS.
23715 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23716 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23717 duplicating a non-constant operand into a variable-length vector.
23718 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23719 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23720 * ipa-icf.c (sem_variable::equals): Likewise.
23721 * match.pd: Likewise.
23722 * omp-simd-clone.c (simd_clone_subparts): Likewise.
23723 * print-tree.c (print_node): Likewise.
23724 * stor-layout.c (layout_type): Likewise.
23725 * targhooks.c (default_builtin_vectorization_cost): Likewise.
23726 * tree-cfg.c (verify_gimple_comparison): Likewise.
23727 (verify_gimple_assign_binary): Likewise.
23728 (verify_gimple_assign_ternary): Likewise.
23729 (verify_gimple_assign_single): Likewise.
23730 * tree-pretty-print.c (dump_generic_node): Likewise.
23731 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23732 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23733 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23734 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23735 (vect_shift_permute_load_chain): Likewise.
23736 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23737 (expand_vector_condition, optimize_vector_constructor): Likewise.
23738 (lower_vec_perm, get_compute_type): Likewise.
23739 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23740 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23741 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23742 (vect_recog_mask_conversion_pattern): Likewise.
23743 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23744 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23745 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23746 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23747 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23748 (vectorizable_shift, vectorizable_operation, vectorizable_store)
23749 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
23750 (supportable_widening_operation): Likewise.
23751 (supportable_narrowing_operation): Likewise.
23752 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
23754 * varasm.c (output_constant): Likewise.
23756 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23757 Alan Hayward <alan.hayward@arm.com>
23758 David Sherwood <david.sherwood@arm.com>
23760 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
23761 so that both the length == 3 and length != 3 cases set up their
23762 own permute vectors. Add comments explaining why we know the
23763 number of elements is constant.
23764 (vect_permute_load_chain): Likewise.
23766 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23767 Alan Hayward <alan.hayward@arm.com>
23768 David Sherwood <david.sherwood@arm.com>
23770 * machmode.h (mode_nunits): Change from unsigned char to
23772 (ONLY_FIXED_SIZE_MODES): New macro.
23773 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
23774 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
23775 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23777 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23778 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23779 or if measurement_type is not polynomial.
23780 * genmodes.c (ZERO_COEFFS): New macro.
23781 (emit_mode_nunits_inline): Make mode_nunits_inline return a
23783 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23784 Use ZERO_COEFFS when emitting initializers.
23785 * data-streamer.h (bp_pack_poly_value): New function.
23786 (bp_unpack_poly_value): Likewise.
23787 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23788 for GET_MODE_NUNITS.
23789 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23790 for GET_MODE_NUNITS.
23791 * tree.c (make_vector_type): Remove temporary shim and make
23792 the real function take the number of units as a poly_uint64
23793 rather than an int.
23794 (build_vector_type_for_mode): Handle polynomial nunits.
23795 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23796 * emit-rtl.c (const_vec_series_p_1): Likewise.
23797 (gen_rtx_CONST_VECTOR): Likewise.
23798 * fold-const.c (test_vec_duplicate_folding): Likewise.
23799 * genrecog.c (validate_pattern): Likewise.
23800 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23801 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23802 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23803 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23804 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23805 * rtlanal.c (subreg_get_info): Likewise.
23806 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23807 (vect_grouped_load_supported): Likewise.
23808 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23809 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23810 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23811 (simplify_const_unary_operation, simplify_binary_operation_1)
23812 (simplify_const_binary_operation, simplify_ternary_operation)
23813 (test_vector_ops_duplicate, test_vector_ops): Likewise.
23814 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23815 instead of CONST_VECTOR_NUNITS.
23816 * varasm.c (output_constant_pool_2): Likewise.
23817 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23818 explicit-encoded elements in the XVEC for variable-length vectors.
23820 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23822 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23824 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23825 Alan Hayward <alan.hayward@arm.com>
23826 David Sherwood <david.sherwood@arm.com>
23828 * coretypes.h (fixed_size_mode): Declare.
23829 (fixed_size_mode_pod): New typedef.
23830 * builtins.h (target_builtins::x_apply_args_mode)
23831 (target_builtins::x_apply_result_mode): Change type to
23832 fixed_size_mode_pod.
23833 * builtins.c (apply_args_size, apply_result_size, result_vector)
23834 (expand_builtin_apply_args_1, expand_builtin_apply)
23835 (expand_builtin_return): Update accordingly.
23837 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23839 * cse.c (hash_rtx_cb): Hash only the encoded elements.
23840 * cselib.c (cselib_hash_rtx): Likewise.
23841 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
23842 CONST_VECTOR encoding.
23844 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23845 Jeff Law <law@redhat.com>
23848 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
23849 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
23850 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
23851 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
23854 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
23855 explicitly probe *sp in a noreturn function if there were any callee
23856 register saves or frame pointer is needed.
23858 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23861 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
23862 BLKmode for ternary, binary or unary expressions.
23865 * var-tracking.c (delete_vta_debug_insn): New inline function.
23866 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
23867 insns from get_insns () to NULL instead of each bb separately.
23868 Use delete_vta_debug_insn. No longer static.
23869 (vt_debug_insns_local, variable_tracking_main_1): Adjust
23870 delete_vta_debug_insns callers.
23871 * rtl.h (delete_vta_debug_insns): Declare.
23872 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
23873 instead of variable_tracking_main.
23875 2018-01-03 Martin Sebor <msebor@redhat.com>
23877 PR tree-optimization/83603
23878 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
23879 arguments past the endof the argument list in functions declared
23880 without a prototype.
23881 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
23882 Avoid checking when arguments are null.
23884 2018-01-03 Martin Sebor <msebor@redhat.com>
23887 * doc/extend.texi (attribute const): Fix a typo.
23888 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
23889 issuing -Wsuggest-attribute for void functions.
23891 2018-01-03 Martin Sebor <msebor@redhat.com>
23893 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
23894 offset_int::from instead of wide_int::to_shwi.
23895 (maybe_diag_overlap): Remove assertion.
23896 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
23897 * gimple-ssa-sprintf.c (format_directive): Same.
23898 (parse_directive): Same.
23899 (sprintf_dom_walker::compute_format_length): Same.
23900 (try_substitute_return_value): Same.
23902 2018-01-03 Jeff Law <law@redhat.com>
23904 PR middle-end/83654
23905 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
23906 non-constant residual for zero at runtime and avoid probing in
23907 that case. Reorganize code for trailing problem to mirror handling
23910 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23912 PR tree-optimization/83501
23913 * tree-ssa-strlen.c (get_string_cst): New.
23914 (handle_char_store): Call get_string_cst.
23916 2018-01-03 Martin Liska <mliska@suse.cz>
23918 PR tree-optimization/83593
23919 * tree-ssa-strlen.c: Include tree-cfg.h.
23920 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
23921 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
23922 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
23924 (strlen_dom_walker::before_dom_children): Call
23925 gimple_purge_dead_eh_edges. Dump tranformation with details
23927 (strlen_dom_walker::before_dom_children): Update call by adding
23928 new argument cleanup_eh.
23929 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
23931 2018-01-03 Martin Liska <mliska@suse.cz>
23934 * cif-code.def (VARIADIC_THUNK): New enum value.
23935 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
23938 2018-01-03 Jan Beulich <jbeulich@suse.com>
23940 * sse.md (mov<mode>_internal): Tighten condition for when to use
23941 vmovdqu<ssescalarsize> for TI and OI modes.
23943 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23945 Update copyright years.
23947 2018-01-03 Martin Liska <mliska@suse.cz>
23950 * ipa-visibility.c (function_and_variable_visibility): Skip
23951 functions with noipa attribure.
23953 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23955 * gcc.c (process_command): Update copyright notice dates.
23956 * gcov-dump.c (print_version): Ditto.
23957 * gcov.c (print_version): Ditto.
23958 * gcov-tool.c (print_version): Ditto.
23959 * gengtype.c (create_file): Ditto.
23960 * doc/cpp.texi: Bump @copying's copyright year.
23961 * doc/cppinternals.texi: Ditto.
23962 * doc/gcc.texi: Ditto.
23963 * doc/gccint.texi: Ditto.
23964 * doc/gcov.texi: Ditto.
23965 * doc/install.texi: Ditto.
23966 * doc/invoke.texi: Ditto.
23968 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23970 * vector-builder.h (vector_builder::m_full_nelts): Change from
23971 unsigned int to poly_uint64.
23972 (vector_builder::full_nelts): Update prototype accordingly.
23973 (vector_builder::new_vector): Likewise.
23974 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
23975 (vector_builder::operator ==): Likewise.
23976 (vector_builder::finalize): Likewise.
23977 * int-vector-builder.h (int_vector_builder::int_vector_builder):
23978 Take the number of elements as a poly_uint64 rather than an
23980 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
23981 from unsigned int to poly_uint64.
23982 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
23983 (vec_perm_indices::new_vector): Likewise.
23984 (vec_perm_indices::length): Likewise.
23985 (vec_perm_indices::nelts_per_input): Likewise.
23986 (vec_perm_indices::input_nelts): Likewise.
23987 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
23988 number of elements per input as a poly_uint64 rather than an
23989 unsigned int. Use the original encoding for variable-length
23990 vectors, rather than clamping each individual element.
23991 For the second and subsequent elements in each pattern,
23992 clamp the step and base before clamping their sum.
23993 (vec_perm_indices::series_p): Handle polynomial element counts.
23994 (vec_perm_indices::all_in_range_p): Likewise.
23995 (vec_perm_indices_to_tree): Likewise.
23996 (vec_perm_indices_to_rtx): Likewise.
23997 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
23998 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
23999 (tree_vector_builder::new_binary_operation): Handle polynomial
24000 element counts. Return false if we need to know the number
24001 of elements at compile time.
24002 * fold-const.c (fold_vec_perm): Punt if the number of elements
24003 isn't known at compile time.
24005 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24007 * vec-perm-indices.h (vec_perm_builder): Change element type
24008 from HOST_WIDE_INT to poly_int64.
24009 (vec_perm_indices::element_type): Update accordingly.
24010 (vec_perm_indices::clamp): Handle polynomial element_types.
24011 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24012 (vec_perm_indices::all_in_range_p): Likewise.
24013 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24015 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24016 polynomial vec_perm_indices element types.
24017 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24018 * fold-const.c (fold_vec_perm): Likewise.
24019 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24020 * tree-vect-generic.c (lower_vec_perm): Likewise.
24021 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24022 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24023 element type to HOST_WIDE_INT.
24025 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24026 Alan Hayward <alan.hayward@arm.com>
24027 David Sherwood <david.sherwood@arm.com>
24029 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24030 rather than an int. Use plus_constant.
24031 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24032 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24034 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24035 Alan Hayward <alan.hayward@arm.com>
24036 David Sherwood <david.sherwood@arm.com>
24038 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24039 a HOST_WIDE_INT to a poly_int64.
24041 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24042 Alan Hayward <alan.hayward@arm.com>
24043 David Sherwood <david.sherwood@arm.com>
24045 * calls.c (load_register_parameters): Cope with polynomial
24046 mode sizes. Require a constant size for BLKmode parameters
24047 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24048 forces a parameter to be padded at the lsb end in order to
24049 fill a complete number of words, require the parameter size
24050 to be ordered wrt UNITS_PER_WORD.
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 * reload1.c (spill_stack_slot_width): Change element type
24057 from unsigned int to poly_uint64_pod.
24058 (alter_reg): Treat mode sizes as polynomial.
24060 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24061 Alan Hayward <alan.hayward@arm.com>
24062 David Sherwood <david.sherwood@arm.com>
24064 * reload.c (complex_word_subreg_p): New function.
24065 (reload_inner_reg_of_subreg, push_reload): Use it.
24067 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24068 Alan Hayward <alan.hayward@arm.com>
24069 David Sherwood <david.sherwood@arm.com>
24071 * lra-constraints.c (process_alt_operands): Reject matched
24072 operands whose sizes aren't ordered.
24073 (match_reload): Refer to this check here.
24075 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24076 Alan Hayward <alan.hayward@arm.com>
24077 David Sherwood <david.sherwood@arm.com>
24079 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24080 that the mode size is in the set {1, 2, 4, 8, 16}.
24082 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24083 Alan Hayward <alan.hayward@arm.com>
24084 David Sherwood <david.sherwood@arm.com>
24086 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24087 Use plus_constant instead of gen_rtx_PLUS.
24089 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24090 Alan Hayward <alan.hayward@arm.com>
24091 David Sherwood <david.sherwood@arm.com>
24093 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24094 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24095 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24096 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24097 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24098 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24099 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24100 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24101 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24102 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24104 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24105 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24106 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24107 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24108 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24109 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24110 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24111 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24112 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24113 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24115 * expr.c (emit_move_resolve_push): Treat the input and result
24116 of PUSH_ROUNDING as a poly_int64.
24117 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24118 (emit_push_insn): Likewise.
24119 * lra-eliminations.c (mark_not_eliminable): Likewise.
24120 * recog.c (push_operand): Likewise.
24121 * reload1.c (elimination_effects): Likewise.
24122 * rtlanal.c (nonzero_bits1): Likewise.
24123 * calls.c (store_one_arg): Likewise. Require the padding to be
24124 known at compile time.
24126 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24127 Alan Hayward <alan.hayward@arm.com>
24128 David Sherwood <david.sherwood@arm.com>
24130 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24131 Use plus_constant instead of gen_rtx_PLUS.
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 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24138 rather than an int.
24140 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24141 Alan Hayward <alan.hayward@arm.com>
24142 David Sherwood <david.sherwood@arm.com>
24144 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24145 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24146 via stack temporaries. Treat the mode size as polynomial too.
24148 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24149 Alan Hayward <alan.hayward@arm.com>
24150 David Sherwood <david.sherwood@arm.com>
24152 * expr.c (expand_expr_real_2): When handling conversions involving
24153 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24154 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24155 as a poly_uint64 too.
24157 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24158 Alan Hayward <alan.hayward@arm.com>
24159 David Sherwood <david.sherwood@arm.com>
24161 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24163 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24164 Alan Hayward <alan.hayward@arm.com>
24165 David Sherwood <david.sherwood@arm.com>
24167 * combine.c (can_change_dest_mode): Handle polynomial
24168 REGMODE_NATURAL_SIZE.
24169 * expmed.c (store_bit_field_1): Likewise.
24170 * expr.c (store_constructor): Likewise.
24171 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24172 and polynomial REGMODE_NATURAL_SIZE.
24173 (gen_lowpart_common): Likewise.
24174 * reginfo.c (record_subregs_of_mode): Likewise.
24175 * rtlanal.c (read_modify_subreg_p): Likewise.
24177 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24178 Alan Hayward <alan.hayward@arm.com>
24179 David Sherwood <david.sherwood@arm.com>
24181 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24182 numbers of elements.
24184 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24185 Alan Hayward <alan.hayward@arm.com>
24186 David Sherwood <david.sherwood@arm.com>
24188 * match.pd: Cope with polynomial numbers of vector elements.
24190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24191 Alan Hayward <alan.hayward@arm.com>
24192 David Sherwood <david.sherwood@arm.com>
24194 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24195 in a POINTER_PLUS_EXPR.
24197 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24198 Alan Hayward <alan.hayward@arm.com>
24199 David Sherwood <david.sherwood@arm.com>
24201 * omp-simd-clone.c (simd_clone_subparts): New function.
24202 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24203 (ipa_simd_modify_function_body): Likewise.
24205 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24206 Alan Hayward <alan.hayward@arm.com>
24207 David Sherwood <david.sherwood@arm.com>
24209 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24210 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24211 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24212 (expand_vector_condition, vector_element): Likewise.
24213 (subparts_gt): New function.
24214 (get_compute_type): Use subparts_gt.
24215 (count_type_subparts): Delete.
24216 (expand_vector_operations_1): Use subparts_gt instead of
24217 count_type_subparts.
24219 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24220 Alan Hayward <alan.hayward@arm.com>
24221 David Sherwood <david.sherwood@arm.com>
24223 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24224 (vect_compile_time_alias): ...this new function. Do the calculation
24225 on poly_ints rather than trees.
24226 (vect_prune_runtime_alias_test_list): Update call accordingly.
24228 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24229 Alan Hayward <alan.hayward@arm.com>
24230 David Sherwood <david.sherwood@arm.com>
24232 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24234 (vect_schedule_slp_instance): Likewise.
24236 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24237 Alan Hayward <alan.hayward@arm.com>
24238 David Sherwood <david.sherwood@arm.com>
24240 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24241 constant and extern definitions for variable-length vectors.
24242 (vect_get_constant_vectors): Note that the number of units
24243 is known to be constant.
24245 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24246 Alan Hayward <alan.hayward@arm.com>
24247 David Sherwood <david.sherwood@arm.com>
24249 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24250 of units as polynomial. Choose between WIDE and NARROW based
24253 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24254 Alan Hayward <alan.hayward@arm.com>
24255 David Sherwood <david.sherwood@arm.com>
24257 * tree-vect-stmts.c (simd_clone_subparts): New function.
24258 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24260 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24261 Alan Hayward <alan.hayward@arm.com>
24262 David Sherwood <david.sherwood@arm.com>
24264 * tree-vect-stmts.c (vectorizable_call): Treat the number of
24265 vectors as polynomial. Use build_index_vector for
24266 IFN_GOMP_SIMD_LANE.
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-vect-stmts.c (get_load_store_type): Treat the number of
24273 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24274 for variable-length vectors.
24275 (vectorizable_mask_load_store): Treat the number of units as
24276 polynomial, asserting that it is constant if the condition has
24277 already been enforced.
24278 (vectorizable_store, vectorizable_load): Likewise.
24280 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24281 Alan Hayward <alan.hayward@arm.com>
24282 David Sherwood <david.sherwood@arm.com>
24284 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24285 of units as polynomial. Punt if we can't tell at compile time
24286 which vector contains the final result.
24288 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24289 Alan Hayward <alan.hayward@arm.com>
24290 David Sherwood <david.sherwood@arm.com>
24292 * tree-vect-loop.c (vectorizable_induction): Treat the number
24293 of units as polynomial. Punt on SLP inductions. Use an integer
24294 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24295 cast of such a series for variable-length floating-point
24298 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24299 Alan Hayward <alan.hayward@arm.com>
24300 David Sherwood <david.sherwood@arm.com>
24302 * tree.h (build_index_vector): Declare.
24303 * tree.c (build_index_vector): New function.
24304 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24305 of units as polynomial, forcibly converting it to a constant if
24306 vectorizable_reduction has already enforced the condition.
24307 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
24308 to create a {1,2,3,...} vector.
24309 (vectorizable_reduction): Treat the number of units as polynomial.
24310 Choose vectype_in based on the largest scalar element size rather
24311 than the smallest number of units. Enforce the restrictions
24314 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24315 Alan Hayward <alan.hayward@arm.com>
24316 David Sherwood <david.sherwood@arm.com>
24318 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24319 number of units as polynomial.
24321 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24322 Alan Hayward <alan.hayward@arm.com>
24323 David Sherwood <david.sherwood@arm.com>
24325 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24326 * target.def (autovectorize_vector_sizes): Return the vector sizes
24327 by pointer, using vector_sizes rather than a bitmask.
24328 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24329 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24330 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24332 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24333 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24334 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24335 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24336 * omp-general.c (omp_max_vf): Likewise.
24337 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24338 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24339 * tree-vect-loop.c (vect_analyze_loop): Likewise.
24340 * tree-vect-slp.c (vect_slp_bb): Likewise.
24341 * doc/tm.texi: Regenerate.
24342 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24344 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24345 the vector size as a poly_uint64 rather than an unsigned int.
24346 (current_vector_size): Change from an unsigned int to a poly_uint64.
24347 (get_vectype_for_scalar_type): Update accordingly.
24348 * tree.h (build_truth_vector_type): Take the size and number of
24349 units as a poly_uint64 rather than an unsigned int.
24350 (build_vector_type): Add a temporary overload that takes
24351 the number of units as a poly_uint64 rather than an unsigned int.
24352 * tree.c (make_vector_type): Likewise.
24353 (build_truth_vector_type): Take the number of units as a poly_uint64
24354 rather than an unsigned int.
24356 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24357 Alan Hayward <alan.hayward@arm.com>
24358 David Sherwood <david.sherwood@arm.com>
24360 * target.def (get_mask_mode): Take the number of units and length
24361 as poly_uint64s rather than unsigned ints.
24362 * targhooks.h (default_get_mask_mode): Update accordingly.
24363 * targhooks.c (default_get_mask_mode): Likewise.
24364 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24365 * doc/tm.texi: Regenerate.
24367 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24368 Alan Hayward <alan.hayward@arm.com>
24369 David Sherwood <david.sherwood@arm.com>
24371 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24372 * omp-general.c (omp_max_vf): Likewise.
24373 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24374 (expand_omp_simd): Handle polynomial safelen.
24375 * omp-low.c (omplow_simd_context): Add a default constructor.
24376 (omplow_simd_context::max_vf): Change from int to poly_uint64.
24377 (lower_rec_simd_input_clauses): Update accordingly.
24378 (lower_rec_input_clauses): Likewise.
24380 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24381 Alan Hayward <alan.hayward@arm.com>
24382 David Sherwood <david.sherwood@arm.com>
24384 * tree-vectorizer.h (vect_nunits_for_cost): New function.
24385 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24386 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24387 (vect_analyze_slp_cost): Likewise.
24388 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24389 (vect_model_load_cost): Likewise.
24391 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24392 Alan Hayward <alan.hayward@arm.com>
24393 David Sherwood <david.sherwood@arm.com>
24395 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24396 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24397 from an unsigned int * to a poly_uint64_pod *.
24398 (calculate_unrolling_factor): New function.
24399 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
24401 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24402 Alan Hayward <alan.hayward@arm.com>
24403 David Sherwood <david.sherwood@arm.com>
24405 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24406 from an unsigned int to a poly_uint64.
24407 (_loop_vec_info::slp_unrolling_factor): Likewise.
24408 (_loop_vec_info::vectorization_factor): Change from an int
24410 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24411 (vect_get_num_vectors): New function.
24412 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24413 (vect_get_num_copies): Use vect_get_num_vectors.
24414 (vect_analyze_data_ref_dependences): Change max_vf from an int *
24415 to an unsigned int *.
24416 (vect_analyze_data_refs): Change min_vf from an int * to a
24418 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24419 than an unsigned HOST_WIDE_INT.
24420 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24421 (vect_analyze_data_ref_dependence): Change max_vf from an int *
24422 to an unsigned int *.
24423 (vect_analyze_data_ref_dependences): Likewise.
24424 (vect_compute_data_ref_alignment): Handle polynomial vf.
24425 (vect_enhance_data_refs_alignment): Likewise.
24426 (vect_prune_runtime_alias_test_list): Likewise.
24427 (vect_shift_permute_load_chain): Likewise.
24428 (vect_supportable_dr_alignment): Likewise.
24429 (dependence_distance_ge_vf): Take the vectorization factor as a
24430 poly_uint64 rather than an unsigned HOST_WIDE_INT.
24431 (vect_analyze_data_refs): Change min_vf from an int * to a
24433 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24434 vfm1 as a poly_uint64 rather than an int. Make the same change
24435 for the returned bound_scalar.
24436 (vect_gen_vector_loop_niters): Handle polynomial vf.
24437 (vect_do_peeling): Likewise. Update call to
24438 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24439 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24441 * tree-vect-loop.c (vect_determine_vectorization_factor)
24442 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24443 (vect_get_known_peeling_cost): Likewise.
24444 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24445 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24446 (vect_transform_loop): Likewise. Use the lowest possible VF when
24447 updating the upper bounds of the loop.
24448 (vect_min_worthwhile_factor): Make static. Return an unsigned int
24449 rather than an int.
24450 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24451 polynomial unroll factors.
24452 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24453 (vect_make_slp_decision): Likewise.
24454 (vect_supported_load_permutation_p): Likewise, and polynomial
24456 (vect_analyze_slp_cost): Handle polynomial vf.
24457 (vect_slp_analyze_node_operations): Likewise.
24458 (vect_slp_analyze_bb_1): Likewise.
24459 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24460 than an unsigned HOST_WIDE_INT.
24461 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24462 (vectorizable_load): Handle polynomial vf.
24463 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24465 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24467 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24468 Alan Hayward <alan.hayward@arm.com>
24469 David Sherwood <david.sherwood@arm.com>
24471 * match.pd: Handle bit operations involving three constants
24472 and try to fold one pair.
24474 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24476 * tree-vect-loop-manip.c: Include gimple-fold.h.
24477 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24478 niters_maybe_zero parameters. Handle other cases besides a step of 1.
24479 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24480 Add a path that uses a step of VF instead of 1, but disable it
24482 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24483 and niters_no_overflow parameters. Update calls to
24484 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24485 Create a new SSA name if the latter choses to use a ste other
24486 than zero, and return it via niters_vector_mult_vf_var.
24487 * tree-vect-loop.c (vect_transform_loop): Update calls to
24488 vect_do_peeling, vect_gen_vector_loop_niters and
24489 slpeel_make_loop_iterate_ntimes.
24490 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24491 (vect_gen_vector_loop_niters): Update declarations after above changes.
24493 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24495 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24496 128-bit round to integer instructions.
24497 (ceil<mode>2): Likewise.
24498 (btrunc<mode>2): Likewise.
24499 (round<mode>2): Likewise.
24501 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24503 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24504 unaligned VSX load/store on P8/P9.
24505 (expand_block_clear): Allow the use of unaligned VSX
24506 load/store on P8/P9.
24508 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24510 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24512 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24513 swap associated with both a load and a store.
24515 2018-01-02 Andrew Waterman <andrew@sifive.com>
24517 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24518 * config/riscv/riscv.md (clear_cache): Use it.
24520 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
24522 * web.c: Remove out-of-date comment.
24524 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24526 * expr.c (fixup_args_size_notes): Check that any existing
24527 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24528 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24529 (emit_single_push_insn): ...here.
24531 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24533 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24534 (const_vector_encoded_nelts): New function.
24535 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24536 (const_vector_int_elt, const_vector_elt): Declare.
24537 * emit-rtl.c (const_vector_int_elt_1): New function.
24538 (const_vector_elt): Likewise.
24539 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24540 of CONST_VECTOR_ELT.
24542 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24544 * expr.c: Include rtx-vector-builder.h.
24545 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24546 directly on the tree encoding.
24547 (const_vector_from_tree): Likewise.
24548 * optabs.c: Include rtx-vector-builder.h.
24549 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24550 sequence of "u" values.
24551 * vec-perm-indices.c: Include rtx-vector-builder.h.
24552 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24553 directly on the vec_perm_indices encoding.
24555 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24557 * doc/rtl.texi (const_vector): Describe new encoding scheme.
24558 * Makefile.in (OBJS): Add rtx-vector-builder.o.
24559 * rtx-vector-builder.h: New file.
24560 * rtx-vector-builder.c: Likewise.
24561 * rtl.h (rtx_def::u2): Add a const_vector field.
24562 (CONST_VECTOR_NPATTERNS): New macro.
24563 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24564 (CONST_VECTOR_DUPLICATE_P): Likewise.
24565 (CONST_VECTOR_STEPPED_P): Likewise.
24566 (CONST_VECTOR_ENCODED_ELT): Likewise.
24567 (const_vec_duplicate_p): Check for a duplicated vector encoding.
24568 (unwrap_const_vec_duplicate): Likewise.
24569 (const_vec_series_p): Check for a non-duplicated vector encoding.
24570 Say that the function only returns true for integer vectors.
24571 * emit-rtl.c: Include rtx-vector-builder.h.
24572 (gen_const_vec_duplicate_1): Delete.
24573 (gen_const_vector): Call gen_const_vec_duplicate instead of
24574 gen_const_vec_duplicate_1.
24575 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24576 (gen_const_vec_duplicate): Use rtx_vector_builder.
24577 (gen_const_vec_series): Likewise.
24578 (gen_rtx_CONST_VECTOR): Likewise.
24579 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24580 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24581 Build a new vector rather than modifying a CONST_VECTOR in-place.
24582 (handle_special_swappables): Update call accordingly.
24583 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24584 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24585 Build a new vector rather than modifying a CONST_VECTOR in-place.
24586 (handle_special_swappables): Update call accordingly.
24588 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24590 * simplify-rtx.c (simplify_const_binary_operation): Use
24591 CONST_VECTOR_ELT instead of XVECEXP.
24593 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24595 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24596 the selector elements to be different from the data elements
24597 if the selector is a VECTOR_CST.
24598 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24599 ssizetype for the selector.
24601 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24603 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24604 before testing each element individually.
24605 * tree-vect-generic.c (lower_vec_perm): Likewise.
24607 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24609 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24610 * selftest-run-tests.c (selftest::run_tests): Call it.
24611 * vector-builder.h (vector_builder::operator ==): New function.
24612 (vector_builder::operator !=): Likewise.
24613 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24614 (vec_perm_indices::all_from_input_p): New function.
24615 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24616 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24617 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24618 instead of reading the VECTOR_CST directly. Detect whether both
24619 vector inputs are the same before constructing the vec_perm_indices,
24620 and update the number of inputs argument accordingly. Use the
24621 utility functions added above. Only construct sel2 if we need to.
24623 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24625 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24626 the broadcast of the low byte.
24627 (expand_mult_highpart): Use an explicit encoding for the permutes.
24628 * optabs-query.c (can_mult_highpart_p): Likewise.
24629 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24630 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24631 (vectorizable_bswap): Likewise.
24632 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24633 explicit encoding for the power-of-2 permutes.
24634 (vect_permute_store_chain): Likewise.
24635 (vect_grouped_load_supported): Likewise.
24636 (vect_permute_load_chain): Likewise.
24638 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24640 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24641 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24642 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24643 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24644 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24645 (vect_gen_perm_mask_any): Likewise.
24647 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24649 * int-vector-builder.h: New file.
24650 * vec-perm-indices.h: Include int-vector-builder.h.
24651 (vec_perm_indices): Redefine as an int_vector_builder.
24652 (auto_vec_perm_indices): Delete.
24653 (vec_perm_builder): Redefine as a stand-alone class.
24654 (vec_perm_indices::vec_perm_indices): New function.
24655 (vec_perm_indices::clamp): Likewise.
24656 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24657 (vec_perm_indices::new_vector): New function.
24658 (vec_perm_indices::new_expanded_vector): Update for new
24659 vec_perm_indices class.
24660 (vec_perm_indices::rotate_inputs): New function.
24661 (vec_perm_indices::all_in_range_p): Operate directly on the
24662 encoded form, without computing elided elements.
24663 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24664 encoding. Update for new vec_perm_indices class.
24665 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24666 the given vec_perm_builder.
24667 (expand_vec_perm_var): Update vec_perm_builder constructor.
24668 (expand_mult_highpart): Use vec_perm_builder instead of
24669 auto_vec_perm_indices.
24670 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24671 vec_perm_indices instead of auto_vec_perm_indices. Use a single
24672 or double series encoding as appropriate.
24673 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24674 vec_perm_indices instead of auto_vec_perm_indices.
24675 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24676 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24677 (vect_permute_store_chain): Likewise.
24678 (vect_grouped_load_supported): Likewise.
24679 (vect_permute_load_chain): Likewise.
24680 (vect_shift_permute_load_chain): Likewise.
24681 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24682 (vect_transform_slp_perm_load): Likewise.
24683 (vect_schedule_slp_instance): Likewise.
24684 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24685 (vectorizable_mask_load_store): Likewise.
24686 (vectorizable_bswap): Likewise.
24687 (vectorizable_store): Likewise.
24688 (vectorizable_load): Likewise.
24689 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24690 vec_perm_indices instead of auto_vec_perm_indices. Use
24691 tree_to_vec_perm_builder to read the vector from a tree.
24692 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24693 vec_perm_builder instead of a vec_perm_indices.
24694 (have_whole_vector_shift): Use vec_perm_builder and
24695 vec_perm_indices instead of auto_vec_perm_indices. Leave the
24696 truncation to calc_vec_perm_mask_for_shift.
24697 (vect_create_epilog_for_reduction): Likewise.
24698 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24699 from auto_vec_perm_indices to vec_perm_indices.
24700 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24701 instead of changing individual elements.
24702 (aarch64_vectorize_vec_perm_const): Use new_vector to install
24703 the vector in d.perm.
24704 * config/arm/arm.c (expand_vec_perm_d::perm): Change
24705 from auto_vec_perm_indices to vec_perm_indices.
24706 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24707 instead of changing individual elements.
24708 (arm_vectorize_vec_perm_const): Use new_vector to install
24709 the vector in d.perm.
24710 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24711 Update vec_perm_builder constructor.
24712 (rs6000_expand_interleave): Likewise.
24713 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24714 (rs6000_expand_interleave): Likewise.
24716 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24718 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24719 to qimode could truncate the indices.
24720 * optabs.c (expand_vec_perm_var): Likewise.
24722 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24724 * Makefile.in (OBJS): Add vec-perm-indices.o.
24725 * vec-perm-indices.h: New file.
24726 * vec-perm-indices.c: Likewise.
24727 * target.h (vec_perm_indices): Replace with a forward class
24729 (auto_vec_perm_indices): Move to vec-perm-indices.h.
24730 * optabs.h: Include vec-perm-indices.h.
24731 (expand_vec_perm): Delete.
24732 (selector_fits_mode_p, expand_vec_perm_var): Declare.
24733 (expand_vec_perm_const): Declare.
24734 * target.def (vec_perm_const_ok): Replace with...
24735 (vec_perm_const): ...this new hook.
24736 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24737 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24738 * doc/tm.texi: Regenerate.
24739 * optabs.def (vec_perm_const): Delete.
24740 * doc/md.texi (vec_perm_const): Likewise.
24741 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24742 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24743 expand_vec_perm for constant permutation vectors. Assert that
24744 the mode of variable permutation vectors is the integer equivalent
24745 of the mode that is being permuted.
24746 * optabs-query.h (selector_fits_mode_p): Declare.
24747 * optabs-query.c: Include vec-perm-indices.h.
24748 (selector_fits_mode_p): New function.
24749 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
24750 is defined, instead of checking whether the vec_perm_const_optab
24751 exists. Use targetm.vectorize.vec_perm_const instead of
24752 targetm.vectorize.vec_perm_const_ok. Check whether the indices
24753 fit in the vector mode before using a variable permute.
24754 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
24755 vec_perm_indices instead of an rtx.
24756 (expand_vec_perm): Replace with...
24757 (expand_vec_perm_const): ...this new function. Take the selector
24758 as a vec_perm_indices rather than an rtx. Also take the mode of
24759 the selector. Update call to shift_amt_for_vec_perm_mask.
24760 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
24761 Use vec_perm_indices::new_expanded_vector to expand the original
24762 selector into bytes. Check whether the indices fit in the vector
24763 mode before using a variable permute.
24764 (expand_vec_perm_var): Make global.
24765 (expand_mult_highpart): Use expand_vec_perm_const.
24766 * fold-const.c: Includes vec-perm-indices.h.
24767 * tree-ssa-forwprop.c: Likewise.
24768 * tree-vect-data-refs.c: Likewise.
24769 * tree-vect-generic.c: Likewise.
24770 * tree-vect-loop.c: Likewise.
24771 * tree-vect-slp.c: Likewise.
24772 * tree-vect-stmts.c: Likewise.
24773 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
24775 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
24776 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24777 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24778 (aarch64_vectorize_vec_perm_const): ...this new function.
24779 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24780 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24781 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24782 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24783 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24784 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24785 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24787 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
24788 check for NEON modes.
24789 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24790 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24791 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24792 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24794 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
24795 the old VEC_PERM_CONST conditions.
24796 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24797 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24798 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24799 (ia64_vectorize_vec_perm_const_ok): Merge into...
24800 (ia64_vectorize_vec_perm_const): ...this new function.
24801 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24802 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24803 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24804 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24805 * config/mips/mips.c (mips_expand_vec_perm_const)
24806 (mips_vectorize_vec_perm_const_ok): Merge into...
24807 (mips_vectorize_vec_perm_const): ...this new function.
24808 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24809 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24810 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24811 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24812 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24813 (rs6000_expand_vec_perm_const): Delete.
24814 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24816 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24817 (altivec_expand_vec_perm_const_le): Take each operand individually.
24818 Operate on constant selectors rather than rtxes.
24819 (altivec_expand_vec_perm_const): Likewise. Update call to
24820 altivec_expand_vec_perm_const_le.
24821 (rs6000_expand_vec_perm_const): Delete.
24822 (rs6000_vectorize_vec_perm_const_ok): Delete.
24823 (rs6000_vectorize_vec_perm_const): New function.
24824 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24825 an element count and rtx array.
24826 (rs6000_expand_extract_even): Update call accordingly.
24827 (rs6000_expand_interleave): Likewise.
24828 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24829 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24830 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24831 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24832 (rs6000_expand_vec_perm_const): Delete.
24833 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24834 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24835 (altivec_expand_vec_perm_const_le): Take each operand individually.
24836 Operate on constant selectors rather than rtxes.
24837 (altivec_expand_vec_perm_const): Likewise. Update call to
24838 altivec_expand_vec_perm_const_le.
24839 (rs6000_expand_vec_perm_const): Delete.
24840 (rs6000_vectorize_vec_perm_const_ok): Delete.
24841 (rs6000_vectorize_vec_perm_const): New function. Remove stray
24842 reference to the SPE evmerge intructions.
24843 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24844 an element count and rtx array.
24845 (rs6000_expand_extract_even): Update call accordingly.
24846 (rs6000_expand_interleave): Likewise.
24847 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
24848 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
24850 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24852 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24854 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
24855 vector mode and that that mode matches the mode of the data
24857 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
24858 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
24859 directly using expand_vec_perm_1 when forcing selectors into
24861 (expand_vec_perm_var): New function, split out from expand_vec_perm.
24863 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24865 * optabs-query.h (can_vec_perm_p): Delete.
24866 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
24867 * optabs-query.c (can_vec_perm_p): Split into...
24868 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
24869 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
24870 particular selector is valid.
24871 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24872 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24873 (vect_grouped_load_supported): Likewise.
24874 (vect_shift_permute_load_chain): Likewise.
24875 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24876 (vect_transform_slp_perm_load): Likewise.
24877 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24878 (vectorizable_bswap): Likewise.
24879 (vect_gen_perm_mask_checked): Likewise.
24880 * fold-const.c (fold_ternary_loc): Likewise. Don't take
24881 implementations of variable permutation vectors into account
24882 when deciding which selector to use.
24883 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
24884 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
24885 with a false third argument.
24886 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
24887 to test whether the constant selector is valid and can_vec_perm_var_p
24888 to test whether a variable selector is valid.
24890 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24892 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
24893 * optabs-query.c (can_vec_perm_p): Likewise.
24894 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
24895 instead of vec_perm_indices.
24896 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
24897 (vect_gen_perm_mask_checked): Likewise,
24898 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
24899 (vect_gen_perm_mask_checked): Likewise,
24901 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24903 * optabs-query.h (qimode_for_vec_perm): Declare.
24904 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
24905 (qimode_for_vec_perm): ...this new function.
24906 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
24908 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24910 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
24911 does not have a conditional at the top.
24913 2018-01-02 Richard Biener <rguenther@suse.de>
24915 * ipa-inline.c (big_speedup_p): Fix expression.
24917 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24920 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
24923 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24927 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24928 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24929 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
24930 cond_taken_branch_cost 3->4.
24932 2018-01-01 Jakub Jelinek <jakub@redhat.com>
24934 PR tree-optimization/83581
24935 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
24936 TODO_cleanup_cfg if any changes have been made.
24938 PR middle-end/83608
24939 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
24940 convert_modes if target mode has the right side, but different mode
24943 PR middle-end/83609
24944 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
24945 last argument when extracting from CONCAT. If either from_real or
24946 from_imag is NULL, use expansion through memory. If result is not
24947 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
24948 the parts directly to inner mode, if even that fails, use expansion
24951 PR middle-end/83623
24952 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
24953 check for bswap in mode rather than HImode and use that in expand_unop
24956 Copyright (C) 2018 Free Software Foundation, Inc.
24958 Copying and distribution of this file, with or without modification,
24959 are permitted in any medium without royalty provided the copyright
24960 notice and this notice are preserved.