1 2018-09-04 Jakub Jelinek <jakub@redhat.com>
4 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
5 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
6 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
7 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
8 and OPTION_MASK_ISA_XSAVEC_UNSET.
10 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
12 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
13 XOR operations in NAND case.
15 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
17 * wide-int-range.cc (wide_int_range_convert): New.
18 * wide-int-range.h (wide_int_range_convert): New.
19 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
20 code into wide_int_range_convert.
21 (extract_range_into_wide_ints): Do not munge anti range constants
22 into the entire domain. Just return the range back.
24 2018-09-04 Martin Liska <mliska@suse.cz>
26 * genmatch.c (output_line_directive): Add new argument
28 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
30 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
32 * doc/invoke.texi (Option Summary): Add whitespace.
34 * doc/invoke.texi (Option Summary): Add -Waligned-new.
36 2018-09-04 Richard Biener <rguenther@suse.de>
38 PR tree-optimization/87211
39 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
40 backedge value we're supposed to treat as VARYING also number
41 the PHI to VARYING in case it got a different value-number already.
43 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
45 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
46 (extract_range_from_binary_expr_1): Do not call
47 vrp_can_optimize_bit_op.
48 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
50 (wide_int_range_get_mask_and_bounds): New.
51 (wide_int_range_optimize_bit_op): New.
52 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
53 (wide_int_range_bit_and): Same.
54 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
55 (wide_int_range_optimize_bit_op): New.
56 (wide_int_range_get_mask_and_bounds): New.
58 2018-09-04 Richard Biener <rguenther@suse.de>
60 PR tree-optimization/87176
61 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
62 variable. When value-numbering a virtual PHI node make sure
63 to not value-number to the backedge value.
65 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
67 * doc/extend.texi (Long Long, Hex Floats): Document support for
68 long long and hex floats in more recent versions of ISO C++.
70 2018-09-03 Richard Biener <rguenther@suse.de>
72 PR tree-optimization/87177
73 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
76 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
78 * bb-reorder.c (edge_order): Convert to C-qsort-style
80 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
82 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
84 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
86 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
88 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
90 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
91 (mergesort): ... here as maximum count for using netsort.
92 (gcc_qsort): Set nlim to 3 if stable sort is requested.
93 (gcc_stablesort): New.
94 * system.h (gcc_stablesort): Declare.
96 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
98 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
99 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
100 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
102 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
104 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
105 lxsdx and stxsdx alternatives.
106 (*mov<mode>_hardfloat64): Ditto.
107 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
109 2018-09-03 Richard Biener <rguenther@suse.de>
111 PR tree-optimization/87200
112 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
115 2018-09-03 Martin Liska <mliska@suse.cz>
117 PR tree-optimization/87201
118 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
119 Fix parenthesis in an expression.
121 2018-09-03 Richard Biener <rguenther@suse.de>
123 PR tree-optimization/87197
124 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
125 visited. CSE the VN_INFO hashtable lookup.
127 PR tree-optimization/87169
128 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
129 iterating make sure there's no extra backedges from irreducible
130 regions feeding the header. Mark the destination block
133 2018-09-03 Martin Liska <mliska@suse.cz>
136 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
137 * common/common-targhooks.c (default_get_valid_option_values):
139 * common/common-targhooks.h (default_get_valid_option_values):
141 * common/config/i386/i386-common.c: Move processor_target_table
143 (ix86_get_valid_option_values): New function.
144 (TARGET_GET_VALID_OPTION_VALUES): New macro.
145 * config/i386/i386.c (struct ptt): Move to i386-common.c.
146 (PTA_*): Move all defined masks into i386-common.c.
147 (ix86_function_specific_restore): Use new processor_cost_table.
148 * config/i386/i386.h (struct ptt): Moved from i386.c.
149 (struct pta): Likewise.
150 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
151 * doc/tm.texi.in: Likewise.
152 * opt-suggestions.c (option_proposer::suggest_option):
153 Pass prefix to build_option_suggestions.
154 (option_proposer::get_completions): Likewise.
155 (option_proposer::build_option_suggestions): Use the new target
157 * opts.c (struct option_help_tuple): New struct.
158 (print_filtered_help): Use the new target hook.
160 2018-09-03 Martin Liska <mliska@suse.cz>
163 * predict.c (set_even_probabilities): Add likely_edges
164 argument and handle cases where we have precisely one
166 (combine_predictions_for_bb): Catch also likely_edges.
167 (tree_predict_by_opcode): Handle gswitch statements.
168 * tree-cfg.h (find_case_label_for_value): New declaration.
169 (find_taken_edge_switch_expr): Likewise.
170 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
171 Find pivot in decision tree based on probabily, not by number of
174 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
176 * doc/standards.texi (Standards): Update Objective-C reference.
178 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
180 * doc/install.texi (Prerequisites): Update link for MPC.
182 2018-09-01 Michael Matz <matz@suse.de>
184 PR tree-optimization/87074
185 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
186 PHIs for outer-loop uses.
188 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
190 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
191 * doc/invoke.texi (C Dialect Options): Ditto.
193 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
195 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
197 2018-08-31 Richard Biener <rguenther@suse.de>
199 PR tree-optimization/87168
200 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
201 (rpo_elim::eliminate_avail): When OP was not visited it must
204 2018-08-31 David Malcolm <dmalcolm@redhat.com>
206 * tree-vrp.c (copy_value_range): Convert param "from" from
207 "value_range *" to "const value_range *".
208 (range_is_null): Likewise for param "vr".
209 (range_int_cst_p): Likewise.
210 (range_int_cst_singleton_p): Likewise.
211 (symbolic_range_p): Likewise.
212 (value_ranges_intersect_p): Likewise for both params.
213 (value_range_nonnegative_p): Likewise for param "vr".
214 (value_range_constant_singleton): Likewise.
215 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
216 (extract_range_into_wide_ints): Likewise for param "vr".
217 (extract_range_from_multiplicative_op): Likewise for params "vr0"
219 (vrp_can_optimize_bit_op): Likewise.
220 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
222 (extract_range_from_unary_expr): Likewise.
223 (debug_value_range): Likewise for param "vr".
224 (value_range::dump): Add "const" qualifier.
225 (vrp_prop::check_array_ref): Convert local "vr" from
226 "value_range *" to "const value_range *".
227 (vrp_prop::check_mem_ref): Likewise.
228 (vrp_prop::visit_stmt): Likewise for local "old_vr".
229 (vrp_intersect_ranges_1): Likewise for param "vr_1".
230 (vrp_intersect_ranges): Likewise.
231 (simplify_stmt_for_jump_threading): Likewise for local "vr".
232 (vrp_prop::vrp_finalize): Likewise.
233 * tree-vrp.h (value_range::dump): Add "const" qualifier.
234 (vrp_intersect_ranges): Add "const" qualifier to params as above.
235 (extract_range_from_unary_expr): Likewise.
236 (value_range_constant_singleton): Likewise.
237 (symbolic_range_p): Likewise.
238 (copy_value_range): Likewise.
239 (extract_range_from_binary_expr_1): Likewise.
240 (range_int_cst_p): Likewise.
241 (vrp_set_zero_nonzero_bits): Likewise.
242 (range_int_cst_singleton_p): Likewise.
244 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
246 * config/aarch64/arm_neon.h (vabsd_s64): New.
247 (vnegd_s64): Likewise.
249 2018-08-31 Martin Jambor <mjambor@suse.cz>
251 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
253 2018-08-31 Martin Liska <mliska@suse.cz>
255 * ipa-icf.c (sem_item::add_type): Use
256 sem_item::m_type_hash_cache.
257 * ipa-icf.h: Move the cache from sem_item_optimizer
260 2018-08-31 Nathan Sidwell <nathan@acm.org>
262 * doc/extend.texi (Backwards Compatibility): Remove implicit
263 extern C leeway of () being (...).
265 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
267 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
269 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
273 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
275 2018-08-31 Jakub Jelinek <jakub@redhat.com>
278 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
279 gen_int_mode. Formatting fixes.
281 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
283 * target.def (custom_function_descriptors): Improve documentation.
284 * doc/tm.texi.in (Trampolines): Expand discussion of function
285 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
286 beginning of the section.
287 * doc/tm.texi: Regenerated.
289 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
291 * cfg.h (class auto_edge_flag): Spell out the template-id of the
292 base class in the initializer list. This is a workaround for
293 building with older GCC.
294 (class auto_bb_flag): Likewise.
296 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
298 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
299 (altivec_vcmpequ<VI_char>_p): Remove star.
300 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
302 (expand_strncmp_vec_sequence): New function.
303 (emit_final_str_compare_vec): New function.
304 (expand_strn_compare): Add support for vector strncmp.
305 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
306 length specification to bytes.
307 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
308 (vcmpnezb_p): New pattern.
309 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
310 for option -mstring-compare-inline-limit.
312 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
314 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
315 (PTA_SKYLAKE): Add PTA_AES.
316 (PTA_GOLDMONT): Likewise.
318 2018-08-29 Jan Hubicka <jh@suse.cz>
321 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
322 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
324 2018-08-29 Jan Hubicka <jh@suse.cz>
326 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
328 (hash_tree): Do not visit TYPE_STUB_DECL.
329 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
330 stream TYPE_STUB_DECL.
331 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
332 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
333 after free_lang_data.
334 (type_in_anonymous_namespace_p): Likewise.
336 2018-08-29 Jan Hubicka <jh@suse.cz>
338 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
339 comment that it has to be even number.
340 (class sreal): Change m_sig type to int32_t.
341 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
342 int64_t for temporary calculations.
343 (sreal_verify_basics): Drop one bit from minimum and maximum.
345 2018-08-30 Richard Biener <rguenther@suse.de>
347 PR tree-optimization/87147
348 * tree-ssa-sccvn.c (SSA_VISITED): New function.
349 (visit_phi): When the degenerate result is from the backedge and
350 we didn't visit its definition yet drop to VARYING.
351 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
353 2018-08-29 Jan Hubicka <jh@suse.cz>
355 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
357 (hash_tree): Likewise.
359 2018-08-29 Jan Hubicka <jh@suse.cz>
361 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
362 and TYPE_NEXT_REF_TO.
364 2018-08-29 Jan Hubicka <jh@suse.cz>
366 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
367 comment that it has to be even number.
368 (class sreal): Change m_sig type to int32_t.
369 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
370 int64_t for temporary calculations.
371 (sreal_verify_basics): Drop one bit from minimum and maximum.
373 2018-08-30 Tamar Christina <tamar.christina@arm.com>
375 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
377 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
380 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
381 if to_add is negative.
383 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
386 * builtins.c (c_strlen): Improve range checks.
388 2018-08-29 Martin Sebor <msebor@redhat.com>
389 Jeff Law <law@redhat.com>
391 PR tree-optimization/86714
392 PR tree-optimization/86711
393 * builtins.c (c_strlen): Add arguments to call to string_constant.
394 * expr.c (string_constant): Add argument. Detect missing nul
395 terminator and outermost declaration it's missing in.
396 * expr.h (string_constant): Add argument.
397 * fold-const.c (read_from_constant_string): Add arguments to call to
399 (c_getstr): Likewise.
400 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
402 * tree-ssa-strlen.c (get_stridx): Likewise.
404 2018-08-29 Jan Hubicka <jh@suse.cz>
406 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
407 Do not stream DECL_VINDEX.
408 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
409 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
410 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
412 2018-08-29 Richard Biener <rguenther@suse.de>
414 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
415 virtual operands that are not default defs to honor region
417 (rpo_vn_valueize): Remove ineffective code here.
419 2018-08-29 Richard Biener <rguenther@suse.de>
421 PR tree-optimization/87132
422 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
423 when skipping defs reachable over backedges.
425 2018-08-29 Richard Biener <rguenther@suse.de>
427 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
428 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
429 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
430 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
431 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
432 (vn_reference_lookup_3): Remove use of const_parms.
433 (free_rpo_vn): Do not free const_parms.
434 (do_rpo_vn): Do not call init_const_parms.
435 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
436 SSA_NAME_POINTS_TO_READONLY_MEMORY.
437 (call_may_clobber_ref_p_1): Likewise.
439 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
442 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
444 (-ftree-scev-cprop): Document.
446 2018-08-29 Jan Hubicka <jh@suse.cz>
448 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
450 (sreal constructor): Update.
451 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
452 sreal:operator/): Update.
454 2018-08-29 Martin Liska <mliska@suse.cz>
456 * tree-switch-conversion.c (switch_conversion::expand):
457 Strenghten assumption about gswitch statements.
459 2018-08-29 Richard Biener <rguenther@suse.de>
461 PR tree-optimization/87117
462 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
463 re-value-number released SSA VDEFs.
465 2018-08-29 Richard Biener <rguenther@suse.de>
467 PR tree-optimization/87126
468 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
470 2018-08-28 Jim Wilson <jimw@sifive.com>
472 * config/riscv/pic.md: Rewrite.
473 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
475 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
476 (SOFTF, default_load, softload, softstore): New.
478 2018-08-28 Jeff Law <law@redhat.com>
480 * fold-const.c (fold_binary_loc): Remove recently added assert.
482 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
484 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
485 to OP parmeter of generated function.
487 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
489 PR tree-optimization/87009
490 * match.pd: Add boolean optimizations.
492 2018-08-28 Martin Sebor <msebor@redhat.com>
495 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
496 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
497 (pass_walloca::gate): Use it.
498 (alloca_call_type): Same.
499 (pass_walloca::execute): Same.
500 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
502 2018-08-28 David Malcolm <dmalcolm@redhat.com>
504 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
505 GCC_VERSION for usage of "__gcc_dump_printf__" format from
508 2018-08-28 Richard Biener <rguenther@suse.de>
510 PR tree-optimization/87124
511 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
512 constants before looking up avail.
514 2018-08-28 Jakub Jelinek <jakub@redhat.com>
517 * calls.c (maybe_warn_nonstring_arg): Punt early if
518 warn_stringop_overflow is zero. Don't call get_range_strlen
519 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
520 Swap comparison operands to have constants on rhs. Only use
521 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
524 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
526 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
527 use of tree_to_shwi. Remove duplicated test for the size being
528 a whole number of bytes.
530 2018-08-28 Richard Biener <rguenther@suse.de>
532 PR tree-optimization/87117
533 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
534 Handle removed stmt without LHS (GIMPLE_NOP).
536 2018-08-28 Richard Biener <rguenther@suse.de>
538 PR tree-optimization/87117
539 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
540 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
542 2018-08-28 Richard Biener <rguenther@suse.de>
544 PR tree-optimization/87117
545 * tree-ssa-pre.c (compute_avail): Do not make expressions
546 with predicated values available.
547 (get_expr_value_id): Assert we do not run into predicated value
550 2018-08-28 Richard Biener <rguenther@suse.de>
552 PR tree-optimization/87117
553 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
554 get virtual operands.
555 (get_expr_operands): Handle STRING_CST like other decls.
557 2018-08-28 Martin Liska <mliska@suse.cz>
559 * tree.h: Update documentation of fndecl_built_in_p
563 2018-08-27 Jeff Law <law@redhat.com>
564 PR tree-optimization/87110
565 * tree-ssa-dse.c (compute_trims): Handle non-constant
568 2018-08-27 Martin Sebor <msebor@redhat.com>
570 PR tree-optimization/86914
571 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
573 2018-08-27 Martin Sebor <msebor@redhat.com>
575 PR tree-optimization/87112
576 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
577 the type of the bound argument.
579 2018-08-27 Jeff Law <law@redhat.com>
581 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
582 type does not have a TYPE_SIZE_UNIT.
584 2018-08-27 Steve Ellcey <sellcey@cavium.com>
586 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
587 with include of backend.h.
589 2018-08-27 Richard Biener <rguenther@suse.de>
591 PR tree-optimization/86927
592 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
593 use const cond reduction code.
595 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
597 PR tree-optimization/85758
598 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
600 2018-08-27 David Malcolm <dmalcolm@redhat.com>
603 * diagnostic-show-locus.c (class layout_range): Update for
604 conversion of show_caret_p to a tri-state.
605 (layout_range::layout_range): Likewise.
606 (make_range): Likewise.
607 (layout::maybe_add_location_range): Likewise.
608 (layout::should_print_annotation_line_p): Don't show annotation
609 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
610 (layout::get_state_at_point): Update for conversion of
611 show_caret_p to a tri-state. Bail out early for
612 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
613 underlining or source colorization.
614 (gcc_rich_location::add_location_if_nearby): Update for conversion
615 of show_caret_p to a tri-state.
616 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
617 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
619 (selftest::test_one_liner_labels): Likewise.
620 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
621 conversion of show_caret_p to a tri-state.
622 * pretty-print.c (text_info::set_location): Likewise.
623 * pretty-print.h (text_info::set_location): Likewise.
624 * substring-locations.c (format_warning_n_va): Likewise.
625 * tree-diagnostic.c (default_tree_printer): Likewise.
626 * tree-pretty-print.c (newline_and_indent): Likewise.
628 2018-08-27 David Malcolm <dmalcolm@redhat.com>
631 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
632 line above for line-insertion fix-it hints.
633 (selftest::test_fixit_insert_containing_newline): Update the
634 expected results, and add a test with line-numbering enabled.
636 2018-08-27 Martin Liska <mliska@suse.cz>
639 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
640 params with DECL_HAS_VALUE_EXPR_P.
642 2018-08-27 Martin Liska <mliska@suse.cz>
644 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
645 selected expansion strategy.
647 2018-08-27 Martin Liska <mliska@suse.cz>
649 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
650 * builtins.c (is_builtin_fn): Likewise.
651 * attribs.c (diag_attr_exclusions): Use new function
652 fndecl_built_in_p and remove check for FUNCTION_DECL if
654 (builtin_mathfn_code): Likewise.
655 (fold_builtin_expect): Likewise.
656 (fold_call_expr): Likewise.
657 (fold_builtin_call_array): Likewise.
658 (fold_call_stmt): Likewise.
659 (set_builtin_user_assembler_name): Likewise.
660 (is_simple_builtin): Likewise.
661 * calls.c (gimple_alloca_call_p): Likewise.
662 (maybe_warn_nonstring_arg): Likewise.
663 * cfgexpand.c (expand_call_stmt): Likewise.
664 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
665 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
666 (cgraph_node::verify_node): Likewise.
667 * cgraphclones.c (build_function_decl_skip_args): Likewise.
668 (cgraph_node::create_clone): Likewise.
669 * config/arm/arm.c (arm_insert_attributes): Likewise.
670 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
671 * dse.c (scan_insn): Likewise.
672 * expr.c (expand_expr_real_1): Likewise.
673 * fold-const.c (operand_equal_p): Likewise.
674 (fold_binary_loc): Likewise.
675 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
676 * gimple-low.c (lower_stmt): Likewise.
677 * gimple-pretty-print.c (dump_gimple_call): Likewise.
678 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
679 * gimple.c (gimple_build_call_from_tree): Likewise.
680 (gimple_call_builtin_p): Likewise.
681 (gimple_call_combined_fn): Likewise.
682 * gimplify.c (gimplify_call_expr): Likewise.
683 (gimple_boolify): Likewise.
684 (gimplify_modify_expr): Likewise.
685 (gimplify_addr_expr): Likewise.
686 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
687 * ipa-cp.c (determine_versionability): Likewise.
688 * ipa-fnsummary.c (compute_fn_summary): Likewise.
689 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
690 * ipa-split.c (visit_bb): Likewise.
691 (split_function): Likewise.
692 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
693 * lto-cgraph.c (input_node): Likewise.
694 * lto-streamer-out.c (write_symbol): Likewise.
695 * omp-low.c (setjmp_or_longjmp_p): Likewise.
696 (lower_omp_1): Likewise.
697 * predict.c (strip_predict_hints): Likewise.
698 * print-tree.c (print_node): Likewise.
699 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
700 * trans-mem.c (is_tm_irrevocable): Likewise.
701 (is_tm_load): Likewise.
702 (is_tm_simple_load): Likewise.
703 (is_tm_store): Likewise.
704 (is_tm_simple_store): Likewise.
705 (is_tm_abort): Likewise.
706 (tm_region_init_1): Likewise.
707 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
708 * tree-cfg.c (verify_gimple_call): Likewise.
709 (move_stmt_r): Likewise.
710 (stmt_can_terminate_bb_p): Likewise.
711 * tree-eh.c (lower_eh_constructs_2): Likewise.
712 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
713 * tree-inline.c (remap_gimple_stmt): Likewise.
715 (estimate_num_insns): Likewise.
716 (fold_marked_statements): Likewise.
717 * tree-sra.c (scan_function): Likewise.
718 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
719 (optimize_stack_restore): Likewise.
720 (pass_fold_builtins::execute): Likewise.
721 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
722 (mark_all_reaching_defs_necessary_1): Likewise.
723 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
724 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
725 (pass_forwprop::execute): Likewise.
726 * tree-ssa-loop-im.c (stmt_cost): Likewise.
727 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
728 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
729 * tree-ssa-strlen.c (get_string_length): Likewise.
730 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
731 (find_func_aliases_for_call): Likewise.
732 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
733 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
734 * tree-tailcall.c (find_tail_calls): Likewise.
735 * tree.c (need_assembler_name_p): Likewise.
736 (free_lang_data_in_decl): Likewise.
737 (get_call_combined_fn): Likewise.
738 * ubsan.c (is_ubsan_builtin_p): Likewise.
739 * varasm.c (incorporeal_function_p): Likewise.
740 * tree.h (DECL_BUILT_IN): Remove and replace with
742 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
743 (fndecl_built_in_p): New.
745 2018-08-27 Martin Liska <mliska@suse.cz>
747 PR tree-optimization/86847
748 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
749 Dump also subtree probability.
750 (switch_decision_tree::do_jump_if_equal): New function.
751 (switch_decision_tree::emit_case_nodes): Handle special
752 situations in balanced tree that can be emitted much simpler.
753 Fix calculation of probabilities that happen in tree expansion.
754 * tree-switch-conversion.h (struct cluster): Add
756 (struct simple_cluster): Likewise.
757 (struct case_tree_node): Add new function has_child.
758 (do_jump_if_equal): New.
760 2018-08-27 Martin Liska <mliska@suse.cz>
762 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
763 Add new argument to bit_test_cluster constructor.
764 (bit_test_cluster::emit): Set bits really number of values
766 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
767 probability argument.
768 * tree-switch-conversion.h (struct bit_test_cluster):
769 Add m_handles_entire_switch.
771 2018-08-27 Martin Liska <mliska@suse.cz>
773 PR tree-optimization/86702
774 * tree-switch-conversion.c (jump_table_cluster::emit):
775 Make probabilities even for values in jump table
776 according to number of cases handled.
777 (switch_decision_tree::compute_cases_per_edge): Pass
778 argument to reset_out_edges_aux function.
779 (switch_decision_tree::analyze_switch_statement): Likewise.
780 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
783 2018-08-27 Martin Liska <mliska@suse.cz>
785 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
786 cfun argument explicitly.
787 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
788 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
789 function gimple_switch_default_bb.
790 (convert_switch_statements):
792 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
793 * stmt.c (label_to_block_fn): Use label_to_block and pass
794 cfun argument explicitly and use gimple_switch_label_bb.
795 (expand_case): Likewise.
796 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
797 cfun argument explicitly. Likewise.
798 (make_edges_bb): Likewise.
799 (make_cond_expr_edges): Likewise.
800 (get_cases_for_edge): Likewise.
801 (make_gimple_switch_edges): Likewise.
802 (label_to_block_fn): Likewise.
803 (label_to_block): Likewise.
804 (make_goto_expr_edges): Likewise.
805 (make_gimple_asm_edges): Likewise.
806 (main_block_label): Likewise.
807 (group_case_labels_stmt): Likewise.
808 (find_taken_edge_computed_goto): Likewise.
809 (find_taken_edge_switch_expr): Likewise.
810 (gimple_verify_flow_info): Likewise.
811 (gimple_redirect_edge_and_branch): Likewise.
812 (gimple_switch_label_bb): New function.
813 (gimple_switch_default_bb): Likewise.
814 (gimple_switch_edge): Likewise.
815 (gimple_switch_default_edge): Likewise.
816 * tree-cfg.h (label_to_block_fn): Remove and replace ...
817 (label_to_block): ... with this.
818 (gimple_switch_label_bb): New.
819 (gimple_switch_default_bb): Likewise.
820 (gimple_switch_edge): Likewise.
821 (gimple_switch_default_edge): Likewise.
822 * tree-cfgcleanup.c (convert_single_case_switch): Use
823 new gimple functions and pass new argument to label_to_block.
824 (cleanup_control_flow_bb):
825 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
826 cfun argument explicitly.
827 (make_eh_edges): Likewise.
828 (redirect_eh_dispatch_edge): Likewise.
829 (lower_resx): Likewise.
830 (lower_eh_dispatch): Likewise.
831 (maybe_remove_unreachable_handlers): Likewise.
832 (unsplit_eh): Likewise.
833 (cleanup_empty_eh): Likewise.
834 (verify_eh_edges): Likewise.
835 (verify_eh_dispatch_edge): Likewise.
836 * tree-ssa-dom.c (record_edge_info): Likewise.
837 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
838 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
839 (thread_through_normal_block): Likewise.
840 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
841 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
842 * tree-switch-conversion.c (switch_conversion::collect): Use new
844 (switch_conversion::check_final_bb): Likewise.
845 (switch_conversion::gather_default_values): Pass new argument
847 (switch_conversion::build_constructors): Likewise.
848 (switch_decision_tree::compute_cases_per_edge): Use new
849 gimple_switch_edge function.
850 (switch_decision_tree::analyze_switch_statement): Pass new argument
852 (switch_decision_tree::try_switch_expansion): Use
853 gimple_switch_default_edge.
854 * tree-vrp.c (find_switch_asserts): Pass new argument
856 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
857 (vr_values::simplify_switch_using_ranges): Likewise.
859 2018-08-27 Richard Biener <rguenther@suse.de>
861 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
862 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
864 * tree-ssa-sccvn.h (struct vn_pval): New structure.
865 (struct vn_nary_op_s): Add unwind_to member. Add
866 predicated_values flag and put result into a union together
867 with a linked list of vn_pval.
868 (struct vn_ssa_aux): Add name member to make maintaining
869 a map of SSA name to vn_ssa_aux possible. Remove no longer
870 needed info, dfsnum, low, visited, on_sccstack, use_processed
871 and range_info_anti_range_p members.
872 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
873 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
875 (vn_valueize): New global.
876 (vn_context_bb): Likewise.
877 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
878 VN_INFO_PTR_INFO): Remove.
879 * tree-ssa-sccvn.c: ... (rewrite)
880 (pass_fre::execute): For -O2+ initialize loops and run
881 RPO VN in optimistic mode (iterating). For -O1 and -Og
882 run RPO VN in non-optimistic mode.
883 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
884 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
885 * doc/invoke.texi (sccvn-max-scc-size): Remove.
886 (rpo-vn-max-loop-depth): Document.
887 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
888 when valuezing the VUSE signals we walked out of the region.
889 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
890 (phi_translate): Set VN context block to use for availability
892 (compute_avail): Likewise.
893 (pre_valueize): New function.
894 (pass_pre::execute): Adjust to the RPO VN API.
896 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
897 (propagate_constants_for_unrolling): Remove.
898 (tree_unroll_loops_completely): Perform value-numbering
899 on the unrolled bodies loop parent.
901 2018-08-27 Richard Biener <rguenther@suse.de>
903 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
904 for partial antic compute.
906 2018-08-27 Jakub Jelinek <jakub@redhat.com>
908 PR rtl-optimization/87065
909 * combine.c (simplify_if_then_else): Formatting fix.
910 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
912 (known_cond): Don't return const_true_rtx for vector modes. Use
913 CONST0_RTX instead of const0_rtx. Formatting fixes.
915 2018-08-27 Martin Liska <mliska@suse.cz>
917 PR gcov-profile/87069
918 * gcov.c (process_file): Record files already processed
919 and warn about a file being processed multiple times.
921 2018-08-27 Martin Liska <mliska@suse.cz>
924 * config/aarch64/aarch64.c (aarch64_override_options_internal):
925 Set default values for x_aarch64_*_string strings.
926 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
927 prefix. For -mabi do not print '=ABI' in help and use
928 <option_value> format for -msve-vector-bits and -moverride
931 2018-08-26 Jeff Law <law@redhat.com>
933 * config/mips/frame-header-opt.c: Include "backend.h" rather than
936 2018-08-26 Marek Polacek <polacek@redhat.com>
938 PR c++/87029, Implement -Wredundant-move.
939 * doc/invoke.texi: Document -Wredundant-move.
941 2018-08-25 Martin Sebor <msebor@redhat.com>
943 PR tree-optimization/87059
944 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
945 to the same type as the other.
946 * fold-const.c (fold_binary_loc): Assert expectation.
948 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
950 * config/darwin.c (machopic_legitimize_pic_address): Clean up
951 extraneous parentheses, dead code section and formatting.
953 2018-08-24 David Malcolm <dmalcolm@redhat.com>
956 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
957 wide enough for jumps in the line-numbering to be visible.
958 (layout::print_gap_in_line_numbering): New member function.
959 (layout::calculate_line_spans): When using line numbering, merge
960 line spans that are only 1 line apart.
961 (diagnostic_show_locus): When printing line numbers, show gaps in
962 line numbering directly, rather than printing headers.
963 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
964 line-numbering with multiple line spans.
965 (selftest::test_fixit_insert_containing_newline_2): Add test of
966 line-numbering, in which the spans are close enough to be merged.
968 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
970 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
971 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
972 * tree-vrp.c (range_is_nonnull): Remove.
973 (range_includes_zero_p): Accept value_range instead of min/max.
974 (extract_range_from_binary_expr_1): Do not early bail on
976 Use range_includes_zero_p instead of range_is_nonnull.
977 (extract_range_from_unary_expr): Use range_includes_zero_p instead
979 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
980 special case VR_ANTI_RANGE.
981 (vrp_finalize): Same.
982 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
984 (range_is_nonnull): Remove.
985 * vr-values.c (vrp_stmt_computes_nonzero): Use
986 range_includes_zero_p instead of range_is_nonnull.
987 (extract_range_basic): Pass value_range to range_includes_zero_p
988 instead of range_is_nonnull.
990 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
992 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
993 * emit-rtl.h (rtl_data): Remove return_bnd.
994 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
995 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
996 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
997 (POINTER_BOUNDS_MODE): Remove definition.
998 (make_pointer_bounds_mode): Remove.
999 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1000 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1001 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1002 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1003 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1004 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1005 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1007 * config/i386/i386-modes.def (BND32, BND64): Remove.
1008 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1009 (dbx64_register_map): Ditto.
1010 (svr4_dbx_register_map): Ditto.
1011 (indirect_thunk_bnd_needed): Remove.
1012 (indirect_thunks_bnd_used): Ditto.
1013 (indirect_return_bnd_needed): Ditto.
1014 (indirect_return_via_cx_bnd): Ditto.
1015 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1016 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1017 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1018 (output_indirect_thunk_function): Remove handling of
1019 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1020 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1021 (ix86_save_reg): Remove handling of crtl->return_bnd.
1022 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1023 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1024 and UNSPEC_BNDLX_ADDR.
1025 (ix86_output_indirect_branch_via_reg): Remove handling of
1026 indirect_thunk_prefix_bnd.
1027 (ix86_output_indirect_branch_via_push): Ditto.
1028 (ix86_output_function_return): Ditto.
1029 (ix86_output_indirect_function_return): Ditto.
1030 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1031 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1032 (CALL_USED_REGISTERS): Ditto.
1033 (REG_ALLOC_ORDER): Update for removal of bound registers.
1034 (HI_REGISTER_NAMES): Ditto.
1035 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1036 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1037 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1038 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1039 (FIRST_PSEUDO_REG): Update.
1040 (BND): Remove mode iterator.
1041 * config/i386/predicates.md (bnd_mem_operator): Remove.
1043 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1045 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1048 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1050 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1051 the case in which the permute needs only a single element and
1052 repeats for every vector of the result. Extend that case to
1053 handle variable-length vectors.
1054 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1056 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1059 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1060 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1062 2018-08-24 Richard Biener <rguenther@suse.de>
1064 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1065 bb_flags_allocated members.
1066 (auto_flag): New RAII class for allocating flags.
1067 (auto_edge_flag): New RAII class for allocating edge flags.
1068 (auto_bb_flag): New RAII class for allocating bb flags.
1069 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1071 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1072 in favor of temporarily allocated BB flag.
1073 * hsa-brig.c: Re-order includes.
1074 * hsa-dump.c: Likewise.
1075 * hsa-regalloc.c: Likewise.
1076 * print-rtl.c: Likewise.
1077 * profile-count.c: Likewise.
1079 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1082 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1085 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1088 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1089 from wide_int_range_multiplicative_op.
1091 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1093 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1096 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1098 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1101 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1103 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1104 full GENERIC expression used for replacement.
1106 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1108 * tree-vrp.c (abs_extent_range): Remove.
1109 (extract_range_into_wide_ints): Pass wide ints by reference.
1110 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1111 Pass wide ints by reference in all calls to
1112 extract_range_into_wide_ints.
1113 * wide-int-range.cc (wide_int_range_div): New.
1114 * wide-int-range.h (wide_int_range_div): New.
1115 (wide_int_range_includes_zero_p): New.
1116 (wide_int_range_zero_p): New.
1118 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1120 * config/aarch64/aarch64.md (arches): New enum.
1121 (arch): New enum attr.
1122 (arch_enabled): New attr.
1123 (enabled): Now uses arch_enabled only.
1124 (simd, sve, fp16): Removed attribute.
1125 (fp): Attr now defined in terms of 'arch'.
1126 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1127 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1128 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1129 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1130 attributes into 'arch'.
1131 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1132 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1133 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1134 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1135 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1136 'simd' attribute into 'arch'.
1137 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1138 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1139 Convert use of 'fp' attribute to 'arch'.
1140 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1141 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1143 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1144 (different modes) Merge 'fp' and 'simd' into 'arch'.
1145 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1148 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1150 PR rtl-optimization/87026
1151 * expmed.c (canonicalize_comparison): If we can no longer create
1152 pseudoregisters, don't.
1154 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1157 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1159 * config/arm/arm.c (speculation_barrier_libfunc): New static
1161 (arm_init_libfuncs): Initialize it.
1162 (arm_emit_speculation_barrier): New function.
1163 * config/arm/arm.md (speculation_barrier): Call
1164 arm_emit_speculation_barrier for architectures that do not have
1166 (speculation_barrier_insn): Only match on Armv7 or later.
1168 2018-08-23 Richard Biener <rguenther@suse.de>
1171 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1174 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1176 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1177 of single-vector TBLs.
1178 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1181 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1184 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1185 aarch64_evpc_tbl guard.
1187 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1189 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1192 2018-08-22 Martin Sebor <msebor@redhat.com>
1195 * tree-pretty-print.c (pretty_print_string): Add argument.
1196 (dump_generic_node): Call to pretty_print_string with string size.
1198 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1200 PR rtl-optimization/86771
1201 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1202 of two SETs into those two SETs, one to be placed at i2, if that SETs
1203 destination is modified between i2 and i3.
1205 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1207 PR tree-optimization/86725
1208 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1210 (vect_analyze_scalar_cycles_1): Check it.
1212 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1214 PR tree-optimization/86725
1215 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1216 an outer loop phi as a double reduction, make sure that the
1217 single user of the phi result is an inner loop phi.
1219 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1221 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1222 grouped stores with gaps to a strided group.
1224 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1226 * tree-vect-stmts.c (get_group_load_store_type)
1227 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1228 first statement in a group.
1230 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1232 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1233 the sequence used in gcc/gcc.c.
1235 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1238 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1241 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1243 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1244 Darwin10-specific unwinder-shim.
1245 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1246 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1247 New to cater for Darwin10 Rosetta.
1249 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1251 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1252 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1254 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1259 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1260 (dwarf2out_switch_text_section): Generate a local label for the
1261 second function sub-section and apply it as the second FDE start
1263 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1264 second sub-section start.
1266 2018-08-22 Richard Biener <rguenther@suse.de>
1268 PR tree-optimization/86988
1269 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1271 2018-08-22 Richard Biener <rguenther@suse.de>
1273 PR tree-optimization/86945
1274 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1276 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1278 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1279 a comment about how uses of r2 for .sdata2 come about.
1281 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1283 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1285 2018-08-21 Marek Polacek <polacek@redhat.com>
1287 PR c++/86981, Implement -Wpessimizing-move.
1288 * doc/invoke.texi: Document -Wpessimizing-move.
1290 2018-08-21 Jan Hubicka <jh@suse.cz>
1292 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1293 * tree.h (is_redundant_typedef): Remove.
1294 * dwarf2out.c (is_redundant_typedef): Turn into static function.
1296 2018-08-21 Jan Hubicka <jh@suse.cz>
1298 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1301 2018-08-21 Tamar Christina <tamar.christina@arm.com>
1303 * expmed.c (extract_low_bits): Reject invalid subregs early.
1305 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1308 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1311 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1313 * config/vxworks.h: Guard vxworks_asm_out_constructor and
1314 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1315 * config/vxworks.c: Likewise.
1317 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1319 * config/vxworks.c: Set targetm.have_ctors_dtors
1320 if HAVE_INITFINI_ARRAY_SUPPORT.
1321 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1322 if HAVE_INITFINI_ARRAY_SUPPORT.
1324 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1326 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1327 default search path for VxWorks < 7.
1329 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1331 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1332 (get_format_string): Refer to c_getstr.
1334 2018-08-21 Tom de Vries <tdevries@suse.de>
1336 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1337 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1338 (debuginfo_early_stop): Declare.
1339 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1340 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1341 (debuginfo_early_stop): New function.
1342 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1343 and debuginfo_early_stop.
1344 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1345 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1346 (general_init): Call debuginfo_early_init.
1347 (finalize): Call debuginfo_fini.
1348 (do_compile): Call debuginfo_init.
1349 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1351 (@item -fdump-debug, @item -fdump-earlydebug): Add.
1353 2018-08-21 Tom de Vries <tdevries@suse.de>
1355 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1356 flag_dump_noaddr and flag_dump_unnumbered.
1358 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
1360 * wide-int-range.cc (wide_int_range_abs): New.
1361 (wide_int_range_order_set): Rename from wide_int_range_min_max.
1362 * wide-int-range.h (wide_int_range_abs): New.
1363 (wide_int_range_min_max): New.
1364 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1365 case to call wide_int_range_abs.
1366 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1367 (extract_range_from_abs_expr): Delete.
1369 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
1372 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1373 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1376 2018-08-20 Nathan Sidwell <nathan@acm.org>
1377 Jeff Law <law@redhat.com>
1379 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1380 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1382 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1385 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1386 (decl_attributes): Likewise.
1387 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1389 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1390 * diagnostic-core.h (class auto_diagnostic_group): New class.
1391 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1392 (diagnostic_report_diagnostic): Handle the first diagnostics within
1394 (emit_diagnostic): Add auto_diagnostic_group instance.
1396 (inform_n): Likewise.
1397 (warning): Likewise.
1398 (warning_at): Likewise.
1399 (warning_n): Likewise.
1400 (pedwarn): Likewise.
1401 (permerror): Likewise.
1403 (error_n): Likewise.
1404 (error_at): Likewise.
1406 (fatal_error): Likewise.
1407 (internal_error): Likewise.
1408 (internal_error_no_backtrace): Likewise.
1409 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1410 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1411 * diagnostic.h (struct diagnostic_context): Add fields
1412 "diagnostic_group_nesting_depth",
1413 "diagnostic_group_emission_count", "begin_group_cb",
1415 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1416 Add auto_diagnostic_group instance(s).
1417 (find_explicit_erroneous_behavior): Likewise.
1418 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1419 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1420 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1421 (gimplify_va_arg_expr): Likewise.
1422 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1423 (HSA_SORRY_AT): Likewise.
1424 * ipa-devirt.c (compare_virtual_tables): Likewise.
1425 (warn_odr): Likewise.
1426 * multiple_target.c (expand_target_clones): Likewise.
1427 * opts-common.c (cmdline_handle_error): Likewise.
1428 * reginfo.c (globalize_reg): Likewise.
1429 * substring-locations.c (format_warning_n_va): Likewise.
1430 * tree-inline.c (expand_call_inline): Likewise.
1431 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1432 * tree-ssa-loop-niter.c
1433 (do_warn_aggressive_loop_optimizations): Likewise.
1434 * tree-ssa-uninit.c (warn_uninit): Likewise.
1435 * tree.c (warn_deprecated_use): Likewise.
1437 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
1440 * config/i386/i386.md (eh_return): Always update EH return
1441 address in word_mode.
1443 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
1445 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1446 TARGET_SPLIT_COMPLEX_ARG is defined.
1448 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1450 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1452 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1455 * expr.c (expand_assignment): Assert that bitpos is positive.
1456 (store_field): Likewise
1457 (expand_expr_real_1): Make sure that bitpos is positive.
1458 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1461 2018-08-20 Nathan Sidwell <nathan@acm.org>
1463 * Makefile.in (CPP_ID_DATA_H): Delete.
1464 (CPP_INTERNAL_H): Don't add it.
1465 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1466 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1468 2018-08-20 Richard Biener <rguenther@suse.de>
1470 PR tree-optimization/78655
1471 * tree-vrp.c (extract_range_from_binary_expr_1): Make
1472 pointer + offset nonnull if either operand is nonnull work.
1474 2018-08-20 Tom de Vries <tdevries@suse.de>
1476 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1477 unless the referenced die describes the added property using
1478 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1479 Otherwise, add a DW_AT_location to the referenced die.
1481 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1484 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1485 register_operand when calling ix86_set_reg_reg_cost.
1486 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1487 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1488 predicate and to 1 otherwise.
1490 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1492 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1493 emit a diagnostic that it is not supported and reset the option.
1494 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1495 supported and consume the option. (ASM_FINAL_SPEC): New.
1497 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1499 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1502 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
1504 C-SKY port: Documentation
1506 * doc/extend.texi (C-SKY Function Attributes): New section.
1507 * doc/invoke.texi (Option Summary): Add C-SKY options.
1508 (C-SKY Options): New section.
1509 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1511 2018-08-17 Jojo <jijie_rong@c-sky.com>
1512 Huibin Wang <huibin_wang@c-sky.com>
1513 Sandra Loosemore <sandra@codesourcery.com>
1514 Chung-Lin Tang <cltang@codesourcery.com>
1516 C-SKY port: Backend implementation
1518 * config/csky/*: New.
1519 * common/config/csky/*: New.
1521 2018-08-17 Jojo <jijie_rong@c-sky.com>
1522 Huibin Wang <huibin_wang@c-sky.com>
1523 Sandra Loosemore <sandra@codesourcery.com>
1524 Chung-Lin Tang <cltang@codesourcery.com>
1525 Andrew Jenner <andrew@codesourcery.com>
1527 C-SKY port: Configury
1529 * config.gcc (csky-*-*): New.
1530 * configure.ac: Add csky to targets for dwarf2 debug_line support.
1531 * configure: Regenerated.
1533 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1535 * dump-context.h: Include "dumpfile.h".
1536 (dump_context::dump_printf_va): Convert final param from va_list
1537 to va_list *. Convert from ATTRIBUTE_PRINTF to
1538 ATTRIBUTE_GCC_DUMP_PRINTF.
1539 (dump_context::dump_printf_loc_va): Likewise.
1540 * dumpfile.c: Include "stringpool.h".
1541 (make_item_for_dump_printf_va): Delete.
1542 (make_item_for_dump_printf): Delete.
1543 (class dump_pretty_printer): New class.
1544 (dump_pretty_printer::dump_pretty_printer): New ctor.
1545 (dump_pretty_printer::emit_items): New member function.
1546 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1548 (dump_pretty_printer::emit_item): New member function.
1549 (dump_pretty_printer::stash_item): New member function.
1550 (dump_pretty_printer::format_decoder_cb): New member function.
1551 (dump_pretty_printer::decode_format): New member function.
1552 (dump_context::dump_printf_va): Reimplement in terms of
1553 dump_pretty_printer.
1554 (dump_context::dump_printf_loc_va): Convert final param from va_list
1556 (dump_context::begin_scope): Reimplement call to
1557 make_item_for_dump_printf.
1558 (dump_printf): Update for change to dump_printf_va.
1559 (dump_printf_loc): Likewise.
1560 (selftest::test_capture_of_dump_calls): Convert "stmt" from
1561 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
1562 with %T, %E, and %G.
1563 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1564 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1565 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1566 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1567 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1568 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1569 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1570 within a dump_printf_loc call to "%wu".
1571 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1572 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
1573 missing space after "=".
1574 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1575 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1576 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1577 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1578 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
1579 duplicate "vectorized" from message.
1581 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1583 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1584 polyNxK_t element's TYPE_STRING_FLAG.
1586 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1588 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1589 (they were unnamed before). Fix comments.
1591 2018-08-17 Nathan Sidwell <nathan@acm.org>
1593 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1595 2018-08-17 Richard Biener <rguenther@suse.de>
1597 PR tree-optimization/86841
1598 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1600 2018-08-17 Martin Liska <mliska@suse.cz>
1602 * common.opt: Remove Warn, Init and Report for options with
1603 Ignore/Deprecated flag. Warning is done automatically for
1605 * config/i386/i386.opt: Likewise.
1606 * config/ia64/ia64.opt: Likewise.
1607 * config/rs6000/rs6000.opt: Likewise.
1608 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1609 Remove usage of flag_check_pointer_bounds.
1610 * lto-wrapper.c (merge_and_complain): Do not handle
1611 OPT_fcheck_pointer_bounds.
1612 (append_compiler_options): Likewise.
1613 * opt-functions.awk: Do not handle Deprecated.
1614 * optc-gen.awk: Check that Var, Report and Init are not
1615 used for an option with Ignore/Deprecated flag.
1616 * opts-common.c (decode_cmdline_option): Do not report
1618 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1620 * opts.h (struct cl_option): Remove cl_deprecated flag.
1621 (CL_ERR_DEPRECATED): Remove error enum value.
1623 2018-08-17 Richard Biener <rguenther@suse.de>
1626 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1627 across a va-arg-pack using call adjust its return value accordingly.
1629 2018-08-16 Martin Sebor <msebor@redhat.com>
1631 PR tree-optimization/86853
1632 * gimple-ssa-sprintf.c (struct format_result): Rename member.
1633 (struct fmtresult): Add member and initialize it in ctors.
1634 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
1635 (format_string): Handle %S the same as %ls. Set MAYFAIL.
1636 (format_directive): Set POSUNDER4K when MAYFAIL is set.
1637 (parse_directive): Handle %C same as %c.
1638 (sprintf_dom_walker::compute_format_length): Adjust.
1639 (is_call_safe): Adjust.
1641 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1643 * builtins.c (c_strlen): Add new parameter eltsize. Use it
1644 for determining how to count the elements.
1645 * builtins.h (c_strlen): Adjust prototype.
1646 * expr.c (string_constant): Add new parameter mem_size.
1647 Set *mem_size appropriately.
1648 * expr.h (string_constant): Adjust protoype.
1649 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1650 * gimple-fold.h (get_range_strlen): Adjust prototype.
1651 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1652 (format_string): Call get_string_length with eltsize.
1654 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1656 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1657 to emit the span, rather than setting it as the prefix.
1659 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1661 * diagnostic-show-locus.c (layout::start_annotation_line): Add
1662 "margin_char" parameter, defaulting to space. Use it in place
1663 of pp_space for the initial part of the margin.
1664 (layout::print_leading_fixits): Use '+' when filling the margin
1665 of line-insertion fix-it hints.
1667 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1669 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1672 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1674 * config/rs6000/altivec.md: Don't set length attribute to the default
1676 * config/rs6000/darwin.md: Ditto.
1677 * config/rs6000/dfp.md: Ditto.
1678 * config/rs6000/htm.md: Ditto.
1679 * config/rs6000/rs6000.md: Ditto.
1680 * config/rs6000/sync.md: Ditto.
1681 * config/rs6000/vsx.md: Ditto.
1683 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1685 * config/rs6000/altivec.md: Don't set length attribute to the default
1686 value, for branch instructions.
1687 * config/rs6000/darwin.md: Ditto.
1688 * config/rs6000/rs6000.md: Ditto.
1690 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1692 * config/rs6000/rs6000.md (length): Always define as const_int 4.
1693 (unnamed conditional branch define_insn): Set length to 4 or 8
1694 depending on offset.
1695 (<bd>_<mode>): Similar, for alternative 0.
1696 (<bd>tf_<mode>): Ditto.
1698 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1700 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1702 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
1704 * doc/rtl.texi: Replace old RTX class names with new names.
1707 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
1709 * expmed.h (canonicalize_comparison): New declaration.
1710 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1711 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1712 * optabs.c (prepare_cmp_insn): Likewise.
1713 * rtl.h (unsigned_condition_p): New function which checks if a
1714 comparison operator is unsigned.
1716 2018-08-16 Nathan Sidwell <nathan@acm.org>
1718 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1719 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1721 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1724 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1725 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1726 (mov<mov>): ..this and enable unconditionally.
1728 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1730 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1732 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
1734 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1735 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1736 "Common" with "Target".
1738 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1740 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1741 * doc/invoke.texi (mmitigate-rop): Remove.
1742 * config/i386/i386.c: Do not include "regrename.h".
1743 (ix86_rop_should_change_byte_p, reg_encoded_number)
1744 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
1746 (ix86_reorg): Remove call to ix86_mitigate_rop.
1747 * config/i386/i386.md (attr "modrm_class"): Remove.
1748 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
1749 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
1750 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
1752 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
1754 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
1755 allow folding of mergeh() and mergel() for the float and double types.
1756 (fold_mergehl_helper): Rework to handle building a permute tree
1759 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1761 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
1764 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1766 * common.opt (fdiagnostics-show-labels): New option.
1767 * diagnostic-show-locus.c (class layout_range): Add field
1769 (class layout): Add field "m_show_labels_p".
1770 (layout_range::layout_range): Add param "label" and use it to
1772 (make_range): Pass in NULL for new "label" param of layout_range's
1774 (layout::layout): Initialize m_show_labels_p.
1775 (layout::maybe_add_location_range): Pass in loc_range->m_label
1776 when constructing layout_range instances.
1777 (struct line_label): New struct.
1778 (layout::print_any_labels): New member function.
1779 (layout::print_line): Call it if label-printing is enabled.
1780 (selftest::test_one_liner_labels): New test.
1781 (selftest::test_diagnostic_show_locus_one_liner): Call it.
1782 * diagnostic.c (diagnostic_initialize): Initialize
1783 context->show_labels_p.
1784 * diagnostic.h (struct diagnostic_context): Add field
1786 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1787 -fno-diagnostics-show-labels.
1788 * dwarf2out.c (gen_producer_string): Add
1789 OPT_fdiagnostics_show_labels to the ignored options.
1790 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1792 (gcc_rich_location::maybe_add_expr): Likewise.
1793 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1794 label" param, defaulting to NULL.
1795 (gcc_rich_location::add_expr): Add "label" param.
1796 (gcc_rich_location::maybe_add_expr): Likewise.
1797 (class text_range_label): New class.
1798 (class range_label_for_type_mismatch): New class.
1799 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1800 of format_warning_va.
1801 (fmtwarn_n): Likewise for new params of format_warning_n_va.
1802 * lto-wrapper.c (merge_and_complain): Add
1803 OPT_fdiagnostics_show_labels to the "pick one setting" options.
1804 (append_compiler_options): Likewise to the dropped options.
1805 (append_diag_options): Likewise to the passed-on options.
1806 * opts.c (common_handle_option): Handle the new option.
1807 * selftest-diagnostic.c
1808 (test_diagnostic_context::test_diagnostic_context): Enable
1810 * substring-locations.c: Include "gcc-rich-location.h".
1811 (format_warning_n_va): Add "fmt_label" and "param_label" params
1812 and use them as appropriate.
1813 (format_warning_va): Add "fmt_label" and "param_label" params,
1814 passing them on to format_warning_n_va.
1815 (format_warning_at_substring): Likewise.
1816 (format_warning_at_substring_n): Likewise.
1817 * substring-locations.h (format_warning_va): Add "fmt_label" and
1818 "param_label" params.
1819 (format_warning_n_va): Likewise.
1820 (format_warning_at_substring): Likewise.
1821 (format_warning_at_substring_n): Likewise.
1822 * toplev.c (general_init): Initialize global_dc->show_labels_p.
1824 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
1827 * builtins.c (expand_builtin_memcmp): Do not expand the call
1828 when overflow is detected.
1830 2018-08-15 Martin Sebor <msebor@redhat.com>
1832 PR tree-optimization/71625
1833 * config/aarch64/aarch64-builtins.c
1834 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
1836 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
1838 * config/s390/s390.c (s390_reorg): Remove loop.
1840 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1843 (darwin_function_switched_text_sections): Delete.
1844 * gcc/config/darwin.h
1845 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
1847 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1850 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
1851 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
1852 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
1854 2018-08-15 Martin Liska <mliska@suse.cz>
1856 PR tree-optimization/86925
1857 * predict.c (expr_expected_value_1): When taking
1858 later predictor, assign also probability.
1859 Use fold_build2_initializer_loc in order to fold
1860 the expression in -frounding-math.
1862 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
1864 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
1866 (expand_vec_perm_1): Try the new method.
1868 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
1871 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
1872 Check whether lra_live_max_point is 0 before dividing.
1874 2018-08-14 Martin Sebor <msebor@redhat.com>
1876 PR tree-optimization/86650
1877 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
1878 (vrp_prop::check_mem_ref): Same.
1880 2018-08-13 Liu Hao <lh_mouse@126.com>
1882 * pretty-print.c (eat_esc_sequence): Swap the foreground and
1883 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
1884 and clear it thereafter, as it only works for DBCS.
1886 2018-08-13 Liu Hao <lh_mouse@126.com>
1888 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
1889 handle returned by _get_osf_handle().
1891 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1893 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
1894 for folding vec_perm.
1896 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1898 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
1899 Add support for gimple-folding of vec_pack() and vec_unpack()
1902 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1904 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
1905 vec_xst variants to the list.
1906 (rs6000_gimple_fold_builtin): Add support for folding unaligned
1907 vector loads and stores.
1909 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
1911 * config.gcc (rs6000-ibm-aix4.x): Delete.
1912 (rs6000-ibm-aix5.1): Delete.
1913 (rs6000-ibm-aix5.2): Delete.
1914 (rs6000-ibm-aix5.3): Delete.
1915 * config/rs6000/aix43.h: Delete.
1916 * config/rs6000/aix51.h: Delete.
1917 * config/rs6000/aix52.h: Delete.
1918 * config/rs6000/t-aix43: Delete.
1920 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
1922 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1924 (s390_decompose_address): Factor out constant pool ref
1927 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1929 * config/nds32/nds32-predicates.c
1930 (nds32_can_use_bclr_p): Change return type as bool.
1931 (nds32_can_use_bset_p): Ditto.
1932 (nds32_can_use_btgl_p): Ditto.
1933 (nds32_can_use_bitci_p): Ditto.
1934 * config/nds32/nds32-protos.h
1935 (nds32_can_use_bclr_p): Change declaration.
1936 (nds32_can_use_bset_p): Ditto.
1937 (nds32_can_use_btgl_p): Ditto.
1938 (nds32_can_use_bitci_p): Ditto.
1940 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1942 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
1943 Support -msched-prolog-epilog option.
1944 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
1946 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1948 * common/config/nds32/nds32-common.c
1949 (nds32_option_optimization_table): Enalbe -malways-align.
1951 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1953 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
1955 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
1956 OPT_misr_secure_ case.
1957 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
1958 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
1959 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
1961 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
1962 (nds32_isr_info): New field security_level.
1963 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
1964 * config/nds32/nds32.md (return_internal): Consider critical attribute.
1965 * config/nds32/nds32.opt (misr-secure): New option.
1966 * config/nds32/nds32_init.inc: New file.
1967 * config/nds32/nds32_isr.h: New file.
1969 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
1971 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
1972 Update comment for atomic instructions.
1973 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
1974 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
1976 (atomic_loaddi): Revise fence expansion to only emit fence prior to
1977 load for __ATOMIC_SEQ_CST model.
1978 (atomic_loaddi_1): Remove float register target.
1979 (atomic_storedi): Handle CONST_INT values.
1980 (atomic_storedi_1): Remove float register source. Add special case
1982 (memory_barrier): New expander and insn.
1984 2018-08-11 Jakub Jelinek <jakub@redhat.com>
1986 PR tree-optimization/86835
1987 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
1988 new_stmt after def_gsi, make sure to insert new_square_stmt after
1989 that stmt, not 2 stmts before it.
1991 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
1994 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
1997 2018-08-10 Martin Liska <mliska@suse.cz>
2000 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2002 * builtins.c (expand_builtin_expect_with_probability):
2004 (expand_builtin_expect_with_probability): New function.
2005 (build_builtin_expect_predicate): Add new argumnet probability
2006 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2007 (fold_builtin_expect):
2010 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2011 * builtins.h (fold_builtin_expect): Set new argument.
2012 * doc/extend.texi: Document __builtin_expect_with_probability.
2013 * doc/invoke.texi: Likewise.
2014 * gimple-fold.c (gimple_fold_call): Pass new argument.
2015 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2016 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2017 * predict.c (get_predictor_value): New function.
2018 (expr_expected_value): Add new argument probability. Assume
2019 that predictor and probability are always non-null.
2020 (expr_expected_value_1): Likewise. For __builtin_expect and
2021 __builtin_expect_with_probability set probability. Handle
2022 combination in binary expressions.
2023 (tree_predict_by_opcode): Simplify code by simply calling
2024 get_predictor_value.
2025 (pass_strip_predict_hints::execute): Add handling of
2026 BUILT_IN_EXPECT_WITH_PROBABILITY.
2027 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2029 * tree.h (DECL_BUILT_IN_P): New function.
2031 2018-08-10 Martin Liska <mliska@suse.cz>
2033 PR tree-optimization/85799
2034 * passes.def: Add argument for pass_strip_predict_hints.
2035 * predict.c (class pass_strip_predict_hints): Add new argument
2037 (strip_predictor_early): New function.
2038 (pass_strip_predict_hints::execute): Call the function to
2040 (strip_predict_hints): New function.
2041 * predict.def: Fix comment.
2043 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2045 * Makefile.in: Clarify which tm.texi to copy over to assert the
2046 right to grant a GFDL license for all.
2048 2018-08-09 Jeff Law <law@redhat.com>
2050 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2053 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2055 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2058 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2060 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2061 reductions for variable-length vectors.
2063 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2066 * common.opt (fdiagnostics-show-line-numbers): New option.
2067 * diagnostic-show-locus.c (class layout): Add fields
2068 "m_show_line_numbers_p" and "m_linenum_width";
2069 (num_digits): New function.
2070 (test_num_digits): New function.
2071 (layout::layout): Initialize new fields. Update m_x_offset
2072 logic to handle any left margin.
2073 (layout::print_source_line): Print line number when requested.
2074 (layout::start_annotation_line): New member function.
2075 (layout::print_annotation_line): Call it.
2076 (layout::print_leading_fixits): Likewise.
2077 (layout::print_trailing_fixits): Likewise. Update calls to
2078 move_to_column for new parameter.
2079 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2080 it to potentially call start_annotation_line.
2081 (layout::show_ruler): Call start_annotation_line.
2082 (selftest::test_line_numbers_multiline_range): New selftest.
2083 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2084 and selftest::test_line_numbers_multiline_range.
2085 * diagnostic.c (diagnostic_initialize): Initialize
2086 show_line_numbers_p.
2087 * diagnostic.h (struct diagnostic_context): Add field
2088 "show_line_numbers_p".
2089 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2090 -fno-diagnostics-show-line-numbers.
2091 * dwarf2out.c (gen_producer_string): Add
2092 OPT_fdiagnostics_show_line_numbers to the ignored options.
2093 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2094 one setting" options.
2095 (append_compiler_options): Likewise to the dropped options.
2096 (append_diag_options): Likewise to the passed-on options.
2097 * opts.c (common_handle_option): Handle the new option.
2098 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2100 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2102 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2103 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2104 third argument of type "const signed char" to descriptions of
2105 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2106 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2107 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2108 __builtin_bcdsub_ov functions.
2110 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2112 PR tree-optimization/86858
2113 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2114 flow_bb_inside_loop_p calls.
2116 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2118 PR tree-optimization/86871
2119 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2120 instead of gimple_assign_lhs.
2122 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2125 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2126 register constraint to operand 0.
2127 (add<mode>3_carryinC): Likewise.
2128 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2130 2018-08-09 Martin Liska <mliska@suse.cz>
2133 * common.opt: Remove extra line.
2135 2018-08-09 Martin Liska <mliska@suse.cz>
2137 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2138 at the end of a line, make first letter capital and end up
2139 a sentence with a dot.
2140 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2141 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2142 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2143 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2144 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2145 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2146 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2147 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2148 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2149 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2150 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2151 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2152 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2153 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2154 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2155 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2156 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2157 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2159 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2162 * config/s390/s390.c (s390_option_override_internal): Reduce the
2163 stack-clash-protection-probe-interval param if it would be too big
2166 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2169 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2170 * config/m68k/m68k.c (handle_move_double): Don't call
2171 m68k_final_prescan_insn.
2172 (m68k_adjust_decorated_operand): Renamed from
2173 m68k_final_prescan_insn, remove first and third operand and
2175 (print_operand): Call it.
2176 (print_operand_address): Call it.
2178 2018-08-08 Nathan Sidwell <nathan@acm.org>
2180 * diagnostic.c (diagnostic_report_current_module): Use
2181 linemap_included_from & linemap_included_from_linemap.
2183 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2185 * config/aarch64/aarch64-cores.def: Add phecda core.
2186 * config/aarch64/aarch64-tune.md: Regenerate.
2187 * doc/invoke.texi: Add phecda core.
2189 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2192 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2194 * config/s390/s390.md ("movti"): Add more alternatives for
2195 constant to GPR copies.
2197 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2199 * config/s390/s390.c: Fix whitespace damage throughout the file.
2200 * config/s390/s390.h: Likewise.
2201 * config/s390/tpf.h: Likewise.
2203 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2205 * config/s390/s390.c (s390_loadrelative_operand_p):
2206 Remove TARGET_CPU_ZARCH usages.
2207 (s390_rtx_costs): Likewise.
2208 (s390_legitimate_constant_p): Likewise.
2209 (s390_cannot_force_const_mem): Likewise.
2210 (legitimate_reload_constant_p): Likewise.
2211 (s390_preferred_reload_class): Likewise.
2212 (legitimize_pic_address): Likewise.
2213 (legitimize_tls_address): Likewise.
2214 (s390_split_branches): Removed.
2215 (s390_add_execute): Removed.
2216 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2217 (s390_mainpool_start): Likewise.
2218 (s390_mainpool_finish): Likewise.
2219 (s390_mainpool_cancel): Removed.
2220 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2221 (s390_chunkify_cancel): Likewise.
2222 (s390_return_addr_rtx): Likewise.
2223 (s390_register_info): Remove split_branches_pending_p uages.
2224 (s390_optimize_register_info): Likewise.
2225 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2226 split_branches_pending_p usages.
2227 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2228 (s390_load_got): Likewise.
2229 (s390_expand_split_stack_prologue): Likewise.
2230 (output_asm_nops): Likewise.
2231 (s390_function_profiler): Likewise.
2232 (s390_emit_call): Likewise.
2233 (s390_conditional_register_usage): Likewise.
2234 (s390_optimize_prologue): Likewise.
2235 (s390_reorg): Remove TARGET_CPU_ZARCH and
2236 split_branches_pending_p usages.
2237 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2239 (s390_output_indirect_thunk_function): Likewise.
2240 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2241 (TARGET_CPU_ZARCH_P): Removed.
2242 (struct machine_function): Remove split_branches_pending_p.
2243 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2245 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2247 * common/config/s390/s390-common.c (processor_flags_table):
2249 * config.gcc: Remove with_arch/with_tune support.
2250 * config/s390/2064.md: Remove cpu attribute comparisons.
2251 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2253 * config/s390/linux.h (ASM_SPEC):
2254 Remove -march support.
2255 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2256 Use a table to get an arch level.
2257 * config/s390/s390-opts.h (enum processor_type):
2259 * config/s390/s390.c
2260 (processor_table): Remove entries, add arch_level values.
2261 (s390_issue_rate): Remove cases.
2262 (s390_option_override): Adjust
2263 s390_option_override_internal() call.
2264 (s390_option_override_internal): Remove deprecation warning.
2265 (s390_valid_target_attribute_tree): Adjust
2266 s390_option_override_internal() call.
2267 * config/s390/s390.h (struct s390_processor):
2268 Share with s390-c.c, add arch_level field.
2269 * config/s390/s390.md:
2270 Remove occurrences in cpu attribute.
2271 * config/s390/s390.opt: Remove -march/-mtune support.
2272 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2273 * doc/invoke.texi: Remove deprecation warning.
2275 2018-08-08 Luis Machado <luis.machado@linaro.org>
2277 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2279 (qdf24xx_tunings): Set vector cost structure to
2280 qdf24xx_vector_cost.
2282 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2283 <register_sextend>: Set to 3.
2285 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2288 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2289 * config/aarch64/aarch64-simd.md
2290 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2291 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2292 (aarch64_frecpx<mode>): ...this new pattern.
2293 * config/aarch64/aarch64-simd-builtins.def: Remove comment
2294 about aarch64_frecp<FRECP:frecp_suffix><mode>.
2296 2018-08-07 Martin Liska <mliska@suse.cz>
2299 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2300 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2301 * predict.def (PRED_MALLOC_NONNULL): New predictor.
2302 * doc/extend.texi: Document that malloc attribute adds
2305 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
2308 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2309 Define to speculation_safe_value_not_needed.
2311 2018-08-06 Jeff Law <law@redhat.com>
2313 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2314 the vr_values instance to cprop_into_stmt.
2315 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2316 (cprop_operand): Also query EVRP to determine if OP is a constant.
2318 2018-08-06 Nathan Sidwell <nathan@acm.org>
2320 * diagnostic.c (diagnostic_report_current_module): Reroll
2321 included-at loop. Translate text.
2323 2018-08-06 David Malcolm <dmalcolm@redhat.com>
2325 * function-tests.c (selftest::test_expansion_to_rtl): Call
2326 free_after_compilation.
2328 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2330 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2332 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
2334 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2335 loops with memory block operations from getting unrolled.
2337 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
2340 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2341 Define to speculation_safe_value_not_needed.
2343 2018-08-06 Jeff Law <law@redhat.com>
2345 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2348 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2351 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2352 with all enabled __intN types.
2354 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2356 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2358 * alias.c (record_set): Check for clobber high.
2359 * cfgexpand.c (expand_gimple_stmt): Likewise.
2360 * combine-stack-adj.c (single_set_for_csa): Likewise.
2361 * combine.c (find_single_use_1): Likewise.
2362 (set_nonzero_bits_and_sign_copies): Likewise.
2363 (get_combine_src_dest): Likewise.
2364 (is_parallel_of_n_reg_sets): Likewise.
2365 (try_combine): Likewise.
2366 (record_dead_and_set_regs_1): Likewise.
2367 (reg_dead_at_p_1): Likewise.
2368 (reg_dead_at_p): Likewise.
2369 * dce.c (deletable_insn_p): Likewise.
2370 (mark_nonreg_stores_1): Likewise.
2371 (mark_nonreg_stores_2): Likewise.
2372 * df-scan.c (df_find_hard_reg_defs): Likewise.
2373 (df_uses_record): Likewise.
2374 (df_get_call_refs): Likewise.
2375 * dwarf2out.c (mem_loc_descriptor): Likewise.
2376 * haifa-sched.c (haifa_classify_rtx): Likewise.
2377 * ira-build.c (create_insn_allocnos): Likewise.
2378 * ira-costs.c (scan_one_insn): Likewise.
2379 * ira.c (equiv_init_movable_p): Likewise.
2380 (rtx_moveable_p): Likewise.
2381 (interesting_dest_for_shprep): Likewise.
2382 * jump.c (mark_jump_label_1): Likewise.
2383 * postreload-gcse.c (record_opr_changes): Likewise.
2384 * postreload.c (reload_cse_simplify): Likewise.
2385 (struct reg_use): Add source expr.
2386 (reload_combine): Check for clobber high.
2387 (reload_combine_note_use): Likewise.
2388 (reload_cse_move2add): Likewise.
2389 (move2add_note_store): Likewise.
2390 * print-rtl.c (print_pattern): Likewise.
2391 * recog.c (decode_asm_operands): Likewise.
2392 (store_data_bypass_p): Likewise.
2393 (if_test_bypass_p): Likewise.
2394 * regcprop.c (kill_clobbered_value): Likewise.
2395 (kill_set_value): Likewise.
2396 * reginfo.c (reg_scan_mark_refs): Likewise.
2397 * reload1.c (maybe_fix_stack_asms): Likewise.
2398 (eliminate_regs_1): Likewise.
2399 (elimination_effects): Likewise.
2400 (mark_not_eliminable): Likewise.
2401 (scan_paradoxical_subregs): Likewise.
2402 (forget_old_reloads_1): Likewise.
2403 * reorg.c (find_end_label): Likewise.
2404 (try_merge_delay_insns): Likewise.
2405 (redundant_insn): Likewise.
2406 (own_thread_p): Likewise.
2407 (fill_simple_delay_slots): Likewise.
2408 (fill_slots_from_thread): Likewise.
2409 (dbr_schedule): Likewise.
2410 * resource.c (update_live_status): Likewise.
2411 (mark_referenced_resources): Likewise.
2412 (mark_set_resources): Likewise.
2413 * rtl.c (copy_rtx): Likewise.
2414 * rtlanal.c (reg_referenced_p): Likewise.
2415 (single_set_2): Likewise.
2416 (noop_move_p): Likewise.
2417 (note_stores): Likewise.
2418 * sched-deps.c (sched_analyze_reg): Likewise.
2419 (sched_analyze_insn): Likewise.
2421 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2423 * cse.c (invalidate_reg): New function extracted from...
2424 (invalidate): ...here.
2425 (canonicalize_insn): Check for clobber high.
2426 (invalidate_from_clobbers): invalidate clobber highs.
2427 (invalidate_from_sets_and_clobbers): Likewise.
2428 (count_reg_usage): Check for clobber high.
2429 (insn_live_p): Likewise.
2430 * cselib.c (cselib_expand_value_rtx_1):Likewise.
2431 (cselib_invalidate_regno): Check for clobber in setter.
2432 (cselib_invalidate_rtx): Pass through setter.
2433 (cselib_invalidate_rtx_note_stores):
2434 (cselib_process_insn): Check for clobber high.
2435 * cselib.h (cselib_invalidate_rtx): Add operand.
2437 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2439 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2440 (mark_not_eliminable): Likewise.
2441 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2442 * lra-lives.c (process_bb_lives): Check for clobber high.
2443 * lra.c (new_insn_reg): Remember clobber highs.
2444 (collect_non_operand_hard_regs): Check for clobber high.
2445 (lra_set_insn_recog_data): Likewise.
2446 (add_regs_to_insn_regno_info): Likewise.
2447 (lra_update_insn_regno_info): Likewise.
2449 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2451 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2452 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2454 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2456 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2457 (copy_insn_1): Likewise.
2458 (gen_hard_reg_clobber_high): New gen function.
2459 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2460 * genemit.c (gen_exp): Likewise.
2461 (gen_emit_seq): Pass through info.
2462 (gen_insn): Check for CLOBBER_HIGH.
2463 (gen_expand): Pass through info.
2464 (gen_split): Likewise.
2465 (output_add_clobbers): Likewise.
2466 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2467 (remove_clobbers): Likewise.
2468 * rtl.h (gen_hard_reg_clobber_high): New declaration.
2470 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2472 * doc/rtl.texi (clobber_high): Add.
2473 (parallel): Add in clobber high
2474 * rtl.c (rtl_check_failed_code3): Add function.
2475 * rtl.def (CLOBBER_HIGH): Add expression.
2476 * rtl.h (RTL_CHECKC3): Add macro.
2477 (rtl_check_failed_code3): Add declaration.
2478 (XC3EXP): Add macro.
2480 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2483 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2484 cfun->machine->max_used_stack_alignment if needed.
2486 2018-08-04 Martin Sebor <msebor@redhat.com>
2488 PR tree-optimization/86571
2489 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2492 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
2495 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2498 2018-08-03 Jeff Law <law@redhat.com>
2501 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2502 Define to speculation_safe_value_not_needed.
2504 2018-08-03 David Malcolm <dmalcolm@redhat.com>
2506 * doc/gcov.texi (-x): Remove duplicate "to".
2507 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2508 (-Wif-not-aligned): Remove duplicate "is".
2509 (-flto): Remove duplicate "the".
2510 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2511 duplicate "v5.00.b".
2512 (MSP430 Options): Remove duplicate "and" from the description
2513 of "-mgprel-sec=regexp".
2514 (x86 Options): Remove duplicate copies of "vmldLog102" and
2515 vmlsLog104 from description of "-mveclibabi=type".
2517 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
2519 * internal-fn.h (first_commutative_argument): Declare.
2520 * internal-fn.c (first_commutative_argument): New function.
2521 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2522 restrictions for pattern statements. Use first_commutative_argument
2523 to look for commutative operands in calls to internal functions.
2525 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
2527 * Makefile.in (wide-int-range.o): New.
2528 * tree-vrp.c: Move all the wide_int_* functions to...
2529 * wide-int-range.cc: ...here.
2530 * tree-vrp.h: Move all the wide_int_* prototypes to...
2531 * wide-int-range.h: ...here.
2533 2018-08-03 Tom de Vries <tdevries@suse.de>
2535 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2537 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2538 * except.c (output_function_exception_table): Do early exit if
2539 targetm_common.except_unwind_info (&global_options) == UI_NONE.
2541 2018-08-03 Martin Liska <mliska@suse.cz>
2543 * predict.c (dump_prediction): Change to 2 digits
2546 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
2548 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2550 (falkor_am_1_gtov_gtov): ... a new insn reservation.
2552 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
2554 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2555 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2556 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2557 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2558 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2560 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2562 * diagnostic-show-locus.c (diagnostic_show_locus): Use
2563 pp_take_prefix when saving the existing prefix.
2564 * diagnostic.c (diagnostic_append_note): Likewise.
2565 * langhooks.c (lhd_print_error_function): Likewise.
2566 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2567 param's type. Free the existing prefix.
2568 (pp_take_prefix): New function.
2569 (pretty_printer::pretty_printer): Drop the prefix parameter.
2570 Rename the length parameter to match the comment.
2571 (pretty_printer::~pretty_printer): Free the prefix.
2572 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2574 (struct pretty_printer): Drop the "const" from "prefix" field's
2575 type and clarify memory management.
2576 (pp_set_prefix): Drop the "const" from the 2nd param.
2577 (pp_take_prefix): New decl.
2579 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2581 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2582 for word_mode_ok here instead of passing as argument.
2583 (expand_block_compare): Change select_block_compare_mode() call.
2584 (expand_strncmp_gpr_sequence): New function.
2585 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2587 2018-08-02 Jeff Law <law@redhat.com>
2590 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2591 Define to speculation_safe_value_not_needed.
2594 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2595 Define to speculation_safe_value_not_needed.
2597 2018-08-02 Tom de Vries <tdevries@suse.de>
2600 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2601 function. Return UI_TARGET unconditionally.
2602 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2603 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2605 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2607 * genemit.c (print_overload_test): Fix typo.
2609 2018-08-02 Richard Biener <rguenther@suse.de>
2611 PR tree-optimization/86816
2612 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2613 which checks for value availability before querying it.
2614 (gvn_uses_equal): Use it.
2615 (same_succ_hash): Likewise.
2616 (gimple_equal_p): Likewise.
2618 2018-08-02 Nick Clifton <nickc@redhat.com>
2621 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2622 Define to speculation_safe_value_not_needed.
2625 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2626 Define to speculation_safe_value_not_needed.
2629 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2630 Define to speculation_safe_value_not_needed.
2633 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2634 Define to speculation_safe_value_not_needed.
2637 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2638 Define to speculation_safe_value_not_needed.
2641 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2642 Define to speculation_safe_value_not_needed.
2645 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2646 Define to speculation_safe_value_not_needed.
2649 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2650 Define to speculation_safe_value_not_needed.
2653 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2654 speculation_safe_value_not_needed.
2657 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2658 to speculation_safe_value_not_needed.
2660 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2662 * doc/md.texi: Expand the documentation of instruction names
2663 to mention port-local uses. Document '@' in pattern names.
2664 * read-md.h (overloaded_instance, overloaded_name): New structs.
2666 (md_reader::handle_overloaded_name): New member function.
2667 (md_reader::get_overloads): Likewise.
2668 (md_reader::m_first_overload): New member variable.
2669 (md_reader::m_next_overload_ptr): Likewise.
2670 (md_reader::m_overloads_htab): Likewise.
2671 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2672 m_next_overload_ptr and m_overloads_htab.
2673 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2674 (get_mode_token, get_code_token, get_int_token): New functions.
2675 (map_attr_string): Add an optional argument that passes back
2676 the associated iterator.
2677 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2678 (md_reader::handle_overloaded_name, add_overload_instance): New
2680 (apply_iterators): Handle '@' names. Report an error if '@'
2681 is used without iterators.
2682 (initialize_iterators): Initialize the new iterator_group fields.
2683 * genopinit.c (handle_overloaded_code_for)
2684 (handle_overloaded_gen): New functions.
2685 (main): Use them to print declarations of maybe_code_for_* and
2686 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2687 * genemit.c (print_overload_arguments, print_overload_test)
2688 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2689 (main): Use it to print definitions of maybe_code_for_* and
2690 maybe_gen_* functions.
2691 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2692 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2693 instead of explicit mode checks.
2694 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2695 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2696 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2697 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2698 (aarch64_expand_compare_and_swap): Likewise
2699 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2700 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2701 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2702 (aarch64_constant_pool_reload_icode): Delete.
2703 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2704 instead of aarch64_constant_pool_reload_icode. Use
2705 code_for_aarch64_reload_mov instead of explicit mode checks.
2706 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2707 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2708 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2709 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2710 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2711 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2712 (aarch64_atomic_load_op_code): Delete.
2713 (aarch64_emit_atomic_load_op): Likewise.
2714 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2715 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
2716 instead of aarch64_emit_atomic_load_op.
2717 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2718 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2719 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2720 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2721 character before the pattern name.
2722 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2723 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2724 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2725 (aarch64_frecps<mode>): Likewise.
2726 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2727 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2728 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2729 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2730 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2732 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2734 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2735 Allow HFmode constants if TARGET_FP_F16INST.
2737 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
2740 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2741 No longer check last store for clobber of address register.
2743 2018-08-02 Martin Liska <mliska@suse.cz>
2745 PR gcov-profile/86817
2746 * gcov.c (process_all_functions): New function.
2748 (process_file): Move functions processing to
2749 process_all_functions.
2751 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2753 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
2754 "const" to the "gimple *" and "rtx_insn *" parameters.
2755 * dumpfile.h (dump_user_location_t::dump_user_location_t):
2757 (dump_location_t::dump_location_t): Likewise.
2759 2018-08-01 Martin Sebor <msebor@redhat.com>
2761 PR tree-optimization/86650
2762 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
2763 rather than a "gcall *". Directly pass the data of interest
2764 to percent_K_format, rather than building a temporary CALL_EXPR
2766 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
2767 (gimple_fold_builtin_strncat): Adjust.
2768 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
2769 gcall* argument with gimple*.
2770 * gimple-ssa-warn-restrict.c (check_call): Same.
2771 (wrestrict_dom_walker::before_dom_children): Same.
2772 (builtin_access::builtin_access): Same.
2773 (check_bounds_or_overlap): Same
2774 (maybe_diag_overlap): Same.
2775 (maybe_diag_offset_bounds): Same.
2776 * tree-diagnostic.c (default_tree_printer): Move usage of
2777 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2779 * tree-pretty-print.c (percent_K_format): Add argument.
2780 * tree-pretty-print.h: Add argument.
2781 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2782 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2783 (maybe_diag_stxncpy_trunc): Same.
2784 (handle_builtin_stxncpy): Same.
2785 (handle_builtin_strcat): Same.
2787 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2789 * match.pd: Optimise pointer range checks.
2791 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2793 PR tree-optimization/86758
2794 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2795 to remove pattern statements.
2797 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2799 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2800 result of dfs_enumerate_from when constructing stmt_vec_infos,
2801 instead of additionally calling get_loop_body.
2803 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2805 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2807 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2808 When creating an iv, assert that the step is not known to be zero.
2809 (vect_setup_realignment): Update call accordingly.
2810 * tree-vect-stmts.c (vectorizable_store): Likewise.
2811 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
2813 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2815 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2816 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2817 (vectorizable_reduction): Likewise.
2818 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2819 (vect_detect_hybrid_slp_stmts): Likewise.
2820 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2822 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
2824 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2825 (wide_int_set_zero_nonzero_bits): ...this.
2826 (zero_nonzero_bits_from_vr): Rename to...
2827 (vrp_set_zero_nonzero_bits): ...this.
2828 (extract_range_from_multiplicative_op_1): Abstract wide int
2830 (wide_int_range_multiplicative_op): ...here.
2831 (extract_range_from_binary_expr_1): Extract wide int binary
2832 operations into their own functions.
2833 (wide_int_range_lshift): New.
2834 (wide_int_range_can_optimize_bit_op): New.
2835 (wide_int_range_shift_undefined_p): New.
2836 (wide_int_range_bit_xor): New.
2837 (wide_int_range_bit_ior): New.
2838 (wide_int_range_bit_and): New.
2839 (wide_int_range_trunc_mod): New.
2840 (extract_range_into_wide_ints): New.
2841 (vrp_shift_undefined_p): New.
2842 (extract_range_from_multiplicative_op): New.
2843 (vrp_can_optimize_bit_op): New.
2844 * tree-vrp.h (value_range::dump): New.
2845 (wide_int_range_multiplicative_op): New.
2846 (wide_int_range_lshift):New.
2847 (wide_int_range_shift_undefined_p): New.
2848 (wide_int_range_bit_xor): New.
2849 (wide_int_range_bit_ior): New.
2850 (wide_int_range_bit_and): New.
2851 (wide_int_range_trunc_mod): New.
2852 (zero_nonzero_bits_from_bounds): Rename to...
2853 (wide_int_set_zero_nonzero_bits): ...this.
2854 (zero_nonzero_bits_from_vr): Rename to...
2855 (vrp_set_zero_nonzero_bits): ...this.
2856 (range_easy_mask_min_max): Rename to...
2857 (wide_int_range_can_optimize_bit_op): this.
2858 * vr-values.c (simplify_bit_ops_using_ranges): Rename
2859 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2861 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2863 * tree-vectorizer.h (vect_orig_stmt): New function.
2864 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
2865 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
2866 (vect_create_epilog_for_reduction): Likewise.
2867 (vectorizable_live_operation): Likewise.
2868 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2869 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
2870 * tree-vect-stmts.c (vectorizable_call): Likewise.
2871 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2873 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2875 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
2877 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
2878 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
2879 (vect_transform_loop): Likewise.
2880 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2882 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2884 * tree-vectorizer.h (vect_schedule_slp): Return void.
2885 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2886 (vect_schedule_slp): Likewise.
2888 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2890 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
2892 (vect_transform_loop): Update calls accordingly. Schedule SLP
2893 instances before the main loop, if any exist.
2895 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2897 PR tree-optimization/86749
2898 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
2899 If the lhs is used in a COND_EXPR, check that it is being used
2900 as the "then" or "else" value.
2902 2018-08-01 Tom de Vries <tdevries@suse.de>
2905 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2906 speculation_safe_value_not_needed.
2908 2018-08-01 Richard Biener <rguenther@suse.de>
2910 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
2913 2018-08-01 Martin Liska <mliska@suse.cz>
2915 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
2916 format how successful transformation is dumped.
2917 (gimple_mod_pow2_value_transform): Likewise.
2918 (gimple_mod_subtract_transform): Likewise.
2919 (gimple_stringops_transform): Likewise.
2921 2018-08-01 Martin Liska <mliska@suse.cz>
2924 * value-prof.c (interesting_stringop_to_profile_p):
2925 Simplify the code and add BUILT_IN_MEMMOVE.
2926 (gimple_stringops_transform): Likewise.
2928 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
2930 * config/aarch64/aarch64-simd.md
2931 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
2932 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
2933 use GPI iterator instead of SI mode.
2935 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2937 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
2938 rs6000_speculation_barrier.
2939 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
2940 new barrier pattern name.
2942 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2944 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
2945 (speculation_barrier): New insn.
2947 2018-08-01 Richard Biener <rguenther@suse.de>
2950 * graphite.h: Include isl/id.h and isl/space.h to allow build
2953 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
2956 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2957 mode for COFF targets.
2958 * defaults.h (TARGET_COFF): Define.
2959 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
2960 TARGET_COFF): Define.
2961 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
2962 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
2963 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
2965 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2967 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
2968 * gimple-streamer-out.c (output_bb): Save it.
2969 * lto-streamer-in.c (input_struct_function_base): Restore
2970 instance discriminator if available. Create map on demand.
2971 * lto-streamer-out.c (output_struct_function_base): Save it if
2973 * final.c (decl_to_instance_map): Document LTO strategy.
2975 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2976 Olivier Hainque <hainque@adacore.com>
2978 * debug.h (decl_to_instance_map_t): New type.
2979 (decl_to_instance_map): Declare.
2980 (maybe_create_decl_to_instance_map): New inline function.
2981 * final.c (bb_discriminator, last_bb_discriminator): New statics,
2982 to track basic block discriminators.
2983 (final_start_function_1): Initialize them.
2984 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
2986 (decl_to_instance_map): New variable.
2987 (map_decl_to_instance, maybe_set_discriminator): New functions.
2988 (notice_source_line): Set discriminator.
2990 2018-07-31 Ian Lance Taylor <iant@golang.org>
2992 * targhooks.c (default_have_speculation_safe_value): Add
2995 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2997 * dump-context.h: Include "pretty-print.h".
2998 (dump_context::refresh_dumps_are_enabled): New decl.
2999 (dump_context::emit_item): New decl.
3000 (class dump_context): Add fields "m_test_pp" and
3002 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3003 (temp_dump_context::get_dumped_text): New decl.
3004 (class temp_dump_context): Add field "m_pp".
3005 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3006 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3008 (set_dump_file): Update for above change.
3009 (set_alt_dump_file): Likewise.
3010 (dump_loc): New overload, taking a pretty_printer *.
3011 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3012 to any test pretty-printer.
3013 (make_item_for_dump_gimple_stmt): New function, adapted from
3014 optinfo::add_gimple_stmt.
3015 (dump_context::dump_gimple_stmt): Call it, and use the result,
3016 eliminating the direct usage of dump_file and alt_dump_file in
3017 favor of indirectly using them via emit_item.
3018 (make_item_for_dump_gimple_expr): New function, adapted from
3019 optinfo::add_gimple_expr.
3020 (dump_context::dump_gimple_expr): Call it, and use the result,
3021 eliminating the direct usage of dump_file and alt_dump_file in
3022 favor of indirectly using them via emit_item.
3023 (make_item_for_dump_generic_expr): New function, adapted from
3025 (dump_context::dump_generic_expr): Call it, and use the result,
3026 eliminating the direct usage of dump_file and alt_dump_file in
3027 favor of indirectly using them via emit_item.
3028 (make_item_for_dump_printf_va): New function, adapted from
3029 optinfo::add_printf_va.
3030 (make_item_for_dump_printf): New function.
3031 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3032 and use the result, eliminating the direct usage of dump_file and
3033 alt_dump_file in favor of indirectly using them via emit_item.
3034 (make_item_for_dump_dec): New function.
3035 (dump_context::dump_dec): Call it, and use the result,
3036 eliminating the direct usage of dump_file and alt_dump_file in
3037 favor of indirectly using them via emit_item.
3038 (make_item_for_dump_symtab_node): New function, adapted from
3039 optinfo::add_symtab_node.
3040 (dump_context::dump_symtab_node): Call it, and use the result,
3041 eliminating the direct usage of dump_file and alt_dump_file in
3042 favor of indirectly using them via emit_item.
3043 (dump_context::begin_scope): Reimplement, avoiding direct usage
3044 of dump_file and alt_dump_file in favor of indirectly using them
3046 (dump_context::emit_item): New member function.
3047 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3048 Set up test pretty-printer on the underlying context. Call
3049 refresh_dumps_are_enabled.
3050 (temp_dump_context::~temp_dump_context): Call
3051 refresh_dumps_are_enabled.
3052 (temp_dump_context::get_dumped_text): New member function.
3053 (selftest::verify_dumped_text): New function.
3054 (ASSERT_DUMPED_TEXT_EQ): New macro.
3055 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3056 and then without optinfo enabled. Add uses of
3057 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3058 * dumpfile.h: Update comment for the dump_* API.
3059 * optinfo-emit-json.cc
3060 (selftest::test_building_json_from_dump_calls): Update for new
3061 param for temp_dump_context ctor.
3062 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3063 and "m_owned" field.
3064 (optinfo_item::~optinfo_item): Likewise.
3065 (optinfo::add_item): New member function.
3066 (optinfo::emit): Update comment.
3067 (optinfo::add_string): Delete.
3068 (optinfo::add_printf): Delete.
3069 (optinfo::add_printf_va): Delete.
3070 (optinfo::add_gimple_stmt): Delete.
3071 (optinfo::add_gimple_expr): Delete.
3072 (optinfo::add_tree): Delete.
3073 (optinfo::add_symtab_node): Delete.
3074 (optinfo::add_dec): Delete.
3075 * optinfo.h (class dump_context): New forward decl.
3076 (optinfo::add_item): New decl.
3077 (optinfo::add_string): Delete.
3078 (optinfo::add_printf): Delete.
3079 (optinfo::add_printf_va): Delete.
3080 (optinfo::add_gimple_stmt): Delete.
3081 (optinfo::add_gimple_expr): Delete.
3082 (optinfo::add_tree): Delete.
3083 (optinfo::add_symtab_node): Delete.
3084 (optinfo::add_dec): Delete.
3085 (optinfo::add_poly_int): Delete.
3086 (optinfo_item::optinfo_item): Remove "owned" param.
3087 (class optinfo_item): Remove field "m_owned".
3089 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3092 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3093 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3094 requested variable alignment.
3095 (expand_one_ssa_partition): Likewise.
3096 (expand_one_var): Likewise.
3098 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3100 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3101 to speculation_safe_value_not_needed.
3103 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3105 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3106 * targhooks.c (speculation_safe_value_not_needed): New function.
3107 * target.def (have_speculation_safe_value): Update documentation.
3108 * doc/tm.texi: Regenerated.
3110 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3112 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3113 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3115 (despeculate_copy<ALLI:mode>_insn): New insn.
3116 (despeculate_copyti_insn): New insn.
3117 (despeculate_simple<ALLI:mode>): New insn
3118 (despeculate_simpleti): New insn.
3119 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3121 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3122 aarch64_speculation_safe_value.
3123 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3125 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3127 * config/aarch64/aarch64-speculation.cc: New file.
3128 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3129 before pass_reorder_blocks.
3130 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3132 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3133 X14 and X15 when tracking speculation.
3134 * config/aarch64/aarch64.md (register name constants): Add
3135 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3136 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3137 (speculation_barrier): New insn attribute.
3138 (cmp<mode>): Allow SP in comparisons.
3139 (speculation_tracker): New insn.
3140 (speculation_barrier): Add speculation_barrier attribute.
3141 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3142 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3143 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3145 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3147 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3148 aarch64_track_speculation is true.
3149 (tb<optab><mode>1): Likewise.
3150 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3151 generate CB[N]Z when tracking speculation.
3152 (aarch64_split_compare_and_swap): Likewise.
3153 (aarch64_split_atomic_op): Likewise.
3155 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3157 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3159 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3161 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3162 (speculation_barrier): New insn.
3164 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3166 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3167 * config/arm/arm.md (speculation_barrier): New expand.
3168 (speculation_barrier_insn): New pattern.
3170 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3172 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3173 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3174 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3175 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3177 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3178 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3179 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3180 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3181 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3182 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3183 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3184 * builtins.c (expand_speculation_safe_value): New function.
3185 (expand_builtin): Call it.
3186 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3187 * doc/extend.texi: Document __builtin_speculation_safe_value.
3188 * doc/md.texi: Document "speculation_barrier" pattern.
3189 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3190 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3191 * doc/tm.texi: Regenerated.
3192 * target.def (have_speculation_safe_value, speculation_safe_value): New
3194 * targhooks.c (default_have_speculation_safe_value): New function.
3195 (default_speculation_safe_value): New function.
3196 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3197 (default_speculation_safe_value): Add prototype.
3199 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3201 * dump-context.h (dump_context::dump_loc): New decl.
3202 * dumpfile.c (dump_context::dump_loc): New member function.
3203 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3204 and dump_gimple_stmt.
3205 (dump_context::dump_gimple_expr_loc): Likewise, using
3207 (dump_context::dump_generic_expr_loc): Likewise, using
3209 (dump_context::dump_printf_loc_va): Likewise, using
3211 (dump_context::begin_scope): Explicitly using the global function
3212 "dump_loc", rather than the member function.
3214 2018-07-31 Martin Sebor <msebor@redhat.com>
3216 PR tree-optimization/86741
3217 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3219 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3221 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3222 depend on whether prefetch instructions will be emitted or not.
3223 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3224 will be emitted or not.
3225 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3226 (TARGET_SETMEM_PFD): New macros.
3228 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3230 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3231 (NULL_STMT_VEC_INFO): Delete.
3232 (stmt_vec_info::operator*): Likewise.
3233 (stmt_vec_info::operator gimple *): Likewise.
3234 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3235 of NULL_STMT_VEC_INFO.
3236 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3237 (vect_reassociating_reduction_p): Likewise.
3238 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3239 (vectorizable_store): Likewise.
3240 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3241 (vec_info::free_stmt_vec_infos): Likewise.
3243 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3245 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3246 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3248 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3250 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3251 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3252 (vec_info::free_stmt_vec_info): New private member functions.
3253 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3254 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3255 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3256 set_stmt_vec_info_vec and free_stmt_vec_infos.
3257 * tree-vect-loop.c (_loop_vec_info): Remove call to
3258 set_stmt_vec_info_vec.
3259 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3260 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3261 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3262 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3263 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3264 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3265 with the clearing in the xcalloc.
3266 (stmt_vec_info_vec): Delete.
3267 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3268 (vectorize_loops): Likewise.
3269 (vec_info::~vec_info): Remove argument from call to
3270 free_stmt_vec_infos.
3271 (vec_info::add_stmt): Remove vinfo argument from call to
3274 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3276 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3277 rather than a gimple stmt.
3278 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3279 information for pattern statements when passed the original
3280 statement; instead wait to be passed the pattern statement itself.
3281 Don't call set_vinfo_for_stmt here.
3282 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3283 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3284 stmt_vec_infos here.
3285 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3286 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3287 stmt_vec_infos entry.
3289 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3291 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3292 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3293 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3294 * tree-vect-stmts.c (vectorizable_call): Likewise.
3295 (vectorizable_simd_clone_call): Likewise.
3297 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3299 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3300 * tree-vectorizer.c (vec_info::remove_stmt): New function.
3301 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3302 * tree-vect-loop.c (vect_transform_loop): Likewise.
3303 * tree-vect-slp.c (vect_schedule_slp): Likewise.
3304 * tree-vect-stmts.c (vect_remove_stores): Likewise.
3306 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3308 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3309 (vect_dr_stmt): Delete.
3310 * tree-vectorizer.c (vec_info::lookup_dr): New function.
3311 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3313 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3314 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3315 (vect_verify_datarefs_alignment, vect_peeling_supportable)
3316 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3317 (vect_analyze_data_refs): Likewise.
3318 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
3320 (vect_find_same_alignment_drs): Likewise.
3321 (vect_slp_analyze_node_dependences): Update calls accordingly.
3322 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3323 instead of DR_VECT_AUX.
3324 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3325 of a vector data references. Use vec_info::lookup_dr instead of
3327 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3328 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3329 instead of DR_VECT_AUX.
3331 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3333 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3335 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3337 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3338 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3339 (vect_gen_prolog_loop_niters): Likewise.
3341 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3343 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3344 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3345 (vect_known_alignment_in_bytes, vect_dr_behavior)
3346 (vect_get_scalar_dr_size): Take references as dr_vec_infos
3347 instead of data_references. Update calls to other routines for
3348 which the same change has been made.
3349 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3350 dr_vec_infos instead of stmt_vec_infos.
3351 (vect_analyze_data_ref_dependence): Update call accordingly.
3352 (vect_slp_analyze_data_ref_dependence)
3353 (vect_record_base_alignments): Use DR_VECT_AUX.
3354 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3355 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3356 (vector_alignment_reachable_p, vect_get_data_access_cost)
3357 (vect_peeling_supportable, vect_analyze_group_access_1)
3358 (vect_analyze_group_access, vect_analyze_data_ref_access)
3359 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3360 (vect_compile_time_alias, vect_small_gap_p)
3361 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3362 (vect_supportable_dr_alignment): Take references as dr_vec_infos
3363 instead of data_references. Update calls to other routines for
3364 which the same change has been made.
3365 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3366 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3367 (vect_slp_analyze_and_verify_node_alignment)
3368 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3369 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3370 (vect_setup_realignment): Use dr_vec_infos. Update calls after
3372 (_vect_peel_info::dr): Replace with...
3373 (_vect_peel_info::dr_info): ...this new field.
3374 (vect_peeling_hash_get_most_frequent)
3375 (vect_peeling_hash_choose_best_peeling): Update accordingly.
3376 (vect_peeling_hash_get_lowest_cost):
3377 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
3378 routines for which the same change has been made.
3379 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
3381 * tree-vect-loop-manip.c (get_misalign_in_elems)
3382 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
3384 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3385 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3386 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3387 (get_group_load_store_type, get_negative_load_store_type)
3388 (vect_get_data_ptr_increment, vectorizable_store)
3389 (vectorizable_load): Likewise.
3390 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3391 Update calls to other routines for which the same change has been made.
3393 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3395 * tree-vectorizer.h (vec_info::move_dr): New member function.
3396 (dataref_aux): Rename to...
3397 (dr_vec_info): ...this and add "dr" and "stmt" fields.
3398 (_stmt_vec_info::dr_aux): Update accordingly.
3399 (_stmt_vec_info::data_ref_info): Delete.
3400 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3401 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3402 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3403 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3405 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
3406 (STMT_VINFO_DR_INFO): New macro.
3407 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3408 (set_dr_misalignment): Update after rename of dataref_aux.
3409 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
3410 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3411 initialization of STMT_VINFO_DATA_REF.
3412 * tree-vectorizer.c (vec_info::move_dr): New function.
3413 * tree-vect-patterns.c (vect_recog_bool_pattern)
3414 (vect_recog_mask_conversion_pattern)
3415 (vect_recog_gather_scatter_pattern): Use it.
3416 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3417 the "dr" and "stmt" fields of dr_vec_info instead of
3418 STMT_VINFO_DATA_REF.
3420 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3422 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3423 (is_pattern_stmt_p): Use it.
3424 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3425 on pattern statements.
3427 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3429 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3430 original stmt as a stmt_vec_info rather than a gimple stmt.
3431 (vect_pattern_recog_1): Take the statement directly as a
3432 stmt_vec_info, rather than via a gimple_stmt_iterator.
3433 Update call to vect_mark_pattern_stmts.
3434 (vect_pattern_recog): Update calls accordingly.
3436 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3438 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3439 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3440 a vect_def_type for the first argument.
3441 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3442 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
3443 operand if it isn't defined by a vectorized statement.
3444 (vect_build_gather_load_calls): Remove the mask_dt argument and
3445 update calls to vect_get_vec_def_for_stmt_copy.
3446 (vectorizable_bswap): Likewise the dt argument.
3447 (vectorizable_call): Update calls to vectorizable_bswap and
3448 vect_get_vec_def_for_stmt_copy.
3449 (vectorizable_simd_clone_call, vectorizable_assignment)
3450 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3451 (vectorizable_comparison): Update calls to
3452 vect_get_vec_def_for_stmt_copy.
3453 (vectorizable_store): Likewise. Remove now-unnecessary calls to
3455 (vect_get_loop_based_defs): Remove dt argument and update call
3456 to vect_get_vec_def_for_stmt_copy.
3457 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3458 and vect_get_vec_def_for_stmt_copy.
3459 (vectorizable_load): Update calls to vect_build_gather_load_calls
3460 and vect_get_vec_def_for_stmt_copy.
3461 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3462 (vectorizable_reduction, vectorizable_live_operation): Update calls
3463 to vect_get_vec_def_for_stmt_copy.
3465 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3467 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3468 and gimple stmt arguments with a stmt_vec_info.
3469 (vect_record_base_alignments): Update calls accordingly.
3470 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3471 and gimple stmt arguments with a stmt_vec_info.
3472 (vect_build_slp_tree_1): Remove vinfo argument and update call
3473 to vect_record_max_nunits.
3474 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3475 and vect_record_max_nunits.
3477 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3479 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3480 file and take a stmt_vec_info instead of a gimple stmt.
3481 (supportable_widening_operation, vect_finish_replace_stmt)
3482 (vect_finish_stmt_generation, vect_get_store_rhs)
3483 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3484 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3485 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3486 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3487 (vect_create_data_ref_ptr, bump_vector_ptr)
3488 (vect_permute_store_chain, vect_setup_realignment)
3489 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3490 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3491 (vectorizable_reduction, vectorizable_induction)
3492 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3493 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3494 than gimple stmts as arguments.
3495 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3496 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3497 (can_group_stmts_p, vect_check_gather_scatter)
3498 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3499 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3500 (vect_permute_load_chain, vect_shift_permute_load_chain)
3501 (vect_transform_grouped_load)
3502 (vect_record_grouped_load_vectors): Likewise.
3503 * tree-vect-loop.c (vect_fixup_reduc_chain)
3504 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3505 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3506 (vectorizable_reduction, vectorizable_induction)
3507 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3508 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3509 (vect_get_load_store_mask): Likewise.
3510 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3511 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3512 * tree-vect-stmts.c (vect_mark_relevant)
3513 (is_simple_and_all_uses_invariant)
3514 (exist_non_indexing_operands_for_use_p, process_use)
3515 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3516 (vect_get_vec_def_for_operand, vect_get_vec_defs)
3517 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3518 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3519 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3520 (get_negative_load_store_type, get_load_store_type)
3521 (vect_check_load_store_mask, vect_check_store_rhs)
3522 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3523 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3524 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3525 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3526 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3527 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3528 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3529 (supportable_widening_operation): Likewise.
3531 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3533 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3534 a stmt_vec_info instead of a gcall.
3535 (vect_check_gather_scatter): Update call accordingly.
3536 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3538 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3539 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3540 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3541 instead of a gimple stmt.
3542 (vect_transform_loop): Update calls accordingly.
3543 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3544 stmt_vec_infos instead of gimple stmts.
3545 (vect_analyze_slp_instance): Update use accordingly.
3546 * tree-vect-stmts.c (read_vector_array, write_vector_array)
3547 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3548 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3549 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3550 (vect_gen_widened_results_half, vect_get_loop_based_defs)
3551 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3552 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3553 down to subroutines.
3555 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3557 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3558 of the worklist from a vector of gimple stmts to a vector of
3560 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3561 (vect_mark_stmts_to_be_vectorized): Likewise
3563 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3565 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3566 statement before passing it to vect_analyze_stmt.
3567 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3568 the chain of phi vector definitions. Track the exit phi via its
3570 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3571 STMT_VINFO_REDUC_DEF.
3572 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3573 stmt_vec_infos to handle the statement chains.
3574 (vect_get_slp_defs): Record the first statement in the node
3575 using a stmt_vec_info.
3576 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3577 statements here and pass their stmt_vec_info down to subroutines.
3578 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3579 down to vect_finish_stmt_generation.
3580 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3581 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3582 stmt_vec_infos to subroutines.
3583 (vect_remove_stores): Use stmt_vec_infos to handle the statement
3586 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3588 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3589 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3590 (vect_permute_store_chain, vect_setup_realignment)
3591 (vect_permute_load_chain, vect_shift_permute_load_chain)
3592 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3593 stmts internally, and when passing values to other vectorizer routines.
3594 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3595 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3596 (vect_analyze_loop_operations, get_initial_def_for_reduction)
3597 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3598 (vectorizable_reduction, vectorizable_induction)
3599 (vectorizable_live_operation, vect_transform_loop_stmt)
3600 (vect_transform_loop): Likewise.
3601 * tree-vect-patterns.c (vect_reassociating_reduction_p)
3602 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3603 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3604 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3605 (vect_slp_analyze_node_operations_1): Likewise.
3606 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3607 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3608 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3609 (vect_finish_stmt_generation_1, get_group_load_store_type)
3610 (get_load_store_type, vect_build_gather_load_calls)
3611 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3612 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3613 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3614 (vectorizable_store, vectorizable_load, vectorizable_condition)
3615 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3616 (supportable_widening_operation): Likewise.
3617 (vect_get_vector_types_for_stmt): Likewise.
3618 * tree-vectorizer.h (vect_dr_behavior): Likewise.
3620 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3622 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3623 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3624 (vect_permute_store_chain, vect_permute_load_chain)
3625 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3626 repeated stmt_vec_info lookups.
3627 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3628 (vect_update_ivs_after_vectorizer): Likewise.
3629 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3630 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3631 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3632 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3633 (vect_bb_slp_scalar_cost): Likewise.
3634 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3636 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3638 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3639 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3640 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3641 to get gassigns and gcalls, rather than operating on generc gimple
3643 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3644 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3645 (vectorizable_load, vect_analyze_stmt): Likewise.
3646 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3648 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3650 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3651 return stmt_vec_infos rather than gimple stmts. Do not accept
3653 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3655 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3656 Update use of get_later_stmt.
3657 (vect_get_constant_vectors): Update call accordingly.
3658 (vect_schedule_slp_instance): Likewise
3659 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3660 (vect_slp_analyze_instance_dependence): Likewise.
3661 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3663 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3665 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3666 (stmt_info_for_cost::stmt_info): ...this new field.
3667 (add_stmt_costs): Update accordingly.
3668 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3669 (vect_get_known_peeling_cost): Likewise.
3670 (vect_estimate_min_profitable_iters): Likewise.
3671 * tree-vect-stmts.c (record_stmt_cost): Likewise.
3673 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3675 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3676 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3677 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3679 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3681 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3683 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3684 a gimple stmt to a stmt_vec_info.
3685 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3687 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3689 * tree-vectorizer.h (vec_info::grouped_stores): Change from
3690 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3691 (_loop_vec_info::reduction_chains): Likewise.
3692 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3694 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3696 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3698 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3699 a gimple stmt to a stmt_vec_info.
3700 (_stmt_vec_info::next_element): Likewise.
3701 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3702 (vect_slp_analyze_and_verify_node_alignment)
3703 (vect_analyze_group_access_1, vect_analyze_group_access)
3704 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3705 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3706 (vect_supportable_dr_alignment): Update accordingly.
3707 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3708 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3709 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3710 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3711 * tree-vect-slp.c (vect_build_slp_tree_1)
3712 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3713 (vect_split_slp_store_group, vect_analyze_slp_instance)
3714 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3715 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3716 (get_group_load_store_type, get_load_store_type)
3717 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3718 (vect_transform_stmt, vect_remove_stores): Likewise.
3720 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3722 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3724 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3725 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3726 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3727 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3728 (vector_alignment_reachable_p, vect_get_data_access_cost)
3729 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3730 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3731 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3732 (vect_analyze_group_access_1, vect_analyze_group_access)
3733 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3734 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3735 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3736 result of vect_dr_stmt and use the stmt_vec_info instead of
3737 the associated gimple stmt.
3738 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3739 (vect_gen_prolog_loop_niters): Likewise.
3740 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3742 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3744 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
3745 to a vec<stmt_vec_info>.
3746 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
3747 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
3749 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
3750 to a vec<stmt_vec_info>.
3751 (bst_traits::value_type, bst_traits::value_type): Likewise.
3752 (bst_traits::hash): Update accordingly.
3753 (vect_get_and_check_slp_defs): Change the stmts parameter from
3754 a vec<gimple *> to a vec<stmt_vec_info>.
3755 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
3756 (vect_build_slp_tree): Likewise.
3757 (vect_build_slp_tree_2): Likewise. Update uses of
3758 SLP_TREE_SCALAR_STMTS.
3759 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
3760 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
3761 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
3762 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
3763 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
3764 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
3765 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
3766 (vect_get_constant_vectors, vect_get_slp_defs)
3767 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
3768 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
3769 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3770 instead of gimple stmts.
3771 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3772 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3773 (vect_slp_analyze_instance_dependence): Update uses of
3774 SLP_TREE_SCALAR_STMTS.
3775 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3776 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3777 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3778 (get_initial_defs_for_reduction): Likewise.
3779 (vect_create_epilog_for_reduction): Likewise.
3780 (vectorize_fold_left_reduction): Likewise.
3781 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3782 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3783 (can_vectorize_live_stmts): Likewise.
3785 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3787 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3788 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3789 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3791 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3793 (gather_scalar_reductions): Update after above interface changes.
3794 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3795 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3797 (vect_force_simple_reduction): Likewise.
3798 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3799 LOOP_VINFO_REDUCTIONS.
3800 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3802 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3804 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3805 a gimple stmt to a stmt_vec_info.
3806 * tree-vect-loop.c (vect_active_double_reduction_p)
3807 (vect_force_simple_reduction, vectorizable_reduction): Update
3810 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3812 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3813 vec<gimple *> to a vec<stmt_vec_info>.
3814 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3815 the reduction_phis argument from a vec<gimple *> to a
3817 (vectorizable_reduction): Likewise the phis local variable that
3818 is passed to vect_create_epilog_for_reduction. Update for new type
3819 of SLP_TREE_VEC_STMTS.
3820 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3821 (vectorizable_live_operation): Likewise.
3822 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3823 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3825 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3827 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3828 a gimple stmt to a stmt_vec_info.
3829 (vectorizable_condition, vectorizable_live_operation)
3830 (vectorizable_reduction, vectorizable_induction): Pass back the
3831 vectorized statement as a stmt_vec_info.
3832 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
3833 use of STMT_VINFO_VEC_STMT.
3834 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
3835 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
3836 as stmt_vec_infos rather than gimple stmts.
3837 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
3839 (vectorizable_live_operation): Likewise.
3840 (vectorizable_reduction, vectorizable_induction): Likewise,
3841 updating use of STMT_VINFO_VEC_STMT.
3842 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
3843 of STMT_VINFO_VEC_STMT.
3844 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
3845 (vectorizable_simd_clone_call, vectorizable_conversion)
3846 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3847 (vectorizable_store, vectorizable_load, vectorizable_condition)
3848 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
3849 from a gimple stmt to a stmt_vec_info.
3850 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
3851 pointer to a stmt_vec_info to the vectorizable_* routines.
3853 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3855 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
3856 a gimple stmt to a stmt_vec_info.
3857 (is_pattern_stmt_p): Update accordingly.
3858 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
3859 (vect_record_grouped_load_vectors): Likewise.
3860 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3861 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
3862 (vect_model_reduction_cost): Likewise.
3863 (vect_create_epilog_for_reduction): Likewise.
3864 (vectorizable_reduction, vectorizable_induction): Likewise.
3865 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3866 Return the stmt_vec_info for the pattern statement.
3867 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
3868 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
3869 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3870 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
3871 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3872 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
3873 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
3874 (free_stmt_vec_info, vect_is_simple_use): Likewise.
3876 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3878 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
3879 (vect_finish_stmt_generation): Likewise.
3880 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3881 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
3882 (vect_build_gather_load_calls): Use the return value of the above
3883 functions instead of a separate call to vinfo_for_stmt. Use narrow
3884 scopes for the input gimple stmt and wider scopes for the associated
3885 stmt_vec_info. Use vec_info::lookup_def when setting these
3886 stmt_vec_infos from an SSA_NAME definition.
3887 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3888 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3889 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3890 (vectorizable_store, vectorizable_load, vectorizable_condition)
3891 (vectorizable_comparison): Likewise.
3892 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
3893 (vectorizable_reduction): Likewise.
3895 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3897 * tree-vectorizer.h (vect_is_simple_use): Add an optional
3898 stmt_vec_info * parameter before the optional gimple **.
3899 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3900 (process_use, vect_get_vec_def_for_operand_1): Update callers.
3901 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
3902 * tree-vect-loop.c (vectorizable_reduction): Likewise.
3903 (vectorizable_live_operation): Likewise.
3904 * tree-vect-patterns.c (type_conversion_p): Likewise.
3905 (vect_look_through_possible_promotion): Likewise.
3906 (vect_recog_rotate_pattern): Likewise.
3907 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3909 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3911 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
3912 a typedef to a wrapper class.
3913 (NULL_STMT_VEC_INFO): New macro.
3914 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
3915 (stmt_vec_info::operator*): New function.
3916 (stmt_vec_info::operator gimple *): Likewise.
3917 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
3918 (add_stmt_costs): Likewise.
3919 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3920 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3921 (vect_get_known_peeling_cost): Likewise.
3922 (vect_estimate_min_profitable_iters): Likewise.
3923 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3924 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
3925 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3926 (vectorizable_store, free_stmt_vec_infos): Likewise.
3927 (new_stmt_vec_info): Change return type of xcalloc to
3930 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3932 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
3933 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
3934 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
3935 a single_imm_use-based sequence.
3936 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
3938 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3940 * tree-vectorizer.h (vec_info::lookup_def): Declare.
3941 * tree-vectorizer.c (vec_info::lookup_def): New function.
3942 * tree-vect-patterns.c (vect_get_internal_def): Use it.
3943 (vect_widened_op_tree): Likewise.
3944 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3945 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
3946 (vectorizable_reduction): Likewise.
3947 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
3949 (vect_is_slp_reduction): Update calls accordingly. Use
3950 vec_info::lookup_def.
3951 (vect_is_simple_reduction): Likewise
3952 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
3954 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3956 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
3957 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
3958 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
3960 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
3961 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
3962 (vect_update_vf_for_slp, vect_analyze_loop_operations)
3963 (vect_is_slp_reduction, vectorizable_induction)
3964 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
3965 * tree-vect-patterns.c (vect_init_pattern_stmt):
3966 (vect_determine_min_output_precision_1, vect_determine_precisions)
3967 (vect_pattern_recog): Likewise.
3968 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
3969 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
3970 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
3971 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3972 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
3973 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
3974 info field from a loop to a loop_vec_info.
3976 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3978 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
3979 (vec_info::add_stmt): Declare.
3980 * tree-vectorizer.c (vec_info::add_stmt): New function.
3981 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
3982 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
3983 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3984 (vectorizable_induction): Likewise.
3985 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
3986 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3987 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
3988 (vectorizable_load): Likewise.
3989 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3990 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
3991 (vect_recog_gather_scatter_pattern): Likewise.
3992 (append_pattern_def_seq): Likewise. Remove a check that is
3993 performed by add_stmt itself.
3995 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3997 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
3998 which make_ssa_name was called with new_stmt before new_stmt
4001 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4003 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4005 (vect_is_slp_reduction): ...here...
4006 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4007 that are already known to be false.
4009 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4011 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4012 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4013 STMT_VINFO_NUM_SLP_USES when it's true.
4014 (vect_free_slp_instance): Add a final_p parameter and pass it to
4016 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4017 (vect_analyze_slp_instance): Likewise.
4018 (vect_slp_analyze_operations): Likewise.
4019 (vect_slp_analyze_bb_1): Likewise.
4020 * tree-vectorizer.c (vec_info): Likewise.
4021 * tree-vect-loop.c (vect_transform_loop): Likewise.
4023 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4025 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4026 function is not called for second and subsequent members of
4029 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4031 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4032 cases for nested loops from here to ...
4033 (vect_create_epilog_for_reduction): ...here. Only call
4034 vect_is_simple_use for inner-loop reductions.
4036 2018-07-31 Martin Liska <mliska@suse.cz>
4038 PR gcov-profile/85338
4039 PR gcov-profile/85350
4040 PR gcov-profile/85372
4041 * profile.c (struct location_triplet): New.
4042 (struct location_triplet_hash): Likewise.
4043 (output_location): Do not output a BB that
4044 is already recorded for a line.
4045 (branch_prob): Use streamed_locations.
4047 2018-07-31 Martin Liska <mliska@suse.cz>
4049 PR gcov-profile/85370
4050 * coverage.c (coverage_begin_function): Do not mark target
4051 clones as artificial functions.
4053 2018-07-31 Martin Liska <mliska@suse.cz>
4055 PR gcov-profile/83813
4056 PR gcov-profile/84758
4057 PR gcov-profile/85217
4058 PR gcov-profile/85332
4059 * profile.c (branch_prob): Do not record GOTO expressions
4060 for GIMPLE statements which locations are already streamed.
4062 2018-07-31 Olivier Hainque <hainque@adacore.com>
4064 * gcc.c (handle_spec_function): Accept a soft_matched_part
4065 argument, as do_spec_1. Pass it down to ...
4066 (eval_spec_function): Accept a soft_matched_part argument,
4067 and pass it down to ...
4068 (do_spec_2): Accept a soft_matched_part argument, and pass
4069 it down to do_spec_1.
4070 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4071 (handle_braces): Update call to handle_spec_function.
4072 (driver::set_up_specs): Update calls to do_spec_2.
4073 (compare_debug_dump_opt_spec_function): Likewise.
4074 (compare_debug_self_opt_spec_function): Likewise.
4076 2018-07-31 Olivier Hainque <hainque@adacore.com>
4078 * common.opt (nolibc): New option.
4079 * doc/invoke.texi (Link Options): Document it.
4080 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4081 * config/alpha/linux.h: Likewise.
4082 * config/arc/elf.h: Likewise.
4083 * config/arm/uclinux-elf.h: Likewise.
4084 * config/arm/unknown-elf.h: Likewise.
4085 * config/avr/avrlibc.h: Likewise.
4086 * config/bfin/bfin.h: Likewise.
4087 * config/bfin/linux.h: Likewise.
4088 * config/bfin/uclinux.h: Likewise.
4089 * config/darwin.h: Likewise.
4090 * config/darwin10.h: Likewise.
4091 * config/darwin12.h: Likewise.
4092 * config/gnu-user.h: Likewise.
4093 * config/lm32/uclinux-elf.h: Likewise.
4094 * config/pa/pa-hpux11.h: Likewise.
4095 * config/pa/pa64-hpux.h: Likewise.
4096 * config/sparc/sparc.h: Likewise.
4098 2018-07-31 Olivier Hainque <hainque@adacore.com>
4100 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4101 undefined variables.
4103 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4106 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4109 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4111 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4112 terminated string literal.
4114 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4116 PR rtl-optimization/85160
4117 * combine.c (is_just_move): New function.
4118 (try_combine): Allow combining two instructions into two if neither of
4119 the original instructions was a move.
4121 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4124 * doc/extend.texi (Global Register Variables): Discourage use of type
4126 (Local Register Variables): Likewise.
4128 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4130 PR tree-optimization/86506
4131 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4133 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4136 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4137 hard_regno, make sure no insn between `from` and `to` clobbers it.
4139 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4140 Tom de Vries <tdevries@suse.de>
4142 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4143 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4144 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4145 PTX_DEFAULT_RUNTIME_DIM.
4146 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4148 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4150 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4151 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4152 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4154 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4156 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4158 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4159 predicate to reflect toc fusion has been deleted.
4160 (toc_fusion_mem_raw): Delete, no longer used.
4161 (toc_fusion_mem_wrapped): Likewise.
4162 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4164 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4165 Delete, no longer used.
4166 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4167 meant to be used for toc fusion.
4168 (rs6000_debug_print_mode): Delete toc fusion debugging.
4169 (rs6000_debug_reg_global): Likewise.
4170 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4171 fusion and secondary reload support that were never used.
4172 (rs6000_option_override_internal): Delete TOC fusion, that was only
4173 partially defined, and it did not work unless you also used the
4175 (rs6000_legitimate_address_p): Delete TOC fusion support.
4176 (rs6000_opt_masks): Likewise.
4177 (fusion_wrap_memory_address): Delete function, no longer used.
4178 (fusion_split_address); Delete TOC fusion support.
4179 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4180 longer used with toc fusion being deleted.
4181 (TARGET_TOC_FUSION_FP): Likewise.
4182 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4184 (toc fusion spliter): Delete TOC fusion support.
4185 (toc_fusionload_<mode>): Likewise.
4186 (toc_fusionload_di): Likewise.
4187 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4188 longer needs to be named. Rename predicate to delete TOC fusion.
4189 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4190 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4191 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4192 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4193 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4195 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4197 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4198 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4199 __int128 in built-in function prototypes.
4200 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4201 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4203 2018-07-27 Martin Sebor <msebor@redhat.com>
4205 PR tree-optimization/86696
4206 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4207 types, including enums.
4208 (handle_char_store): Be prepared for the above function to fail.
4210 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4212 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4213 when optimization level is lower than 2 or optimize for size.
4215 2018-07-26 Martin Sebor <msebor@redhat.com>
4217 PR tree-optimization/86043
4218 PR tree-optimization/86042
4219 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4220 (get_string_cst_length): Rename...
4221 (get_min_string_length): ...to this. Add argument.
4222 (handle_char_store): Extend to handle multi-character stores by
4224 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4225 * tree.h (initializer_zerop): Add argument.
4227 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4230 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4231 declare target to variables if they have always,{to,from,tofrom} map
4234 2018-07-26 Martin Liska <mliska@suse.cz>
4237 * lto-wrapper.c: Add linker_output as prefix
4238 for ltrans_output_file.
4240 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4242 PR rtl-optimization/85805
4243 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4244 value for hard registers if that was written in the same mode.
4246 2018-07-26 Martin Liska <mliska@suse.cz>
4248 PR gcov-profile/86536
4249 * gcov.c (format_gcov): Use printf format %.*f directly
4250 and do not handle special values.
4252 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4254 * common/config/arc/arc-common.c (arc_option_optimization_table):
4255 Update default optimizations for size.
4257 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4259 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4260 * config/arc/constraints.md (CfZ): New constraint.
4261 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4262 (subsf3_fpu): Likewise.
4263 (cmpsf_fpu): Likewise.
4264 (cmpsf_fpu_uneq): Likewise.
4266 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4268 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4270 (arc_is_uncached_mem_p): uncached applies to both the variable and
4273 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4275 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4278 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4280 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4281 field "m_scopes" from vec to auto_vec.
4283 2018-07-25 Martin Liska <mliska@suse.cz>
4285 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4288 2018-07-25 Richard Biener <rguenther@suse.de>
4291 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4292 special wrt context_die late.
4293 (gen_subprogram_die): Re-use DIEs in local scope.
4295 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
4297 PR tree-optimization/86644
4298 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
4300 2018-07-25 Martin Liska <mliska@suse.cz>
4303 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4304 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4306 2018-07-25 Martin Liska <mliska@suse.cz>
4309 * params.def: Explain ASan abbreviation and provide
4310 a documentation link.
4312 2018-07-24 Martin Sebor <msebor@redhat.com>
4314 PR tree-optimization/86622
4315 PR tree-optimization/86532
4316 * builtins.h (string_length): Declare.
4317 * builtins.c (c_strlen): Correct handling of non-constant offsets.
4318 (check_access): Be prepared for non-constant length ranges.
4319 (string_length): Make extern.
4320 * expr.c (string_constant): Only handle the minor non-constant
4321 array index. Use string_constant to compute the length of
4322 a generic string constant.
4324 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
4326 PR tree-optimization/86618
4327 * tree-vect-stmts.c (vectorizable_call): Don't take the address
4328 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4330 2018-07-24 David Malcolm <dmalcolm@redhat.com>
4332 PR tree-optimization/86636
4333 * json.cc (json::object::set): Fix comment. Add assertions.
4334 (json::array::append): Move here from json.h. Add comment and an
4336 (json::string::string): Likewise.
4337 * json.h (json::array::append): Move to json.cc.
4338 (json::string::string): Likewise.
4339 * optinfo-emit-json.cc
4340 (optrecord_json_writer::impl_location_to_json): Assert that we
4341 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4342 wrapper around it. Expand the location once, rather than three
4344 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4345 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4347 (optrecord_json_writer::optinfo_to_json): Likewise, in four
4348 places. Fix some overlong lines.
4350 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
4352 * config/aarch64/aarch64-simd.md
4353 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4354 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4355 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4356 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4357 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4358 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4359 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4360 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4361 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4363 2018-07-24 Jakub Jelinek <jakub@redhat.com>
4366 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4367 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
4368 and abs_d == d, do the power of two handling if profitable.
4370 2018-07-24 Richard Biener <rguenther@suse.de>
4372 * match.pd: Add BIT_FIELD_REF canonicalizations.
4374 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4377 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4379 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4381 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4382 terminated STRING_CST object.
4384 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4386 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4388 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4390 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4391 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4392 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4393 the elements into a register.
4394 (rs6000_split_v4si_init_di_reg): Delete.
4395 (rs6000_split_v4si_init): Delete.
4396 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4397 (vsx_init_v4si): Rewrite as a define_expand.
4399 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4401 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4402 zero_extend argument from memory): New.
4404 2018-07-22 Martin Sebor <msebor@redhat.com>
4407 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4408 diagnosing calls with unknown arguments unless -Walloca-larger-than
4409 is restricted to less than PTRDIFF_MAX bytes.
4411 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
4413 * doc/gcov.texi (Invoking Gcov): Editorial changes.
4415 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4417 * pretty-print.c (text_info::set_location): Remove redundant
4418 "line_table" parameter from call to rich_location::set_range.
4420 2018-07-20 Martin Sebor <msebor@redhat.com>
4423 * builtins.c (expand_builtin_alloca): Adjust.
4424 * calls.c (alloc_max_size): Simplify.
4425 * cgraphunit.c (cgraph_node::expand): Adjust.
4426 * common.opt (larger_than_size, warn_frame_larger_than): Remove
4428 (frame_larger_than_size): Same.
4429 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4430 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4432 * doc/invoke.texi (GCC Command Options): Document option arguments.
4433 Explain byte-size arguments and suffixes.
4434 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4435 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4436 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4437 * doc/options.texi (UInteger): Expand.
4438 (Host_Wide_Int, ByteSize): Document new properties.
4439 * final.c (final_start_function_1): Include sizes in an error message.
4440 * function.c (frame_offset_overflow): Same.
4441 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4442 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4443 Diagnose unbounded alloca calls only for limits of less than
4445 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
4446 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
4448 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
4449 only for limits of less than PTRDIFF_MAX.
4450 * langhooks-def.h (lhd_handle_option): Change function argument
4452 * langhooks.c (lhd_handle_option): Same.
4453 * langhooks.h (handle_option): Same.
4454 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4456 (var_type, var_type_struct): Same.
4457 (var_set): Handle ByteSize flag.
4458 * optc-gen.awk: Add comments to output to ease debugging. Make
4459 use of HOST_WIDE_INT where appropriate.
4460 * opts-gen-save.awk: Use %lx to format unsigned long.
4461 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4462 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4463 arguments. Parse bytes-size suffixes.
4464 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4465 (enum_value_to_arg): Same.
4466 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
4467 (handle_option): Adjust.
4468 (generate_option): Change function argument to HOST_WIDE_INT.
4469 (cmdline_handle_error): Adjust.
4470 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4471 (set_option): Change function argument to HOST_WIDE_INT.
4472 (option_enabled): Handle cl_host_wide_int.
4473 (get_option_state): Handle CLVC_SIZE.
4474 (control_warning_option): Same.
4475 * opts.c (common_handle_option): Change function argument to
4476 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4477 OPT_Wvla_larger_than_.
4478 * opts.h (enum cl_var_type): Add an enumerator.
4479 * stor-layout.c (layout_decl): Print a more meaningful warning.
4480 * toplev.c (output_stack_usage): Adjust.
4482 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4484 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4485 call to inline_expand_builtin_string_cmp.
4486 (expand_builtin_strcmp): Likewise.
4487 (expand_builtin_strncmp): Likewise.
4488 (inline_string_cmp): Delete the last parameter, change char_type_node
4489 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4491 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4492 the inlining expansion on target where the type of the call has same or
4493 narrower precision than unsigned char.
4495 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4497 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4498 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4499 * common.opt (fsave-optimization-record): New option.
4500 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4501 * doc/invoke.texi (-fsave-optimization-record): New option.
4502 * dumpfile.c: Include "optinfo-emit-json.h".
4503 (struct kv_pair): Move to coretypes.h.
4504 (optgroup_options): Make non-static.
4505 (dump_context::end_scope): Call
4506 optimization_records_maybe_pop_dump_scope.
4507 * dumpfile.h (optgroup_options): New decl.
4508 * json.cc: New file.
4510 * optinfo-emit-json.cc: New file.
4511 * optinfo-emit-json.h: New file.
4512 * optinfo.cc: Include "optinfo-emit-json.h".
4513 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4514 (optinfo_enabled_p): Check optimization_records_enabled_p.
4515 (optinfo_wants_inlining_info_p): Likewise.
4516 * optinfo.h: Update comment.
4517 * profile-count.c (profile_quality_as_string): New function.
4518 * profile-count.h (profile_quality_as_string): New decl.
4519 (profile_count::quality): New accessor.
4520 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4521 and optinfo_emit_json_cc_tests.
4522 * selftest.h (selftest::json_cc_tests): New decl.
4523 (selftest::optinfo_emit_json_cc_tests): New decl.
4524 * toplev.c: Include "optinfo-emit-json.h".
4525 (compile_file): Call optimization_records_finish.
4526 (do_compile): Call optimization_records_start.
4527 * tree-ssa-live.c: Include optinfo.h.
4528 (remove_unused_scope_block_p): Retain inlining information if
4529 optinfo_wants_inlining_info_p returns true.
4531 2018-07-20 Richard Biener <rguenther@suse.de>
4534 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4535 to cover -flto-partition=none.
4537 2018-07-20 Martin Liska <mliska@suse.cz>
4539 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4540 (get_decl_source_range): Remove unused function.
4542 2018-07-20 Richard Biener <rguenther@suse.de>
4544 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4545 (struct vn_phi_s): Likewise.
4546 (struct vn_reference_s): Likewise.
4547 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4548 for searching the slot of an entry known to be in the hash itself.
4549 (vn_phi_hasher::equal): Likewise.
4550 (vn_reference_hasher::equal): Likewise.
4551 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4553 (optimistic_info, current_info): Remove, keeping only valid_info.
4554 (vn_reference_lookup_1): Remove fallback lookup.
4555 (vn_reference_lookup_2): Likewise.
4556 (vn_nary_op_lookup_1): Likewise.
4557 (vn_phi_lookup): Likewise.
4558 (vn_nary_build_or_lookup_1): Make sure to not chain the built
4560 (vn_reference_insert): Adjust, chain the inserted hash element
4561 at last_inserted_ref.
4562 (vn_reference_insert_pieces): Likewise.
4563 (visit_reference_op_call): Likewise.
4564 (vn_nary_op_insert_into): Chain the inserted hash element at
4566 (vn_nary_op_insert_pieces): Adjust.
4567 (vn_nary_op_insert): Likewise.
4568 (vn_nary_op_insert_stmt): Likewise.
4569 (vn_phi_insert): Adjust, chain the inserted hash element at
4571 (process_scc): Remove clearing and copying the optimistic
4572 table. Instead remove elements inserted during an optimistic
4573 iteration from the single table we maintain.
4574 (init_scc_vn): Adjust.
4575 (free_scc_vn): Likewise.
4576 (sccvn_dom_walker::record_cond): Likewise.
4577 (sccvn_dom_walker::after_dom_children): Likewise.
4579 2018-07-19 Martin Sebor <msebor@redhat.com>
4581 PR tree-optimization/84047
4582 PR tree-optimization/83776
4583 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4584 (check_array_bounds): Call it.
4586 2018-07-19 Martin Sebor <msebor@redhat.com>
4588 * align.h (align_flags): Use member initialization.
4590 2018-07-19 David Malcolm <dmalcolm@redhat.com>
4592 * Makefile.in (OBJS): Add optinfo.o.
4593 * coretypes.h (class symtab_node): New forward decl.
4594 (struct cgraph_node): New forward decl.
4595 (class varpool_node): New forward decl.
4596 * dump-context.h: New file.
4597 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4599 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4600 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4601 (set_alt_dump_file): Likewise.
4602 (dump_context::~dump_context): New dtor.
4603 (dump_gimple_stmt): Move implementation to...
4604 (dump_context::dump_gimple_stmt): ...this new member function.
4605 Add the stmt to any pending optinfo, creating one if need be.
4606 (dump_gimple_stmt_loc): Move implementation to...
4607 (dump_context::dump_gimple_stmt_loc): ...this new member function.
4608 Start a new optinfo and add the stmt to it.
4609 (dump_gimple_expr): Move implementation to...
4610 (dump_context::dump_gimple_expr): ...this new member function.
4611 Add the stmt to any pending optinfo, creating one if need be.
4612 (dump_gimple_expr_loc): Move implementation to...
4613 (dump_context::dump_gimple_expr_loc): ...this new member function.
4614 Start a new optinfo and add the stmt to it.
4615 (dump_generic_expr): Move implementation to...
4616 (dump_context::dump_generic_expr): ...this new member function.
4617 Add the tree to any pending optinfo, creating one if need be.
4618 (dump_generic_expr_loc): Move implementation to...
4619 (dump_context::dump_generic_expr_loc): ...this new member
4620 function. Add the tree to any pending optinfo, creating one if
4622 (dump_printf): Move implementation to...
4623 (dump_context::dump_printf_va): ...this new member function. Add
4624 the text to any pending optinfo, creating one if need be.
4625 (dump_printf_loc): Move implementation to...
4626 (dump_context::dump_printf_loc_va): ...this new member function.
4627 Start a new optinfo and add the stmt to it.
4628 (dump_dec): Move implementation to...
4629 (dump_context::dump_dec): ...this new member function. Add the
4630 value to any pending optinfo, creating one if need be.
4631 (dump_context::dump_symtab_node): New member function.
4632 (dump_context::get_scope_depth): New member function.
4633 (dump_context::begin_scope): New member function.
4634 (dump_context::end_scope): New member function.
4635 (dump_context::ensure_pending_optinfo): New member function.
4636 (dump_context::begin_next_optinfo): New member function.
4637 (dump_context::end_any_optinfo): New member function.
4638 (dump_context::s_current): New global.
4639 (dump_context::s_default): New global.
4640 (dump_scope_depth): Delete global.
4641 (dumpfile_ensure_any_optinfo_are_flushed): New function.
4642 (dump_symtab_node): New function.
4643 (get_dump_scope_depth): Reimplement in terms of dump_context.
4644 (dump_begin_scope): Likewise.
4645 (dump_end_scope): Likewise.
4646 (selftest::temp_dump_context::temp_dump_context): New ctor.
4647 (selftest::temp_dump_context::~temp_dump_context): New dtor.
4648 (selftest::verify_item): New function.
4649 (ASSERT_IS_TEXT): New macro.
4650 (ASSERT_IS_TREE): New macro.
4651 (ASSERT_IS_GIMPLE): New macro.
4652 (selftest::test_capture_of_dump_calls): New test.
4653 (selftest::dumpfile_c_tests): Call it.
4654 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4655 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4656 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4657 descriptive comment.
4658 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4659 (dump_node, dump_bb): Move these unrelated decls.
4660 (class dump_manager): Add leading comment.
4661 * optinfo.cc: New file.
4662 * optinfo.h: New file.
4664 2018-07-19 Michael Collison <michael.collison@arm.com>
4665 Richard Henderson <rth@redhat.com>
4667 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4668 (subti): Handle op1 zero.
4669 (subvti4, usub4ti4): New.
4670 (*sub<GPI>3_compare1_imm): New.
4671 (sub<GPI>3_carryinCV): New.
4672 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4673 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4675 2018-07-19 Michael Collison <michael.collison@arm.com>
4676 Richard Henderson <rth@redhat.com>
4678 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4679 (addti3): Create simpler code if low part is already known to be 0.
4680 (addvti4, uaddvti4): New.
4681 (*add<GPI>3_compareC_cconly_imm): New.
4682 (*add<GPI>3_compareC_cconly): New.
4683 (*add<GPI>3_compareC_imm): New.
4684 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4685 handle constants within this pattern..
4686 (*add<GPI>3_compareV_cconly_imm): New.
4687 (*add<GPI>3_compareV_cconly): New.
4688 (*add<GPI>3_compareV_imm): New.
4689 (add<GPI>3_compareV): New.
4690 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4691 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4692 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4693 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4694 with 'comparison' operator.
4695 (*add<GPI>3_compareV_cconly_imm): Ditto.
4696 (*add<GPI>3_compareV_cconly): Ditto.
4697 (*add<GPI>3_compareV_imm): Ditto.
4698 (add<GPI>3_compareV): Ditto.
4699 (add<mode>3_carryinC): Ditto.
4700 (*add<mode>3_carryinC_zero): Ditto.
4701 (*add<mode>3_carryinC): Ditto.
4702 (add<mode>3_carryinV): Ditto.
4703 (*add<mode>3_carryinV_zero): Ditto.
4704 (*add<mode>3_carryinV): Ditto.
4706 2018-07-19 Michael Collison <michael.collison@arm.com>
4707 Richard Henderson <rth@redhat.com>
4709 * config/aarch64/aarch64-modes.def (CC_V): New.
4710 * config/aarch64/aarch64-protos.h
4711 (aarch64_addti_scratch_regs): Declare
4712 (aarch64_subvti_scratch_regs): Declare.
4713 (aarch64_expand_subvti): Declare.
4714 (aarch64_gen_unlikely_cbranch): Declare
4715 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4716 for signed overflow using CC_Vmode.
4717 (aarch64_get_condition_code_1): Handle CC_Vmode.
4718 (aarch64_gen_unlikely_cbranch): New function.
4719 (aarch64_addti_scratch_regs): New function.
4720 (aarch64_subvti_scratch_regs): New function.
4721 (aarch64_expand_subvti): New function.
4723 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4725 * config/aarch64/aarch64-option-extensions.def: New entry for profile
4727 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4728 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4731 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4734 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4735 address check not strict.
4737 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4739 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4741 (store_pair_lanes<mode>): Likewise.
4742 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
4743 enum value 'ADDR_QUERY_LDP_STP_N'.
4744 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
4745 (aarch64_print_address_internal): Add declaration.
4746 (aarch64_print_ldpstp_address): Remove.
4747 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
4748 (aarch64_print_operand): Change printing of 'y'.
4749 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
4750 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
4751 'true' rather than '1'.
4752 * config/aarch64/constraints.md (Uml): Likewise.
4753 (Uml): Rename to Umn.
4756 2018-07-19 Richard Biener <rguenther@suse.de>
4758 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
4760 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
4761 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
4762 (vn_reference_hasher): Likewise.
4763 (struct vn_tables_s): Remove obstack and alloc-pool members.
4764 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
4765 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
4766 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
4767 (vn_reference_insert_pieces): Likewise.
4768 (alloc_vn_nary_op_noinit): Adjust.
4769 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4770 (vn_phi_eq): Adjust.
4771 (shared_lookup_phiargs): Remove.
4772 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4773 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4774 (visit_reference_op_call): Likewise.
4775 (copy_nary, copy_phi, copy_reference): Remove.
4776 (process_scc): Rewind the obstack when iterating. Do not
4777 copy the elements to valid_info but just move them from one
4778 hashtable to the other.
4779 (allocate_vn_table): Adjust.
4780 (free_vn_table): Likewise.
4781 (init_scc_vn): Likewise.
4782 (free_scc_vn): Likewise.
4784 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
4787 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4788 indirect_return as function type attribute.
4789 (ix86_attribute_table): Change indirect_return to function
4791 * doc/extend.texi: Update indirect_return attribute.
4793 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
4795 * wide-int.h (widest2_int): New.
4796 * gimple-fold.c (arith_overflowed_p): Use it.
4797 * tree.h (widest2_int_cst): New.
4798 * tree-vrp.c (wide_int_binop_overflow): Rename from
4799 vrp_int_const_binop.
4800 Rewrite to work on trees.
4801 (extract_range_from_multiplicative_op_1): Abstract code to...
4802 (wide_int_range_min_max): ...here.
4803 (wide_int_range_cross_product): ...and here.
4804 (extract_range_from_binary_expr_1): Abstract overflow code to...
4805 (wide_int_range_mult_wrapping): ...here.
4806 * tree-vrp.h (wide_int_range_cross_product): New.
4807 (wide_int_range_mult_wrapping): New.
4809 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
4810 Julia Koval <julia.koval@intel.com>
4812 * config/i386/x86-tune-costs.h (skylake_memcpy,
4813 skylake_memset): Replace rep_prefix with unrolling for size 512.
4815 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
4818 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4819 comparision with EQ_EXPR in last stmt.
4821 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
4823 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4824 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4825 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4826 previously known as "PowerPC AltiVec Built-in Functions". Move
4827 some material to new subsubsections "PowerPC AltiVec Built-in
4828 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4830 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
4831 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
4832 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
4833 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
4835 2018-07-18 Richard Biener <rguenther@suse.de>
4837 PR tree-optimization/86557
4838 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
4841 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
4843 * config/s390/s390.c (s390_function_profiler): Generate CFI.
4845 2018-07-17 Jeff Law <law@redhat.com>
4847 * config/arm/arm.c (get_label_padding): Update for recent
4848 changes to label_to_alignment.
4850 PR tree-optimization/86010
4851 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
4853 * config/mips/mips.c (vr4130_align_insns): Update for recent
4854 changes to label_to_alignment.
4856 * config/frv/frv.c (frv_label_align): Update for recent changes
4857 to label_to_alignment.
4859 * config/nios2/nios2.c (nios2_label_align): Update for recent
4860 changes which dropped ALIGN_LABELS_LOG.
4862 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
4864 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
4865 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
4867 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
4869 * config/arc/arc.c (arc_label_align): Use align_labels instead of
4870 deprecated align_labels_log.
4872 2018-07-17 Richard Biener <rguenther@suse.de>
4875 * dwarf2out.c (init_sections_and_labels): Always generate
4876 a debug_line_str_section for early LTO debug.
4877 (dwarf2out_finish): Reset debug_line_str_hash output early.
4878 Bump counter for extra dwarf5 .debug_loc labels to not conflict
4880 (dwarf2out_early_finish): Output debug_line_str.
4882 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4884 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
4885 index register on z196 or later.
4887 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4889 * config/s390/s390.c (s390_default_align): Set default function
4891 (s390_override_options_after_change): Call s390_default align.
4892 (s390_option_override_internal): Call s390_default_align.
4893 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
4895 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4898 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
4899 to _looptemp_ clauses, other than the first two.
4901 2018-07-17 Martin Liska <mliska@suse.cz>
4903 * opts.c: Do not enable OPT_falign_* for -Os.
4905 2018-07-17 Martin Liska <mliska@suse.cz>
4907 * align.h (MAX_CODE_ALIGN): New.
4908 (MAX_CODE_ALIGN_VALUE): New.
4909 * common/config/i386/i386-common.c (ix86_handle_option):
4910 (MAX_CODE_ALIGN): Moved to align.h.
4911 * final.c (MAX_CODE_ALIGN): Likewise.
4912 * opts.c (parse_and_check_align_values):
4913 (MAX_CODE_ALIGN): Likewise.
4914 (MAX_CODE_ALIGN_VALUE): Likewise.
4916 2018-07-17 Martin Liska <mliska@suse.cz>
4918 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
4919 in order to fulfil coding style.
4920 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4921 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4922 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4923 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
4924 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
4925 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
4926 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
4927 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
4928 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4930 2018-07-17 Martin Liska <mliska@suse.cz>
4932 * align.h: New file.
4933 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
4935 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
4936 align_flags of label_to_alignment.
4937 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
4939 * config/m68k/m68k.c: Do not use removed align_labels_value and
4941 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
4942 (LOOP_ALIGN): Likewise.
4943 (LABEL_ALIGN): Likewise.
4944 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4945 Remove not used macro.
4946 (rs6000_loop_align): Change return type to align_flags.
4947 (rs6000_loop_align_max_skip): Remove.
4948 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
4949 Change return type to align_flags.
4950 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4951 Remove not used macro.
4952 (rs6000_loop_align): Change return type to align_flags.
4953 (rs6000_loop_align_max_skip): Remove.
4954 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
4955 * config/rx/rx-protos.h (rx_align_for_label): Make it
4957 * config/rx/rx.c (rx_align_for_label): Change return type
4959 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
4961 into align_flags class.
4962 (LABEL_ALIGN): Likewise.
4963 (LOOP_ALIGN): Likewise.
4964 * config/s390/s390.c (s390_label_align): Use align_flags
4966 (s390_asm_output_function_label): Likewise.
4967 * config/sh/sh.c (sh_override_options_after_change):
4968 Use align_flags class directly without macros.
4969 (find_barrier): Likewise.
4970 (barrier_align): Likewise.
4971 (sh_loop_align): Likewise.
4972 * config/spu/spu.c (spu_option_override):
4973 Use align_flags_tuple::get_value instead of removed macros.
4974 (spu_sched_init): Likewise.
4975 * config/spu/spu.h (GTY): Likewise.
4976 * config/visium/visium.c (visium_option_override):
4977 Set "8" as default secondary alignment.
4978 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
4979 in order to guarantee secondary alignment of 8.
4980 * coretypes.h: Include align.h header file.
4981 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
4982 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
4983 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
4984 * doc/tm.texi.in: Likewise.
4985 * final.c (struct label_alignment): Remove not used structure.
4986 (LABEL_ALIGN): Change type to align_flags.
4987 (LOOP_ALIGN): Likewise.
4988 (JUMP_ALIGN): Likewise.
4989 (default_loop_align_max_skip): Remove.
4990 (default_label_align_max_skip): Likewise.
4991 (default_jump_align_max_skip): Likewise.
4992 (default_label_align_after_barrier_max_skip):
4993 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
4994 (LABEL_TO_MAX_SKIP): Remove.
4995 (label_to_alignment): Return align_flags type instead of integer.
4996 (label_to_max_skip): Remove.
4997 (align_fuzz): Use align_flags type.
4998 (compute_alignments): Use align_flags type and use align_flags::max
4999 to combine multiple alignments.
5000 (grow_label_align): Grow vec instead of C array.
5001 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5002 (shorten_branches): Use align_flags type and use align_flags::max
5003 to combine multiple alignments.
5004 (final_scan_insn_1): Remove usage of secondary alignment that comes
5005 from label alignment, but instead use proper secondary alignment
5006 which is computed in grow_label_align.
5007 * flags.h (struct align_flags_tuple): Move to align.h.
5008 (struct align_flags): Likewise.
5009 (state_align_loops): Rename to align_loops.
5010 (state_align_jumps): Rename to align_jumps.
5011 (state_align_labels): Rename to align_labels.
5012 (state_align_functions): Rename to align_functions.
5013 (align_loops_log): Remove.
5014 (align_jumps_log): Remove.
5015 (align_labels_log): Remove.
5016 (align_functions_log): Remove.
5017 (align_loops_max_skip): Remove.
5018 (align_jumps_max_skip): Remove.
5019 (align_labels_max_skip): Remove.
5020 (align_functions_max_skip): Remove.
5021 (align_loops_value): Remove.
5022 (align_jumps_value): Remove.
5023 (align_labels_value): Remove.
5024 (align_functions_value): Remove.
5025 * output.h (label_to_alignment): Change return type to align_flags.
5026 (label_to_max_skip): Remove.
5027 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5028 jump_align_max_skip macros.
5029 * targhooks.h (default_loop_align_max_skip): Remove.
5030 (default_label_align_max_skip): Likewise.
5031 (default_jump_align_max_skip): Likewise.
5032 (default_label_align_after_barrier_max_skip): Remove.
5033 * toplev.c (read_log_maxskip): Use ::normalize function.
5034 (parse_N_M): Remove not used argument and also call ::normalize.
5035 (parse_alignment_opts): Do not pass unused arguments.
5036 * varasm.c (assemble_start_function): Use directly align_functions
5037 instead of removed macros.
5038 * system.h: Do not poison removed macros.
5040 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5043 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5044 and cond temporaries don't have reference type if iterator has
5045 pointer type. For init use &for_pre_body instead of pre_p if
5046 for_pre_body is non-empty.
5048 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5050 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5051 double-double modes to SFmode directly directly.
5052 (trunc<mode>sf2_fprs): Delete.
5054 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5056 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5057 for conversions between IFmode and the decimal floating point modes.
5058 (init_float128_ieee): Use the correct names for conversions between
5059 KFmode and the decimal floating point modes.
5061 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5063 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5064 for the conversions between TDmode and IFmode.
5065 (init_float128_ieee): Use more correct names for the conversions
5066 between TDmode and KFmode.
5068 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5070 PR tree-optimization/86526
5071 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5072 (inline_expand_builtin_string_cmp): Likewise.
5073 (inline_string_cmp): Likewise. Use c_readstr instead of
5074 builtin_memcpy_read_str. Add unit_mode temporary.
5076 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5079 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5080 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5082 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5084 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5085 Alphabetize prototypes of built-in functions, separating out
5086 built-in functions that are listed in this section but should be
5087 described elsewhere.
5089 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5092 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5093 conditional move when trapping comparison was split to a
5094 non-trapping one (and vice versa).
5096 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5098 * config/s390/s390.c (s390_function_profiler): Generate nops
5099 instead of profiler call sequences.
5100 * config/s390/s390.opt: Add the new option.
5102 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5104 * config/s390/s390.c (s390_function_profiler): Generate
5105 __mcount_loc section.
5106 * config/s390/s390.opt: Add the new option.
5108 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5110 * common.opt: Add the new warning.
5111 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5112 %r0,__fentry__" when -mfentry is specified.
5113 (s390_option_override_internal): Disallow -mfentry for 31-bit
5115 * config/s390/s390.opt: Add the new option.
5117 2018-07-16 Richard Biener <rguenther@suse.de>
5120 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5121 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5123 2018-07-16 Martin Liska <mliska@suse.cz>
5126 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5129 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5131 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5133 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5135 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5137 * config/arc/arc-cpus.def (hs4x): New cpu.
5139 * config/arc/arc-tables.opt: Regenerate.
5140 * config/arc/arc.c (arc_sched_issue_rate): New function.
5141 (TARGET_SCHED_ISSUE_RATE): Define.
5142 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5143 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5145 (attr tune): Add ARCHS4x tune values.
5146 (attr tune_dspmpy): Define.
5147 (*tst): Correct instruction type.
5148 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5149 * config/arc/arcHS4x.md: New file.
5150 * config/arc/fpu.md: Update instruction type attributes.
5151 * config/arc/t-multilib: Regenerate.
5153 2018-07-16 Tom de Vries <tdevries@suse.de>
5156 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5158 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5160 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5163 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5165 PR tree-optimization/86514
5166 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5167 conversion to a boolean type from a type with greater precision.
5169 2018-07-16 Tom de Vries <tdevries@suse.de>
5171 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5172 dump_flags request TDF_SLIM.
5174 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5176 * fold-const.c (int_const_binop_1): Abstract...
5177 (wide_int_binop): ...wide int code here.
5178 (poly_int_binop): ...poly int code here.
5179 Abstract the rest of int_const_binop_1 into int_const_binop.
5180 * fold-const.h (wide_int_binop): New.
5181 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5182 Remove useless PLUS/MINUS_EXPR case.
5183 (zero_nonzero_bits_from_vr): Move wide int code...
5184 (zero_nonzero_bits_from_bounds): ...here.
5185 (extract_range_from_binary_expr_1): Move mask optimization code...
5186 (range_easy_mask_min_max): ...here.
5187 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5188 (range_easy_mask_min_max): New.
5190 2018-07-15 Jeff Law <law@redhat.com>
5193 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5196 2018-07-14 Jim Wilson <jimw@sifive.com>
5198 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5200 2018-07-14 Paul Koning <ni1d@arrl.net>
5202 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5204 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5206 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5209 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5210 Steve Munroe <munroesj52@gmail.com>
5212 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5213 (_mm_andnot_si128): Likewise.
5214 (_mm_or_si128): Likewise.
5215 (_mm_xor_si128): Likewise.
5217 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5220 * builtins.c (expand_builtin_memcmp): Inline the calls first
5221 when result_eq is false.
5222 (expand_builtin_strcmp): Inline the calls first.
5223 (expand_builtin_strncmp): Likewise.
5224 (inline_string_cmp): New routine. Expand a string compare
5225 call by using a sequence of char comparison.
5226 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5227 a call to str(n)cmp/memcmp.
5228 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5230 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5232 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5234 * config/arm/driver-arm.c: Include arm-native.h.
5235 (host_detect_local_cpu): Use auto-generated data tables.
5236 (vendors, arm_cpu_table): Delete. Move part information to ...
5237 * config/arm/arm-cpus.in: ... here.
5238 * config/arm/parsecpu.awk (gen_native): New function.
5239 (vendor, part): New CPU fields.
5240 (END): Add support for building the native CPU detection tables.
5241 * config/arm/t-arm (arm-native.h): Add build rule.
5242 (driver-arm.o): Add dependency on arm-native.h.
5244 2018-07-13 Richard Biener <rguenther@suse.de>
5247 * match.pd (addr1 - addr2): Allow either of the operand to
5250 2018-07-13 Tom de Vries <tdevries@suse.de>
5252 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5255 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5257 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5258 arrays instead of numbered variables.
5260 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5262 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5263 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5265 2018-07-13 Richard Biener <rguenther@suse.de>
5268 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5269 instead of get_context_die.
5271 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5272 Richard Biener <rguenther@suse.de>
5275 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5276 that the loop latch destination where phi is defined.
5278 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5280 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5281 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5282 (riscv_set_current_function): Extract getting interrupt type to new
5284 (riscv_get_interrupt_type): New function.
5285 (riscv_merge_decl_attributes): New function, checking interrupt type is
5287 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5289 2018-07-12 Paul Koning <ni1d@arrl.net>
5291 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5294 2018-07-12 Paul Koning <ni1d@arrl.net>
5296 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5297 zero reference, add doloop_end instead.
5298 * doc/md.texi (decrement_and_branch_until_zero): Remove.
5299 (Looping patterns): Remove decrement_and_branch_until_zero. Add
5300 detail for doloop_end.
5302 2018-07-12 Martin Sebor <msebor@redhat.com>
5305 * attribs.c (decl_attributes): Reject conflicting attributes before
5306 calling attribute handlers.
5308 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5310 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5312 (gcc::dump_manager::get_dump_file_name): likewise.
5313 (dump_begin): Likewise.
5314 * dumpfile.h (dump_begin): Update prototype.
5315 (gcc::dump_manager::get_dump_file_name,
5316 gcc::dump_manager::get_dump_file_name): Update prototype.
5318 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5320 * internal-fn.h (vectorizable_internal_fn_p): New function.
5321 * tree-vect-slp.c (compatible_calls_p): Likewise.
5322 (vect_build_slp_tree_1): Remove nops argument. Handle calls
5323 to internal functions.
5324 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5326 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5328 * fold-const.h (inverse_conditions_p): Declare.
5329 * fold-const.c (inverse_conditions_p): New function.
5330 * match.pd: Use inverse_conditions_p. Add folds of view_converts
5331 that test the inverse condition of a conditional internal function.
5332 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5333 * internal-fn.c (internal_fn_mask_index): Handle conditional
5335 (vectorized_internal_fn_supported_p): New function.
5336 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5337 (any_pred_load_store): Replace with...
5338 (need_to_predicate): ...this new variable.
5339 (redundant_ssa_names): New variable.
5340 (ifcvt_can_use_mask_load_store): Move initial checks to...
5341 (ifcvt_can_predicate): ...this new function. Handle tree codes
5342 for which a conditional internal function exists.
5343 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5344 instead of ifcvt_can_use_mask_load_store. Update after variable
5346 (predicate_load_or_store): New function, split out from
5347 predicate_mem_writes.
5348 (check_redundant_cond_expr): New function.
5349 (value_available_p): Likewise.
5350 (predicate_rhs_code): Likewise.
5351 (predicate_mem_writes): Rename to...
5352 (predicate_statements): ...this. Use predicate_load_or_store
5353 and predicate_rhs_code.
5354 (combine_blocks, tree_if_conversion): Update after above name changes.
5355 (ifcvt_local_dce): Handle redundant_ssa_names.
5356 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5357 general conditional functions.
5358 * tree-vect-stmts.c (vectorizable_call): Likewise.
5360 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5361 Alan Hayward <alan.hayward@arm.com>
5362 David Sherwood <david.sherwood@arm.com>
5364 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5365 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5366 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5367 plus and minus and convert them into IFN_COND_FMA-based sequences.
5368 (convert_mult_to_fma): Handle conditional plus and minus.
5370 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5372 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5373 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5374 (cond_fnms_optab): New optabs.
5375 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5377 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5378 * internal-fn.h (get_conditional_internal_fn): Declare.
5379 (get_unconditional_internal_fn): Likewise.
5380 * internal-fn.c (cond_ternary_direct): New macro.
5381 (expand_cond_ternary_optab_fn): Likewise.
5382 (direct_cond_ternary_optab_supported_p): Likewise.
5383 (FOR_EACH_COND_FN_PAIR): Likewise.
5384 (get_conditional_internal_fn): New function.
5385 (get_unconditional_internal_fn): Likewise.
5386 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5387 (gimple_match_op::gimple_match_op): Add a new overload for 5
5389 (gimple_match_op::set_op): Likewise.
5390 (gimple_resimplify5): Declare.
5391 * genmatch.c (decision_tree::gen): Generate simplifications for
5393 * gimple-match-head.c (gimple_simplify): Define an overload for
5394 5 operands. Handle calls with 5 arguments in the top-level overload.
5395 (convert_conditional_op): Handle conversions from unconditional
5396 internal functions to conditional ones.
5397 (gimple_resimplify5): New function.
5398 (build_call_internal): Pass a fifth operand.
5399 (maybe_push_res_to_seq): Likewise.
5400 (try_conditional_simplification): Try converting conditional
5401 internal functions to unconditional internal functions.
5402 Handle 3-operand unconditional forms.
5403 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5404 Define ternary equivalents of the current rules for binary conditional
5406 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5408 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5409 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5410 (optab): Handle them.
5411 (SVE_COND_FP_TERNARY): New int iterator.
5412 (sve_fmla_op, sve_fmad_op): New int attributes.
5413 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5414 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5415 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5417 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5419 * target.def (preferred_else_value): New target hook.
5420 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5421 * doc/tm.texi: Regenerate.
5422 * targhooks.h (default_preferred_else_value): Declare.
5423 * targhooks.c (default_preferred_else_value): New function.
5424 * internal-fn.h (conditional_internal_fn_code): Declare.
5425 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5426 (get_conditional_internal_fn): Use it.
5427 (conditional_internal_fn_code): New function.
5428 * gimple-match.h (gimple_match_cond): New struct.
5429 (gimple_match_op): Add a cond member function.
5430 (gimple_match_op::gimple_match_op): Update all forms to take a
5432 * genmatch.c (expr::gen_transform): Use the same condition as res_op
5433 for the suboperation, but don't specify a particular else_value.
5434 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5435 (visit_nary_op, visit_reference_op_load): Pass
5436 gimple_match_cond::UNCOND to the gimple_match_op constructor.
5437 * gimple-match-head.c: Include tree-eh.h
5438 (convert_conditional_op): New function.
5439 (maybe_resimplify_conditional_op): Likewise.
5440 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5441 (gimple_resimplify2): Likewise.
5442 (gimple_resimplify3): Likewise.
5443 (gimple_resimplify4): Likewise.
5444 (maybe_push_res_to_seq): Return null for conditional operations.
5445 (try_conditional_simplification): New function.
5446 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
5448 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5450 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5452 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5454 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5456 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5458 (hash_tree): Do not hash DECL_FCONTEXT
5459 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5460 Do not stream DECL_FCONTEXT.
5461 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5462 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5464 2018-07-12 Richard Biener <rguenther@suse.de>
5467 * dwarf2out.c (gen_block_die): Only output blocks when they have
5468 at least one !DECL_IGNORED_P variable.
5470 2018-07-12 Richard Biener <rguenther@suse.de>
5473 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5474 Remove -mieee-fp handling.
5476 2018-07-12 Richard Biener <rguenther@suse.de>
5478 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5479 left-over from last patch.
5481 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5483 PR tree-optimization/86492
5484 * gimple-ssa-store-merging.c
5485 (imm_store_chain_info::coalesce_immediate_stores): Call
5486 check_no_overlap even for the merge_overlapping case. Formatting fix.
5488 2018-07-12 Richard Biener <rguenther@suse.de>
5491 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5492 move possibly trapping operations into the conditional.
5494 2018-07-12 Richard Biener <rguenther@suse.de>
5496 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5497 (vn_lookup_simplify_result): Remove recursion limit applied
5499 (vn_nary_build_or_lookup_1): Adjust.
5500 (try_to_simplify): Likewise.
5501 * gimple-match-head.c (gimple_resimplify1): Instead apply one
5503 (gimple_resimplify2): Likewise.
5504 (gimple_resimplify3): Likewise.
5505 (gimple_resimplify4): Likewise.
5507 2018-07-11 Jakub Jelinek <jakub@redhat.com>
5509 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5510 Use __mmask64 type instead of __mmask8 for __M argument.
5511 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5512 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5514 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5515 __mmask16 for __M argument.
5516 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5517 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5518 to __mmask16 instead of __mmask8.
5519 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5520 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5521 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5522 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5523 instead of __mmask16 for __U argument.
5524 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5525 __mmask16 instead of __mmask8 for __U argument.
5526 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5528 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5530 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5532 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5534 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5536 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5538 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5540 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5542 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5544 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5546 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5547 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5548 return type as well as __M argument type and all casts from __mmask8
5550 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5551 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5552 return type as well as __M argument type and all casts from __mmask8
5554 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5555 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5556 return type as well as __M argument type and all casts from __mmask8
5558 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5559 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5560 return type as well as __M argument type and all casts from __mmask8
5562 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5563 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5566 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
5568 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5569 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5572 2018-07-11 Paul Koning <ni1d@arrl.net>
5574 * doc/md.texi (define_subst): Document how multiple occurrences of
5575 the same argument in the replacement pattern are handled.
5577 2018-07-11 Paul Koning <ni1d@arrl.net>
5579 * doc/extend.texi (Common Variable Attributes): Move "mode" into
5581 (Common Type Attributes): Add "mode" attribute.
5583 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
5585 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5586 stream DECL_ORIGINAL_TYPE.
5587 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5588 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5589 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5590 Do not walk original type.
5591 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5593 (write_ts_decl_non_common_tree_pointers): Do not stream
5595 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5596 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5598 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5600 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5601 thread twice from the same starting edge.
5603 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5605 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5606 * gimple.c (gimple_call_nonnull_result_p): ...here...
5607 (gimple_call_nonnull_arg): ...and here.
5608 * gimple.h (gimple_call_nonnull_result_p): New.
5609 (gimple_call_nonnull_arg): New.
5611 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
5613 * config/arm/arm-cpus.in: Move information from fpu field of each
5614 cpu definition to the isa field.
5615 * config/arm/parsecpu.awk (fpu): Delete match rule.
5616 (gen_comm_data): Don't add bits from the CPU's FPU entry.
5618 2018-07-11 Richard Biener <rguenther@suse.de>
5621 * dwarf2out.c (init_sections_and_labels): Use
5622 output_asm_line_debug_info consistently.
5623 (dwarf2out_early_finish): Likewise.
5624 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5627 2018-07-11 Richard Biener <rguenther@suse.de>
5629 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5630 Rework father_bb setting in a way to avoid propagating constants
5631 multiple times on a loop body.
5633 2018-07-10 Mark Wielaard <mark@klomp.org>
5636 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5638 2018-07-10 Richard Biener <rguenther@suse.de>
5640 * hash-map.h (hash_map::iterator::operator*): Return
5641 references to key and value.
5643 2018-07-10 Jakub Jelinek <jakub@redhat.com>
5646 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5647 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5648 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5649 (gimplify_omp_for): For composite loops, move outer
5650 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5651 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
5652 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
5653 TREE_LIST for both the original class iterator and the "last" helper
5654 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
5655 loop, remember has_decl_expr from outer composite loops for the
5656 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5658 2018-07-09 Martin Sebor <msebor@redhat.com>
5662 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5663 accessing implicitly initialized array elements.
5664 * expr.c (string_constant): Handle string initializers of
5665 character arrays within aggregates.
5666 * gimple-fold.c (fold_array_ctor_reference): Add argument.
5667 Store element offset. As a special case, handle zero size.
5668 (fold_nonarray_ctor_reference): Same.
5669 (fold_ctor_reference): Add argument. Store subobject offset.
5670 * gimple-fold.h (fold_ctor_reference): Add argument.
5672 2018-07-09 Paul Koning <ni1d@arrl.net>
5674 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5675 (pdp11_insn_cost): New function.
5676 (pdp11_md_asm_adjust): New function.
5677 (TARGET_INVALID_WITHIN_DOLOOP): Define.
5678 (pdp11_rtx_costs): Update to match machine better.
5679 (output_addr_const_pdp11): Correct format mismatch warnings.
5680 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5681 * config/pdp11/pdp11.md: General change to add base_cost and/or
5682 length attributes for use by new pdp11_insn_cost function.
5683 (MIN_BRANCH): Correct definition.
5685 (doloop_end): Use standard pattern name for looping pattern.
5686 (doloop_end_nocc): New.
5687 (movsf): Add another constraint alternative.
5688 (zero_extendqihi2): Add constraint alternatives for not in place
5690 (zero_extendhisi2): Remove.
5691 (shift patterns): Add CC handling variants.
5695 (define_peephole2): New peephole to recognize mov that sets CC for
5698 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5700 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5701 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5704 2018-07-09 Jakub Jelinek <jakub@redhat.com>
5707 * real.c (real_nextafter): Return true if result is denormal.
5709 2018-07-09 Martin Liska <mliska@suse.cz>
5711 * common.opt: Add back wrongly removed attribute.
5713 2018-07-09 Richard Biener <rguenther@suse.de>
5716 * dwarf2out.c (gen_block_die): For an early generated DIE
5717 always output high/low PC attributes.
5719 2018-07-09 Tom de Vries <tdevries@suse.de>
5721 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5722 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5723 onto VAR_DECL with abstract origin.
5725 2018-07-07 Jim Wilson <jimw@sifive.com>
5727 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5729 2018-07-07 Tom de Vries <tdevries@suse.de>
5731 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5733 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
5735 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5737 (combine_bound): Use wide-int overflow calculation instead of
5739 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5741 * fold-const.c (int_const_binop_2): Same.
5742 (extract_muldiv_1): Same.
5743 (fold_div_compare): Same.
5744 (fold_abs_const): Same.
5746 * poly-int.h (add): Same.
5750 * predict.c (predict_iv_comparison): Same.
5751 * profile-count.c (slow_safe_scale_64bit): Same.
5752 * simplify-rtx.c (simplify_const_binary_operation): Same.
5753 * tree-chrec.c (tree_fold_binomial): Same.
5754 * tree-data-ref.c (split_constant_offset_1): Same.
5755 * tree-if-conv.c (idx_within_array_bound): Same.
5756 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
5757 * tree-ssa-phiopt.c (minmax_replacement): Same.
5758 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
5759 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
5760 * vr-values.c (vr_values::adjust_range_with_scev): Same.
5761 * wide-int.cc (wi::add_large): Same.
5762 (wi::mul_internal): Same.
5763 (wi::sub_large): Same.
5764 (wi::divmod_internal): Same.
5765 * wide-int.h: Change overflow type to overflow_type for neg, add,
5766 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
5767 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
5768 mul_internal, divmod_internal.
5769 (overflow_type): New enum.
5770 (accumulate_overflow): New.
5772 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5774 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5775 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5777 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5779 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5780 argument is checked for zero before entering loop, avoid checking again.
5782 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5784 * gimplify.h (generic_expr_could_trap_p): Set as global function.
5785 * gimplify.h (generic_expr_could_trap_p): Likwise.
5786 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5788 2018-07-06 Jakub Jelinek <jakub@redhat.com>
5790 PR tree-optimization/86401
5791 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5792 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5793 (fold_bit_and_mask): ... here. New helper function for match.pd.
5794 * fold-const.h (fold_bit_and_mask): Declare.
5795 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5797 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
5800 * target.def (translate_mode_attribute): New hook.
5801 * targhooks.h (default_translate_mode_attribute): Declare.
5802 * targhooks.c (default_translate_mode_attribute): New function.
5803 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5804 * doc/tm.texi: Regenerate.
5805 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5806 (rs6000_translate_mode_attribute): New function.
5808 2018-07-06 Paul Koning <ni1d@arrl.net>
5810 * doc/md.texi (define_split): Document DONE and FAIL.
5811 (define_peephole2): Ditto.
5813 2018-07-05 Jeff Law <law@redhat.com>
5815 PR tree-optimization/86010
5816 * tree-ssa-dse.c (compute_trims): More aggressively trim at
5817 both the head and tail of mem* and str* calls.
5819 2018-07-05 Jim Wilson <jimw@sifive.com>
5821 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5823 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
5825 * config/aarch64/aarch64-simd.md: correct flags text for
5826 MIN_EXPR replacement.
5828 2018-07-05 James Clarke <jrtc27@jrtc27.com>
5830 * configure: Regenerated.
5832 2018-07-05 Carl Love <cel@us.ibm.com>
5834 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
5835 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
5836 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
5837 VSX_BUILTIN_DOUBLEL_V4SF.
5839 2018-07-05 Martin Sebor <msebor@redhat.com>
5842 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
5843 than its domain to compute its the upper bound of a char array.
5845 2018-07-05 Nathan Sidwell <nathan@acm.org>
5847 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
5848 * doc/cpp.texi: Update comment.
5849 * doc/tm.texi: Rebuilt.
5850 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
5851 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
5852 * doc/extend.texi (Backwards Compatibility): Clarify it is system
5853 headers affected by extern "C".
5854 * system.h: Poison NO_IMPLICIT_EXTERN_C.
5855 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
5856 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
5857 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
5858 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
5859 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
5860 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
5861 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
5862 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
5863 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
5864 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
5865 config/sparc/sp64-elf.h, config/spu/spu.h,
5866 config/stormy16/stormy16.h, config/v850/v850.h,
5867 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
5868 define NO_IMPLICIT_EXTERN_C.
5869 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
5871 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5874 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5875 instead of GET_MODE_SIZE when comparing Units.
5877 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5880 * rtlanal.c (set_noop_p): Constrain on mode change,
5881 include hard-reg-set.h
5883 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5885 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
5887 2018-07-05 Jakub Jelinek <jakub@redhat.com>
5890 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5893 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5895 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
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 Eric Botcazou <ebotcazou@adacore.com>
5907 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
5909 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
5911 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
5912 neg_*_op* variables.
5914 2018-07-04 Martin Liska <mliska@suse.cz>
5916 * tree-switch-conversion.c: Define
5917 max_ratio_for_speed and max_ratio_for_size constants.
5919 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5920 Martin Liska <mliska@suse.cz>
5925 * common.opt: Rename align options with 'str_' prefix.
5926 * common/config/i386/i386-common.c (set_malign_value): New
5928 (ix86_handle_option): Use it to set -falign-* options/
5929 * config/aarch64/aarch64-protos.h (struct tune_params): Change
5930 type from int to string.
5931 * config/aarch64/aarch64.c: Update default values from int
5933 * config/alpha/alpha.c (alpha_override_options_after_change):
5935 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
5936 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5937 max skip conditionally.
5938 * config/i386/freebsd.h (SUBALIGN_LOG): New.
5939 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5940 max skip conditionally.
5941 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5942 max skip conditionally.
5943 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
5944 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5945 max skip conditionally.
5946 * config/i386/i386.c (struct ptt): Change type from int to
5948 (ix86_default_align): Set default values.
5949 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
5950 max skip conditionally.
5951 * config/i386/iamcu.h (SUBALIGN_LOG): New.
5952 (ASM_OUTPUT_MAX_SKIP_ALIGN):
5953 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
5954 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5955 max skip conditionally.
5956 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
5957 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
5958 * config/i386/x86-64.h (SUBALIGN_LOG): New.
5959 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5960 max skip conditionally.
5961 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5962 * config/ia64/ia64.c (ia64_option_override): Set default values
5963 for alignment options.
5964 * config/m68k/m68k.c: Handle new str_align_* options.
5965 * config/mips/mips.c (mips_set_compression_mode): Change
5967 (mips_option_override): Set default values for options.
5968 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5970 * config/rs6000/rs6000.c (rs6000_option_override_internal):
5972 * config/rx/rx.c (rx_option_override): Likewise.
5973 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
5974 (LABEL_ALIGN): Use align_labels_log.
5975 (LOOP_ALIGN): Use align_loops_align.
5976 * config/s390/s390.c (s390_asm_output_function_label): Use new
5978 * config/sh/sh.c (sh_override_options_after_change):
5979 Change type of constants.
5980 * config/spu/spu.c (spu_sched_init): Likewise.
5981 * config/sparc/sparc.c (sparc_option_override): Set default
5983 * config/visium/visium.c (visium_option_override): Likewise.
5984 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
5985 emit p2align format with last argument if it's not needed.
5986 * doc/invoke.texi: Document extended format of -falign-*.
5987 * final.c: Use align_labels alignment.
5988 * flags.h (struct target_flag_state): Change type to use
5990 (struct align_flags_tuple): New.
5991 (struct align_flags): Likewise.
5992 (align_loops_log): Redefine macro to use new types.
5993 (align_loops_max_skip): Redefine macro to use new types.
5994 (align_jumps_log): Redefine macro to use new types.
5995 (align_jumps_max_skip): Redefine macro to use new types.
5996 (align_labels_log): Redefine macro to use new types.
5997 (align_labels_max_skip): Redefine macro to use new types.
5998 (align_functions_log): Redefine macro to use new types.
5999 (align_loops): Redefine macro to use new types.
6000 (align_jumps): Redefine macro to use new types.
6001 (align_labels): Redefine macro to use new types.
6002 (align_functions): Redefine macro to use new types.
6003 (align_functions_max_skip): Redefine macro to use new types.
6004 (align_loops_value): New macro.
6005 (align_jumps_value): New macro.
6006 (align_labels_value): New macro.
6007 (align_functions_value): New macro.
6008 * function.c (invoke_set_current_function_hook): Propagate
6009 alignment values from flags to global variables default in
6011 * ipa-icf.c (sem_function::equals_wpa): Use
6012 cl_optimization_option_eq instead of memcmp.
6013 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6015 (cl_optimization_stream_in): Likewise.
6016 * optc-save-gen.awk: Support strings in cl_optimization.
6017 * opth-gen.awk: Likewise.
6018 * opts.c (finish_options): Remove error checking of invalid
6020 (MAX_CODE_ALIGN): Remove.
6021 (MAX_CODE_ALIGN_VALUE): Likewise.
6022 (parse_and_check_align_values): New function.
6023 (check_alignment_argument): Likewise.
6024 (common_handle_option): Use check_alignment_argument.
6025 * opts.h (parse_and_check_align_values): Declare.
6026 * toplev.c (init_alignments): Remove.
6027 (read_log_maxskip): New.
6028 (parse_N_M): Likewise.
6029 (parse_alignment_opts): Likewise.
6030 (backend_init_target): Remove usage of init_alignments.
6031 * toplev.h (parse_alignment_opts): Declare.
6032 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6034 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6035 * tree.c (cl_option_hasher::equal): New.
6036 * varasm.c: Use new global macros.
6038 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6040 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6041 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6042 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6043 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6044 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6045 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6046 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6047 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6048 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6049 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6050 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6051 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6052 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6054 2018-07-04 Martin Liska <mliska@suse.cz>
6055 Jonathan Wakely <jwakely@redhat.com>
6057 * coverage.c: Use correct type.
6058 * doc/invoke.texi: Language correction.
6060 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6063 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6064 ENDBRANCH for non-tail call which may return via indirect branch.
6065 * doc/extend.texi: Document indirect_return attribute.
6067 2018-07-03 Martin Sebor <msebor@redhat.com>
6069 PR tree-optimization/86274
6070 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6072 (format_floating): Correct handling of infinities and NaNs.
6074 2018-07-03 Martin Sebor <msebor@redhat.com>
6076 * print-tree.c (print_real_cst): New function.
6077 (print_node_brief): Call it.
6078 (print_node): Ditto.
6080 2018-07-03 Jeff Law <law@redhat.com>
6082 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6083 into a single pattern.
6085 * config/h8300/h8300.md (ors code_iterator): New.
6086 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6087 a single pattern and single splitter.
6088 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6089 (iorqi3_1, xorqi3_1): Likewise.
6090 (iorqi3, xorqi3 expanders): Similarly.
6092 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6093 (movmd_internal) into a single pattern using the P mode iterator.
6094 (movmd splitters): Similarly.
6095 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6096 (movsd splitters): Similarly.
6098 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6099 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6100 right table based on the size of the operand.
6101 * config/h8300/h8300.md (length_table): Corresponding changes. All
6102 references to "addb", "addw" and "addl" changed to "add".
6103 (btst patterns): Merge two variants into a single pattern.
6104 (tstqi, tsthi): Likewise.
6105 (addhi3_incdec, addsi3_incdec): Likewise.
6106 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6107 (mulhi3, mulsi3): Likewise.
6108 (udivhi3, udivsi3): Likewise.
6109 (divhi3, divsi3): Likewise.
6110 (andorqi3, andorhi3, andorsi3): Likewise.
6112 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6115 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6116 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6118 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6120 PR tree-optimization/85694
6121 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6122 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6124 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6125 (<u>avg<mode>3_ceil): New patterns.
6127 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6129 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6130 scan-tree-dump directive.
6131 * gcc.dg/vect/slp-perm-2.c: Likewise.
6132 * gcc.dg/vect/slp-perm-3.c: Likewise.
6133 * gcc.dg/vect/slp-perm-5.c: Likewise.
6134 * gcc.dg/vect/slp-perm-6.c: Likewise.
6135 * gcc.dg/vect/slp-perm-7.c: Likewise.
6136 * gcc.dg/vect/slp-perm-8.c: Likewise.
6138 2018-07-03 Marek Polacek <polacek@redhat.com>
6141 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6143 2018-07-03 Richard Biener <rguenther@suse.de>
6146 * tree-ssa-structalias.c (find_func_clobbers): Properly
6147 handle indirect calls.
6149 2018-07-03 Jeff Law <law@redhat.com>
6151 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6152 (shifts): New code iterator.
6153 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6154 expander. Fix HImode handling on H8/SX.
6155 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6156 (subqi3, subhi3, subsi3 expanders): Likewise.
6157 (andqi3, andhi3, andsi3 expanders): Likewise.
6158 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6159 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6160 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6161 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6162 (zero_extendqihi2, zero_extendqisi2): Likewise.
6163 (extendqihi2, extendqisi2): Likewise.
6164 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6165 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6166 (rotlqi3_1, rotlhi3_1): Likewise.
6167 (logicalhi3_sn, logicalsi3_sn): Likewise.
6168 (logicalhi3, logicalsi3): Likewise.
6170 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6172 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6173 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6174 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6175 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6176 type to append_pattern_def_seq instead of creating a stmt_vec_info
6178 (build_mask_conversion): Likewise. Remove vinfo argument.
6179 (vect_add_conversion_to_patterm): Likewise, renaming to...
6180 (vect_add_conversion_to_pattern): ...this.
6181 (vect_recog_mask_conversion_pattern): Update call to
6182 build_mask_conversion. Pass the vector type to
6183 append_pattern_def_seq here too.
6184 (vect_recog_gather_scatter_pattern): Update call to
6185 vect_add_conversion_to_pattern.
6187 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6189 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6190 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6191 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6192 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6193 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6194 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6195 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6196 append_pattern_def_seq instead of new_pattern_def_seq.
6197 (vect_recog_divmod_pattern): Do both of the above.
6198 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6201 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6203 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6204 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6205 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6206 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6207 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6208 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6209 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6210 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6211 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6212 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6213 parameter with a single stmt_vec_info.
6214 (vect_recog_func_ptr): Likewise.
6215 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6216 (vect_try_gather_scatter_pattern): ...this.
6217 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6218 the stmt_vec_info of the statement to be matched. Don't clear
6219 STMT_VINFO_RELATED_STMT.
6220 (vect_pattern_recog): Update call accordingly.
6222 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6224 PR tree-optimization/85694
6225 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6226 (uavgM3_ceil): Document new optabs.
6227 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6228 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6230 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6231 (savg_ceil_optab): New optabs.
6232 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6233 (vect_vect_recog_func_ptrs): Add it.
6234 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6235 constant directly from the associated lhs.
6237 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6239 * tree-vect-patterns.c (vect_split_statement): New function.
6240 (vect_convert_input): Use it to try to split an existing cast.
6242 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6244 * poly-int.h (print_hex): New function.
6245 * dumpfile.h (dump_dec, dump_hex): Declare.
6246 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6247 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6248 min_input_precision, operation_precision and operation_sign.
6249 * tree-vect-patterns.c (vect_get_range_info): New function.
6250 (vect_same_loop_or_bb_p, vect_single_imm_use)
6251 (vect_operation_fits_smaller_type): Delete.
6252 (vect_look_through_possible_promotion): Add an optional
6253 single_use_p parameter.
6254 (vect_recog_over_widening_pattern): Rewrite to use new
6255 stmt_vec_info infomration. Handle one operation at a time.
6256 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6257 (vect_truncatable_operation_p, vect_set_operation_type)
6258 (vect_set_min_input_precision): New functions.
6259 (vect_determine_min_output_precision_1): Likewise.
6260 (vect_determine_min_output_precision): Likewise.
6261 (vect_determine_precisions_from_range): Likewise.
6262 (vect_determine_precisions_from_users): Likewise.
6263 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6264 (vect_vect_recog_func_ptrs): Put over_widening first.
6266 (vect_pattern_recog): Call vect_determine_precisions.
6268 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6270 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6271 statements that have been replaced by further pattern statements.
6272 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6274 2018-07-03 Richard Biener <rguenther@suse.de>
6276 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6277 always set *dt. Dump vectype in vectype overload.
6278 * dumpfile.h (dump_gimple_expr): New function.
6279 (dump_gimple_expr_loc): Likewise.
6280 * dumpfile.c (dump_gimple_expr): New function.
6281 (dump_gimple_expr_loc): Likewise.
6283 2018-07-02 Jeff Law <law@redhat.com>
6285 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6286 the H8/300, H8/300H and H8/S variants into a single pattern.
6287 (movhi_h8300, movqi_h8300hs): Similarly.
6288 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6289 (QHI mode iterator): New.
6291 * config/h8300/h8300.md: Remove trailing whitespace.
6293 2018-07-02 Jim Wilson <jimw@sifive.com>
6295 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6296 instead of emit_insn for interrupt returns.
6297 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6298 (riscv_sret, riscv_uret): Likewise.
6300 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6302 * pretty-print.c (selftest::test_pp_format): Move save and restore
6303 of quotes to class auto_fix_quotes, and add an instance.
6304 * selftest.c: Include "intl.h".
6305 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6306 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6307 * selftest.h (selftest::auto_fix_quotes): New class.
6309 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
6311 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6312 (aarch64_sve_prepare_conditional_op): Remove.
6313 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6314 Allow aarch64_simd_reg_or_zero as select operand; remove
6315 the aarch64_sve_prepare_conditional_op call.
6316 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6317 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6318 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6319 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6320 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6321 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6322 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6323 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6324 and a splitters to match all of the *_any patterns.
6325 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6327 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6328 (SVE_COND_FP_BINARY_REV): Remove.
6329 (sve_int_op_rev, sve_fp_op_rev): New.
6330 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6331 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6332 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6333 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6334 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6335 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6336 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6337 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6338 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6340 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6341 Remove match_dup 1 from the inner unspec.
6342 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6344 * config/aarch64/aarch64.md (movprfx): New attr.
6345 (length): Default movprfx to 8.
6346 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6347 (*madd<SVE_I>, *msub<SVE_I): Likewise.
6348 (*<su>mul<SVE_I>3_highpart): Likewise.
6349 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6350 (*v<ASHIFT><SVE_I>3): Likewise.
6351 (*<su><MAXMIN><SVE_I>3): Likewise.
6352 (*<su><MAXMIN><SVE_F>3): Likewise.
6353 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6354 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6355 (*div<SVE_F>4): Likewise.
6357 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
6359 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6362 2018-07-02 Richard Biener <rguenther@suse.de>
6364 PR tree-optimization/86363
6365 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6366 memset argument refers to a non-variable address.
6368 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6370 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6371 {PLUS,MINUS}_EXPR code to...
6372 (adjust_symbolic_bound): ...here,
6373 (combine_bound): ...here,
6374 (set_value_range_with_overflow): ...and here.
6376 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6378 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6380 (extract_range_from_abs_expr): ...here.
6382 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
6384 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6385 -fno-omit-frame-pointer when not optimizing.
6387 2018-07-02 Martin Liska <mliska@suse.cz>
6390 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6391 (propagate_nothrow): Likewise.
6393 2018-07-02 Martin Liska <mliska@suse.cz>
6396 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6398 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6400 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6401 function in r262149, changing "loc" param from source_location to
6402 const dump_location_t &.
6403 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6404 declaration, as above.
6406 2018-07-01 Paul Koning <ni1d@arrl.net>
6408 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6409 -munit-asm, -mgnu-asm, -mdec-asm.
6410 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6411 (pdp11_output_labelref): New.
6412 (pdp11_output_def): New.
6413 (pdp11_output_addr_vec_elt): New.
6414 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
6415 %# and %@ format codes.
6416 (pdp11_option_override): New.
6417 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6418 (pdp11_output_ident): New.
6419 (pdp11_asm_named_section): New.
6420 (pdp11_asm_init_sections): New.
6421 (pdp11_file_start): New.
6422 (pdp11_file_end): New.
6423 (output_ascii): Use .ascii/.asciz for -mdec-asm.
6424 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
6425 %o, like %c but octal.
6426 (pdp11_option_override): New.
6427 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6429 (DATA_SECTION_ASM_OP): Ditto.
6430 (READONLY_DATA_SECTION_ASM_OP): New.
6431 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6432 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6433 (ASM_OUTPUT_LABELREF): Ditto.
6434 (ASM_OUTPUT_DEF): Ditto.
6435 (ASM_OUTPUT_EXTERNAL): New.
6436 (ASM_OUTPUT_SOURCE_FILENAME): New.
6437 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6438 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6439 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
6440 %# and %@ format codes.
6441 * config/pdp11/pdp11.opt (mgnu-asm): New.
6442 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6443 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6444 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6446 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
6448 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6449 dereferencing path[] beyond its length.
6451 (debug_all_paths): New.
6452 (rewire_first_differing_edge): New.
6453 (adjust_paths_after_duplication): New.
6454 (duplicate_thread_path): Call adjust_paths_after_duplication.
6456 (thread_through_all_blocks): Add new argument to
6457 duplicate_thread_path.
6459 2018-06-30 Jim Wilson <jimw@sifive.com>
6461 * config/riscv/predicates.md (p2m1_shift_operand): New.
6462 (high_mask_shift_operand): New.
6463 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6464 pattern using p2m1_shift_operand.
6465 (lshsi3_zero_extend_3+2): New combiner pattern using
6466 high_mask_shift_operand.
6468 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6470 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6472 (vect_recog_rotate_pattern): ...here.
6473 (vect_convert_input): Try to insert casts of invariants in the
6475 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6476 preheader to be empty.
6478 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6480 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6481 vector type. If given, install it in the new statement's
6483 (vect_element_precision): New function.
6484 (vect_unpromoted_value): New struct.
6485 (vect_unpromoted_value::vect_unpromoted_value): New function.
6486 (vect_unpromoted_value::set_op): Likewise.
6487 (vect_look_through_possible_promotion): Likewise.
6488 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6489 (vect_widened_op_tree, vect_convert_input): Likewise.
6490 (vect_convert_inputs, vect_convert_output): Likewise.
6491 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6492 to handle the optional cast of the multiplication result and
6493 vect_widened_op_tree to detect the widened multiplication itself.
6494 Do not require the input and output of promotion casts to have
6495 the same sign, but base the signedness of the operation on the
6496 input rather than the result. If the pattern includes two
6497 promotions, check that those promotions have the same sign.
6498 Do not restrict the MULT_EXPR handling to a double-width result;
6499 handle quadruple-width results and wider. Use vect_convert_inputs
6500 to convert the inputs to the common type.
6501 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
6502 to handle the optional cast of the ABS result. Also allow a sign
6503 change or a sign extension between the ABS and MINUS.
6504 Use vect_widened_op_tree to detect the widened subtraction and use
6505 vect_convert_inputs to convert the inputs to the common type.
6506 (vect_handle_widen_op_by_const): Delete.
6507 (vect_recog_widen_op_pattern): New function.
6508 (vect_recog_widen_mult_pattern): Use it.
6509 (vect_recog_widen_shift_pattern): Likewise.
6510 (vect_recog_widen_sum_pattern): Use
6511 vect_look_through_possible_promotion to handle the promoted
6514 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6516 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6517 the containing gimple_seq *.
6518 * gimple-iterator.h (gsi_for_stmt): Declare it.
6519 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6520 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6521 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6522 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6523 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6525 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6527 (vect_mark_pattern_stmts): ...here. Handle cases in which the
6528 statement being replaced is part of an existing pattern
6529 definition sequence, inserting the new pattern statements before
6531 (vect_pattern_recog_1): Don't return a bool. If the statement
6532 is already part of a pattern, instead apply pattern matching
6533 to the pattern definition statements. Don't clear the
6534 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6535 (vect_pattern_recog): Don't break after the first match;
6536 continue processing the pattern definition statements instead.
6537 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6539 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6541 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6542 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6543 (vect_recog_widen_sum_pattern): Use it.
6545 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6547 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6548 phi is not a pattern statement and has not been replaced by
6549 a pattern statement.
6550 * tree-vect-patterns.c (type_conversion_p): Don't check
6551 STMT_VINFO_IN_PATTERN_P.
6552 (vect_recog_vector_vector_shift_pattern): Likewise.
6553 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6554 the pattern statement rather than the original statement; check
6555 directly for a WIDEN_MULT_EXPR here.
6556 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6557 vect_is_simple_use to return the pattern statement rather
6558 than the original statement; use is_pattern_stmt_p to check
6559 for such a pattern statement.
6560 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6561 to return the pattern statement rather than the original statement;
6562 don't do the same transformation here.
6563 (vect_is_simple_use): If the defining statement has been replaced
6564 by a pattern statement, return the pattern statement instead.
6565 Remove the corresponding (local) transformation from the vectype
6568 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6570 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6571 end and default to null.
6572 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6573 (vectorizable_reduction): Update calls accordingly, dropping the
6574 gimple ** argument if the passed-back statement isn't needed.
6575 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6576 (vect_recog_rotate_pattern): Likewise.
6577 (vect_recog_mask_conversion_pattern): Likewise.
6578 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6579 (vect_mask_constant_operand_p): Likewise.
6580 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6581 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6582 (get_group_load_store_type, get_load_store_type): Likewise.
6583 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6584 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6585 (vectorizable_conversion, vectorizable_assignment): Likewise.
6586 (vectorizable_shift, vectorizable_operation): Likewise.
6587 (vectorizable_store, vect_is_simple_cond): Likewise.
6588 (vectorizable_condition, vectorizable_comparison): Likewise.
6589 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6590 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6591 and move it to the end. Cope with null def_stmt_outs.
6593 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6595 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6597 2018-06-29 Jeff Law <law@redhat.com>
6599 * config/v850/v850.c (v850_legitimate_address_p): Handle large
6600 displacements for TARGET_V850E2V3 and newer.
6601 (TARGET_LRA_P): Remove. Defaults to LRA now.
6602 * config/v850/v850.md (sign23byte_load): Remove.
6603 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6604 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6606 2018-06-29 Martin Liska <mliska@suse.cz>
6609 * coverage.c (coverage_init): Mangle full path name.
6610 * doc/invoke.texi: Document the change.
6611 * gcov-io.c (mangle_path): New.
6612 * gcov-io.h (mangle_path): Likewise.
6613 * gcov.c (mangle_name): Use mangle_path for path mangling.
6615 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6617 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6618 if starting source register is not even.
6620 2018-06-29 Martin Liska <mliska@suse.cz>
6622 PR tree-optimization/86263
6623 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6624 Make edge redirection.
6626 2018-06-29 David Malcolm <dmalcolm@redhat.com>
6628 * dumpfile.c (dump_loc): Add indentation based on scope depth.
6629 (dump_scope_depth): New variable.
6630 (get_dump_scope_depth): New function.
6631 (dump_begin_scope): New function.
6632 (dump_end_scope): New function.
6633 * dumpfile.h (get_dump_scope_depth): New declaration.
6634 (dump_begin_scope): New declaration.
6635 (dump_end_scope): New declaration.
6636 (class auto_dump_scope): New class.
6637 (AUTO_DUMP_SCOPE): New macro.
6638 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6641 2018-06-29 Richard Biener <rguenther@suse.de>
6643 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6644 compute_all_dependences succeeds.
6645 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6646 exceed --param loop-max-datarefs-for-datadeps.
6648 2018-06-29 Jakub Jelinek <jakub@redhat.com>
6650 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6652 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
6655 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6656 alternative 0 in preferred_for_speed attribute.
6658 2018-06-28 Paul Koning <ni1d@arrl.net>
6660 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6661 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6662 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6663 * config/pdp11/pdp11.md: Correct "length" attribute calculation
6664 for shift insn patterns.
6666 2018-06-28 David Malcolm <dmalcolm@redhat.com>
6668 * cgraph.c (cgraph_node::get_body): Replace assignments to
6669 "dump_file" with calls to set_dump_file.
6670 * dumpfile.c (alt_dump_file): Make static, and group with...
6671 (alt_flags): ...this definition.
6672 (dumps_are_enabled): New variable.
6673 (refresh_dumps_are_enabled): New function.
6674 (set_dump_file): New function.
6675 (set_alt_dump_file): New function.
6676 (gcc::dump_manager::dump_start): Replace assignments to
6677 "dump_file" and "alt_dump_file" with calls to set_dump_file and
6679 (gcc::dump_manager::dump_finish): Likewise.
6680 * dumpfile.h (alt_dump_file): Delete decl.
6681 (dumps_are_enabled): New variable decl.
6682 (set_dump_file): New function decl.
6683 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6685 * tree-nested.c (lower_nested_functions): Replace assignments to
6686 "dump_file" with calls to set_dump_file.
6688 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6690 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6691 goto_locus of each outgoing edge of each basic block.
6693 2018-06-28 Richard Biener <rguenther@suse.de>
6695 * dwarf2out.c (decl_scope_table): Remove.
6696 (push_decl_scope): Likewise.
6697 (pop_decl_scope): Likewise.
6698 (gen_type_die_for_member): Do not call push/pop_decl_scope.
6699 (gen_struct_or_union_type_die): Likewise.
6700 (gen_tagged_type_die): Likewise.
6701 (dwarf2out_init): Do not initialize decl_scope_table.
6702 (dwarf2out_c_finalize): Do not free it.
6704 2018-06-28 Richard Biener <rguenther@suse.de>
6706 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6707 deciding whether to not re-use a DIE.
6709 2018-06-28 Richard Biener <rguenther@suse.de>
6711 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6712 DW_AT_abstract_origin attribute.
6714 2018-06-28 Martin Liska <mliska@suse.cz>
6716 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6717 Use newly introduced constants.
6718 * tree-switch-conversion.h (struct jump_table_cluster):
6719 Define max_ratio_for_size and max_ratio_for_speed.
6721 2018-06-28 Martin Liska <mliska@suse.cz>
6723 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6724 Add new checking assert to catch invalid state.
6725 (jump_table_cluster::can_be_handled): Handle single case
6727 (jump_table_cluster::is_beneficial): Bail out for such case.
6728 (bit_test_cluster::find_bit_tests):
6729 Add new checking assert to catch invalid state.
6730 (bit_test_cluster::can_be_handled): Handle single case
6732 (bit_test_cluster::is_beneficial): Bail out for such case.
6733 (switch_decision_tree::analyze_switch_statement):
6736 2018-06-28 Martin Liska <mliska@suse.cz>
6738 * common.opt: Introduce -completion option.
6739 * gcc.c (driver_handle_option): Handle it.
6740 (driver::main): Print completions if completion
6742 * opt-suggestions.c (option_proposer::get_completions):
6744 (option_proposer::suggest_completion): Likewise.
6745 (option_proposer::find_param_completions): Likewise.
6746 (verify_autocompletions): Likewise.
6747 (test_completion_valid_options): Likewise.
6748 (test_completion_valid_params): Likewise.
6749 (in_completion_p): Likewise.
6750 (empty_completion_p): Likewise.
6751 (test_completion_partial_match): Likewise.
6752 (test_completion_garbage): Likewise.
6753 (opt_proposer_c_tests): Likewise.
6754 * opt-suggestions.h: Declare new functions.
6755 * opts.c (common_handle_option): Handle OPT__completion_.
6756 * selftest-run-tests.c (selftest::run_tests): Add
6757 opt_proposer_c_tests.
6758 * selftest.c (assert_str_startswith): New.
6759 * selftest.h (assert_str_startswith): Likewise.
6760 (opt_proposer_c_tests): New.
6761 (ASSERT_STR_STARTSWITH): Likewise.
6763 2018-06-28 Martin Liska <mliska@suse.cz>
6765 * Makefile.in: Add opt-suggestions.o.
6766 * gcc-main.c: Include opt-suggestions.h.
6767 * gcc.c (driver::driver): Likewise.
6768 (driver::~driver): Remove m_option_suggestions.
6769 (driver::build_option_suggestions): Moved to option_proposer.
6770 (driver::suggest_option): Likewise.
6771 (driver::handle_unrecognized_options): Use option_proposer.
6772 * gcc.h (class driver): Add new memver m_option_proposer.
6773 * opt-suggestions.c: New file.
6774 * opt-suggestions.h: New file.
6776 2018-06-28 Martin Liska <mliska@suse.cz>
6778 * vec.h (class auto_string_vec): New (moved from auto_argvec).
6779 (auto_string_vec::~auto_string_vec): Likewise.
6781 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6783 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6784 prevent_decl_creation_for_types fields up and add reset_location field.
6785 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6786 statement if id->reset_location is true.
6787 (copy_edges_for_bb): Do not set goto_locus on the new edges if
6788 id->reset_location is true.
6789 (copy_phis_for_bb): Force input_location on the arguments if
6790 id->reset_location is true.
6791 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6792 is set on the function to be inlined.
6794 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
6796 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6798 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
6800 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6801 registers for Pmode.
6802 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6803 hard registers for the clobbered pseudo.
6805 2018-06-27 Paul Koning <ni1d@arrl.net>
6807 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6808 mutually exclusive options.
6809 * config/pdp11/constraints.md (h): New constraint.
6810 (O): Update definition to match shift code generation.
6811 (D): New constraint.
6812 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6814 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6816 (output_jump): Change arguments.
6817 (pdp11_fixed_cc_regs): New function.
6818 (pdp11_cc_mode): Ditto.
6819 (pdp11_expand_shift): Ditto.
6820 (pdp11_assemble_shift): Ditto.
6821 (pdp11_small_shift): Ditto.
6822 (pdp11_branch_cost): Remove.
6823 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6825 (pdp11_register_move_cost): Update for CC registers.
6826 (pdp11_rtx_costs): Add case for LSHIFTRT.
6827 (pdp11_output_jump): Add CCNZ mode conditional branches.
6828 (notice_update_cc_on_set): Remove.
6829 (pdp11_cc_mode): New function.
6830 (simple_memory_operand): Correct pre/post decrement case.
6831 (no_side_effect_operand): New function.
6832 (pdp11_regno_reg_class): Add CC_REGS class.
6833 (pdp11_fixed_cc_regs): New function.
6834 (pdp11_small_shift): New function.
6835 (pdp11_expand_shift): New function to expand shift insns.
6836 (pdp11_assemble_shift): New function to output shifts.
6837 (pdp11_branch_cost): Remove.
6838 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
6839 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
6840 (WCHAR_TYPE): Ditto.
6841 (PTRDIFF_TYPE): Ditto.
6842 (ADJUST_INSN_LENGTH): New macro.
6843 (FIXED_REGISTERS): Add CC registers.
6844 (CALL_USED_REGISTERS): Ditto.
6846 (REG_CLASS_NAMES): Ditto.
6847 (REG_CLASS_CONTENTS): Ditto.
6848 (SELECT_CC_MODE): Use new function.
6849 (TARGET_FLAGS_REGNUM): New macro.
6850 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
6851 (cc0_reg_rtx): Remove.
6852 (CC_STATUS_MDEP): Remove.
6853 (CC_STATUS_MDEFP_INIT): Remove.
6854 (CC_IN_FPU): Remove.
6855 (NOTICE_UPDATE_CC): Remove.
6856 (REGISTER_NAMES): Add CC registers.
6857 (BRANCH_COST): Change to constant 1.
6858 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
6860 * config/pdp11/pdp11.opt (mbcopy): Remove.
6861 (mbcopy-builtin): Remove.
6862 (mbranch-cheap): Remove.
6863 (mbranch-expensive): Remove.
6864 * config/pdp11/predicates.md (expand_shift_operand): Update to
6865 match shift code generation.
6866 (ccnz_operator): New predicate.
6867 * doc/invoke.texi (PDP-11 Options): Remove deleted options
6868 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
6869 Remove non-existent option -mabshi, -mno-abshi. Document mutually
6871 * doc/md.texi (PDP-11): Document new D and h constraints. Update
6872 description of O constraint.
6874 2018-06-27 Jeff Law <law@redhat.com>
6875 Austin Law <austinklaw@gmail.com>
6877 * config/v850/v850.md (addsi3_set_flags): New pattern.
6878 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
6879 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
6880 (zero_extendhisi2_v850_set_flags): Likewise.
6881 (zero_extendqisi2_v850_set_flags): Likewise.
6882 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
6883 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
6884 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
6886 * config/v850/v850-protos.h (notice_update_cc): Remove.
6887 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
6888 (v850_print_operand): Handle 'D' and "d".
6889 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
6890 Add handling of arithmetic/logical operations compared against zero.
6891 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
6892 Do not look at v850_compare_op, instead get mode from last argument.
6893 (v850_gen_compare): Remove
6894 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
6895 after reload for prologue insns.
6896 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
6898 (construct_save_jarl): Likewise.
6899 (TARGET_FLAGS_REGNUM): Define.
6900 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
6901 (NOTICE_UPDATE_CC): Remove.
6902 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
6903 than cc0. Conditionalize on reload_completed.
6904 (cmpsi_insn, setfcc_insn): Likewise.
6905 (tst1 splitter): Turn into define_and_split which sets the flags
6907 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
6908 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
6909 (cstoresf4, cstoredf4): Clobber the flags.
6910 (cmpsi, cmpsf, cmpdf): Remove expanders.
6911 (setf_insn): Remove pattern.
6912 (addsi3): Turn into define_and_split which clobbers the flags after
6913 reload and a suitable pattern (addsi3_clobber_flags) for use after
6915 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
6916 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
6917 (ashrsi3, ashrsi3_v850e2): Likewise.
6918 (bins): Clobber the flags.
6919 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6920 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6921 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6922 (call_value_internal_short, call_value_internal_long): Likewise.
6923 (callt_save_interrupt, callt_return_interrupt): Likewise.
6924 (save_interrupt, return_interrupt): Likewise.
6925 (callt_save_all_interrupt, save_all_interrupt): Likewise.
6926 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
6927 (restore_all_interrupt, _restore_all_interrupt): Likewise.
6928 (All FP comparisons): Only allow after reload has completed.
6930 (divh, divhu): Tweak output template.
6931 (branch_z_normal, branch_z_invert): Remove
6932 (branch_nz_normal, branch_nz_invert): Likewise.
6933 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
6935 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
6936 * config/v850/v850.c (notice_update_cc): Remove.
6937 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
6938 (CC_NO_CARRY): Likewise.
6939 (NOTICE_UPDATE_CC): Define to nothing.
6940 * config/v850/v850.md: Remove block comment on cc0 handling
6941 Remove "cc" attribute from all patterns. Remove cc_status handling
6942 from all patterns. Minor formatting fixes.
6944 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6946 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
6947 (cortex-a76.cortex-a55): Likewise.
6948 * config/aarch64/aarch64-tune.md: Regenerate.
6949 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
6950 cortex-a76.cortex-a55.
6952 2018-06-27 Jeff Law <law@redhat.com>
6954 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
6955 (MULTILIB_DIRNAMES): Similarly.
6957 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
6959 * gimple.h (gimple_return_retbnd): Delete.
6960 (gimple_return_set_retbnd): Likewise.
6961 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
6962 gimple_return_set_retbnd.
6963 * gimple-pretty-print.c (dump_gimple_return): Remove call to
6964 gimple_return_retbnd and adjust.
6965 * tree-inline.h (struct copy_body_data): Remove retbnd field.
6966 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
6967 Explicitly return NULL in a couple more cases. Move assertion
6968 on debug statements and remove unreachable code.
6969 (reset_debug_binding): Do not test id->retbnd.
6970 (expand_call_inline): Do not set it.
6972 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6974 * configure.ac: Add --disable-gcov option.
6975 * configure: Regenerate.
6976 * Makefile.in: Honour @enable_gcov@.
6977 * doc/install.texi: Document --disable-gcov.
6979 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6981 * config/arm/arm-cpus.in (cortex-a76): New entry.
6982 (cortex-a76.cortex-a55): Likewise.
6983 * config/arm/arm-tables.opt: Regenerate.
6984 * config/arm/arm-tune.md: Likewise.
6985 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
6986 * doc/invoke.texi (ARM Options): Document cortex-a76 and
6987 cortex-a76.cortex-a55.
6989 2018-06-27 Tamar Christina <tamar.christina@arm.com>
6992 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
6994 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
6996 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
6998 (EPILOGUE_USES): Likewise.
7000 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7002 * tree-inline.c (remap_location): New function extracted from...
7003 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7004 (copy_phis_for_bb): ...here. Call remap_location.
7005 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7007 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7009 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7010 unaligned vsx for 16B memset.
7012 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7015 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7016 ieee128_float_type_node to long_double_type_node unless
7017 TARGET_LONG_DOUBLE_128 is set.
7019 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7021 * cfgloop.c (get_loop_location): Convert return type from
7022 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7023 by implicit construction from rtx_insn *, and using
7024 dump_user_location_t::from_function_decl for the fallback case.
7025 * cfgloop.h (get_loop_location): Convert return type from
7026 location_t to dump_user_location_t.
7027 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7028 dump_printf_loc to pass in a dump_location_t rather than a
7029 location_t, via the gimple stmt.
7030 * coverage.c (get_coverage_counts): Update calls to
7031 dump_printf_loc to pass in dump_location_t rather than a
7033 * doc/optinfo.texi (Dump types): Convert example of
7034 dump_printf_loc from taking "locus" to taking "insn". Update
7035 description of the "_loc" calls to cover dump_location_t.
7036 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7038 (dump_user_location_t::dump_user_location_t): New constructors,
7039 from gimple *stmt and rtx_insn *.
7040 (dump_user_location_t::from_function_decl): New function.
7041 (dump_loc): Make static.
7042 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7043 const dump_location_t &.
7044 (dump_generic_expr_loc): Delete.
7045 (dump_printf_loc): Convert param "loc" from location_t to
7046 const dump_location_t &.
7047 (selftest::test_impl_location): New function.
7048 (selftest::dumpfile_c_tests): New function.
7049 * dumpfile.h: Include "profile-count.h".
7050 (class dump_user_location_t): New class.
7051 (struct dump_impl_location_t): New struct.
7052 (class dump_location_t): New class.
7053 (dump_printf_loc): Convert 2nd param from source_location to
7054 const dump_location_t &.
7055 (dump_generic_expr_loc): Delete.
7056 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7057 const dump_location_t &.
7058 * gimple-fold.c (fold_gimple_assign): Update call to
7059 dump_printf_loc to pass in a dump_location_t rather than a
7060 location_t, via the gimple stmt.
7061 (gimple_fold_call): Likewise.
7062 * gimple-loop-interchange.cc
7063 (loop_cand::analyze_iloop_reduction_var): Update for change to
7064 check_reduction_path.
7065 (tree_loop_interchange::interchange): Update for change to
7067 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7068 change in return-type of find_loop_location.
7069 (graphite_regenerate_ast_isl): Likewise.
7070 * graphite-optimize-isl.c (optimize_isl): Likewise.
7071 * graphite.c (graphite_transform_loops): Likewise.
7072 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7073 pass in a dump_location_t rather than a location_t, via the
7075 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7076 * ipa.c (walk_polymorphic_call_targets): Likewise.
7077 * loop-unroll.c (report_unroll): Convert "locus" param from
7078 location_t to dump_location_t.
7079 (decide_unrolling): Update for change to get_loop_location's
7081 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7082 location_t to dump_user_location_t.
7083 (grid_find_single_omp_among_assignments_1): Updates calls to
7084 dump_printf_loc to pass in a dump_location_t rather than a
7085 location_t, via the gimple stmt.
7086 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7087 location_t to dump_location_t. Updates calls to dump_printf_loc
7088 to pass in a dump_location_t rather than a location_t, via the
7090 (grid_inner_loop_gridifiable_p): Likewise.
7091 (grid_dist_follows_simple_pattern): Likewise.
7092 (grid_gfor_follows_tiling_pattern): Likewise.
7093 (grid_target_follows_gridifiable_pattern): Likewise.
7094 (grid_attempt_target_gridification): Convert initialization
7095 of local "grid" from memset to zero-initialization; FIXME: does
7096 this require C++11? Update call to dump_printf_loc to pass in a
7097 optinfo_location rather than a location_t, via the gimple stmt.
7098 * profile.c (read_profile_edge_counts): Updates call to
7099 dump_printf_loc to pass in a dump_location_t rather than a
7101 (compute_branch_probabilities): Likewise.
7102 * selftest-run-tests.c (selftest::run_tests): Call
7104 * selftest.h (dumpfile_c_tests): New decl.
7105 * tree-loop-distribution.c (pass_loop_distribution::execute):
7106 Update for change in return type of find_loop_location.
7107 * tree-parloops.c (parallelize_loops): Likewise.
7108 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7109 "locus" from location_t to dump_user_location_t.
7110 (canonicalize_loop_induction_variables): Likewise.
7111 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7112 for change in return type of find_loop_location.
7113 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7114 to dump_printf_loc to pass in a dump_location_t rather than a
7115 location_t, via the stmt.
7116 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7118 * tree-vect-loop-manip.c (find_loop_location): Convert return
7119 type from source_location to dump_user_location_t.
7120 (vect_do_peeling): Update for above change.
7121 (vect_loop_versioning): Update for change in type of
7123 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7124 from location_t to dump_user_location_t.
7125 (vect_estimate_min_profitable_iters): Update for change in type
7127 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7128 location_t to dump_location_t.
7129 (vect_slp_bb): Update for change in type of vect_location.
7130 * tree-vectorizer.c (vect_location): Convert from source_location
7131 to dump_user_location_t.
7132 (try_vectorize_loop_1): Update for change in vect_location's type.
7133 (vectorize_loops): Likewise.
7134 (increase_alignment): Likewise.
7135 * tree-vectorizer.h (vect_location): Convert from source_location
7136 to dump_user_location_t.
7137 (find_loop_location): Convert return type from source_location to
7138 dump_user_location_t.
7139 (check_reduction_path): Convert 1st param from location_t to
7140 dump_user_location_t.
7141 * value-prof.c (check_counter): Update call to dump_printf_loc to
7142 pass in a dump_user_location_t rather than a location_t; update
7143 call to error_at for change in type of "locus".
7144 (check_ic_target): Update call to dump_printf_loc to
7145 pass in a dump_user_location_t rather than a location_t, via the
7148 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7150 * config/s390/s390.h (enum processor_flags): Do not use
7151 default tune parameter when -march was specified.
7153 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7156 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7157 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7160 2018-06-26 Richard Biener <rguenther@suse.de>
7162 PR tree-optimization/86287
7164 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7165 (vect_analyze_loop): Initialize n_stmts.
7167 2018-06-26 Richard Biener <rguenther@suse.de>
7170 * fold-const.c (fold_convertible_p): Pointer extension
7173 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7176 * dwarf2out.c (loc_list_has_views): Adjust comments.
7177 (dw_loc_list): Split single cross-partition range with
7180 2018-06-25 Jeff Law <law@redhat.com>
7182 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7183 on -mbig-switch by default.
7185 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7187 (const_float_0_operand): Remove unused predicate.
7188 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7189 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7190 (recipsf2): New expander. Original pattern now called
7192 (recipdf2, recipdf2_insn): Similarly.
7193 (rsqrtsf2, rsqrtsf2_insn): Similarly
7194 (rsqrtdf2, rsqrtdf2_insn): Similarly
7196 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7198 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7199 Simplify logic for FreeBSD (twice).
7201 2018-06-25 Martin Sebor <msebor@redhat.com>
7203 PR tree-optimization/86204
7204 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7205 a strnlen result if it's less than the length of the string.
7207 2018-06-25 Martin Sebor <msebor@redhat.com>
7209 PR tree-optimization/85700
7210 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7211 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7212 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7214 2018-06-25 Martin Sebor <msebor@redhat.com>
7216 * doc/extend.texi (Zero-length arrays): Update and clarify.
7218 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7220 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7221 added IEEE/IBM long double multilib support on PowerPC little
7222 endian Linux systems.
7223 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7224 (MULTILIB_DEFAULTS): Likewise.
7225 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7227 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7228 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7229 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7231 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7234 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7235 (REORDER_45): Likewise.
7237 2018-06-25 Jeff Law <law@redhat.com>
7239 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7240 dividend to 32 bits. Adjust length.
7241 (udivmodhi4): Cleanup output template. Fix length.
7243 2018-06-25 Carl Love <cel@us.ibm.com>
7245 * config/rs6000/vsx.md: Change word selector to prefered location.
7247 2018-06-25 Richard Biener <rguenther@suse.de>
7249 PR tree-optimization/86304
7250 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7251 epilogue-if-converted loops as well.
7253 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7255 * lto-section-out.c (lto_begin_section): Do not print section
7256 name for noaddr and unnumbered dumps.
7258 2018-06-25 Richard Biener <rguenther@suse.de>
7260 * tree-vectorizer.h (struct vec_info_shared): New structure
7261 with parts split out from struct vec_info and loop_nest from
7262 struct _loop_vec_info.
7263 (struct vec_info): Adjust accordingly.
7264 (struct _loop_vec_info): Likewise.
7265 (LOOP_VINFO_LOOP_NEST): Adjust.
7266 (LOOP_VINFO_DATAREFS): Likewise.
7267 (LOOP_VINFO_DDRS): Likewise.
7268 (struct _bb_vec_info): Likewise.
7269 (BB_VINFO_DATAREFS): Likewise.
7270 (BB_VINFO_DDRS): Likewise.
7271 (struct _stmt_vec_info): Add dr_aux member.
7272 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7273 (DR_MISALIGNMENT_UNINITIALIZED): New.
7274 (set_dr_misalignment): Adjust.
7275 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7276 (vect_analyze_loop): Adjust prototype.
7277 (vect_analyze_loop_form): Likewise.
7278 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7279 Compute dependences lazily.
7280 (vect_record_base_alignments): Use shared datarefs/ddrs.
7281 (vect_verify_datarefs_alignment): Likewise.
7282 (vect_analyze_data_refs_alignment): Likewise.
7283 (vect_analyze_data_ref_accesses): Likewise.
7284 (vect_analyze_data_refs): Likewise.
7285 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7286 constructor parameter for shared part.
7287 (vect_analyze_loop_form): Pass in shared part and adjust.
7288 (vect_analyze_loop_2): Pass in storage for the number of
7289 stmts. Move loop nest finding to the caller. Compute
7291 (vect_analyze_loop): Pass in shared part.
7292 (vect_transform_loop): Verify shared datarefs are unchanged.
7293 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7294 constructor parameter for shared part.
7295 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7296 (vect_slp_bb): Verify shared datarefs are unchanged before
7298 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7300 (new_stmt_vec_info): Initialize DR_AUX misalignment to
7301 DR_MISALIGNMENT_UNINITIALIZED.
7302 * tree-vectorizer.c (vec_info::vec_info): Add constructor
7303 parameter for shared part.
7304 (vec_info::~vec_info): Adjust.
7305 (vec_info_shared::vec_info_shared): New.
7306 (vec_info_shared::~vec_info_shared): Likewise.
7307 (vec_info_shared::save_datarefs): Likewise.
7308 (vec_info_shared::check_datarefs): Likewise.
7309 (try_vectorize_loop_1): Construct shared part live for analyses
7310 of a single loop for multiple vector sizes.
7311 * tree-parloops.c (gather_scalar_reductions): Adjust.
7313 2018-06-25 Richard Biener <rguenther@suse.de>
7315 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7316 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7317 (vect_analyze_data_refs): Remove similar code from here and
7318 simplify accordingly.
7320 2018-06-25 Richard Biener <rguenther@suse.de>
7322 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7323 for reverse storage order accesses rather than asserting
7324 they cannot happen here.
7326 2018-06-25 Tom de Vries <tdevries@suse.de>
7329 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7330 Use data16 instead of .byte for insn prefix.
7332 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
7335 * parser.c (make_char_string_pack): Pass this literal chars
7336 through cpp_interpret_string.
7337 (cp_parser_userdef_numeric_literal): Check the result of
7338 make_char_string_pack.
7340 2018-06-24 Maya Rashish <coypu@sdf.org>
7342 * ginclude/stddef.h: Simplify conditions around avoiding
7343 re-definition of __size_t.
7345 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7347 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7348 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7350 2018-06-22 Maya Rashish <coypu@sdf.org>
7352 * doc/invoke.texi (mno-fancy-math-387): Update for changes
7353 made to OpenBSD and NetBSD through the years.
7355 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7357 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7358 behavior of vec_pack (vector double, vector double) to match
7359 behavior of vec_float2 (vector double, vector double).
7361 2018-06-22 Olivier Hainque <hainque@adacore.com>
7363 * gimplify.c (gimplify_function_tree): Prevent creation
7364 of a trampoline for the address of the current function
7365 passed to entry/exit instrumentation hooks.
7367 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
7370 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7373 2018-06-22 Martin Liska <mliska@suse.cz>
7375 PR tree-optimization/86263
7376 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7377 Bail out if is_enabled is false.
7378 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7380 (jump_table_cluster::is_enabled): New function.
7382 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7384 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7385 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7386 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7387 (lto_input_ts_binfo_tree_pointers): Likewise.
7388 * tree-streamer-out.c (streamer_write_tree_bitfields,
7389 write_ts_binfo_tree_pointers): Likewise.
7390 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7392 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7394 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7396 2018-06-22 Martin Liska <mliska@suse.cz>
7398 * symbol-summary.h (get): Make it pure and inline move
7399 functionality from ::get function.
7400 (get): Remove and inline into ::get and ::get_create.
7401 (get_create): Move code from ::get function.
7403 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7406 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7407 -x assembler-with-cpp.
7409 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7411 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7412 _FILE_OFFSET_BITS=64 for C++.
7414 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
7416 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7417 conversion insn that shows up when pr85657-3.c is compiled using
7418 IEEE 128-bit long double.
7419 (neg<mode>2_internal): Use the correct mode to check whether the
7420 mode is IBM extended.
7421 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7422 multiply and divide external functions from being created more
7425 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7427 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7429 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
7430 the edge can be forwarded.
7431 (cfg_layout_merge_blocks): Likewise.
7433 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7435 * except.c (finish_eh_generation): Commit edge insertions only after
7436 the EH edges have been redirected from post-landing to landing pads.
7438 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7440 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7441 create_tmp_var_for to create the FRAME decl.
7442 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7444 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7446 * tree-inline.c (copy_edges_for_bb): Minor tweak.
7447 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7448 debug statement when resetting its value.
7449 (expand_call_inline): Copy the locus of the call onto the assignment
7450 of the return value, if any. Use local variable in more cases.
7452 2018-06-21 Martin Liska <mliska@suse.cz>
7454 * ipa-pure-const.c (propagate_nothrow): Use
7455 funct_state_summaries->get.
7456 (dump_malloc_lattice): Likewise.
7457 (propagate_malloc): Likewise.
7459 2018-06-21 Richard Biener <rguenther@suse.de>
7461 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7462 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7463 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7465 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7466 BLOCK_ABSTRACT_ORIGIN unconditionally.
7468 2018-06-21 David Malcolm <dmalcolm@redhat.com>
7470 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7472 * ipa-reference.c (ipa_reference_c_finalize): Delete
7473 ipa_ref_opt_sum_summaries and set it to NULL.
7475 2018-06-21 Tom de Vries <tdevries@suse.de>
7477 PR tree-optimization/85859
7478 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7479 test with comment from bb_no_side_effects_p.
7481 2018-06-21 Richard Biener <rguenther@suse.de>
7483 PR tree-optimization/86232
7484 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7485 max for constant niter.
7487 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7489 * config/aarch64/aarch64-simd.md
7490 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7492 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7494 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7495 Make opernads of the unspec commutative.
7497 2018-06-21 Richard Biener <rguenther@suse.de>
7499 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7500 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7501 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7502 (vect_analyze_data_ref_dependence): Re-order checks to deal with
7504 (vect_record_base_alignments): Do not record base alignment
7505 for gathers or scatters.
7506 (vect_compute_data_ref_alignment): Drop return value that is always
7507 true. Bail out early for gathers or scatters.
7508 (vect_enhance_data_refs_alignment): Bail out early for gathers
7510 (vect_find_same_alignment_drs): Likewise.
7511 (vect_analyze_data_refs_alignment): Remove dead code.
7512 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7513 (vect_analyze_data_refs): For possible gathers or scatters do
7514 not create an alternate DR, just check their possible validity
7515 and mark them. Adjust DECL_NONALIASED handling to not rely
7517 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7518 update inits of gathers or scatters.
7519 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7520 Also copy gather/scatter flag to pattern vinfo.
7522 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
7524 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7525 behavior of vec_packsu (vector unsigned long long, vector unsigned
7526 long long) to match behavior of vec_packs with same signature.
7528 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
7529 Thomas Schwinge <thomas@codesourcery.com>
7530 Cesar Philippidis <cesar@codesourcery.com>
7532 * gimplify.c (gimplify_scan_omp_clauses): Add support for
7533 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7534 (gimplify_adjust_omp_clauses): Likewise.
7535 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7536 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7537 (gimplify_omp_target_update): Update handling of acc update and
7539 * omp-low.c (install_var_field): Remove unused parameter
7540 base_pointers_restrict.
7541 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7542 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7544 (omp_target_base_pointers_restrict_p): Delete.
7545 (scan_omp_target): Update call to scan_sharing_clauses.
7546 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7548 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7549 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7550 (convert_local_omp_clauses): Likewise.
7551 * tree-pretty-print.c (dump_omp_clause): Likewise.
7552 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
7554 (omp_clause_code_name): Likewise.
7556 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7559 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7562 PR tree-optimization/86231
7563 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
7564 anti-range don't overwrite *vr0min before using it to compute *vr0max.
7566 2018-06-20 Tom de Vries <tdevries@suse.de>
7568 PR tree-optimization/86097
7569 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7570 iv type if signedness of iv type is not the same as that of *nit.
7572 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7574 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
7575 EDGE_EH edges, verify they are all EDGE_EH.
7577 2018-06-20 Maya Rashish <coypu@sdf.org>
7579 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7581 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7583 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7584 * config/aarch64/aarch64.c (xgene1_tunings): Add
7585 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7586 (aarch64_mode_valid_for_sched_fusion_p):
7587 Allow 16-byte modes.
7588 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7589 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7591 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7593 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7594 * config/aarch64/iterators.md (VQ2): New mode iterator.
7596 2018-06-20 Martin Liska <mliska@suse.cz>
7598 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7599 Change default ratio from 10 to 8.
7601 2018-06-20 Martin Liska <mliska@suse.cz>
7603 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7605 (bit_test_cluster::find_bit_tests): Likewise.
7606 (switch_decision_tree::analyze_switch_statement): Find clusters.
7607 * tree-switch-conversion.h (struct jump_table_cluster): Document
7610 2018-06-20 Martin Liska <mliska@suse.cz>
7612 * tree-switch-conversion.c (switch_conversion::collect):
7613 Record m_uniq property.
7614 (switch_conversion::expand): Bail out for special conditions.
7615 (group_cluster::~group_cluster): New.
7616 (group_cluster::group_cluster): Likewise.
7617 (group_cluster::dump): Likewise.
7618 (jump_table_cluster::emit): New.
7619 (switch_decision_tree::fix_phi_operands_for_edges): New.
7620 (struct case_node): Remove struct.
7621 (jump_table_cluster::can_be_handled): New.
7622 (case_values_threshold): Moved to header.
7623 (reset_out_edges_aux): Likewise.
7624 (jump_table_cluster::is_beneficial): New.
7625 (bit_test_cluster::can_be_handled): Likewise.
7626 (add_case_node): Remove.
7627 (bit_test_cluster::is_beneficial): New.
7628 (case_bit_test::cmp): New.
7629 (bit_test_cluster::emit): New.
7630 (expand_switch_as_decision_tree_p): Remove.
7631 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7632 (fix_phi_operands_for_edge): Likewise.
7633 (switch_decision_tree::analyze_switch_statement): New.
7634 (compute_cases_per_edge): Move ...
7635 (switch_decision_tree::compute_cases_per_edge): ... here.
7636 (try_switch_expansion): Likewise.
7637 (switch_decision_tree::try_switch_expansion): Likewise.
7638 (record_phi_operand_mapping): Likewise.
7639 (switch_decision_tree::record_phi_operand_mapping): Likewise.
7640 (emit_case_decision_tree): Likewise.
7641 (switch_decision_tree::emit): Likewise.
7642 (balance_case_nodes): Likewise.
7643 (switch_decision_tree::balance_case_nodes): Likewise.
7644 (dump_case_nodes): Likewise.
7645 (switch_decision_tree::dump_case_nodes): Likewise.
7646 (emit_jump): Likewise.
7647 (switch_decision_tree::emit_jump): Likewise.
7648 (emit_cmp_and_jump_insns): Likewise.
7649 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7650 (emit_case_nodes): Likewise.
7651 (switch_decision_tree::emit_case_nodes): Likewise.
7652 (conditional_probability): Remove.
7653 * tree-switch-conversion.h (enum cluster_type): New.
7655 (struct cluster): Likewise.
7656 (cluster::cluster): Likewise.
7657 (struct simple_cluster): Likewise.
7658 (simple_cluster::simple_cluster): Likewise.
7659 (struct group_cluster): Likewise.
7660 (struct jump_table_cluster): Likewise.
7661 (struct bit_test_cluster): Likewise.
7662 (struct min_cluster_item): Likewise.
7663 (struct case_tree_node): Likewise.
7664 (case_tree_node::case_tree_node): Likewise.
7665 (jump_table_cluster::case_values_threshold): Likewise.
7666 (struct case_bit_test): Likewise.
7667 (struct switch_decision_tree): Likewise.
7668 (struct switch_conversion): Likewise.
7669 (switch_decision_tree::reset_out_edges_aux): Likewise.
7671 2018-06-20 Martin Liska <mliska@suse.cz>
7673 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7674 (hoist_edge_and_branch_if_true): Likewise.
7675 (expand_switch_using_bit_tests_p): Likewise.
7676 (struct case_bit_test): Likewise.
7677 (case_bit_test_cmp): Likewise.
7678 (emit_case_bit_tests): Likewise.
7679 (switch_conversion::switch_conversion): New class.
7680 (struct switch_conv_info): Remove old struct.
7681 (collect_switch_conv_info): More to ...
7682 (switch_conversion::collect): ... this.
7683 (check_range): Likewise.
7684 (switch_conversion::check_range): Likewise.
7685 (check_all_empty_except_final): Likewise.
7686 (switch_conversion::check_all_empty_except_final): Likewise.
7687 (check_final_bb): Likewise.
7688 (switch_conversion::check_final_bb): Likewise.
7689 (create_temp_arrays): Likewise.
7690 (switch_conversion::create_temp_arrays): Likewise.
7691 (free_temp_arrays): Likewise.
7692 (gather_default_values): Likewise.
7693 (switch_conversion::gather_default_values): Likewise.
7694 (build_constructors): Likewise.
7695 (switch_conversion::build_constructors): Likewise.
7696 (constructor_contains_same_values_p): Likewise.
7697 (switch_conversion::contains_same_values_p): Likewise.
7698 (array_value_type): Likewise.
7699 (switch_conversion::array_value_type): Likewise.
7700 (build_one_array): Likewise.
7701 (switch_conversion::build_one_array): Likewise.
7702 (build_arrays): Likewise.
7703 (switch_conversion::build_arrays): Likewise.
7704 (gen_def_assigns): Likewise.
7705 (switch_conversion::gen_def_assigns): Likewise.
7706 (prune_bbs): Likewise.
7707 (switch_conversion::prune_bbs): Likewise.
7708 (fix_phi_nodes): Likewise.
7709 (switch_conversion::fix_phi_nodes): Likewise.
7710 (gen_inbound_check): Likewise.
7711 (switch_conversion::gen_inbound_check): Likewise.
7712 (process_switch): Use the newly created class.
7713 (switch_conversion::expand): New.
7714 (switch_conversion::~switch_conversion): New.
7715 * tree-switch-conversion.h: New file.
7717 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7719 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7720 tree-vect-patterns.c.
7721 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7722 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
7723 (vect_recog_sad_pattern): Likewise.
7724 (vect_recog_widen_sum_pattern): Likewise.
7725 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
7726 (vect_recog_widen_shift_pattern): Remove the type_in argument.
7727 (vect_recog_rotate_pattern): Likewise.
7728 (vect_recog_mult_pattern): Likewise.
7729 (vect_recog_vector_vector_shift_pattern): Likewise.
7730 (vect_recog_divmod_pattern): Likewise.
7731 (vect_recog_mixed_size_cond_pattern): Likewise.
7732 (vect_recog_bool_pattern): Likewise.
7733 (vect_recog_mask_conversion_pattern): Likewise.
7734 (vect_try_gather_scatter_pattern): Likewise.
7735 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
7736 (vect_recog_over_widening_pattern): Likewise.
7737 (vect_recog_gather_scatter_pattern): Likewise.
7738 (vect_recog_func_ptr): Move from tree-vectorizer.h
7739 (vect_vect_recog_func_ptrs): Move further down the file.
7740 (vect_recog_func): Likewise. Remove the third argument.
7741 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7742 (vect_pattern_recog_1): Expect the pattern function to do any
7743 necessary target tests. Also expect it to provide a vector type.
7744 Remove the type_in handling.
7746 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7748 * tree-vect-patterns.c (vect_pattern_detected): New function.
7749 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
7750 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
7751 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
7752 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
7753 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7754 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7755 (vect_recog_mask_conversion_pattern)
7756 (vect_try_gather_scatter_pattern): Likewise.
7758 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7760 * tree-vect-patterns.c (vect_get_internal_def): New function.
7761 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7762 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
7763 (search_type_for_mask_1): Use it.
7765 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7767 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7768 redundant WIDEN_SUM_EXPR handling.
7769 (vect_recog_sad_pattern): Likewise.
7771 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7773 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7774 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7775 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7776 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7777 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7779 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7781 * tree-vect-stmts.c (vectorizable_call): Make sure that we
7782 use the stmt_vec_info of the original bb statement for the
7783 new zero assignment, even if the call is part of a pattern.
7785 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7787 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7788 that the sequence is attached to the original statement rather
7789 than the pattern statement.
7790 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7791 PATTERN_DEF_SEQ from the original statement rather than
7792 the main pattern statement.
7793 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7794 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7795 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7797 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7799 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7800 definition statements before the early exit for statements that aren't
7802 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7804 (vect_transform_loop): ...here. Process pattern definition
7805 statements without first checking whether the main pattern
7806 statement is live or relevant.
7808 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7810 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7811 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7813 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
7815 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7816 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7817 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7818 (expand_block_compare): Change select_block_compare_mode call.
7819 (expand_strncmp_align_check): Use new functions, fix comment.
7820 (emit_final_str_compare_gpr): New function.
7821 (expand_strn_compare): Refactor and clean up code.
7822 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7824 2018-06-19 Tony Reix <tony.reix@atos.com>
7825 Damien Bergamini <damien.bergamini@atos.com>
7826 David Edelsohn <dje.gcc@gmail.com>
7828 * collect2.c (static_obj): New variable.
7829 (static_libs): New variable.
7830 (is_in_list): Uncomment declaration.
7831 (main): Track AIX libraries linked statically.
7832 (is_in_list): Uncomment definition.
7833 (scan_prog_file): Don't add AIX shared libraries initializer
7834 to constructor list if linking statically.
7836 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
7838 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
7840 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
7842 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
7844 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
7847 2018-06-19 Martin Liska <mliska@suse.cz>
7849 * config/i386/i386.c (ix86_can_inline_p): Do not use
7850 ipa_fn_summaries::get_create.
7851 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
7853 (devirtualization_time_bonus): Likewise.
7854 (ipcp_propagate_stage): Likewise.
7855 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7856 (edge_set_predicate): Likewise.
7857 (evaluate_conditions_for_known_args): Likewise.
7858 (evaluate_properties_for_edge): Likewise.
7859 (ipa_call_summary::reset): Tranform to ...
7860 (ipa_call_summary::~ipa_call_summary): ... this.
7861 (ipa_fn_summary::reset): Transform to ...
7862 (ipa_fn_summary::~ipa_fn_summary): ... this.
7863 (ipa_fn_summary_t::remove): Rename to ...
7864 (ipa_fn_summary_t::remove_callees): ... this.
7865 (ipa_fn_summary_t::duplicate): Use placement new
7866 instead of memory copy.
7867 (ipa_call_summary_t::duplicate): Likewise.
7868 (ipa_call_summary_t::remove): Remove.
7869 (dump_ipa_call_summary): Change get_create to get.
7870 (ipa_dump_fn_summary): Dump only when summary exists.
7871 (analyze_function_body): Use symbol_summary::get instead
7873 (compute_fn_summary): Likewise.
7874 (estimate_edge_devirt_benefit): Likewise.
7875 (estimate_edge_size_and_time): Likewise.
7876 (inline_update_callee_summaries): Likewise.
7877 (remap_edge_change_prob): Likewise.
7878 (remap_edge_summaries): Likewise.
7879 (ipa_merge_fn_summary_after_inlining): Likewise.
7880 (write_ipa_call_summary): Likewise.
7881 (ipa_fn_summary_write): Likewise.
7882 (ipa_free_fn_summary): Likewise.
7883 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
7884 (struct ipa_call_summary): Likewise.
7885 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
7887 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
7888 (estimate_size_after_inlining): Likewise.
7889 (estimate_growth): Likewise.
7890 (growth_likely_positive): Likewise.
7891 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7892 (inline_call): Likewise.
7893 * ipa-inline.c (caller_growth_limits): Likewise.
7894 (can_inline_edge_p): Likewise.
7895 (can_inline_edge_by_limits_p): Likewise.
7896 (compute_uninlined_call_time): Likewise.
7897 (compute_inlined_call_time): Likewise.
7898 (want_inline_small_function_p): Likewise.
7899 (edge_badness): Likewise.
7900 (update_caller_keys): Likewise.
7901 (update_callee_keys): Likewise.
7902 (inline_small_functions): Likewise.
7903 (inline_to_all_callers_1): Likewise.
7904 (dump_overall_stats): Likewise.
7905 (early_inline_small_functions): Likewise.
7906 (early_inliner): Likewise.
7907 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7908 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7909 * ipa-pure-const.c (malloc_candidate_p): Likewise.
7910 * ipa-split.c (execute_split_functions): Likewise.
7911 * symbol-summary.h: Likewise.
7912 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7914 2018-06-19 Richard Biener <rguenther@suse.de>
7916 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
7917 (vectorize_loops): ... here. Fix dbgcnt handling.
7918 (try_vectorize_loop): Wrap try_vectorize_loop_1.
7920 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
7923 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
7924 ieee128 argument takes up only one (vector) register, not two (floating
7927 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7929 * gimplify.c (gimplify_init_constructor): Really never clear for an
7930 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
7932 2018-06-19 Richard Biener <rguenther@suse.de>
7934 PR tree-optimization/86179
7935 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
7936 after failed recognition.
7938 2018-06-18 Martin Sebor <msebor@redhat.com>
7941 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
7942 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
7943 Handle integer subtraction.
7944 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
7945 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
7947 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7949 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
7950 param from rtx to rtx_insn *.
7951 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
7953 (frv_ifcvt_modify_insn): Likwise.
7954 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
7955 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
7956 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
7957 as_a <rtx_insn *> cast to local "unprotected_region" once
7958 it's been established that it's not NULL or pc_rtx.
7959 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
7960 param "sethi" from rtx to rtx_insn *.
7961 (nds32_group_float_insns): Likewise for param "insn".
7962 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
7964 (vax_output_int_subtract): Likewise.
7965 * config/vax/vax.c (vax_output_int_add): Likewise for param
7967 (vax_output_int_subtract): Likewise.
7968 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
7969 (emit_pattern_after): Likewise for param "after".
7970 (emit_insn_after): Likewise.
7971 (emit_jump_insn_after): Likewise.
7972 (emit_call_insn_after): Likewise.
7973 (emit_debug_insn_after): Likewise.
7974 (emit_pattern_before): Likewise for param "before".
7975 (emit_insn_before): Likewise.
7976 (emit_jump_insn_before): Likewise.
7977 * final.c (get_insn_template): Likewise for param "insn", removing
7979 * output.h (get_insn_template): Likewise for 2nd param.
7980 * rtl.h (emit_insn_before): Likewise.
7981 (emit_jump_insn_before): Likewise.
7982 (emit_debug_insn_before_noloc): Likewise.
7983 (emit_insn_after): Likewise.
7984 (emit_jump_insn_after): Likewise.
7985 (emit_call_insn_after): Likewise.
7986 (emit_debug_insn_after): Likewise.
7987 (set_insn_deleted): Likewise for param.
7989 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
7992 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
7993 floating point modes, so that IFmode is numerically greater than
7994 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
7995 to declare the ordering. This prevents IFmode from being
7996 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
7997 machine. Include rs6000-modes.h to share the fractional values
7998 between genmodes* and the rest of the compiler.
8002 * config/rs6000/rs6000-modes.h: New file.
8003 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8004 meaning of rs6000_long_double_size so that 126..128 selects an
8005 appropriate 128-bit floating point type.
8006 (rs6000_option_override_internal): Likewise.
8007 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8008 (TARGET_LONG_DOUBLE_128): Change the meaning of
8009 rs6000_long_double_size so that 126..128 selects an appropriate
8010 128-bit floating point type.
8011 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8012 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8013 source and destination to match the standard usage.
8014 (truncifkf2): Likewise.
8015 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8016 ISA 2.07 to use an explicit clobber, instead of passing in a
8018 (copysign<mode>3_soft): Likewise.
8020 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8022 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8023 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8024 (vect_slp_analyze_instance_dependence): Likewise.
8025 (vect_enhance_data_refs_alignment): Likewise.
8026 (vect_analyze_data_refs_alignment): Likewise.
8027 (vect_slp_analyze_and_verify_instance_alignment
8028 (vect_analyze_data_ref_accesses): Likewise.
8029 (vect_prune_runtime_alias_test_list): Likewise.
8030 (vect_analyze_data_refs): Likewise.
8031 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8032 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8033 (vect_analyze_scalar_cycles_1): Likewise.
8034 (vect_get_loop_niters): Likewise.
8035 (vect_analyze_loop_form_1): Likewise.
8036 (vect_update_vf_for_slp): Likewise.
8037 (vect_analyze_loop_operations): Likewise.
8038 (vect_analyze_loop): Likewise.
8039 (vectorizable_induction): Likewise.
8040 (vect_transform_loop): Likewise.
8041 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8042 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8043 (vect_make_slp_decision): Likewise.
8044 (vect_detect_hybrid_slp): Likewise.
8045 (vect_slp_analyze_operations): Likewise.
8046 (vect_slp_bb): Likewise.
8047 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8048 (vectorizable_bswap): Likewise.
8049 (vectorizable_call): Likewise.
8050 (vectorizable_simd_clone_call): Likewise.
8051 (vectorizable_conversion): Likewise.
8052 (vectorizable_assignment): Likewise.
8053 (vectorizable_shift): Likewise.
8054 (vectorizable_operation): Likewise.
8055 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8057 2018-06-18 Martin Sebor <msebor@redhat.com>
8059 PR tree-optimization/81384
8060 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8061 * builtins.c (expand_builtin_strnlen): New function.
8062 (expand_builtin): Call it.
8063 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8064 * builtins.def (BUILT_IN_STRNLEN): New.
8065 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8066 Warn for bounds in excess of maximum object size.
8067 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8068 single-value ranges. Handle strnlen.
8069 (handle_builtin_strlen): Handle strnlen.
8070 (strlen_check_and_optimize_stmt): Same.
8071 * doc/extend.texi (Other Builtins): Document strnlen.
8073 2018-06-18 Maya Rashish <coypu@sdf.org>
8075 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8076 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8077 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8079 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8081 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8083 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8085 * tree.c (escaped_string::escape): Replace cast to char * by
8086 const_cast<char *> (unescaped).
8088 2018-06-18 Nick Clifton <nickc@redhat.com>
8091 * tree.c (escaped_string): New class. Converts an unescaped
8092 string into its escaped equivalent.
8093 (warn_deprecated_use): Use the new class to convert the
8094 deprecation message, if present.
8095 (test_escaped_strings): New self test.
8096 (test_c_tests): Add test_escaped_strings.
8097 * doc/extend.texi (deprecated): Add a note that the
8098 deprecation message is affected by the -fmessage-length
8099 option, and that control characters will be escaped.
8100 (#pragma GCC error): Document this pragma.
8101 (#pragma GCC warning): Likewise.
8102 * doc/invoke.texi (-fmessage-length): Document this option's
8103 effect on the #warning and #error preprocessor directives and
8104 the deprecated attribute.
8106 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8108 * tree.c (decl_value_expr_lookup): Revert latest change.
8109 (decl_value_expr_insert): Likewise.
8111 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8113 * gimplify.c (nonlocal_vlas): Delete.
8114 (nonlocal_vla_vars): Likewise.
8115 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8117 (gimplify_body): Do not create and destroy nonlocal_vlas.
8118 * tree-nested.c: Include diagnostic.h.
8119 (use_pointer_in_frame): Tweak.
8120 (lookup_field_for_decl): Add assertion and declare the transformation.
8121 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8122 internal error when the reference is in a wrong context. Do not
8123 create a debug decl by default.
8124 (note_nonlocal_block_vlas): Delete.
8125 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8126 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8127 create a debug decl by default.
8128 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8129 call is in a wrong context.
8130 (fixup_vla_decls): New function.
8131 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8132 debug variables were created.
8133 * tree.c (decl_value_expr_lookup): Add checking assertion.
8134 (decl_value_expr_insert): Likewise.
8136 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8139 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8140 * tree-scalar-evolution.c (interpret_expr): Likewise.
8141 (expression_expensive_p): Likewise.
8142 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8143 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8144 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8145 (ssa_defined_by_minus_one_stmt_p): New.
8147 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8150 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8151 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8152 * dojump.c (do_jump): Likewise.
8153 * expr.c (expand_expr_real_2): Check operand type's sign.
8154 * fold-const.c (const_unop): Handle ABSU_EXPR.
8155 (fold_abs_const): Likewise.
8156 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8157 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8158 (strip_sign_op_1): Likesise.
8159 * match.pd: Add new pattern to generate ABSU_EXPR.
8160 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8161 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8162 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8163 * tree-inline.c (estimate_operator_cost): Likewise.
8164 * tree-pretty-print.c (dump_generic_node): Likewise.
8165 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8166 * tree.def (ABSU_EXPR): New.
8168 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8171 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8172 documented as preserved for backward compatibility only.
8173 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8175 PR rtl-optimization/86108
8176 * bb-reorder.c (create_forwarder_block): Renamed to ...
8177 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8178 jump from new landing pad to the second part.
8179 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8182 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8185 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8186 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8187 Only call store_expr for halves if the mode is the same.
8190 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8191 Fix up comment formatting.
8193 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8195 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8196 (typed_splay_tree::closure,
8197 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8198 (typed_splay_tree::typed_splay_tree,
8199 typed_splay_tree::operator =): Declared private.
8200 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8201 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8202 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8203 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8204 typed_splay_tree::splay_tree_splay,
8205 typed_splay_tree::splay_tree_foreach_helper,
8206 typed_splay_tree::splay_tree_insert,
8207 typed_splay_tree::splay_tree_remove,
8208 typed_splay_tree::splay_tree_lookup,
8209 typed_splay_tree::splay_tree_predecessor,
8210 typed_splay_tree::splay_tree_successor,
8211 typed_splay_tree::splay_tree_min,
8212 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8213 (typed_splay_tree::root, typed_splay_tree::comp,
8214 typed_splay_tree::delete_key,
8215 typed_splay_tree::delete_value): New data members.
8216 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8217 typed_splay_tree::remove.
8219 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8221 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8222 -mginv and -mno-ginv to the assembler.
8223 * config/mips/mips.opt (-mcrc): New option.
8225 * doc/invoke.text (-mcrc): Document.
8228 2018-06-15 Nick Clifton <nickc@redhat.com>
8231 * tree.c (escaped_string): New class. Converts an unescaped
8232 string into its escaped equivalent.
8233 (warn_deprecated_use): Use the new class to convert the
8234 deprecation message, if present.
8235 (test_escaped_strings): New self test.
8236 (test_c_tests): Add test_escaped_strings.
8237 * doc/extend.texi (deprecated): Add a note that the
8238 deprecation message is affected by the -fmessage-length
8239 option, and that control characters will be escaped.
8240 (#pragma GCC error): Document this pragma.
8241 (#pragma GCC warning): Likewise.
8242 * doc/invoke.texi (-fmessage-length): Document this option's
8243 effect on the #warning and #error preprocessor directives and
8244 the deprecated attribute.
8246 2018-06-15 Richard Biener <rguenther@suse.de>
8248 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8249 here, also noting vector size used.
8250 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8251 size used in MSG_OPTIMIZED_LOCATIONS dump.
8252 (pass_slp_vectorize::execute): Adjust.
8254 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8257 * config/arc/arc.c (arc_return_address_register): Fix
8260 2018-06-15 Richard Biener <rguenther@suse.de>
8263 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8264 leave useless conversion stripping to force_gimple_operand_gsi.
8265 (gimplify_build2): Likewise.
8266 (gimplify_build1): Likewise.
8268 2018-06-15 Richard Biener <rguenther@suse.de>
8271 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8272 before adjusting their block.
8274 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8276 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8277 multilibs for *-*-rtems*.
8278 * config/riscv/t-rtems: New file.
8280 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8283 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8284 unsigned_type_for returns NULL.
8287 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8288 subregs of multi-word pseudos unless the float mode has word size.
8290 2018-06-14 Richard Biener <rguenther@suse.de>
8293 * tree-vect-generic.c (build_word_mode_vector_type): Remove
8294 duplicate and harmful type_hash_canon.
8295 * tree.c (type_hash_canon): Assert we didn't find ourselves.
8297 2018-06-14 Richard Biener <rguenther@suse.de>
8300 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8303 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
8305 * config/rtems.h (STDINT_LONG32): Define.
8307 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
8308 Prachi Godbole <prachi.godbole@imgtec.com>
8310 * config/mips/mips-cpus.def: Define P6600.
8311 * config/mips/mips-tables.opt: Regenerate.
8312 * config/mips/mips.c (mips_ucbranch_type): New enum.
8313 (mips_rtx_cost_data): Add support for P6600.
8314 (mips_issue_rate): Likewise.
8315 (mips_multipass_dfa_lookahead): Likewise.
8316 (mips_avoid_hazard): Likewise.
8317 (mips_reorg_process_insns): Likewise.
8318 (mips_classify_branch_p6600): New function.
8319 * config/mips/mips.h (TUNE_P6600): New define.
8320 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8321 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8322 * config/mips/mips.md: Include p6600.md.
8323 (processor): Add p6600.
8324 * config/mips/p6600.md: New file.
8325 * doc/invoke.texi: Add p6600 to supported architectures.
8327 2018-06-13 Martin Sebor <msebor@redhat.com>
8329 PR tree-optimization/86114
8330 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8332 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8334 2018-06-13 Richard Biener <rguenther@suse.de>
8336 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8337 Properly set vector type of the intermediate stmt.
8338 * tree-vect-stmts.c (vectorizable_operation): The destination
8339 var always has vectype_out type.
8341 2018-06-13 Jeff Law <law@redhat.com>
8343 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8344 integer 0 for argument to print_rtl_with_bb.
8345 (rl78_reorg): Likewise.
8347 2018-06-13 David Malcolm <dmalcolm@redhat.com>
8349 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8350 from rtx to rtx_insn *.
8351 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8353 (add_sched_insns_for_speculation): Likewise for local "target",
8354 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8355 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8356 from rtx_insn ** to rtx_code_label **.
8357 (reorg_emit_nops): Likewise.
8358 (c6x_reorg): Likewise for local "call_labels".
8359 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8361 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8362 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8363 the loops over LABEL_REFS.
8364 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8366 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8367 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8368 (split_branches): Strengthen local "olabel" from rtx to
8369 rtx_insn *, adding a safe_as_a cast.
8370 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8372 (add_insn_after): Likewise for first two params.
8373 (add_insn_before): Likewise.
8374 (remove_insn): Likewise for param.
8375 (emit_pattern_before_noloc): Likewise for second and third params.
8376 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8377 (emit_call_insn_before_noloc): Likewise.
8378 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8380 (emit_barrier_before): Likewise.
8381 (emit_label_before): Strengthen "label" param from "rtx" to
8382 "rtx_code_label *". Strengthen "before" param from "rtx" to
8384 (emit_insn_after_1): Strengthen "after" param from "rtx" to
8386 (emit_pattern_after_noloc): Likewise.
8387 (emit_insn_after_noloc): Likewise.
8388 (emit_jump_insn_after_noloc): Likewise.
8389 (emit_call_insn_after_noloc): Likewise.
8390 (emit_debug_insn_after_noloc): Likewise.
8391 (emit_barrier_after): Likewise.
8392 (emit_label_after): Likewise for both params.
8393 (emit_pattern_after_setloc): Likewise for "after" param. Convert
8394 "loc" param from "int" to "location_t".
8395 (emit_insn_after_setloc): Likewise.
8396 (emit_jump_insn_after_setloc): Likewise.
8397 (emit_call_insn_after_setloc): Likewise.
8398 (emit_debug_insn_after_setloc): Likewise.
8399 (emit_pattern_before_setloc): Likewise for "before" param. Convert
8400 "loc" param from "int" to "location_t".
8401 (emit_pattern_before): Convert NULL_RTX to NULL.
8402 (emit_insn_before_setloc): Convert "loc" param from "int" to
8404 (emit_jump_insn_before_setloc): Likewise.
8405 (emit_call_insn_before_setloc): Likewise.
8406 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8407 rtx_insn *. Convert "loc" param from "int" to "location_t".
8408 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8409 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8410 Convert 3rd param from "int" to "location_t".
8411 (emit_barrier_before, emit_barrier_after, next_real_insn):
8412 Strengthen param from rtx to rtx_insn *.
8413 (emit_label_before): Strengthen 1st param from "rtx" to
8414 "rtx_code_label *". Strengthen 2nd param from "rtx" to
8416 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8417 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8418 Strengthen 2nd param from "rtx" to "rtx_insn *".
8419 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8420 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8421 Likewise. Convert 3rd param from "int" to "location_t".
8422 (emit_label_after): Strengthen 1st param from "rtx" to
8424 (next_real_insn, remove_insn): Strengthen param from "rtx" to
8426 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8427 from "rtx" to "rtx_insn *".
8429 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
8431 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8432 bodies streamed in with -Q.
8433 * dumpfile.c (dump_files): Add lto-stream-out dump file.
8434 * dumpfile.h (tree_dump_index): Add lto_stream_out.
8435 * gimple-streamer-out.c: Include gimple-pretty-print.h
8436 (output_bb): Dump stmts streamed.
8437 * lto-section-out.c: Include print-tree.h
8438 (lto_begin_section): Dump sections created.
8439 (lto_output_decl_index): Dump decl encoded.
8440 * lto-streamer-out.c: Include print-tree.h
8441 (create_output_block): Dump output block created.
8442 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8443 (output_function): Dump function output.
8444 (output_constructor): Dump constructor streamed.
8445 (write_global_stream): Output indexes encoded.
8446 (produce_asm_for_decls): Dump streams encoded.
8447 * lto-streamer.c (streamer_dump_file): New global var.
8448 * lto-streamer.h (streamer_dump_file): Declare.
8449 * passes.c (ipa_write_summaries): Initialize streamer dump.
8450 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8453 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
8456 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8457 offsets for register save directives. Emit a second batch of save
8458 directives, if need be, when the function accesses prior frames.
8460 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8462 * config/arc/fpu.md (fmasf4): Force operand to register.
8463 (fnmasf4): Likewise.
8465 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8467 * config/arc/arc-protos.h (arc_pad_return): Remove.
8468 * config/arc/arc.c (machine_function): Remove force_short_suffix
8470 (arc_print_operand): Adjust printing of '&'.
8471 (arc_verify_short): Remove conditional printing of short suffix.
8472 (arc_final_prescan_insn): Remove reference to size_reason.
8473 (pad_return): New function.
8474 (arc_reorg): Call pad_return.
8475 (arc_pad_return): Remove.
8476 (arc_init_machine_status): Remove reference to force_short_suffix.
8477 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8478 (attr length): When attribute iscompact is true force to 2
8479 regardless; in the case of maybe check if we want to force the
8480 instruction to have 4 bytes length.
8481 (nopv): Change it to generate 4 byte long nop as well.
8482 (blockage): New pattern.
8483 (simple_return): Remove call to arc_pad_return.
8484 (p_return_i): Likewise.
8486 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8488 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8490 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8492 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8495 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8497 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8498 for ARC700 and ARCv2.
8500 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
8503 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8504 operands[2] instead of operands[1].
8507 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8509 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8510 case, check whether the outer register overlaps an unallocatable
8511 register, not just whether it fits the required class.
8513 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8515 * poly-int.h (can_div_trunc_p): Add new overload in which all values
8517 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8518 (memrefs_conflict_p): Likewise.
8519 (init_alias_analysis): Likewise.
8520 * cfgexpand.c (expand_debug_expr): Likewise.
8521 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8522 * cse.c (fold_rtx): Likewise.
8523 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8524 * expr.c (emit_block_move_hints): Likewise.
8525 (clear_storage_hints, push_block, emit_push_insn): Likewise.
8526 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8527 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8528 (emit_group_store): Likewise.
8529 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
8530 to read the PRE/POST_MODIFY increment.
8531 * calls.c (store_one_arg): Use strip_offset.
8532 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8534 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8536 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8537 (simplify_binary_operation_1): Extend CONST_INT handling to
8539 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8540 than a HOST_WIDE_INT.
8541 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8543 (adjust_mems, add_stores): Update accodingly.
8544 (vt_canonicalize_addr): Track polynomial offsets.
8545 (emit_note_insn_var_location): Likewise.
8546 (vt_add_function_parameter): Likewise.
8547 (vt_initialize): Likewise.
8549 2018-06-12 Jeff Law <law@redhat.com>
8551 * config.gcc (alpha*-*-freebsd*): Remove.
8552 * config/alpha/freebsd.h: Remove.
8554 2018-06-12 David Malcolm <dmalcolm@redhat.com>
8557 * spellcheck-tree.c (levenshtein_distance): Rename to...
8558 (get_edit_distance): ...this, and update for underlying renaming.
8559 * spellcheck-tree.h (levenshtein_distance): Rename to...
8560 (get_edit_distance): ...this.
8561 * spellcheck.c (levenshtein_distance): Rename to...
8562 (get_edit_distance): ...this. Convert from Levenshtein distance
8563 to Damerau-Levenshtein distance by supporting transpositions of
8564 adjacent characters. Rename "v1" to "v_next" and "v0" to
8566 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8567 (selftest::test_edit_distance_unit_test_oneway): ...this, and
8568 update for underlying renaming.
8569 (selftest::levenshtein_distance_unit_test): Rename to...
8570 (selftest::test_get_edit_distance_unit): ...this, and update for
8571 underlying renaming.
8572 (selftest::test_find_closest_string): Add example from PR 69968
8573 where transposition helps
8574 (selftest::test_metric_conditions): Update for renaming.
8575 (selftest::test_metric_conditions): Likewise.
8576 (selftest::spellcheck_c_tests): Likewise.
8577 * spellcheck.h (levenshtein_distance): Rename both overloads to...
8578 (get_edit_distance): ...this.
8579 (best_match::consider): Update for renaming.
8581 2018-06-12 Martin Sebor <msebor@redhat.com>
8583 PR tree-optimization/85259
8584 * builtins.c (compute_objsize): Handle constant offsets.
8585 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8586 true iff a warning has been issued.
8587 * gimple.h (gimple_nonartificial_location): New function.
8588 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8589 gimple_nonartificial_location and handle -Wno-system-headers.
8590 (handle_builtin_stxncpy): Same.
8592 2018-06-12 Martin Sebor <msebor@redhat.com>
8595 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8597 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
8599 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8600 BUILTIN_VEC_XST entries for pointer to double and long long.
8602 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
8605 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8607 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8610 2018-06-12 Martin Liska <mliska@suse.cz>
8612 * doc/options.texi: Document IntegerRange.
8614 2018-06-12 Martin Liska <mliska@suse.cz>
8616 * config/i386/i386.opt: Make MPX-related options as Deprecated.
8617 * opt-functions.awk: Handle Deprecated flag.
8618 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8620 (read_cmdline_option): Report warning for a deprecated option.
8621 * opts.h (struct cl_option): Add new field cl_deprecated.
8622 (CL_ERR_DEPRECATED): New.
8624 2018-06-12 Martin Liska <mliska@suse.cz>
8626 * doc/options.texi: Document Deprecated option flag.
8628 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8630 * config/arc/arc-arch.h (arc_extras): New enum.
8631 (arc_cpu_t):Add field extra.
8632 (arc_cpu_types): Consider the extras.
8633 * config/arc/arc-cpus.def: Add extras info.
8634 * config/arc/arc-opts.h (processor_type): Consider extra field.
8635 * config/arc/arc.c (arc_override_options): Handle extra field.
8637 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8639 * config/arc/arc-arch.h: Update ARC_OPTX macro.
8640 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8642 * config/arc/arc.c (arc_init): Update pic warning.
8643 (irq_range): Update irq range parsing warnings.
8644 (arc_override_options): Update various warning messages.
8645 (arc_handle_aux_attribute): Likewise.
8647 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
8649 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8651 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8653 * doc/sourcebuild.texi: Document usage of line number 0 in verify
8654 compiler messages directives.
8656 2018-06-12 Matthew Fortune <mfortune@gmail.com>
8658 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8659 * config/mips/mips-tables.opt: Regenerate.
8660 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8662 * doc/invoke.texi: Document -march=i6500.
8664 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
8666 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8667 (i6400_gpmul): Add cpu_unit.
8668 (i6400_gpdiv): Likewise.
8669 (i6400_msa_add_d): Update reservations.
8670 (i6400_msa_int_add) Likewise.
8671 (i6400_msa_short_logic3) Likewise.
8672 (i6400_msa_short_logic2) Likewise.
8673 (i6400_msa_short_logic) Likewise.
8674 (i6400_msa_move) Likewise.
8675 (i6400_msa_cmp) Likewise.
8676 (i6400_msa_short_float2) Likewise.
8677 (i6400_msa_div_d) Likewise.
8678 (i6400_msa_long_logic1) Likewise.
8679 (i6400_msa_long_logic2) Likewise.
8680 (i6400_msa_mult) Likewise.
8681 (i6400_msa_long_float2) Likewise.
8682 (i6400_msa_long_float4) Likewise.
8683 (i6400_msa_long_float5) Likewise.
8684 (i6400_msa_long_float8) Likewise.
8685 (i6400_fpu_fadd): Include frint type.
8686 (i6400_fpu_store): New define_insn_reservation.
8687 (i6400_fpu_load): Likewise.
8688 (i6400_fpu_move): Likewise.
8689 (i6400_fpu_fcmp): Likewise.
8690 (i6400_fpu_fmadd): Likewise.
8691 (i6400_int_mult): Include imul3nc type and update reservation.
8692 (i6400_int_div): Include idiv3 type and update reservation.
8693 (i6400_int_load): Update to check type not move_type.
8694 (i6400_int_store): Likewise.
8695 (i6400_int_prefetch): Set zero latency.
8697 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
8699 * gcc.c: Document new %@{...} sequence.
8700 (LINK_COMMAND_SPEC): Use it for the -L switches.
8701 (cpp_unique_options): Use it for the -I switches.
8702 (at_file_argbuf): New global variable.
8703 (in_at_file): Likewise.
8704 (alloc_args): Create at_file_argbuf.
8705 (clear_args): Truncate at_file_argbuf.
8706 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8707 (open_at_file): New function.
8708 (close_at_file): Likewise.
8709 (create_at_file): Delete.
8710 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8713 (validate_switches_from_spec): Deal with %@{...} sequence.
8714 (validate_switches): Likewise.
8715 (driver::finalize): Call clear_args.
8717 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
8719 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8721 2018-06-11 Martin Sebor <msebor@redhat.com>
8723 * doc/invoke.texi (-Wall): List -Wc++17-compat.
8724 (Wno-class-memaccess): Add @opindex.
8725 (Wno-templates, Wno-multiple-inheritance): Same.
8726 (Wno-virtual-inheritance, Wno-namespaces): Same.
8727 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8728 (Wno-format-overflow, Wno-format-truncation): Same.
8729 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8730 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8731 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8732 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8733 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8734 (Wno-misspelled-isr): Same.
8736 2018-06-11 Martin Sebor <msebor@redhat.com>
8738 * PR tree-optimization/86083
8739 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8741 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
8743 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
8745 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
8748 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
8749 on the correct operand.
8750 (*movdi_internal64): Ditto.
8752 2018-06-11 Martin Liska <mliska@suse.cz>
8754 PR tree-optimization/86089
8755 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
8757 2018-06-11 Julia Koval <julia.koval@intel.com>
8759 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
8760 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
8761 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
8763 2018-06-11 Olivier Hainque <hainque@adacore.com>
8765 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
8766 for Ada with strict dwarf2.
8768 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
8771 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8774 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
8776 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8778 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
8780 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8783 2018-06-08 Martin Liska <mliska@suse.cz>
8785 * tree-cfg.h (debug_function): Fix argument type to match
8788 2018-06-08 Martin Liska <mliska@suse.cz>
8790 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8791 Remove usage of MPX-related (and removed) fields.
8792 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8794 2018-06-08 David Malcolm <dmalcolm@redhat.com>
8796 * cfg.c (debug): Use TDF_NONE rather than 0.
8797 * cfghooks.c (debug): Likewise.
8798 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8799 (struct dump_option_value_info): Convert to...
8800 (struct kv_pair): ...this template type.
8801 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8803 (optinfo_verbosity_options): Likewise.
8804 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8806 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8807 than int for "optgroup_flags" param.
8808 (dump_generic_expr_loc): Use dump_flags_t rather than int for
8810 (dump_dec): Likewise.
8811 (dump_finish): Use TDF_NONE rather than 0.
8812 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8813 rather than int for "optgroup_flags" param. Use TDF_NONE rather
8814 than 0. Update for change to option_ptr.
8815 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8816 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
8817 0. Update for changes to optinfo_verbosity_options and
8819 (opt_info_switch_p): Convert optgroup_flags from int to
8821 (dump_basic_block): Use dump_flags_t rather than int
8822 for "dump_kind" param.
8823 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8824 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8825 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8826 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8827 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8828 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8829 TDF_NONE): Convert from macros to...
8830 (enum dump_flag): ...this new enum.
8831 (dump_flags_t): Update to use enum.
8832 (operator|, operator&, operator~, operator|=, operator&=):
8833 Implement for dump_flags_t.
8834 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
8835 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
8836 Convert from macros to...
8837 (enum optgroup_flag): ...this new enum.
8838 (optgroup_flags_t): New typedef.
8839 (operator|, operator|=): Implement for optgroup_flags_t.
8840 (struct dump_file_info): Convert field "alt_flags" to
8841 dump_flags_t. Convert field "optgroup_flags" to
8843 (dump_basic_block): Use dump_flags_t rather than int for param.
8844 (dump_generic_expr_loc): Likewise.
8845 (dump_dec): Likewise.
8846 (dump_register): Convert param "optgroup_flags" to
8848 (opt_info_enable_passes): Likewise.
8849 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
8851 * gimple-pretty-print.c (debug): Likewise.
8852 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
8853 (merged_store_group::apply_stores): Likewise.
8854 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
8855 * gimple.c (verify_gimple_pp): Likewise.
8856 * graphite-poly.c (print_pbb_body): Likewise.
8857 * passes.c (pass_manager::register_one_dump_file): Convert
8858 local "optgroup_flags" to optgroup_flags_t.
8859 * print-tree.c (print_node): Use TDF_NONE rather than 0.
8861 (debug_body): Likewise.
8862 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
8863 to optgroup_flags_t.
8864 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
8866 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
8867 (convert_mult_to_fma): Likewise.
8868 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
8869 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
8870 * tree-vect-data-refs.c (dump_lower_bound): Convert param
8871 "dump_kind" to dump_flags_t.
8873 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8875 * config/rs6000/rs6000.c (min, max): Delete.
8877 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8879 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
8880 -mabi=spe and -mabi=no-spe.
8882 2018-06-08 Martin Liska <mliska@suse.cz>
8884 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
8885 where we expect an existing summary.
8887 2018-06-08 Martin Liska <mliska@suse.cz>
8889 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
8890 * ipa-inline.h (estimate_edge_growth): Likewise.
8892 2018-06-08 Martin Liska <mliska@suse.cz>
8894 * cgraph.c (function_version_hasher::hash): Use
8895 cgraph_node::get_uid ().
8896 (function_version_hasher::equal):
8897 * cgraph.h (cgraph_node::get_uid): New method.
8898 * ipa-inline.c (update_caller_keys): Use
8899 cgraph_node::get_uid ().
8900 (update_callee_keys): Likewise.
8901 * ipa-utils.c (searchc): Likewise.
8902 (ipa_reduced_postorder): Likewise.
8903 * lto-cgraph.c (input_node): Likewise.
8904 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
8905 * symbol-summary.h (symtab_insertion): Likewise.
8906 (symtab_removal): Likewise.
8907 (symtab_duplication): Likewise.
8908 * tree-pretty-print.c (dump_function_header): Likewise.
8909 * tree-sra.c (convert_callers_for_node): Likewise.
8911 2018-06-08 Martin Liska <mliska@suse.cz>
8913 * cgraph.c (symbol_table::create_edge): Always assign a new
8915 (symbol_table::free_edge): Do not recycle numbers.
8916 * cgraph.h (cgraph_edge::get): New method.
8917 * symbol-summary.h (symtab_removal): Use it.
8918 (symtab_duplication): Likewise.
8919 (call_summary::hashable_uid): Remove.
8921 2018-06-08 Martin Liska <mliska@suse.cz>
8923 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
8924 (initialize_growth_caches): Remove.
8925 (free_growth_caches): Likewise.
8926 (do_estimate_edge_time): Use edge_growth_cache.
8927 (do_estimate_edge_size): Likewise.
8928 (do_estimate_edge_hints): Likewise.
8929 * ipa-inline.c (reset_edge_caches): Likewise.
8930 (recursive_inlining): Likewise.
8931 (inline_small_functions): Likewise.
8932 * ipa-inline.h (initialize_growth_caches): Remove.
8933 (estimate_edge_size): Likewise.
8934 (estimate_edge_time): Likewise.
8935 (estimate_edge_hints): Likewise.
8936 (reset_edge_growth_cache): Likewise.
8937 * symbol-summary.h (call_summary::remove): New method.
8939 2018-06-08 Martin Liska <mliska@suse.cz>
8941 * ipa-cp.c (class edge_clone_summary): New summary.
8942 (grow_edge_clone_vectors): Remove.
8943 (ipcp_edge_duplication_hook): Remove.
8944 (class edge_clone_summary_t): New call_summary class.
8945 (ipcp_edge_removal_hook): Remove.
8946 (edge_clone_summary_t::duplicate): New function.
8947 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
8948 (create_specialized_node): Likewise.
8949 (ipcp_driver): Initialize edge_clone_summaries and do not
8952 2018-06-08 Martin Liska <mliska@suse.cz>
8954 * symbol-summary.h (get): New function.
8955 (call_summary::m_initialize_when_cloning): New class member.
8957 2018-06-08 Martin Liska <mliska@suse.cz>
8959 * cgraph.c (cgraph_node::remove): Do not recycle uid.
8960 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
8961 (symbol_table::allocate_cgraph_symbol): Do not set uid.
8962 * passes.c (uid_hash_t): Record removed_nodes by their uids.
8963 (remove_cgraph_node_from_order): Use the removed_nodes set.
8964 (do_per_function_toporder): Likwise.
8965 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
8966 instead of summary_uid.
8967 (symtab_removal): Likewise.
8968 (symtab_duplication): Likewise.
8970 2018-06-08 Martin Liska <mliska@suse.cz>
8972 * ipa-cp.c (ipcp_store_bits_results): Use
8973 ipcp_transformation_sum.
8974 (ipcp_store_vr_results): Likewise.
8975 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
8977 (ipcp_transformation_initialize): ... this.
8978 (ipa_set_node_agg_value_chain):
8979 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
8980 (write_ipcp_transformation_info): Likewise.
8981 (read_ipcp_transformation_info): Likewise.
8982 (ipcp_update_bits): Likewise.
8983 (ipcp_update_vr): Likewise.
8984 (ipcp_transform_function): Likewise.
8985 * ipa-prop.h: Rename ipcp_transformation_summary to
8986 ipcp_transformation.
8987 (class ipcp_transformation_t): New function summary.
8988 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
8989 (ipa_get_agg_replacements_for_node): Likewise.
8991 2018-06-08 Martin Liska <mliska@suse.cz>
8993 * ipa-pure-const.c (struct funct_state_d): Do it class instead
8995 (class funct_state_summary_t): New function_summary class.
8996 (has_function_state): Remove.
8997 (get_function_state): Likewise.
8998 (set_function_state): Likewise.
8999 (add_new_function): Likewise.
9000 (funct_state_summary_t::insert): New function.
9001 (duplicate_node_data): Remove.
9002 (remove_node_data): Remove.
9003 (funct_state_summary_t::duplicate): New function.
9004 (register_hooks): Create new funct_state_summaries.
9005 (pure_const_generate_summary): Use it.
9006 (pure_const_write_summary): Likewise.
9007 (pure_const_read_summary): Likewise.
9008 (propagate_pure_const): Likewise.
9009 (propagate_nothrow): Likewise.
9010 (dump_malloc_lattice): Likewise.
9011 (propagate_malloc): Likewise.
9012 (execute): Do not register hooks, just remove summary
9014 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9017 2018-06-08 Martin Liska <mliska@suse.cz>
9019 * ipa-reference.c (remove_node_data): Remove.
9020 (duplicate_node_data): Likewise.
9021 (class ipa_ref_var_info_summary_t): New class.
9022 (class ipa_ref_opt_summary_t): Likewise.
9023 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9024 (get_reference_optimization_summary): Use
9025 ipa_ref_opt_sum_summaries.
9026 (set_reference_vars_info): Remove.
9027 (set_reference_optimization_summary): Likewise.
9028 (ipa_init): Create summaries.
9029 (init_function_info): Use function summary.
9030 (ipa_ref_opt_summary_t::duplicate): New function.
9031 (ipa_ref_opt_summary_t::remove): New function.
9032 (get_read_write_all_from_node): Fix GNU coding style.
9033 (propagate): Use function summary.
9034 (write_node_summary_p): Fix GNU coding style.
9035 (stream_out_bitmap): Likewise.
9036 (ipa_reference_read_optimization_summary): Use function summary.
9037 (ipa_reference_c_finalize): Do not release hooks.
9039 2018-06-08 Martin Liska <mliska@suse.cz>
9041 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9042 (analyze_function_body): Extract multiple calls of get_create.
9043 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9044 * ipa-inline.c (recursive_inlining): Use ::get method.
9045 * ipa-inline.h (estimate_edge_growth): Likewise.
9047 2018-06-08 Martin Liska <mliska@suse.cz>
9049 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9051 (hsa_function_summary::hsa_function_summary): Use the new enum
9053 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9054 * hsa-gen.c (hsa_get_host_function): Likewise.
9055 (get_brig_function_name): Likewise.
9056 * ipa-hsa.c (process_hsa_functions): Likewise.
9057 (ipa_hsa_write_summary): Likewise.
9058 * symbol-summary.h (symtab_duplication): Use ::get function/
9059 (get): New function.
9061 2018-06-08 Martin Liska <mliska@suse.cz>
9063 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9065 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9066 (hsa_register_kernel): Likewise.
9067 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9068 * hsa-gen.c (hsa_get_host_function): Likewise.
9069 (get_brig_function_name): Likewise.
9070 (generate_hsa): Likewise.
9071 (pass_gen_hsail::execute): Likewise.
9072 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9073 (devirtualization_time_bonus): Likewise.
9074 (ipcp_propagate_stage): Likewise.
9075 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9076 (edge_set_predicate): Likewise.
9077 (evaluate_conditions_for_known_args): Likewise.
9078 (evaluate_properties_for_edge): Likewise.
9079 (ipa_fn_summary::reset): Likewise.
9080 (ipa_fn_summary_t::duplicate): Likewise.
9081 (dump_ipa_call_summary): Likewise.
9082 (ipa_dump_fn_summary): Likewise.
9083 (analyze_function_body): Likewise.
9084 (compute_fn_summary): Likewise.
9085 (estimate_edge_devirt_benefit): Likewise.
9086 (estimate_edge_size_and_time): Likewise.
9087 (estimate_calls_size_and_time): Likewise.
9088 (estimate_node_size_and_time): Likewise.
9089 (inline_update_callee_summaries): Likewise.
9090 (remap_edge_change_prob): Likewise.
9091 (remap_edge_summaries): Likewise.
9092 (ipa_merge_fn_summary_after_inlining): Likewise.
9093 (ipa_update_overall_fn_summary): Likewise.
9094 (read_ipa_call_summary): Likewise.
9095 (inline_read_section): Likewise.
9096 (write_ipa_call_summary): Likewise.
9097 (ipa_fn_summary_write): Likewise.
9098 (ipa_free_fn_summary): Likewise.
9099 * ipa-hsa.c (process_hsa_functions): Likewise.
9100 (ipa_hsa_write_summary): Likewise.
9101 (ipa_hsa_read_section): Likewise.
9102 * ipa-icf.c (sem_function::merge): Likewise.
9103 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9104 (do_estimate_edge_time): Likewise.
9105 (estimate_size_after_inlining): Likewise.
9106 (estimate_growth): Likewise.
9107 (growth_likely_positive): Likewise.
9108 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9109 (inline_call): Likewise.
9110 * ipa-inline.c (caller_growth_limits): Likewise.
9111 (can_inline_edge_p): Likewise.
9112 (can_inline_edge_by_limits_p): Likewise.
9113 (compute_uninlined_call_time): Likewise.
9114 (compute_inlined_call_time): Likewise.
9115 (want_inline_small_function_p): Likewise.
9116 (edge_badness): Likewise.
9117 (update_caller_keys): Likewise.
9118 (update_callee_keys): Likewise.
9119 (recursive_inlining): Likewise.
9120 (inline_small_functions): Likewise.
9121 (inline_to_all_callers_1): Likewise.
9122 (dump_overall_stats): Likewise.
9123 (early_inline_small_functions): Likewise.
9124 (early_inliner): Likewise.
9125 * ipa-inline.h (estimate_edge_growth): Likewise.
9126 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9127 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9128 * ipa-prop.h (IPA_NODE_REF): Likewise.
9129 (IPA_EDGE_REF): Likewise.
9130 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9131 (propagate_malloc): Likewise.
9132 * ipa-split.c (execute_split_functions): Likewise.
9133 * symbol-summary.h: Rename get to get_create.
9135 (get_create): Likewise.
9136 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9138 2018-06-08 Martin Liska <mliska@suse.cz>
9140 * symbol-summary.h (release): Move definition out of class
9142 (symtab_removal): Likewise.
9143 (symtab_duplication): Likewise.
9145 2018-06-08 Martin Liska <mliska@suse.cz>
9147 * symbol-summary.h (function_summary): Move constructor
9148 implementation out of class declaration.
9149 (release): Likewise.
9150 (symtab_insertion): Likewise.
9151 (symtab_removal): Likewise.
9152 (symtab_duplication): Likewise.
9155 2018-06-08 Martin Liska <mliska@suse.cz>
9157 * Makefile.in: Remove support for MPX (macros, related functions,
9158 fields in cgraph_node, ...).
9159 * builtin-types.def (BT_BND): Likewise.
9160 (BT_FN_BND_CONST_PTR): Likewise.
9161 (BT_FN_CONST_PTR_BND): Likewise.
9162 (BT_FN_VOID_PTR_BND): Likewise.
9163 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9164 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9165 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9166 (expand_builtin_mempcpy_with_bounds): Likewise.
9167 (expand_builtin_memset_with_bounds): Likewise.
9168 (expand_builtin_memset_args): Likewise.
9169 (std_expand_builtin_va_start): Likewise.
9170 (expand_builtin): Likewise.
9171 (expand_builtin_with_bounds): Likewise.
9172 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9173 (DEF_LIB_BUILTIN_CHKP): Likewise.
9174 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9175 (DEF_CHKP_BUILTIN): Likewise.
9176 (BUILT_IN_MEMCPY): Likewise.
9177 (BUILT_IN_MEMMOVE): Likewise.
9178 (BUILT_IN_MEMPCPY): Likewise.
9179 (BUILT_IN_MEMSET): Likewise.
9180 (BUILT_IN_STPCPY): Likewise.
9181 (BUILT_IN_STRCAT): Likewise.
9182 (BUILT_IN_STRCHR): Likewise.
9183 (BUILT_IN_STRCPY): Likewise.
9184 (BUILT_IN_STRLEN): Likewise.
9185 (BUILT_IN_MEMCPY_CHK): Likewise.
9186 (BUILT_IN_MEMMOVE_CHK): Likewise.
9187 (BUILT_IN_MEMPCPY_CHK): Likewise.
9188 (BUILT_IN_MEMSET_CHK): Likewise.
9189 (BUILT_IN_STPCPY_CHK): Likewise.
9190 (BUILT_IN_STRCAT_CHK): Likewise.
9191 (BUILT_IN_STRCPY_CHK): Likewise.
9192 * calls.c (store_bounds): Likewise.
9193 (emit_call_1): Likewise.
9194 (special_function_p): Likewise.
9195 (maybe_warn_nonstring_arg): Likewise.
9196 (initialize_argument_information): Likewise.
9197 (finalize_must_preallocate): Likewise.
9198 (compute_argument_addresses): Likewise.
9199 (expand_call): Likewise.
9200 * cfgexpand.c (expand_call_stmt): Likewise.
9201 (expand_return): Likewise.
9202 (expand_gimple_stmt_1): Likewise.
9203 (pass_expand::execute): Likewise.
9204 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9205 (cgraph_node::remove): Likewise.
9206 (cgraph_node::dump): Likewise.
9207 (cgraph_node::verify_node): Likewise.
9208 * cgraph.h (chkp_function_instrumented_p): Likewise.
9209 (symtab_node::get_alias_target): Likewise.
9210 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9211 (cgraph_local_p): Likewise.
9212 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9213 (cgraph_edge::rebuild_references): Likewise.
9214 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9215 (walk_polymorphic_call_targets): Likewise.
9216 (cgraph_node::expand_thunk): Likewise.
9217 (symbol_table::output_weakrefs): Likewise.
9218 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9219 (ix86_handle_option): Likewise.
9220 * config/i386/constraints.md: Likewise.
9221 * config/i386/i386-builtin-types.def (BND): Likewise.
9225 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9226 (BDESC_FIRST): Likewise.
9228 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9229 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9230 * config/i386/i386.c (enum reg_class): Likewise.
9231 (ix86_target_string): Likewise.
9232 (ix86_option_override_internal): Likewise.
9233 (ix86_conditional_register_usage): Likewise.
9234 (ix86_valid_target_attribute_inner_p): Likewise.
9235 (ix86_set_indirect_branch_type): Likewise.
9236 (ix86_set_current_function): Likewise.
9237 (ix86_function_arg_regno_p): Likewise.
9238 (init_cumulative_args): Likewise.
9239 (ix86_function_arg_advance): Likewise.
9240 (ix86_function_arg): Likewise.
9241 (ix86_pass_by_reference): Likewise.
9242 (ix86_function_value_regno_p): Likewise.
9243 (ix86_function_value_1): Likewise.
9244 (ix86_function_value_bounds): Likewise.
9245 (ix86_return_in_memory): Likewise.
9246 (ix86_setup_incoming_vararg_bounds): Likewise.
9247 (ix86_va_start): Likewise.
9248 (indirect_thunk_need_prefix): Likewise.
9249 (print_reg): Likewise.
9250 (ix86_print_operand): Likewise.
9251 (ix86_expand_call): Likewise.
9252 (ix86_output_function_return): Likewise.
9253 (reg_encoded_number): Likewise.
9254 (BDESC_VERIFYS): Likewise.
9255 (ix86_init_mpx_builtins): Likewise.
9256 (ix86_init_builtins): Likewise.
9257 (ix86_emit_cmove): Likewise.
9258 (ix86_emit_move_max): Likewise.
9259 (ix86_expand_builtin): Likewise.
9260 (ix86_builtin_mpx_function): Likewise.
9261 (ix86_get_arg_address_for_bt): Likewise.
9262 (ix86_load_bounds): Likewise.
9263 (ix86_store_bounds): Likewise.
9264 (ix86_load_returned_bounds): Likewise.
9265 (ix86_store_returned_bounds): Likewise.
9266 (ix86_class_likely_spilled_p): Likewise.
9267 (ix86_hard_regno_mode_ok): Likewise.
9268 (x86_order_regs_for_local_alloc): Likewise.
9269 (ix86_mitigate_rop): Likewise.
9270 (ix86_bnd_prefixed_insn_p): Likewise.
9271 (ix86_mpx_bound_mode): Likewise.
9272 (ix86_make_bounds_constant): Likewise.
9273 (ix86_initialize_bounds): Likewise.
9274 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9275 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9276 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9277 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9278 (TARGET_CHKP_BOUND_MODE): Likewise.
9279 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9280 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9281 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9282 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9283 * config/i386/i386.h (TARGET_MPX): Likewise.
9284 (TARGET_MPX_P): Likewise.
9285 (VALID_BND_REG_MODE): Likewise.
9286 (FIRST_BND_REG): Likewise.
9287 (LAST_BND_REG): Likewise.
9288 (enum reg_class): Likewise.
9289 (BND_REG_P): Likewise.
9290 (BND_REGNO_P): Likewise.
9291 (BNDmode): Likewise.
9292 (ADJUST_INSN_LENGTH): Likewise.
9293 * config/i386/i386.md: Likewise.
9294 * config/i386/i386.opt: Likewise.
9295 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9296 (defined): Likewise.
9297 (LINK_MPX): Likewise.
9298 (MPX_SPEC): Likewise.
9299 (LIBMPX_SPEC): Likewise.
9300 (LIBMPXWRAPPERS_SPEC): Likewise.
9301 (CHKP_SPEC): Likewise.
9302 * config/i386/predicates.md: Likewise.
9303 * dbxout.c (dbxout_type): Likewise.
9304 * doc/extend.texi: Likewise.
9305 * doc/invoke.texi: Likewise.
9306 * doc/md.texi: Likewise.
9307 * doc/tm.texi: Likewise.
9308 * doc/tm.texi.in: Likewise.
9309 * dwarf2out.c (is_base_type): Likewise.
9310 (gen_formal_types_die): Likewise.
9311 (gen_subprogram_die): Likewise.
9312 (gen_type_die_with_usage): Likewise.
9313 (gen_decl_die): Likewise.
9314 (dwarf2out_late_global_decl): Likewise.
9315 * expr.c (expand_assignment): Likewise.
9316 (emit_storent_insn): Likewise.
9317 (store_expr_with_bounds): Likewise.
9318 (store_expr): Likewise.
9319 (expand_expr_real_1): Likewise.
9320 * expr.h (store_expr_with_bounds): Likewise.
9321 * function.c (use_register_for_decl): Likewise.
9322 (struct bounds_parm_data): Likewise.
9323 (assign_parms_augmented_arg_list): Likewise.
9324 (assign_parm_find_entry_rtl): Likewise.
9325 (assign_parm_is_stack_parm): Likewise.
9326 (assign_parm_load_bounds): Likewise.
9327 (assign_bounds): Likewise.
9328 (assign_parms): Likewise.
9329 (expand_function_start): Likewise.
9330 * gcc.c (CHKP_SPEC): Likewise.
9331 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9332 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9333 (wrestrict_dom_walker::check_call): Likewise.
9334 * gimple.c (gimple_build_call_from_tree): Likewise.
9335 * gimple.h (enum gf_mask): Likewise.
9336 (gimple_call_with_bounds_p): Likewise.
9337 (gimple_call_set_with_bounds): Likewise.
9338 * gimplify.c (gimplify_init_constructor): Likewise.
9339 * ipa-cp.c (initialize_node_lattices): Likewise.
9340 (propagate_constants_across_call): Likewise.
9341 (find_more_scalar_values_for_callers_subset): Likewise.
9342 * ipa-hsa.c (process_hsa_functions): Likewise.
9343 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9344 * ipa-icf.c (sem_function::merge): Likewise.
9345 * ipa-inline.c (early_inliner): Likewise.
9346 * ipa-pure-const.c (warn_function_noreturn): Likewise.
9347 (warn_function_cold): Likewise.
9348 (propagate_pure_const): Likewise.
9349 * ipa-ref.h (enum GTY): Likewise.
9350 * ipa-split.c (find_retbnd): Likewise.
9351 (consider_split): Likewise.
9352 (split_function): Likewise.
9353 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9354 * ipa.c (walk_polymorphic_call_targets): Likewise.
9355 (symbol_table::remove_unreachable_nodes): Likewise.
9356 (process_references): Likewise.
9357 (cgraph_build_static_cdtor_1): Likewise.
9358 * lto-cgraph.c (lto_output_node): Likewise.
9359 (output_refs): Likewise.
9360 (compute_ltrans_boundary): Likewise.
9361 (input_overwrite_node): Likewise.
9362 (input_node): Likewise.
9363 (input_cgraph_1): Likewise.
9364 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9365 * passes.c (pass_manager::execute_early_local_passes): Likewise.
9366 (class pass_chkp_instrumentation_passes): Likewise.
9367 (make_pass_chkp_instrumentation_passes): Likewise.
9368 * passes.def: Likewise.
9369 * rtl.h (struct GTY): Likewise.
9370 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9371 * stor-layout.c (layout_type): Likewise.
9372 * symtab.c: Likewise.
9373 * target.def: Likewise.
9374 * targhooks.c (default_chkp_bound_type): Likewise.
9375 (default_chkp_bound_mode): Likewise.
9376 (default_builtin_chkp_function): Likewise.
9377 (default_chkp_function_value_bounds): Likewise.
9378 (default_chkp_make_bounds_constant): Likewise.
9379 (default_chkp_initialize_bounds): Likewise.
9380 * targhooks.h (default_chkp_bound_type): Likewise.
9381 (default_chkp_bound_mode): Likewise.
9382 (default_builtin_chkp_function): Likewise.
9383 (default_chkp_function_value_bounds): Likewise.
9384 (default_chkp_make_bounds_constant): Likewise.
9385 (default_chkp_initialize_bounds): Likewise.
9386 * toplev.c (compile_file): Likewise.
9387 (process_options): Likewise.
9388 * tree-core.h (DEF_BUILTIN): Likewise.
9389 (DEF_BUILTIN_CHKP): Likewise.
9390 * tree-inline.c (declare_return_variable): Likewise.
9391 (remap_gimple_stmt): Likewise.
9392 (copy_bb): Likewise.
9393 (initialize_inlined_parameters): Likewise.
9394 (expand_call_inline): Likewise.
9395 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9396 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9397 (make_pass_ipa_chkp_produce_thunks): Likewise.
9398 (make_pass_chkp): Likewise.
9399 (make_pass_chkp_opt): Likewise.
9400 (make_pass_chkp_instrumentation_passes): Likewise.
9401 * tree-pretty-print.c (dump_generic_node): Likewise.
9402 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9403 * tree-ssa-dce.c (propagate_necessity): Likewise.
9404 (eliminate_unnecessary_stmts): Likewise.
9405 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9406 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9407 * tree-ssa-sccvn.h: Likewise.
9408 * tree-ssa-strlen.c (get_string_length): Likewise.
9409 (valid_builtin_call): Likewise.
9410 (adjust_last_stmt): Likewise.
9411 (handle_builtin_strchr): Likewise.
9412 (handle_builtin_strcpy): Likewise.
9413 (handle_builtin_stxncpy): Likewise.
9414 (handle_builtin_memcpy): Likewise.
9415 (handle_builtin_strcat): Likewise.
9416 (strlen_check_and_optimize_stmt): Likewise.
9417 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9418 * tree-streamer-in.c: Likewise.
9419 * tree-streamer.c (record_common_node): Likewise.
9420 * tree.c (tree_code_size): Likewise.
9421 (wide_int_to_tree_1): Likewise.
9422 (type_contains_placeholder_1): Likewise.
9423 (build_common_tree_nodes): Likewise.
9424 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9425 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9426 (POINTER_BOUNDS_P): Likewise.
9427 (BOUNDED_TYPE_P): Likewise.
9428 (BOUNDED_P): Likewise.
9429 (CALL_WITH_BOUNDS_P): Likewise.
9430 (pointer_bounds_type_node): Likewise.
9431 * value-prof.c (gimple_ic): Likewise.
9432 * var-tracking.c (vt_add_function_parameters): Likewise.
9433 * varasm.c (make_decl_rtl): Likewise.
9434 (assemble_start_function): Likewise.
9435 (output_constant): Likewise.
9436 (maybe_assemble_visibility): Likewise.
9437 * varpool.c (ctor_for_folding): Likewise.
9438 * chkp-builtins.def: Remove.
9439 * ipa-chkp.c: Remove.
9440 * ipa-chkp.h: Remove.
9441 * rtl-chkp.c: Remove.
9442 * rtl-chkp.h: Remove.
9443 * tree-chkp-opt.c: Remove.
9444 * tree-chkp.c: Remove.
9445 * tree-chkp.h: Remove.
9447 2018-06-07 Carl Love <cel@us.ibm.com>
9449 * config/rs6000/vsx.md (vextract_fp_from_shorth,
9450 vextract_fp_from_shortl): Add BE support.
9452 2018-06-07 Paul Koning <ni1d@arrl.net>
9454 * compare-elim.c (try_merge_compare): Don't merge compare if
9455 address contains a side effect.
9456 (try_eliminate_compare): Likewise.
9458 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
9460 * config.gcc: Support "tremont".
9461 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9462 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9464 * config/i386/i386.c (m_TREMONT): Define.
9465 (processor_target_table): Add "tremont".
9466 (PTA_TREMONT): Define.
9467 (ix86_lea_outperforms): Add TARGET_TREMONT.
9468 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9469 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9470 and M_INTEL_GOLDMONT_PLUS.
9471 (fold_builtin_cpu): Add "tremont".
9472 (ix86_add_stmt_cost): Add TARGET_TREMONT.
9473 (ix86_option_override_internal): Add "tremont".
9474 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9475 (processor_type): Add PROCESSOR_TREMONT.
9476 * config/i386/x86-tune.def: Add m_TREMONT.
9477 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9479 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9481 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9482 symbol defined for msp430i* devices to be lower case.
9484 2018-06-07 Richard Biener <rguenther@suse.de>
9486 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9487 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9488 Properly wrap signed arithmetic if overflow wraps.
9490 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9492 PR tree-optimization/69615
9493 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9494 of a cast from a same precision integral SSA_NAME in a bb dominated
9495 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
9496 cast to utype if rhs2 has already a compatible type.
9498 2018-06-07 Richard Biener <rguenther@suse.de>
9500 PR tree-optimization/85935
9501 * graphite-scop-detection.c (find_params_in_bb): Analyze
9502 condition operands with respect to the correct loop. Assert
9503 the analysis doesn't fail.
9505 2018-06-04 Carl Love <cel@us.ibm.com>
9507 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9508 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
9509 as it is slightly cheaper.
9510 (first_match_or_eos_index_<mode>):
9511 Calculate index using natural element order.
9512 (first_match_index_<mode>):
9513 Calculate index using natural element order.
9514 (first_match_or_eos_index_<mode>):
9515 Calculate index using natural order.
9516 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9517 for BE and LE modes.
9518 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9519 P9V_BUILTIN_VCLZLSBB_V16QI.
9520 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9523 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9525 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9526 indentation and line wrap for many prototypes. Add missing
9527 @smallexample directives around block of prototypes for vec_xl and
9530 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
9532 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9533 track if we pass or return IEEE 128-bit floating point.
9534 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9535 C++ mangling that is compatible with GCC 8.1.
9536 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9537 (init_cumulative_args): Note if we pass or return IEEE 128-bit
9538 floating point types.
9539 (rs6000_function_arg_advance_1): Likewise.
9540 (rs6000_mangle_type): Optionally generate mangled names that match
9541 what GCC 8.1 generated for IEEE 128-bit floating point types.
9542 (rs6000_globalize_decl_name): If we have an external function that
9543 passes or returns IEEE 128-bit types, generate a weak reference
9544 from the mangled name used in GCC 8.1 to the current mangled
9546 (rs6000_init_builtins): Make __ibm128 use the long double type if
9547 long double is IBM extended double. Make __float128 use the long
9548 double type if long double is IEEE 128-bit.
9551 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9552 macro for __ibm128 built-in functions.
9553 (PACK_IF): Add __ibm128 pack/unpack functions.
9554 (UNPACK_IF): Likewise.
9555 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9556 enable long double built-in functions if long double is IEEE
9557 128-bit floating point.
9558 (rs6000_invalid_builtin): Update long double built-in function
9560 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9561 functions, adjust the built-in function to use the long double
9562 built-in function if __ibm128 and long double are the same type.
9563 * doc/extend.texi (PowerPC builtins): Update documention for
9564 __builtin_{,un}pack_longdouble. Add documentation for
9565 __builtin_{,un}pack_ibm128.
9567 2018-06-06 Jim Wilson <jimw@sifive.com>
9569 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9570 (struct machine_function): New field interrupt_mode.
9571 (riscv_handle_type_attribute): New function. Add forward declaration.
9572 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9573 (riscv_expand_epilogue): Check interrupt_mode field.
9574 (riscv_set_current_function): Check interrupt attribute args and
9575 set interrupt_mode field.
9576 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9577 (riscv_sret, riscv_uret): New.
9578 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9579 new arguments to interrupt attribute.
9581 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
9584 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9585 Don't handle -mcpu=power8 if -mpower9-vector is also used.
9587 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9589 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9590 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9591 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9592 several redundant entries.
9594 2018-06-06 David Malcolm <dmalcolm@redhat.com>
9596 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9597 type from "rtx" to "rtx_insn *".
9598 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9599 for local "call_insn", removing cast.
9600 (ix86_expand_call): Likewise, introducing a "call_insn" local.
9602 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
9604 PR tree-optimization/86066
9605 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9606 for BIT_INSERT_EXPR stores.
9608 2018-06-06 Richard Biener <rguenther@suse.de>
9610 PR tree-optimization/86062
9611 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9612 component refs ontop
9613 of to be offsetted base.
9615 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9617 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9618 to be static and remove check on interrupt attribute name.
9620 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
9622 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9623 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9625 2018-06-05 Steve Ellcey <sellcey@cavium.com>
9628 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9630 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9631 Remove second argument, change how error is called.
9632 (aarch64_layout_arg): Remove second argument from
9633 aarch64_err_no_fpadvsimd call.
9634 (aarch64_init_cumulative_args): Ditto.
9635 (aarch64_gimplify_va_arg_expr): Ditto.
9636 * config/aarch64/aarch64.md (mov<mode>): Ditto.
9638 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
9640 * config/i386/i386.md (simple_return_indirect_internal): New expander.
9641 (*simple_return_indirect_internal<mode>): Rename from
9642 simple_return_indirect_internal. Use W mode iterator.
9643 (rstorssp): New expander.
9644 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
9645 (clrssbsy): New expander.
9646 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
9648 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
9650 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9652 (cmse_check_pointed_object): Likewise.
9654 2018-06-05 Martin Liska <mliska@suse.cz>
9656 PR gcov-profile/47618
9657 * doc/invoke.texi: Document how -fprofile-dir format
9660 2018-06-05 Richard Biener <rguenther@suse.de>
9662 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9663 removal pretend DOM info isn't available so we do not update
9664 it and only remove edges, not dominated blocks. Actually free
9665 DOM info in case we removed something. Remove unreachable blocks.
9666 (mfb_keep_latches): Work with either DOM info or marked backedges.
9667 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9668 first. Mark backedges if DOM info isn't available.
9669 (Re-)compute DOM info after cleanup_control_flow_pre.
9671 2018-06-05 Richard Biener <rguenther@suse.de>
9673 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9674 (locus_discrim_hasher::hash): Adjust.
9675 (locus_discrim_hasher::equal): Likewise.
9676 (next_discriminator_for_locus): Work on line directly.
9677 (same_line_p): Pass in expanded locus1 as well.
9678 (assign_discriminators): Avoid redundant location expansions.
9680 2018-06-05 Richard Biener <rguenther@suse.de>
9682 PR tree-optimization/86046
9683 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9684 if required after clearing TREE_ADDRESSABLE.
9686 2018-06-05 Richard Biener <rguenther@suse.de>
9688 PR tree-optimization/86047
9689 * tree-ssa-loop.c (for_each_index): Glob handling of all
9690 decls and constants and really handle all of them.
9692 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9695 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9696 qualifier_void_pointer and qualifier_const_void_pointer.
9697 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9698 (arm_init_builtins): Handle the above.
9699 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9700 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9701 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9704 2018-06-05 Martin Liska <mliska@suse.cz>
9706 * auto-profile.c (read_autofdo_file): Do not use
9707 gcov_ctr_summary struct.
9708 (afdo_callsite_hot_enough_for_early_inline): Likewise.
9709 * coverage.c (struct counts_entry): Likewise.
9710 (read_counts_file): Read just single summary entry.
9711 (get_coverage_counts): Use gcov_summary struct.
9712 * coverage.h (get_coverage_counts): Likewise.
9713 * gcov-dump.c (dump_working_sets): Likewise.
9714 (tag_summary): Dump just single summary.
9715 * gcov-io.c (gcov_write_summary): Write just histogram
9717 (gcov_read_summary): Read just single summary.
9718 (compute_working_sets): Use gcov_summary struct.
9719 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9720 of GCOV_COUNTERS_SUMMABLE.
9721 (GCOV_COUNTERS_SUMMABLE): Remove.
9722 (GCOV_FIRST_VALUE_COUNTER): Replace with
9723 GCOV_COUNTER_V_INTERVAL.
9724 (struct gcov_ctr_summary): Remove.
9725 (struct gcov_summary): Directly use fields of former
9727 (compute_working_sets): Use gcov_summary struct.
9728 * gcov.c (read_count_file): Do not use ctrs fields.
9729 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9731 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9733 * profile.c: Likewise.
9734 * profile.h: Likewise.
9736 2018-06-05 Martin Liska <mliska@suse.cz>
9738 PR gcov-profile/84846
9739 * gcov.c (output_lines): Print working directory only
9740 in intermediate format.
9742 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
9744 * config/s390/s390-builtin-types.def: Add void function type.
9745 * config/s390/s390-builtins.def: Use the function type for the
9748 2018-06-04 Jim Wilson <jimw@sifive.com>
9750 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
9752 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
9753 and maybe_eh_return. Change regno to unsigned int. Use new args to
9754 handle EH_RETURN_DATA_REGNO registers properly.
9755 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
9756 (riscv_expand_epilogue): Update comment. Change argument name and
9757 type. Update code to use new name and type. Pass new args to
9758 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
9760 * config/riscv/riscv.md (NORMAL_RETURN): New.
9761 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
9762 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
9763 (eh_return): Call gen_eh_return_internal and emit barrier.
9764 (eh_return_internal): Call riscv_expand_epilogue.
9766 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
9768 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
9769 bit_insertion field and declare can_be_merged_into method.
9770 (merged_store_group::can_be_merged_into): New method.
9771 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9772 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
9773 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9775 2018-06-04 Richard Biener <rguenther@suse.de>
9777 PR tree-optimization/85955
9778 * builtins.c (fold_builtin_sincos): Convert pointers to
9779 destination to appropriate type before dereferencing.
9781 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
9783 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9785 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
9787 * expr.c (expand_expr_real_1): Force the operand into memory if
9788 its TYPE_MODE is BLKmode and if there is no integer mode for
9789 the number of bits being extracted.
9791 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9795 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9796 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9798 2018-06-04 Richard Biener <rguenther@suse.de>
9800 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9801 (cleanup_tree_cfg_noloop): ... single caller. Do
9802 start_recording_case_labels later.
9804 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
9806 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9807 to _IMMINTRIN_H_INCLUDED.
9808 * config/i386/pconfigintrin.h: Ditto.
9809 * config/i386/waitpkgintrin.h: Ditto.
9810 * config/i386/immintrin.h: Add includes for sgxintrin.h,
9811 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9812 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9813 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9814 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9815 waitpkgintrin.h and cldemoteintrin.h.
9817 2018-06-04 Richard Biener <rguenther@suse.de>
9819 PR tree-optimization/86038
9820 * tracer.c (find_best_successor): Check probability for
9821 being initialized, bail out if not.
9823 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
9826 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9827 of bits to ignore when comparing architectures.
9829 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9831 PR tree-optimization/69615
9832 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
9833 maximum or minimum of the type, try to merge it also as if
9834 range1 is + [-, x - 1] or + [x + 1, -].
9837 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
9839 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
9841 PR tree-optimization/86034
9842 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
9843 the unsigned bitfield type in a bit insertion sequence if it does not
9844 have a larger precision than the bitfield size.
9845 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
9847 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
9849 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
9851 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9853 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
9854 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
9855 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
9856 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
9858 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9860 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
9861 Disable -fdelete-null-pointer-checks for ELF toolchain.
9863 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9864 Kito Cheng <kito.cheng@gmail.com>
9866 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
9867 (nds32le-*-*, nds32be-*-*): Integrate checking process.
9868 (nds32*-*-*): Add glibc and uclibc conditions.
9869 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
9870 (TARGET_EXCEPT_UNWIND_INFO): Define.
9871 * config/nds32/elf.h: New file.
9872 * config/nds32/linux.h: New file.
9873 * config/nds32/nds32-elf.opt: New file.
9874 * config/nds32/nds32-linux.opt: New file.
9875 * config/nds32/nds32-fp-as-gp.c
9876 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
9877 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
9879 (nds32_asm_file_end): Ditto.
9880 (nds32_print_operand): Ditto.
9881 (nds32_insert_attributes): Ditto.
9882 (nds32_init_libfuncs): New function.
9883 (TARGET_HAVE_TLS): Define.
9884 (TARGET_INIT_LIBFUNCS): Define.
9885 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
9887 (TARGET_ELF): Apply different mcmodel setting.
9888 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
9889 been migrated into elf.h and linux.h files.
9890 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
9891 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
9892 (mcmodel): The content has been migrated into nds32-elf.opt and
9893 nds32-linux.opt files.
9894 * config/nds32/t-elf: New file.
9895 * config/nds32/t-linux: New file.
9897 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9898 Shiva Chen <shiva0217@gmail.com>
9900 * config/nds32/constants.md (unspec_volatile_element): Add
9901 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
9902 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
9904 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
9905 (make_pass_nds32_fp_as_gp): Declare.
9906 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
9908 (nds32_asm_function_end_prologue): Remove unused asm output.
9909 (nds32_asm_function_begin_epilogue): Remove unused asm output.
9910 (nds32_asm_file_start): Output necessary fp_as_gp information.
9911 (nds32_option_override): Adjust register usage.
9912 (nds32_expand_prologue): Consider fp_as_gp situation.
9913 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
9914 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
9917 (simple_return): Ditto.
9918 (omit_fp_begin): Output special directive for fp_as_gp.
9919 (omit_fp_end): Output special directive for fp_as_gp.
9920 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9921 mforbid-fp-as-gp): New options.
9923 2018-06-01 Mark Wielaard <mark@klomp.org>
9925 * dwarf2out.c (dwarf2out_finish): Remove generation of
9926 DW_AT_loclists_base.
9928 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
9930 * gimple-ssa-store-merging.c: Include gimple-fold.h.
9931 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
9932 (struct merged_store_group): Add bit_insertion field.
9933 (dump_char_array): Use standard hexadecimal format.
9934 (merged_store_group::merged_store_group): Set bit_insertion to false.
9935 (merged_store_group::apply_stores): Use optimal buffer size. Deal
9936 with BIT_INSERT_EXPR stores. Move up code updating the mask and
9937 also print the mask in the dump file.
9938 (pass_store_merging::gate): Minor tweak.
9939 (imm_store_chain_info::coalesce_immediate): Fix wrong association
9940 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
9941 stores with INTEGER_CST stores.
9942 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
9943 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
9944 and use it throughout. Generate bit insertion sequences if need be.
9945 (pass_store_merging::process_store): Remove redundant condition.
9946 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
9948 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
9950 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
9951 the 128-bit floating point types. Fix function comment.
9953 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9955 * config/aarch64/aarch64-simd.md
9956 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
9958 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
9961 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9963 PR tree-optimization/85989
9964 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
9966 (backprop::intersect_uses): Check it when deciding whether this
9967 is a backedge reference.
9968 (backprop::process_block): Add each phi to m_visited_phis
9969 after visiting it, then clear it at the end.
9971 2018-06-01 Richard Biener <rguenther@suse.de>
9973 * tree-vectorizer.h (vect_dr_stmt): New function.
9974 (vect_get_load_cost): Adjust.
9975 (vect_get_store_cost): Likewise.
9976 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
9977 Use vect_dr_stmt instead of DR_SMTT.
9978 (vect_record_base_alignments): Likewise.
9979 (vect_calculate_target_alignment): Likewise.
9980 (vect_compute_data_ref_alignment): Likewise and make static.
9981 (vect_update_misalignment_for_peel): Likewise.
9982 (vect_verify_datarefs_alignment): Likewise.
9983 (vector_alignment_reachable_p): Likewise.
9984 (vect_get_data_access_cost): Likewise. Pass down
9985 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
9986 (vect_get_peeling_costs_all_drs): Likewise.
9987 (vect_peeling_hash_get_lowest_cost): Likewise.
9988 (vect_enhance_data_refs_alignment): Likewise.
9989 (vect_find_same_alignment_drs): Likewise.
9990 (vect_analyze_data_refs_alignment): Likewise.
9991 (vect_analyze_group_access_1): Likewise.
9992 (vect_analyze_group_access): Likewise.
9993 (vect_analyze_data_ref_access): Likewise.
9994 (vect_analyze_data_ref_accesses): Likewise.
9995 (vect_vfa_segment_size): Likewise.
9996 (vect_small_gap_p): Likewise.
9997 (vectorizable_with_step_bound_p): Likewise.
9998 (vect_prune_runtime_alias_test_list): Likewise.
9999 (vect_analyze_data_refs): Likewise.
10000 (vect_supportable_dr_alignment): Likewise.
10001 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10002 (vect_gen_prolog_loop_niters): Likewise.
10003 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10004 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10006 (vect_recog_mask_conversion_pattern): Likewise.
10007 (vect_try_gather_scatter_pattern): Likewise.
10008 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10009 to vect_get_store_cost.
10010 (vect_get_store_cost): Get stmt_info instead of DR.
10011 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10012 (vect_get_load_cost): Get stmt_info instead of DR.
10014 2018-06-01 Richard Biener <rguenther@suse.de>
10016 PR middle-end/86017
10017 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10018 vars wrapped in MEM_REFs.
10020 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10022 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10023 Fix subreg tests so that we only return a choice between
10024 GENERAL_REGS and FP_REGS if the original classes included both.
10026 2018-06-01 Richard Biener <rguenther@suse.de>
10029 * tree-ssa-structalias.c (get_function_part_constraint):
10030 Handle NULL fi->decl.
10031 (find_func_aliases_for_call): Properly handle indirect
10032 fi from direct call.
10033 (find_func_clobbers): Likewise.
10034 (ipa_pta_execute): Likewise.
10035 (create_variable_info_for): For functions that are ifunc_resolver
10036 resolve to a varinfo that contains the result of the resolver call.
10037 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10040 2018-05-31 Michael Collison <michael.collison@arm.com>
10042 * config/aarch64/aarch64.md:
10043 (*fix_to_zero_extenddfdi2): New pattern.
10044 * gcc.target/aarch64/fix_extend1.c: New testcase.
10046 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10048 PR middle-end/78809
10049 PR middle-end/83026
10050 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10051 and BUILT_IN_STRNCMP_EQ.
10052 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10053 BUILT_IN_STRNCMP_EQ.
10054 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10055 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10056 (gimple_fold_builtin): Likewise.
10057 * tree-ssa-strlen.c (compute_string_length): New function.
10058 (determine_min_obsize): New function.
10059 (handle_builtin_string_cmp): New function to handle calls to
10060 string compare functions.
10061 (strlen_optimize_stmt): Add handling to builtin string compare
10063 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10064 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10065 * tree.c (build_common_builtin_nodes): Add new defines of
10066 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10068 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10071 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10072 functions with naked attribute.
10074 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10076 * config/i386/sse.md (avx_vec_concat<mode>):
10077 Substitute concat_tg_mode mode attribute with xtg_mode.
10078 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10079 (concat_tg_mode): Remove mode attribute.
10081 2018-05-31 Martin Sebor <msebor@redhat.com>
10084 * calls.c (alloc_max_size): Correct a logic error/typo.
10085 Treat excessive arguments as infinite. Warn for invalid arguments.
10086 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10088 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10091 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10092 and movx for Haswell.
10094 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10095 Cesar Philippidis <cesar@codesourcery.com>
10097 PR middle-end/85879
10098 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10099 when emitting error on private/firstprivate reductions.
10100 * omp-low.c (lower_omp_target): Avoid reference-type processing
10101 on pointers for firstprivate clause.
10103 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10105 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10108 * config/aarch64/aarch64-simd.md
10109 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10110 (aarch64_ld1_x3_<mode>): Likewise
10111 (aarch64_st1x2<VALLDIF:mode>): Likewise
10112 (aarch64_st1_x2_<mode>): Likewise
10113 (aarch64_st1x3<VALLDIF:mode>): Likewise
10114 (aarch64_st1_x3_<mode>): Likewise
10115 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10116 (vld1_s8_x3): Likewise.
10117 (vld1_u16_x3): Likewise.
10118 (vld1_s16_x3): Likewise.
10119 (vld1_u32_x3): Likewise.
10120 (vld1_s32_x3): Likewise.
10121 (vld1_u64_x3): Likewise.
10122 (vld1_s64_x3): Likewise.
10123 (vld1_f16_x3): Likewise.
10124 (vld1_f32_x3): Likewise.
10125 (vld1_f64_x3): Likewise.
10126 (vld1_p8_x3): Likewise.
10127 (vld1_p16_x3): Likewise.
10128 (vld1_p64_x3): Likewise.
10129 (vld1q_u8_x3): Likewise.
10130 (vld1q_s8_x3): Likewise.
10131 (vld1q_u16_x3): Likewise.
10132 (vld1q_s16_x3): Likewise.
10133 (vld1q_u32_x3): Likewise.
10134 (vld1q_s32_x3): Likewise.
10135 (vld1q_u64_x3): Likewise.
10136 (vld1q_s64_x3): Likewise.
10137 (vld1q_f16_x3): Likewise.
10138 (vld1q_f32_x3): Likewise.
10139 (vld1q_f64_x3): Likewise.
10140 (vld1q_p8_x3): Likewise.
10141 (vld1q_p16_x3): Likewise.
10142 (vld1q_p64_x3): Likewise.
10143 (vst1_s64_x2): Likewise.
10144 (vst1_u64_x2): Likewise.
10145 (vst1_f64_x2): Likewise.
10146 (vst1_s8_x2): Likewise.
10147 (vst1_p8_x2): Likewise.
10148 (vst1_s16_x2): Likewise.
10149 (vst1_p16_x2): Likewise.
10150 (vst1_s32_x2): Likewise.
10151 (vst1_u8_x2): Likewise.
10152 (vst1_u16_x2): Likewise.
10153 (vst1_u32_x2): Likewise.
10154 (vst1_f16_x2): Likewise.
10155 (vst1_f32_x2): Likewise.
10156 (vst1_p64_x2): Likewise.
10157 (vst1q_s8_x2): Likewise.
10158 (vst1q_p8_x2): Likewise.
10159 (vst1q_s16_x2): Likewise.
10160 (vst1q_p16_x2): Likewise.
10161 (vst1q_s32_x2): Likewise.
10162 (vst1q_s64_x2): Likewise.
10163 (vst1q_u8_x2): Likewise.
10164 (vst1q_u16_x2): Likewise.
10165 (vst1q_u32_x2): Likewise.
10166 (vst1q_u64_x2): Likewise.
10167 (vst1q_f16_x2): Likewise.
10168 (vst1q_f32_x2): Likewise.
10169 (vst1q_f64_x2): Likewise.
10170 (vst1q_p64_x2): Likewise.
10171 (vst1_s64_x3): Likewise.
10172 (vst1_u64_x3): Likewise.
10173 (vst1_f64_x3): Likewise.
10174 (vst1_s8_x3): Likewise.
10175 (vst1_p8_x3): Likewise.
10176 (vst1_s16_x3): Likewise.
10177 (vst1_p16_x3): Likewise.
10178 (vst1_s32_x3): Likewise.
10179 (vst1_u8_x3): Likewise.
10180 (vst1_u16_x3): Likewise.
10181 (vst1_u32_x3): Likewise.
10182 (vst1_f16_x3): Likewise.
10183 (vst1_f32_x3): Likewise.
10184 (vst1_p64_x3): Likewise.
10185 (vst1q_s8_x3): Likewise.
10186 (vst1q_p8_x3): Likewise.
10187 (vst1q_s16_x3): Likewise.
10188 (vst1q_p16_x3): Likewise.
10189 (vst1q_s32_x3): Likewise.
10190 (vst1q_s64_x3): Likewise.
10191 (vst1q_u8_x3): Likewise.
10192 (vst1q_u16_x3): Likewise.
10193 (vst1q_u32_x3): Likewise.
10194 (vst1q_u64_x3): Likewise.
10195 (vst1q_f16_x3): Likewise.
10196 (vst1q_f32_x3): Likewise.
10197 (vst1q_f64_x3): Likewise.
10198 (vst1q_p64_x3): Likewise.
10200 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10202 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10203 user_label_prefix to name.
10205 * tree-core.h: Update comment about the format of NAME string
10206 passed to handler in attribute_spec.
10208 * config/msp430/msp430.md: Remove erroneous subreg expression from
10209 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10210 zero_extend{q,h}isi2.
10212 2018-05-30 Borislav Petkov <bp@suse.de>
10214 * doc/extend.texi: Document some architecture specific
10215 constraints and sort entries.
10217 2018-05-30 Martin Sebor <msebor@redhat.com>
10219 PR middle-end/85369
10220 * builtins.c (expand_builtin_stpcpy_1): New function.
10221 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10222 only if the former succeeds.
10224 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10226 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10229 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10231 * doc/invoke.texi (-flinker-output): Document
10233 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10235 * passes.c (ipa_write_summaries): Only modify statements if body
10237 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10238 incrementally linking.
10239 (ipa_passes): Likewise.
10240 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10241 pass down resolution info.
10242 * common.opt (flag_incremental_link): Update info.
10243 * gcc.c (plugin specs): Turn flinker-output=* to
10244 -plugin-opt=-linker-output-known
10245 * toplev.c (compile_file): Also cut compilation when doing incremental
10247 * flag-types. (enum lto_partition_model): Add
10248 LTO_LINKER_OUTPUT_NOLTOREL.
10249 (invoke.texi): Add -flinker-output docs.
10250 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10251 link same way as WPA; do not stream in dead initializers.
10253 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10254 darf2out_register_external_decl): Support incremental link.
10256 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10258 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10260 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10262 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10263 it down to simple_object_copy_lto_debug_sections.
10264 (run_gcc): Determine incremental LTO link time and configure
10265 lto1 into non-wpa mode, disable renaming of debug sections.
10267 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10269 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10270 descriptions of various incorrectly documented functions.
10272 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10275 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10276 address check not strict.
10278 2018-05-30 Richard Biener <rguenther@suse.de>
10280 PR tree-optimization/85964
10281 * tracer.c (better_p): Drop initialized count check, we only
10282 call the function with initialized counts now.
10283 (find_best_successor): Do find a best edge if one
10284 has uninitialized count.
10285 (find_best_predecessor): Likewise. Do BB frequency check only
10286 if count is initialized.
10288 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10290 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10291 (aarch64_ldrstr_offset_compare): New.
10292 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10293 load/store orderings.
10294 (aarch64_gen_adjusted_ldpstp): Likewise.
10296 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
10298 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10299 Check for subset of GENERAL_REGS and FP_REGS.
10300 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10303 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
10305 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10306 and wi::to_poly_offset. Add the current offset and then check
10307 whether the sum fits, rather than using an unchecked addition of
10308 a checked term. Check for a shwi rather than a uhwi.
10309 * expr.c (get_bit_range): Use tree_to_poly_uint64.
10310 (store_constructor): Use poly_int_tree_p.
10311 (expand_expr_real_1): Likewise.
10312 * function.c (assign_temp): Likewise.
10313 * fold-const.c (const_binop): Use poly_int_tree_p and
10314 wi::to_poly_offset.
10315 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
10317 * ipa-icf-gimple.c (func_checker::compare_operand): Use
10318 to_poly_offset for MEM offsets.
10319 * ipa-icf.c (sem_variable::equals): Likewise.
10320 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10321 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10322 wi::to_poly_offset for BIT_FIELD_REF offsets.
10323 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10324 wi::to_poly_offset.
10325 * var-tracking.c (emit_note_insn_var_location): Use
10326 tree_to_poly_uint64.
10328 2018-05-29 Jim Wilson <jimw@sifive.com>
10330 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10332 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
10335 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10336 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10338 (sse4_1_round<mode>2): Use nonimmediate_operand
10339 for operand 1 predicate.
10341 2018-05-29 Martin Sebor <msebor@redhat.com>
10342 Richard Biener <rguenther@suse.de>
10345 * calls.c (get_size_range): Call determine_value_range instead
10346 of get_value_range..
10347 * tree-vrp.h (determine_value_range): Declared new function.
10348 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10350 2018-05-29 Richard Biener <rguenther@suse.de>
10352 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10353 sure to use non-pattern stmts for get_earlier_stmt arguments.
10354 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10355 called on pattern stmts.
10356 (get_later_stmt): Likewise.
10358 2018-05-29 Martin Liska <mliska@suse.cz>
10360 PR gcov-profile/85759
10361 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10364 2018-05-29 Jakub Jelinek <jakub@redhat.com>
10366 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10368 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10372 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10373 VEC_PACK_FLOAT_EXPR): New tree codes.
10374 * tree-pretty-print.c (op_code_prio): Handle
10375 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10376 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10377 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10378 * tree-inline.c (estimate_operator_cost): Likewise.
10379 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10380 * fold-const.c (const_binop): Likewise.
10381 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10382 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10383 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10384 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10385 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10386 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10387 * expr.c (expand_expr_real_2): Likewise.
10388 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10389 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10390 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10392 * optabs.c (expand_widen_pattern_expr): For
10393 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10394 sign from result type rather than operand's type.
10395 (expand_binop_directly): For vec_packu_float_optab and
10396 vec_packs_float_optab allow result type to be different from operand's
10398 * optabs-tree.c (optab_for_tree_code): Handle
10399 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10400 VEC_PACK_FLOAT_EXPR. Formatting fixes.
10401 * tree-vect-generic.c (expand_vector_operations_1): Handle
10402 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10403 VEC_PACK_FLOAT_EXPR.
10404 * tree-vect-stmts.c (supportable_widening_operation): Handle
10406 (supportable_narrowing_operation): Handle FLOAT_EXPR.
10407 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10408 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10409 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
10410 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10412 (vec_pack<floatprefix>_float_<mode>): New expander.
10413 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10415 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10416 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10417 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10418 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10419 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10421 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10422 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10423 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10424 VEC_PACK_FLOAT_EXPR): Document.
10426 2018-05-29 Richard Biener <rguenther@suse.de>
10428 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10430 (stmt_vec_info_vec): Make pointer.
10431 (init_stmt_vec_info_vec): Remove.
10432 (free_stmt_vec_info_vec): Likewise.
10433 (set_stmt_vec_info_vec): New function.
10434 (free_stmt_vec_infos): Likewise.
10435 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10436 (set_vinfo_for_stmt): Likewise.
10437 (get_earlier_stmt): Likewise.
10438 (get_later_stmt): Likewise.
10439 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10440 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10441 (vec_info::~vec_info): Free stmt_vec_infos.
10442 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10443 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10444 (pass_slp_vectorize::execute): Likewise.
10445 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10446 (free_stmt_vec_info_vec): Likewise.
10447 (set_stmt_vec_info_vec): New function.
10448 (free_stmt_vec_infos): Likewise.
10449 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10450 the global stmt_vec_info_vec.
10451 * tree-parloops.c (gather_scalar_reductions): Use
10452 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10455 2018-05-29 Richard Biener <rguenther@suse.de>
10457 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10459 2018-05-29 Martin Liska <mliska@suse.cz>
10460 David Malcolm <dmalcolm@redhat.com>
10462 * vec.c (test_reverse): New.
10463 (vec_c_tests): Add new test.
10464 * vec.h (vl_ptr>::reverse): New function.
10466 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
10468 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10470 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10473 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
10475 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10477 2018-05-28 Richard Biener <rguenther@suse.de>
10479 PR tree-optimization/85933
10480 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10481 look at stmts marked as vectorizable.
10483 2018-05-28 Richard Biener <rguenther@suse.de>
10485 PR tree-optimization/85934
10486 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10487 vector boolean check before scalar optimization.
10489 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10491 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10494 2018-05-28 Mark Wielaard <mark@klomp.org>
10496 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10497 if it is an expression containing a minus sign.
10499 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
10501 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10503 2018-05-27 Paul Koning <ni1d@arrl.net>
10505 * config/pdp11/pdp11.md (truncsihi2): Remove.
10507 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
10508 Chung-Ju Wu <jasonwucj@gmail.com>
10510 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10512 (unaligned_store_dw): Ditto.
10513 * config/nds32/nds32-memory-manipulation.c
10514 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10515 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10516 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10517 (emit_setmem_word_loop): Rename to ...
10518 (emit_setmem_doubleword_loop): ... this.
10519 (nds32_gen_dup_4_byte_to_word_value): New function.
10520 (nds32_gen_dup_8_byte_to_double_word_value): New function.
10521 (nds32_expand_setmem_loop): Refine implementation.
10522 (nds32_expand_setmem_loop_v3m): Ditto.
10523 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10526 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10528 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10530 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10532 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10533 (nds32_init_machine_status): Initialize machine->attr_naked_p and
10534 machine->attr_no_prologue_p.
10535 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10536 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10537 (nds32_expand_epilogue): Consider attr_naked_p.
10538 (nds32_expand_epilogue_v3pop): Likewise.
10539 (nds32_can_use_return_insn): Likewise.
10540 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10541 attr_no_prologue_p fields.
10542 * config/nds32/nds32.opt (mret-in-naked-func): New option.
10544 2018-05-27 Jakub Jelinek <jakub@redhat.com>
10547 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10549 * config/i386/sse.md
10550 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10552 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10554 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10556 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10558 (*<floatsuffix>floatv2div2sf2): Rename to ...
10559 (*float<floatunssuffix>v2div2sf2): ... this.
10560 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10561 (float<floatunssuffix>v2div2sf2_mask): ... this.
10562 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10563 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10564 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10566 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10568 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10570 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10572 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10574 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10576 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10577 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10578 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10579 gen_ufix_truncv8dfv8si2.
10580 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10581 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10582 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10583 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10584 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10585 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10586 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10587 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10589 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10593 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10595 2018-05-25 Jim Wilson <jimw@sifive.com>
10597 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10598 * config/riscv/riscv.c (struct machine_function): Add
10599 interrupt_handler_p and attribute_checked_p fields.
10600 (riscv_attribute_table): Add interrupt.
10601 (riscv_interrupt_type_p): New.
10602 (riscv_save_reg_p): Save extra regs for interrupt handler.
10603 (riscv_use_save_libcall): Return false for interrupt handler.
10604 (riscv_first_stack_step): Add forward declaration.
10605 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
10606 for interrupt handler with large frame. Use it for saved reg list.
10607 (riscv_expand_prologue): Move flag_stack_usage_info support to
10608 eliminate duplication.
10609 (riscv_expand_epilogue): Generate mret for interrupt handler.
10610 (riscv_epilogue_uses): New.
10611 (riscv_can_use_return_insn): Return false for interrupt handler.
10612 (riscv_function_ok_for_sibcall): Likewise.
10613 (riscv_set_current_function): Add interrupt handler support.
10614 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10615 * config/riscv/riscv.md (UNSPECV_MRET): New.
10617 (riscv_frflags, riscv_fsflags): Use tab after opcode.
10619 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10621 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
10623 PR tree-optimization/85712
10624 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10625 this candidate has already been replaced in-situ by a copy.
10627 2018-05-25 Jason Merrill <jason@redhat.com>
10629 PR c++/80485 - inline function non-zero address.
10630 * symtab.c (nonzero_address): Check DECL_COMDAT.
10632 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
10635 * config/alpha/alpha.md (ashlsi3): New insn pattern.
10636 (*ashlsi_se): Rename from *ashldi_se. Define as sign
10637 extension of SImode operation. Use const123_operand predicate.
10638 (*saddsi_1): Remove.
10639 (*saddl_se_1): Ditto.
10640 (*ssubsi_1): Ditto.
10641 (*ssubl_se_1): Ditto.
10642 * config/alpha/predicates.md (const123_operand): New predicate.
10643 * config/alpha/constraints.md (P): Use IN_RANGE.
10645 2018-05-25 Richard Biener <rguenther@suse.de>
10647 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10649 (ref_maybe_used_by_stmt_p): Likewise.
10650 (stmt_may_clobber_ref_p): Likewise.
10651 (stmt_may_clobber_ref_p_1): Likewise.
10652 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10654 (ref_maybe_used_by_stmt_p): Likewise.
10655 (stmt_may_clobber_ref_p): Likewise.
10656 (stmt_may_clobber_ref_p_1): Likewise.
10657 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10658 the alias oracle to disambiguate DRs with stmts DR analysis
10660 (vect_analyze_data_refs): Do not give up on not analyzable
10661 DRs for BB vectorization. Remove code truncating the dataref
10664 2018-05-25 Jakub Jelinek <jakub@redhat.com>
10667 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10668 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
10669 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10671 2018-05-25 Richard Biener <rguenther@suse.de>
10673 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10674 function, combining stmt data ref gathering and fatal analysis
10676 (vect_analyze_data_refs): Remove now redudnant code and simplify.
10677 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10678 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10679 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10680 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10682 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10684 PR tree-optimization/85720
10685 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10686 SCC if all partitions are builtins.
10687 (version_loop_by_alias_check): New parameter. Generate cancelable
10688 runtime alias check if all partitions are builtins.
10689 (distribute_loop): Update call to above function.
10691 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10693 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10694 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10695 (parm_default_def_partition_arg): Ditto.
10696 (set_parm_default_def_partition): Ditto.
10697 (get_parm_default_def_partitions): Ditto and make it static.
10698 (get_undefined_value_partitions): Ditto and make it static.
10699 (remove_ssa_form): Refactor call to init_var_map here.
10700 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10701 computation for loop region.
10702 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10703 (register_default_def): Delete.
10704 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10705 (parm_default_def_partition_arg): Ditto.
10706 (set_parm_default_def_partition): Ditto.
10707 (get_parm_default_def_partitions): Ditto and make it static.
10708 (get_undefined_value_partitions): Ditto and make it static.
10709 (coalesce_with_default, coalesce_with_default): Update comment.
10710 (create_coalesce_list_for_region): New func factored out from
10711 create_outofssa_var_map.
10712 (populate_coalesce_list_for_outofssa): New func factored out from
10713 create_outofssa_var_map and coalesce_ssa_name.
10714 (create_outofssa_var_map): Delete.
10715 (coalesce_ssa_name): Refactor to support live range computation.
10716 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10717 (get_parm_default_def_partitions): Delete.
10718 (get_undefined_value_partitions): Ditto.
10719 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10720 computation for loop region.
10721 (new_tree_live_info, loe_visit_block): Ditto.
10722 (live_worklist, set_var_live_on_entry): Ditto.
10723 (calculate_live_on_exit, verify_live_on_entry): Ditto.
10724 * tree-ssa-live.h (struct _var_map): New fields.
10725 (init_var_map): Change decl.
10726 (region_contains_p): New.
10728 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10730 * tree-ssa-live.h (live_merge_and_clear): Delete.
10732 2018-05-25 Richard Biener <rguenther@suse.de>
10735 * tree-dump.c (dequeue_and_dump): Remove access to removed
10736 operand 2 of a SWITCH_EXPR.
10738 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10740 * doc/sourcebuild.texi (vect_double_cond_arith): Include
10741 multiplication and division.
10742 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
10743 (cond_udiv@var{m}, cond_umod@var{m}): Document.
10744 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
10745 (cond_udiv_optab, cond_umod_optab): New optabs.
10746 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10747 (IFN_COND_RDIV): New internal functions.
10748 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
10749 TRUNC_MOD_EXPR and RDIV_EXPR.
10750 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
10751 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
10753 (SVE_INT_BINARY): Include mult.
10754 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
10755 (optab, sve_int_op): Handle mult.
10756 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
10758 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
10759 for SVE_INT_BINARY_SD.
10761 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10763 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
10764 (optab, sve_int_op): Handle div and udiv.
10765 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
10766 for SVE_INT_BINARY_SD.
10767 (*<optab><mode>3): New insn for the same.
10769 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10771 * tree-vect-patterns.c: Include predict.h.
10772 (vect_recog_divmod_pattern): Restrict check for division support
10773 to when optimizing for size.
10775 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10777 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10778 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10779 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10780 (gimple_match_op::set_op): Likewise.
10781 (gimple_resimplify4): Declare.
10782 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10783 (expr::gen_transform): Likewise.
10784 (decision_tree::gen): Generate a simplification routine for 4 operands.
10785 * gimple-match-head.c (gimple_simplify): Add an overload for
10786 4 operands. In the top-level function, handle up to 4 call
10787 arguments and call gimple_resimplify4.
10788 (gimple_resimplify4): New function.
10789 (build_call_internal): Pass a fourth operand.
10790 (maybe_push_to_seq): Likewise.
10791 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10792 Fold VEC_COND_EXPRs of an operation and a default value into
10793 an IFN_COND_* function if possible.
10794 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10796 (SVE_COND_FP_BINARY): Include them.
10797 (optab, sve_fp_op): Handle them.
10798 (SVE_INT_BINARY_REV): New code iterator.
10799 (SVE_COND_FP_BINARY_REV): New int iterator.
10800 (commutative): New int attribute.
10801 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10803 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10805 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10806 (*cond_<optab><mode>): New patterns for reversed operands.
10808 2018-05-25 Richard Biener <rguenther@suse.de>
10810 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10811 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10812 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10813 (STMT_VINFO_GROUPED_ACCESS): Adjust.
10814 * tree-vect-data-refs.c (everywhere): Adjust users.
10815 * tree-vect-loop.c (everywhere): Likewise.
10816 * tree-vect-slp.c (everywhere): Likewise.
10817 * tree-vect-stmts.c (everywhere): Likewise.
10818 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10820 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10822 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10824 (gcc_cv_as_section_exclude): ... this.
10825 Try Solaris as #exclude syntax.
10826 * configure: Regenerate.
10827 * config.in: Regenerate.
10828 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10830 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
10831 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
10833 * varasm.c (default_elf_asm_named_section): Don't check if
10834 HAVE_GAS_SECTION_EXCLUDE is defined.
10836 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10838 * doc/md.texi: Update the documentation of the cond_* optabs
10839 to mention the new final operand. Fix GET_MODE_NUNITS call.
10840 Describe the scalar case too.
10841 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
10842 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
10844 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
10845 (get_conditional_internal_fn): Update comment.
10846 * tree-vect-loop.c (vectorizable_reduction): Pass the original
10847 accumulator value as a final argument to conditional functions.
10848 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
10849 a define_expand and add an "else" operand. Assert for now that
10850 the else operand is equal to operand 2. Use SVE_INT_BINARY and
10851 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
10852 (*cond_<optab><mode>): New patterns.
10853 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
10854 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10855 (UNSPEC_COND_EOR): Delete.
10856 (optab): Remove associated mappings.
10857 (SVE_INT_BINARY): New code iterator.
10858 (sve_int_op): Remove int attribute and add "minus" to the code
10860 (SVE_COND_INT_OP): Delete.
10861 (SVE_COND_FP_OP): Rename to...
10862 (SVE_COND_FP_BINARY): ...this.
10864 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10866 * optabs.c (can_reuse_operands_p): New function.
10867 (maybe_legitimize_operands): Try to reuse the results for
10870 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10872 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
10873 Add {q} suffix to insn mnemonic.
10875 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10877 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
10878 (msp430_warn_func_return): New.
10880 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
10882 * fold-const.c (tree_nonzero_bits): New function.
10883 * fold-const.h (tree_nonzero_bits): Likewise.
10884 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
10885 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
10887 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10891 * varasm.c (assemble_alias): Check ifunc_resolver only on
10894 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10897 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
10898 when memory input operand is handled.
10900 2018-05-24 Luis Machado <luis.machado@linaro.org>
10902 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
10904 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
10906 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10908 * match.pd: Delay FMA folds until after vectorization.
10910 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
10913 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10914 address check not strict.
10916 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10918 * gimple-match.h (gimple_match_op): New class.
10919 (mprts_hook): Replace parameters with a gimple_match_op *.
10920 (maybe_build_generic_op): Likewise.
10921 (gimple_simplified_result_is_gimple_val): Replace parameters with
10922 a const gimple_match_op *.
10923 (gimple_simplify): Replace code_helper * and tree * parameters with
10924 a gimple_match_op * parameter.
10925 (gimple_resimplify1): Replace code_helper *, tree and tree *
10926 parameters with a gimple_match_op * parameter.
10927 (gimple_resimplify2): Likewise.
10928 (gimple_resimplify3): Likewise.
10929 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
10930 parameters with a gimple_match_op * parameter.
10931 * gimple-match-head.c (gimple_simplify): Change prototypes of
10932 auto-generated functions to take a gimple_match_op * instead of
10933 separate code_helper * and tree * parameters. Make the same
10934 change in the top-level overload and update calls to the
10935 gimple_resimplify routines. Update calls to the auto-generated
10936 functions and to maybe_push_res_to_seq in the publicly-facing
10937 operation-specific gimple_simplify overloads.
10938 (gimple_match_op::MAX_NUM_OPS): Define.
10939 (gimple_resimplify1): Replace rcode and ops with a single res_op
10940 parameter. Update call to gimple_simplify.
10941 (gimple_resimplify2): Likewise.
10942 (gimple_resimplify3): Likewise.
10943 (mprts_hook): Replace parameters with a gimple_match_op *.
10944 (maybe_build_generic_op): Likewise.
10945 (build_call_internal): Replace type, nargs and ops with
10946 a gimple_match_op *.
10947 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
10948 with a single gimple_match_op *. Update calls to mprts_hook,
10949 build_call_internal and gimple_simplified_result_is_gimple_val.
10950 Factor out code that is common to the tree_code and combined_fn cases.
10951 * genmatch.c (expr::gen_transform): Replace tem_code and
10952 tem_ops with a gimple_match_op called tem_op. Update calls
10953 to the gimple_resimplify functions and maybe_push_res_to_seq.
10954 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
10955 res_ops. Update call to the gimple_resimplify functions.
10956 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
10957 (decision_tree::gen): Make the functions take a gimple_match_op *
10958 called res_op instead of separate res_code and res_ops parameters.
10959 Update call accordingly.
10960 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
10961 and ops with a single res_op parameter. Update calls to
10962 maybe_build_generic_op and maybe_push_res_to_seq.
10963 (fold_stmt_1): Update calls to gimple_simplify and
10964 replace_stmt_with_simplification.
10965 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
10966 and gimple_simplified_result_is_gimple_val.
10967 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
10969 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
10970 with a gimple_match_op *.
10971 (vn_nary_build_or_lookup): Likewise. Update call to
10972 vn_nary_build_or_lookup_1.
10973 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
10974 gimple_match_op *. Update calls to the gimple_resimplify routines
10975 and to gimple_simplified_result_is_gimple_val.
10976 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
10977 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
10978 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
10979 (visit_nary_op): Likewise.
10980 (visit_reference_op_load): Likewise.
10982 2018-05-23 Luis Machado <luis.machado@linaro.org>
10984 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
10985 modifier for printing the step amount.
10987 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
10990 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
10993 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
10995 * doc/sourcebuild.texi (Endianness): New subsubsection.
10997 2018-05-23 Luis Machado <luis.machado@linaro.org>
10999 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11000 <prefetch_dynamic_strides>: New const bool field.
11001 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11002 prefetch_dynamic_strides.
11003 (exynosm1_prefetch_tune): Likewise.
11004 (thunderxt88_prefetch_tune): Likewise.
11005 (thunderx_prefetch_tune): Likewise.
11006 (thunderx2t99_prefetch_tune): Likewise.
11007 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11009 (aarch64_override_options_internal): Update to set
11010 PARAM_PREFETCH_DYNAMIC_STRIDES.
11011 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11012 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11013 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11014 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11015 prefetch-dynamic-strides setting.
11017 2018-05-23 Luis Machado <luis.machado@linaro.org>
11019 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11020 <minimum_stride>: New const int field.
11021 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11022 minimum_stride field defaulting to -1.
11023 (exynosm1_prefetch_tune): Likewise.
11024 (thunderxt88_prefetch_tune): Likewise.
11025 (thunderx_prefetch_tune): Likewise.
11026 (thunderx2t99_prefetch_tune): Likewise.
11027 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11028 <default_opt_level>: Set to 3.
11029 (aarch64_override_options_internal): Update to set
11030 PARAM_PREFETCH_MINIMUM_STRIDE.
11031 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11032 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11033 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11034 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11035 stride is constant and is below the minimum stride threshold.
11037 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11039 * config/arm/arm-cpus.in (mode26): Delete.
11040 (armv4): Delete mode26 reference.
11041 * config/arm/arm.c (arm_configure_build_target): Delete use of
11044 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11046 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11048 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11049 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11051 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11052 (floatunsdidf2): Ditto.
11054 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11056 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11057 (fixuns_trunc<mode>si2_avx512f): Ditto.
11058 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11059 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11060 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11062 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11064 PR rtl-optimization/79985
11065 * df-scan.c (df_insn_refs_collect): Remove special case for
11066 global registers and asm statements.
11068 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11070 * extend.texi (Global Register Variables): Rewrite the bullet list.
11071 Note that the register is available for allocation. Note that access
11072 via inline asm must use constraints. Add note about async-signal
11073 handlers. Remove paragraph about automagic register selection.
11075 2018-05-23 Richard Biener <rguenther@suse.de>
11077 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11078 of fixed offset from memset VN.
11080 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11082 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11083 first_interp field.
11084 (alloc_cand_and_find_basis): Initialize first_interp field.
11085 (slsr_process_mul): Modify first_interp field.
11086 (slsr_process_add): Likewise.
11087 (slsr_process_cast): Modify first_interp field for each new
11089 (slsr_process_copy): Likewise.
11090 (dump_candidate): Dump first_interp field.
11091 (replace_mult_candidate): Process all interpretations, not just
11093 (replace_rhs_if_not_dup): Likewise.
11094 (replace_one_candidate): Likewise.
11096 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11098 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11100 (aarch64_needs_frame_chain): New function.
11101 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11103 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11106 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11107 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11108 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11109 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11110 as true for strict-align.
11111 (aarch64_can_inline_p): Perform checks even when callee has no
11112 attributes to check for strict alignment.
11113 * doc/extend.texi (AArch64 Function Attributes): Document
11115 * doc/invoke.texi: (AArch64 Options): Likewise.
11117 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11119 PR tree-optimization/85853
11120 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11121 the handling of the root of the node to...
11122 (vect_slp_analyze_node_operations_1): ...this new function,
11123 and run the whole thing with the child nodes' def types
11124 set according to their SLP node's def type.
11126 2018-05-23 Richard Biener <rguenther@suse.de>
11128 PR middle-end/85874
11129 * tree-data-ref.c (create_runtime_alias_checks): Defer
11130 and ignore overflow warnings.
11132 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11134 PR tree-optimization/85822
11135 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11138 2018-05-23 Richard Biener <rguenther@suse.de>
11140 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11141 memset constants via native_interpret_expr.
11143 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11146 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11148 (cgraph_node::create_alias): Likewise.
11149 (cgraph_node::get_availability): Check ifunc_resolver instead
11150 of looking up ifunc attribute.
11151 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11152 * varasm.c (do_assemble_alias): Likewise.
11153 (assemble_alias): Likewise.
11154 (default_binds_local_p_3): Likewise.
11155 * cgraph.h (cgraph_node): Add ifunc_resolver.
11156 (cgraph_node::only_called_directly_or_aliased_p): Return false
11157 for IFUNC resolver.
11158 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11160 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11161 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11162 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11163 instead of looking up ifunc attribute.
11165 2018-05-22 Luis Machado <luis.machado@linaro.org>
11167 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11169 2018-05-22 Martin Sebor <msebor@redhat.com>
11171 PR middle-end/85359
11172 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11173 only when expasion succeeds.
11174 (expand_builtin_strcmp): Same.
11175 (expand_builtin_strncmp): Same.
11177 2018-05-22 Martin Sebor <msebor@redhat.com>
11179 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11181 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11182 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11184 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11185 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11187 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11188 Add check for legitimate_address.
11189 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11190 (aarch64_swap_ldrstr_operands): New.
11191 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11194 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11195 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11197 * config/aarch64/aarch64.md: New patterns to generate stp
11199 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11200 single words and double words.
11201 (load_pair_sw, load_pair_dw): Likewise.
11202 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11204 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11206 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11207 for different mode ldpstp and add peephole for merged zero stores.
11208 Likewise for loads.
11209 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11211 (aarch64_gen_store_pair): Rename calls to match new patterns.
11212 (aarch64_gen_load_pair): Rename calls to match new patterns.
11213 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11214 (load_pair<DREG:mode><DREG2:mode>): ... This.
11215 (store_pair<mode>): Rename to...
11216 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11217 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11218 New mode iterators.
11219 (V_INT_EQUIV): Handle SImode.
11220 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11223 2018-05-22 Martin Sebor <msebor@redhat.com>
11226 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11227 or ajust the presumed bound on an operation to avoid unnecessary
11230 2018-05-22 Martin Sebor <msebor@redhat.com>
11232 PR tree-optimization/85826
11233 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11234 assuming that a DECL necesarily has a constant size.
11236 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11238 PR middle-end/85862
11239 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11241 2018-05-22 Richard Biener <rguenther@suse.de>
11243 PR tree-optimization/85834
11244 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11245 non-constant and non-zero memset arguments.
11247 2018-05-22 Martin Liska <mliska@suse.cz>
11250 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11252 2018-05-22 Richard Biener <rguenther@suse.de>
11254 PR tree-optimization/85863
11255 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11256 comparisons when vectype is specified.
11257 (vectorizable_condition): Do not specify vectype for
11258 vect_is_simple_cond when SLP vectorizing.
11260 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11263 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11264 define __ibm128 as long double.
11265 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11266 as a distinct type when IEEE 128-bit support is enabled.
11267 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11268 128-bit types to use the correct functions.
11269 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11270 convert between 128-bit floating point types that have different
11271 modes but the same representation, instead of using gen_lowpart to
11273 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11275 (IFKF_reg): New attributes to give the register constraints for
11277 (extend<mode>tf2_internal): New insns to mark an explicit
11278 conversion between 128-bit floating point types that have a
11279 different mode but share the same representation.
11281 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11283 PR tree-optimization/85814
11284 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11285 a null return from get_strinfo when unsharing the next
11286 strinfo in the chain.
11288 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11291 * varasm.c (weak_finish): Clean up weak_decls.
11293 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11295 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11296 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11297 UNSPEC_UADALP values.
11298 * config/aarch64/iterators.md (ABAL): New int iterator.
11301 (sur): Add mappings for the above.
11302 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11304 (aarch64_<sur>abal<mode>_4): Likewise.
11305 (aarch64_<sur>adalp<mode>_3): Likewise.
11306 (<sur>sadv16qi): New define_expand.
11308 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
11310 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11311 (*movdf_internal): Ditto.
11312 (*rcpsf2_sse): Ditto.
11313 (*rsqrtsf2_sse): Ditto.
11314 (*sqrt<mode>2_sse): Ditto.
11316 2018-05-21 Tamar Christina <tamar.christina@arm.com>
11318 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11320 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11321 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11322 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11323 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11325 * config/aarch64/arm_neon.h: Likewise.
11326 * config/aarch64/iterators.md (VQ_I): New.
11328 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
11330 * config.gcc: Add arc/t-multilib-linux to tmake_file for
11332 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11335 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11337 * config/nds32/constraints.md (S): New constraint.
11338 * config/nds32/nds32.md (call_internal): Use constraint S.
11339 (call_value_internal): Likewise.
11340 (sibcall_internal): Likewise.
11341 (sibcall_value_internal): Likewise.
11343 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11344 Chung-Ju Wu <jasonwucj@gmail.com>
11346 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11347 into consideration.
11349 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11350 Chung-Ju Wu <jasonwucj@gmail.com>
11352 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11353 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11354 (nds32_rtx_costs_impl): Simplify.
11355 (nds32_address_cost_impl): Simplify.
11356 (nds32_init_rtx_costs): New function.
11357 (nds32_rtx_costs_speed_prefer): Likewise.
11358 (nds32_rtx_costs_size_prefer): Likewise.
11359 (nds32_address_cost_speed_prefer): Likewise.
11360 (nds32_address_cost_speed_fwprop): Likewise.
11361 (nds32_address_cost_size_prefer): Likewise.
11362 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11363 * config/nds32/nds32.c (nds32_option_override): Use
11364 nds32_init_rtx_costs function.
11366 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11368 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11369 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11370 (TARGET_PIPELINE_N8): Likewise.
11371 (TARGET_PIPELINE_N10): Likewise.
11372 (TARGET_PIPELINE_N13): Likewise.
11373 (TARGET_PIPELINE_GRAYWOLF): Likewise.
11375 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
11377 * config/nds32/nds32-fpu.md: Update copyright year.
11379 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11381 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11383 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11385 * config/nds32/nds32.c
11386 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11387 * config/nds32/nds32.opt (minline-asm-r15): New option.
11389 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11391 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11393 * config/nds32/nds32.md (abssi2): New pattern.
11395 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
11397 * config/i386/i386.md (rex64namesuffix): New mode attribute.
11398 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11399 Merge insn pattern from sse_cvtsi2ss<round_name> and
11400 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11401 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11402 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11403 using SWI48 mode iterator.
11404 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11405 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11406 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11407 pattern from sse_cvttss2si<round_saeonly_name>
11408 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11409 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11410 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11411 using SWI48 mode iterator.
11412 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11413 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11414 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11415 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11416 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11417 using SWI48 mode iterator.
11418 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11419 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11420 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11421 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11422 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11423 SWI48 mode iterator.
11424 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11425 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11426 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11427 pattern from sse_cvttsd2si<round_saeonly_name>
11428 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11430 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11432 * config/nds32/nds32-md-auxiliary.c
11433 (nds32_valid_smw_lwm_base_p): Refine.
11434 (nds32_output_smw_single_word): Refine.
11435 (nds32_output_smw_double_word): New.
11436 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11438 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11440 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11441 (nds32_output_stack_pop): Refine.
11442 (nds32_expand_unaligned_load): Refine.
11443 (nds32_expand_unaligned_store): Refine.
11445 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11446 Chung-Ju Wu <jasonwucj@gmail.com>
11448 * config/nds32/constants.md: Add TP_REGNUM constant.
11449 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11450 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11452 * config/nds32/nds32-doubleword.md: Consider flag_pic.
11453 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11454 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11455 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11456 and PIC code generation.
11457 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11459 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11461 * config/nds32/nds32.md: Support TLS and PIC.
11462 * config/nds32/nds32.c: Support TLS and PIC.
11463 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11464 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11467 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11469 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11470 mode with E_ prefix.
11472 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11473 Chung-Ju Wu <jasonwucj@gmail.com>
11475 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11476 * config/nds32/nds32-md-auxiliary.c
11477 (symbolic_reference_mentioned_p): New.
11478 (nds32_legitimize_ict_address): New.
11479 (nds32_expand_ict_move): New.
11480 (nds32_indirect_call_referenced_p): New.
11481 (nds32_symbol_binds_local_p): Delete.
11482 (nds32_long_call_p): Modify.
11483 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11484 * config/nds32/nds32-protos.h
11485 (symbolic_reference_mentioned_p): Declare.
11486 (nds32_legitimize_ict_address): Declare.
11487 (nds32_expand_ict_move): Declare.
11488 (nds32_indirect_call_referenced_p): Declare.
11489 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11490 (nds32_relax_group): Use nds32_ict_const_p as condition.
11491 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11492 (nds32_asm_file_start): Output ict_model directive in asm code.
11493 (nds32_legitimate_address_p): Consider indirect call.
11494 (nds32_print_operand): Consider indirect call.
11495 (nds32_print_operand_address): Consider indirect call.
11496 (nds32_insert_attributes): Handle "indirect_call" attribute.
11497 (TARGET_LEGITIMATE_ADDRESS_P): Define.
11498 (TARGET_LEGITIMATE_CONSTANT_P): Define.
11499 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11500 (TARGET_DELEGITIMIZE_ADDRESS): Define.
11501 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11502 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11503 (TARGET_ICT_MODEL_SMALL): Define.
11504 (TARGET_ICT_MODEL_LARGE): Define.
11505 * config/nds32/nds32.md (movsi): Consider ict model.
11506 (call, call_value): Consider ict model.
11507 (sibcall, sibcall_value): Consider ict model.
11508 * config/nds32/nds32.opt (mict-model): New option.
11509 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11512 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
11513 Monk Chiang <sh.chiang04@gmail.com>
11514 Jim Wilson <jimw@sifive.com>
11516 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11517 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
11518 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11519 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11520 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
11521 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11522 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11523 compute save_libcall_adjustment properly.
11524 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11525 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11526 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11527 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11528 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11529 (ABI_SPEC): Handle mabi=ilp32e.
11530 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11531 (RVE): Add RVE mask.
11532 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11533 <-march>: Add rv32e as an example.
11535 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
11538 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11539 (intra_create_variable_infos): Handle C++ constructors.
11541 2018-05-18 Martin Liska <mliska@suse.cz>
11543 * passes.def: Remove a redundant pass.
11545 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
11548 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11550 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11552 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11554 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11556 (armv2, armv2a, armv3, armv3m): Delete architectures.
11557 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11558 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11559 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11561 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11562 (*mulsidi3adddi): Likewise.
11563 (mulsidi3): Likewise.
11564 (*mulsidi3_nov6): Likewise.
11565 (umulsidi3): Likewise.
11566 (umulsidi3_nov6): Likewise.
11567 (umaddsidi4): Likewise.
11568 (*umulsidi3adddi): Likewise.
11569 (smulsi3_highpart): Likewise.
11570 (*smulsi3_highpart_nov6): Likewise.
11571 (umulsi3_highpart): Likewise.
11572 (*umulsi3_highpart_nov6): Likewise.
11573 * config/arm/arm.h (arm_arch3m): Delete.
11574 * config/arm/arm.c (arm_arch3m): Delete.
11575 (arm_option_override_internal): Update armv3-related comment.
11576 (arm_configure_build_target): Delete use of isa_bit_mode32.
11577 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11578 (arm_rtx_costs_internal): Delete check of arm_arch3m.
11579 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11580 (mulsa3): Likewise.
11581 (mulusa3): Likewise.
11582 * config/arm/arm-protos.h (arm_arch3m): Delete.
11583 * config/arm/arm-tables.opt: Regenerate.
11584 * config/arm/arm-tune.md: Likewise.
11585 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11586 deleted architectures.
11588 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11590 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11591 (armv5t, armv5te): New features.
11592 (ARMv5, ARMv5e): Delete fgroups.
11593 (ARMv5t, ARMv5te): Adjust for above changes.
11594 (ARMv6m): Likewise.
11595 (armv5, armv5e): Delete arches.
11596 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11598 (*call_reg_arm): Likewise.
11599 (*call_value_reg_armv5): Likewise.
11600 (*call_value_reg_arm): Likewise.
11601 (*call_symbol): Likewise.
11602 (*call_value_symbol): Likewise.
11603 (*sibcall_insn): Likewise.
11604 (*sibcall_value_insn): Likewise.
11605 (clzsi2): Likewise.
11606 (prefetch): Likewise.
11607 (define_split and define_peephole2 dependent on arm_arch5):
11609 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11611 (TARGET_ARM_QBIT): Likewise.
11612 (TARGET_DSP_MULTIPLY): Likewise.
11613 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11614 (arm_arch5, arm_arch5e): Delete.
11615 (arm_arch5t, arm_arch5te): Declare.
11616 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11617 (arm_arch5t): Declare.
11618 (arm_option_reconfigure_globals): Update for the above.
11619 (arm_options_perform_arch_sanity_checks): Update comment, replace
11620 use of arm_arch5 with arm_arch5t.
11621 (use_return_insn): Likewise.
11622 (arm_emit_call_insn): Likewise.
11623 (output_return_instruction): Likewise.
11624 (arm_final_prescan_insn): Likewise.
11625 (arm_coproc_builtin_available): Likewise.
11626 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11627 arm_arch5e with arm_arch5t and arm_arch5te.
11628 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11629 (arm_arch5t, arm_arch5te): Declare.
11630 * config/arm/arm-tables.opt: Regenerate.
11631 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11632 * config/arm/t-multilib: Likewise.
11633 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11634 instead of arm_arch5.
11635 (*call_reg_thumb1): Likewise.
11636 (*call_value_reg_thumb1_v5): Likewise.
11637 (*call_value_reg_thumb1): Likewise.
11638 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11640 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11642 2018-05-18 Martin Liska <mliska@suse.cz>
11644 PR gcov-profile/84846
11645 * doc/gcov.texi: Document -t option of gcov tool.
11647 2018-05-18 Martin Liska <mliska@suse.cz>
11649 PR gcov-profile/84846
11650 * gcov.c (print_usage): Add new -t option.
11651 (process_args): Handle the option.
11652 (generate_results): Use stdout as output when requested by
11655 2018-05-18 Martin Liska <mliska@suse.cz>
11657 PR gcov-profile/84846
11658 * coverage.c (coverage_init): Write PWD to .gcno file.
11659 * doc/gcov.texi: Document how working directory is printed.
11660 * gcov-dump.c (dump_gcov_file): Print PWD.
11661 * gcov.c (output_intermediate_file): Likewise.
11662 (read_graph_file): Read PWD string.
11663 (output_lines): Print PWD.
11665 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11667 PR middle-end/85817
11668 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11669 for retval and return false if all args to phi are zero.
11671 2018-05-18 Richard Biener <rguenther@suse.de>
11673 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11675 (evrp_dom_walker::before_dom_children): Call it.
11677 2018-05-18 Richard Biener <rguenther@suse.de>
11679 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11680 results when processing array refs with variable index.
11682 2018-05-18 Toon Moene <toon@moene.org>
11684 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11685 directly after that of -floop-interchange. Indicate that both
11686 options are enabled by default when specifying -O3.
11688 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11690 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11691 iterator. Delete separate integer-mode vec_set<mode> expander.
11692 (aarch64_simd_vec_setv2di): Delete.
11693 (vec_setv2di): Delete.
11694 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11695 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
11696 the "w, r" alternative.
11698 2018-05-18 Martin Liska <mliska@suse.cz>
11700 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11701 * tree-pass.h (make_pass_lower_switch_O0): New function.
11702 * tree-switch-conversion.c (node_has_low_bound): Remove.
11703 (node_has_high_bound): Likewise.
11704 (node_is_bounded): Likewise.
11705 (class pass_lower_switch): Make it a template type and create
11707 (pass_lower_switch::execute): Add template argument.
11708 (make_pass_lower_switch): New function.
11709 (make_pass_lower_switch_O0): New function.
11710 (do_jump_if_equal): Remove.
11711 (emit_case_nodes): Simplify to just handle all 3 cases and leave
11712 all the hard work to tree optimization passes.
11714 2018-05-18 Martin Liska <mliska@suse.cz>
11716 * dbgcnt.c (limit_low): Renamed from limit.
11717 (limit_high): New variable.
11718 (dbg_cnt_is_enabled): Check for upper limit.
11719 (dbg_cnt): Adjust dumping.
11720 (dbg_cnt_set_limit_by_index): Add new argument for high
11722 (dbg_cnt_set_limit_by_name): Likewise.
11723 (dbg_cnt_process_single_pair): Parse new format.
11724 (dbg_cnt_process_opt): Use strtok.
11725 (dbg_cnt_list_all_counters): Remove 'value' and add
11727 * doc/invoke.texi: Document changes.
11729 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
11731 * doc/sourcebuild.texi (scalar_all_fma): Document.
11732 * tree.def (FMA_EXPR): Delete.
11733 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11734 * internal-fn.c (ternary_direct): New macro.
11735 (expand_ternary_optab_fn): Likewise.
11736 (direct_ternary_optab_supported_p): Likewise.
11737 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11738 * builtins.c (fold_builtin_fma): Delete.
11739 (fold_builtin_3): Don't call it.
11740 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11741 * expr.c (expand_expr_real_2): Likewise.
11742 * fold-const.c (operand_equal_p): Likewise.
11743 (fold_ternary_loc): Likewise.
11744 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
11745 * gimple.c (DEFTREECODE): Likewise.
11746 * gimplify.c (gimplify_expr): Likewise.
11747 * optabs-tree.c (optab_for_tree_code): Likewise.
11748 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
11749 * tree-eh.c (operation_could_trap_p): Likewise.
11750 (stmt_could_throw_1_p): Likewise.
11751 * tree-inline.c (estimate_operator_cost): Likewise.
11752 * tree-pretty-print.c (dump_generic_node): Likewise.
11753 (op_code_prio): Likewise.
11754 * tree-ssa-loop-im.c (stmt_cost): Likewise.
11755 * tree-ssa-operands.c (get_expr_operands): Likewise.
11756 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
11757 * fold-const-call.h (fold_fma): Delete.
11758 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
11759 CFN_FNMA and CFN_FNMS.
11760 (fold_fma): Delete.
11761 * genmatch.c (combined_fn): New enum.
11762 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
11763 (commutative_op): New function.
11764 (commutate): Use it. Handle more than 2 operands.
11765 (dt_operand::gen_gimple_expr): Use commutative_op.
11766 (parser::parse_expr): Allow :c to be used with non-binary
11767 operators if the commutative operand is known.
11768 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
11769 CFN_FMS, CFN_FNMA and CFN_FNMS.
11770 (backprop::process_assign_use): Remove FMA_EXPR handling.
11771 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11772 (gen_hsa_fma): New function.
11773 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11774 IFN_FNMA and IFN_FNMS.
11775 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11776 * gimple-fold.h (follow_all_ssa_edges): Declare.
11777 * gimple-fold.c (follow_all_ssa_edges): New function.
11778 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11779 gimple_build interface and use follow_all_ssa_edges to fold the result.
11780 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11781 instead of checking for optabs directly.
11782 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11783 rather than FMA_EXPRs.
11784 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11785 call to IFN_FMA instead of an FMA_EXPR.
11787 2018-05-17 Jim Wilson <jimw@sifive.com>
11789 * expr.c (do_tablejump): When converting index to Pmode, if we have a
11790 sign extended promoted subreg, and the range does not have the sign bit
11791 set, then do a sign extend.
11793 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11794 test, check for sign extended subreg and/or constant operands, and
11795 do a sign extend in that case.
11797 2018-05-17 Steve Ellcey <sellcey@cavium.com>
11799 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11800 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11802 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11803 Change logics_shift_reg to logics_shift_imm.
11804 (thunderx2t99_fp_loadpair_basic): Delete.
11805 (thunderx2t99_fp_storepair_basic): Delete.
11806 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11807 (thunderx2t99_asimd_polynomial): Delete.
11808 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11809 and neon_fp_mul_d_scalar_q.
11810 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11811 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11812 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11813 (thunderx2t99_asimd_lut): Add missing tbl types.
11814 (thunderx2t99_asimd_ext): Delete.
11815 (thunderx2t99_asimd_load1_1_mult): Delete.
11816 (thunderx2t99_asimd_load1_2_mult): Delete.
11817 (thunderx2t99_asimd_load1_ldp): New.
11818 (thunderx2t99_asimd_load1): New.
11819 (thunderx2t99_asimd_load2): Add missing *load2* types.
11820 (thunderx2t99_asimd_load3): New.
11821 (thunderx2t99_asimd_load4): New.
11822 (thunderx2t99_asimd_store1_1_mult): Delete.
11823 (thunderx2t99_asimd_store1_2_mult): Delete.
11824 (thunderx2t99_asimd_store2_mult): Delete.
11825 (thunderx2t99_asimd_store2_onelane): Delete.
11826 (thunderx2t99_asimd_store_stp): New.
11827 (thunderx2t99_asimd_store1): New.
11828 (thunderx2t99_asimd_store2): New.
11829 (thunderx2t99_asimd_store3): New.
11830 (thunderx2t99_asimd_store4): New.
11832 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
11834 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
11835 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
11837 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
11838 Segher Boessenkool <segher@kernel.crashing.org>
11841 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
11844 2018-05-17 Richard Biener <rguenther@suse.de>
11846 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
11847 for pruning loop and prune defs feeding only already visited PHIs.
11849 2018-05-17 Richard Biener <rguenther@suse.de>
11851 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
11853 2018-05-17 Bin Cheng <bin.cheng@arm.com>
11854 Richard Biener <rguenther@suse.de>
11856 PR tree-optimization/85793
11857 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
11858 for VMAT_ELEMENTWISE.
11860 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11862 * internal-fn.h (lookup_internal_fn): Declare
11863 * internal-fn.c (lookup_internal_fn): New function.
11864 * gimple.c (gimple_build_call_from_tree): Handle calls to
11865 internal functions.
11866 * gimple-pretty-print.c (dump_gimple_call): Print "." before
11867 internal function names.
11868 * tree-pretty-print.c (dump_generic_node): Likewise.
11869 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
11871 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11873 * gimple-fold.h (gimple_build): Make the function forms take
11874 combined_fn rather than built_in_function.
11875 (gimple_simplify): Likewise.
11876 * gimple-match-head.c (gimple_simplify): Likewise.
11877 * gimple-fold.c (gimple_build): Likewise.
11878 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
11879 rather than gimple_build_call_internal.
11880 (get_initial_defs_for_reduction): Likewise.
11881 (vect_create_epilog_for_reduction): Likewise.
11882 (vectorizable_live_operation): Likewise.
11884 2018-05-17 Martin Liska <mliska@suse.cz>
11886 * gimple-ssa-sprintf.c (format_directive): Do not use
11887 space in between 'G_' and '('.
11889 2018-05-17 Jakub Jelinek <jakub@redhat.com>
11892 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
11893 even if the mask is not all ones.
11896 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
11898 (ix86_gimple_fold_builtin): Likewise.
11901 * config/i386/i386.c: Include tree-vector-builder.h.
11902 (ix86_vector_shift_count): New function.
11903 (ix86_fold_builtin): Fold shift builtins by scalar count.
11904 (ix86_gimple_fold_builtin): Likewise.
11906 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
11907 _mm512_setzero): New intrinsics.
11909 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
11910 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11912 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
11913 code generation for cases where splatting a value is not useful.
11914 * simplify-rtx.c (simplify_ternary_operation): Simplify
11915 vec_merge across a vec_duplicate and a paradoxical subreg forming
11916 a vector mode to a vec_concat.
11918 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
11920 * config.gcc: Support "goldmont-plus".
11921 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11923 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11924 PROCESSOR_GOLDMONT_PLUS.
11925 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
11926 (processor_target_table): Add "goldmont-plus".
11927 (PTA_GOLDMONT_PLUS): Define.
11928 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
11929 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
11930 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
11931 (fold_builtin_cpu): Add "goldmont-plus".
11932 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
11933 (ix86_option_override_internal): Add "goldmont-plus".
11934 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
11935 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
11936 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
11937 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
11939 2018-05-17 Richard Biener <rguenther@suse.de>
11941 PR tree-optimization/85757
11942 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
11943 remove defs that only feed that PHI from further processing.
11945 2018-05-16 Jim Wilson <jimw@sifive.com>
11947 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
11949 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
11951 2018-05-16 Mark Wielaard <mark@klomp.org>
11953 * dwarf2out.c (count_index_strings): New function.
11954 (output_indirect_strings): Call count_index_strings and generate
11955 header for dwarf_version >= 5.
11957 2018-05-16 Mark Wielaard <mark@klomp.org>
11959 * dwarf2out.c (dwarf_FORM): New function.
11960 (set_indirect_string): Use dwarf_FORM.
11961 (reset_indirect_string): Likewise.
11962 (size_of_die): Likewise.
11963 (value_format): Likewise.
11964 (output_die): Likewise.
11965 (add_skeleton_AT_string): Likewise.
11966 (output_macinfo_op): Likewise.
11967 (index_string): Likewise.
11968 (output_index_string_offset): Likewise.
11969 (output_index_string): Likewise.
11970 (count_index_strings): Likewise.
11972 2018-05-16 Carl Love <cel@us.ibm.com>
11974 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11975 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
11977 2018-05-16 Martin Jambor <mjambor@suse.cz>
11979 * ipa-prop.c (ipa_free_all_edge_args): Remove.
11980 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
11982 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
11984 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
11985 (fnma<mode>4): Likewise.
11986 (fms<mode>4): Likewise.
11987 (fnms<mode>4): Likewise.
11988 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
11989 (aarch64_fnma<mode>4): Likewise.
11990 (aarch64_fms<mode>4): Likewise.
11991 (aarch64_fnms<mode>4): Likewise.
11992 (aarch64_fnmadd<mode>4): Likewise.
11994 2018-05-16 Jason Merrill <jason@redhat.com>
11996 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
11998 2018-05-16 Richard Biener <rguenther@suse.de>
12000 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12001 (dump_stmt_cost): Declare.
12002 (add_stmt_cost): Dump cost we add.
12003 (add_stmt_costs): New function.
12004 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12005 No longer exported.
12006 (vect_analyze_stmt): Adjust prototype.
12007 (vectorizable_condition): Likewise.
12008 (vectorizable_live_operation): Likewise.
12009 (vectorizable_reduction): Likewise.
12010 (vectorizable_induction): Likewise.
12011 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12012 cost vector to pass to vectorizable_ and record afterwards.
12013 (vect_model_reduction_cost): Take cost vector argument and adjust.
12014 (vect_model_induction_cost): Likewise.
12015 (vectorizable_reduction): Likewise.
12016 (vectorizable_induction): Likewise.
12017 (vectorizable_live_operation): Likewise.
12018 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12019 SLP_TREE_NUMBER_OF_VEC_STMTS.
12020 (vect_analyze_slp_cost_1): Remove.
12021 (vect_analyze_slp_cost): Likewise.
12022 (vect_slp_analyze_node_operations): Take visited args and
12023 a target cost vector. Avoid processing already visited stmt sets.
12024 (vect_slp_analyze_operations): Use a local cost vector to gather
12025 costs and register those of non-discarded instances.
12026 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12027 (vect_schedule_slp_instance): Remove copying of
12028 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12030 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12031 adding cost. Record cost entry location.
12032 (vect_prologue_cost_for_slp_op): Function to compute cost of
12033 a constant or invariant generated for SLP vect in the prologue,
12034 split out from vect_analyze_slp_cost_1.
12035 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12036 (vect_model_promotion_demotion_cost): Likewise.
12037 (vect_model_store_cost): Likewise, make static.
12038 (vect_model_load_cost): Likewise.
12039 (vectorizable_bswap): Add cost vector arg and adjust.
12040 (vectorizable_call): Likewise.
12041 (vectorizable_simd_clone_call): Likewise.
12042 (vectorizable_conversion): Likewise.
12043 (vectorizable_assignment): Likewise.
12044 (vectorizable_shift): Likewise.
12045 (vectorizable_operation): Likewise.
12046 (vectorizable_store): Likewise.
12047 (vectorizable_load): Likewise.
12048 (vectorizable_condition): Likewise.
12049 (vectorizable_comparison): Likewise.
12050 (can_vectorize_live_stmts): Likewise.
12051 (vect_analyze_stmt): Likewise.
12052 (vect_transform_stmt): Adjust calls to vectorizable_*.
12053 * tree-vectorizer.c: Include gimple-pretty-print.h.
12054 (dump_stmt_cost): New function.
12056 2018-05-16 Richard Biener <rguenther@suse.de>
12058 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12059 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12060 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12061 (check_name): New callback.
12062 (dse_classify_store): Track cycles via a visited bitmap of PHI
12063 defs and simplify handling of in-loop and across loop dead stores
12064 and properly fail for loop-variant refs. Handle byte-tracking with
12065 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12068 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12070 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12071 (vect_get_mask_type_for_stmt): Likewise.
12072 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12074 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12075 to determine the statement's vector type and the vector type that
12076 should be used for calculating nunits. Deal with cases in which
12077 the type has to be deferred.
12078 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12079 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12080 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12081 (vect_determine_vf_for_stmt): New functions, split out from...
12082 (vect_determine_vectorization_factor): ...here.
12083 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12084 (vect_get_mask_type_for_stmt): New functions, split out from
12085 vect_determine_vectorization_factor.
12087 2018-05-16 Richard Biener <rguenther@suse.de>
12089 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12090 verify the [VEC_]COND_EXPR embedded comparison.
12092 2018-05-15 Martin Sebor <msebor@redhat.com>
12094 PR tree-optimization/85753
12095 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12096 RECORD_TYPE in addition to ARRAY_TYPE.
12098 2018-05-15 Martin Sebor <msebor@redhat.com>
12100 PR middle-end/85643
12101 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12103 2018-05-15 Richard Biener <rguenther@suse.de>
12105 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12106 add by_clobber_p one. Change algorithm to collect all defs
12107 representing uses we need to walk and try reducing them to
12108 a single one before failing.
12109 (dse_dom_walker::dse_optimize_stmt): Adjust.
12111 2018-05-13 Mark Wielaard <mark@klomp.org>
12113 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12114 (size_of_loc_descr): Likewise.
12115 (output_loc_operands): Likewise.
12116 (output_loc_operands_raw): Likewise.
12117 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12118 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12119 (hash_loc_operands): Likewise.
12120 (compare_loc_operands): Likewise.
12122 2018-05-14 Mark Wielaard <mark@klomp.org>
12124 * dwarf2out.c (count_index_addrs): New function.
12125 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12127 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12129 PR tree-optimization/83648
12130 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12131 return value as malloc candidate.
12133 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12136 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12137 param as true in call to suggest_attribute.
12139 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12141 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12142 -mreadonly-in-sdata.
12144 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12146 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12148 (aarch64_crypto_aesd_fused): Likewise.
12150 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12152 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12153 (movsi_aarch64): Likewise.
12154 (load_pairsi): Likewise.
12155 (load_pairdi): Likewise.
12156 (store_pairsi): Likewise.
12157 (store_pairdi): Likewise.
12158 (load_pairsf): Likewise.
12159 (load_pairdf): Likewise.
12160 (store_pairsf): Likewise.
12161 (store_pairdf): Likewise.
12162 (zero_extend): Likewise.
12163 (trunc): Swap alternatives.
12164 (fcvt_target): Add '?' to prefer w over r.
12166 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12169 * config/i386/i386.md: Disallow non-commutative arithmetics in
12170 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12171 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12172 in the peephole2 before it.
12174 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12176 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12177 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12178 (ix86_handle_option): Handle -mcldemote.
12179 * config.gcc: New header.
12180 * config/i386/cldemoteintrin.h: New file.
12181 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12182 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12184 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12185 OPTION_MASK_ISA_CLDEMOTE.
12186 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12187 (ix86_valid_target_attribute_inner_p): Ditto.
12188 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12189 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12190 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12191 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12192 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12194 * config/i386/i386.opt: Add -mcldemote.
12195 * config/i386/x86intrin.h: New header.
12196 * doc/invoke.texi: Add -mcldemote.
12198 2018-05-14 Richard Biener <rguenther@suse.de>
12200 * doc/match-and-simplify.texi: Adjust :s documentation.
12202 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12204 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12205 intended memcpy size.
12206 (REORDER_45): Likewise.
12208 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12210 * sort.cc: New file.
12211 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12212 * vec.c (qsort_chk): Use gcc_qsort.
12213 * Makefile.in (OBJS-libcommon): Add sort.o.
12214 (build/sort.o): New target. Use it...
12215 (BUILD_RTL): ... here, and...
12216 (build/gencfn-macros): ... here, and...
12217 (build/genmatch): ... here.
12219 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12220 Chung-Ju Wu <jasonwucj@gmail.com>
12222 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12223 * config/nds32/nds32-graywolf.md: New file.
12224 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12225 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12227 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12228 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12229 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12230 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12231 * config/nds32/pipelines.md: Include n15 settings.
12233 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12234 Chung-Ju Wu <jasonwucj@gmail.com>
12236 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12237 * config/nds32/nds32-n13.md: New file.
12238 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12239 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12241 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12242 * config/nds32/nds32.md (pipeline_model): Add n13.
12243 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12244 * config/nds32/pipelines.md: Include n13 settings.
12246 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12247 Chung-Ju Wu <jasonwucj@gmail.com>
12249 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12250 * config/nds32/nds32-n10.md: New file.
12251 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12252 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12254 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12255 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12256 * config/nds32/nds32.md (pipeline_model): Add n10.
12257 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12258 * config/nds32/pipelines.md: Include n10 settings.
12260 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12261 Kito Cheng <kito.cheng@gmail.com>
12262 Chung-Ju Wu <jasonwucj@gmail.com>
12264 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12265 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12266 Add enum values for DSP extension instructions.
12267 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12269 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12270 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12271 New code iterators.
12272 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12273 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12274 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12275 * config/nds32/nds32-intrinsic.md: Likewise.
12276 * config/nds32/nds32_intrinsic.h: Likewise.
12277 * config/nds32/nds32-md-auxiliary.c: Likewise.
12278 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12279 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12280 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12281 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12282 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12283 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12284 TYPE_DMAC in switch statement.
12285 * config/nds32/nds32.c: New checking and implementation for DSP
12286 extension instructions.
12287 * config/nds32/nds32.h: Likewise.
12288 * config/nds32/nds32.md: Likewise.
12289 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12290 * config/nds32/predicates.md: Implement new predicates for DSP
12293 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12295 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12296 Reformat alternatives and attributes so it is easier to identify
12297 which constraints/attributes go with which instruction.
12298 (mov<mode>_hardfloat32, FMOVE64): Likewise.
12299 (mov<mode>_softfloat32, FMOVE64): Likewise.
12300 (mov<mode>_hardfloat64, FMOVE64): Likewise.
12301 (mov<mode>_softfloat64, FMOVE64): Likewise.
12303 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
12305 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12307 (Basic PowerPC Built-in Functions): The new name of the
12308 subsection previously known as "PowerPC Built-in Functions".
12309 (Basic PowerPC Built-in Functions Available on all Configurations):
12311 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12312 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12313 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12314 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12316 2018-05-11 Martin Jambor <mjambor@suse.cz>
12319 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12322 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12325 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12327 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
12329 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12330 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12331 (ix86_handle_option): Handle -mwaitpkg.
12332 * config.gcc: New header.
12333 * config/i386/cpuid.h (bit_WAITPKG): New bit.
12334 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12335 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12337 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12338 OPTION_MASK_ISA_WAITPKG.
12339 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12340 (ix86_option_override_internal): Add PTA_WAITPKG.
12341 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12342 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12343 IX86_BUILTIN_TPAUSE.
12344 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12345 __builtin_ia32_umwait and __builtin_ia32_tpause.
12346 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12347 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12348 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12349 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12350 UNSPECV_TPAUSE): New.
12351 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12352 * config/i386/i386.opt: Add -mwaitpkg.
12353 * config/i386/waitpkgintrin.h: New file.
12354 * config/i386/x86intrin.h: New header.
12355 * doc/invoke.texi: Add -mwaitpkg.
12357 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12360 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12362 (cortex-m0): Use armv6s-m isa.
12363 (cortex-m0plus): Likewise.
12364 (cortex-m1): Likewise.
12365 (cortex-m0.small-multiply): Likewise.
12366 (cortex-m0plus.small-multiply): Likewise.
12367 (cortex-m1.small-multiply): Likewise.
12369 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
12370 Jakub Jelinek <jakub@redhat.com>
12372 PR tree-optimization/85692
12373 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12374 source permute as well.
12376 2018-05-11 Martin Liska <mliska@suse.cz>
12379 * doc/extend.texi: Document LLVM style format for no_sanitize
12382 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12384 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12385 mode_supports_vsx_dform_quad to mode_supports_dq_form.
12386 (mode_supports_vsx_dform_quad): Likewise.
12387 (mode_supports_vmx_dform): Move these functions to be next to the
12388 other mode_supports functions.
12389 (mode_supports_dq_form): Likewise.
12390 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12391 mode_supports_dq_form.
12392 (reg_offset_addressing_ok_p): Likewise.
12393 (offsettable_ok_by_alignment): Likewise.
12394 (rs6000_legitimate_offset_address_p): Likewise.
12395 (legitimate_lo_sum_address_p): Likewise.
12396 (rs6000_legitimize_address): Likewise.
12397 (rs6000_legitimize_reload_address): Likewise.
12398 (rs6000_secondary_reload_inner): Likewise.
12399 (rs6000_preferred_reload_class): Likewise.
12400 (rs6000_output_move_128bit): Likewise.
12402 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12404 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12405 Generate SImode target register for null target.
12406 <case IX86_BUILTIN_XGETBV>: Ditto.
12407 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12408 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12410 2018-05-10 Carl Love <cel@us.ibm.com>
12412 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12413 dcbtt and dcbtstt if operands[2] is 0.
12415 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12418 * config/i386/sse.md (usadv64qi): New expander.
12420 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
12422 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12423 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12424 -maltivec=be support.
12425 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12426 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12427 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12428 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12429 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12430 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12431 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12432 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12433 altivec_vsumsws): Adjust.
12434 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12435 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12436 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12438 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12439 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12440 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12441 (altivec_lve<VI_char>x): Delete expand.
12442 (*altivec_lve<VI_char>x_internal): Rename to...
12443 (altivec_lve<VI_char>x): ... this.
12444 (altivec_lvxl_<mode>): Delete expand.
12445 (*altivec_lvxl_<mode>_internal): Rename to ...
12446 (altivec_lvxl_<mode>): ... this.
12447 (altivec_stvxl_<mode>): Delete expand.
12448 (*altivec_stvxl_<mode>_internal): Rename to ...
12449 (altivec_stvxl_<mode>): ... this.
12450 (altivec_stve<VI_char>x): Delete expand.
12451 (*altivec_stve<VI_char>x_internal): Rename to ...
12452 (altivec_stve<VI_char>x): ... this.
12453 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12454 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12455 reduc_plus_scal_<mode>): Adjust.
12456 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12458 (rs6000_cpu_cpp_builtins): Adjust.
12459 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12460 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12461 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12462 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12463 -maltivec=be support.
12464 (rs6000_split_vec_extract_var): Adjust.
12465 (rs6000_split_v4si_init): Adjust.
12466 (swap_selector_for_mode): Delete.
12467 (altivec_expand_lvx_be, altivec_expand_stvx_be,
12468 altivec_expand_stvex_be): Delete.
12469 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12470 -maltivec=be support.
12471 (rs6000_gimple_fold_builtin): Ditto.
12472 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12474 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12475 (TARGET_DIRECT_MOVE_64BIT): Adjust.
12476 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12477 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12478 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12479 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12480 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12481 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12482 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12483 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12484 anonymous split): Adjust.
12485 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12486 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12488 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12490 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12491 when --with-gxx-include-dir is also specified.
12492 * configure: Regenerate.
12494 2018-05-09 Jim Wilson <jimw@sifive.com>
12497 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12498 * config/riscv/t-withmultilib: New.
12499 * config/riscv/withmultilib.h: New.
12500 * doc/install.texi: Document RISC-V --with-multilib-list support.
12502 2018-05-09 Richard Biener <rguenther@suse.de>
12504 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12506 (vect_bb_vectorization_profitable_p): Adjust. Compute
12507 actual scalar cost using the cost vector and the add_stmt_cost
12510 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12512 PR rtl-optimization/85645
12513 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12514 in the REG_CFA_REGISTER note for LR, don't leave it empty.
12516 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12518 PR rtl-optimization/85645
12519 * shrink-wrap.c (spread_components): Return a boolean saying if
12520 anything was changed.
12521 (try_shrink_wrapping_separate): Iterate spread_components until
12522 nothing changes anymore.
12524 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12526 PR rtl-optimization/85645
12527 * regrename.c (build_def_use): Also kill the chains that include the
12528 destination of a REG_CFA_REGISTER note.
12530 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12532 PR rtl-optimization/85645
12533 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12534 insn that has a REG_CFA_REGISTER note.
12536 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
12538 * cfgexpand.c (expand_clobber): New function.
12539 (expand_gimple_stmt_1): Use it.
12540 * tree-vect-stmts.c (vect_clobber_variable): New function,
12542 (vectorizable_simd_clone_call): ...here.
12543 (vectorizable_store): Emit a clobber either side of an
12544 IFN_STORE_LANES sequence.
12545 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12547 2018-05-09 Tom de Vries <tom@codesourcery.com>
12550 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12551 (define_insn "trap_if_false"): Add exit after trap.
12553 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
12555 PR rtl-optimization/85638
12556 * bb-reorder.c: Include common/common-target.h.
12557 (create_forwarder_block): New function extracted from...
12558 (fix_up_crossing_landing_pad): ...here. Rename into...
12559 (dw2_fix_up_crossing_landing_pad): ...this.
12560 (sjlj_fix_up_crossing_landing_pad): New function.
12561 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12562 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12563 from both partitions and exit the loop after one iteration.
12565 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12568 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12570 (Basic PowerPC Built-in Functions): The new name of the
12571 subsection previously known as "PowerPC Built-in Functions".
12572 (Basic PowerPC Built-in Functions Available on all Configurations):
12574 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12576 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12578 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12580 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12583 2018-05-08 Jim Wilson <jimw@sifive.com>
12585 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12586 (LD_EMUL_SUFFIX): New.
12587 (LINK_SPEC): Use it.
12589 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12591 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12593 (Basic PowerPC Built-in Functions): The new name of the
12594 subsection previously known as "PowerPC Built-in Functions".
12595 (Basic PowerPC Built-in Functions Available on all Configurations):
12597 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12599 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12601 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12603 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12606 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12609 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12610 after cmpelim optimization.
12612 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
12614 * config.gcc: Support "goldmont".
12615 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12616 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12617 PROCESSOR_GOLDMONT.
12618 * config/i386/i386.c (m_GOLDMONT): Define.
12619 (processor_target_table): Add "goldmont".
12620 (PTA_GOLDMONT): Define.
12621 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12622 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12623 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12624 (fold_builtin_cpu): Add "goldmont".
12625 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12626 (ix86_option_override_internal): Add "goldmont".
12627 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12628 (processor_type): Add PROCESSOR_GOLDMONT.
12629 * config/i386/i386.md: Add CPU "glm".
12630 * config/i386/glm.md: New file.
12631 * config/i386/x86-tune.def: Add m_GOLDMONT.
12632 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12634 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12637 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12639 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12640 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
12641 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
12644 * config/i386/i386.c (ix86_fold_builtin): Handle
12645 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12648 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12649 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12651 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
12654 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12655 (check_arch): Likewise.
12656 (check_fpu): Return the result rather than printing it.
12657 (end arch): Fix operator precedence.
12658 (end cpu): Likewise.
12659 (END): Print the result from check_fpu.
12661 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12662 Alan Hayward <alan.hayward@arm.com>
12663 David Sherwood <david.sherwood@arm.com>
12665 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12666 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12667 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12668 (*fcmuo<mode>_and): New patterns.
12670 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12672 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12673 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12674 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12675 (cmp_op, sve_imm_con): New code attributes.
12676 (SVE_COND_INT_CMP, imm_con): Delete.
12677 (cmp_op): Remove above unspecs from int attribute.
12678 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12680 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
12681 comparison-specific unspecs.
12682 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12683 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12684 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12685 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12686 (*vec_fcm<cmp_op><mode>): Rename to...
12687 (*fcm<cmp_op><mode>): ...this and adjust likewise.
12688 (*vec_fcmuo<mode>): Rename to...
12689 (*fcmuo<mode>): ...this and adjust likewise.
12690 (*pred_fcm<cmp_op><mode>): New pattern.
12691 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12692 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12694 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12696 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12697 (aarch64_emit_sve_predicated_cond): New function.
12698 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12699 (aarch64_emit_unspec_cond_or): Replace with...
12700 (aarch64_emit_sve_or_conds): ...this new function. Use
12701 aarch64_emit_sve_ptrue_op for the individual comparisons and
12702 aarch64_emit_binop to OR them together.
12703 (aarch64_emit_inverted_unspec_cond): Replace with...
12704 (aarch64_emit_sve_inverted_cond): ...this new function. Use
12705 aarch64_emit_sve_ptrue_op for the comparison and
12706 aarch64_emit_unop to invert the result.
12707 (aarch64_expand_sve_vec_cmp_float): Update after the above
12708 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
12710 2018-05-07 Nathan Sidwell <nathan@acm.org>
12712 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12713 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12714 (Backwards Compatibility): Likewise.
12716 2018-05-07 Luis Machado <luis.machado@linaro.org>
12720 2018-05-07 Luis Machado <luis.machado@linaro.org>
12722 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12723 <prefetch_dynamic_strides>: New const bool field.
12724 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12725 prefetch_dynamic_strides.
12726 (exynosm1_prefetch_tune): Likewise.
12727 (thunderxt88_prefetch_tune): Likewise.
12728 (thunderx_prefetch_tune): Likewise.
12729 (thunderx2t99_prefetch_tune): Likewise.
12730 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12732 (aarch64_override_options_internal): Update to set
12733 PARAM_PREFETCH_DYNAMIC_STRIDES.
12734 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12735 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12736 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12737 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12738 prefetch-dynamic-strides setting.
12740 2018-05-07 Luis Machado <luis.machado@linaro.org>
12742 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12743 <minimum_stride>: New const int field.
12744 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12745 minimum_stride field.
12746 (exynosm1_prefetch_tune): Likewise.
12747 (thunderxt88_prefetch_tune): Likewise.
12748 (thunderx_prefetch_tune): Likewise.
12749 (thunderx2t99_prefetch_tune): Likewise.
12750 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12751 (aarch64_override_options_internal): Update to set
12752 PARAM_PREFETCH_MINIMUM_STRIDE.
12753 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12754 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12755 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12756 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12757 stride is constant and is below the minimum stride threshold.
12759 2018-05-07 Luis Machado <luis.machado@linaro.org>
12761 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
12764 2018-05-07 Luis Machado <luis.machado@linaro.org>
12766 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12767 <prefetch_dynamic_strides>: New const bool field.
12768 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12769 prefetch_dynamic_strides.
12770 (exynosm1_prefetch_tune): Likewise.
12771 (thunderxt88_prefetch_tune): Likewise.
12772 (thunderx_prefetch_tune): Likewise.
12773 (thunderx2t99_prefetch_tune): Likewise.
12774 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12776 (aarch64_override_options_internal): Update to set
12777 PARAM_PREFETCH_DYNAMIC_STRIDES.
12778 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12779 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12780 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12781 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12782 prefetch-dynamic-strides setting.
12784 2018-05-07 Luis Machado <luis.machado@linaro.org>
12786 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12787 <minimum_stride>: New const int field.
12788 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12789 minimum_stride field.
12790 (exynosm1_prefetch_tune): Likewise.
12791 (thunderxt88_prefetch_tune): Likewise.
12792 (thunderx_prefetch_tune): Likewise.
12793 (thunderx2t99_prefetch_tune): Likewise.
12794 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12795 (aarch64_override_options_internal): Update to set
12796 PARAM_PREFETCH_MINIMUM_STRIDE.
12797 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12798 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12799 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12800 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12801 stride is constant and is below the minimum stride threshold.
12803 2018-05-06 Jakub Jelinek <jakub@redhat.com>
12806 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12807 the type is addressable. Don't force op into register if it has
12810 2018-05-05 Roland McGrath <mcgrathr@google.com>
12813 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12814 any section for which we don't know a specific type it should have,
12815 regardless of name. Previously this was done only for the exact
12816 names ".init_array", ".fini_array", and ".preinit_array".
12817 (default_elf_asm_named_section): Add comment about
12818 relationship with default_section_type_flags and SECTION_NOTYPE.
12819 (get_section): Don't consider it a type conflict if one side has
12820 SECTION_NOTYPE and the other doesn't, as long as neither has the
12821 SECTION_BSS et al used in the default_section_type_flags logic.
12823 2018-05-05 Tom de Vries <tom@codesourcery.com>
12826 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12827 (workaround_barsyncs): New function.
12828 (nvptx_reorg): Use workaround_barsyncs.
12829 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12830 (define_expand "nvptx_membar_cta"): New define_expand.
12831 (define_insn "*nvptx_membar_cta"): New insn.
12833 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
12835 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
12836 To improve optimization opportunities.
12837 * builtin-types.def: The new needed builtin types for the above.
12839 2018-05-04 Richard Biener <rguenther@suse.de>
12841 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
12842 * gimple-ssa-store-merging.c
12843 (imm_store_chain_info::output_merged_store): Remove redundant create,
12844 release split_store vector contents on failure.
12845 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
12846 scalar stmt vector on cache hit.
12848 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
12850 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
12852 * config.gcc (powerpc-xilinx-eabi*): Remove.
12853 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
12855 (fusion_addis_mem_combo_load): Ditto.
12856 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
12858 (rs6000_cpu_cpp_builtins): Ditto.
12859 * config/rs6000/rs6000-linux.c
12860 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
12861 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
12862 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
12864 (rs6000_setup_reg_addr_masks): Ditto.
12865 (rs6000_init_hard_regno_mode_ok): Ditto.
12866 (rs6000_option_override_internal): Ditto.
12867 (legitimate_lo_sum_address_p): Ditto.
12868 (rs6000_legitimize_address): Ditto.
12869 (rs6000_legitimize_reload_address): Ditto.
12870 (rs6000_legitimate_address_p): Ditto.
12871 (abi_v4_pass_in_fpr): Ditto.
12872 (setup_incoming_varargs): Ditto.
12873 (rs6000_gimplify_va_arg): Ditto.
12874 (rs6000_split_multireg_move): Ditto.
12875 (rs6000_savres_strategy): Ditto.
12876 (rs6000_emit_prologue_components): Ditto.
12877 (rs6000_emit_epilogue_components): Ditto.
12878 (rs6000_emit_prologue): Ditto.
12879 (rs6000_emit_epilogue): Ditto.
12880 (rs6000_elf_file_end): Ditto.
12881 (rs6000_function_value): Ditto.
12882 (rs6000_libcall_value): Ditto.
12883 * config/rs6000/rs6000.h: Ditto.
12884 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
12885 (TARGET_MINMAX): ... this. New.
12886 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
12887 * config/rs6000/rs6000.md: Remove Xilinx FP support.
12888 (*movsi_internal1_single): Delete.
12889 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
12890 mfpu=, mxilinx-fpu): Delete.
12891 * config/rs6000/singlefp.h: Delete.
12892 * config/rs6000/sysv4.h: Remove Xilinx FP support.
12893 * config/rs6000/t-rs6000: Ditto.
12894 * config/rs6000/t-xilinx: Delete.
12895 * config/rs6000/titan.md: Adjust for fp_type removal.
12896 * config/rs6000/vsx.md: Remove Xilinx FP support.
12897 (VStype_simple): Delete.
12898 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
12899 * config/rs6000/xfpu.h: Delete.
12900 * config/rs6000/xfpu.md: Delete.
12901 * config/rs6000/xilinx.h: Delete.
12902 * config/rs6000/xilinx.opt: Delete.
12903 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
12904 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
12906 2018-05-04 Tom de Vries <tom@codesourcery.com>
12909 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
12912 2018-05-04 Richard Biener <rguenther@suse.de>
12914 PR middle-end/85627
12915 * tree-complex.c (update_complex_assignment): We are always in SSA form.
12916 (expand_complex_div_wide): Likewise.
12917 (expand_complex_operations_1): Likewise.
12918 (expand_complex_libcall): Preserve EH info of the original stmt.
12919 (tree_lower_complex): Handle removed blocks.
12920 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12921 on complex multiplication and division libcall builtins.
12923 2018-05-04 Richard Biener <rguenther@suse.de>
12925 PR middle-end/85574
12926 * fold-const.c (negate_expr_p): Restrict negation of operand
12927 zero of a division to when we know that can happen without
12929 (fold_negate_expr_1): Likewise.
12931 2018-05-04 Jakub Jelinek <jakub@redhat.com>
12934 * real.h (real_nextafter): Declare.
12935 * real.c (real_nextafter): New function.
12936 * fold-const-call.c (fold_const_nextafter): New function.
12937 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
12938 CASE_CFN_NEXTTOWARD.
12939 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
12940 even when arg1_mode is different from arg0_mode.
12942 2018-05-03 Nathan Sidwell <nathan@acm.org>
12944 * doc/extend.texi (Deprecated Features): Remove
12945 -ffriend-injection.
12946 (Backwards Compatibility): Likewise.
12947 * doc/invoke.texi (C++ Language Options): Likewise.
12948 (C++ Dialect Options): Likewise.
12950 2018-05-03 Jakub Jelinek <jakub@redhat.com>
12953 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
12954 _mm512_mask_mullox_epi64): New intrinsics.
12956 2018-05-03 Tom de Vries <tom@codesourcery.com>
12959 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12960 dump files): Add offload-tree.
12962 2018-05-03 Richard Biener <rguenther@suse.de>
12964 PR tree-optimization/85615
12965 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
12966 to loops not nested in BBs loop father to avoid creating multi-entry
12969 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12971 PR tree-optimization/70291
12972 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
12973 arguments. Change return type to tree. Emit libcall as a new
12974 statement rather than replacing existing one when inplace_p is true.
12975 (expand_complex_multiplication_components): New function.
12976 (expand_complex_multiplication): Expand floating-point complex
12977 multiplication using the above.
12978 (expand_complex_division): Rename inner_type parameter to type.
12979 Update expand_complex_libcall call-site.
12980 (expand_complex_operations_1): Update expand_complex_multiplication
12981 and expand_complex_division call-sites.
12983 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12986 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12987 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12988 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
12989 the highest significant bit of the shift count mask is clear. In
12990 check whether and[sq]i3 is needed verify that all significant bits
12991 of the shift count other than the highest are set.
12993 2018-05-02 Tom de Vries <tom@codesourcery.com>
12996 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
12997 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
12998 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
12999 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13000 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13001 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13002 __builtin_goacc_parlevel_size.
13004 2018-05-02 Richard Biener <rguenther@suse.de>
13006 PR tree-optimization/85597
13007 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13008 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13011 2018-05-02 Tom de Vries <tom@codesourcery.com>
13014 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13015 dump files): Add ltrans-tree.
13017 2018-05-02 Tom de Vries <tom@codesourcery.com>
13020 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13021 dump files): Add wpa-ipa.
13023 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13025 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13026 powerpc*-*-linux*paired* target.
13027 * config/rs6000/750cl.h: Delete.
13028 * config/rs6000/paired.h: Delete.
13029 * config/rs6000/paired.md: Delete.
13030 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13032 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13033 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13034 comment. Remove paired float support.
13035 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13036 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13038 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13039 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13041 * config/rs6000/rs6000.c: Remove paired float support.
13042 (paired_expand_vector_init, paired_expand_vector_move,
13043 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13044 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13045 paired_expand_builtin, paired_expand_predicate_builtin,
13046 paired_init_builtins): Delete.
13047 * config/rs6000/rs6000.h: Remove paired float support.
13048 * config/rs6000/rs6000.md: Remove paired float support.
13049 (move_from_CR_ov_bit): Delete.
13050 * config/rs6000/rs6000.opt (mpaired): Delete.
13051 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13052 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13054 2018-05-02 Richard Biener <rguenther@suse.de>
13056 PR middle-end/85567
13057 * gimplify.c (gimplify_save_expr): When in SSA form allow
13058 SAVE_EXPRs to compute to SSA vars.
13060 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13063 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13064 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13065 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13066 clobber operands[2], instead use a new pseudo. Formatting fixes.
13068 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13070 PR tree-optimization/85586
13071 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13072 exit early for statements in the same group if the accesses are
13075 2018-05-02 Tom de Vries <tom@codesourcery.com>
13078 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13081 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13083 PR tree-optimization/85143
13084 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13086 2018-05-01 Tom de Vries <tom@codesourcery.com>
13089 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13090 not found" error message.
13092 2018-05-01 Tom de Vries <tom@codesourcery.com>
13095 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13096 * vec.c (test_ordered_remove_if): New function.
13097 (vec_c_tests): Call test_ordered_remove_if.
13098 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13099 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13100 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13101 VEC_ORDERED_REMOVE_IF.
13103 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13105 PR tree-optimization/82665
13106 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13107 pointer subtraction where arguments come from a memchr call.
13109 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13111 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13112 --push-state --as-needed and --pop-state instead of --as-needed and
13113 --no-as-needed if ld supports it.
13114 * configure: Regenerated.
13117 * doc/install.texi2html: Replace _002d with - and _002a with * in
13118 generated html files using sed.
13120 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13123 * gcc-rich-location.c (blank_line_before_p): New function.
13124 (use_new_line): New function.
13125 (gcc_rich_location::add_fixit_insert_formatted): New function.
13126 * gcc-rich-location.h
13127 (gcc_rich_location::add_fixit_insert_formatted): New function.
13129 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13131 * selftest.c (assert_streq): Rename "expected" and "actual" to
13132 "val1" and "val2". Extend NULL-handling to cover both inputs
13133 symmetrically, while still requiring both to be non-NULL for a pass.
13134 * selftest.h (assert_streq): Rename "expected" and "actual" to
13136 (ASSERT_EQ): Likewise.
13137 (ASSERT_EQ_AT): Likewise.
13138 (ASSERT_KNOWN_EQ): Likewise.
13139 (ASSERT_KNOWN_EQ_AT): Likewise.
13140 (ASSERT_NE): Likewise.
13141 (ASSERT_MAYBE_NE): Likewise.
13142 (ASSERT_MAYBE_NE_AT): Likewise.
13143 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13144 the assertion to pass.
13145 (ASSERT_STREQ_AT): Likewise.
13147 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13149 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13150 interaction with -pie.
13152 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13154 * selftest.h: Fix alphabetization of per-source-file selftest
13157 2018-04-30 Jason Merrill <jason@redhat.com>
13159 PR c++/61982 - dead stores to destroyed objects.
13160 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13163 2018-04-30 Jason Merrill <jason@redhat.com>
13165 * tree.c (build_clobber): New.
13166 * tree.h: Declare it.
13167 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13169 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13171 * diagnostic-show-locus.c (layout::layout): Update for
13172 location_get_source_line returning a char_span.
13173 (struct char_span): Move to input.h.
13174 (struct correction): Update for fields in char_span becoming
13176 (struct source_line): Update for location_get_source_line
13177 returning a char_span.
13178 (layout::print_line): Likewise.
13179 * edit-context.c (edited_file::print_content): Likewise.
13180 (edited_file::print_diff_hunk): Likewise.
13181 (edited_file::print_run_of_changed_lines): Likewise.
13182 (edited_file::get_num_lines): Likewise.
13183 (edited_line::edited_line): Likewise.
13184 * final.c (asm_show_source): Likewise.
13185 * input.c (location_get_source_line): Convert return type
13186 from const char * to char_span, losing the final "line_len"
13188 (dump_location_info): Update for the above.
13189 (get_substring_ranges_for_loc): Likewise. Use a char_span
13190 when handling the literal within the line.
13191 (test_reading_source_line): Update for location_get_source_line
13192 returning a char_span.
13193 * input.h (class char_span): Move here from
13194 diagnostic-show-locus.c, converting from a struct to a class.
13195 Make data members private.
13196 (char_span::operator bool): New.
13197 (char_span::length): New.
13198 (char_span::get_buffer): New.
13199 (char_span::operator[]): New.
13200 (char_span::subspan): Make const.
13201 (char_span::xstrdup): New.
13202 (location_get_source_line): Convert return type from const char *
13203 to char_span, losing the final "line_size" param.
13205 2018-04-30 Jan Hubicka <jh@suse.cz>
13207 * lto-wrapper.c (ltrans_priorities): New static var.
13208 (cmp_priority): New.
13209 (run_gcc): Read priorities and if doing parallel build order
13210 the Makefile by them.
13212 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13214 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13216 2018-04-30 Richard Biener <rguenther@suse.de>
13218 * tree-cfg.c (verify_address): Remove base argument, add
13219 flag whether to check TREE_ADDRESSABLE and do that.
13220 (verify_expr): Remove.
13221 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13222 (verify_gimple_assign_single): Likewise.
13223 (verify_gimple_switch): Likewise.
13224 (verify_expr_location_1): Dereference tp once. Add (disabled)
13225 piece from verify_expr.
13226 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13228 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13230 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13232 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13234 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13235 (small_data_pattern): Likewise.
13236 (arc_rewrite_small_data): Likewise.
13237 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13238 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13239 (get_symbol_alignment): New function.
13240 (legitimate_small_data_address_p): Likewise.
13241 (legitimate_scaled_address): Update, call
13242 legitimate_small_data_address_p.
13243 (output_sdata): New static variable.
13244 (arc_print_operand): Update how we handle small data operands.
13245 (arc_print_operand_address): Likewise.
13246 (arc_legitimate_address_p): Update, use
13247 legitimate_small_data_address_p.
13248 (arc_rewrite_small_data_p): Remove.
13249 (arc_rewrite_small_data_1): Likewise.
13250 (arc_rewrite_small_data): Likewise.
13251 (small_data_pattern): Likewise.
13252 (compact_sda_memory_operand): Update to use
13253 legitimate_small_data_address_p and get_symbol_alignment.
13254 (prepare_move_operands): Don't rewite sdata pattern.
13255 (prepare_extend_operands): Remove.
13256 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13258 (zero_extendqisi2): Likewise.
13259 (zero_extendhisi2): Likewise.
13260 (extendqihi2): Likewise.
13261 (extendqisi2): Likewise.
13262 (extendhisi2): Likewise.
13263 (addsi3): Likewise.
13264 (subsi3): Likewise.
13265 (andsi3): Likewise.
13266 * config/arc/constraints.md (Usd): Change it to memory constraint.
13268 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13270 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13271 as source of std instructions.
13272 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13273 allow 6-bit constants as source for store instructions.
13274 (movdi_insn): Update instruction pattern to allow 6-bit constants
13275 as source for store instructions.
13277 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13279 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13281 2018-04-30 Nathan Sidwell <nathan@acm.org>
13282 Sandra Loosemore <sandra@codesourcery.com>
13284 * dumpfile.c (dump_open): Allow '-' for stdout.
13285 * doc/invoke.texi (Developer Options): Document dump filename
13286 determination early. Document stdin/stdout selection.
13288 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13290 Microblaze Target: PIC data text relative
13292 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13293 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13295 * config/microblaze/microblaze.h (microblaze_constant_address_p):
13296 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13297 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13298 New addressing mode for data-text relative position indepenedent code.
13299 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13300 'ADDRESS_SYMBOLIC_TXT_REL'.
13301 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13302 (microblaze_legitimate_pic_operand): Exclude function calls from
13303 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13304 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13306 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13307 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13308 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13309 for 'address + offset'.
13310 (microblaze_expand_prologue): Add new function prologue call for
13312 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13313 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13314 table in case of TARGET_PIC_DATA_TEXT_REL.
13315 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13316 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13317 Add new macros 'UNSPEC_TEXT',
13318 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13319 + exclude function calls from 'UNSPEC_PLT' in case of data text
13321 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13322 new target hook for generating address diff vector tables in case of
13324 * doc/tm.texi : Regenerate.
13325 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13326 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13327 of addr diff vector generation.
13328 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13329 target hook definition.
13330 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13331 Add default function for generate_pic_addr_diff_vec -> flag_pic.
13332 * doc/invoke.texi (Add new pic option): Add new microblaze pic
13333 option for data text relative.
13335 2018-04-30 Richard Biener <rguenther@suse.de>
13337 * tree-chrec.h (evolution_function_is_constant_p): Remove
13339 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13341 2018-04-30 Richard Biener <rguenther@suse.de>
13344 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13346 2018-04-30 Richard Biener <rguenther@suse.de>
13348 PR tree-optimization/28364
13349 PR tree-optimization/85275
13350 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13351 copying first exit test.
13353 2018-04-28 Mark Wielaard <mark@klomp.org>
13355 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13356 dwarf_version >= 5.
13357 (dwarf_AT): Handle DW_AT_addr_base.
13358 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13360 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
13363 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13364 (*ashl<dwi>3_doubleword_mask_1): Ditto.
13365 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13366 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13368 2018-04-28 Richard Biener <rguenther@suse.de>
13370 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13371 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13372 to reflect use. Only add interesting stmts.
13374 2018-04-27 Martin Jambor <mjambor@suse.cz>
13377 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13378 the jump function allows for passing through aggregate values.
13380 2018-04-27 David Malcolm <dmalcolm@redhat.com>
13382 * input.h (in_system_header_at): Convert from macro to inline
13384 (from_macro_expansion_at): Likewise.
13385 (from_macro_definition_at): Likewise.
13387 2018-04-27 Jeff Law <law@redhat.com>
13389 * config.gcc: Mark tile* targets as deprecated/obsolete.
13391 2018-04-27 Richard Biener <rguenther@suse.de>
13393 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13396 2018-04-27 Richard Biener <rguenther@suse.de>
13398 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13400 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
13402 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13403 with Yd constraint. Set "preferred_for_speed" attribute from
13404 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13405 with Yd constraint.
13406 (*movdi_internal): Ditto.
13407 (movti_interunit splitters): Remove
13408 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13409 (movdi_interunit splitters): Ditto.
13410 * config/i386/constraints.md (Ye): Remove.
13411 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13413 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13416 * config/aarch64/constraints.md (Usg): Limit to 31.
13417 (Usj): Limit to 63.
13419 2018-04-27 Jakub Jelinek <jakub@redhat.com>
13421 PR tree-optimization/85529
13422 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13423 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13424 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13425 zero extension or masking of the MSB bit.
13426 (optimize_range_tests): Add FIRST_BB argument, pass it through
13427 to optimize_range_tests_var_bound.
13428 (maybe_optimize_range_tests, reassociate_bb): Adjust
13429 optimize_range_tests callers.
13431 2018-04-26 Richard Biener <rguenther@suse.de>
13432 Jakub Jelinek <jakub@redhat.com>
13434 * cgraph.h (symbol_table): Just declare debug method here.
13435 * symtab.c (symbol_table::debug): Define.
13437 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
13439 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13441 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
13443 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13444 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13445 (*movdi_internal): Substitute Yi and Yj constraint with x
13446 and Ym and Yn constraint with y constraint. Update "isa"
13447 attribute and set "preferred_for_speed" attribute from
13448 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13449 (*movsi_internal): Ditto.
13450 (*movdf_internal): Ditto.
13451 (*movsf_internal): Ditto.
13452 (*zero_extendsidi2): Ditto.
13453 * config/i386/sse.md (vec_set<mode>_0): Ditto.
13454 (sse2_loadld): Ditto.
13455 (*vec_extract<ssevecmodelower>_0): Ditto.
13456 (*vec_extractv4si_0_zext_sse4): Ditto.
13457 (vec_concatv2di): Ditto.
13458 (*vec_dup<mode>): Ditto.
13459 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13460 * config/i386/constraints.md (Yi): Remove.
13465 2018-04-26 Nathan Sidwell <nathan@acm.org>
13467 * dumpfile.c (dump_open): New.
13468 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13469 (dump_finish): Detect stdio/stderr by value not name.
13471 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
13473 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13475 2018-04-26 Tom de Vries <tom@codesourcery.com>
13478 * config/nvptx/nvptx.c (verify_neutering_jumps)
13479 (verify_neutering_labels): New function
13480 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13482 2018-04-26 Tom de Vries <tom@codesourcery.com>
13485 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13486 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13489 2018-04-26 Richard Biener <rguenther@suse.de>
13490 Tom de Vries <tom@codesourcery.com>
13493 * lto-streamer-out.c (output_function): Fixup loops if required to match
13494 discovery done in the reader.
13496 2018-04-26 Richard Biener <rguenther@suse.de>
13498 PR tree-optimization/85116
13499 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13500 have a loop exit from the single latch predecessor. Remove
13501 case of header with just condition.
13502 (ch_base::copy_headers): Exclude infinite loops from any
13504 (pass_ch::execute): Record exits.
13506 2018-04-26 Richard Biener <rguenther@suse.de>
13508 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13509 prologue cost vector and pass it to vect_get_load_cost.
13510 (vect_get_peeling_costs_all_drs): Likewise.
13511 (vect_peeling_hash_get_lowest_cost): Likewise.
13512 (vect_enhance_data_refs_alignment): Likewise.
13514 2018-04-26 Richard Biener <rguenther@suse.de>
13516 PR middle-end/85450
13517 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13518 checking of integer<->pointer conversions.
13519 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13520 sign-/zero-extending pointer types.
13521 (expand_omp_for_static_chunk): Likewise.
13523 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
13524 Jean Lee <xiaoyur347@gmail.com>
13526 * config/mips/mips.c (mips_asan_shadow_offset): New function.
13527 (TARGET_ASAN_SHADOW_OFFSET): Define.
13528 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13529 true for -fsanitize=address.
13531 2018-04-25 Mark Wielaard <mark@klomp.org>
13533 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13536 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13538 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13539 than "alu", remove explicit "memory" and "imm_disp" attributes.
13540 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13542 PR middle-end/85414
13543 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13544 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13545 gen_lowpart_no_emit.
13547 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
13550 * config/i386/i386.c (ix86_expand_builtin): Change memory
13551 operand to XI, extend p0 to Pmode.
13552 * config/i386/i386.md: Change unspec volatile and operand
13553 1 mode to XI, change operand 0 mode to P.
13555 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13557 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13558 GET_MODE_MASK before any checking.
13559 (nds32_can_use_bset_p): Likewise.
13560 (nds32_can_use_btgl_p): Likewise.
13562 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13564 * config/nds32/nds32-doubleword.md: New define_split pattern for
13565 illegal register number.
13567 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13569 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13571 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13573 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13575 2018-04-25 Richard Biener <rguenther@suse.de>
13577 * lto-streamer.h (LTO_major_version): Bump to 8.
13579 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13581 * BASE-VER: Set to 9.0.0.
13583 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
13585 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13586 in __abskf2 and __powikf2.
13588 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13591 * config/aarch64/constraints.md (Usg, Usj): New constraints.
13592 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13593 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13594 Use the above on operand 2. Reindent.
13595 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13597 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13600 * common/config/i386/i386-common.c (ix86_handle_option): Don't
13602 * config/i386/i386.opt (mcet): Removed.
13603 * doc/install.texi: Remove -mcet documentation.
13604 * doc/invoke.texi: Likewise.
13606 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13609 * doc/install.texi: Remove -mcet from bootstrap-cet.
13611 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13614 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13615 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13619 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13620 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13621 containing a CONST_VECTOR.
13623 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
13625 * doc/install.texi: Update newlib dependency for nvptx.
13627 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13630 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13631 instead of INTVAL when shifting x left.
13633 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
13635 PR tree-optimization/85478
13636 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13637 vect_grouped_store_supported for single element vectors.
13639 2018-04-24 Richard Biener <rguenther@suse.de>
13642 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13643 load cost increase to the case of non-constant step.
13645 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13648 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13649 destination if any_malformed_asm.
13651 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
13653 PR middle-end/85496
13654 * expr.c (store_field): In the bitfield case, if the value comes from
13655 a function call and is returned in registers by means of a PARALLEL,
13656 do not change the mode of the temporary unless BLKmode and VOIDmode.
13658 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
13660 PR rtl-optimization/85423
13661 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13662 dependencies to debug insns when the previous insn is non-debug.
13664 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13666 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13667 enums into a single definition.
13668 (fls): Fix predicates and printing.
13671 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13673 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13674 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13675 and short u6 immediate.
13676 (check_if_valid_sleep_operand): Remove.
13677 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13679 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13681 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13682 flag_always_save_lp condition.
13683 * config/nds32/nds32.opt (malways-save-lp): New option.
13685 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13687 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13688 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13689 * config/nds32/nds32.h
13690 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13691 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13693 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13695 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13696 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13698 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13699 Chung-Ju Wu <jasonwucj@gmail.com>
13701 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13703 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13704 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13706 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13708 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13710 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13712 * config/nds32/nds32-protos.h (nds32_data_alignment,
13713 nds32_local_alignment): Declare.
13714 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13715 nds32_local_alignment): New functions.
13716 (TARGET_CONSTANT_ALIGNMENT): Define.
13717 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13719 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13721 * config/nds32/nds32.c
13722 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13723 (TARGET_MODES_TIEABLE_P): Likewise.
13725 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13727 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13728 level Ofast and Og.
13730 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
13731 Chung-Ju Wu <jasonwucj@gmail.com>
13733 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13734 for unaligned access.
13735 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13737 * config/nds32/nds32-intrinsic.md: Likewise.
13738 * config/nds32/nds32_intrinsic.h: Likewise.
13739 * config/nds32/nds32.h (nds32_builtins): Likewise.
13740 * config/nds32/nds32.opt (munaligned-access): New option.
13741 * config/nds32/nds32.c (nds32_asm_file_start): Display
13742 flag_unaligned_access status.
13744 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13746 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
13747 -mno-relax is present.
13748 * config/riscv/linux.h (LINK_SPEC): Ditto.
13750 2018-04-20 Martin Sebor <msebor@redhat.com>
13753 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
13755 (gimple_fold_builtin_stxcpy_chk): Same.
13756 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
13758 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
13761 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
13762 __powikf2 when long double is IEEE 128-bit.
13764 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13766 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
13767 step to make sure stack always aligned.
13769 2018-04-20 Carl Love <cel@us.ibm.com>
13772 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13773 size check for arg0.
13775 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
13776 Tom de Vries <tom@codesourcery.com>
13779 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13780 Emit insns for calls too.
13781 (nvptx_find_par): Always look for worker-level predecessor insn.
13782 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
13784 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13785 (nvptx_process_pars): Propagate frames for calls.
13787 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
13790 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13792 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13793 (ix86_handle_option): Don't handle OPT_mibt.
13794 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13796 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13798 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13799 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13800 (ix86_target_macros): Define __CET__ with flag_cf_protection
13801 for -fcf-protection.
13802 * config/i386/i386.c (isa2_opts): Remove -mibt.
13803 * config/i386/i386.h (TARGET_IBT): Removed.
13804 (TARGET_IBT_P): Likewise.
13805 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13806 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13807 * config/i386/i386.opt (mcet): Update help message.
13808 (mshstk): Likewise.
13810 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
13811 -mcet as an alias for -mshstk.
13813 2018-04-20 Richard Biener <rguenther@suse.de>
13815 PR middle-end/85475
13816 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13817 complexity by forcing a single use of the multiply operand.
13819 2018-04-20 Martin Jambor <mjambor@suse.cz>
13822 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13823 recursion dependency to only apply to non-clones.
13825 2018-04-20 Martin Jambor <mjambor@suse.cz>
13828 * ipa-cp.c (create_specialized_node): Check that clones of
13829 self-recursive edges exist during IPA-CP.
13831 2018-04-19 Toon Moene <toon@moene.org>
13833 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
13836 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13838 PR tree-optimization/85467
13839 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
13840 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
13841 VECTOR_CST element to type.
13843 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13846 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
13847 * config/i386/i386.md (builtin_setjmp_setup): Removed.
13848 (builtin_longjmp): Likewise.
13849 (save_stack_nonlocal): New pattern.
13850 (restore_stack_nonlocal): Likewise.
13852 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13855 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13856 Replace ASM_OUTPUT_LABEL with fprintf.
13858 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13861 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13862 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
13863 * config/i386/i386-c.c (ix86_target_macros_internal): Also
13864 define __IBT__ and __SHSTK__ for -fcf-protection.
13865 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
13867 (ix86_trampoline_init): Likewise.
13868 (x86_output_mi_thunk): Likewise.
13869 (ix86_notrack_prefixed_insn_p): Likewise.
13870 (ix86_option_override_internal): Don't disallow -fcf-protection.
13871 * config/i386/i386.md (rdssp<mode>): Also enable for
13873 (incssp<mode>): Likewise.
13874 (nop_endbr): Likewise.
13875 * config/i386/i386.opt (mcet): Change help message to built-in
13878 (mshstk): Likewise.
13879 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
13880 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
13881 enable CET built-in functions.
13883 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
13885 * common/config/i386/i386-common.c
13886 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
13887 OPTION_MASK_ISA_MOVDIRI_UNSET,
13888 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
13889 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
13890 * config.gcc (movdirintrin.h): New header.
13891 * config/i386/cpuid.h (bit_MOVDIRI,
13892 bit_MOVDIR64B): New bits.
13893 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
13895 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
13896 (VOID, PVOID, PCVOID)): New function types.
13897 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
13898 __builtin_ia32_directstoreu_u64,
13899 __builtin_ia32_movdir64b): New builtins.
13900 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
13901 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
13903 (ix86_valid_target_attribute_inner_p): Ditto.
13904 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
13905 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
13906 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
13907 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
13908 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
13909 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
13910 (movdiri<mode>, movdir64b_<mode>): New.
13911 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
13912 * config/i386/immintrin.h: Include movdirintrin.h.
13913 * config/i386/movdirintrin.h: New file.
13914 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
13916 2018-04-19 Richard Biener <rguenther@suse.de>
13918 PR middle-end/85455
13919 * cfg.c (clear_bb_flags): When loop state says we have
13920 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13922 2018-04-19 Richard Biener <rguenther@suse.de>
13924 PR tree-optimization/84737
13925 * tree-vect-data-refs.c (vect_copy_ref_info): New function
13926 copying restrict info.
13927 (vect_setup_realignment): Use it.
13928 * tree-vectorizer.h (vect_copy_ref_info): Declare.
13929 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
13930 the first DR to all generated stores.
13931 (vectorizable_load): Likewise for loads.
13933 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13935 PR tree-optimization/85446
13936 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
13937 the integral and pointer types to have the same precision.
13939 * doc/install.texi: Document --disable-cet being the default and
13942 2018-04-18 Martin Liska <mliska@suse.cz>
13944 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
13947 2018-04-18 Martin Liska <mliska@suse.cz>
13950 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13953 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13954 arguments if they are comparable.
13956 2018-04-18 Martin Liska <mliska@suse.cz>
13959 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13962 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13965 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
13968 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
13969 ENDBR after calling __morestack.
13971 2018-04-18 David Malcolm <dmalcolm@redhat.com>
13974 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
13975 by using gcc_base_ver to generate a gcc_driver_version, and use
13976 it when generating GCC_DRIVER_NAME.
13977 * configure: Regenerate.
13979 2018-04-18 Jakub Jelinek <jakub@redhat.com>
13982 * config.gcc: Obsolete powerpc*-*-*spe*.
13984 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13987 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
13988 (stabstr_D): Change type of unum from unsigned int to
13989 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
13992 2018-04-17 Jim Wilson <jimw@sifive.com>
13995 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
13996 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
13997 Set arg_pointer_offset after using pretend_args_size.
13999 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14001 PR rtl-optimization/85431
14002 * dse.c (record_store): Ignore zero width stores.
14005 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14006 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14007 __builtin_stack_restore rather than after it.
14008 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14009 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14010 argument instead of virtual_dynamic_stack_rtx.
14012 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14014 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14016 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14017 Add note to error message to explain internal mapping of overloaded
14018 built-in function name to non-overloaded built-in function name.
14019 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14022 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14025 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14026 where the inputs overlap with the output.
14028 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14030 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14031 (=v, v) alternative and explicit "memory" attribute.
14032 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14033 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14035 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14036 "sselog1" type instead of "sselog".
14037 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14038 "sselog". Remove explicit "memory" attribute.
14039 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14040 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14042 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14043 "sselog1" type instead of "sselog". Remove explicit "memory"
14045 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14046 use "sselog1" type instead of "sselog". Remove explicit "memory"
14048 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14049 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14051 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14052 "sselog1" type instead of "sselog". Remove explicit "memory"
14054 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14055 use "sselog1" type instead of "sselog". Remove explicit "memory"
14059 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14061 PR middle-end/85414
14062 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14065 2018-04-17 Martin Jambor <mjambor@suse.cz>
14068 * ipa-cp.c (create_specialized_node): Call
14069 expand_all_artificial_thunks if necessary.
14071 2018-04-17 Martin Liska <mliska@suse.cz>
14074 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14075 in message, remote space in between '_G' and '('.
14077 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14080 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14081 avx512f_vmcmp<mode>3<round_saeonly_name>,
14082 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14083 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14084 avx512f_rndscale<mode><round_saeonly_name>,
14085 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14086 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14087 Use %<iptr>2 instead of %2 for -masm=intel.
14088 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14089 avx512f_vcvttss2usi<round_saeonly_name>,
14090 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14092 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14093 avx512f_vcvttsd2usi<round_saeonly_name>,
14094 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14095 Use %q1 instead of %1 for -masm=intel.
14096 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14097 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14098 of %3 for -masm=intel.
14099 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14101 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14103 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14105 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14106 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14108 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14110 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14111 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14112 %g1 and one with %0 and %1.
14113 (avx512er_vmrcp28<mode><round_saeonly_name>,
14114 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14115 %1 for -masm=intel.
14116 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14117 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14118 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14119 of %0 and %{%4%} for -masm=intel.
14120 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14121 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14122 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14123 order of %0 and %{%5%}%{z%} for -masm=intel.
14125 2018-04-17 Jan Hubicka <jh@suse.cz>
14128 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14130 2018-04-17 Martin Liska <mliska@suse.cz>
14133 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14134 for target_clone error message. Make default implementation
14135 clone to be a local declaration.
14136 (separate_attrs): Add new argument and check for an empty
14138 (expand_target_clones): Handle it.
14139 (ipa_target_clone): Make redirection just for target_clones
14142 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14143 Tom de Vries <tom@codesourcery.com>
14145 PR middle-end/84955
14146 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14147 tiled basic blocks without omp continue statements.
14149 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14152 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14153 vec_extract expression as having side effects to make sure it gets
14156 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14159 * config/i386/i386.c (get_builtin_code_for_version): Check
14162 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14165 * config.gcc: Support "skylake".
14166 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14168 * config/i386/i386.c (m_SKYLAKE): Define.
14169 (processor_target_table): Add "skylake".
14170 (ix86_option_override_internal): Add "skylake".
14171 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14172 PROCESSOR_CANNONLAKE.
14173 (get_builtin_code_for_version): Fix priority for
14174 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14175 PROCESSOR_SKYLAKE-AVX512.
14176 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14177 (processor_type): Add PROCESSOR_SKYLAKE.
14179 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14180 Jason Merrill <jason@redhat.com>
14183 * convert.c (convert_to_integer_1): Use direct recursion for
14184 enumeral types and types with a precision less than the number
14185 of bits in their mode.
14187 2018-04-16 Julia Koval <julia.koval@intel.com>
14190 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14191 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14193 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14196 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14197 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14198 and -mno-direct-move.
14200 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14203 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14204 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14205 Ensure negative shifts result in {0}.
14207 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14209 PR rtl-optimization/79916
14210 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14211 regs (if any) to define how to gnerate SD moves when LRA is in
14214 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14216 PR rtl-optimization/85393
14217 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14218 * except.c (expand_dw2_landing_pad_for_region): Make static.
14219 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14220 a label and unconditional jump to old_bb, rather than
14221 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14224 PR rtl-optimization/85376
14225 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14226 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14227 instead of a specific value.
14229 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14230 Bin Cheng <bin.cheng@arm.com>
14232 PR tree-optimization/82965
14233 PR tree-optimization/83991
14234 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14235 by_profile_only parameter.
14236 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14237 information if the loop was predicted to iterate too many times.
14238 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14240 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14243 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14246 2018-04-13 Martin Liska <mliska@suse.cz>
14247 Jakub Jelinek <jakub@redhat.com>
14249 PR middle-end/81657
14250 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14251 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14252 * builtins.c (expand_builtin_memory_copy_args): Use
14253 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14254 handle dest_addr == pc_rtx.
14256 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14259 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14260 asked to not generate direct moves.
14261 (fix_trunc<mode>si2_stfiwx): Similar.
14262 (fix_trunc<mode>si2_internal): Similar.
14264 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14267 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14268 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14269 lookup if dest in some wider mode is known to be const0_rtx and
14270 if so, record permanent equivalence for it to be ZERO_EXTEND of
14271 the narrower mode destination.
14273 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14275 * lto-streamer-out.c (output_function): Revert 259346.
14276 * omp-expand.c (expand_oacc_for): Likewise.
14278 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14280 PR rtl-optimization/85354
14281 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14282 * sel-sched.c (sel_global_init): ... here.
14284 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14287 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14288 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14289 mode for PE-COFF targets.
14290 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14291 (i386_pe_asm_lto_end): Likewise.
14292 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14293 (TARGET_ASM_LTO_END): Likewise.
14294 * config/i386/winnt.c (saved_debug_info_level): New static variable.
14295 (i386_pe_asm_lto_start): New function.
14296 (i386_pe_asm_lto_end): Likewise.
14298 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14299 Richard Biener <rguenther@suse.de>
14301 PR middle-end/84955
14302 * lto-streamer-out.c (output_function): Fix CFG loop state before
14304 * omp-expand.c (expand_oacc_for): Handle calls to internal
14305 functions like regular functions.
14307 2018-04-12 Richard Biener <rguenther@suse.de>
14310 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14311 for the early LTO debug to properly generate references to it
14312 during DIE emission. Do not re-use that for the skeleton for
14314 (dwarf2out_early_finish): Likewise.
14316 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14319 * config/i386/sse.md
14320 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14321 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14322 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14323 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14324 and output is a reg, avoid creating invalid lowpart subreg, but
14325 instead split into a 512-bit move. Don't split if not AVX512VL,
14326 input is xmm16+ reg and output is a mem.
14327 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14328 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14329 xmm16+ reg and output is a mem.
14331 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14333 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14334 also for flag_dwarf2_cfi_asm.
14336 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14338 PR rtl-optimization/85342
14339 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14340 a bool scalar var inside of the loop instead. Don't try to update
14341 recog_data.operand after failed apply_change_group.
14343 2018-04-12 Tom de Vries <tom@codesourcery.com>
14346 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14347 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
14348 array with flexible array member as array without given dimension.
14349 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14350 argument for undefined param to true.
14352 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
14355 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14356 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14357 from PowerPC section.
14358 * config/rs6000/sysv4.opt (mcall-): Improve help text.
14359 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14360 help text that is too long.
14361 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14362 help text that is too long.
14363 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14364 help text that is too long.
14366 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
14368 * config/alpha/alpha.md (stack_probe_internal): Rename
14369 from "probe_stack". Update all callers.
14371 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14373 PR rtl-optimization/84566
14374 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14375 sched_macro_fuse_insns.
14377 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14380 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14381 (compute_block_dependences): ... from here.
14383 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14385 PR tree-optimization/85331
14386 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14387 from int to HOST_WIDE_INT.
14389 2018-04-11 Martin Jambor <mjambor@suse.cz>
14392 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14393 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14394 not the same as the source val.
14395 (cgraph_edge_brings_value_p): New parameter.
14396 (gather_edges_for_value): Pass destination value to
14397 cgraph_edge_brings_value_p.
14398 (perhaps_add_new_callers): Likewise.
14399 (get_info_about_necessary_edges): Likewise and exclude values brought
14400 only by self-recursive edges.
14401 (create_specialized_node): Redirect only clones of self-calling edges.
14402 (+self_recursive_pass_through_p): New function.
14403 (find_more_scalar_values_for_callers_subset): Use it.
14404 (find_aggregate_values_for_callers_subset): Likewise.
14405 (known_aggs_to_agg_replacement_list): Removed.
14406 (decide_whether_version_node): Re-calculate known constants for all
14407 remaining context clones.
14409 2018-04-11 Richard Biener <rguenther@suse.de>
14412 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14413 from early DWARF output.
14414 (dwarf2out_early_finish): Output line info unconditionally into
14415 early DWARF and add reference to it.
14417 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14420 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14421 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14422 other than V2DFmode using iptr mode attribute.
14423 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14425 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14427 PR rtl-optimization/84659
14428 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14430 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14433 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14435 (output_loc_list): Pass address of a dummy size variable even in the
14436 locview handling loop.
14437 (index_location_lists): Add comment on why skip_loc_list_entry can't
14440 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
14443 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14446 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
14449 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14450 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14451 and -mstring-compare-inline-limit.
14453 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14456 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14457 for stack clash protection in a register whenever we need it to be in
14460 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14462 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14463 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14465 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14468 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14470 (mlong-double-): Ditto.
14471 * config/rs6000/sysv4.opt (msdata=): Ditto.
14472 (mtls-size=): Ditto.
14474 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14476 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14477 erroneous entries for
14478 "vector int vec_ldl (int, long int *)", and
14479 "vector unsigned int vec_ldl (int, unsigned long int *)".
14480 Add comments and entries for
14481 "vector bool char vec_ldl (int, bool char *)",
14482 "vector bool short vec_ldl (int, bool short *)",
14483 "vector bool int vec_ldl (int, bool int *)",
14484 "vector bool long long vec_ldl (int, bool long long *)",
14485 "vector pixel vec_ldl (int, pixel *)",
14486 "vector long long vec_ldl (int, long long *)",
14487 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14488 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14489 type tree bool_long_long_type_node and correct definition of
14490 bool_V2DI_type_node to make reference to this new type tree.
14491 (rs6000_mangle_type): Replace erroneous reference to
14492 bool_long_type_node with bool_long_long_type_node.
14493 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14494 comments to emphasize sign distinctions for char and int types and
14495 replace RS6000_BTI_bool_long constant with
14496 RS6000_BTI_bool_long_long constant. Also add comment to restrict
14497 use of RS6000_BTI_pixel.
14498 (bool_long_type_node): Remove this macro definition.
14499 (bool_long_long_type_node): New macro definition
14501 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14503 PR rtl-optimization/85300
14504 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14505 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14506 simplify_unary_operation fails.
14508 2018-04-10 Martin Liska <mliska@suse.cz>
14510 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14511 cgraph_edge and ipa_ref.
14513 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14517 * config/i386/sse.md
14518 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14519 computation of the VEC_MERGE selector from mask.
14520 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14521 Fix decoding of the VEC_MERGE selector into mask.
14523 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14525 PR tree-optimization/85286
14526 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14528 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14530 * final.c (final_1): Set insn_last_address as well as
14531 insn_current_address.
14533 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14536 * explow.c (emit_stack_probe): Call validize_mem on memory location
14537 before passing it to gen_probe_stack. Create address operand and
14538 legitimize it for the probe_stack_address case.
14540 2018-04-09 Jan Hubicka <jh@suse.cz>
14543 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14544 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14545 * tree.c (free_lang_data_in_type): Fix handling of binfos;
14547 (free_lang_data): Rebuild type inheritance graph.
14549 2018-04-09 Martin Sebor <msebor@redhat.com>
14551 * invoke.texi (-finline-small-functions): Mention other optimization
14553 (-findirect-inlining, -fpartial-inlining): Same.
14554 (-finline-functions-called-once): Same.
14555 (-freorder-blocks-and-partition): Same.
14557 2018-04-09 Jan Hubicka <jh@suse.cz>
14560 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14561 jumps; choose last target that matches the criteria (i.e.
14562 no partition changes for non-crossing jumps).
14563 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14564 support for redirecting crossing jumps to non-crossing.
14566 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
14568 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14569 also for naked functions.
14571 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
14573 * config/arc/arc.md (add_shift): New pattern.
14574 (add_shift2): Likewise.
14575 (sub_shift): Likewise.
14576 (sub_shift_cmp0_noout): Likewise.
14577 (compare_si_ashiftsi): Likewise.
14578 (xbfu_cmp0_noout): New combine pattern.
14579 (xbfu_cmp0"): Likewise.
14580 (movsi_set_cc_insn): Place the predicable variant first.
14581 (commutative_binary_cmp0_noout): Remove clobber.
14582 (commutative_binary_cmp0): New pattern.
14583 (noncommutative_binary_cmp0): Likewise.
14584 (noncommutative_binary_cmp0_noout): Likewise.
14585 (noncommutative_binary_comparison_result_used): Removed.
14586 (rsub_cmp0): New pattern.
14587 (rsub_cmp0_noout): Likewise.
14588 (extzvsi): Changed, keep only meaningful variants.
14589 (SQH, SEZ): New iterators.
14590 (SQH_postfix): New mode attribute.
14591 (SEZ_prefix): New code attribute.
14592 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14593 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14594 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14595 of numerical value.
14596 (noncommutative_operator): Check the availability of barrel
14599 2018-04-09 Richard Biener <rguenther@suse.de>
14601 PR tree-optimization/85284
14602 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14603 Only use the niter constraining form of simple_iv when the exit
14604 is always executed.
14606 2018-04-09 Tom de Vries <tom@codesourcery.com>
14609 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14610 (define_expand "*memory_barrier"): New define_expand.
14611 (define_insn "memory_barrier"): New insn.
14613 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14615 PR rtl-optimization/80463
14616 PR rtl-optimization/83972
14617 PR rtl-optimization/83480
14619 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14620 correct producer for the insn.
14621 (tidy_control_flow): Fixup seqnos in case of debug insns.
14623 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14625 PR rtl-optimization/83913
14627 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14628 different sched-times when merging exprs.
14630 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14632 PR rtl-optimization/83962
14634 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14635 tidy_fallthru_edge and tidy_control_flow.
14637 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14639 PR rtl-optimization/83530
14641 * sel-sched.c (force_next_insn): New global variable.
14642 (remove_insn_for_debug): When force_next_insn is true, also leave only
14643 next insn in the ready list.
14644 (sel_sched_region): When the region wasn't scheduled, make another pass
14645 over it with force_next_insn set to 1.
14647 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14649 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14651 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14652 for interrupt control.
14653 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14654 functions for interrupt control.
14655 * config/nds32/nds32-intrinsic.md: Likewise.
14656 * config/nds32/nds32_intrinsic.h: Likewise.
14657 * config/nds32/nds32.h (nds32_builtins): Likewise.
14659 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14661 * config/nds32/nds32.c (nds32_init_machine_status,
14662 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14663 strict_aligned_p field.
14664 (nds32_expand_to_rtl_hook): New function.
14665 (TARGET_EXPAND_TO_RTL_HOOK): Define.
14666 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14668 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14669 Chung-Ju Wu <jasonwucj@gmail.com>
14671 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14672 * config/nds32/nds32-n7.md: New file.
14673 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14674 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14676 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14677 * config/nds32/nds32.md (pipeline_model): Add n7.
14678 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14679 * config/nds32/pipelines.md: Include n7 settings.
14681 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14682 Chung-Ju Wu <jasonwucj@gmail.com>
14684 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14685 * config/nds32/nds32-e8.md: New file.
14686 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14687 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14689 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14690 * config/nds32/nds32.md (pipeline_model): Add e8.
14691 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14692 * config/nds32/pipelines.md: Include e8 settings.
14694 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14695 Chung-Ju Wu <jasonwucj@gmail.com>
14697 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14698 * config/nds32/nds32-n8.md: New file.
14699 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14700 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14702 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14703 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14704 * config/nds32/nds32.md (pipeline_model): Add n8.
14705 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14706 * config/nds32/pipelines.md: Include n8 settings.
14708 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14709 Chung-Ju Wu <jasonwucj@gmail.com>
14711 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14712 * config/nds32/nds32-n9-2r1w.md: New file.
14713 * config/nds32/nds32-n9-3r2w.md: New file.
14714 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14715 nds32_register_ports): New or modify for cpu n9.
14716 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14718 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14719 * config/nds32/nds32-utils.c: New file.
14720 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14721 TARGET_MUL_SLOW): Define.
14722 * config/nds32/nds32.md (pipeline_model): New attribute.
14723 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14724 New options that support cpu n9.
14725 * config/nds32/pipelines.md: Include n9 settings.
14726 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14728 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14730 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14731 information if necessary.
14732 (output_cond_branch_compare_zero): Likewise.
14733 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14734 (nds32_target_alignment): Refine for alignment.
14735 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14736 (FUNCTION_BOUNDARY): Modify.
14737 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14739 * config/nds32/nds32.opt (malways-align, malign-functions): New.
14741 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14743 * config/nds32/constants.md (unspec_volatile_element): Add values for
14744 TLB operation and data prefetch.
14745 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14746 functions for TLB operation and data prefetch.
14747 * config/nds32/nds32-intrinsic.md: Likewise.
14748 * config/nds32/nds32_intrinsic.h: Likewise.
14749 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
14750 (nds32_print_operand): Likewise.
14751 * config/nds32/nds32.h (nds32_builtins): Likewise.
14753 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
14754 Andrew Pinski <pinsika@gcc.gnu.org>
14756 PR middle-end/82976
14757 * match.pd: Use constant_boolean_node of correct type instead of
14758 boolean_true_node or boolean_false_node for simplifying
14759 pointer comparisons to zero.
14761 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14763 PR tree-optimization/80021
14764 * tree.c (verify_type_variant): Make error call in verify_variant_match
14765 translatable and remove final full stop.
14767 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14769 * config/nds32/constants.md (unspec_volatile_element): Add
14770 UNSPEC_VOLATILE_EH_RETURN.
14771 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14772 nds32_output_stack_pop): Support dwarf exception handling process.
14773 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14774 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14775 exception handling process.
14776 (nds32_compute_stack_frame): Likewise.
14777 (nds32_return_addr_rtx): Likewise.
14778 (nds32_initial_elimination_offset): Likewise.
14779 (nds32_expand_prologue): Likewise.
14780 (nds32_expand_epilogue): Likewise.
14781 (nds32_dynamic_chain_address): New function.
14782 * config/nds32/nds32.h (machine_function): Add fields for dwarf
14783 exception handling.
14784 (DYNAMIC_CHAIN_ADDRESS): Define.
14785 (EH_RETURN_DATA_REGNO): Define.
14786 (EH_RETURN_STACKADJ_RTX): Define.
14787 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14788 patterns for dwarf exception handling.
14790 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14792 * config/nds32/nds32.h: Clean up obsolete macros.
14794 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14796 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14797 Add enum values for particular instructions.
14798 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14799 particular intrinsic functions.
14800 * config/nds32/nds32-intrinsic.md: Likewise.
14801 * config/nds32/nds32_intrinsic.h: Likewise.
14802 * config/nds32/nds32.h (nds32_builtins): Likewise.
14803 * config/nds32/nds32.md (type): Add pbsad and pbsada.
14804 (btst, ave): New patterns for particular instructions.
14806 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14808 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14809 Add enum values for atomic load/store and memory sync.
14810 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14812 * config/nds32/nds32-intrinsic.md: Likewise.
14813 * config/nds32/nds32_intrinsic.h: Likewise.
14814 * config/nds32/nds32.h (nds32_builtins): Likewise.
14816 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14818 PR tree-optimization/85257
14819 * fold-const.c (native_encode_vector): If not all elts could fit
14820 and off is -1, return 0 rather than offset.
14821 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14822 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14823 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
14824 adjust buffer in native_interpret_expr call.
14826 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14828 * config/nds32/constants.md (unspec_volatile_element): Add cache
14829 control enum values.
14830 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
14831 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
14832 * config/nds32/nds32.c (nds32_cctl_names): New.
14833 (nds32_print_operand): Handle cache control register names.
14834 * config/nds32/nds32.h (nds32_builtins): New enum values.
14835 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
14837 * config/nds32/nds32.md (type): Add mmu.
14838 * config/nds32/pipelines.md (simple_insn): Add mmu.
14840 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14842 * config/nds32/nds32.md (type): Remove call.
14843 * config/nds32/pipelines.md (simple_insn): Likewise.
14845 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14847 * config/nds32/constants.md (unspec_volatile_element): Add
14848 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
14849 UNSPEC_VOLATILE_FMFCFG.
14850 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
14851 description for fmfcfg and fmfcsr.
14852 (bdesc_1arg): Add fmtcsr.
14853 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
14854 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
14855 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
14856 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
14857 unspec_fmfcfg): New patterns.
14858 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
14859 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
14860 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
14861 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
14862 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
14863 __nds32__fmfcfg): Define.
14865 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14867 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
14868 intrinsic register names.
14869 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
14870 intrinsic register enum values and macros.
14872 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14874 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
14875 for load/store addressing form.
14876 (nds32_print_operand_address): Likewise.
14878 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
14881 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
14882 based on LABEL_REF. Remove useless assertion.
14883 (pic_address_needs_scratch): Fix formatting.
14884 (sparc_legitimize_pic_address): Minor tweaks.
14885 (sparc_delegitimize_address): Adjust assertion accordingly.
14886 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
14887 into symbolic_operand.
14888 (movsi_high_pic_label_ref): Likewise.
14889 (movsi_lo_sum_pic_label_ref): Likewise.
14890 (movdi_pic_label_ref): Likewise.
14891 (movdi_high_pic_label_ref): Likewise.
14892 (movdi_lo_sum_pic_label_ref): Likewise.
14894 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
14896 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
14897 custom LIB_SPEC setup.
14899 2018-04-06 Ruslan Bukin <br@bsdpad.com>
14900 Kito Cheng <kito.cheng@gmail.com>
14902 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
14903 * config/riscv/freebsd.h: New.
14905 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14907 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
14908 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
14911 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14912 Kito Cheng <kito.cheng@gmail.com>
14914 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
14915 nds32_output_call, nds32_symbol_binds_local_p): New functions.
14916 * config/nds32/nds32-protos.h (nds32_output_call,
14917 nds32_output_return): Declare.
14918 * config/nds32/nds32.md: Refine all the call and return patterns.
14920 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14923 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
14924 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
14926 PR rtl-optimization/84872
14927 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
14928 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
14929 EDGE_CROSSING edge.
14931 2018-04-06 Tamar Christina <tamar.christina@arm.com>
14933 * expr.c (copy_blkmode_to_reg): Revert 254862.
14934 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
14936 2018-04-06 Richard Biener <rguenther@suse.de>
14938 PR middle-end/85244
14939 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
14940 after seeing a component reference with an adjacent field. Treat
14941 refs to arrays at struct end of external decls similar to
14942 refs to unconstrained commons.
14944 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14947 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
14948 look through SAVE_EXPRs with non-side-effects argument. Adjust
14950 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
14953 2018-04-06 Richard Biener <rguenther@suse.de>
14955 PR middle-end/85180
14956 * alias.c (find_base_term): New wrapper around find_base_term
14957 unwinding CSELIB_VAL_PTR changes.
14958 (find_base_term): Do not restore CSELIB_VAL_PTR during the
14961 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14963 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
14965 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
14966 constant definitions.
14967 ("nop"): lr 0,0 -> nopr r0
14968 ("nop_lr0", "nop_lr1"): New insn definitions.
14970 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14972 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
14973 NDS32_V3PUSH_AVAILABLE_P macro.
14975 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
14976 Chung-Ju Wu <jasonwucj@gmail.com>
14978 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
14979 (nds32*-*-*): Add float and fpu_config into supported_defaults.
14980 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
14981 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
14982 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
14983 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
14984 * config/nds32/constraints.md: New constraints and checking for hard
14985 float configuration.
14986 * config/nds32/iterators.md: New mode iterator and attribute for hard
14987 float configuration.
14988 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
14990 * config/nds32/nds32-fpu.md: New file.
14991 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
14992 deal with hard float code generation.
14993 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
14995 (abi_type, float_reg_number): New enum type.
14996 * config/nds32/nds32-predicates.c: New predicates for hard float.
14997 * config/nds32/nds32-protos.h: Declare functions for hard float.
14998 * config/nds32/nds32.c: Implementation for hard float configuration.
14999 * config/nds32/nds32.h: Definitions for hard float configuration.
15000 * config/nds32/nds32.md: Include hard float machine description and
15001 modify patterns for hard float configuration.
15002 * config/nds32/nds32.opt: New options for hard float configuration.
15003 * config/nds32/predicates.md: New predicates for hard float
15006 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15008 * common/config/nds32/nds32-common.c
15009 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15011 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15013 PR middle-end/85195
15014 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15015 CONSTRUCTOR_ELT (ctor, ...)->value.
15017 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15020 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15022 2018-04-05 Tom de Vries <tom@codesourcery.com>
15025 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15028 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15029 Kito Cheng <kito.cheng@gmail.com>
15031 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15032 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15033 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15034 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15036 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15037 Kito Cheng <kito.cheng@gmail.com>
15039 * config/nds32/constraints.md (Ufe): New memory constraint.
15040 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15041 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15042 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15044 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15045 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15047 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15049 * config/nds32/nds32.md: Use optimize_size in the condition for
15050 alu-shift instructions.
15052 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15054 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15056 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15058 * config/nds32/nds32.md (negsi2): Refine pattern.
15060 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15061 Chung-Ju Wu <jasonwucj@gmail.com>
15063 * config/nds32/iterators.md (shift_rotate): New code iterator.
15064 (shift): New code attribute.
15065 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15066 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15067 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15068 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15069 bit-wise operations.
15070 (andsi3, *andsi3): Ditto.
15071 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15072 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15073 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15074 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15075 nds32_ior_operand, nds32_xor_operand): New predicates.
15077 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15079 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15080 (addsi3, subsi3): ... this.
15082 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15084 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15086 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15088 * config/nds32/nds32.md: Adjust indention.
15090 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15092 * config/nds32/nds32.md (feature): New attribute.
15094 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15096 * config/nds32/nds32.md (subtype): New attribute.
15098 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15101 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15102 expansion to perform a bitwise AND of the argument followed by a
15103 boolean negation of the result.
15105 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15107 PR rtl-optimization/84878
15108 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15109 the basic block. Assert the use reference is not artificial and that
15110 it has an associated insn.
15112 2018-04-04 Michael Matz <matz@suse.de>
15114 * builtins.c (compute_objsize): Pass correct operand
15115 to array_at_struct_end_p.
15117 2018-04-04 Richard Biener <rguenther@suse.de>
15120 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15121 from contexts for DINFO_LEVEL_TERSE and below.
15123 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15125 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15126 resiter_operand condition.
15127 * config/nds32/nds32.md (*move<mode>): Ditto.
15129 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15130 Monk Chiang <sh.chiang04@gmail.com>
15132 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15134 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15136 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15138 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15139 Kito Cheng <kito.cheng@gmail.com>
15141 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15142 nds32_cond_code_str, output_cond_branch,
15143 output_cond_branch_compare_zero, nds32_expand_cbranch,
15144 nds32_expand_cstore, nds32_expand_movcc,
15145 nds32_output_cbranchsi4_equality_zero,
15146 nds32_output_cbranchsi4_equality_reg,
15147 nds32_output_cbranchsi4_equality_reg_or_const_int,
15148 nds32_output_cbranchsi4_greater_less_zero: New functions.
15149 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15150 nds32_expand_cstore, nds32_expand_movcc,
15151 nds32_output_cbranchsi4_equality_zero,
15152 nds32_output_cbranchsi4_equality_reg,
15153 nds32_output_cbranchsi4_equality_reg_or_const_int,
15154 nds32_output_cbranchsi4_greater_less_zero): Declare.
15155 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15156 nds32_rimm11s_operand): New predicates.
15157 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15158 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15161 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15163 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15164 * config/nds32/nds32.md: Ditto.
15165 * config/nds32/pipelines.md: Ditto.
15167 2018-04-04 Richard Biener <rguenther@suse.de>
15169 PR tree-optimization/85168
15170 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15171 propagating abnormals.
15173 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15175 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15177 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15178 Kito Cheng <kito.cheng@gmail.com>
15180 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15181 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15182 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15183 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15184 * config/nds32/nds32.md (sibcall_internal): New.
15185 (sibcall_register): Remove.
15186 (sibcall_immediate): Remove.
15187 (sibcall_value_internal): New.
15188 (sibcall_value_register): Remove.
15189 (sibcall_value_immediate): Remove.
15190 * config/nds32/predicates.md (nds32_general_register_operand): New.
15191 (nds32_call_address_operand): New.
15193 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15195 PR rtl-optimization/85167
15196 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15197 bb_defs if *split_p, instead preinitialize it to NULL.
15199 PR tree-optimization/85156
15200 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15201 evaluating the argument multiple times.
15203 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15205 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15207 (_mm_cvtpd_ps): Likewise.
15208 (_mm_cvttpd_epi32): Likewise.
15209 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15210 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15211 vector, pixel, and bool following altivec.h include.
15213 2018-04-03 Martin Sebor <msebor@redhat.com>
15215 * doc/extend.texi (Common Function Attributes): Clarify.
15216 (const attribute): Likewise.
15217 (pure attribute): Likewise.
15219 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15222 * config/i386/i386.c (ix86_expand_vector_set): Use
15223 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15225 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15227 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15228 instructions when changing rounding bits to preserve precision bits
15229 in the x87 control word.
15231 2018-04-03 Martin Liska <mliska@suse.cz>
15233 PR tree-optimization/82491
15234 * rtl.h (strip_offset_and_add): Replace += suboffset with
15235 poly_uint64 () + suboffset.
15237 2018-03-29 Martin Liska <mliska@suse.cz>
15238 Martin Jambor <mjambor@suse.cz>
15241 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15242 param_type is not an integral or pointer type.
15244 2018-04-03 Richard Biener <rguenther@suse.de>
15246 * sese.h (recompute_all_dominators): Remove.
15248 2018-04-02 Martin Sebor <msebor@redhat.com>
15250 * doc/invoke.texi (-Wrestrict): Fix typos.
15252 2018-04-02 Jim Wilson <jimw@sifive.com>
15254 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15255 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15256 (<optab>di3, <optab>si3_extend): Likewise.
15257 (<optab>si3_mask, <optab>si3_mask_1): New.
15258 (<optab>di3_mask, <optab>di3_mask_1): New.
15259 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15260 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15261 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15263 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15265 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15268 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15270 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15271 (nds32_canonicalize_comparison): New function.
15273 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15274 Kito Cheng <kito.cheng@gmail.com>
15275 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15277 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15278 * config/nds32/constants.md (unspec_volatile_element): Add
15279 UNSPEC_VOLATILE_RELAX_GROUP.
15280 * config/nds32/nds32-relax-opt.c: New file.
15281 * config/nds32/nds32-predicates.c
15282 (nds32_symbol_load_store_p): New function.
15283 * config/nds32/nds32-protos.h
15284 (nds32_symbol_load_store_p): Declare function.
15285 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15286 * config/nds32/nds32.c
15287 (nds32_register_pass): New function to register pass.
15288 (nds32_register_passes): New function to register passes.
15289 * config/nds32/nds32.md (relax_group): New pattern.
15290 * config/nds32/nds32.opt (mrelax-hint): New option.
15291 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15293 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
15295 * config/nds32/t-nds32: Modify files dependency.
15297 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15299 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15300 (PROFILE_HOOK): Define its implementation.
15302 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15304 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15305 type and 32-bit size.
15307 2018-04-01 Jakub Jelinek <jakub@redhat.com>
15309 PR middle-end/85090
15310 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15311 (V_128_256): New mode iterator.
15312 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15313 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15314 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15316 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15317 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15319 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
15322 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15323 NaN inputs correctly.
15325 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
15328 * config/rs6000/vsx.md (??r): New mode attribute.
15329 (*vsx_mov<mode>_64bit): Use it.
15330 (*vsx_mov<mode>_32bit): Likewise.
15332 2018-03-30 Martin Sebor <msebor@redhat.com>
15334 PR tree-optimization/84818
15335 * builtins.c (check_access): Use warning_n.
15337 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15340 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15342 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15345 2018-03-30 Julia Koval <julia.koval@intel.com>
15348 * x86-tune.def (movx, partial_reg_dependency): Enable for
15351 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
15353 PR inline-asm/84985
15354 * lra-constraints.c (process_alt_operands): Move setting
15355 this_alternative_matches below.
15357 2018-03-29 Martin Liska <mliska@suse.cz>
15360 * doc/invoke.texi: Document how LTO works with debug info.
15361 Describe auto-load support of binutils. Mention 'x86-64'
15362 as valid option value of -march option.
15364 2018-03-29 Jakub Jelinek <jakub@redhat.com>
15366 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15369 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15370 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15371 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15374 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15377 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15378 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15379 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15380 for RS6000_BTM_POWERPC64.
15381 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15382 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15383 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15386 (DIVDEU): Likewise.
15388 2018-03-28 Carl Love <cel@us.ibm.com>
15391 2017-09-27 Carl Love <cel@us.ibm.com>
15393 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15394 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15395 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15398 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15400 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15401 instead of __vector bool.
15402 (_mm_max_pu8): Likewise.
15403 (_mm_min_pi16): Likewise.
15405 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15408 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15409 (DIVWEUO): Likewise.
15410 (DIVDEO): Likewise.
15411 (DIVDEUO): Likewise.
15412 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15413 DIVWEUO and DIVDEUO.
15414 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15415 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15416 (div_extend): Likewise.
15417 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15419 (__builtin_divweuo): Likewise.
15420 (__builtin_divdeo): Likewise.
15421 (__builtin_divdeuo): Likewise.
15423 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15426 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15427 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15429 PR tree-optimization/82004
15430 * gimple-match-head.c (optimize_pow_to_exp): New function.
15431 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15432 Don't fold to exp if optimize_pow_to_exp is false.
15434 2018-03-28 Martin Liska <mliska@suse.cz>
15437 * calls.c (initialize_argument_information): Fix trailing space.
15438 * common.opt: Fix typo and provide better explanation for
15439 -fsanitize-coverage option.
15440 * config/i386/i386.opt: Fix typo.
15442 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15443 Martin Liska <mliska@suse.cz>
15446 * gimplify.c (asan_poison_variable): Don't do the check for
15447 gimplify_omp_ctxp here.
15448 (gimplify_decl_expr): Do it here.
15449 (gimplify_target_expr): Likewise.
15451 2018-03-28 Martin Liska <mliska@suse.cz>
15454 * config/i386/i386.c (ix86_function_arg_advance): Do not call
15455 chkp_type_bounds_count if MPX is not enabled.
15457 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
15459 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15461 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
15464 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15465 function to create the function decl for complex long double
15466 multiply and divide for -mabi=ieeelongdouble.
15467 (init_float128_ieee): Call it.
15469 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
15472 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15473 -fcf-protection=branch -mibt.
15474 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15476 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15479 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15480 arm_word_relocations.
15482 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15485 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15486 extern array declarations.
15488 2018-03-27 Richard Biener <rguenther@suse.de>
15490 PR middle-end/84067
15491 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15492 explicit single_use checks.
15494 2018-03-27 Richard Biener <rguenther@suse.de>
15496 PR tree-optimization/85082
15497 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15500 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15502 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15503 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15504 Turn on fasynchronous-unwind-tables and funwind-tables.
15506 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
15509 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15510 (*bmi_blsr_<mode>_ccz): Ditto.
15512 2018-03-26 Tom de Vries <tom@codesourcery.com>
15514 PR tree-optimization/85063
15515 * omp-general.c (offloading_function_p): New function. Factor out
15517 * omp-offload.c (pass_omp_target_link::gate): ... here.
15518 * omp-general.h (offloading_function_p): Declare.
15519 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15520 with attribute omp declare target for offloading functions.
15522 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
15524 PR tree-optimization/84005
15525 * tree-data-ref.h (get_base_for_alignment): Declare.
15526 * tree-data-ref.c (get_base_for_alignment_1): New function.
15527 (get_base_for_alignment): Likewise.
15528 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15529 get_base_for_alignment to find a suitable base object, instead
15530 of always using drb->base_address.
15532 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15534 PR inline-asm/85022
15535 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15536 known size by default.
15538 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
15540 PR inline-asm/85030
15541 * lra-constraints.c (process_alt_operands): Don't match BLKmode
15542 and non BLKmode operands.
15544 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15547 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15548 Clean up attributes.
15550 2018-03-23 Richard Biener <rguenther@suse.de>
15553 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15554 we are going to emit early debug for LTO.
15556 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15558 PR inline-asm/85034
15559 * function.c (match_asm_constraints_1): Don't optimize if input
15560 doesn't satisfy general_operand predicate for output's mode.
15562 PR inline-asm/85022
15563 * alias.c (write_dependence_p): Don't require for x_canonicalized
15564 non-VOIDmode if x has VOIDmode.
15567 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15568 just don't try to optimize it rather than assert it never happens.
15570 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15572 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15573 macro expansions for definition of ST_INTERNAL_<mode> and
15574 LD_INTERNAL_<mode> builtins.
15575 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15577 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15579 (altivec_expand_st_builtin): Likewise.
15580 (altivec_expand_builtin): Remove calls to deleted functions.
15581 (rs6000_address_for_altivec): Delete this function.
15582 * config/rs6000/vector.md: Remove expands for
15583 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15585 2018-03-22 Sudakshina Das <sudi.das@arm.com>
15588 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15589 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15590 re-computing once computed.
15591 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15592 (arm_init_machine_status): Initialize
15593 machine->static_chain_stack_bytes.
15595 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15598 * doc/extend.texi: Add four new prototypes for vec_ld.
15599 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15600 definitions for more logical presentation.
15601 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15602 entries for V1TI variants of __builtin_altivec_ld builtin.
15603 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15604 handling of V1TI variant of LVX icode pattern.
15605 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15606 (rs6000_gimple_fold_builtin): Likewise.
15607 (altivec_init_builtins): Add code to define
15608 __builtin_altivec_lvx_v1ti function.
15610 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15612 PR inline-asm/84941
15613 * function.c (match_asm_constraints_1): Don't do the optimization
15614 if input isn't a REG, SUBREG, MEM or constant.
15616 2018-03-22 Tom de Vries <tom@codesourcery.com>
15618 PR tree-optimization/84956
15619 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15620 bb_has_abnormal_pred.
15622 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15625 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15626 DECL_INITIAL (decl) to decl at the end.
15627 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15628 adjust the comment.
15630 2018-03-21 Joseph Myers <joseph@codesourcery.com>
15632 * doc/extend.texi (__builtin_tgmath): Document when complex
15633 integer types are treated as _Complex _Float64.
15635 2018-03-21 Tom de Vries <tom@codesourcery.com>
15637 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15639 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15641 PR tree-optimization/84960
15642 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15643 if it is ENTRY block, move them into single succ of ENTRY in that case.
15645 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
15647 PR tree-optimization/84811
15648 * poly-int.h (poly_span_traits): Remove the T3 parameter and
15649 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15650 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15651 (known_subrange_p): Update accordingly. Cast each value involved
15652 in the size comparison, rather than casting the result of the
15655 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15657 PR tree-optimization/84982
15658 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15659 by flipping the least significant bit rather than all bits from
15660 bitpos to bitpos + bitsize - 1.
15662 2018-03-21 Nathan Sidwell <nathan@acm.org>
15664 * doc/extend.texi (Deprecated Features): Remove mention of
15665 long-deleted deprecations.
15667 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15670 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15671 * configure: Regenerate.
15673 2018-03-21 Tom de Vries <tom@codesourcery.com>
15675 PR tree-optimization/83126
15676 * tree-parloops.c (num_phis): New function.
15677 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15679 2018-03-21 Nathan Sidwell <nathan@acm.org>
15681 * doc/extend.texi (Deprecated Features): Update deprecated flags,
15682 mention anon-struct/union members and trailing attributes.
15684 2018-03-21 Bin Cheng <bin.cheng@arm.com>
15686 PR tree-optimization/84969
15687 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15688 builtin memset partitions if they set different rhs values.
15690 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15692 PR rtl-optimization/84989
15693 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15694 VEC_DUPLICATE with scalar result mode.
15696 2018-03-21 Martin Liska <mliska@suse.cz>
15699 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15700 not intended return statement.
15702 2018-03-21 Martin Liska <mliska@suse.cz>
15705 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15706 (chkp_find_bound_slots_1): Limit number of iterations.
15708 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
15711 * Minor grammar fixes for x86 options.
15713 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15716 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15717 holding REG_CFA_RESTORE notes, instead turn them into a USE.
15719 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
15722 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15723 (altivec_lvx_<mode>_1op): Likewise.
15724 (altivec_stvx_<mode>_2op): Likewise.
15725 (altivec_stvx_<mode>_1op): Likewise.
15726 (altivec_lvx_<VM2:mode>): New define_expand.
15727 (altivec_stvx_<VM2:mode>): Likewise.
15728 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15729 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15730 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15731 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15732 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15733 (rs6000_gen_lvx): Likewise.
15734 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15735 (altivec_expand_stv_builtin): Likewise.
15736 (altivec_expand_builtin): Likewise.
15737 * config/rs6000/vector.md: Likewise.
15739 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15742 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
15745 2018-03-20 Richard Biener <rguenther@suse.de>
15748 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
15749 sign-conversions as zero, fall back to standard scalar_stmt
15752 2018-03-20 Martin Liska <mliska@suse.cz>
15755 * predict.c (rebuild_frequencies): Handle case when we have
15756 PROFILE_ABSENT, but flag_guess_branch_prob is false.
15758 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15761 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
15762 flag_section_anchors.
15763 * varasm.c (use_blocks_for_decl_p): Remove hack for
15764 dw2_force_const_mem.
15767 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
15769 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
15770 be created, use lowpart_subreg of operands[0] rather than operands[0]
15772 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15773 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15774 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15775 and n constraint instead of aarch64_shift_imm_di and Usd.
15776 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15777 (*aarch64_<optab>_reg_minus<mode>3): ... this.
15779 2018-03-20 Sudakshina Das <sudi.das@arm.com>
15782 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15783 to favor GPR over NEON registers.
15784 (<shift>di3_neon): Likewise.
15786 2018-03-20 Tom de Vries <tom@codesourcery.com>
15789 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15790 (nvptx_process_pars): Emit bar.sync asap and alap.
15792 2018-03-20 Tom de Vries <tom@codesourcery.com>
15795 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15796 seen_label if seen_label is already set.
15798 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15801 * config/i386/i386.c (fold_builtin_cpu): For features above 31
15802 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15803 Use 1U instead of 1. Formatting fixes.
15806 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15807 instead of TREE_TYPE (s1) for the return value.
15809 2018-03-19 Jakub Jelinek <jakub@redhat.com>
15811 PR tree-optimization/84946
15812 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15813 bitsize + bitsize in poly_uint64 rather than poly_int64.
15816 * dwarf2asm.c: Include fold-const.c.
15817 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15818 of decl rather than decl itself.
15820 PR rtl-optimization/84643
15821 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15823 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
15826 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15827 calling assemble_variable.
15829 2018-03-19 Sudakshina Das <sudi.das@arm.com>
15832 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
15833 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
15835 2018-03-19 Jim Wilson <jimw@sifive.com>
15838 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
15839 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
15840 (riscv_first_stack_step): Likewise.
15841 (riscv_option_override): Use STACK_BOUNDARY instead of
15842 MIN_STACK_BOUNDARY.
15843 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
15844 MIN_STACK_BOUNDARY.
15845 (BIGGEST_ALIGNMENT): Set to 128.
15846 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
15847 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
15850 2018-03-19 Richard Biener <rguenther@suse.de>
15852 PR tree-optimization/84933
15853 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
15854 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
15856 2018-03-19 Richard Biener <rguenther@suse.de>
15858 PR tree-optimization/84859
15859 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
15860 (cond_if_else_store_replacement): Perform sinking operation on
15861 single-store BBs regardless of MAX_STORES_TO_SINK setting.
15862 Generalize what a BB with a single eligible store is.
15864 2018-03-19 Richard Biener <rguenther@suse.de>
15866 PR tree-optimization/84929
15867 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
15868 chrec_is_positive against non-chrec arg.
15870 2018-03-19 Tamar Christina <tamar.christina@arm.com>
15873 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
15875 2018-03-18 Martin Liska <mliska@suse.cz>
15877 PR rtl-optimization/84635
15878 * regrename.c (build_def_use): Use matches_mode only when
15881 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
15883 PR tree-optimization/84913
15884 * tree-vect-loop.c (vectorizable_reduction): Don't try to
15885 vectorize chains of COND_EXPRs.
15887 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15889 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
15891 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15893 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
15895 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15897 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
15899 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15900 Kito Cheng <kito.cheng@gmail.com>
15902 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
15903 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
15904 (nds32_adjust_reg_alloc_order): New function.
15905 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
15907 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
15909 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
15910 nds32_print_operand, nds32_print_operand_address): Use
15911 HOST_WIDE_INT_PRINT_DEC instead.
15913 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15915 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
15917 2018-03-17 Jakub Jelinek <jakub@redhat.com>
15920 * config/i386/i386.c (initial_ix86_tune_features,
15921 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15922 unsigned long long.
15923 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
15924 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
15925 rather than 1u << ix86_tune. Formatting fix.
15926 (ix86_option_override_internal): Change ix86_arch_mask from
15927 unsigned int to unsigned HOST_WIDE_INT, initialize to
15928 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
15929 (ix86_function_specific_restore): Likewise.
15931 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15934 * postreload.c (reload_combine_recognize_pattern): Perform
15935 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
15936 truncate_int_for_mode the result for the destination's mode.
15939 * hsa-gen.c (mem_type_for_type): Fix comment typo.
15940 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
15942 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15945 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
15948 * lra-assigns.c (lra_split_hard_reg_for): Don't use
15949 regno_allocno_class_array and sorted_pseudos.
15950 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
15951 insns where regno is used.
15953 2018-03-16 Martin Liska <mliska@suse.cz>
15956 * multiple_target.c (create_dispatcher_calls): Redirect
15957 reference in the symbol table.
15959 2018-03-16 Martin Liska <mliska@suse.cz>
15962 * multiple_target.c (create_dispatcher_calls): Redirect also
15965 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15969 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
15970 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
15971 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
15973 2018-03-16 Julia Koval <julia.koval@intel.com>
15975 * doc/invoke.texi (Skylake Server): Add CLWB.
15976 Cannonlake): Remove CLWB.
15978 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15980 PR tree-optimization/84841
15981 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
15983 (FLOAT_ONE_CONST_TYPE): Define.
15984 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
15985 (sort_by_operand_rank): Put entries with higher constant_type last
15986 rather than first to match comments.
15988 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
15990 * config/nios2/nios2.md (movsi_internal): Fix thinko in
15993 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15996 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
15997 check and use address of target always.
15999 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16002 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16003 (indirect_thunk_bnd_needed): Likewise.
16004 (indirect_thunks_used): Likewise.
16005 (indirect_thunks_bnd_used): Likewise.
16006 (indirect_return_needed): New.
16007 (indirect_return_bnd_needed): Likewise.
16008 (output_indirect_thunk_function): Add a bool argument for
16010 (output_indirect_thunk_function): Don't generate alias for
16011 function return thunk.
16012 (ix86_code_end): Call output_indirect_thunk_function to generate
16013 function return thunks.
16014 (ix86_output_function_return): Set indirect_return_bnd_needed
16015 and indirect_return_needed instead of indirect_thunk_bnd_needed
16016 and indirect_thunk_needed.
16018 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16020 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16021 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16022 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16024 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16025 Paul Hua <paul.hua.gm@gmail.com>
16028 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16030 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16032 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16033 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16034 resp. SFmode cases.
16036 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16039 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16040 instead of GET_MODE_SIZE when comparing Units.
16042 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16045 * varasm.c (hash_section): Return an unchangeble hash value
16046 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16047 Return !aarch64_can_use_per_function_literal_pools_p ().
16049 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16052 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16053 rather than address of cmode as last argument to prepare_cmp_insn.
16055 2018-03-15 Julia Koval <julia.koval@intel.com>
16057 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16058 F_AVX512VNNI, F_AVX512BITALG): New.
16060 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16063 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16064 insn for floating-point loads and stores.
16066 2018-03-14 Carl Love <cel@us.ibm.com>
16068 * config/rs6000/rs6000-c.c: Add macro definitions for
16069 ALTIVEC_BUILTIN_VEC_PERMXOR.
16070 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16071 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16072 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16073 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16075 * config/doc/extend.texi: Add prototypes for vec_permxor.
16077 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16080 * diagnostic-show-locus.c (class layout_point): Convert m_line
16081 from int to linenum_type.
16082 (line_span::comparator): Use linenum "compare" function when
16083 comparing line numbers.
16084 (test_line_span): New function.
16085 (layout_range::contains_point): Convert param "row" from int to
16087 (layout_range::intersects_line_p): Likewise.
16088 (layout::will_show_line_p): Likewise.
16089 (layout::print_source_line): Likewise.
16090 (layout::should_print_annotation_line_p): Likewise.
16091 (layout::print_annotation_line): Likewise.
16092 (layout::print_leading_fixits): Likewise.
16093 (layout::annotation_line_showed_range_p): Likewise.
16094 (struct line_corrections): Likewise for field m_row.
16095 (line_corrections::line_corrections): Likewise for param "row".
16096 (layout::print_trailing_fixits): Likewise.
16097 (layout::get_state_at_point): Likewise.
16098 (layout::get_x_bound_for_row): Likewise.
16099 (layout::print_line): Likewise.
16100 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16101 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16102 * input.c (selftest::test_linenum_comparisons): New function.
16103 (selftest::input_c_tests): Call it.
16104 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16105 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16106 * selftest.h (ASSERT_GT): New macro.
16107 (ASSERT_GT_AT): New macro.
16108 (ASSERT_LT): New macro.
16109 (ASSERT_LT_AT): New macro.
16111 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16113 PR rtl-optimization/84780
16114 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16116 2018-03-14 Martin Liska <mliska@suse.cz>
16118 * tree.c (record_node_allocation_statistics): Use
16119 get_stats_node_kind.
16120 (get_stats_node_kind): New function extracted from
16121 record_node_allocation_statistics.
16122 (free_node): Use get_stats_node_kind.
16124 2018-03-14 Richard Biener <rguenther@suse.de>
16126 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16127 that the value-set of ANTIC_IN doesn't grow.
16130 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16132 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16133 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16135 2018-03-14 Julia Koval <julia.koval@intel.com>
16137 * config.gcc (icelake-client, icelake-server): New.
16139 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16140 (initial_ix86_arch_features): Ditto.
16141 (PTA_SKYLAKE): Add SGX.
16142 (PTA_ICELAKE): Remove.
16143 (PTA_ICELAKE_CLIENT): New.
16144 (PTA_ICELAKE_SERVER): New.
16145 (ix86_option_override_internal): Split up icelake on icelake client and
16147 (get_builtin_code_for_version): Ditto.
16148 (fold_builtin_cpu): Ditto.
16149 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16150 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16151 * config/i386/i386.h (processor_type): Ditto.
16152 * doc/invoke.texi: Ditto.
16154 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16157 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16158 INTEGER_CST offset, add it together with bitpos / 8 and
16159 sign extend based on POINTER_SIZE.
16163 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16166 * config/i386/constraints.md (Yc): New register constraint.
16167 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16168 Use Yc constraint for alternative 2 of operand 0. Remove
16169 preferred_for_speed attribute.
16171 2018-03-14 Richard Biener <rguenther@suse.de>
16173 PR tree-optimization/84830
16174 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16175 with the old one to avoid oscillations.
16177 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16180 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16182 (assign_by_spills): Return a flag of reload assignment failure.
16183 Do not process the reload assignment failures. Do not spill other
16184 reload pseudos if they has the same reg class. Update n if
16186 (lra_assign): Add a return arg. Set up from the result of
16187 assign_by_spills call.
16188 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16189 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16190 usage_insns if it is not NULL.
16191 (spill_hard_reg_in_range): New function.
16192 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16193 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16194 function prototypes.
16195 (lra_assign): Change prototype.
16196 * lra.c (lra): Add code to deal with fails by splitting hard reg
16199 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16201 * config/riscv/riscv.opt (mrelax): New option.
16202 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16203 "norelax" when riscv_mrelax is disabled.
16204 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16206 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16209 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16210 reassociation for int modes.
16212 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16214 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16215 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16217 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16218 * config/aarch64/aarch64-sve.md
16219 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16220 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16221 (*extend<mode><Vwide>2): Rename to...
16222 (aarch64_sve_extend<mode><Vwide>2): ...this.
16223 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16224 renaming the old pattern to...
16225 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16227 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16228 define_expand, renaming the old pattern to...
16229 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16230 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16231 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16232 account when deciding which SVE instruction the optab should use.
16233 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16235 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16237 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16238 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16239 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16240 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16241 (tlsdesc_small_<mode>): Turn a define_expand and use
16242 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16243 (tlsdesc_small_advsimd_<mode>): ...this.
16244 (tlsdesc_small_sve_<mode>): New pattern.
16246 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16248 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16249 (UNSPEC_UMUL_HIGHPART): New constants.
16250 (MUL_HIGHPART): New int iteraor.
16251 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16252 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16254 (*<su>mul<mode>3_highpart): New define_insn.
16256 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16259 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16262 2018-03-13 Martin Liska <mliska@suse.cz>
16265 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16267 (sem_item_optimizer::~sem_item_optimizer): Release it.
16268 (sem_item_optimizer::merge_classes): Register variable aliases.
16269 (sem_item_optimizer::fixup_pt_set): New function.
16270 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16271 * ipa-icf.h: Declare new variables and functions.
16273 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16275 PR middle-end/84834
16276 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16277 integer_pow2p@2 and test integer_pow2p in condition.
16278 (A < 0 ? C : 0): Similarly for @1.
16280 PR middle-end/84831
16281 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16282 characters starting at p contain '\0' character, don't look beyond
16286 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16287 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16290 * reg-stack.c (change_stack): Change update_end var from int to
16291 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16292 also call set_block_for_insn on the newly added insns and rescan.
16295 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16296 on the last operand.
16299 * tree.c (stabilize_reference_1): Return save_expr (e) for
16300 STATEMENT_LIST even if it doesn't have side-effects.
16302 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
16304 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16306 2018-03-12 Renlin Li <renlin.li@arm.com>
16308 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16309 aarch64_output_scalar_simd_mov_immediate.
16311 2018-03-12 Martin Sebor <msebor@redhat.com>
16313 PR tree-optimization/83456
16314 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16315 for perfectly overlapping calls to memcpy.
16316 (gimple_fold_builtin_memory_chk): Same.
16317 (gimple_fold_builtin_strcpy): Handle no-warning.
16318 (gimple_fold_builtin_stxcpy_chk): Same.
16319 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16321 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16323 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16324 parameter. Use it for SFmode.
16325 (rs6000_function_arg_advance_1): Adjust.
16326 (rs6000_function_arg): Adjust.
16327 (rs6000_gimplify_va_arg): Pass false for that new parameter.
16329 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16331 PR rtl-optimization/84169
16332 PR rtl-optimization/84780
16333 * combine.c (can_combine_p): Check for a 2-insn combination whether
16334 the destination register is used between the two insns, too.
16336 2018-03-12 Richard Biener <rguenther@suse.de>
16338 PR tree-optimization/84803
16339 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16340 for refs DR analysis didn't process.
16342 2018-03-12 Richard Biener <rguenther@suse.de>
16344 PR tree-optimization/84777
16345 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16346 force-vectorize loops ignore whether we are optimizing for size.
16348 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
16350 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16351 (TARGET_MD_ASM_ADJUST): Define.
16353 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
16354 Kito Cheng <kito.cheng@gmail.com>
16355 Chung-Ju Wu <jasonwucj@gmail.com>
16357 * config/nds32/nds32.c (nds32_compute_stack_frame,
16358 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16359 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16360 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16361 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16362 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16363 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16364 * config/nds32/nds32.md (prologue, epilogue): Use macro
16365 NDS32_V3PUSH_AVAILABLE_P to do checking.
16367 2018-03-11 Jakub Jelinek <jakub@redhat.com>
16370 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16371 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16372 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
16373 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
16374 addition of most attributes on !orig_type_die or the attribute not
16375 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16377 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16378 Chung-Ju Wu <jasonwucj@gmail.com>
16380 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16381 __NDS32_VH__ macro.
16382 * config/nds32/nds32.opt (mvh): New option.
16384 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16385 Chung-Ju Wu <jasonwucj@gmail.com>
16387 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16389 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16390 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16393 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16394 Chung-Ju Wu <jasonwucj@gmail.com>
16396 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16398 * config/nds32/nds32-multiple.md (strlensi): New pattern.
16399 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16401 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
16402 Kito Cheng <kito.cheng@gmail.com>
16403 Chung-Ju Wu <jasonwucj@gmail.com>
16405 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16406 UNSPEC_FFMISM and UNSPEC_FLMISM.
16407 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16408 for ffb, ffmism and flmism.
16409 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16410 (unspec_ffmism): Ditto.
16411 (unspec_flmism): Ditto.
16412 (nds32_expand_builtin_impl): Check if string extension is available.
16413 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16414 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16416 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
16419 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16422 * lra-assigns.c (assign_by_spills): Return a flag of reload
16423 assignment failure. Do not process the reload assignment
16424 failures. Do not spill other reload pseudos if they has the same
16426 (lra_assign): Add a return arg. Set up from the result of
16427 assign_by_spills call.
16428 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16429 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16430 usage_insns if it is not NULL.
16431 (spill_hard_reg_in_range): New function.
16432 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16433 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16434 function prototypes.
16435 (lra_assign): Change prototype.
16436 * lra.c (lra): Add code to deal with fails by splitting hard reg
16439 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
16442 * config/i386/i386.opt: Replace Enforcment with Enforcement.
16444 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
16447 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16448 (dw_val_node): Add val_symbolic_view.
16449 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16450 (symview_upper_bound): New.
16451 (new_line_info_table): Initialize symviews_since_reset.
16452 (dwarf2out_source_line): Count symviews_since_reset and set
16453 symview_upper_bound.
16454 (dw_val_equal_p): Handle symview.
16455 (add_AT_symview): New.
16456 (print_dw_val): Handle symview.
16457 (attr_checksum, attr_checksum_ordered): Likewise.
16458 (same_dw_val_p, size_of_die): Likewise.
16459 (value_format, output_die): Likewise.
16460 (add_high_low_attributes): Use add_AT_symview for entry_view.
16461 (dwarf2out_finish): Reset symview_upper_bound, clear
16464 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
16467 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16468 Add strict argument and use it.
16469 (rs6000_split_multireg_move): Update for new strict argument.
16470 (mem_operand_gpr): Disallow all non-offsettable addresses.
16471 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16473 2018-03-09 Jakub Jelinek <jakub@redhat.com>
16476 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16477 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16478 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16481 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16482 decl, use remap_type if we want to use the type.
16484 2018-03-09 Martin Sebor <msebor@redhat.com>
16486 PR tree-optimization/84526
16487 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16489 (builtin_access::generic_overlap): Be prepared to handle non-array
16492 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
16494 PR rtl-optimization/84682
16495 * lra-constraints.c (process_address_1): Check is_address flag
16496 for address constraints.
16497 (process_alt_operands): Likewise.
16498 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16499 preprocess_constraints.
16500 * recog.h (preprocess_constraints): Add oploc parameter.
16502 * recog.c (preprocess_constraints): Test address_operand for
16503 CT_ADDRESS constraints.
16505 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16508 * lra-assigns.c (assign_by_spills): Return a flag of reload
16509 assignment failure. Do not process the reload assignment
16510 failures. Do not spill other reload pseudos if they has the same
16512 (lra_assign): Add a return arg. Set up from the result of
16513 assign_by_spills call.
16514 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16515 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16516 usage_insns if it is not NULL.
16517 (spill_hard_reg_in_range): New function.
16518 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16519 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16520 function prototypes.
16521 (lra_assign): Change prototype.
16522 * lra.c (lra): Add code to deal with fails by splitting hard reg
16525 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16528 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16529 Accept complain bool parameter. Only emit errors if it is true.
16530 (arm_parse_cpu_option_name): Likewise.
16531 (arm_target_thumb_only): Adjust callers of the above.
16532 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16533 prototype to take a default true bool parameter.
16534 (arm_parse_arch_option_name): Likewise.
16536 2018-03-09 David Malcolm <dmalcolm@redhat.com>
16537 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
16541 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16542 * configure: Regenerate.
16543 * configure.ac ("linker --version-script option"): New.
16544 ("linker soname option"): New.
16546 2018-03-09 Richard Biener <rguenther@suse.de>
16548 PR tree-optimization/84775
16549 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16550 immediate uses of predicate stmts and mark them modified.
16553 PR tree-optimization/84178
16554 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16556 (version_loop_for_if_conversion): Delay update_ssa call.
16557 (tree_if_conversion): Delay update_ssa until after predicate
16560 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
16563 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16564 when the function accesses prior frames.
16566 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16569 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16570 gen_llsym, otherwise call maybe_gen_llsym.
16572 PR inline-asm/84742
16573 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16574 has ',' character inside of it.
16576 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16579 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16580 as clobbering CC_REGNUM.
16582 2018-03-08 Richard Biener <rguenther@suse.de>
16584 PR middle-end/84552
16585 * tree-scalar-evolution.c: Include tree-into-ssa.h.
16586 (follow_copies_to_constant): Do not follow SSA names registered
16589 2018-03-08 Richard Biener <rguenther@suse.de>
16591 PR tree-optimization/84178
16592 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16594 (version_loop_for_if_conversion): Delay update_ssa call.
16595 (tree_if_conversion): Delay update_ssa until after predicate
16598 2018-03-08 David Malcolm <dmalcolm@redhat.com>
16600 PR tree-optimization/84178
16601 * tree-if-conv.c (release_bb_predicate): Remove the
16602 the assertion that the stmts have NULL use_ops.
16603 Discard the statements, asserting that they haven't
16604 yet been added to a BB.
16606 2018-03-08 Richard Biener <rguenther@suse.de>
16608 PR tree-optimization/84746
16609 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16610 (phi_translate): Pass in destination ANTIC_OUT set.
16611 (phi_translate_1): Likewise. For a simplified result lookup
16612 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16613 (phi_translate_set): Adjust.
16614 (do_pre_regular_insertion): Likewise.
16615 (do_pre_partial_partial_insertion): Likewise.
16617 2018-03-08 Martin Liska <mliska@suse.cz>
16619 PR gcov-profile/84735
16620 * doc/gcov.texi: Document usage of profile files.
16621 * gcov-io.h: Document changes in the format.
16623 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
16627 * dwarf2out.c (struct dw_line_info_table): Update comments for
16629 (FORCE_RESET_NEXT_VIEW): New.
16630 (FORCE_RESETTING_VIEW_P): New.
16631 (RESETTING_VIEW_P): Check for -1 too.
16632 (ZERO_VIEW_P): Likewise.
16633 (new_line_info_table): Force-reset next view.
16634 (dwarf2out_begin_function): Likewise.
16635 (dwarf2out_source_line): Simplify zero_view_p initialization.
16636 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16637 view directly. Omit view when omitting .loc at line 0.
16639 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16641 PR tree-optimization/84740
16642 * tree-switch-conversion.c (process_switch): Call build_constructors
16643 only if info.phi_count is non-zero.
16645 PR tree-optimization/84739
16646 * tree-tailcall.c (find_tail_calls): Check call arguments against
16647 DECL_ARGUMENTS (current_function_decl) rather than
16648 DECL_ARGUMENTS (func) when checking for tail recursion.
16650 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16652 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16653 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16654 Volker Reichelt's entry and add entries for people that perform
16655 GCC fuzzy testing and report numerous bugs.
16657 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
16660 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16661 readonly data in sdata, if that is disabled.
16662 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16663 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16664 -mreadonly-in-sdata option.
16666 2018-03-07 Martin Sebor <msebor@redhat.com>
16668 PR tree-optimization/84468
16669 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16670 basic block when looking for nul assignment.
16672 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
16675 * except.h (output_function_exception_table): Adjust prototype.
16676 * except.c (output_function_exception_table): Remove FNNAME parameter
16677 and add SECTION parameter. Ouput one part of the table at a time.
16678 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16679 the first part of the exception table and emit unwind directives.
16680 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16681 (i386_pe_seh_cold_init): Likewise.
16682 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16683 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16684 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16685 (ix86_output_call_insn): Emit a nop in one more case for SEH.
16686 * config/i386/winnt.c: Include except.h.
16687 (struct seh_frame_state): Add reg_offset, after_prologue and
16688 in_cold_section fields.
16689 (i386_pe_seh_end_prologue): Set seh->after_prologue.
16690 (i386_pe_seh_cold_init): New function.
16691 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16692 to seh->in_cold_section.
16693 (seh_emit_push): Record the offset of the push.
16694 (seh_emit_save): Record the offet of the save.
16695 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16696 Test seh->after_prologue to disregard the epilogue.
16697 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16698 (i386_pe_end_cold_function): New function.
16700 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16703 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16704 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16707 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16709 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16710 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16712 PR middle-end/84723
16713 * multiple_target.c: Include tree-inline.h and intl.h.
16714 (expand_target_clones): Diagnose and fail if node->definition and
16715 !tree_versionable_function_p (node->decl).
16717 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
16719 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16721 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16722 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16723 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16725 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16728 * combine.c (try_combine): Use reg_or_subregno instead of handling
16729 just paradoxical SUBREGs and REGs.
16731 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
16733 * config/arc/arc.c (arc_finalize_pic): Remove function.
16734 (arc_must_save_register): We use single base PIC register, remove
16735 checks to save/restore the PIC register.
16736 (arc_expand_prologue): Likewise.
16737 * config/arc/arc-protos.h (arc_set_default_type_attributes):
16739 (arc_verify_short): Likewise.
16740 (arc_attr_type): Likewise.
16741 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16742 (walk_stores): Likewise.
16743 (arc_address_cost): Make it static.
16744 (arc_verify_short): Likewise.
16745 (branch_dest): Likewise.
16746 (arc_attr_type): Likewise.
16747 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
16748 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
16749 (arc_final_prescan_insn): Remove inserting the nops due to
16750 hardware hazards. It is done in reorg step.
16751 (insn_length_variant_t): Remove.
16752 (insn_length_parameters_t): Likewise.
16753 (arc_insn_length_parameters): Likewise.
16754 (arc_get_insn_variants): Likewise.
16755 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
16757 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16759 PR inline-asm/84683
16760 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
16763 PR tree-optimization/84687
16764 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
16766 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
16768 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16770 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16771 Rename to ppc_speculation_barrier.
16772 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16773 __builtin_ppc_speculation_barrier.
16775 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16778 * combine.c (combine_simplify_rtx): Don't try to simplify if
16779 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16782 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
16784 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16785 to 32 bytes when compiling for POWER9.
16787 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16790 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16791 regparm >= 3 with no arg reg available also for calls with
16792 flag_force_indirect_call. Pass decl to ix86_function_regparm.
16795 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16797 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
16799 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
16802 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16804 2018-03-05 Richard Biener <rguenther@suse.de>
16806 PR tree-optimization/84486
16807 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16808 When inserting a __builtin_assume_aligned call set the LHS
16809 SSA name alignment info accordingly.
16811 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
16813 PR tree-optimization/84114
16814 * config/aarch64/aarch64.c (aarch64_reassociation_width)
16815 Avoid reassociation of FLOAT_MODE addition.
16817 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
16819 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16820 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16821 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16822 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16823 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16824 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16825 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16827 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16828 __builtin_ia32_wbinvd): New builtins.
16829 (SPECIAL_ARGS2): New.
16830 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
16831 (SPECIAL_ARGS2): New.
16832 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
16833 (ix86_valid_target_attribute_inner_p): Ditto.
16834 (ix86_init_mmx_sse_builtins): Add special_args2.
16835 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
16836 TARGET_WBNOINVD_P): New.
16837 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
16838 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
16839 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
16840 * config/i386/immintrin.h (_wbinvd): New intrinsic.
16841 * config/i386/pconfigintrin.h: New file.
16842 * config/i386/wbnoinvdintrin.h: Ditto.
16843 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
16845 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
16847 2018-03-05 Richard Biener <rguenther@suse.de>
16849 PR tree-optimization/84670
16850 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16852 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16853 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16854 (compute_antic_aux): Only assert the number of values in ANTIC_IN
16855 doesn't grow if all successors (recursively) were visited at least
16858 2018-03-05 Richard Biener <rguenther@suse.de>
16860 PR tree-optimization/84650
16861 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
16862 if executed in the loop pipeline.
16864 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
16866 * doc/configfiles.texi (Configuration Files): Move info about
16867 conditionalizing $target-protos.h to...
16868 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
16869 differs from $target-protos.h.
16871 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
16872 Chung-Ju Wu <jasonwucj@gmail.com>
16874 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
16875 * config/nds32/nds32-multiple.md (setmemsi): Define.
16876 * config/nds32/nds32-memory-manipulation.c
16877 (nds32_gen_dup_4_byte_to_word_value): New.
16878 (emit_setmem_word_loop): New.
16879 (emit_setmem_byte_loop): New.
16880 (nds32_expand_setmem_loop): New.
16881 (nds32_expand_setmem_loop_v3m): New.
16882 (nds32_expand_setmem_unroll): New.
16883 (nds32_expand_setmem): New.
16885 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16886 Chung-Ju Wu <jasonwucj@gmail.com>
16888 * config/nds32/nds32-memory-manipulation.c
16889 (nds32_emit_load_store): New.
16890 (nds32_emit_post_inc_load_store): New.
16891 (nds32_emit_mem_move): New.
16892 (nds32_emit_mem_move_block): New.
16893 (nds32_expand_movmemsi_loop_unknown_size): New.
16894 (nds32_expand_movmemsi_loop_known_size): New.
16895 (nds32_expand_movmemsi_loop): New.
16896 (nds32_expand_movmemsi_unroll): New.
16897 (nds32_expand_movmemqi): Rename ...
16898 (nds32_expand_movmemsi): ... to this.
16899 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
16900 (movmemsi): ... to this.
16901 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
16902 (nds32_expand_movmemsi): ... to this.
16904 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16905 Monk Chiang <sh.chiang04@gmail.com>
16906 Chung-Ju Wu <jasonwucj@gmail.com>
16908 * config/nds32/nds32-protos.h
16909 (nds32_expand_load_multiple): New arguments.
16910 (nds32_expand_store_multiple): Ditto.
16911 (nds32_valid_multiple_load_store): Rename ...
16912 (nds32_valid_multiple_load_store_p): ... to this.
16913 * config/nds32/nds32-memory-manipulation.c
16914 (nds32_expand_load_multiple): Refine implementation.
16915 (nds32_expand_store_multiple): Ditto.
16916 * config/nds32/nds32-multiple.md
16917 (load_multiple): Update nds32_expand_load_multiple interface.
16918 (store_multiple): Update nds32_expand_store_multiple interface.
16919 * config/nds32/nds32-predicates.c
16920 (nds32_valid_multiple_load_store): Rename ...
16921 (nds32_valid_multiple_load_store_p): ... to this and refine
16923 * config/nds32/predicates.md
16924 (nds32_load_multiple_and_update_address_operation): New predicate.
16925 (nds32_store_multiple_and_update_address_operation): New predicate.
16927 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16928 Chung-Ju Wu <jasonwucj@gmail.com>
16930 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
16931 (combo): New attribute.
16932 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
16934 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
16936 * config/nds32/nds32.opt: Change -mcmodel= default value.
16938 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
16939 Monk Chiang <sh.chiang04@gmail.com>
16940 Chung-Ju Wu <jasonwucj@gmail.com>
16942 * config/nds32/constants.md (unspec_element): New enum.
16943 * config/nds32/constraints.md (Umw): New constraint.
16944 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
16945 * config/nds32/nds32-intrinsic.md: Likewise.
16946 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
16947 (nds32_valid_smw_lwm_base_p): New.
16948 (nds32_output_smw_single_word): New.
16949 (nds32_output_lmw_single_word): New.
16950 (nds32_expand_unaligned_load): New.
16951 (nds32_expand_unaligned_store): New.
16952 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
16953 (nds32_output_smw_single_word): Declare.
16954 (nds32_output_lmw_single_word): Declare.
16955 (nds32_expand_unaligned_load): Declare.
16956 (nds32_expand_unaligned_store): Declare.
16957 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
16958 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
16959 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
16960 NDS32_BUILTIN_UASTORE_DW.
16961 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
16964 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
16965 Kito Cheng <kito.cheng@gmail.com>
16966 Chung-Ju Wu <jasonwucj@gmail.com>
16968 * config/nds32/nds32-intrinsic.c
16969 (nds32_expand_builtin_null_ftype_reg): Delete.
16970 (nds32_expand_builtin_reg_ftype_imm): Ditto.
16971 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
16972 (nds32_read_argument): New.
16973 (nds32_legitimize_target): Ditto.
16974 (nds32_legitimize_argument): Ditto.
16975 (nds32_check_constant_argument): Ditto.
16976 (nds32_expand_unop_builtin): Ditto.
16977 (nds32_expand_unopimm_builtin): Ditto.
16978 (nds32_expand_binop_builtin): Ditto.
16979 (nds32_builtin_decl_impl): Ditto.
16980 (builtin_description): Ditto.
16981 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
16982 (nds32_init_builtins_impl): Ditto.
16983 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
16984 (nds32_builtin_decl): New.
16985 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
16986 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
16988 2018-03-02 Jeff Law <law@redhat.com>
16990 * reorg.c (stop_search_p): Handle DEBUG_INSN.
16991 (redundant_insn, fill_simple_delay_slots): Likewise.
16992 (fill_slots_from_thread): Likewise.
16993 * resource.c (mark_referenced_resources): Likewise.
16994 (mark_set_resources, find_dead_or_set_registers): Likewise.
16996 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16998 * substring-locations.h (format_warning_va): Formatting fix for
16999 ATTRIBUTE_GCC_DIAG.
17000 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17002 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17003 * substring-locations.c: Include intl.h.
17004 (format_warning_va): Turned into small wrapper around
17005 format_warning_n_va, renamed to ...
17006 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17007 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17009 (format_warning_at_substring_n): New function.
17010 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17011 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17012 format_warning_at_substring with just a shorter name instead of
17013 const function pointer.
17014 (fmtwarn_n): New function.
17015 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17016 appropriate, get rid of all the fmtstr temporaries, move conditionals
17017 with G_() wrapped string literals directly into fmtwarn arguments,
17018 cast dir.len to (int), formatting fixes.
17020 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17022 * doc/invoke.texi: Remove "Cilk Plus" references.
17024 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17025 Richard Biener <rguenther@suse.de>
17028 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17029 for error or warning attributes if CALL_FROM_THUNK_P is set.
17032 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17035 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17036 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17039 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17040 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17042 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17043 instead of -1U in last predictors element's probability member.
17045 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17048 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17049 arguments if they are comparable.
17051 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17053 PR tree-optimization/84634
17054 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17055 masks and masked_loop_p with a single loop_masks, making sure it's
17056 null for bb vectorization.
17058 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17060 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17061 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17062 loop->force_vectorize to check whether there is no alias.
17064 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17067 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17069 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17071 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17072 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17073 instead of a loop around prev_real_insn.
17074 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17077 PR inline-asm/84625
17078 * config/i386/i386.c (ix86_print_operand): Use conditional
17079 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17082 2018-03-02 Richard Biener <rguenther@suse.de>
17084 PR tree-optimization/84427
17085 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17086 (bitmap_set_subtract_values): Rewrite to handle multiple
17089 (prune_clobbered_mems): Likewise.
17090 (phi_translate): Take edge instead of pred/phiblock.
17091 (phi_translate_1): Likewise.
17092 (phi_translate_set): Likewise. Insert all translated
17093 exprs for a value into the set, keeping possibly multiple
17094 expressions per value.
17095 (compute_antic_aux): Adjust for phi_translate changes.
17096 When intersecting union the expressions and prune those
17097 not in the final value set, keeping possibly multiple
17098 expressions per value. Do not use value-insertion
17099 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17100 all expressions. Add verification that the value-sets
17101 only shrink during iteration.
17102 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17103 (do_pre_regular_insertion): Likewise.
17104 (do_pre_partial_partial_insertion): Likewise.
17106 2018-03-02 Richard Biener <rguenther@suse.de>
17109 * config/darwin.c (saved_debug_info_level): New static global.
17110 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17111 (darwin_asm_lto_end): Restore debug info generation settings.
17113 2018-03-01 Martin Liska <mliska@suse.cz>
17116 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17117 volatile arguments.
17119 2018-03-01 Richard Biener <rguenther@suse.de>
17122 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17123 type annotation with LTO when debug was disabled at compile-time.
17125 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17127 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17129 (mips_final_postscan_insn): Likewise.
17131 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17133 PR rtl-optimization/84528
17134 * alias.c (init_alias_target): Add commentary.
17135 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17136 a unique base value if the frame pointer is not eliminated
17137 to the stack pointer.
17139 2018-03-01 Tom de Vries <tom@codesourcery.com>
17141 PR rtl-optimization/83327
17142 * lra-int.h (hard_regs_spilled_into): Declare.
17143 * lra.c (hard_regs_spilled_into): Define.
17144 (init_reg_info): Init hard_regs_spilled_into.
17145 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17146 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17147 (process_bb_lives): Handle hard_regs_spilled_into.
17148 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17149 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17151 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17153 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17154 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17155 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17156 * config/rs6000/aix72.h: New file.
17158 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17160 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17161 instead of warning_at with conditional singular and plural messages
17165 * stor-layout.c (update_alignment_for_field): For
17166 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17167 && !DECL_PACKED (field), do the alignment update, just use
17168 only desired_align instead of MAX (type_align, desired_align)
17170 (place_field): Don't do known_align < desired_align handling
17171 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17172 is non-NULL, instead do it after rli->prev_field handling and
17173 only if not within a bitfield word. For DECL_PACKED (field)
17174 use type_align of BITS_PER_UNIT.
17176 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17178 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17179 superfluous parentheses and trailing spaces.
17181 2018-02-28 Richard Biener <rguenther@suse.de>
17183 PR tree-optimization/84584
17184 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17185 SCoPs with fake exit edge.
17187 2018-02-28 Martin Liska <mliska@suse.cz>
17190 * timevar.c (timer::print): Fix format to properly print 100%
17193 2018-02-28 Richard Biener <rguenther@suse.de>
17195 PR middle-end/84607
17196 * genmatch.c (capture_info::walk_match): Do not mark
17197 captured expressions without operands as expr_p given
17198 they act more like predicates and should be subject to
17199 "lost tail" side-effect preserving.
17201 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17203 PR rtl-optimization/81611
17204 * auto-inc-dec.c (attempt_change): Move dead note from
17205 mem_insn if it's the next use of regno
17206 (find_address): Take address use of reg holding
17207 non-incremented value. Add parm to limit search to the named
17209 (merge_in_block): Attempt to use a mem insn that is the next
17210 use of the original regno.
17212 2018-02-27 Martin Sebor <msebor@redhat.com>
17215 * doc/invoke.texi (-Wmissing-attributes): New option.
17216 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17218 2018-02-27 Martin Sebor <msebor@redhat.com>
17220 PR translation/84207
17221 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17222 n argument to unsigned HOST_WIDE_INT.
17223 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17224 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17225 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17226 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17228 2018-02-27 Richard Biener <rguenther@suse.de>
17230 PR tree-optimization/84512
17231 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17232 Do not use the estimate returned from record_stmt_cost for
17233 the scalar iteration cost but sum properly using add_stmt_cost.
17235 2018-02-27 Richard Biener <rguenther@suse.de>
17237 PR tree-optimization/84466
17238 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17239 Adjust last change to less strictly validate use operands.
17241 2018-02-27 Martin Liska <mliska@suse.cz>
17243 PR gcov-profile/84548
17244 * gcov.c (process_file): Allow partial overlap and consider it
17245 also as group functions.
17246 (output_lines): Properly calculate range of lines for a group.
17248 2018-02-27 Martin Liska <mliska@suse.cz>
17250 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17251 'ggc' suffixes. Change first column width.
17252 (timer::print): Fix formatting of the column.
17254 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17256 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17257 preserve inline entry blocks for the sake of debug inline
17258 entry point markers alone.
17259 (remove_unused_locals): Suggest in comments a better place to
17260 force the preservation of inline entry blocks that are
17261 otherwise unused, but do not preserve them.
17263 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17265 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17267 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17270 * config/i386/constraints.md (Bs): Replace
17271 ix86_indirect_branch_register with
17272 TARGET_INDIRECT_BRANCH_REGISTER.
17274 * config/i386/i386.md (indirect_jump): Likewise.
17275 (tablejump): Likewise.
17276 (*sibcall_memory): Likewise.
17277 (*sibcall_value_memory): Likewise.
17278 Peepholes of indirect call and jump via memory: Likewise.
17279 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17280 (*sibcall_value_GOT_32): Likewise.
17281 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17282 (GOT_memory_operand): Likewise.
17283 (call_insn_operand): Likewise.
17284 (sibcall_insn_operand): Likewise.
17285 (GOT32_symbol_operand): Likewise.
17286 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17288 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17290 PR rtl-optimization/83496
17291 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17292 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17293 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17294 redundant insn, if any.
17295 (relax_delay_slots): Likewise.
17296 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17298 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
17300 PR tree-optimization/83965
17301 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17302 that grouped statements are part of a reduction chain. Return
17303 true if the statement is not marked as a reduction itself but
17304 is part of a group.
17305 (vect_recog_dot_prod_pattern): Don't check whether the statement
17306 is part of a group here.
17307 (vect_recog_sad_pattern): Likewise.
17308 (vect_recog_widen_sum_pattern): Likewise.
17310 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17313 * final.c (rest_of_clean_state): Also look for calls inside sequences.
17315 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17318 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17320 (ix86_output_indirect_function_return): New prototype.
17321 (ix86_split_simple_return_pop_internal): Likewise.
17322 * config/i386/i386.c (indirect_return_via_cx): New.
17323 (indirect_return_via_cx_bnd): Likewise.
17324 (indirect_thunk_name): Handle return va CX_REG.
17325 (output_indirect_thunk_function): Create alias for
17326 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17327 (ix86_output_indirect_jmp): Remove the bool argument.
17328 (ix86_output_indirect_function_return): New function.
17329 (ix86_split_simple_return_pop_internal): Likewise.
17330 * config/i386/i386.md (*indirect_jump): Don't pass false
17331 to ix86_output_indirect_jmp.
17332 (*tablejump_1): Likewise.
17333 (simple_return_pop_internal): Change it to define_insn_and_split.
17334 Call ix86_split_simple_return_pop_internal to split it for
17335 -mfunction-return=.
17336 (simple_return_indirect_internal): Call
17337 ix86_output_indirect_function_return instead of
17338 ix86_output_indirect_jmp.
17340 2018-02-26 Jakub Jelinek <jakub@redhat.com>
17343 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17344 memset and value initialization afterwards.
17346 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
17348 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17350 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17353 * common/config/aarch64/aarch64-common.c
17354 (aarch_option_optimization_table[]): Switch
17355 off fomit-frame-pointer
17357 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17358 Chung-Ju Wu <jasonwucj@gmail.com>
17360 * config/nds32/nds32-multiple.md (load_multiple): Disallow
17362 (store_multiple): Ditto.
17364 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17366 * config.gcc: Add --with-cpu support for nds32 target.
17367 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17368 * config/nds32/nds32.opt: Add -mcpu= option.
17370 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
17372 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17373 isel=yes): Warn for these deprecated options.
17375 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
17377 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17378 ISA_2_5_MASKS_EMBEDDED.
17380 2018-02-23 Jakub Jelinek <jakub@redhat.com>
17382 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17383 p->max as pointers rather than using iterative_hash_expr.
17385 2018-02-23 Carl Love <cel@us.ibm.com>
17387 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17388 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17390 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17391 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17392 P8V_BUILTIN_VEC_VUNSIGNED2.
17394 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
17397 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17398 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17400 * lra-constraints.c (curr_insn_transform): Set up
17401 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
17403 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17404 * lra-eliminations.c (spill_pseudos): Ditto.
17405 (process_insn_for_elimination): Ditto.
17406 * lra-lives.c (reg_early_clobber_p): Use the new macros.
17407 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17408 LRA_NON_CLOBBERED_ALT.
17410 2018-02-22 Martin Sebor <msebor@redhat.com>
17412 PR tree-optimization/84480
17413 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17414 to maybe_diag_stxncpy_trunc. Call it.
17415 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17416 from gimple_fold_builtin_strcpy. Print inlining stack.
17417 (handle_builtin_stxncpy): Print inlining stack.
17418 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17420 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
17423 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17424 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17425 and -fcheck-pointer-bounds are used together.
17426 (indirect_thunk_prefix): New enum.
17427 (indirect_thunk_need_prefix): New function.
17428 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
17429 "_nt" instead of "_bnd" for NOTRACK prefix.
17430 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17431 (output_indirect_thunk_function): Likewise.
17433 (ix86_code_end): Update output_indirect_thunk_function calls.
17434 (ix86_output_indirect_branch_via_reg): Replace
17435 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17436 (ix86_output_indirect_branch_via_push): Likewise.
17437 (ix86_output_function_return): Likewise.
17438 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17439 incompatible with -fcf-protection=branch and
17440 -fcheck-pointer-bounds.
17442 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17445 * config/aarch64/aarch64.c (aarch64_print_address_internal):
17446 Change gcc_assert call to output_operand_lossage.
17448 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17450 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17452 2018-02-22 DJ Delorie <dj@redhat.com>
17453 Sebastian Perta <sebastian.perta@renesas.com>
17454 Oleg Endo <olegendo@gcc.gnu.org>
17456 * config/rx/rx.c (rx_rtx_costs): New function.
17457 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17459 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
17461 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17463 2018-02-22 Martin Liska <mliska@suse.cz>
17466 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17467 Add "native" as a possible value.
17469 2018-02-22 Martin Liska <mliska@suse.cz>
17472 * config/i386/i386.c (ix86_option_override_internal):
17473 Add "native" as a possible value for -march and -mtune.
17475 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17478 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17479 to all type variants.
17481 PR tree-optimization/84503
17482 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17483 width as info->bitpos + info->bitsize - start.
17484 (merged_store_group::merge_overlapping): Simplify width computation.
17485 (check_no_overlap): New function.
17486 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17487 start + width and last_order of the group, fail if check_no_overlap
17489 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17490 to group if check_no_overlap fails.
17492 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17494 * config/rs6000/altivec.md: Delete contraint arguments to
17495 define_expand, define_split, and define_peephole2, and in
17496 define_insn_and_split if always unused.
17497 * config/rs6000/darwin.md: Ditto.
17498 * config/rs6000/dfp.md: Ditto.
17499 * config/rs6000/rs6000.md: Ditto.
17500 * config/rs6000/sync.md: Ditto.
17501 * config/rs6000/vector.md: Ditto.
17502 * config/rs6000/vsx.md: Ditto.
17504 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17506 * config/rs6000/altivec.md: Write output control strings as braced
17507 blocks instead of double-quoted strings.
17508 * config/rs6000/darwin.md: Ditto.
17509 * config/rs6000/rs6000.md: Ditto.
17510 * config/rs6000/vector.md: Ditto.
17511 * config/rs6000/vsx.md: Ditto.
17513 2018-02-21 Jason Merrill <jason@redhat.com>
17515 PR c++/84314 - ICE with templates and fastcall attribute.
17516 * attribs.c (build_type_attribute_qual_variant): Remove assert.
17518 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17520 * ipa-cp.c (determine_versionability): Fix comment typos.
17522 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17525 * ipa-cp.c (determine_versionability): Do not version functions caling
17528 2018-02-21 Martin Liska <mliska@suse.cz>
17531 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17532 Add "native" as a possible value.
17533 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
17534 the macro when native cpu detection is available.
17536 2018-02-21 Martin Liska <mliska@suse.cz>
17539 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17540 Add "native" as a possible value.
17541 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17542 when native cpu detection is available.
17544 2018-02-21 Jakub Jelinek <jakub@redhat.com>
17545 Martin Sebor <msebor@redhat.com>
17547 PR tree-optimization/84478
17548 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17550 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17551 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17552 support which is conservatively correct, for 2 only stay conservative
17553 for maxlen. Formatting and comment capitalization fixes. Add STRICT
17554 argument to the 2 argument get_range_strlen, adjust 6 arg
17555 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17557 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17558 (gimple_fold_builtin_strlen): Pass true as last argument to
17561 2018-02-20 Martin Sebor <msebor@redhat.com>
17563 PR middle-end/84095
17564 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17565 (builtin_memref::set_base_and_offset): Same. Handle inner references.
17566 (builtin_memref::builtin_memref): Factor out parts into
17567 set_base_and_offset and call it.
17569 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17571 PR middle-end/84406
17572 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17573 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17574 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
17575 search at the associated MODE_INT.
17577 2018-02-20 Jeff Law <law@redhat.com>
17579 PR middle-end/82123
17580 PR tree-optimization/81592
17581 PR middle-end/79257
17582 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17583 for range data rather than using global data.
17584 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17585 range data rather than using global data.
17586 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17587 pass it to children as needed.
17588 (struct directive::fmtresult): Similarly.
17589 (struct directive::set_width): Similarly.
17590 (struct directive::set_precision): Similarly.
17591 (format_integer, format_directive, parse_directive): Similarly.
17592 (format_none): Accept unnamed vr_values parameter.
17593 (format_percent, format_floating, format_character): Similarly.
17594 (format_string, format_plain): Similarly.
17595 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17596 the EVRP range analyzer for range data rather than using global data.
17597 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17598 gimple-ssa-evrp-analyze.h
17599 (class sprintf_dom_walker): Add after_dom_children member function.
17600 Add evrp_range_analyzer member.
17601 (sprintf_dom_walker::before_dom_children): Call into the EVRP
17602 range analyzer as needed.
17603 (sprintf_dom_walker::after_dom_children): New member function.
17604 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17606 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17607 (evrp_range_analyzer::pop_to_marker): Likewise.
17609 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17611 PR tree-optimization/84419
17612 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17613 with the required type if its current type is compatible but
17616 2018-02-20 Jakub Jelinek <jakub@redhat.com>
17618 PR middle-end/82004
17619 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17620 after vectorization.
17622 2018-02-20 Martin Liska <mliska@suse.cz>
17625 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17626 possible values if we don't have a hint.
17628 2018-02-20 Martin Liska <mliska@suse.cz>
17632 * final.c (shorten_branches): Build align_tab array with one
17634 * opts.c (finish_options): Add alignment option limit check.
17635 (MAX_CODE_ALIGN): Likewise.
17636 (MAX_CODE_ALIGN_VALUE): Likewise.
17637 * doc/invoke.texi: Document maximum allowed option value for
17638 all -falign-* options.
17640 2018-02-19 Jakub Jelinek <jakub@redhat.com>
17643 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17644 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17645 * var-tracking.c (emit_note_insn_var_location): Remove all references
17646 to NOTE_INSN_CALL_ARG_LOCATION.
17647 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17648 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17649 Use copy_rtx_if_shared.
17650 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17651 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17652 (dwarf2out_var_location): Remove handling of
17653 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17655 * final.c (final_scan_insn): Remove all references to
17656 NOTE_INSN_CALL_ARG_LOCATION.
17657 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
17658 before dumping final insns.
17659 * except.c (emit_note_eh_region_end): Remove all references to
17660 NOTE_INSN_CALL_ARG_LOCATION.
17661 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17662 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17663 * config/arc/arc.c (hwloop_optimize): Likewise.
17664 * config/arm/arm.c (create_fix_barrier): Likewise.
17665 * config/s390/s390.c (s390_chunkify_start): Likewise.
17666 * config/sh/sh.c (find_barrier): Likewise.
17667 * config/i386/i386.c (rest_of_insert_endbranch,
17668 ix86_seh_fixup_eh_fallthru): Likewise.
17669 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17670 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17671 * config/frv/frv.c (frv_function_prologue): Likewise.
17672 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
17674 (note_outside_basic_block_p): Remove all references to
17675 NOTE_INSN_CALL_ARG_LOCATION.
17676 * gengtype.c (adjust_field_rtx_def): Likewise.
17677 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17679 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17680 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17683 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17686 PR tree-optimization/84452
17687 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17688 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17691 2018-02-19 Martin Liska <mliska@suse.cz>
17694 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17696 2018-02-19 Martin Liska <mliska@suse.cz>
17697 Richard Sandiford <richard.sandiford@linaro.org>
17699 PR tree-optimization/82491
17700 * gimple-fold.c (get_base_constructor): Make earlier bail out
17703 2018-02-19 Carl Love <cel@us.ibm.com>
17705 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17706 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17708 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17709 P8V_BUILTIN_VEC_NEG.
17711 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
17713 * config/rl78/rl78.md (movdf): New define expand.
17715 2018-02-19 Martin Liska <mliska@suse.cz>
17718 * doc/invoke.texi: Fix typo.
17719 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17721 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
17723 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17724 handle rs6000_single_float and rs6000_double_float specially for
17727 2018-02-16 Jeff Law <law@redhat.com>
17729 * config/rx/rx.c (add_pop_cfi_notes): New function.;
17730 (pop_regs): Use it.
17732 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17735 * ipa-inline.c (inline_small_functions): Fix a typo.
17737 2018-02-16 Nathan Sidwell <nathan@acm.org>
17739 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17741 2018-02-16 Carl Love <cel@us.ibm.com>
17743 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
17744 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
17745 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
17746 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
17747 expansion to P8V_BUILTIN_VEC_FLOAT2.
17749 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
17751 PR rtl-optimization/70023
17752 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
17753 src_regno into account.
17755 2018-02-16 Carl Love <cel@us.ibm.com>
17757 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
17758 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
17759 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
17760 * config/rs6000/rs6000.c: Remove case statements for
17761 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
17762 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
17763 and P9V_BUILTIN_VEC_VINSERT4B.
17764 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
17765 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
17766 * config/rs6000/vsx.md:
17767 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17770 2018-02-16 Carl Love <cel@us.ibm.com>
17772 * config/rs6000/altivec.h: Add builtin names vec_extract4b
17774 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17776 * config/rs6000/rs6000-c.c: Add the definitions for
17777 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17778 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17779 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17780 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
17781 definition for insert4b and define insn *insert3b_internal.
17782 * doc/extend.texi: Add documentation for vec_extract4b.
17784 2018-02-16 Nathan Sidwell <nathan@acm.org>
17786 * doc/extend.texi (Backwards Compatibility): Mention friend
17787 injection. Note for-scope is deprecated.
17788 * doc/invoke.texi (-ffriend-injection): Deprecate.
17790 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
17792 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17793 that moved to I2, also allow destinations that are a paradoxical
17794 subreg (instead of a normal reg).
17796 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
17799 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17802 2018-02-16 Richard Biener <rguenther@suse.de>
17804 PR tree-optimization/84037
17805 PR tree-optimization/84016
17807 * config/i386/i386.c (ix86_builtin_vectorization_cost):
17808 Adjust vec_construct for the fact we need additional higher latency
17809 128bit inserts for AVX256 and AVX512 vector builds.
17810 (ix86_add_stmt_cost): Scale vector construction cost for
17813 2018-02-16 Richard Biener <rguenther@suse.de>
17815 PR tree-optimization/84417
17816 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17817 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17818 (non_rewritable_lvalue_p): Likewise, use poly-ints.
17820 2018-02-16 Martin Liska <mliska@suse.cz>
17823 * internal-fn.def (ASAN_CHECK): Set proper flags.
17824 (ASAN_MARK): Likewise.
17826 2018-02-16 Julia Koval <julia.koval@intel.com>
17828 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17829 from PTA_CANNONLAKE.
17831 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17834 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
17835 Use ++iter rather than iter++ for std::list iterators.
17836 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
17837 defer deleting them until all nodes in the forest are processed. Do
17838 free even leaf nodes. Change to_process into auto_vec.
17841 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
17842 * vec.h (vec_default_construct): Use memset instead of placement new
17843 if BROKEN_VALUE_INITIALIZATION is defined.
17844 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
17845 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
17848 PR rtl-optimization/83723
17849 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
17850 * lra.c (lra_substitute_pseudo): Likewise. If true, use
17851 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
17853 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
17855 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
17857 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
17859 PR rtl-optimization/81443
17860 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
17861 from inner REGs to paradoxical SUBREGs.
17863 2018-02-16 Richard Biener <rguenther@suse.de>
17865 PR tree-optimization/84399
17866 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17867 For operands we can analyze at their definition make sure we can
17868 analyze them at each use as well.
17870 2018-02-16 Richard Biener <rguenther@suse.de>
17872 PR tree-optimization/84190
17873 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
17874 volatile accesses if the decl isn't volatile.
17876 2018-02-15 Jason Merrill <jason@redhat.com>
17878 PR c++/84314 - ICE with templates and fastcall attribute.
17879 * attribs.c (build_type_attribute_qual_variant): Don't clobber
17880 TYPE_CANONICAL on an existing type.
17882 2018-02-15 Jakub Jelinek <jakub@redhat.com>
17884 PR tree-optimization/84383
17885 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
17886 dstoff nor call operand_equal_p if dstbase is NULL.
17888 PR tree-optimization/84334
17889 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
17890 also a CONSTANT_CLASS_P, punt.
17892 2018-02-14 Jim Wilson <jimw@sifive.com>
17894 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
17895 first SMALL_OPERAND check. New local min_second_step. Move assert
17896 to where locals are set. Add TARGET_RVC support.
17897 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
17899 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
17901 * doc/invoke.texi: Correct -Wformat-overflow code sample.
17903 2018-02-14 Martin Sebor <msebor@redhat.com>
17905 PR tree-optimization/83698
17906 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
17907 arrays constrain the offset range to their bounds.
17908 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
17909 (builtin_access::overlap): Avoid setting the size of overlap if it's
17911 (maybe_diag_overlap): Also consider arrays when deciding what values
17912 of offsets to include in diagnostics.
17914 2018-02-14 Martin Sebor <msebor@redhat.com>
17917 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
17918 that correspond to the kind of a declaration.
17920 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
17923 * config/pa/pa.md: Load address of PIC label using the linkage table
17924 if the label is nonlocal.
17926 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
17928 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
17929 warning message if user requests -maltivec=be.
17930 * doc/invoke.texi: Document deprecation of -maltivec=be.
17932 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
17935 * config/rs6000/rs6000-c.c: Update definitions for
17936 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
17937 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
17939 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17942 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
17943 add _get_ssp intrinsics. Remove argument from
17944 __builtin_ia32_rdssp[d|q].
17945 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
17946 * config/i386/i386-builtin.def: Remove argument from
17947 __builtin_ia32_rdssp[d|q].
17948 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
17949 ix86_expand_special_args_builtin for _rdssp[d|q].
17950 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
17951 Clear register before usage.
17952 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
17953 Add documentation for new _get_ssp and _inc_ssp intrinsics.
17955 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
17957 PR tree-optimization/84357
17958 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
17959 operand 1 of an ARRAY_REF too.
17961 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
17964 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
17965 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17967 (set_of_reg): New struct.
17968 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
17969 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
17970 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17972 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
17973 Split into bitclr, bitset, bitinvert patterns if appropriate.
17974 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
17975 use rx_fuse_in_memory_bitop.
17976 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
17977 to named insn, correct maximum insn length.
17979 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
17982 * machmode.def: Define a complex mode for PARTIAL_INT.
17983 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
17985 * doc/rtl.texi: Document CSPImode.
17986 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
17988 (msp430_hard_regno_nregs_with_padding): Likewise.
17990 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
17993 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
17995 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
17997 PR rtl-optimization/84169
17998 * combine.c (try_combine): New variable split_i2i3. Set it to true if
17999 we generated a parallel as new i3 and we split that to new i2 and i3
18000 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18001 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18002 those to i2, not i1. Partially rewrite this scan code.
18004 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18007 * stor-layout.c (place_field): For variable length fields, adjust
18008 offset_align afterwards not just based on the field's alignment,
18009 but also on the size.
18011 PR middle-end/84309
18012 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18013 of exps and logs in the use_exp2 case.
18015 2018-02-13 Jeff Law <law@redhat.com>
18017 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18018 entry for "vector".
18020 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18023 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18027 * common.opt (gas-loc-support, gas-locview-support): New.
18028 (ginline-points, ginternal-reset-location-views): New.
18029 * doc/invoke.texi: Document them. Use @itemx where intended.
18030 (gvariable-location-views): Adjust.
18031 * target.def (reset_location_view): New.
18032 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18033 (TARGET_RESET_LOCATION_VIEW): New.
18034 * doc/tm.texi: Rebuilt.
18035 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18036 (dwarf2out_default_as_locview_support): New.
18037 (output_asm_line_debug_info): Use option variables.
18038 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18039 (output_loc_list): Likewise.
18040 (add_high_low_attributes): Check option variables.
18041 Don't output entry view attribute in strict mode.
18042 (gen_inlined_subroutine_die): Check option variables.
18043 (dwarf2out_inline_entry): Likewise.
18044 (init_sections_and_labels): Likewise.
18045 (dwarf2out_early_finish): Likewise.
18046 (maybe_reset_location_view): New, from...
18047 (dwarf2out_var_location): ... here. Call it.
18048 * debug.h (dwarf2out_default_as_loc_support): Declare.
18049 (dwarf2out_default_as_locview_support): Declare.
18050 * hooks.c (hook_int_rtx_insn_0): New.
18051 * hooks.h (hook_int_rtx_insn_0): Declare.
18052 * toplev.c (process_options): Take -gas-loc-support and
18053 -gas-locview-support from dwarf2out. Enable
18054 -gvariable-location-views by default only with locview
18055 assembler support. Enable -ginternal-reset-location-views by
18056 default only if the target defines the corresponding hook.
18057 Enable -ginline-points by default if location views are
18058 enabled; force it disabled if statement frontiers are
18060 * tree-inline.c (expand_call_inline): Check option variables.
18061 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18063 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18065 PR tree-optimization/84321
18066 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18067 handling. Also check whether the anti-range contains any values
18068 that satisfy the mask; switch to a VR_RANGE if not.
18070 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18073 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18075 2018-02-13 Martin Jambor <mjambor@suse.cz>
18078 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18079 of call statements, also set location of a load to a temporary.
18081 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18083 * config/rl78/rl78.c (add_vector_labels): New function.
18084 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18085 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18086 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18087 which checks that no arguments are passed.
18088 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18089 * doc/extend.texi: Documentation for the new attribute.
18091 2018-02-13 Andreas Schwab <schwab@suse.de>
18093 * config/riscv/linux.h (CPP_SPEC): Define.
18095 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18098 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18099 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18100 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18101 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18102 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18103 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18104 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18105 temporarily for AES and PCLMUL builtins.
18107 PR tree-optimization/84339
18108 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18109 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18112 PR middle-end/84309
18113 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18114 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18115 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18117 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18119 * omp-simd-clone.h: New file.
18120 * omp-simd-clone.c: Include omp-simd-clone.h.
18121 (expand_simd_clones): No longer static.
18122 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18123 cgraph.h and omp-simd-clone.h.
18124 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18125 (vect_recog_widen_shift_pattern): Formatting fix.
18126 (vect_pattern_recog_1): Don't check optab for calls.
18129 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18130 operands[2] into a REG before using gen_lowpart on it.
18132 2018-02-12 Jeff Law <law@redhat.com>
18135 * config/sh/sh.c (find_barrier): Consider a sibling call
18138 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18139 successfully back substituting a reg.
18141 2018-02-12 Richard Biener <rguenther@suse.de>
18143 PR tree-optimization/84037
18144 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18145 parameter, move visited init to caller.
18146 (vect_slp_analyze_operations): Separate cost from validity
18147 check, initialize visited once for all instances.
18148 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18150 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18152 (vect_model_promotion_demotion_cost): Likewise.
18153 (vectorizable_bswap): Guard cost modeling with !slp_node
18154 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18156 (vectorizable_call): Likewise.
18157 (vectorizable_conversion): Likewise.
18158 (vectorizable_assignment): Likewise.
18159 (vectorizable_shift): Likewise.
18160 (vectorizable_operation): Likewise.
18161 (vectorizable_store): Likewise.
18162 (vectorizable_load): Likewise.
18163 (vectorizable_condition): Likewise.
18164 (vectorizable_comparison): Likewise.
18166 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18169 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18170 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18171 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18173 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18175 PR middle-end/83665
18176 * params.def (inline-min-speedup): Increase from 8 to 15.
18177 (max-inline-insns-auto): Decrease from 40 to 30.
18178 * ipa-split.c (consider_split): Add some buffer for function to
18179 be considered inlining candidate.
18180 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18183 2018-02-12 Richard Biener <rguenther@suse.de>
18185 PR tree-optimization/84037
18186 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18187 matched stmts if we cannot swap the non-matched ones.
18189 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18191 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18192 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18193 _mm_maskz_scalef_round_ss): New intrinsics.
18194 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18195 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18196 __builtin_ia32_scalefss_round): Remove.
18197 (__builtin_ia32_scalefsd_mask_round,
18198 __builtin_ia32_scalefss_mask_round): New intrinsics.
18199 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18200 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18201 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18202 "<round_constraint>")): Changed to ...
18203 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18204 "<round_scalar_constraint>")): ... this.
18205 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18206 %0, %1, %2<round_op3>}"): Changed to ...
18207 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18208 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18209 %2<round_scalar_mask_op3>}"): ... this.
18210 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18212 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18214 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18215 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18216 (_mm_maskz_sqrt_round_ss): New intrinsics.
18217 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18218 (__builtin_ia32_sqrtsd_mask_round)
18219 (__builtin_ia32_sqrtss_mask_round): New builtins.
18220 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18221 (__builtin_ia32_sqrtss_round): Remove.
18222 (__builtin_ia32_sqrtsd_mask_round)
18223 (__builtin_ia32_sqrtss_mask_round): New builtins.
18224 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18225 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18226 ((match_operand:VF_128 1 "vector_operand"
18227 "xBm,<round_constraint>")): Changed to ...
18228 ((match_operand:VF_128 1 "vector_operand"
18229 "xBm,<round_scalar_constraint>")): ... this.
18230 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18231 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18232 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18233 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18234 %<iptr>1<round_scalar_mask_op3>}): ... this.
18235 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18236 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18238 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18241 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18242 Cast vec_cmpeq result to correct type.
18243 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18244 Cast vec_cmpgt result to correct type.
18246 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18248 * final.c (final_scan_insn_1): Renamed from...
18249 (final_scan_insn): ... this. New wrapper, to recover
18250 seen from the outermost call in recursive ones.
18251 * config/sparc/sparc.c (output_return): Drop seen from call.
18252 (output_sibcall): Likewise.
18253 * config/visium/visium.c (output_branch): Likewise.
18255 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18257 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18260 2018-02-10 Alan Modra <amodra@gmail.com>
18263 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18264 Specify LR as an input.
18266 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18269 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18270 remove_member_access_dummy_vars): New functions.
18271 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18272 lower_omp_1, execute_lower_omp): Use them.
18274 PR rtl-optimization/84308
18275 * shrink-wrap.c (spread_components): Release todo vector.
18277 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18279 PR rtl-optimization/57193
18280 * ira-color.c (struct allocno_color_data): Add member
18281 conflict_allocno_hard_prefs.
18282 (update_conflict_allocno_hard_prefs): New.
18283 (bucket_allocno_compare_func): Add a preference based on
18284 conflict_allocno_hard_prefs.
18285 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18286 (color_allocnos): Remove a dead code. Initiate
18287 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18289 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18292 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18293 constraint from =wa to wa. Avoid a subreg on the output operand,
18294 instead use a pseudo and subreg it in a move.
18295 (p9_xxbrd_<mode>): Changed to ...
18296 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18297 (p9_xxbrd_v2df): New expander.
18298 (p9_xxbrw_<mode>): Changed to ...
18299 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18300 (p9_xxbrw_v4sf): New expander.
18302 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18304 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18306 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
18309 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18310 multiply in 32-bit mode.
18311 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18312 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18315 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18317 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18318 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18319 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18320 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18322 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
18325 * dwarf2out.c (is_trivial_indirect_ref): New function.
18326 (dwarf2out_late_global_decl): Do not generate a location
18327 attribute for variables that have a non-trivial DECL_VALUE_EXPR
18328 and that are not defined in the current unit.
18330 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18332 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18333 instead of a libcall for UNORDERED.
18335 2018-02-09 Tamar Christina <tamar.christina@arm.com>
18338 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18339 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18341 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18344 * config/s390/s390.c (s390_set_current_function): Invoke
18345 s390_indirect_branch_settings also if fndecl didn't change.
18347 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18349 * config/rs6000/rs6000.md (blockage): Set length to zero.
18351 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18353 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18355 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18358 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18359 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18363 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18364 PARALLEL incoming that failed vt_get_decl_and_offset check.
18366 PR middle-end/84237
18367 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18368 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18370 (get_variable_section): For decls in named .bss* sections pass true as
18371 second argument to bss_initializer_p.
18373 2018-02-09 Marek Polacek <polacek@redhat.com>
18374 Jakub Jelinek <jakub@redhat.com>
18377 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18378 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
18379 Sync some changes from cxx_fold_indirect_ref.
18381 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18383 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18385 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18386 (BLOCK_INLINE_ENTRY_LABEL): New.
18387 (dwarf2out_var_location): Disregard inline entry markers.
18388 (inline_entry_data): New struct.
18389 (inline_entry_data_hasher): New hashtable type.
18390 (inline_entry_data_hasher::hash): New.
18391 (inline_entry_data_hasher::equal): New.
18392 (inline_entry_data_table): New variable.
18393 (add_high_low_attributes): Add DW_AT_entry_pc and
18394 DW_AT_GNU_entry_view attributes if a pending entry is found
18395 in inline_entry_data_table. Add old entry_pc attribute only
18396 if debug nonbinding markers are disabled.
18397 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18398 markers are enabled.
18399 (block_within_block_p, dwarf2out_inline_entry): New.
18400 (dwarf2out_finish): Check that no entries remained in
18401 inline_entry_data_table.
18402 * final.c (reemit_insn_block_notes): Handle inline entry notes.
18403 (final_scan_insn, notice_source_line): Likewise.
18404 (rest_of_clean_state): Skip inline entry markers.
18405 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18407 * gimple.c (gimple_build_debug_inline_entry): New.
18408 * gimple.h (enum gimple_debug_subcode): Add
18409 GIMPLE_DEBUG_INLINE_ENTRY.
18410 (gimple_build_debug_inline_entry): Declare.
18411 (gimple_debug_inline_entry_p): New.
18412 (gimple_debug_nonbind_marker_p): Adjust.
18413 * insn-notes.def (INLINE_ENTRY): New.
18414 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18415 inline entry marker notes.
18416 (print_insn): Likewise.
18417 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18418 (INSN_DEBUG_MARKER_KIND): Likewise.
18419 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18420 * tree-inline.c (expand_call_inline): Build and insert
18421 debug_inline_entry stmt.
18422 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18423 inline entry blocks early, if nonbind markers are enabled.
18424 (dump_scope_block): Dump fragment info.
18425 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18426 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18427 (gimple_build_debug_inline_entry): New.
18428 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18429 Enable/disable inline entry points too.
18430 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18431 (DEBUG_INSN): Describe inline entry markers.
18433 * common.opt (gvariable-location-views): New.
18434 (gvariable-location-views=incompat5): New.
18435 * config.in: Rebuilt.
18436 * configure: Rebuilt.
18437 * configure.ac: Test assembler for view support.
18438 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18439 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18440 * dwarf2out.c (var_loc_view): New typedef.
18441 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18442 (dwarf2out_locviews_in_attribute): New.
18443 (dwarf2out_locviews_in_loclist): New.
18444 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18445 (enum dw_line_info_opcode): Add LI_adv_address.
18446 (struct dw_line_info_table): Add view.
18447 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18448 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18449 (zero_view_p): New variable.
18450 (ZERO_VIEW_P): New macro.
18451 (output_asm_line_debug_info): New.
18452 (struct var_loc_node): Add view.
18453 (add_AT_view_list, AT_loc_list): New.
18454 (add_var_loc_to_decl): Add view param. Test it against last.
18455 (new_loc_list): Add view params. Record them.
18456 (AT_loc_list_ptr): Handle loc and view lists.
18457 (view_list_to_loc_list_val_node): New.
18458 (print_dw_val): Handle dw_val_class_view_list.
18459 (size_of_die): Likewise.
18460 (value_format): Likewise.
18461 (loc_list_has_views): New.
18462 (gen_llsym): Set vl_symbol too.
18463 (maybe_gen_llsym, skip_loc_list_entry): New.
18464 (dwarf2out_maybe_output_loclist_view_pair): New.
18465 (output_loc_list): Output view list or entries too.
18466 (output_view_list_offset): New.
18467 (output_die): Handle dw_val_class_view_list.
18468 (output_dwarf_version): New.
18469 (output_compilation_unit_header): Use it.
18470 (output_skeleton_debug_sections): Likewise.
18471 (output_rnglists, output_line_info): Likewise.
18472 (output_pubnames, output_aranges): Update version comments.
18473 (output_one_line_info_table): Output view numbers in asm comments.
18474 (dw_loc_list): Determine current endview, pass it to new_loc_list.
18475 Call maybe_gen_llsym.
18476 (loc_list_from_tree_1): Adjust.
18477 (add_AT_location_description): Create view list attribute if
18478 needed, check it's absent otherwise.
18479 (convert_cfa_to_fb_loc_list): Adjust.
18480 (maybe_emit_file): Call output_asm_line_debug_info for test.
18481 (dwarf2out_var_location): Reset views as needed. Precompute
18482 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18483 attribute. Set view.
18484 (new_line_info_table): Reset next view.
18485 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18486 (dwarf2out_source_line): Likewise. Output view resets and labels to
18487 the assembler, or select appropriate line info opcodes.
18488 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18489 (optimize_string_length): Catch it. Adjust.
18490 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18491 dw_val_class_view_list, and remove it if no longer needed.
18492 (hash_loc_list): Hash view numbers.
18493 (loc_list_hasher::equal): Compare them.
18494 (optimize_location_lists): Check whether a view list symbol is
18495 needed, and whether the locview attribute is present, and
18496 whether they match. Remove the locview attribute if no longer
18498 (index_location_lists): Call skip_loc_list_entry for test.
18499 (dwarf2out_finish): Call output_asm_line_debug_info for test.
18500 Use output_dwarf_version.
18501 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18502 (struct dw_val_node): Add val_view_list.
18503 * final.c (SEEN_NEXT_VIEW): New.
18504 (set_next_view_needed): New.
18505 (clear_next_view_needed): New.
18506 (maybe_output_next_view): New.
18507 (final_start_function): Rename to...
18508 (final_start_function_1): ... this. Take pointer to FIRST,
18509 add SEEN parameter. Emit param bindings in the initial view.
18510 (final_start_function): Reintroduce SEEN-less interface.
18511 (final): Rename to...
18512 (final_1): ... this. Take SEEN parameter. Output final pending
18513 next view at the end.
18514 (final): Reintroduce seen-less interface.
18515 (final_scan_insn): Output pending next view before switching
18516 sections or ending a block. Mark the next view as needed when
18517 outputting variable locations. Notify debug backend of section
18518 changes, and of location view changes.
18519 (rest_of_handle_final): Adjust.
18520 * toplev.c (process_options): Autodetect value for debug variable
18521 location views option. Warn on incompat5 without -gdwarf-5.
18522 * doc/invoke.texi (gvariable-location-views): New.
18523 (gvariable-location-views=incompat5): New.
18524 (gno-variable-location-views): New.
18526 2018-02-08 David Malcolm <dmalcolm@redhat.com>
18528 PR tree-optimization/84136
18529 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18530 that the result of find_edge is non-NULL.
18532 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18535 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18536 storing integer register in SImode. Fix cost of 256 and 512
18537 byte aligned SSE register store.
18539 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18541 * config/i386/i386.c (ix86_multiplication_cost): Fix
18542 multiplication cost for TARGET_AVX512DQ.
18544 2018-02-08 Marek Polacek <polacek@redhat.com>
18546 PR tree-optimization/84238
18547 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18550 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18552 PR tree-optimization/84265
18553 * tree-vect-stmts.c (vectorizable_store): Don't treat
18554 VMAT_CONTIGUOUS accesses as grouped.
18555 (vectorizable_load): Likewise.
18557 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18559 PR tree-optimization/81635
18560 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18561 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18562 (test_round_for_mask): New functions.
18563 (wide_int_cc_tests): Call test_round_for_mask.
18564 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18565 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18566 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18567 range returned by get_range_info.
18569 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18572 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18573 * symtab.c: Include builtins.h
18574 (symtab_node::output_to_lto_symbol_table_p): Move here
18575 from lto-streamer-out.c:output_symbol_p.
18576 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18577 (output_symbol_p): Move all logic to symtab.c
18578 (produce_symtab): Update.
18580 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18582 * config/s390/s390-opts.h (enum indirect_branch): Define.
18583 * config/s390/s390-protos.h (s390_return_addr_from_memory)
18584 (s390_indirect_branch_via_thunk)
18585 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18586 (enum s390_indirect_branch_type): Define.
18587 * config/s390/s390.c (struct s390_frame_layout, struct
18588 machine_function): Remove.
18589 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18590 (indirect_branch_table_label_no, indirect_branch_table_name):
18592 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18593 (enum s390_indirect_branch_option): Define.
18594 (s390_return_addr_from_memory): New function.
18595 (s390_handle_string_attribute): New function.
18596 (s390_attribute_table): Add new attribute handler.
18597 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18598 (s390_indirect_branch_via_thunk): New function.
18599 (s390_indirect_branch_via_inline_thunk): New function.
18600 (s390_function_ok_for_sibcall): When jumping via thunk disallow
18601 sibling call optimization for non z10 compiles.
18602 (s390_emit_call): Force indirect branch target to be a single
18603 register. Add r1 clobber for non-z10 compiles.
18604 (s390_emit_epilogue): Emit return jump via return_use expander.
18605 (s390_reorg): Handle JUMP_INSNs as execute targets.
18606 (s390_option_override_internal): Perform validity checks for the
18607 new command line options.
18608 (s390_indirect_branch_attrvalue): New function.
18609 (s390_indirect_branch_settings): New function.
18610 (s390_set_current_function): Invoke s390_indirect_branch_settings.
18611 (s390_output_indirect_thunk_function): New function.
18612 (s390_code_end): Implement target hook.
18613 (s390_case_values_threshold): Implement target hook.
18614 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18616 * config/s390/s390.h (struct s390_frame_layout)
18617 (struct machine_function): Move here from s390.c.
18618 (TARGET_INDIRECT_BRANCH_NOBP_RET)
18619 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18620 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18621 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18622 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18623 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18624 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18625 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18626 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18627 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18628 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18629 (mnemonic attribute): Add values which aren't recognized
18631 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18632 pattern for branch conversion. Fix mnemonic attribute.
18633 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18634 indirect branch via thunk if requested.
18635 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18636 ("*indirect_jump"): Disable for branch conversion using out of
18638 ("indirect_jump_via_thunk<mode>_z10")
18639 ("indirect_jump_via_thunk<mode>")
18640 ("indirect_jump_via_inlinethunk<mode>_z10")
18641 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18642 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18643 ("casesi_jump_via_inlinethunk<mode>_z10")
18644 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18645 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18646 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18647 ("*indirect2_jump"): Disable for branch conversion.
18648 ("casesi_jump"): Turn into expander and expand patterns for branch
18650 ("return_use"): New expander.
18651 ("*return"): Emit return via thunk and rename it to ...
18652 ("*return<mode>"): ... this one.
18653 * config/s390/s390.opt: Add new options and and enum for the
18656 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18658 * lra-constraints.c (match_reload): Unconditionally use
18659 gen_lowpart_SUBREG, rather than selecting between that
18660 and equivalent gen_rtx_SUBREG code.
18662 2018-02-08 Richard Biener <rguenther@suse.de>
18664 PR tree-optimization/84233
18665 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18666 changed flag instead of boguously re-using phi_inserted.
18668 2018-02-08 Martin Jambor <mjambor@suse.cz>
18670 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18671 static local variables.
18673 2018-02-08 Richard Biener <rguenther@suse.de>
18675 PR tree-optimization/84278
18676 * tree-vect-stmts.c (vectorizable_store): When looking for
18677 smaller vector types to perform grouped strided loads/stores
18678 make sure the mode is supported by the target.
18679 (vectorizable_load): Likewise.
18681 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18683 * config/aarch64/aarch64.c (aarch64_components_for_bb):
18684 Increase LDP/STP opportunities by adding adjacent callee-saves.
18686 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18688 PR rtl-optimization/84068
18689 PR rtl-optimization/83459
18690 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18692 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
18694 PR tree-optimization/84224
18695 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18696 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18697 non-zero arguments.
18699 2018-02-07 Iain Sandoe <iain@codesourcery.com>
18702 * config/rs6000/altivec.md (*restore_world): Remove LR use.
18703 * config/rs6000/predicates.md (restore_world_operation): Adjust op
18704 count, remove one USE.
18706 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
18708 * doc/install.texi (Configuration): Document the
18709 --with-long-double-format={ibm,ieee} PowerPC configuration
18713 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18714 Convert from define_expand to be define_insn_and_split. Rework
18715 float/double/_Float128 conversions to QI/HI/SImode to work with
18716 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
18717 conversions to QI/HImode types did a store and then a load to
18718 truncate the value. For conversions to VSX registers, don't split
18719 the insn, instead emit the code directly. Use the code iterator
18720 any_fix to combine signed and unsigned conversions.
18721 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18722 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18723 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18724 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18725 (fix_<mode>di2_hw): Likewise.
18726 (fixuns_<mode>di2_hw): Likewise.
18727 (fix_<mode>si2_hw): Likewise.
18728 (fixuns_<mode>si2_hw): Likewise.
18729 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18730 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18731 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18732 fix<uns>_trunc<SFDF:mode>si2_p8.
18733 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18734 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18735 (fix<uns>_<mode>_mem): Likewise.
18736 (fctiw<u>z_<mode>_mem): Likewise.
18737 (fix<uns>_<mode>_mem): Likewise.
18738 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18739 the register allocator from doing a direct move to the GPRs to do
18740 a store, and instead use the ISA 3.0 store byte/half-word from
18741 vector register instruction. For IEEE 128-bit floating point,
18742 also optimize stores of 32-bit ints.
18743 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
18745 2018-02-07 Alan Hayward <alan.hayward@arm.com>
18747 * genextract.c (push_pathstr_operand): New function to support
18749 (walk_rtx): Call push_pathstr_operand.
18750 (print_path): Support [a-zA-Z].
18752 2018-02-07 Richard Biener <rguenther@suse.de>
18754 PR tree-optimization/84037
18755 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
18756 (cse_and_gimplify_to_preheader): Declare.
18757 (vect_get_place_in_interleaving_chain): Likewise.
18758 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18760 (_loop_vec_info::~_loop_vec_info): Delete it.
18761 (cse_and_gimplify_to_preheader): New function.
18762 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
18763 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
18764 (vectorizable_load): Likewise. For grouped stores always base
18765 the IV on the first element.
18766 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
18767 condition before gimplifying.
18769 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18771 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18772 *DIV_EXPR and *MOD_EXPR.
18774 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
18777 * config/i386/i386.c (ix86_option_override_internal): Mask out
18778 the CF_SET bit when checking -fcf-protection.
18780 2018-02-07 Tom de Vries <tom@codesourcery.com>
18783 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18786 2018-02-07 Richard Biener <rguenther@suse.de>
18788 PR tree-optimization/84204
18789 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18792 PR tree-optimization/84205
18793 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18794 special-case isl_ast_op_zdiv_r.
18796 PR tree-optimization/84223
18797 * graphite-scop-detection.c (gather_bbs::before_dom_children):
18798 Only add conditions from within the region.
18799 (gather_bbs::after_dom_children): Adjust.
18801 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
18804 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18805 * config/avr/avr.md: Only post-reload split REG-REG moves if
18806 either register is GENERAL_REG_P.
18808 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18810 PR tree-optimization/84235
18811 * tree-ssa-scopedtables.c
18812 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18813 if the subtraction is performed in floating point type where NaNs are
18814 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18815 build 1. Formatting fix.
18817 2018-02-06 Jakub Jelinek <jakub@redhat.com>
18820 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18821 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18822 and skip it regardless of bb boundaries. Use CALL_P macro,
18823 don't test INSN_P (insn) together with CALL_P or JUMP_P check
18824 unnecessarily, formatting fix.
18826 2018-02-06 Michael Collison <michael.collison@arm.com>
18828 * config/arm/thumb2.md:
18829 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
18830 (*thumb_mov_notscc): Ditto.
18832 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
18835 * config/rs6000/rs6000.md (su code attribute): Use "u" for
18836 unsigned_fix, not "s".
18838 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18840 * configure.ac (gcc_fn_eh_frame_ro): New function.
18841 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
18842 correct .eh_frame permissions.
18843 * configure: Regenerate.
18845 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
18847 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
18848 irrelevant options.
18850 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18852 * config/rs6000/rs6000.c (rs6000_option_override_internal):
18853 Display warning message for -mno-speculate-indirect-jumps.
18855 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
18857 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
18859 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
18861 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
18863 PR tree-optimization/84225
18864 * tree-eh.c (find_trapping_overflow): Only call
18865 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
18867 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18870 * config/i386/i386.c: Reimplement the check of possible options
18871 -mibt/-mshstk conbination. Change error messages.
18872 * doc/invoke.texi: Fix a typo: remove extra '='.
18874 2018-02-06 Marek Polacek <polacek@redhat.com>
18876 PR tree-optimization/84228
18877 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
18879 2018-02-06 Tamar Christina <tamar.christina@arm.com>
18882 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
18883 emitted arch directives.
18884 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
18885 __ARM_FEATURE_COPROC before changing architectures.
18887 2018-02-06 Richard Biener <rguenther@suse.de>
18889 * config/i386/i386.c (print_reg): Fix typo.
18890 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
18892 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
18894 * configure: Regenerate.
18896 2018-02-05 Martin Sebor <msebor@redhat.com>
18898 PR tree-optimization/83369
18899 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
18902 2018-02-05 Martin Liska <mliska@suse.cz>
18904 * doc/invoke.texi: Cherry-pick upstream r323995.
18906 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
18908 * ira.c (ira_init_register_move_cost): Adjust comment.
18910 2018-02-05 Martin Liska <mliska@suse.cz>
18912 PR gcov-profile/84137
18913 * doc/gcov.texi: Fix typo in documentation.
18915 2018-02-05 Martin Liska <mliska@suse.cz>
18917 PR gcov-profile/83879
18918 * doc/gcov.texi: Document necessity of --dynamic-list-data when
18919 using dlopen functionality.
18921 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
18923 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
18924 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
18925 _mm_maskz_range_ss, _mm_mask_range_round_ss,
18926 _mm_maskz_range_round_ss): New intrinsics.
18927 (__builtin_ia32_rangesd128_round)
18928 (__builtin_ia32_rangess128_round): Remove.
18929 (__builtin_ia32_rangesd128_mask_round,
18930 __builtin_ia32_rangess128_mask_round): New builtins.
18931 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
18932 __builtin_ia32_rangess128_round): Remove.
18933 (__builtin_ia32_rangesd128_mask_round,
18934 __builtin_ia32_rangess128_mask_round): New builtins.
18935 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
18936 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
18937 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
18938 "<round_saeonly_constraint>")): Changed to ...
18939 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
18940 "<round_saeonly_scalar_constraint>")): ... this.
18941 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
18942 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
18943 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
18944 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
18945 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
18947 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
18949 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
18951 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
18952 Remove all values except native, 8540 and 8548.
18954 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
18956 * config/i386/i386.c (ix86_output_function_return): Pass
18957 INVALID_REGNUM, instead of -1, as invalid register number to
18958 indirect_thunk_name and output_indirect_thunk.
18960 2018-02-02 Julia Koval <julia.koval@intel.com>
18962 * config.gcc: Add -march=icelake.
18963 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
18964 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
18965 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
18966 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
18967 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
18968 (processor_target_table): Add icelake.
18969 (ix86_option_override_internal): Handle new PTAs.
18970 (get_builtin_code_for_version): Handle icelake.
18971 (M_INTEL_COREI7_ICELAKE): New.
18972 (fold_builtin_cpu): Handle icelake.
18973 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
18974 * doc/invoke.texi: Add -march=icelake.
18976 2018-02-02 Julia Koval <julia.koval@intel.com>
18978 * config/i386/i386.c (ix86_option_override_internal): Change flags type
18979 to wide_int_bitmask.
18980 * wide-int-bitmask.h: New.
18982 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18985 * config/i386/i386.md: Replace Pmode with word_mode in
18986 builtin_setjmp_setup and builtin_longjmp to support x32.
18988 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
18992 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
18994 (rs6000_supported_cpu_names): New static variable.
18995 (linux_cpu_translation_table): Likewise.
18996 (elf_platform) <cpu>: Define new static variable and use it.
18997 Translate kernel AT_PLATFORM name to canonical name if needed.
18998 Error if platform name is unknown.
19000 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19003 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19005 2018-02-01 Jeff Law <law@redhat.com>
19008 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19009 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19010 the scratch if RELEASE_VIA_POP is false.
19011 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19012 If we have to save a temporary register, decrement SIZE appropriately.
19013 Pass new arguments to release_scratch_register_on_entry.
19014 (ix86_adjust_stack_and_probe): Likewise.
19015 (ix86_emit_probe_stack_range): Pass new arguments to
19016 release_scratch_register_on_entry.
19018 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19020 PR rtl-optimization/84157
19021 * combine.c (change_zero_ext): Use REG_P predicate in
19022 front of HARD_REGISTER_P predicate.
19024 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19026 * config/avr/avr.c (avr_option_override): Move disabling of
19027 -fdelete-null-pointer-checks to...
19028 * common/config/avr/avr-common.c (avr_option_optimization_table):
19031 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19033 PR tree-optimization/81635
19034 * tree-data-ref.c (split_constant_offset_1): For types that
19035 wrap on overflow, try to use range info to prove that wrapping
19038 2018-02-01 Renlin Li <renlin.li@arm.com>
19041 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19042 TAILCALL_ADDR_REGS.
19043 (aarch64_register_move_cost): Likewise.
19044 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19045 TAILCALL_ADDR_REGS.
19046 (REG_CLASS_NAMES): Likewise.
19047 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19048 TAILCALL_ADDR_REGS. Remove IP registers.
19049 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19051 2018-02-01 Richard Biener <rguenther@suse.de>
19053 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19054 for specifying RPO order and allow NULL for that.
19055 * domwalk.c (dom_walker::dom_walker): Likewise.
19056 (dom_walker::walk): Handle NULL RPO order.
19057 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19059 (rewrite_update_dom_walker): Likewise.
19060 (mark_def_dom_walker): Likewise.
19062 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19064 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19065 (aarch64_maybe_expand_sve_subreg_move): Declare.
19066 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19067 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19069 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19070 that are semantically a reverse operation.
19071 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19072 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19073 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19075 (aarch64_can_change_mode_class): For big-endian, forbid changes
19076 between two SVE modes if they have different element sizes.
19078 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19080 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19081 the TImode handling for big-endian targets.
19083 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19085 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19086 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19088 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19089 Remove BSWAP handing for big-endian targets and use the form of
19090 LD1RQ appropariate for the mode.
19092 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19094 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19095 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19096 duplicated element.
19098 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19101 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19102 check for operands that need to go through aarch64_sve_reload_be.
19104 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19106 PR tree-optimization/81661
19107 PR tree-optimization/84117
19108 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19109 * tree-eh.c: Include gimplify.h.
19110 (find_trapping_overflow, replace_trapping_overflow,
19111 rewrite_to_non_trapping_overflow): New functions.
19112 * tree-vect-loop.c: Include tree-eh.h.
19113 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19114 * tree-data-ref.c: Include tree-eh.h.
19115 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19117 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19119 PR rtl-optimization/84123
19120 * combine.c (change_zero_ext): Check if hard register satisfies
19121 can_change_dest_mode before calling gen_lowpart_SUBREG.
19123 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19126 * ira.c (ira_init_register_move_cost): Remove assert.
19128 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19130 PR rtl-optimization/84071
19131 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19132 * doc/tm.texi: Regenerate.
19134 2018-01-31 Richard Biener <rguenther@suse.de>
19136 PR tree-optimization/84132
19137 * tree-data-ref.c (analyze_miv_subscript): Properly
19138 check whether evolution_function_is_affine_multivariate_p
19139 before calling gcd_of_steps_may_divide_p.
19141 2018-01-31 Julia Koval <julia.koval@intel.com>
19144 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19145 * config/i386/i386.md (rdpid_rex64) New.
19146 (rdpid): Make 32bit only.
19148 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19151 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19152 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19154 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19157 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19159 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19161 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19163 PR rtl-optimization/84071
19164 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19165 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19167 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19169 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19170 (arc_attribute_table): Add 'aux' attribute.
19171 (arc_in_small_data_p): Consider aux like variables.
19172 (arc_is_aux_reg_p): New function.
19173 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19174 (arc_get_aux_arg): New function.
19175 (prepare_move_operands): Handle aux-register access.
19176 (arc_handle_aux_attribute): New function.
19177 * doc/extend.texi (ARC Variable attributes): Add subsection.
19179 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19181 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19182 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19183 (arc_attribute_table): Add 'uncached' attribute.
19184 (arc_print_operand): Print '.di' flag for uncached memory
19186 (arc_in_small_data_p): Do not consider for small data the uncached
19188 (arc_is_uncached_mem_p): New function.
19189 * config/arc/predicates.md (compact_store_memory_operand): Check
19190 for uncached memory accesses.
19191 (nonvol_nonimm_operand): Likewise.
19192 * doc/extend.texi (ARC Type Attribute): New subsection.
19194 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19197 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19198 falign-loops=): Add Optimization flag.
19200 2018-01-30 Jeff Law <law@redhat.com>
19203 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19204 INT_REGISTERS_SAVED. Check it prior to calling
19205 get_scratch_register_on_entry.
19206 (ix86_adjust_stack_and_probe): Similarly.
19207 (ix86_emit_probe_stack_range): Similarly.
19208 (ix86_expand_prologue): Corresponding changes.
19210 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19213 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19214 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19216 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19219 * lra-constraints.c (curr_insn_transform): Process AND in the
19222 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19224 PR rtl-optimization/83986
19225 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19226 dependence against last_pending_memory_flush in addition to
19227 pending_jump_insns.
19229 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19231 PR tree-optimization/81611
19232 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19235 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19238 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19241 2018-01-30 Richard Biener <rguenther@suse.de>
19242 Jakub Jelinek <jakub@redhat.com>
19244 PR tree-optimization/84111
19245 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19246 inner loops added during recursion, as they don't have up-to-date
19249 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19252 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19253 (can_inline_edge_by_limits_p): ... here.
19254 (can_early_inline_edge_p, check_callers,
19255 update_caller_keys, update_callee_keys, recursive_inlining,
19256 add_new_edges_to_heap, speculation_useful_p,
19257 inline_small_functions,
19258 inline_small_functions, flatten_function,
19259 inline_to_all_callers_1): Update.
19261 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19263 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19266 2018-01-30 Richard Biener <rguenther@suse.de>
19268 PR tree-optimization/83008
19269 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19270 invariant and constant vector uses in stmts when they need
19271 more than one stmt.
19273 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19276 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19277 * configure: Regenerate.
19279 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19281 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19283 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19284 Use gen_rtx_REG rather than gen_lowpart.
19286 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19288 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19289 rather than 0 when creating partial subregs.
19291 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19293 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19296 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
19299 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19300 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19301 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19302 flags. This restores the settings used before the 2017-07-24.
19303 Turning off pre increment/decrement/modify allows IVOPTS to
19304 optimize DF/SF loops where the index is an int.
19306 2018-01-29 Richard Biener <rguenther@suse.de>
19307 Kelvin Nilsen <kelvin@gcc.gnu.org>
19310 * tree-vect-stmts.c (vectorizable_call): Don't call
19311 targetm.vectorize_builtin_md_vectorized_function if callee is
19314 2018-01-22 Carl Love <cel@us.ibm.com>
19316 * doc/extend.tex: Fix typo in second arg in
19317 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19319 2018-01-29 Richard Biener <rguenther@suse.de>
19321 PR tree-optimization/84086
19322 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19323 (flush_ssaname_freelist): When SSA names were released reset
19324 the SCEV hash table.
19326 2018-01-29 Richard Biener <rguenther@suse.de>
19328 PR tree-optimization/84057
19329 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19330 removed paths when removing edges.
19332 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
19334 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19335 -mfunction-return=@var{choice}.
19337 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
19339 PR diagnostic/84034
19340 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19341 Handle CR like TAB.
19342 (layout::print_source_line): Likewise.
19343 (test_get_line_width_without_trailing_whitespace): Add test cases.
19345 2018-01-27 Jakub Jelinek <jakub@redhat.com>
19347 PR middle-end/84040
19348 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19351 2018-01-26 Jim Wilson <jimw@sifive.com>
19353 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19355 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19358 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19360 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19361 and CMP + SUB-immediate -> SUBS.
19363 2018-01-26 Martin Sebor <msebor@redhat.com>
19365 PR tree-optimization/83896
19366 * tree-ssa-strlen.c (get_string_len): Rename...
19367 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
19368 Avoid assuming length is constant.
19369 (handle_char_store): Use HOST_WIDE_INT for string length.
19371 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
19374 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19375 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19377 2018-01-26 Richard Biener <rguenther@suse.de>
19379 PR rtl-optimization/84003
19380 * dse.c (record_store): Only record redundant stores when
19381 the earlier store aliases at least all accesses the later one does.
19383 2018-01-26 Jakub Jelinek <jakub@redhat.com>
19385 PR rtl-optimization/83985
19386 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19387 REG_CFA_RESTORE insns.
19388 (delete_unmarked_insns): Don't ignore separate shrink wrapping
19389 REG_CFA_RESTORE insns here.
19392 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19393 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19395 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19397 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19398 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19399 (arc_init): Likewise.
19400 (arc_override_options): Likewise.
19401 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19403 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19405 * config/arc/arc.h (TARGET_DBNZ): Define.
19406 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19407 properly set the tune attribute.
19408 (dbnz): Use TARGET_DBNZ guard.
19409 * config/arc/arc.opt (mtune): Add core3 option.
19411 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19413 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19414 recognize new pic like addresses.
19415 (arc_delegitimize_address): Clean up.
19417 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19419 * config/arc/arc-arches.def: Option mrf16 valid for all
19421 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19422 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19423 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19424 * config/arc/arc-tables.opt: Regenerate.
19425 * config/arc/arc.c (arc_conditional_register_usage): Handle
19426 reduced register file case.
19427 (arc_file_start): Set must have build attributes.
19428 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19429 mrf16 option value.
19430 * config/arc/arc.opt (mrf16): Add new option.
19431 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19432 * config/arc/genmultilib.awk: Handle new mrf16 option.
19433 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19434 * config/arc/t-multilib: Regenerate.
19435 * doc/invoke.texi (ARC Options): Document mrf16 option.
19437 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19439 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19440 * config/arc/arc.c (arc_handle_secure_attribute): New function.
19441 (arc_attribute_table): Add 'secure_call' attribute.
19442 (arc_print_operand): Print secure call operand.
19443 (arc_function_ok_for_sibcall): Don't optimize tail calls when
19445 (arc_is_secure_call_p): New function. * config/arc/arc.md
19446 (call_i): Add support for sjli instruction.
19447 (call_value_i): Likewise.
19448 * config/arc/constraints.md (Csc): New constraint.
19450 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19451 John Eric Martin <John.Martin@emmicro-us.com>
19453 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19454 * config/arc/arc.c (_arc_jli_section): New struct.
19455 (arc_jli_section): New type.
19456 (rc_jli_sections): New static variable.
19457 (arc_handle_jli_attribute): New function.
19458 (arc_attribute_table): Add jli_always and jli_fixed attribute.
19459 (arc_file_end): New function.
19460 (TARGET_ASM_FILE_END): Define.
19461 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19462 (arc_add_jli_section): New function.
19463 (jli_call_scan): Likewise.
19464 (arc_reorg): Call jli_call_scan.
19465 (arc_output_addsi): Remove 'S' from printing asm operand.
19466 (arc_is_jli_call_p): New function.
19467 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19469 (movhi_insn): Likewise.
19470 (movsi_insn): Likewise.
19471 (movsi_set_cc_insn): Likewise.
19472 (loadqi_update): Likewise.
19473 (load_zeroextendqisi_update): Likewise.
19474 (load_signextendqisi_update): Likewise.
19475 (loadhi_update): Likewise.
19476 (load_zeroextendhisi_update): Likewise.
19477 (load_signextendhisi_update): Likewise.
19478 (loadsi_update): Likewise.
19479 (loadsf_update): Likewise.
19480 (movsicc_insn): Likewise.
19481 (bset_insn): Likewise.
19482 (bxor_insn): Likewise.
19483 (bclr_insn): Likewise.
19484 (bmsk_insn): Likewise.
19485 (bicsi3_insn): Likewise.
19486 (cmpsi_cc_c_insn): Likewise.
19487 (movsi_ne): Likewise.
19488 (movsi_cond_exec): Likewise.
19489 (clrsbsi2): Likewise.
19490 (norm_f): Likewise.
19500 (call_i): Remove 'S' asm letter, add jli instruction.
19501 (call_value_i): Likewise.
19502 * config/arc/arc.op (mjli-always): New option.
19503 * config/arc/constraints.md (Cji): New constraint.
19504 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19506 (subsf3_fpx): Likewise.
19507 (mulsf3_fpx): Likewise.
19508 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19510 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19511 function attrbutes.
19512 * doc/invoke.texi (ARC): Document mjli-always option.
19514 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
19516 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19517 avoid addition with 0 and use incw and decw where possible.
19519 2018-01-26 Richard Biener <rguenther@suse.de>
19521 PR tree-optimization/81082
19522 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19523 association if it requires casting to unsigned.
19524 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19525 from fold_plusminus_mult_expr to catch important cases late when
19526 range info is available.
19528 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19530 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19531 * configure.ac (hidden_linkonce): New test.
19532 * configure: Regenerate.
19533 * config.in: Regenerate.
19535 2018-01-26 Julia Koval <julia.koval@intel.com>
19537 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19538 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19539 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19540 _mm_mask_bitshuffle_epi64_mask): Fix type.
19541 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19542 USI_FTYPE_V4DI_V4DI_USI): Remove.
19543 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19544 __builtin_ia32_vpshufbitqmb256_mask,
19545 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19546 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19547 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19549 2018-01-26 Alan Modra <amodra@gmail.com>
19552 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19553 UNSPEC_VBPERMQ. Sort other unspecs.
19555 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
19557 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19559 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
19561 PR middle-end/83055
19562 * predict.c (drop_profile): Do not push/pop cfun; update also
19564 (handle_missing_profiles): Fix logic looking for zero profiles.
19566 2018-01-25 Jakub Jelinek <jakub@redhat.com>
19568 PR middle-end/83977
19569 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19570 on functions with #pragma omp declare simd or functions with simd
19572 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19573 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19574 Remove trailing \n from warning_at calls.
19576 2018-01-25 Tom de Vries <tom@codesourcery.com>
19579 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19580 for neutered workers.
19582 2018-01-24 Joseph Myers <joseph@codesourcery.com>
19585 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19586 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19588 2018-01-24 Jeff Law <law@redhat.com>
19591 * i386.c (get_probe_interval): Move to earlier point.
19592 (ix86_compute_frame_layout): If -fstack-clash-protection and
19593 the frame is larger than the probe interval, then use pushes
19594 to save registers rather than reg->mem moves.
19595 (ix86_expand_prologue): Remove conditional for int_registers_saved
19598 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
19601 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19602 min/max for never referenced object.
19604 2018-01-24 Jakub Jelinek <jakub@redhat.com>
19606 PR middle-end/83977
19607 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19609 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19610 attributes from DECL_ATTRIBUTES (decl) without affecting
19611 DECL_ATTRIBUTES (current_function_decl).
19612 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19613 functions with non-NULL DECL_ABSTRACT_ORIGIN.
19615 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
19617 PR tree-optimization/83979
19618 * fold-const.c (fold_comparison): Use constant_boolean_node
19619 instead of boolean_{true,false}_node.
19621 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
19623 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19626 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19628 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19629 Simplify the clause that sets the length attribute.
19630 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19631 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19632 clause that sets the length attribute.
19633 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19635 2018-01-24 Tom de Vries <tom@codesourcery.com>
19638 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19639 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19640 Add strict parameter.
19641 (prevent_branch_around_nothing): Insert dummy insn between branch to
19642 label and label with no ptx insn inbetween.
19643 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19645 2018-01-24 Tom de Vries <tom@codesourcery.com>
19648 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19649 for neutered threads in warp.
19650 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19652 2018-01-24 Richard Biener <rguenther@suse.de>
19654 PR tree-optimization/83176
19655 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19658 2018-01-24 Richard Biener <rguenther@suse.de>
19660 PR tree-optimization/82819
19661 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19662 code generating pluses that are no-ops in the target precision.
19664 2018-01-24 Richard Biener <rguenther@suse.de>
19666 PR middle-end/84000
19667 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19669 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19671 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19672 to merge probabilities.
19673 * predict.c (probably_never_executed): Also mark as cold functions
19674 with global 0 profile and guessed local profile.
19675 * profile-count.c (profile_probability::combine_with_count): New
19677 * profile-count.h (profile_probability::operator*,
19678 profile_probability::operator*=, profile_probability::operator/,
19679 profile_probability::operator/=): Reduce precision to adjusted
19680 and set value to guessed on contradictory divisions.
19681 (profile_probability::combine_with_freq): Remove.
19682 (profile_probability::combine_wiht_count): Declare.
19683 (profile_count::force_nonzero):: Set to adjusted.
19684 (profile_count::probability_in):: Set quality to adjusted.
19685 * tree-ssa-tail-merge.c (replace_block_by): Use
19686 combine_with_count.
19688 2018-01-23 Andrew Waterman <andrew@sifive.com>
19689 Jim Wilson <jimw@sifive.com>
19691 * config/riscv/riscv.c (riscv_stack_boundary): New.
19692 (riscv_option_override): Set riscv_stack_boundary. Handle
19693 riscv_preferred_stack_boundary_arg.
19694 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19695 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19696 (STACK_BOUNDARY): Set to riscv_stack_boundary.
19697 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19698 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19699 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19701 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
19704 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19705 of struct ix86_frame.
19706 (ix86_expand_epilogue): Likewise. Add a local variable for
19707 the reg_save_offset field in struct ix86_frame.
19709 2018-01-23 Bin Cheng <bin.cheng@arm.com>
19711 PR tree-optimization/82604
19712 * tree-loop-distribution.c (enum partition_kind): New enum item
19713 PKIND_PARTIAL_MEMSET.
19714 (partition_builtin_p): Support above new enum item.
19715 (generate_code_for_partition): Ditto.
19716 (compute_access_range): Differentiate cases that equality can be
19717 proven at all loops, the innermost loops or no loops.
19718 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19719 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
19720 (finalize_partitions, distribute_loop): Don't fuse partition of
19721 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19722 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19723 parloop is enabled.
19725 2018-01-23 Martin Liska <mliska@suse.cz>
19727 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19728 order to ignore the predictor.
19729 (PRED_POLYMORPHIC_CALL): Likewise.
19730 (PRED_RECURSIVE_CALL): Likewise.
19732 2018-01-23 Martin Liska <mliska@suse.cz>
19734 * tree-profile.c (tree_profiling): Print function header to
19735 aware reader which function we are working on.
19736 * value-prof.c (gimple_find_values_to_profile): Do not print
19737 not interesting value histograms.
19739 2018-01-23 Martin Liska <mliska@suse.cz>
19741 * profile-count.h (enum profile_quality): Add
19742 profile_uninitialized as the first value. Do not number values
19743 as they are zero based.
19744 (profile_count::verify): Update sanity check.
19745 (profile_probability::verify): Likewise.
19747 2018-01-23 Nathan Sidwell <nathan@acm.org>
19749 * doc/invoke.texi (ffor-scope): Deprecate.
19751 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19753 PR tree-optimization/83510
19754 * domwalk.c (set_all_edges_as_executable): New function.
19755 (dom_walker::dom_walker): Convert bool param
19756 "skip_unreachable_blocks" to enum reachability. Move setup of
19757 edge flags to set_all_edges_as_executable and only do it when
19758 reachability is REACHABLE_BLOCKS.
19759 * domwalk.h (enum dom_walker::reachability): New enum.
19760 (dom_walker::dom_walker): Convert bool param
19761 "skip_unreachable_blocks" to enum reachability.
19762 (set_all_edges_as_executable): New decl.
19763 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
19764 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
19766 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
19767 but converting true to REACHABLE_BLOCKS.
19768 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19770 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19771 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19772 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19774 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19775 if check_all_array_refs will be called.
19777 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19779 * tree.c (selftest::test_location_wrappers): Add more test
19782 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19784 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19785 (selftest::test_bit_in_range): Likewise.
19787 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19790 * doc/sourcebuild.texi (vect_float): Say that the selector
19791 only describes the situation when -funsafe-math-optimizations is on.
19792 (vect_float_strict): Document.
19794 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19796 PR tree-optimization/83965
19797 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19798 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19799 instead of checking only for a reduction.
19800 (vect_recog_widen_sum_pattern): Likewise.
19802 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19804 * predict.c (probably_never_executed): Only use precise profile info.
19805 (compute_function_frequency): Skip after inlining hack since we now
19806 have quality checking.
19808 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19810 * profile-count.h (profile_probability::very_unlikely,
19811 profile_probability::unlikely, profile_probability::even): Set
19812 precision to guessed.
19814 2018-01-23 Richard Biener <rguenther@suse.de>
19816 PR tree-optimization/83963
19817 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19818 Properly terminate dominator walk when crossing the exit edge not
19819 when visiting its source block.
19821 2018-01-23 Jakub Jelinek <jakub@redhat.com>
19824 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19825 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19827 2018-01-22 Jakub Jelinek <jakub@redhat.com>
19829 PR tree-optimization/83957
19830 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
19831 semicolon after for body surrounded by braces.
19833 PR tree-optimization/83081
19834 * profile-count.h (profile_probability::split): New method.
19835 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
19836 Use profile_probability::split.
19837 (do_compare_rtx_and_jump): Fix adjustment of probabilities
19838 when splitting a single conditional jump into 2.
19840 2018-01-22 David Malcolm <dmalcolm@redhat.com>
19842 PR tree-optimization/69452
19843 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
19846 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19848 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
19849 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
19850 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
19852 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19854 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
19856 * config/rl78/rl78.md (movdi): New define_expand.
19857 * config/rl78/rl78.c (rl78_split_movdi): New function.
19859 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
19862 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
19864 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
19865 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
19866 128-bit to produce an UNSPEC move to get the double word with the
19867 signbit and then a shift directly to do signbit.
19868 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
19869 implementation with a new version that just does either a direct
19870 move or a regular move. Move memory interface to separate insns.
19871 Move insns so they are next to the expander.
19872 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
19873 with signbit move. Split big and little endian case.
19874 (signbit<mode>2_dm_mem_le): Likewise.
19875 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
19876 (signbit<mode>2_dm2): Likewise.
19878 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19880 * config/rl78/rl78.md (anddi3): New define_expand.
19882 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19884 * config/rl78/rl78.md (umindi3): New define_expand.
19886 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19888 * config/rl78/rl78.md (smindi3): New define_expand.
19890 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19892 * config/rl78/rl78.md (smaxdi3): New define_expand.
19894 2018-01-22 Carl Love <cel@us.ibm.com>
19896 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
19897 LVX_V1TI): Add macro expansion.
19898 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
19899 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
19900 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
19901 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
19902 Change check to determine if the instruction is a byte reversing
19903 entry. Fix typo in comment.
19904 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
19905 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
19906 Add def_builtin calls for new builtins.
19907 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
19908 Add define_insn expansion.
19910 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19912 * config/rl78/rl78.md (umaxdi3): New define_expand.
19914 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19916 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
19917 for non-QImode registers.
19919 2018-01-22 Richard Biener <rguenther@suse.de>
19921 PR tree-optimization/83963
19922 * graphite-scop-detection.c (scop_detection::get_sese): Delay
19923 including the loop exit block.
19924 (scop_detection::merge_sese): Likewise.
19925 (scop_detection::add_scop): Do it here instead.
19927 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19929 * doc/sourcebuild.texi (arm_softfloat): Document.
19931 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
19934 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
19935 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
19936 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
19938 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19939 David Edelsohn <dje.gcc@gmail.com>
19942 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19943 Change "crset eq" to "crset 2".
19944 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19945 (*call_indirect_aix<mode>_nospec): Likewise.
19946 (*call_value_indirect_aix<mode>_nospec): Likewise.
19947 (*call_indirect_elfv2<mode>_nospec): Likewise.
19948 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
19949 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
19950 change assembly output from . to $.
19951 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19952 (indirect_jump<mode>_nospec): Change assembly output from . to $.
19953 (*tablejump<mode>_internal1_nospec): Likewise.
19955 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
19958 * config/sh/sh_optimize_sett_clrt.cc:
19959 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
19961 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
19963 PR tree-optimization/83940
19964 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
19965 offset_dt to vect_constant_def rather than vect_unknown_def_type.
19966 (vect_check_load_store_mask): Add a mask_dt_out parameter and
19967 use it to pass back the definition type.
19968 (vect_check_store_rhs): Likewise rhs_dt_out.
19969 (vect_build_gather_load_calls): Add a mask_dt argument and use
19970 it instead of a call to vect_is_simple_use.
19971 (vectorizable_store): Update calls to vect_check_load_store_mask
19972 and vect_check_store_rhs. Use the dt returned by the latter instead
19973 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
19974 instead of calls to vect_is_simple_use. Pass the scalar rather
19975 than the vector operand to vect_is_simple_use when handling
19976 second and subsequent copies of an rhs value.
19977 (vectorizable_load): Update calls to vect_check_load_store_mask
19978 and vect_build_gather_load_calls. Use the cached mask_dt and
19979 gs_info.offset_dt instead of calls to vect_is_simple_use.
19981 2018-01-20 Jakub Jelinek <jakub@redhat.com>
19983 PR middle-end/83945
19984 * tree-emutls.c: Include gimplify.h.
19985 (lower_emutls_2): New function.
19986 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
19987 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
19988 it before further processing.
19991 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
19992 UINTVAL (trueop1) instead of INTVAL (op1).
19994 2018-01-19 Jakub Jelinek <jakub@redhat.com>
19998 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
19999 INCOMING_FRAME_SP_OFFSET if not defined.
20000 (scan_trace): Add ENTRY argument. If true and
20001 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20002 emit a note to adjust the CFA offset.
20003 (create_cfi_notes): Adjust scan_trace callers.
20004 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20005 INCOMING_FRAME_SP_OFFSET in the CIE.
20006 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20007 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20009 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20010 * doc/tm.texi: Regenerated.
20012 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20014 PR rtl-optimization/83147
20015 * lra-constraints.c (remove_inheritance_pseudos): Use
20016 lra_substitute_pseudo_within_insn.
20018 2018-01-19 Tom de Vries <tom@codesourcery.com>
20019 Cesar Philippidis <cesar@codesourcery.com>
20022 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20024 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20027 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20028 spaces for function labels.
20030 2018-01-19 Martin Liska <mliska@suse.cz>
20032 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20033 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20034 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20035 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20036 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20037 (PRED_CONST_RETURN): Change from 69 to 65.
20038 (PRED_NULL_RETURN): Change from 91 to 71.
20039 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20040 (PRED_LOOP_GUARD): Change from 66 to 73.
20042 2018-01-19 Martin Liska <mliska@suse.cz>
20044 * predict.c (predict_insn_def): Add new assert.
20045 (struct branch_predictor): Change type to signed integer.
20046 (test_prediction_value_range): Amend test to cover
20047 PROB_UNINITIALIZED.
20048 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20049 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20050 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20051 (PRED_LOOP_IV_COMPARE): Likewise.
20052 * predict.h (PROB_UNINITIALIZED): Define new constant.
20054 2018-01-19 Martin Liska <mliska@suse.cz>
20056 * predict.c (dump_prediction): Add new format for
20057 analyze_brprob.py script which is enabled with -details
20059 * profile-count.h (precise_p): New function.
20061 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20063 PR tree-optimization/83922
20064 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20065 there are no statements that need masking.
20066 (vect_active_double_reduction_p): New function.
20067 (vect_analyze_loop_operations): Use it when handling phis that
20068 are not in the loop header.
20070 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20072 PR tree-optimization/83914
20073 * tree-vect-loop.c (vectorizable_induction): Don't convert
20074 init_expr or apply the peeling adjustment for inductions
20075 that are nested within the vectorized loop.
20077 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20079 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20082 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20086 * function.h (gimplify_parameters): Add gimple_seq * argument.
20087 * function.c: Include gimple.h and options.h.
20088 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20089 for the added local temporaries if needed.
20090 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20091 if there are any parameter cleanups, wrap whole body into a
20092 try/finally with the cleanups.
20094 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20097 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20098 Use GET_MODE_CLASS for scalar floating point.
20100 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20104 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20105 Fix call of call_cgraph_insertion_hooks.
20107 2018-01-18 Martin Sebor <msebor@redhat.com>
20109 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20111 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20114 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20117 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20120 * common.opt: (-ffile-prefix-map): New option.
20121 * opts.c (common_handle_option): Defer it.
20122 * opts-global.c (handle_common_deferred_options): Handle it.
20123 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20124 * file-prefix-map.h: New file.
20125 (remap_debug_filename, add_debug_prefix_map): ...here.
20126 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20127 * final.c (debug_prefix_map, add_debug_prefix_map
20128 remap_debug_filename): Move to...
20129 * file-prefix-map.c: New file.
20130 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20131 generalize, get rid of alloca(), use strrchr() instead of strchr().
20132 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20133 Implement in terms of add_prefix_map().
20134 (remap_macro_filename, remap_debug_filename): Implement in term of
20136 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20137 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20138 * dbxout.c: Include file-prefix-map.h.
20139 * varasm.c: Likewise.
20140 * vmsdbgout.c: Likewise.
20141 * xcoffout.c: Likewise.
20142 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20143 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20144 * doc/invoke.texi (-ffile-prefix-map): Document.
20145 (-fdebug-prefix-map): Update description.
20147 2018-01-18 Martin Liska <mliska@suse.cz>
20149 * config/i386/i386.c (indirect_thunk_name): Document that also
20151 (output_indirect_thunk): Document why both instructions
20152 (pause and lfence) are generated.
20154 2018-01-18 Richard Biener <rguenther@suse.de>
20156 PR tree-optimization/83887
20157 * graphite-scop-detection.c
20158 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20159 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20160 (scop_detection::merge_sese): Re-implement with a flood-fill
20161 algorithm that properly finds a SESE region if it exists.
20163 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20166 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20167 pointer_diff optimizations use view_convert instead of convert.
20169 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20171 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20172 Generate different code for -mno-speculate-indirect-jumps.
20173 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20174 (*call_indirect_aix<mode>): Disable for
20175 -mno-speculate-indirect-jumps.
20176 (*call_indirect_aix<mode>_nospec): New define_insn.
20177 (*call_value_indirect_aix<mode>): Disable for
20178 -mno-speculate-indirect-jumps.
20179 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20180 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20181 -mno-speculate-indirect-jumps.
20182 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20184 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20186 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20187 long double type, set the flags for noting the default long double
20188 type, even if we don't pass or return a long double type.
20190 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20193 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20196 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20198 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20199 support for merge[hl].
20200 (fold_mergehl_helper): New helper function.
20201 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20202 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20203 (altivec_vmrglw_direct): Add xxmrglw insn.
20205 2018-01-17 Andrew Waterman <andrew@sifive.com>
20207 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20208 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20210 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20213 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20214 call the lto_location_cache before reading the
20215 DECL_SOURCE_LOCATION of the types.
20217 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20218 Richard Sandiford <richard.sandiford@linaro.org>
20220 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20221 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20222 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20223 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20224 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20226 * config/aarch64/constraints.md (aarch64_movti_operand):
20228 * config/aarch64/predicates.md (Uti): Add new constraint.
20230 2018-01-17 Carl Love <cel@us.ibm.com>
20232 * config/rs6000/vsx.md (define_expand xl_len_r,
20233 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20234 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20236 (define_expand, define_insn): Move the shift left from the
20237 define_insn to the define_expand for lxvl and stxvl instructions.
20238 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20239 and XL_LEN_R definitions to PURE.
20241 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20243 * config/i386/i386.c (indirect_thunk_name): Declare regno
20244 as unsigned int. Compare regno with INVALID_REGNUM.
20245 (output_indirect_thunk): Ditto.
20246 (output_indirect_thunk_function): Ditto.
20247 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20248 in the call to output_indirect_thunk_function.
20250 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20252 PR middle-end/83884
20253 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20254 rather than the size of inner_type to determine the stack slot size
20255 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20257 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20260 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20263 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20265 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20266 endian Linux systems to optionally enable multilibs for selecting
20267 the long double type if the user configured an explicit type.
20268 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20269 have no long double multilibs if not defined.
20270 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20271 warn if the user used -mabi={ieee,ibm}longdouble and we built
20272 multilibs for long double.
20273 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20274 appropriate multilib option.
20275 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20277 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20278 for building long double multilibs.
20279 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20281 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20283 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20286 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20288 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20291 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20294 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20297 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20299 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20300 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20302 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
20304 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20305 different rtl trees depending on TARGET_64BIT.
20306 (rs6000_gen_lvx): Likewise.
20308 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20310 * config/visium/visium.md (nop): Tweak comment.
20311 (hazard_nop): Likewise.
20313 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20315 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20316 -mspeculate-indirect-jumps.
20317 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20318 for -mno-speculate-indirect-jumps.
20319 (*call_indirect_elfv2<mode>_nospec): New define_insn.
20320 (*call_value_indirect_elfv2<mode>): Disable for
20321 -mno-speculate-indirect-jumps.
20322 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20323 (indirect_jump): Emit different RTL for
20324 -mno-speculate-indirect-jumps.
20325 (*indirect_jump<mode>): Disable for
20326 -mno-speculate-indirect-jumps.
20327 (*indirect_jump<mode>_nospec): New define_insn.
20328 (tablejump): Emit different RTL for
20329 -mno-speculate-indirect-jumps.
20330 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20331 (tablejumpsi_nospec): New define_expand.
20332 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20333 (tablejumpdi_nospec): New define_expand.
20334 (*tablejump<mode>_internal1): Disable for
20335 -mno-speculate-indirect-jumps.
20336 (*tablejump<mode>_internal1_nospec): New define_insn.
20337 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20340 2018-01-16 Artyom Skrobov tyomitch@gmail.com
20342 * caller-save.c (insert_save): Drop unnecessary parameter. All
20345 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20346 Richard Biener <rguenth@suse.de>
20349 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20350 return early, inline manually is_gimple_sizepos. Make sure if we
20351 call gimplify_expr we don't end up with a gimple constant.
20352 * tree.c (variably_modified_type_p): Don't return true for
20353 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
20354 * gimplify.h (is_gimple_sizepos): Remove.
20356 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20358 PR tree-optimization/83857
20359 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20360 vectorizable_live_operation for pure SLP statements.
20361 (vectorizable_live_operation): Handle PHIs.
20363 2018-01-16 Richard Biener <rguenther@suse.de>
20365 PR tree-optimization/83867
20366 * tree-vect-stmts.c (vect_transform_stmt): Precompute
20367 nested_in_vect_loop_p since the scalar stmt may get invalidated.
20369 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20372 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20373 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20374 If off is not INTEGER_CST, issue a may not be aligned warning
20375 rather than isn't aligned. Use isn%'t rather than isn't.
20376 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20378 <case MULT_EXPR>: Improve the case when bottom and one of the
20379 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20380 operand, in that case check if the other operand is multiple of
20381 bottom divided by the INTEGER_CST operand.
20383 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20386 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20387 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20388 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20389 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20390 * config/pa/pa.c (pa_function_arg_advance): Likewise.
20391 (pa_function_arg, pa_arg_partial_bytes): Likewise.
20392 (pa_function_arg_size): New function.
20394 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20396 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20397 in a separate statement.
20399 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20401 PR tree-optimization/83847
20402 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20403 group gathers and scatters.
20405 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20407 PR rtl-optimization/86620
20408 * params.def (max-sched-ready-insns): Bump minimum value to 1.
20410 PR rtl-optimization/83213
20411 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20412 to last if both are JUMP_INSNs.
20414 PR tree-optimization/83843
20415 * gimple-ssa-store-merging.c
20416 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20417 store_immediate_info for bswap/nop orig_stores.
20419 2018-01-15 Andrew Waterman <andrew@sifive.com>
20421 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20423 <UDIV>: Increase cost if !TARGET_DIV.
20425 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
20427 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20428 (define_attr "cr_logical_3op"): New.
20429 (cceq_ior_compare): Adjust.
20430 (cceq_ior_compare_complement): Adjust.
20431 (*cceq_rev_compare): Adjust.
20432 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20433 (is_cracked_insn): Adjust.
20434 (insn_must_be_first_in_group): Adjust.
20435 * config/rs6000/40x.md: Adjust.
20436 * config/rs6000/440.md: Adjust.
20437 * config/rs6000/476.md: Adjust.
20438 * config/rs6000/601.md: Adjust.
20439 * config/rs6000/603.md: Adjust.
20440 * config/rs6000/6xx.md: Adjust.
20441 * config/rs6000/7450.md: Adjust.
20442 * config/rs6000/7xx.md: Adjust.
20443 * config/rs6000/8540.md: Adjust.
20444 * config/rs6000/cell.md: Adjust.
20445 * config/rs6000/e300c2c3.md: Adjust.
20446 * config/rs6000/e500mc.md: Adjust.
20447 * config/rs6000/e500mc64.md: Adjust.
20448 * config/rs6000/e5500.md: Adjust.
20449 * config/rs6000/e6500.md: Adjust.
20450 * config/rs6000/mpc.md: Adjust.
20451 * config/rs6000/power4.md: Adjust.
20452 * config/rs6000/power5.md: Adjust.
20453 * config/rs6000/power6.md: Adjust.
20454 * config/rs6000/power7.md: Adjust.
20455 * config/rs6000/power8.md: Adjust.
20456 * config/rs6000/power9.md: Adjust.
20457 * config/rs6000/rs64.md: Adjust.
20458 * config/rs6000/titan.md: Adjust.
20460 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20462 * config/i386/predicates.md (indirect_branch_operand): Rewrite
20463 ix86_indirect_branch_register logic.
20465 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20467 * config/i386/constraints.md (Bs): Update
20468 ix86_indirect_branch_register check. Don't check
20469 ix86_indirect_branch_register with GOT_memory_operand.
20471 * config/i386/predicates.md (GOT_memory_operand): Don't check
20472 ix86_indirect_branch_register here.
20473 (GOT32_symbol_operand): Likewise.
20475 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20477 * config/i386/predicates.md (constant_call_address_operand):
20478 Rewrite ix86_indirect_branch_register logic.
20479 (sibcall_insn_operand): Likewise.
20481 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20483 * config/i386/constraints.md (Bs): Replace
20484 ix86_indirect_branch_thunk_register with
20485 ix86_indirect_branch_register.
20487 * config/i386/i386.md (indirect_jump): Likewise.
20488 (tablejump): Likewise.
20489 (*sibcall_memory): Likewise.
20490 (*sibcall_value_memory): Likewise.
20491 Peepholes of indirect call and jump via memory: Likewise.
20492 * config/i386/i386.opt: Likewise.
20493 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20494 (GOT_memory_operand): Likewise.
20495 (call_insn_operand): Likewise.
20496 (sibcall_insn_operand): Likewise.
20497 (GOT32_symbol_operand): Likewise.
20499 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20501 PR middle-end/83837
20502 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20503 type rather than type addr's type points to.
20504 (expand_omp_atomic_mutex): Likewise.
20505 (expand_omp_atomic): Likewise.
20507 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20510 * config/i386/i386.c (output_indirect_thunk_function): Use
20511 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20512 for __x86_return_thunk.
20514 2018-01-15 Richard Biener <rguenther@suse.de>
20516 PR middle-end/83850
20517 * expmed.c (extract_bit_field_1): Fix typo.
20519 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20522 * config/arm/iterators.md (VF): New mode iterator.
20523 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20524 Remove integer-related logic from pattern.
20525 (neon_vabd<mode>_3): Likewise.
20527 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20529 PR middle-end/82694
20530 * common.opt (fstrict-overflow): No longer an alias.
20531 (fwrapv-pointer): New option.
20532 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20533 also for pointer types based on flag_wrapv_pointer.
20534 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20535 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20536 opts->x_flag_wrapv got set.
20537 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20538 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20539 POINTER_TYPE_OVERFLOW_UNDEFINED.
20540 * match.pd: Likewise in address comparison pattern.
20541 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20543 2018-01-15 Richard Biener <rguenther@suse.de>
20546 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20547 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
20548 Reset type names to their identifier if their TYPE_DECL doesn't
20549 have linkage (and thus is used for ODR and devirt).
20550 (save_debug_info_for_decl): Remove.
20551 (save_debug_info_for_type): Likewise.
20552 (add_tree_to_fld_list): Adjust.
20553 * tree-pretty-print.c (dump_generic_node): Make dumping of
20554 type names more robust.
20556 2018-01-15 Richard Biener <rguenther@suse.de>
20558 * BASE-VER: Bump to 8.0.1.
20560 2018-01-14 Martin Sebor <msebor@redhat.com>
20563 * builtins.c (check_access): Avoid warning when the no-warning bit
20566 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
20568 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20569 * ira-color (allocno_hard_regs_compare): Likewise.
20571 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
20574 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20575 Use .pushsection/.popsection.
20577 2018-01-14 Martin Sebor <msebor@redhat.com>
20580 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20582 2018-01-14 Jakub Jelinek <jakub@redhat.com>
20584 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20585 entry from extra_headers.
20586 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20587 extra_headers, make the list bitwise identical to the i?86-*-* one.
20589 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20591 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20592 -mcmodel=large with -mindirect-branch=thunk,
20593 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20594 -mfunction-return=thunk-extern.
20595 * doc/invoke.texi: Document -mcmodel=large is incompatible with
20596 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20597 -mfunction-return=thunk and -mfunction-return=thunk-extern.
20599 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20601 * config/i386/i386.c (print_reg): Print the name of the full
20602 integer register without '%'.
20603 (ix86_print_operand): Handle 'V'.
20604 * doc/extend.texi: Document 'V' modifier.
20606 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20608 * config/i386/constraints.md (Bs): Disallow memory operand for
20609 -mindirect-branch-register.
20611 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20612 (GOT_memory_operand): Likewise.
20613 (call_insn_operand): Likewise.
20614 (sibcall_insn_operand): Likewise.
20615 (GOT32_symbol_operand): Likewise.
20616 * config/i386/i386.md (indirect_jump): Call convert_memory_address
20617 for -mindirect-branch-register.
20618 (tablejump): Likewise.
20619 (*sibcall_memory): Likewise.
20620 (*sibcall_value_memory): Likewise.
20621 Disallow peepholes of indirect call and jump via memory for
20622 -mindirect-branch-register.
20623 (*call_pop): Replace m with Bw.
20624 (*call_value_pop): Likewise.
20625 (*sibcall_pop_memory): Replace m with Bs.
20626 * config/i386/i386.opt (mindirect-branch-register): New option.
20627 * doc/invoke.texi: Document -mindirect-branch-register option.
20629 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20631 * config/i386/i386-protos.h (ix86_output_function_return): New.
20632 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20633 set function_return_type.
20634 (indirect_thunk_name): Add ret_p to indicate thunk for function
20636 (output_indirect_thunk_function): Pass false to
20637 indirect_thunk_name.
20638 (ix86_output_indirect_branch_via_reg): Likewise.
20639 (ix86_output_indirect_branch_via_push): Likewise.
20640 (output_indirect_thunk_function): Create alias for function
20641 return thunk if regno < 0.
20642 (ix86_output_function_return): New function.
20643 (ix86_handle_fndecl_attribute): Handle function_return.
20644 (ix86_attribute_table): Add function_return.
20645 * config/i386/i386.h (machine_function): Add
20646 function_return_type.
20647 * config/i386/i386.md (simple_return_internal): Use
20648 ix86_output_function_return.
20649 (simple_return_internal_long): Likewise.
20650 * config/i386/i386.opt (mfunction-return=): New option.
20651 (indirect_branch): Mention -mfunction-return=.
20652 * doc/extend.texi: Document function_return function attribute.
20653 * doc/invoke.texi: Document -mfunction-return= option.
20655 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20657 * config/i386/i386-opts.h (indirect_branch): New.
20658 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20659 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20660 with local indirect jump when converting indirect call and jump.
20661 (ix86_set_indirect_branch_type): New.
20662 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20663 (indirectlabelno): New.
20664 (indirect_thunk_needed): Likewise.
20665 (indirect_thunk_bnd_needed): Likewise.
20666 (indirect_thunks_used): Likewise.
20667 (indirect_thunks_bnd_used): Likewise.
20668 (INDIRECT_LABEL): Likewise.
20669 (indirect_thunk_name): Likewise.
20670 (output_indirect_thunk): Likewise.
20671 (output_indirect_thunk_function): Likewise.
20672 (ix86_output_indirect_branch_via_reg): Likewise.
20673 (ix86_output_indirect_branch_via_push): Likewise.
20674 (ix86_output_indirect_branch): Likewise.
20675 (ix86_output_indirect_jmp): Likewise.
20676 (ix86_code_end): Call output_indirect_thunk_function if needed.
20677 (ix86_output_call_insn): Call ix86_output_indirect_branch if
20679 (ix86_handle_fndecl_attribute): Handle indirect_branch.
20680 (ix86_attribute_table): Add indirect_branch.
20681 * config/i386/i386.h (machine_function): Add indirect_branch_type
20682 and has_local_indirect_jump.
20683 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20685 (tablejump): Likewise.
20686 (*indirect_jump): Use ix86_output_indirect_jmp.
20687 (*tablejump_1): Likewise.
20688 (simple_return_indirect_internal): Likewise.
20689 * config/i386/i386.opt (mindirect-branch=): New option.
20690 (indirect_branch): New.
20693 (thunk-inline): Likewise.
20694 (thunk-extern): Likewise.
20695 * doc/extend.texi: Document indirect_branch function attribute.
20696 * doc/invoke.texi: Document -mindirect-branch= option.
20698 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
20701 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20703 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
20705 * ipa-inline.c (want_inline_small_function_p): Return false if
20706 inlining has already failed with CIF_FINAL_ERROR.
20707 (update_caller_keys): Call want_inline_small_function_p before
20709 (update_callee_keys): Likewise.
20711 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
20713 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20715 (rs6000_quadword_masked_address_p): Likewise.
20716 (quad_aligned_load_p): Likewise.
20717 (quad_aligned_store_p): Likewise.
20718 (const_load_sequence_p): Add comment to describe the outer-most loop.
20719 (mimic_memory_attributes_and_flags): New function.
20720 (rs6000_gen_stvx): Likewise.
20721 (replace_swapped_aligned_store): Likewise.
20722 (rs6000_gen_lvx): Likewise.
20723 (replace_swapped_aligned_load): Likewise.
20724 (replace_swapped_load_constant): Capitalize argument name in
20725 comment describing this function.
20726 (rs6000_analyze_swaps): Add a third pass to search for vector loads
20727 and stores that access quad-word aligned addresses and replace
20728 with stvx or lvx instructions when appropriate.
20729 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20730 New function prototype.
20731 (rs6000_quadword_masked_address_p): Likewise.
20732 (rs6000_gen_lvx): Likewise.
20733 (rs6000_gen_stvx): Likewise.
20734 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20735 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20736 when memory address is aligned.
20737 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20738 this split to select lvx instruction when memory address is aligned.
20739 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20740 instruction when memory address is aligned.
20741 (*vsx_le_perm_load_v16qi): Likewise.
20742 (four unnamed splitters): Modify to select the stvx instruction
20743 when memory is aligned.
20745 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
20747 * predict.c (determine_unlikely_bbs): Handle correctly BBs
20748 which appears in the queue multiple times.
20750 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20751 Alan Hayward <alan.hayward@arm.com>
20752 David Sherwood <david.sherwood@arm.com>
20754 * tree-vectorizer.h (vec_lower_bound): New structure.
20755 (_loop_vec_info): Add check_nonzero and lower_bounds.
20756 (LOOP_VINFO_CHECK_NONZERO): New macro.
20757 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
20758 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
20759 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
20760 fields. Make seg_len the distance travelled, not including the
20762 (dr_direction_indicator): Declare.
20763 (dr_zero_step_indicator): Likewise.
20764 (dr_known_forward_stride_p): Likewise.
20765 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
20767 (runtime_alias_check_p): Allow runtime alias checks with
20769 (operator ==): Compare access_size and align.
20770 (prune_runtime_alias_test_list): Rework for new distinction between
20771 the access_size and seg_len.
20772 (create_intersect_range_checks_index): Likewise. Cope with polynomial
20774 (get_segment_min_max): New function.
20775 (create_intersect_range_checks): Use it.
20776 (dr_step_indicator): New function.
20777 (dr_direction_indicator): Likewise.
20778 (dr_zero_step_indicator): Likewise.
20779 (dr_known_forward_stride_p): Likewise.
20780 * tree-loop-distribution.c (data_ref_segment_size): Return
20781 DR_STEP * (niters - 1).
20782 (compute_alias_check_pairs): Update call to the dr_with_seg_len
20784 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20785 (vect_preserves_scalar_order_p): New function, split out from...
20786 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
20787 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20788 (vect_vfa_access_size): New function.
20789 (vect_vfa_align): Likewise.
20790 (vect_compile_time_alias): Take access_size_a and access_b arguments.
20791 (dump_lower_bound): New function.
20792 (vect_check_lower_bound): Likewise.
20793 (vect_small_gap_p): Likewise.
20794 (vectorizable_with_step_bound_p): Likewise.
20795 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20796 depencies if the vectorization factor is 1. Convert the checks
20797 for nonzero steps into checks on the bounds of DR_STEP. Try using
20798 a bunds check for variable steps if the minimum required step is
20799 relatively small. Update calls to the dr_with_seg_len
20800 constructor and to vect_compile_time_alias.
20801 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20803 (vect_loop_versioning): Call it.
20804 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20806 (vect_estimate_min_profitable_iters): Account for any bounds checks.
20808 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20809 Alan Hayward <alan.hayward@arm.com>
20810 David Sherwood <david.sherwood@arm.com>
20812 * doc/sourcebuild.texi (vect_scatter_store): Document.
20813 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20815 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20817 * genopinit.c (main): Add supports_vec_scatter_store and
20818 supports_vec_scatter_store_cached to target_optabs.
20819 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20820 IFN_MASK_SCATTER_STORE.
20821 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20823 * internal-fn.h (internal_store_fn_p): Declare.
20824 (internal_fn_stored_value_index): Likewise.
20825 * internal-fn.c (scatter_store_direct): New macro.
20826 (expand_scatter_store_optab_fn): New function.
20827 (direct_scatter_store_optab_supported_p): New macro.
20828 (internal_store_fn_p): New function.
20829 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
20830 IFN_MASK_SCATTER_STORE.
20831 (internal_fn_mask_index): Likewise.
20832 (internal_fn_stored_value_index): New function.
20833 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
20834 for scatter stores.
20835 * optabs-query.h (supports_vec_scatter_store_p): Declare.
20836 * optabs-query.c (supports_vec_scatter_store_p): New function.
20837 * tree-vectorizer.h (vect_get_store_rhs): Declare.
20838 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
20839 true for scatter stores.
20840 (vect_gather_scatter_fn_p): Handle scatter stores too.
20841 (vect_check_gather_scatter): Consider using scatter stores if
20842 supports_vec_scatter_store_p.
20843 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
20844 scatter stores too.
20845 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20846 internal_fn_stored_value_index.
20847 (check_load_store_masking): Handle scatter stores too.
20848 (vect_get_store_rhs): Make public.
20849 (vectorizable_call): Use internal_store_fn_p.
20850 (vectorizable_store): Handle scatter store internal functions.
20851 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
20852 when deciding whether the end of the group has been reached.
20853 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
20854 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
20855 (mask_scatter_store<mode>): New insns.
20857 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20858 Alan Hayward <alan.hayward@arm.com>
20859 David Sherwood <david.sherwood@arm.com>
20861 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
20862 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
20863 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
20865 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
20866 Use vect_truncate_gather_scatter_offset if we can't treat the
20867 operation as a normal gather load or scatter store.
20868 (get_group_load_store_type): Take the gather_scatter_info
20869 as argument. Try using a gather load or scatter store for
20870 single-element groups.
20871 (get_load_store_type): Update calls to get_group_load_store_type
20872 and vect_use_strided_gather_scatters_p.
20874 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20875 Alan Hayward <alan.hayward@arm.com>
20876 David Sherwood <david.sherwood@arm.com>
20878 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
20879 optional tree argument.
20880 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
20882 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
20883 but continue to use the current value as a fallback.
20884 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
20885 to compare the updates.
20886 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
20887 (get_load_store_type): Use it when handling a strided access.
20888 (vect_get_strided_load_store_ops): New function.
20889 (vect_get_data_ptr_increment): Likewise.
20890 (vectorizable_load): Handle strided gather loads. Always pass
20891 a step to vect_create_data_ref_ptr and bump_vector_ptr.
20893 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20894 Alan Hayward <alan.hayward@arm.com>
20895 David Sherwood <david.sherwood@arm.com>
20897 * doc/md.texi (gather_load@var{m}): Document.
20898 (mask_gather_load@var{m}): Likewise.
20899 * genopinit.c (main): Add supports_vec_gather_load and
20900 supports_vec_gather_load_cached to target_optabs.
20901 * optabs-tree.c (init_tree_optimization_optabs): Use
20902 ggc_cleared_alloc to allocate target_optabs.
20903 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
20904 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
20906 * internal-fn.h (internal_load_fn_p): Declare.
20907 (internal_gather_scatter_fn_p): Likewise.
20908 (internal_fn_mask_index): Likewise.
20909 (internal_gather_scatter_fn_supported_p): Likewise.
20910 * internal-fn.c (gather_load_direct): New macro.
20911 (expand_gather_load_optab_fn): New function.
20912 (direct_gather_load_optab_supported_p): New macro.
20913 (direct_internal_fn_optab): New function.
20914 (internal_load_fn_p): Likewise.
20915 (internal_gather_scatter_fn_p): Likewise.
20916 (internal_fn_mask_index): Likewise.
20917 (internal_gather_scatter_fn_supported_p): Likewise.
20918 * optabs-query.c (supports_at_least_one_mode_p): New function.
20919 (supports_vec_gather_load_p): Likewise.
20920 * optabs-query.h (supports_vec_gather_load_p): Declare.
20921 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20922 and memory_type field.
20923 (NUM_PATTERNS): Bump to 15.
20924 * tree-vect-data-refs.c: Include internal-fn.h.
20925 (vect_gather_scatter_fn_p): New function.
20926 (vect_describe_gather_scatter_call): Likewise.
20927 (vect_check_gather_scatter): Try using internal functions for
20928 gather loads. Recognize existing calls to a gather load function.
20929 (vect_analyze_data_refs): Consider using gather loads if
20930 supports_vec_gather_load_p.
20931 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
20932 (vect_get_gather_scatter_offset_type): Likewise.
20933 (vect_convert_mask_for_vectype): Likewise.
20934 (vect_add_conversion_to_patterm): Likewise.
20935 (vect_try_gather_scatter_pattern): Likewise.
20936 (vect_recog_gather_scatter_pattern): New pattern recognizer.
20937 (vect_vect_recog_func_ptrs): Add it.
20938 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20939 internal_fn_mask_index and internal_gather_scatter_fn_p.
20940 (check_load_store_masking): Take the gather_scatter_info as an
20941 argument and handle gather loads.
20942 (vect_get_gather_scatter_ops): New function.
20943 (vectorizable_call): Check internal_load_fn_p.
20944 (vectorizable_load): Likewise. Handle gather load internal
20946 (vectorizable_store): Update call to check_load_store_masking.
20947 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
20948 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
20949 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
20950 (aarch64_gather_scale_operand_d): New predicates.
20951 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
20952 (mask_gather_load<mode>): New insns.
20954 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20955 Alan Hayward <alan.hayward@arm.com>
20956 David Sherwood <david.sherwood@arm.com>
20958 * optabs.def (fold_left_plus_optab): New optab.
20959 * doc/md.texi (fold_left_plus_@var{m}): Document.
20960 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
20961 * internal-fn.c (fold_left_direct): Define.
20962 (expand_fold_left_optab_fn): Likewise.
20963 (direct_fold_left_optab_supported_p): Likewise.
20964 * fold-const-call.c (fold_const_fold_left): New function.
20965 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
20966 * tree-parloops.c (valid_reduction_p): New function.
20967 (gather_scalar_reductions): Use it.
20968 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
20969 (vect_finish_replace_stmt): Declare.
20970 * tree-vect-loop.c (fold_left_reduction_fn): New function.
20971 (needs_fold_left_reduction_p): New function, split out from...
20972 (vect_is_simple_reduction): ...here. Accept reductions that
20973 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
20974 (vect_force_simple_reduction): Also store the reduction type in
20975 the assignment's STMT_VINFO_REDUC_TYPE.
20976 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
20977 (merge_with_identity): New function.
20978 (vect_expand_fold_left): Likewise.
20979 (vectorize_fold_left_reduction): Likewise.
20980 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
20981 scalar phi in place for it. Check for target support and reject
20982 cases that would reassociate the operation. Defer the transform
20983 phase to vectorize_fold_left_reduction.
20984 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
20985 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
20986 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
20988 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20990 * tree-if-conv.c (predicate_mem_writes): Remove redundant
20991 call to ifc_temp_var.
20993 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20994 Alan Hayward <alan.hayward@arm.com>
20995 David Sherwood <david.sherwood@arm.com>
20997 * target.def (legitimize_address_displacement): Take the original
20998 offset as a poly_int.
20999 * targhooks.h (default_legitimize_address_displacement): Update
21001 * targhooks.c (default_legitimize_address_displacement): Likewise.
21002 * doc/tm.texi: Regenerate.
21003 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21004 as an argument, moving assert of ad->disp == ad->disp_term to...
21005 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21006 Try calling targetm.legitimize_address_displacement before expanding
21007 the address rather than afterwards, and adjust for the new interface.
21008 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21009 Match the new hook interface. Handle SVE addresses.
21010 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21011 new hook interface.
21013 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21015 * Makefile.in (OBJS): Add early-remat.o.
21016 * target.def (select_early_remat_modes): New hook.
21017 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21018 * doc/tm.texi: Regenerate.
21019 * targhooks.h (default_select_early_remat_modes): Declare.
21020 * targhooks.c (default_select_early_remat_modes): New function.
21021 * timevar.def (TV_EARLY_REMAT): New timevar.
21022 * passes.def (pass_early_remat): New pass.
21023 * tree-pass.h (make_pass_early_remat): Declare.
21024 * early-remat.c: New file.
21025 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21027 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21029 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21030 Alan Hayward <alan.hayward@arm.com>
21031 David Sherwood <david.sherwood@arm.com>
21033 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21034 vfm1 with a bound_epilog parameter.
21035 (vect_do_peeling): Update calls accordingly, and move the prologue
21036 call earlier in the function. Treat the base bound_epilog as 0 for
21037 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21038 this base when peeling for gaps.
21039 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21040 with fully-masked loops.
21041 (vect_estimate_min_profitable_iters): Handle the single peeled
21042 iteration in that case.
21044 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21045 Alan Hayward <alan.hayward@arm.com>
21046 David Sherwood <david.sherwood@arm.com>
21048 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21049 single-element interleaving even if the size is not a power of 2.
21050 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21051 accesses for single-element interleaving if the group size is
21054 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21055 Alan Hayward <alan.hayward@arm.com>
21056 David Sherwood <david.sherwood@arm.com>
21058 * doc/md.texi (fold_extract_last_@var{m}): Document.
21059 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21060 * optabs.def (fold_extract_last_optab): New optab.
21061 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21062 * internal-fn.c (fold_extract_direct): New macro.
21063 (expand_fold_extract_optab_fn): Likewise.
21064 (direct_fold_extract_optab_supported_p): Likewise.
21065 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21066 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21067 EXTRACT_LAST_REDUCTION.
21068 (get_initial_def_for_reduction): Do not create an initial vector
21069 for EXTRACT_LAST_REDUCTION reductions.
21070 (vectorizable_reduction): Leave the scalar phi in place for
21071 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21072 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21073 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21074 transform phase to vectorizable_condition.
21075 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21077 (vect_finish_stmt_generation): ...here.
21078 (vect_finish_replace_stmt): New function.
21079 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21080 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21082 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21084 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21085 Alan Hayward <alan.hayward@arm.com>
21086 David Sherwood <david.sherwood@arm.com>
21088 * doc/md.texi (extract_last_@var{m}): Document.
21089 * optabs.def (extract_last_optab): New optab.
21090 * internal-fn.def (EXTRACT_LAST): New internal function.
21091 * internal-fn.c (cond_unary_direct): New macro.
21092 (expand_cond_unary_optab_fn): Likewise.
21093 (direct_cond_unary_optab_supported_p): Likewise.
21094 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21095 loops using EXTRACT_LAST.
21096 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21097 (extract_last_<mode>): ...this optab.
21098 (vec_extract<mode><Vel>): Update accordingly.
21100 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21101 Alan Hayward <alan.hayward@arm.com>
21102 David Sherwood <david.sherwood@arm.com>
21104 * target.def (empty_mask_is_expensive): New hook.
21105 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21106 * doc/tm.texi: Regenerate.
21107 * targhooks.h (default_empty_mask_is_expensive): Declare.
21108 * targhooks.c (default_empty_mask_is_expensive): New function.
21109 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21110 if the target says that empty masks are expensive.
21111 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21113 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21115 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21116 Alan Hayward <alan.hayward@arm.com>
21117 David Sherwood <david.sherwood@arm.com>
21119 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21120 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21121 (vect_use_loop_mask_for_alignment_p): New function.
21122 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21123 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21124 niters_skip argument. Make sure that the first niters_skip elements
21125 of the first iteration are inactive.
21126 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21127 Update call to vect_set_loop_masks_directly.
21128 (get_misalign_in_elems): New function, split out from...
21129 (vect_gen_prolog_loop_niters): ...here.
21130 (vect_update_init_of_dr): Take a code argument that specifies whether
21131 the adjustment should be added or subtracted.
21132 (vect_update_init_of_drs): Likewise.
21133 (vect_prepare_for_masked_peels): New function.
21134 (vect_do_peeling): Skip prologue peeling if we're using a mask
21135 instead. Update call to vect_update_inits_of_drs.
21136 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21138 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21139 alignment. Do not include the number of peeled iterations in
21140 the minimum threshold in that case.
21141 (vectorizable_induction): Adjust the start value down by
21142 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21143 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21144 Take the number of skipped iterations into account when calculating
21146 * tree-vect-stmts.c (vect_gen_while_not): New function.
21148 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21149 Alan Hayward <alan.hayward@arm.com>
21150 David Sherwood <david.sherwood@arm.com>
21152 * doc/sourcebuild.texi (vect_fully_masked): Document.
21153 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21154 default value to 0.
21155 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21157 (vect_analyze_loop_2): ...here. Don't check the vectorization
21158 factor against the number of loop iterations if the loop is
21161 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21162 Alan Hayward <alan.hayward@arm.com>
21163 David Sherwood <david.sherwood@arm.com>
21165 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21166 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21167 (dump_groups): Update accordingly.
21168 (iv_use::mem_type): New member variable.
21169 (address_p): New function.
21170 (record_use): Add a mem_type argument and initialize the new
21172 (record_group_use): Add a mem_type argument. Use address_p.
21173 Remove obsolete null checks of base_object. Update call to record_use.
21174 (find_interesting_uses_op): Update call to record_group_use.
21175 (find_interesting_uses_cond): Likewise.
21176 (find_interesting_uses_address): Likewise.
21177 (get_mem_type_for_internal_fn): New function.
21178 (find_address_like_use): Likewise.
21179 (find_interesting_uses_stmt): Try find_address_like_use before
21180 calling find_interesting_uses_op.
21181 (addr_offset_valid_p): Use the iv mem_type field as the type
21182 of the addressed memory.
21183 (add_autoinc_candidates): Likewise.
21184 (get_address_cost): Likewise.
21185 (split_small_address_groups_p): Use address_p.
21186 (split_address_groups): Likewise.
21187 (add_iv_candidate_for_use): Likewise.
21188 (autoinc_possible_for_pair): Likewise.
21189 (rewrite_groups): Likewise.
21190 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21191 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21192 (get_alias_ptr_type_for_ptr_address): New function.
21193 (rewrite_use_address): Rewrite address uses in calls that were
21194 identified by find_address_like_use.
21196 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21197 Alan Hayward <alan.hayward@arm.com>
21198 David Sherwood <david.sherwood@arm.com>
21200 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21202 * gimple-expr.h (is_gimple_addressable: Likewise.
21203 * gimple-expr.c (is_gimple_address): Likewise.
21204 * internal-fn.c (expand_call_mem_ref): New function.
21205 (expand_mask_load_optab_fn): Use it.
21206 (expand_mask_store_optab_fn): Likewise.
21208 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21209 Alan Hayward <alan.hayward@arm.com>
21210 David Sherwood <david.sherwood@arm.com>
21212 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21213 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21214 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21215 (cond_umax@var{mode}): Document.
21216 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21217 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21218 (cond_umin_optab, cond_umax_optab): New optabs.
21219 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21220 (COND_IOR, COND_XOR): New internal functions.
21221 * internal-fn.h (get_conditional_internal_fn): Declare.
21222 * internal-fn.c (cond_binary_direct): New macro.
21223 (expand_cond_binary_optab_fn): Likewise.
21224 (direct_cond_binary_optab_supported_p): Likewise.
21225 (get_conditional_internal_fn): New function.
21226 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21227 Cope with reduction statements that are vectorized as calls rather
21229 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21230 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21231 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21232 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21233 (UNSPEC_COND_EOR): New unspecs.
21234 (optab): Add mappings for them.
21235 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21236 (sve_int_op, sve_fp_op): New int attributes.
21238 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21239 Alan Hayward <alan.hayward@arm.com>
21240 David Sherwood <david.sherwood@arm.com>
21242 * optabs.def (while_ult_optab): New optab.
21243 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21244 * internal-fn.def (WHILE_ULT): New internal function.
21245 * internal-fn.h (direct_internal_fn_supported_p): New override
21246 that takes two types as argument.
21247 * internal-fn.c (while_direct): New macro.
21248 (expand_while_optab_fn): New function.
21249 (convert_optab_supported_p): Likewise.
21250 (direct_while_optab_supported_p): New macro.
21251 * wide-int.h (wi::udiv_ceil): New function.
21252 * tree-vectorizer.h (rgroup_masks): New structure.
21253 (vec_loop_masks): New typedef.
21254 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21255 and fully_masked_p.
21256 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21257 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21258 (vect_max_vf): New function.
21259 (slpeel_make_loop_iterate_ntimes): Delete.
21260 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21261 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21262 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21263 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21264 internal-fn.h, stor-layout.h and optabs-query.h.
21265 (vect_set_loop_mask): New function.
21266 (add_preheader_seq): Likewise.
21267 (add_header_seq): Likewise.
21268 (interleave_supported_p): Likewise.
21269 (vect_maybe_permute_loop_masks): Likewise.
21270 (vect_set_loop_masks_directly): Likewise.
21271 (vect_set_loop_condition_masked): Likewise.
21272 (vect_set_loop_condition_unmasked): New function, split out from
21273 slpeel_make_loop_iterate_ntimes.
21274 (slpeel_make_loop_iterate_ntimes): Rename to..
21275 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21276 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21277 (vect_do_peeling): Update call accordingly.
21278 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21280 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21281 mask_compare_type, can_fully_mask_p and fully_masked_p.
21282 (release_vec_loop_masks): New function.
21283 (_loop_vec_info): Use it to free the loop masks.
21284 (can_produce_all_loop_masks_p): New function.
21285 (vect_get_max_nscalars_per_iter): Likewise.
21286 (vect_verify_full_masking): Likewise.
21287 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21288 retries, and free the mask rgroups before retrying. Check loop-wide
21289 reasons for disallowing fully-masked loops. Make the final decision
21290 about whether use a fully-masked loop or not.
21291 (vect_estimate_min_profitable_iters): Do not assume that peeling
21292 for the number of iterations will be needed for fully-masked loops.
21293 (vectorizable_reduction): Disable fully-masked loops.
21294 (vectorizable_live_operation): Likewise.
21295 (vect_halve_mask_nunits): New function.
21296 (vect_double_mask_nunits): Likewise.
21297 (vect_record_loop_mask): Likewise.
21298 (vect_get_loop_mask): Likewise.
21299 (vect_transform_loop): Handle the case in which the final loop
21300 iteration might handle a partial vector. Call vect_set_loop_condition
21301 instead of slpeel_make_loop_iterate_ntimes.
21302 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21303 (check_load_store_masking): New function.
21304 (prepare_load_store_mask): Likewise.
21305 (vectorizable_store): Handle fully-masked loops.
21306 (vectorizable_load): Likewise.
21307 (supportable_widening_operation): Use vect_halve_mask_nunits for
21309 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21310 (vect_gen_while): New function.
21311 * config/aarch64/aarch64.md (umax<mode>3): New expander.
21312 (aarch64_uqdec<mode>): New insn.
21314 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21315 Alan Hayward <alan.hayward@arm.com>
21316 David Sherwood <david.sherwood@arm.com>
21318 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21319 (reduc_xor_scal_optab): New optabs.
21320 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21321 (reduc_xor_scal_@var{m}): Document.
21322 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21323 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21324 internal functions.
21325 * fold-const-call.c (fold_const_call): Handle them.
21326 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21327 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21328 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21329 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21330 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21331 (UNSPEC_XORV): New unspecs.
21332 (optab): Add entries for them.
21333 (BITWISEV): New int iterator.
21334 (bit_reduc_op): New int attributes.
21336 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21337 Alan Hayward <alan.hayward@arm.com>
21338 David Sherwood <david.sherwood@arm.com>
21340 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21341 * internal-fn.def (VEC_SHL_INSERT): New internal function.
21342 * optabs.def (vec_shl_insert_optab): New optab.
21343 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21344 (duplicate_and_interleave): Likewise.
21345 * tree-vect-loop.c: Include internal-fn.h.
21346 (neutral_op_for_slp_reduction): New function, split out from
21347 get_initial_defs_for_reduction.
21348 (get_initial_def_for_reduction): Handle option 2 for variable-length
21349 vectors by loading the neutral value into a vector and then shifting
21350 the initial value into element 0.
21351 (get_initial_defs_for_reduction): Replace the code argument with
21352 the neutral value calculated by neutral_op_for_slp_reduction.
21353 Use gimple_build_vector for constant-length vectors.
21354 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21355 but the first group_size elements have a neutral value.
21356 Use duplicate_and_interleave otherwise.
21357 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21358 Update call to get_initial_defs_for_reduction. Handle SLP
21359 reductions for variable-length vectors by creating one vector
21360 result for each scalar result, with the elements associated
21361 with other scalar results stubbed out with the neutral value.
21362 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21363 Require IFN_VEC_SHL_INSERT for double reductions on
21364 variable-length vectors, or SLP reductions that have
21365 a neutral value. Require can_duplicate_and_interleave_p
21366 support for variable-length unchained SLP reductions if there
21367 is no neutral value, such as for MIN/MAX reductions. Also require
21368 the number of vector elements to be a multiple of the number of
21369 SLP statements when doing variable-length unchained SLP reductions.
21370 Update call to vect_create_epilog_for_reduction.
21371 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21372 and remove initial values.
21373 (duplicate_and_interleave): Make public.
21374 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21375 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21377 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21378 Alan Hayward <alan.hayward@arm.com>
21379 David Sherwood <david.sherwood@arm.com>
21381 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21382 (can_duplicate_and_interleave_p): New function.
21383 (vect_get_and_check_slp_defs): Take the vector of statements
21384 rather than just the current one. Remove excess parentheses.
21385 Restriction rejectinon of vect_constant_def and vect_external_def
21386 for variable-length vectors to boolean types, or types for which
21387 can_duplicate_and_interleave_p is false.
21388 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21389 (duplicate_and_interleave): New function.
21390 (vect_get_constant_vectors): Use gimple_build_vector for
21391 constant-length vectors and suitable variable-length constant
21392 vectors. Use duplicate_and_interleave for other variable-length
21393 vectors. Don't defer the update when inserting new statements.
21395 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21396 Alan Hayward <alan.hayward@arm.com>
21397 David Sherwood <david.sherwood@arm.com>
21399 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21400 min_profitable_iters doesn't go negative.
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 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21407 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21408 * optabs.def (vec_mask_load_lanes_optab): New optab.
21409 (vec_mask_store_lanes_optab): Likewise.
21410 * internal-fn.def (MASK_LOAD_LANES): New internal function.
21411 (MASK_STORE_LANES): Likewise.
21412 * internal-fn.c (mask_load_lanes_direct): New macro.
21413 (mask_store_lanes_direct): Likewise.
21414 (expand_mask_load_optab_fn): Handle masked operations.
21415 (expand_mask_load_lanes_optab_fn): New macro.
21416 (expand_mask_store_optab_fn): Handle masked operations.
21417 (expand_mask_store_lanes_optab_fn): New macro.
21418 (direct_mask_load_lanes_optab_supported_p): Likewise.
21419 (direct_mask_store_lanes_optab_supported_p): Likewise.
21420 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21422 (vect_load_lanes_supported): Likewise.
21423 * tree-vect-data-refs.c (strip_conversion): New function.
21424 (can_group_stmts_p): Likewise.
21425 (vect_analyze_data_ref_accesses): Use it instead of checking
21426 for a pair of assignments.
21427 (vect_store_lanes_supported): Take a masked_p parameter.
21428 (vect_load_lanes_supported): Likewise.
21429 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21430 vect_store_lanes_supported and vect_load_lanes_supported.
21431 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21432 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21433 parameter. Don't allow gaps for masked accesses.
21434 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
21435 and vect_load_lanes_supported.
21436 (get_load_store_type): Take a masked_p parameter and update
21437 call to get_group_load_store_type.
21438 (vectorizable_store): Update call to get_load_store_type.
21439 Handle IFN_MASK_STORE_LANES.
21440 (vectorizable_load): Update call to get_load_store_type.
21441 Handle IFN_MASK_LOAD_LANES.
21443 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21444 Alan Hayward <alan.hayward@arm.com>
21445 David Sherwood <david.sherwood@arm.com>
21447 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21449 * config/aarch64/aarch64-protos.h
21450 (aarch64_sve_struct_memory_operand_p): Declare.
21451 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21452 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21453 (VPRED, vpred): Handle SVE structure modes.
21454 * config/aarch64/constraints.md (Utx): New constraint.
21455 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21456 (aarch64_sve_struct_nonimmediate_operand): New predicates.
21457 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21458 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21459 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21460 structure modes. Split into pieces after RA.
21461 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21462 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21464 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21465 SVE structure modes.
21466 (aarch64_classify_address): Likewise.
21467 (sizetochar): Move earlier in file.
21468 (aarch64_print_operand): Handle SVE register lists.
21469 (aarch64_array_mode): New function.
21470 (aarch64_sve_struct_memory_operand_p): Likewise.
21471 (TARGET_ARRAY_MODE): Redefine.
21473 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21474 Alan Hayward <alan.hayward@arm.com>
21475 David Sherwood <david.sherwood@arm.com>
21477 * target.def (array_mode): New target hook.
21478 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21479 * doc/tm.texi: Regenerate.
21480 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21481 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21482 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21483 targetm.array_mode.
21484 * stor-layout.c (mode_for_array): Likewise. Support polynomial
21487 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21488 Alan Hayward <alan.hayward@arm.com>
21489 David Sherwood <david.sherwood@arm.com>
21491 * fold-const.c (fold_binary_loc): Check the argument types
21492 rather than the result type when testing for a vector operation.
21494 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21496 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21497 * doc/tm.texi: Regenerate.
21499 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21500 Alan Hayward <alan.hayward@arm.com>
21501 David Sherwood <david.sherwood@arm.com>
21503 * doc/invoke.texi (-msve-vector-bits=): Document new option.
21504 (sve): Document new AArch64 extension.
21505 * doc/md.texi (w): Extend the description of the AArch64
21506 constraint to include SVE vectors.
21507 (Upl, Upa): Document new AArch64 predicate constraints.
21508 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21510 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21511 (msve-vector-bits=): New option.
21512 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21513 SVE when these are disabled.
21514 (sve): New extension.
21515 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21516 modes. Adjust their number of units based on aarch64_sve_vg.
21517 (MAX_BITSIZE_MODE_ANY_MODE): Define.
21518 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21519 aarch64_addr_query_type.
21520 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21521 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21522 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21523 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21524 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21525 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21526 (aarch64_simd_imm_zero_p): Delete.
21527 (aarch64_check_zero_based_sve_index_immediate): Declare.
21528 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21529 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21530 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21531 (aarch64_sve_float_mul_immediate_p): Likewise.
21532 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21533 rather than an rtx.
21534 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21535 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21536 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21537 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21538 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21539 (aarch64_regmode_natural_size): Likewise.
21540 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21541 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21543 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21544 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21545 for VG and the SVE predicate registers.
21546 (V_ALIASES): Add a "z"-prefixed alias.
21547 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21548 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21549 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21550 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21551 (REG_CLASS_NAMES): Add entries for them.
21552 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
21553 and the predicate registers.
21554 (aarch64_sve_vg): Declare.
21555 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21556 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21557 (REGMODE_NATURAL_SIZE): Define.
21558 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21560 * config/aarch64/aarch64.c: Include cfgrtl.h.
21561 (simd_immediate_info): Add a constructor for series vectors,
21562 and an associated step field.
21563 (aarch64_sve_vg): New variable.
21564 (aarch64_dbx_register_number): Handle VG and the predicate registers.
21565 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21566 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21567 (VEC_ANY_DATA, VEC_STRUCT): New constants.
21568 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21569 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21570 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21571 (aarch64_get_mask_mode): New functions.
21572 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21573 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21574 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
21575 predicate modes and predicate registers. Explicitly restrict
21576 GPRs to modes of 16 bytes or smaller. Only allow FP registers
21577 to store a vector mode if it is recognized by
21578 aarch64_classify_vector_mode.
21579 (aarch64_regmode_natural_size): New function.
21580 (aarch64_hard_regno_caller_save_mode): Return the original mode
21582 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21583 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21584 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21585 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21587 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
21588 does not overlap dest if the function is frame-related. Handle
21590 (aarch64_split_add_offset): New function.
21591 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21592 them aarch64_add_offset.
21593 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21594 and update call to aarch64_sub_sp.
21595 (aarch64_add_cfa_expression): New function.
21596 (aarch64_expand_prologue): Pass extra temporary registers to the
21597 functions above. Handle the case in which we need to emit new
21598 DW_CFA_expressions for registers that were originally saved
21599 relative to the stack pointer, but now have to be expressed
21600 relative to the frame pointer.
21601 (aarch64_output_mi_thunk): Pass extra temporary registers to the
21603 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
21604 IP0 and IP1 values for SVE frames.
21605 (aarch64_expand_vec_series): New function.
21606 (aarch64_expand_sve_widened_duplicate): Likewise.
21607 (aarch64_expand_sve_const_vector): Likewise.
21608 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21609 Handle SVE constants. Use emit_move_insn to move a force_const_mem
21610 into the register, rather than emitting a SET directly.
21611 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21612 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21613 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21614 (offset_9bit_signed_scaled_p): New functions.
21615 (aarch64_replicate_bitmask_imm): New function.
21616 (aarch64_bitmask_imm): Use it.
21617 (aarch64_cannot_force_const_mem): Reject expressions involving
21618 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
21619 (aarch64_classify_index): Handle SVE indices, by requiring
21620 a plain register index with a scale that matches the element size.
21621 (aarch64_classify_address): Handle SVE addresses. Assert that
21622 the mode of the address is VOIDmode or an integer mode.
21623 Update call to aarch64_classify_symbol.
21624 (aarch64_classify_symbolic_expression): Update call to
21625 aarch64_classify_symbol.
21626 (aarch64_const_vec_all_in_range_p): New function.
21627 (aarch64_print_vector_float_operand): Likewise.
21628 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
21629 "vN" for FP registers with SVE modes. Handle (const ...) vectors
21630 and the FP immediates 1.0 and 0.5.
21631 (aarch64_print_address_internal): Handle SVE addresses.
21632 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21633 (aarch64_regno_regclass): Handle predicate registers.
21634 (aarch64_secondary_reload): Handle big-endian reloads of SVE
21636 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21637 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21638 (aarch64_convert_sve_vector_bits): New function.
21639 (aarch64_override_options): Use it to handle -msve-vector-bits=.
21640 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21641 rather than an rtx.
21642 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21643 Handle SVE vector and predicate modes. Accept VL-based constants
21644 that need only one temporary register, and VL offsets that require
21645 no temporary registers.
21646 (aarch64_conditional_register_usage): Mark the predicate registers
21647 as fixed if SVE isn't available.
21648 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21649 Return true for SVE vector and predicate modes.
21650 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21651 rather than an unsigned int. Handle SVE modes.
21652 (aarch64_preferred_simd_mode): Update call accordingly. Handle
21654 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21656 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21657 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21658 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21659 (aarch64_sve_float_mul_immediate_p): New functions.
21660 (aarch64_sve_valid_immediate): New function.
21661 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21662 Explicitly reject structure modes. Check for INDEX constants.
21663 Handle PTRUE and PFALSE constants.
21664 (aarch64_check_zero_based_sve_index_immediate): New function.
21665 (aarch64_simd_imm_zero_p): Delete.
21666 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21667 vector modes. Accept constants in the range of CNT[BHWD].
21668 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21669 ask for an Advanced SIMD mode.
21670 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21671 (aarch64_simd_vector_alignment): Handle SVE predicates.
21672 (aarch64_vectorize_preferred_vector_alignment): New function.
21673 (aarch64_simd_vector_alignment_reachable): Use it instead of
21675 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21676 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21678 (MAX_VECT_LEN): Delete.
21679 (expand_vec_perm_d): Add a vec_flags field.
21680 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21681 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21682 (aarch64_evpc_ext): Don't apply a big-endian lane correction
21684 (aarch64_evpc_rev): Rename to...
21685 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
21686 (aarch64_evpc_rev_global): New function.
21687 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21688 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21690 (aarch64_evpc_sve_tbl): New function.
21691 (aarch64_expand_vec_perm_const_1): Update after rename of
21692 aarch64_evpc_rev. Handle SVE permutes too, trying
21693 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21694 than aarch64_evpc_tbl.
21695 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21696 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21697 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21698 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21699 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21700 (aarch64_expand_sve_vcond): New functions.
21701 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21702 of aarch64_vector_mode_p.
21703 (aarch64_dwarf_poly_indeterminate_value): New function.
21704 (aarch64_compute_pressure_classes): Likewise.
21705 (aarch64_can_change_mode_class): Likewise.
21706 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21707 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21708 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21709 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21710 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21711 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21712 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21713 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21715 (Dn, Dl, Dr): Accept const as well as const_vector.
21716 (Dz): Likewise. Compare against CONST0_RTX.
21717 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21718 of "vector" where appropriate.
21719 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21720 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21721 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21722 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21723 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21724 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21725 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21726 (v_int_equiv): Extend to SVE modes.
21727 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21729 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21730 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21731 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21732 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21733 (SVE_COND_FP_CMP): New int iterators.
21734 (perm_hilo): Handle the new unpack unspecs.
21735 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21737 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21738 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21739 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21740 (aarch64_equality_operator, aarch64_constant_vector_operand)
21741 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21742 (aarch64_sve_nonimmediate_operand): Likewise.
21743 (aarch64_sve_general_operand): Likewise.
21744 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
21745 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
21746 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
21747 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
21748 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
21749 (aarch64_sve_float_arith_immediate): Likewise.
21750 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
21751 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
21752 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
21753 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
21754 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
21755 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
21756 (aarch64_sve_float_arith_operand): Likewise.
21757 (aarch64_sve_float_arith_with_sub_operand): Likewise.
21758 (aarch64_sve_float_mul_operand): Likewise.
21759 (aarch64_sve_vec_perm_operand): Likewise.
21760 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
21761 (aarch64_mov_operand): Accept const_poly_int and const_vector.
21762 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
21763 as well as const_vector.
21764 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
21765 in file. Use CONST0_RTX and CONSTM1_RTX.
21766 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
21767 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
21768 Use aarch64_simd_imm_zero.
21769 * config/aarch64/aarch64-sve.md: New file.
21770 * config/aarch64/aarch64.md: Include it.
21771 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21772 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21773 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21774 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21775 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21776 (sve): New attribute.
21777 (enabled): Disable instructions with the sve attribute unless
21779 (movqi, movhi): Pass CONST_POLY_INT operaneds through
21780 aarch64_expand_mov_immediate.
21781 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21782 CNT[BHSD] immediates.
21783 (movti): Split CONST_POLY_INT moves into two halves.
21784 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21785 Split additions that need a temporary here if the destination
21786 is the stack pointer.
21787 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21788 (*add<mode>3_poly_1): New instruction.
21789 (set_clobber_cc): New expander.
21791 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21793 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21794 parameter and use it instead of GET_MODE_SIZE (innermode). Use
21795 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21796 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21797 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
21798 Change innermode from fixed_mode_size to machine_mode.
21799 (simplify_subreg): Update call accordingly. Handle a constant-sized
21800 subreg of a variable-length CONST_VECTOR.
21802 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21803 Alan Hayward <alan.hayward@arm.com>
21804 David Sherwood <david.sherwood@arm.com>
21806 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21807 (add_offset_to_base): New function, split out from...
21808 (create_mem_ref): ...here. When handling a scale other than 1,
21809 check first whether the address is valid without the offset.
21810 Add it into the base if so, leaving the index and scale as-is.
21812 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21815 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21816 fold_for_warn before checking if arg2 is INTEGER_CST.
21818 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
21820 * config/rs6000/predicates.md (load_multiple_operation): Delete.
21821 (store_multiple_operation): Delete.
21822 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21823 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21824 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21825 guarded by TARGET_STRING.
21826 (rs6000_output_load_multiple): Delete.
21827 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21828 OPTION_MASK_STRING / TARGET_STRING handling.
21829 (print_operand) <'N', 'O'>: Add comment that these are unused now.
21830 (const rs6000_opt_masks) <"string">: Change mask to 0.
21831 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
21832 (MASK_STRING): Delete.
21833 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
21835 (load_multiple): Delete.
21842 (store_multiple): Delete.
21849 (movmemsi_8reg): Delete.
21850 (corresponding unnamed define_insn): Delete.
21851 (movmemsi_6reg): Delete.
21852 (corresponding unnamed define_insn): Delete.
21853 (movmemsi_4reg): Delete.
21854 (corresponding unnamed define_insn): Delete.
21855 (movmemsi_2reg): Delete.
21856 (corresponding unnamed define_insn): Delete.
21857 (movmemsi_1reg): Delete.
21858 (corresponding unnamed define_insn): Delete.
21859 * config/rs6000/rs6000.opt (mno-string): New.
21860 (mstring): Replace by deprecation warning stub.
21861 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
21863 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21865 * regrename.c (regrename_do_replace): If replacing the same
21866 reg multiple times, try to reuse last created gen_raw_REG.
21869 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
21870 main to workaround a bug in GDB.
21872 2018-01-12 Tom de Vries <tom@codesourcery.com>
21875 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
21877 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
21879 PR rtl-optimization/80481
21880 * ira-color.c (get_cap_member): New function.
21881 (allocnos_conflict_by_live_ranges_p): Use it.
21882 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21883 (setup_slot_coalesced_allocno_live_ranges): Ditto.
21885 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
21888 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
21889 (*saddl_se_1): Ditto.
21890 (*ssubsi_1): Ditto.
21891 (*ssubl_se_1): Ditto.
21893 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21895 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
21896 rather than wi::to_widest for DR_INITs.
21897 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
21898 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
21899 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
21901 (vect_analyze_group_access_1): Note that here.
21903 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21905 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
21906 polynomial type sizes.
21908 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21910 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
21911 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
21912 (gimple_add_tmp_var): Likewise.
21914 2018-01-12 Martin Liska <mliska@suse.cz>
21916 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
21917 (gimple_alloc_sizes): Likewise.
21918 (dump_gimple_statistics): Use PRIu64 in printf format.
21919 * gimple.h: Change uint64_t to int.
21921 2018-01-12 Martin Liska <mliska@suse.cz>
21923 * tree-core.h: Use uint64_t instead of int.
21924 * tree.c (tree_node_counts): Likewise.
21925 (tree_node_sizes): Likewise.
21926 (dump_tree_statistics): Use PRIu64 in printf format.
21928 2018-01-12 Martin Liska <mliska@suse.cz>
21930 * Makefile.in: As qsort_chk is implemented in vec.c, add
21931 vec.o to linkage of gencfn-macros.
21932 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
21933 passing the info to record_node_allocation_statistics.
21934 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
21936 * ggc-common.c (struct ggc_usage): Add operator== and use
21937 it in operator< and compare function.
21938 * mem-stats.h (struct mem_usage): Likewise.
21939 * vec.c (struct vec_usage): Remove operator< and compare
21940 function. Can be simply inherited.
21942 2018-01-12 Martin Jambor <mjambor@suse.cz>
21945 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
21946 * tree-ssa-math-opts.c: Include domwalk.h.
21947 (convert_mult_to_fma_1): New function.
21948 (fma_transformation_info): New type.
21949 (fma_deferring_state): Likewise.
21950 (cancel_fma_deferring): New function.
21951 (result_of_phi): Likewise.
21952 (last_fma_candidate_feeds_initial_phi): Likewise.
21953 (convert_mult_to_fma): Added deferring logic, split actual
21954 transformation to convert_mult_to_fma_1.
21955 (math_opts_dom_walker): New type.
21956 (math_opts_dom_walker::after_dom_children): New method, body moved
21957 here from pass_optimize_widening_mul::execute, added deferring logic
21959 (pass_optimize_widening_mul::execute): Moved most of code to
21960 math_opts_dom_walker::after_dom_children.
21961 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
21962 * config/i386/i386.c (ix86_option_override_internal): Added
21963 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
21965 2018-01-12 Richard Biener <rguenther@suse.de>
21968 * dwarf2out.c (gen_variable_die): Do not reset old_die for
21969 inline instance vars.
21971 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
21974 * config/rx/rx.c (rx_is_restricted_memory_address):
21975 Handle SUBREG case.
21977 2018-01-12 Richard Biener <rguenther@suse.de>
21979 PR tree-optimization/80846
21980 * target.def (split_reduction): New target hook.
21981 * targhooks.c (default_split_reduction): New function.
21982 * targhooks.h (default_split_reduction): Declare.
21983 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
21984 target requests first reduce vectors by combining low and high
21986 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
21987 (get_vectype_for_scalar_type_and_size): Export.
21988 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
21989 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
21990 * doc/tm.texi: Regenerate.
21991 * config/i386/i386.c (ix86_split_reduction): Implement
21992 TARGET_VECTORIZE_SPLIT_REDUCTION.
21994 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21997 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
21998 in PIC mode except for TARGET_VXWORKS_RTP.
21999 * config/sparc/sparc.c: Include cfgrtl.h.
22000 (TARGET_INIT_PIC_REG): Define.
22001 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22002 (sparc_pic_register_p): New predicate.
22003 (sparc_legitimate_address_p): Use it.
22004 (sparc_legitimize_pic_address): Likewise.
22005 (sparc_delegitimize_address): Likewise.
22006 (sparc_mode_dependent_address_p): Likewise.
22007 (gen_load_pcrel_sym): Remove 4th parameter.
22008 (load_got_register): Adjust call to above. Remove obsolete stuff.
22009 (sparc_expand_prologue): Do not call load_got_register here.
22010 (sparc_flat_expand_prologue): Likewise.
22011 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22012 (sparc_use_pseudo_pic_reg): New function.
22013 (sparc_init_pic_reg): Likewise.
22014 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22015 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22017 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22019 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22020 Add item for branch_cost.
22022 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22024 PR rtl-optimization/83565
22025 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22026 not extend the result to a larger mode for rotate operations.
22027 (num_sign_bit_copies1): Likewise.
22029 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22032 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22034 Use values-Xc.o for -pedantic.
22035 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22037 2018-01-12 Martin Liska <mliska@suse.cz>
22040 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22042 (possible_polymorphic_call_targets): Use it.
22043 (ipa_devirt): Likewise.
22045 2018-01-12 Martin Liska <mliska@suse.cz>
22047 * profile-count.h (enum profile_quality): Use 0 as invalid
22048 enum value of profile_quality.
22050 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22052 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22053 -mext-string options.
22055 2018-01-12 Richard Biener <rguenther@suse.de>
22057 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22058 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22059 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22061 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22063 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22065 * configure.ac (--with-long-double-format): Add support for the
22066 configuration option to change the default long double format on
22068 * config.gcc (powerpc*-linux*-*): Likewise.
22069 * configure: Regenerate.
22070 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22071 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22072 used without modification.
22074 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22076 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22077 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22078 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22079 MISC_BUILTIN_SPEC_BARRIER.
22080 (rs6000_init_builtins): Likewise.
22081 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22083 (speculation_barrier): New define_insn.
22084 * doc/extend.texi: Document __builtin_speculation_barrier.
22086 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22089 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22090 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22091 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22093 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22094 integral modes instead of "ss" and "sd".
22095 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22096 vectors with 32-bit and 64-bit elements.
22097 (vecdupssescalarmodesuffix): New mode attribute.
22098 (vec_dup<mode>): Use it.
22100 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22103 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22104 frame if argument is passed on stack.
22106 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22109 * ree.c (combine_reaching_defs): Optimize also
22110 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22111 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22113 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22115 PR middle-end/83189
22116 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22118 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22120 PR middle-end/83718
22121 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22122 after they are computed.
22124 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22126 PR tree-optimization/83695
22127 * gimple-loop-linterchange.cc
22128 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22129 reset cached scev information after interchange.
22130 (pass_linterchange::execute): Remove call to scev_reset_htab.
22132 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22134 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22135 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22136 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22137 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22138 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22139 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22140 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22141 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22142 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22143 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22144 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22145 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22146 (V_lane_reg): Likewise.
22147 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22149 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22150 (vfmal_lane_low<mode>_intrinsic,
22151 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22152 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22153 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22154 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22155 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22156 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22158 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22160 * config/arm/arm-cpus.in (fp16fml): New feature.
22161 (ALL_SIMD): Add fp16fml.
22162 (armv8.2-a): Add fp16fml as an option.
22163 (armv8.3-a): Likewise.
22164 (armv8.4-a): Add fp16fml as part of fp16.
22165 * config/arm/arm.h (TARGET_FP16FML): Define.
22166 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22168 * config/arm/arm-modes.def (V2HF): Define.
22169 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22170 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22171 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22172 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22173 vfmsl_low, vfmsl_high): New set of builtins.
22174 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22175 (vfml_op): New code attribute.
22176 (VFMLHALVES): New int iterator.
22177 (VFML, VFMLSEL): New mode attributes.
22178 (V_reg): Define mapping for V2HF.
22179 (V_hi, V_lo): New mode attributes.
22180 (VF_constraint): Likewise.
22181 (vfml_half, vfml_half_selector): New int attributes.
22182 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22184 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22185 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22187 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22188 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22189 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22190 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22192 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22193 Document new effective target and option set.
22195 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22197 * config/arm/arm-cpus.in (armv8_4): New feature.
22198 (ARMv8_4a): New fgroup.
22199 (armv8.4-a): New arch.
22200 * config/arm/arm-tables.opt: Regenerate.
22201 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22202 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22203 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22204 Add matching rules for -march=armv8.4-a and extensions.
22205 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22207 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22210 * config/rx/rx.md (BW): New mode attribute.
22211 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22213 2018-01-11 Richard Biener <rguenther@suse.de>
22215 PR tree-optimization/83435
22216 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22217 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22218 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22220 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22221 Alan Hayward <alan.hayward@arm.com>
22222 David Sherwood <david.sherwood@arm.com>
22224 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22226 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22227 (aarch64_print_address_internal): Use it to check for a zero offset.
22229 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22230 Alan Hayward <alan.hayward@arm.com>
22231 David Sherwood <david.sherwood@arm.com>
22233 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22234 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22235 Return a poly_int64 rather than a HOST_WIDE_INT.
22236 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22237 rather than a HOST_WIDE_INT.
22238 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22239 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22240 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22241 final_offset from HOST_WIDE_INT to poly_int64.
22242 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22243 to_constant when getting the number of units in an Advanced SIMD
22245 (aarch64_builtin_vectorized_function): Check for a constant number
22247 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22249 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22250 attribute instead of GET_MODE_NUNITS.
22251 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22252 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22253 GET_MODE_SIZE for fixed-size registers.
22254 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22255 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22256 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22257 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22258 (aarch64_print_operand, aarch64_print_address_internal)
22259 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22260 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22261 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22262 Handle polynomial GET_MODE_SIZE.
22263 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22264 wider than SImode without modification.
22265 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22266 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22267 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22268 passing and returning SVE modes.
22269 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22270 rather than GEN_INT.
22271 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22272 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22273 (aarch64_allocate_and_probe_stack_space): Likewise.
22274 (aarch64_layout_frame): Cope with polynomial offsets.
22275 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22276 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22277 polynomial offsets.
22278 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22279 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22280 poly_int64 rather than a HOST_WIDE_INT.
22281 (aarch64_get_separate_components, aarch64_process_components)
22282 (aarch64_expand_prologue, aarch64_expand_epilogue)
22283 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22284 (aarch64_anchor_offset): New function, split out from...
22285 (aarch64_legitimize_address): ...here.
22286 (aarch64_builtin_vectorization_cost): Handle polynomial
22287 TYPE_VECTOR_SUBPARTS.
22288 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22290 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22291 number of elements from the PARALLEL rather than the mode.
22292 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22293 rather than GET_MODE_BITSIZE.
22294 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22295 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22296 (aarch64_expand_vec_perm_const_1): Handle polynomial
22297 d->perm.length () and d->perm elements.
22298 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
22299 Apply to_constant to d->perm elements.
22300 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22301 polynomial CONST_VECTOR_NUNITS.
22302 (aarch64_move_pointer): Take amount as a poly_int64 rather
22304 (aarch64_progress_pointer): Avoid temporary variable.
22305 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22306 the mode attribute instead of GET_MODE.
22308 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22309 Alan Hayward <alan.hayward@arm.com>
22310 David Sherwood <david.sherwood@arm.com>
22312 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22313 x exists before using it.
22314 (aarch64_add_constant_internal): Rename to...
22315 (aarch64_add_offset_1): ...this. Replace regnum with separate
22316 src and dest rtxes. Handle the case in which they're different,
22317 including when the offset is zero. Replace scratchreg with an rtx.
22318 Use 2 additions if there is no spare register into which we can
22319 move a 16-bit constant.
22320 (aarch64_add_constant): Delete.
22321 (aarch64_add_offset): Replace reg with separate src and dest
22322 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
22323 Use aarch64_add_offset_1.
22324 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22325 an rtx rather than an int. Take the delta as a poly_int64
22326 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
22327 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22328 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22329 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22330 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22331 and aarch64_add_sp.
22332 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22333 aarch64_add_constant.
22335 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22337 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22338 Use scalar_float_mode.
22340 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22342 * config/aarch64/aarch64-simd.md
22343 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22344 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22345 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22346 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22347 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22348 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22349 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22350 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22351 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22352 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22354 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22357 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22358 targ_options->x_arm_arch_string is non NULL.
22360 2018-01-11 Tamar Christina <tamar.christina@arm.com>
22362 * config/aarch64/aarch64.h
22363 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
22365 2018-01-11 Sudakshina Das <sudi.das@arm.com>
22368 * expmed.c (emit_store_flag_force): Swap if const op0
22369 and change VOIDmode to mode of op0.
22371 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22373 PR rtl-optimization/83761
22374 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22375 than bytes to mode_for_size.
22377 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22379 PR middle-end/83189
22380 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22381 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22384 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22386 PR middle-end/83575
22387 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22388 when in layout mode.
22389 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22390 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22393 2018-01-10 Michael Collison <michael.collison@arm.com>
22395 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22396 * config/aarch64/aarch64-option-extension.def: Add
22397 AARCH64_OPT_EXTENSION of 'fp16fml'.
22398 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22399 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22400 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22401 * config/aarch64/constraints.md (Ui7): New constraint.
22402 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22403 (VFMLA_SEL_W): Ditto.
22406 (VFMLA16_LOW): New int iterator.
22407 (VFMLA16_HIGH): Ditto.
22408 (UNSPEC_FMLAL): New unspec.
22409 (UNSPEC_FMLSL): Ditto.
22410 (UNSPEC_FMLAL2): Ditto.
22411 (UNSPEC_FMLSL2): Ditto.
22412 (f16mac): New code attribute.
22413 * config/aarch64/aarch64-simd-builtins.def
22414 (aarch64_fmlal_lowv2sf): Ditto.
22415 (aarch64_fmlsl_lowv2sf): Ditto.
22416 (aarch64_fmlalq_lowv4sf): Ditto.
22417 (aarch64_fmlslq_lowv4sf): Ditto.
22418 (aarch64_fmlal_highv2sf): Ditto.
22419 (aarch64_fmlsl_highv2sf): Ditto.
22420 (aarch64_fmlalq_highv4sf): Ditto.
22421 (aarch64_fmlslq_highv4sf): Ditto.
22422 (aarch64_fmlal_lane_lowv2sf): Ditto.
22423 (aarch64_fmlsl_lane_lowv2sf): Ditto.
22424 (aarch64_fmlal_laneq_lowv2sf): Ditto.
22425 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22426 (aarch64_fmlalq_lane_lowv4sf): Ditto.
22427 (aarch64_fmlsl_lane_lowv4sf): Ditto.
22428 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22429 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22430 (aarch64_fmlal_lane_highv2sf): Ditto.
22431 (aarch64_fmlsl_lane_highv2sf): Ditto.
22432 (aarch64_fmlal_laneq_highv2sf): Ditto.
22433 (aarch64_fmlsl_laneq_highv2sf): Ditto.
22434 (aarch64_fmlalq_lane_highv4sf): Ditto.
22435 (aarch64_fmlsl_lane_highv4sf): Ditto.
22436 (aarch64_fmlalq_laneq_highv4sf): Ditto.
22437 (aarch64_fmlsl_laneq_highv4sf): Ditto.
22438 * config/aarch64/aarch64-simd.md:
22439 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22440 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22441 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22442 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22443 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22444 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22445 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22446 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22447 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22448 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22449 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22450 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22451 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22452 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22453 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22454 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22455 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22456 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22457 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22458 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22459 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22460 (vfmlsl_low_u32): Ditto.
22461 (vfmlalq_low_u32): Ditto.
22462 (vfmlslq_low_u32): Ditto.
22463 (vfmlal_high_u32): Ditto.
22464 (vfmlsl_high_u32): Ditto.
22465 (vfmlalq_high_u32): Ditto.
22466 (vfmlslq_high_u32): Ditto.
22467 (vfmlal_lane_low_u32): Ditto.
22468 (vfmlsl_lane_low_u32): Ditto.
22469 (vfmlal_laneq_low_u32): Ditto.
22470 (vfmlsl_laneq_low_u32): Ditto.
22471 (vfmlalq_lane_low_u32): Ditto.
22472 (vfmlslq_lane_low_u32): Ditto.
22473 (vfmlalq_laneq_low_u32): Ditto.
22474 (vfmlslq_laneq_low_u32): Ditto.
22475 (vfmlal_lane_high_u32): Ditto.
22476 (vfmlsl_lane_high_u32): Ditto.
22477 (vfmlal_laneq_high_u32): Ditto.
22478 (vfmlsl_laneq_high_u32): Ditto.
22479 (vfmlalq_lane_high_u32): Ditto.
22480 (vfmlslq_lane_high_u32): Ditto.
22481 (vfmlalq_laneq_high_u32): Ditto.
22482 (vfmlslq_laneq_high_u32): Ditto.
22483 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22484 (AARCH64_FL_FOR_ARCH8_4): New.
22485 (AARCH64_ISA_F16FML): New ISA flag.
22486 (TARGET_F16FML): New feature flag for fp16fml.
22487 (doc/invoke.texi): Document new fp16fml option.
22489 2018-01-10 Michael Collison <michael.collison@arm.com>
22491 * config/aarch64/aarch64-builtins.c:
22492 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22493 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22494 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22495 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22496 (AARCH64_ISA_SHA3): New ISA flag.
22497 (TARGET_SHA3): New feature flag for sha3.
22498 * config/aarch64/iterators.md (sha512_op): New int attribute.
22499 (CRYPTO_SHA512): New int iterator.
22500 (UNSPEC_SHA512H): New unspec.
22501 (UNSPEC_SHA512H2): Ditto.
22502 (UNSPEC_SHA512SU0): Ditto.
22503 (UNSPEC_SHA512SU1): Ditto.
22504 * config/aarch64/aarch64-simd-builtins.def
22505 (aarch64_crypto_sha512hqv2di): New builtin.
22506 (aarch64_crypto_sha512h2qv2di): Ditto.
22507 (aarch64_crypto_sha512su0qv2di): Ditto.
22508 (aarch64_crypto_sha512su1qv2di): Ditto.
22509 (aarch64_eor3qv8hi): Ditto.
22510 (aarch64_rax1qv2di): Ditto.
22511 (aarch64_xarqv2di): Ditto.
22512 (aarch64_bcaxqv8hi): Ditto.
22513 * config/aarch64/aarch64-simd.md:
22514 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22515 (aarch64_crypto_sha512su0qv2di): Ditto.
22516 (aarch64_crypto_sha512su1qv2di): Ditto.
22517 (aarch64_eor3qv8hi): Ditto.
22518 (aarch64_rax1qv2di): Ditto.
22519 (aarch64_xarqv2di): Ditto.
22520 (aarch64_bcaxqv8hi): Ditto.
22521 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22522 (vsha512h2q_u64): Ditto.
22523 (vsha512su0q_u64): Ditto.
22524 (vsha512su1q_u64): Ditto.
22525 (veor3q_u16): Ditto.
22526 (vrax1q_u64): Ditto.
22527 (vxarq_u64): Ditto.
22528 (vbcaxq_u16): Ditto.
22529 * config/arm/types.md (crypto_sha512): New type attribute.
22530 (crypto_sha3): Ditto.
22531 (doc/invoke.texi): Document new sha3 option.
22533 2018-01-10 Michael Collison <michael.collison@arm.com>
22535 * config/aarch64/aarch64-builtins.c:
22536 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22537 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22538 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22539 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22540 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22541 (AARCH64_ISA_SM4): New ISA flag.
22542 (TARGET_SM4): New feature flag for sm4.
22543 * config/aarch64/aarch64-simd-builtins.def
22544 (aarch64_sm3ss1qv4si): Ditto.
22545 (aarch64_sm3tt1aq4si): Ditto.
22546 (aarch64_sm3tt1bq4si): Ditto.
22547 (aarch64_sm3tt2aq4si): Ditto.
22548 (aarch64_sm3tt2bq4si): Ditto.
22549 (aarch64_sm3partw1qv4si): Ditto.
22550 (aarch64_sm3partw2qv4si): Ditto.
22551 (aarch64_sm4eqv4si): Ditto.
22552 (aarch64_sm4ekeyqv4si): Ditto.
22553 * config/aarch64/aarch64-simd.md:
22554 (aarch64_sm3ss1qv4si): Ditto.
22555 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22556 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22557 (aarch64_sm4eqv4si): Ditto.
22558 (aarch64_sm4ekeyqv4si): Ditto.
22559 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22560 (sm3part_op): Ditto.
22561 (CRYPTO_SM3TT): Ditto.
22562 (CRYPTO_SM3PART): Ditto.
22563 (UNSPEC_SM3SS1): New unspec.
22564 (UNSPEC_SM3TT1A): Ditto.
22565 (UNSPEC_SM3TT1B): Ditto.
22566 (UNSPEC_SM3TT2A): Ditto.
22567 (UNSPEC_SM3TT2B): Ditto.
22568 (UNSPEC_SM3PARTW1): Ditto.
22569 (UNSPEC_SM3PARTW2): Ditto.
22570 (UNSPEC_SM4E): Ditto.
22571 (UNSPEC_SM4EKEY): Ditto.
22572 * config/aarch64/constraints.md (Ui2): New constraint.
22573 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22574 * config/arm/types.md (crypto_sm3): New type attribute.
22575 (crypto_sm4): Ditto.
22576 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22577 (vsm3tt1aq_u32): Ditto.
22578 (vsm3tt1bq_u32): Ditto.
22579 (vsm3tt2aq_u32): Ditto.
22580 (vsm3tt2bq_u32): Ditto.
22581 (vsm3partw1q_u32): Ditto.
22582 (vsm3partw2q_u32): Ditto.
22583 (vsm4eq_u32): Ditto.
22584 (vsm4ekeyq_u32): Ditto.
22585 (doc/invoke.texi): Document new sm4 option.
22587 2018-01-10 Michael Collison <michael.collison@arm.com>
22589 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22590 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22591 (AARCH64_FL_FOR_ARCH8_4): New.
22592 (AARCH64_FL_V8_4): New flag.
22593 (doc/invoke.texi): Document new armv8.4-a option.
22595 2018-01-10 Michael Collison <michael.collison@arm.com>
22597 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22598 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22599 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22600 * config/aarch64/aarch64-option-extension.def: Add
22601 AARCH64_OPT_EXTENSION of 'sha2'.
22602 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22603 (crypto): Disable sha2 and aes if crypto disabled.
22604 (crypto): Enable aes and sha2 if enabled.
22605 (simd): Disable sha2 and aes if simd disabled.
22606 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22608 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22609 (TARGET_SHA2): New feature flag for sha2.
22610 (TARGET_AES): New feature flag for aes.
22611 * config/aarch64/aarch64-simd.md:
22612 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22613 conditional on TARGET_AES.
22614 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22615 (aarch64_crypto_sha1hsi): Make pattern conditional
22617 (aarch64_crypto_sha1hv4si): Ditto.
22618 (aarch64_be_crypto_sha1hv4si): Ditto.
22619 (aarch64_crypto_sha1su1v4si): Ditto.
22620 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22621 (aarch64_crypto_sha1su0v4si): Ditto.
22622 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22623 (aarch64_crypto_sha256su0v4si): Ditto.
22624 (aarch64_crypto_sha256su1v4si): Ditto.
22625 (doc/invoke.texi): Document new aes and sha2 options.
22627 2018-01-10 Martin Sebor <msebor@redhat.com>
22629 PR tree-optimization/83781
22630 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22633 2018-01-11 Martin Sebor <msebor@gmail.com>
22634 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22636 PR tree-optimization/83501
22637 PR tree-optimization/81703
22639 * tree-ssa-strlen.c (get_string_cst): Rename...
22640 (get_string_len): ...to this. Handle global constants.
22641 (handle_char_store): Adjust.
22643 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
22644 Jim Wilson <jimw@sifive.com>
22646 * config/riscv/riscv-protos.h (riscv_output_return): New.
22647 * config/riscv/riscv.c (struct machine_function): New naked_p field.
22648 (riscv_attribute_table, riscv_output_return),
22649 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22650 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22651 (riscv_compute_frame_info): Only compute frame->mask if not a naked
22653 (riscv_expand_prologue): Add early return for naked function.
22654 (riscv_expand_epilogue): Likewise.
22655 (riscv_function_ok_for_sibcall): Return false for naked function.
22656 (riscv_set_current_function): New.
22657 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22658 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22659 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22660 * doc/extend.texi (RISC-V Function Attributes): New.
22662 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
22664 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22665 check for 128-bit long double before checking TCmode.
22666 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22667 128-bit long doubles before checking TFmode or TCmode.
22668 (FLOAT128_IBM_P): Likewise.
22670 2018-01-10 Martin Sebor <msebor@redhat.com>
22672 PR tree-optimization/83671
22673 * builtins.c (c_strlen): Unconditionally return zero for the empty
22675 Use -Warray-bounds for warnings.
22676 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22677 for non-constant array indices with COMPONENT_REF, arrays of
22678 arrays, and pointers to arrays.
22679 (gimple_fold_builtin_strlen): Determine and set length range for
22680 non-constant character arrays.
22682 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
22684 PR middle-end/81897
22685 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22688 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
22690 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22692 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22695 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22696 VECTOR_MEM_ALTIVEC_OR_VSX_P.
22697 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22698 indexed_or_indirect_operand predicate.
22699 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22700 (*vsx_le_perm_load_v8hi): Likewise.
22701 (*vsx_le_perm_load_v16qi): Likewise.
22702 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22703 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22704 (*vsx_le_perm_store_v8hi): Likewise.
22705 (*vsx_le_perm_store_v16qi): Likewise.
22706 (eight unnamed splitters): Likewise.
22708 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22710 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22711 * config/rs6000/emmintrin.h: Likewise.
22712 * config/rs6000/mmintrin.h: Likewise.
22713 * config/rs6000/xmmintrin.h: Likewise.
22715 2018-01-10 David Malcolm <dmalcolm@redhat.com>
22718 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22720 * tree.c (tree_nop_conversion): Return true for location wrapper
22722 (maybe_wrap_with_location): New function.
22723 (selftest::check_strip_nops): New function.
22724 (selftest::test_location_wrappers): New function.
22725 (selftest::tree_c_tests): Call it.
22726 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22727 (maybe_wrap_with_location): New decl.
22728 (EXPR_LOCATION_WRAPPER_P): New macro.
22729 (location_wrapper_p): New inline function.
22730 (tree_strip_any_location_wrapper): New inline function.
22732 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
22735 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22736 stack_realign_offset for the largest alignment of stack slot
22738 (ix86_find_max_used_stack_alignment): New function.
22739 (ix86_finalize_stack_frame_flags): Use it. Set
22740 max_used_stack_alignment if we don't realign stack.
22741 * config/i386/i386.h (machine_function): Add
22742 max_used_stack_alignment.
22744 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
22746 * config/arm/arm.opt (-mbranch-cost): New option.
22747 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
22750 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
22753 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
22754 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
22756 2018-01-10 Richard Biener <rguenther@suse.de>
22759 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
22760 early out so it also covers the case where we have a non-NULL
22763 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22765 PR tree-optimization/83753
22766 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
22767 for non-strided grouped accesses if the number of elements is 1.
22769 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22772 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22773 * i386.h (TARGET_USE_GATHER): Define.
22774 * x86-tune.def (X86_TUNE_USE_GATHER): New.
22776 2018-01-10 Martin Liska <mliska@suse.cz>
22779 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22780 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22782 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22783 CLEANUP_NO_PARTITIONING is not set.
22785 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22787 * doc/rtl.texi: Remove documentation of (const ...) wrappers
22788 for vectors, as a partial revert of r254296.
22789 * rtl.h (const_vec_p): Delete.
22790 (const_vec_duplicate_p): Don't test for vector CONSTs.
22791 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22792 * expmed.c (make_tree): Likewise.
22795 * common.md (E, F): Use CONSTANT_P instead of checking for
22797 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22798 checking for CONST_VECTOR.
22800 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22802 PR middle-end/83575
22803 * predict.c (force_edge_cold): Handle in more sane way edges
22804 with no prediction.
22806 2018-01-09 Carl Love <cel@us.ibm.com>
22808 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22810 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22811 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22812 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22813 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
22814 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22815 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
22816 * config/rs6000/rs6000-protos.h: Add extern defition for
22817 rs6000_generate_float2_double_code.
22818 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22820 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22821 (float2_v2df): Add define_expand.
22823 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
22826 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22827 op_mode in the force_to_mode call.
22829 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22831 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
22832 instead of checking each element individually.
22833 (aarch64_evpc_uzp): Likewise.
22834 (aarch64_evpc_zip): Likewise.
22835 (aarch64_evpc_ext): Likewise.
22836 (aarch64_evpc_rev): Likewise.
22837 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
22838 instead of checking each element individually. Return true without
22840 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
22841 whether all selected elements come from the same input, instead of
22842 checking each element individually. Remove calls to gen_rtx_REG,
22843 start_sequence and end_sequence and instead assert that no rtl is
22846 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22848 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
22849 order of HIGH and CONST checks.
22851 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22853 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
22854 if the destination isn't an SSA_NAME.
22856 2018-01-09 Richard Biener <rguenther@suse.de>
22858 PR tree-optimization/83668
22859 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
22861 (canonicalize_loop_form): ... here, renamed from ...
22862 (canonicalize_loop_closed_ssa_form): ... this and amended to
22863 swap successor edges for loop exit blocks to make us use
22864 the RPO order we need for initial schedule generation.
22866 2018-01-09 Joseph Myers <joseph@codesourcery.com>
22868 PR tree-optimization/64811
22869 * match.pd: When optimizing comparisons with Inf, avoid
22870 introducing or losing exceptions from comparisons with NaN.
22872 2018-01-09 Martin Liska <mliska@suse.cz>
22875 * asan.c (shadow_mem_size): Add gcc_assert.
22877 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
22879 Don't save registers in main().
22882 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
22883 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
22884 * config/avr/avr.c (avr_set_current_function): Don't error if
22885 naked, OS_task or OS_main are specified at the same time.
22886 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
22888 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
22890 * common/config/avr/avr-common.c (avr_option_optimization_table):
22891 Switch on -mmain-is-OS_task for optimizing compilations.
22893 2018-01-09 Richard Biener <rguenther@suse.de>
22895 PR tree-optimization/83572
22896 * graphite.c: Include cfganal.h.
22897 (graphite_transform_loops): Connect infinite loops to exit
22898 and remove fake edges at the end.
22900 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22902 * ipa-inline.c (edge_badness): Revert accidental checkin.
22904 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22907 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
22908 symbols; not inline clones.
22910 2018-01-09 Jakub Jelinek <jakub@redhat.com>
22913 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
22914 hard registers. Formatting fixes.
22916 PR preprocessor/83722
22917 * gcc.c (try_generate_repro): Pass
22918 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
22919 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22922 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
22923 Kito Cheng <kito.cheng@gmail.com>
22925 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
22926 (riscv_leaf_function_p): Delete.
22927 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
22929 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22931 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
22933 (do_ifelse): New function.
22934 (do_isel): New function.
22935 (do_sub3): New function.
22936 (do_add3): New function.
22937 (do_load_mask_compare): New function.
22938 (do_overlap_load_compare): New function.
22939 (expand_compare_loop): New function.
22940 (expand_block_compare): Call expand_compare_loop() when appropriate.
22941 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
22942 option description.
22943 (-mblock-compare-inline-loop-limit): New option.
22945 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22948 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
22949 Reverse order of second and third operands in first alternative.
22950 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
22951 of first and second elements in UNSPEC_VPERMR vector.
22952 (altivec_expand_vec_perm_le): Likewise.
22954 2018-01-08 Jeff Law <law@redhat.com>
22956 PR rtl-optimizatin/81308
22957 * tree-switch-conversion.c (cfg_altered): New file scoped static.
22958 (process_switch): If group_case_labels makes a change, then set
22960 (pass_convert_switch::execute): If a switch is converted, then
22961 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
22963 PR rtl-optimization/81308
22964 * recog.c (split_all_insns): Conditionally cleanup the CFG after
22967 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
22969 PR target/83663 - Revert r255946
22970 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
22971 generation for cases where splatting a value is not useful.
22972 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
22973 across a vec_duplicate and a paradoxical subreg forming a vector
22974 mode to a vec_concat.
22976 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22978 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
22979 -march=armv8.3-a variants.
22980 * config/arm/t-multilib: Likewise.
22981 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
22983 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22985 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
22987 (cceq_ior_compare_complement): Give it a name so I can use it, and
22988 change boolean_or_operator predicate to boolean_operator so it can
22989 be used to generate a crand.
22990 (eqne): New code iterator.
22991 (bd/bd_neg): New code_attrs.
22992 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
22993 a single define_insn.
22994 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
22995 decrement (bdnzt/bdnzf/bdzt/bdzf).
22996 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
22997 with the new names of the branch decrement patterns, and added the
22998 names of the branch decrement conditional patterns.
23000 2018-01-08 Richard Biener <rguenther@suse.de>
23002 PR tree-optimization/83563
23003 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23006 2018-01-08 Richard Biener <rguenther@suse.de>
23008 PR middle-end/83713
23009 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23011 2018-01-08 Richard Biener <rguenther@suse.de>
23013 PR tree-optimization/83685
23014 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23015 references to abnormals.
23017 2018-01-08 Richard Biener <rguenther@suse.de>
23020 * dwarf2out.c (output_indirect_strings): Handle empty
23021 skeleton_debug_str_hash.
23022 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23024 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23026 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23027 (emit_store_direct): Likewise.
23028 (arc_trampoline_adjust_address): Likewise.
23029 (arc_asm_trampoline_template): New function.
23030 (arc_initialize_trampoline): Use asm_trampoline_template.
23031 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23032 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23033 * config/arc/arc.md (flush_icache): Delete pattern.
23035 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23037 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23038 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23041 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23044 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23045 by not USED_FOR_TARGET.
23046 (make_pass_resolve_sw_modes): Likewise.
23048 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23050 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23053 2018-01-08 Richard Biener <rguenther@suse.de>
23055 PR middle-end/83580
23056 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23058 2018-01-08 Richard Biener <rguenther@suse.de>
23060 PR middle-end/83517
23061 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23063 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23065 PR middle-end/81897
23066 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23067 basic blocks with a small number of successors.
23068 (convert_control_dep_chain_into_preds): Improve handling of
23070 (dump_predicates): Split apart into...
23071 (dump_pred_chain): ...here...
23072 (dump_pred_info): ...and here.
23073 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23074 (can_chain_union_be_invalidated_p): Improve check for invalidation
23076 (uninit_uses_cannot_happen): Avoid unnecessary if
23077 convert_control_dep_chain_into_preds yielded nothing.
23079 2018-01-06 Martin Sebor <msebor@redhat.com>
23081 PR tree-optimization/83640
23082 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23083 subtracting negative offset from size.
23084 (builtin_access::overlap): Adjust offset bounds of the access to fall
23085 within the size of the object if possible.
23087 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23089 PR rtl-optimization/83699
23090 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23091 extract_bit_field_as_subreg to cases in which the extracted
23092 value is also a vector.
23094 * lra-constraints.c (process_alt_operands): Test for the equivalence
23095 substitutions when detecting a possible reload cycle.
23097 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23100 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23101 by default if flag_selective_schedling{,2}. Formatting fixes.
23103 PR rtl-optimization/83682
23104 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23105 if it has non-VECTOR_MODE element mode.
23106 (vec_duplicate_p): Likewise.
23108 PR middle-end/83694
23109 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23110 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23112 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23115 * config/i386/i386-builtin.def
23116 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23117 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23118 Require also OPTION_MASK_ISA_AVX512F in addition to
23119 OPTION_MASK_ISA_GFNI.
23120 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23121 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23122 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23123 to OPTION_MASK_ISA_GFNI.
23124 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23125 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23126 OPTION_MASK_ISA_AVX512BW.
23127 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23128 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23129 addition to OPTION_MASK_ISA_GFNI.
23130 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23131 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23132 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23133 to OPTION_MASK_ISA_GFNI.
23134 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23135 a requirement for all ISAs rather than any of them with a few
23137 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23139 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23140 bitmasks to be enabled with 3 exceptions, instead of requiring any
23141 enabled ISA with lots of exceptions.
23142 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23143 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23144 Change avx512bw in isa attribute to avx512f.
23145 * config/i386/sgxintrin.h: Add license boilerplate.
23146 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23147 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23148 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23149 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23151 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23152 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23153 temporarily sse2 rather than sse if not enabled already.
23156 * config/i386/sse.md (VI248_VLBW): Rename to ...
23157 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23158 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23159 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23160 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23161 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23162 mode iterator instead of VI248_VLBW.
23164 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23166 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23167 (record_modified): Skip clobbers; add debug output.
23168 (param_change_prob): Use sreal frequencies.
23170 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23172 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23173 punt for user-aligned variables.
23175 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23177 * tree-chrec.c (chrec_contains_symbols): Return true for
23180 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23183 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23184 of (x|y) == x for BICS pattern.
23186 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23188 PR tree-optimization/83605
23189 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23190 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23193 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23195 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23196 * config/epiphany/rtems.h: New file.
23198 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23199 Uros Bizjak <ubizjak@gmail.com>
23202 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23203 QIreg_operand instead of register_operand predicate.
23204 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23205 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23206 comments instead of -fmitigate[-_]rop.
23208 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23211 * cgraphunit.c (symbol_table::compile): Switch to text_section
23212 before calling assembly_start debug hook.
23213 * run-rtl-passes.c (run_rtl_passes): Likewise.
23216 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23218 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23219 range_int_cst_p rather than !symbolic_range_p before calling
23220 extract_range_from_multiplicative_op_1.
23222 2018-01-04 Jeff Law <law@redhat.com>
23224 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23225 redundant test in assertion.
23227 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23229 * doc/rtl.texi: Document machine_mode wrapper classes.
23231 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23233 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23234 using tree_to_uhwi.
23236 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23238 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23239 the VEC_PERM_EXPR fold to fail.
23241 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23244 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23245 to switched_sections.
23247 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23250 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23251 test for d.testing.
23253 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23256 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23257 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23259 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23262 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23263 is BLKmode and bitpos not zero or mode change is needed.
23265 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23268 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23271 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23274 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23275 instead of MULT rtx. Update all corresponding splitters.
23276 (*saddl_se): Ditto.
23277 (*ssub<modesuffix>): Ditto.
23278 (*ssubl_se): Ditto.
23279 (*cmp_sadd_di): Update split patterns.
23280 (*cmp_sadd_si): Ditto.
23281 (*cmp_sadd_sidi): Ditto.
23282 (*cmp_ssub_di): Ditto.
23283 (*cmp_ssub_si): Ditto.
23284 (*cmp_ssub_sidi): Ditto.
23285 * config/alpha/predicates.md (const23_operand): New predicate.
23286 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23287 Look for ASHIFT, not MULT inner operand.
23288 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23290 2018-01-04 Martin Liska <mliska@suse.cz>
23292 PR gcov-profile/83669
23293 * gcov.c (output_intermediate_file): Add version to intermediate
23295 * doc/gcov.texi: Document new field 'version' in intermediate
23296 file format. Fix location of '-k' option of gcov command.
23298 2018-01-04 Martin Liska <mliska@suse.cz>
23301 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23303 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23305 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23307 2018-01-03 Martin Sebor <msebor@redhat.com>
23309 PR tree-optimization/83655
23310 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23311 checking calls with invalid arguments.
23313 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23315 * tree-vect-stmts.c (vect_get_store_rhs): New function.
23316 (vectorizable_mask_load_store): Delete.
23317 (vectorizable_call): Return false for masked loads and stores.
23318 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
23319 instead of gimple_assign_rhs1.
23320 (vectorizable_load): Handle IFN_MASK_LOAD.
23321 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23323 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23325 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23327 (vectorizable_mask_load_store): ...here.
23328 (vectorizable_load): ...and here.
23330 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23332 * tree-vect-stmts.c (vect_build_all_ones_mask)
23333 (vect_build_zero_merge_argument): New functions, split out from...
23334 (vectorizable_load): ...here.
23336 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23338 * tree-vect-stmts.c (vect_check_store_rhs): New function,
23340 (vectorizable_mask_load_store): ...here.
23341 (vectorizable_store): ...and here.
23343 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23345 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23347 (vectorizable_mask_load_store): ...here.
23349 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23351 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23352 (vect_model_store_cost): Take a vec_load_store_type instead of a
23354 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23355 (vect_model_store_cost): Take a vec_load_store_type instead of a
23357 (vectorizable_mask_load_store): Update accordingly.
23358 (vectorizable_store): Likewise.
23359 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23361 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23363 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23364 IFN_MASK_LOAD calls here rather than...
23365 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23367 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23368 Alan Hayward <alan.hayward@arm.com>
23369 David Sherwood <david.sherwood@arm.com>
23371 * expmed.c (extract_bit_field_1): For vector extracts,
23372 fall back to extract_bit_field_as_subreg if vec_extract
23375 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23376 Alan Hayward <alan.hayward@arm.com>
23377 David Sherwood <david.sherwood@arm.com>
23379 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23380 they are variable or constant sized.
23381 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23382 slots for constant-sized data.
23384 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23385 Alan Hayward <alan.hayward@arm.com>
23386 David Sherwood <david.sherwood@arm.com>
23388 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23389 handling COND_EXPRs with boolean comparisons, try to find a better
23390 basis for the mask type than the boolean itself.
23392 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23394 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23395 is calculated and how it can be overridden.
23396 * genmodes.c (max_bitsize_mode_any_mode): New variable.
23397 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23399 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23402 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23403 Alan Hayward <alan.hayward@arm.com>
23404 David Sherwood <david.sherwood@arm.com>
23406 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23407 Remove the mode argument.
23408 (aarch64_simd_valid_immediate): Remove the mode and inverse
23410 * config/aarch64/iterators.md (bitsize): New iterator.
23411 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23412 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23413 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23414 aarch64_simd_valid_immediate.
23415 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23416 (aarch64_reg_or_bic_imm): Likewise.
23417 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23418 with an insn_type enum and msl with a modifier_type enum.
23419 Replace element_width with a scalar_mode. Change the shift
23420 to unsigned int. Add constructors for scalar_float_mode and
23421 scalar_int_mode elements.
23422 (aarch64_vect_float_const_representable_p): Delete.
23423 (aarch64_can_const_movi_rtx_p)
23424 (aarch64_simd_scalar_immediate_valid_for_move)
23425 (aarch64_simd_make_constant): Update call to
23426 aarch64_simd_valid_immediate.
23427 (aarch64_advsimd_valid_immediate_hs): New function.
23428 (aarch64_advsimd_valid_immediate): Likewise.
23429 (aarch64_simd_valid_immediate): Remove mode and inverse
23430 arguments. Rewrite to use the above. Use const_vec_duplicate_p
23431 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23432 and aarch64_float_const_representable_p on the result.
23433 (aarch64_output_simd_mov_immediate): Remove mode argument.
23434 Update call to aarch64_simd_valid_immediate and use of
23435 simd_immediate_info.
23436 (aarch64_output_scalar_simd_mov_immediate): Update call
23439 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23440 Alan Hayward <alan.hayward@arm.com>
23441 David Sherwood <david.sherwood@arm.com>
23443 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23444 (mode_nunits): Likewise CONST_MODE_NUNITS.
23445 * machmode.def (ADJUST_NUNITS): Document.
23446 * genmodes.c (mode_data::need_nunits_adj): New field.
23447 (blank_mode): Update accordingly.
23448 (adj_nunits): New variable.
23449 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23451 (emit_mode_size_inline): Set need_bytesize_adj for all modes
23452 listed in adj_nunits.
23453 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23454 listed in adj_nunits. Don't emit case statements for such modes.
23455 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23456 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
23457 nothing if adj_nunits is nonnull.
23458 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23459 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23460 (emit_mode_fbit): Update use of print_maybe_const_decl.
23461 (emit_move_size): Likewise. Treat the array as non-const
23463 (emit_mode_adjustments): Handle adj_nunits.
23465 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23467 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23468 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23469 (VECTOR_MODES): Use it.
23470 (make_vector_modes): Take the prefix as an argument.
23472 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23473 Alan Hayward <alan.hayward@arm.com>
23474 David Sherwood <david.sherwood@arm.com>
23476 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23477 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23478 for MODE_VECTOR_BOOL.
23479 * machmode.def (VECTOR_BOOL_MODE): Document.
23480 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23481 (make_vector_bool_mode): New function.
23482 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23484 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23485 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23487 * stor-layout.c (int_mode_for_mode): Likewise.
23488 * tree.c (build_vector_type_for_mode): Likewise.
23489 * varasm.c (output_constant_pool_2): Likewise.
23490 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23491 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
23492 for MODE_VECTOR_BOOL.
23493 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23494 of mode class checks.
23495 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23496 instead of a list of mode class checks.
23497 (expand_vector_scalar_condition): Likewise.
23498 (type_for_widest_vector_mode): Handle BImode as an inner mode.
23500 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23501 Alan Hayward <alan.hayward@arm.com>
23502 David Sherwood <david.sherwood@arm.com>
23504 * machmode.h (mode_size): Change from unsigned short to
23506 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23507 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23508 or if measurement_type is not polynomial.
23509 (fixed_size_mode::includes_p): Check for constant-sized modes.
23510 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23511 return a poly_uint16 rather than an unsigned short.
23512 (emit_mode_size): Change the type of mode_size from unsigned short
23513 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
23514 (emit_mode_adjustments): Cope with polynomial vector sizes.
23515 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23517 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23519 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23520 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23521 * caller-save.c (setup_save_areas): Likewise.
23522 (replace_reg_with_saved_mem): Likewise.
23523 * calls.c (emit_library_call_value_1): Likewise.
23524 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23525 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23526 (gen_lowpart_for_combine): Likewise.
23527 * convert.c (convert_to_integer_1): Likewise.
23528 * cse.c (equiv_constant, cse_insn): Likewise.
23529 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23530 (cselib_subst_to_values): Likewise.
23531 * dce.c (word_dce_process_block): Likewise.
23532 * df-problems.c (df_word_lr_mark_ref): Likewise.
23533 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23534 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23535 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23536 (rtl_for_decl_location): Likewise.
23537 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23538 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23539 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23540 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23541 (expand_expr_real_1): Likewise.
23542 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23543 (pad_below): Likewise.
23544 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23545 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23546 * ira.c (get_subreg_tracking_sizes): Likewise.
23547 * ira-build.c (ira_create_allocno_objects): Likewise.
23548 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23549 (ira_sort_regnos_for_alter_reg): Likewise.
23550 * ira-costs.c (record_operand_costs): Likewise.
23551 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23552 (resolve_simple_move): Likewise.
23553 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23554 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23555 (lra_constraints): Likewise.
23556 (CONST_POOL_OK_P): Reject variable-sized modes.
23557 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23558 (add_pseudo_to_slot, lra_spill): Likewise.
23559 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23560 * optabs-query.c (get_best_extraction_insn): Likewise.
23561 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23562 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23563 (expand_mult_highpart, valid_multiword_target_p): Likewise.
23564 * recog.c (offsettable_address_addr_space_p): Likewise.
23565 * regcprop.c (maybe_mode_change): Likewise.
23566 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23567 * regrename.c (build_def_use): Likewise.
23568 * regstat.c (dump_reg_info): Likewise.
23569 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23570 (find_reloads, find_reloads_subreg_address): Likewise.
23571 * reload1.c (eliminate_regs_1): Likewise.
23572 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23573 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23574 (simplify_binary_operation_1, simplify_subreg): Likewise.
23575 * targhooks.c (default_function_arg_padding): Likewise.
23576 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23577 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23578 (verify_gimple_assign_ternary): Likewise.
23579 * tree-inline.c (estimate_move_cost): Likewise.
23580 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23581 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23582 (get_address_cost_ainc): Likewise.
23583 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23584 (vect_supportable_dr_alignment): Likewise.
23585 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23586 (vectorizable_reduction): Likewise.
23587 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23588 (vectorizable_operation, vectorizable_load): Likewise.
23589 * tree.c (build_same_sized_truth_vector_type): Likewise.
23590 * valtrack.c (cleanup_auto_inc_dec): Likewise.
23591 * var-tracking.c (emit_note_insn_var_location): Likewise.
23592 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23593 (ADDR_VEC_ALIGN): Likewise.
23595 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23596 Alan Hayward <alan.hayward@arm.com>
23597 David Sherwood <david.sherwood@arm.com>
23599 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23601 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23602 or if measurement_type is polynomial.
23603 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23604 * combine.c (make_extraction): Likewise.
23605 * dse.c (find_shift_sequence): Likewise.
23606 * dwarf2out.c (mem_loc_descriptor): Likewise.
23607 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23608 (extract_bit_field, extract_low_bits): Likewise.
23609 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23610 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23611 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23612 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23613 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23614 * reload.c (find_reloads): Likewise.
23615 * reload1.c (alter_reg): Likewise.
23616 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23617 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23618 * tree-if-conv.c (predicate_mem_writes): Likewise.
23619 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23620 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23621 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23622 * valtrack.c (dead_debug_insert_temp): Likewise.
23623 * varasm.c (mergeable_constant_section): Likewise.
23624 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23626 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23627 Alan Hayward <alan.hayward@arm.com>
23628 David Sherwood <david.sherwood@arm.com>
23630 * expr.c (expand_assignment): Cope with polynomial mode sizes
23631 when assigning to a CONCAT.
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 * machmode.h (mode_precision): Change from unsigned short to
23639 (mode_to_precision): Return a poly_uint16 rather than an unsigned
23641 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23642 or if measurement_type is not polynomial.
23643 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
23644 in which the mode is already known to be a scalar_int_mode.
23645 * genmodes.c (emit_mode_precision): Change the type of mode_precision
23646 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
23648 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23649 for GET_MODE_PRECISION.
23650 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23651 for GET_MODE_PRECISION.
23652 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23654 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23655 (expand_field_assignment, make_extraction): Likewise.
23656 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23657 (get_last_value): Likewise.
23658 * convert.c (convert_to_integer_1): Likewise.
23659 * cse.c (cse_insn): Likewise.
23660 * expr.c (expand_expr_real_1): Likewise.
23661 * lra-constraints.c (simplify_operand_subreg): Likewise.
23662 * optabs-query.c (can_atomic_load_p): Likewise.
23663 * optabs.c (expand_atomic_load): Likewise.
23664 (expand_atomic_store): Likewise.
23665 * ree.c (combine_reaching_defs): Likewise.
23666 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23667 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23668 * tree.h (type_has_mode_precision_p): Likewise.
23669 * ubsan.c (instrument_si_overflow): Likewise.
23671 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23672 Alan Hayward <alan.hayward@arm.com>
23673 David Sherwood <david.sherwood@arm.com>
23675 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23676 polynomial numbers of units.
23677 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23678 (valid_vector_subparts_p): New function.
23679 (build_vector_type): Remove temporary shim and take the number
23680 of units as a poly_uint64 rather than an int.
23681 (build_opaque_vector_type): Take the number of units as a
23682 poly_uint64 rather than an int.
23683 * tree.c (build_vector_from_ctor): Handle polynomial
23684 TYPE_VECTOR_SUBPARTS.
23685 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23686 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23687 (build_vector_from_val): If the number of units is variable,
23688 use build_vec_duplicate_cst for constant operands and
23689 VEC_DUPLICATE_EXPR otherwise.
23690 (make_vector_type): Remove temporary is_constant ().
23691 (build_vector_type, build_opaque_vector_type): Take the number of
23692 units as a poly_uint64 rather than an int.
23693 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23695 * cfgexpand.c (expand_debug_expr): Likewise.
23696 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23697 (store_constructor, expand_expr_real_1): Likewise.
23698 (const_scalar_mask_from_tree): Likewise.
23699 * fold-const-call.c (fold_const_reduction): Likewise.
23700 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23701 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23702 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23703 (fold_relational_const): Likewise.
23704 (native_interpret_vector): Likewise. Change the size from an
23705 int to an unsigned int.
23706 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23707 TYPE_VECTOR_SUBPARTS.
23708 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23709 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23710 duplicating a non-constant operand into a variable-length vector.
23711 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23712 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23713 * ipa-icf.c (sem_variable::equals): Likewise.
23714 * match.pd: Likewise.
23715 * omp-simd-clone.c (simd_clone_subparts): Likewise.
23716 * print-tree.c (print_node): Likewise.
23717 * stor-layout.c (layout_type): Likewise.
23718 * targhooks.c (default_builtin_vectorization_cost): Likewise.
23719 * tree-cfg.c (verify_gimple_comparison): Likewise.
23720 (verify_gimple_assign_binary): Likewise.
23721 (verify_gimple_assign_ternary): Likewise.
23722 (verify_gimple_assign_single): Likewise.
23723 * tree-pretty-print.c (dump_generic_node): Likewise.
23724 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23725 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23726 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23727 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23728 (vect_shift_permute_load_chain): Likewise.
23729 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23730 (expand_vector_condition, optimize_vector_constructor): Likewise.
23731 (lower_vec_perm, get_compute_type): Likewise.
23732 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23733 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23734 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23735 (vect_recog_mask_conversion_pattern): Likewise.
23736 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23737 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23738 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23739 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23740 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23741 (vectorizable_shift, vectorizable_operation, vectorizable_store)
23742 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
23743 (supportable_widening_operation): Likewise.
23744 (supportable_narrowing_operation): Likewise.
23745 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
23747 * varasm.c (output_constant): Likewise.
23749 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23750 Alan Hayward <alan.hayward@arm.com>
23751 David Sherwood <david.sherwood@arm.com>
23753 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
23754 so that both the length == 3 and length != 3 cases set up their
23755 own permute vectors. Add comments explaining why we know the
23756 number of elements is constant.
23757 (vect_permute_load_chain): Likewise.
23759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23760 Alan Hayward <alan.hayward@arm.com>
23761 David Sherwood <david.sherwood@arm.com>
23763 * machmode.h (mode_nunits): Change from unsigned char to
23765 (ONLY_FIXED_SIZE_MODES): New macro.
23766 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
23767 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
23768 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23770 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23771 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23772 or if measurement_type is not polynomial.
23773 * genmodes.c (ZERO_COEFFS): New macro.
23774 (emit_mode_nunits_inline): Make mode_nunits_inline return a
23776 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23777 Use ZERO_COEFFS when emitting initializers.
23778 * data-streamer.h (bp_pack_poly_value): New function.
23779 (bp_unpack_poly_value): Likewise.
23780 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23781 for GET_MODE_NUNITS.
23782 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23783 for GET_MODE_NUNITS.
23784 * tree.c (make_vector_type): Remove temporary shim and make
23785 the real function take the number of units as a poly_uint64
23786 rather than an int.
23787 (build_vector_type_for_mode): Handle polynomial nunits.
23788 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23789 * emit-rtl.c (const_vec_series_p_1): Likewise.
23790 (gen_rtx_CONST_VECTOR): Likewise.
23791 * fold-const.c (test_vec_duplicate_folding): Likewise.
23792 * genrecog.c (validate_pattern): Likewise.
23793 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23794 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23795 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23796 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23797 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23798 * rtlanal.c (subreg_get_info): Likewise.
23799 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23800 (vect_grouped_load_supported): Likewise.
23801 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23802 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23803 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23804 (simplify_const_unary_operation, simplify_binary_operation_1)
23805 (simplify_const_binary_operation, simplify_ternary_operation)
23806 (test_vector_ops_duplicate, test_vector_ops): Likewise.
23807 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23808 instead of CONST_VECTOR_NUNITS.
23809 * varasm.c (output_constant_pool_2): Likewise.
23810 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23811 explicit-encoded elements in the XVEC for variable-length vectors.
23813 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23815 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23817 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23818 Alan Hayward <alan.hayward@arm.com>
23819 David Sherwood <david.sherwood@arm.com>
23821 * coretypes.h (fixed_size_mode): Declare.
23822 (fixed_size_mode_pod): New typedef.
23823 * builtins.h (target_builtins::x_apply_args_mode)
23824 (target_builtins::x_apply_result_mode): Change type to
23825 fixed_size_mode_pod.
23826 * builtins.c (apply_args_size, apply_result_size, result_vector)
23827 (expand_builtin_apply_args_1, expand_builtin_apply)
23828 (expand_builtin_return): Update accordingly.
23830 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23832 * cse.c (hash_rtx_cb): Hash only the encoded elements.
23833 * cselib.c (cselib_hash_rtx): Likewise.
23834 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
23835 CONST_VECTOR encoding.
23837 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23838 Jeff Law <law@redhat.com>
23841 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
23842 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
23843 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
23844 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
23847 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
23848 explicitly probe *sp in a noreturn function if there were any callee
23849 register saves or frame pointer is needed.
23851 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23854 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
23855 BLKmode for ternary, binary or unary expressions.
23858 * var-tracking.c (delete_vta_debug_insn): New inline function.
23859 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
23860 insns from get_insns () to NULL instead of each bb separately.
23861 Use delete_vta_debug_insn. No longer static.
23862 (vt_debug_insns_local, variable_tracking_main_1): Adjust
23863 delete_vta_debug_insns callers.
23864 * rtl.h (delete_vta_debug_insns): Declare.
23865 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
23866 instead of variable_tracking_main.
23868 2018-01-03 Martin Sebor <msebor@redhat.com>
23870 PR tree-optimization/83603
23871 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
23872 arguments past the endof the argument list in functions declared
23873 without a prototype.
23874 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
23875 Avoid checking when arguments are null.
23877 2018-01-03 Martin Sebor <msebor@redhat.com>
23880 * doc/extend.texi (attribute const): Fix a typo.
23881 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
23882 issuing -Wsuggest-attribute for void functions.
23884 2018-01-03 Martin Sebor <msebor@redhat.com>
23886 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
23887 offset_int::from instead of wide_int::to_shwi.
23888 (maybe_diag_overlap): Remove assertion.
23889 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
23890 * gimple-ssa-sprintf.c (format_directive): Same.
23891 (parse_directive): Same.
23892 (sprintf_dom_walker::compute_format_length): Same.
23893 (try_substitute_return_value): Same.
23895 2018-01-03 Jeff Law <law@redhat.com>
23897 PR middle-end/83654
23898 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
23899 non-constant residual for zero at runtime and avoid probing in
23900 that case. Reorganize code for trailing problem to mirror handling
23903 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23905 PR tree-optimization/83501
23906 * tree-ssa-strlen.c (get_string_cst): New.
23907 (handle_char_store): Call get_string_cst.
23909 2018-01-03 Martin Liska <mliska@suse.cz>
23911 PR tree-optimization/83593
23912 * tree-ssa-strlen.c: Include tree-cfg.h.
23913 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
23914 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
23915 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
23917 (strlen_dom_walker::before_dom_children): Call
23918 gimple_purge_dead_eh_edges. Dump tranformation with details
23920 (strlen_dom_walker::before_dom_children): Update call by adding
23921 new argument cleanup_eh.
23922 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
23924 2018-01-03 Martin Liska <mliska@suse.cz>
23927 * cif-code.def (VARIADIC_THUNK): New enum value.
23928 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
23931 2018-01-03 Jan Beulich <jbeulich@suse.com>
23933 * sse.md (mov<mode>_internal): Tighten condition for when to use
23934 vmovdqu<ssescalarsize> for TI and OI modes.
23936 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23938 Update copyright years.
23940 2018-01-03 Martin Liska <mliska@suse.cz>
23943 * ipa-visibility.c (function_and_variable_visibility): Skip
23944 functions with noipa attribure.
23946 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23948 * gcc.c (process_command): Update copyright notice dates.
23949 * gcov-dump.c (print_version): Ditto.
23950 * gcov.c (print_version): Ditto.
23951 * gcov-tool.c (print_version): Ditto.
23952 * gengtype.c (create_file): Ditto.
23953 * doc/cpp.texi: Bump @copying's copyright year.
23954 * doc/cppinternals.texi: Ditto.
23955 * doc/gcc.texi: Ditto.
23956 * doc/gccint.texi: Ditto.
23957 * doc/gcov.texi: Ditto.
23958 * doc/install.texi: Ditto.
23959 * doc/invoke.texi: Ditto.
23961 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23963 * vector-builder.h (vector_builder::m_full_nelts): Change from
23964 unsigned int to poly_uint64.
23965 (vector_builder::full_nelts): Update prototype accordingly.
23966 (vector_builder::new_vector): Likewise.
23967 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
23968 (vector_builder::operator ==): Likewise.
23969 (vector_builder::finalize): Likewise.
23970 * int-vector-builder.h (int_vector_builder::int_vector_builder):
23971 Take the number of elements as a poly_uint64 rather than an
23973 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
23974 from unsigned int to poly_uint64.
23975 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
23976 (vec_perm_indices::new_vector): Likewise.
23977 (vec_perm_indices::length): Likewise.
23978 (vec_perm_indices::nelts_per_input): Likewise.
23979 (vec_perm_indices::input_nelts): Likewise.
23980 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
23981 number of elements per input as a poly_uint64 rather than an
23982 unsigned int. Use the original encoding for variable-length
23983 vectors, rather than clamping each individual element.
23984 For the second and subsequent elements in each pattern,
23985 clamp the step and base before clamping their sum.
23986 (vec_perm_indices::series_p): Handle polynomial element counts.
23987 (vec_perm_indices::all_in_range_p): Likewise.
23988 (vec_perm_indices_to_tree): Likewise.
23989 (vec_perm_indices_to_rtx): Likewise.
23990 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
23991 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
23992 (tree_vector_builder::new_binary_operation): Handle polynomial
23993 element counts. Return false if we need to know the number
23994 of elements at compile time.
23995 * fold-const.c (fold_vec_perm): Punt if the number of elements
23996 isn't known at compile time.
23998 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24000 * vec-perm-indices.h (vec_perm_builder): Change element type
24001 from HOST_WIDE_INT to poly_int64.
24002 (vec_perm_indices::element_type): Update accordingly.
24003 (vec_perm_indices::clamp): Handle polynomial element_types.
24004 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24005 (vec_perm_indices::all_in_range_p): Likewise.
24006 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24008 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24009 polynomial vec_perm_indices element types.
24010 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24011 * fold-const.c (fold_vec_perm): Likewise.
24012 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24013 * tree-vect-generic.c (lower_vec_perm): Likewise.
24014 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24015 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24016 element type to HOST_WIDE_INT.
24018 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24019 Alan Hayward <alan.hayward@arm.com>
24020 David Sherwood <david.sherwood@arm.com>
24022 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24023 rather than an int. Use plus_constant.
24024 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24025 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24027 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24028 Alan Hayward <alan.hayward@arm.com>
24029 David Sherwood <david.sherwood@arm.com>
24031 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24032 a HOST_WIDE_INT to a poly_int64.
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 (load_register_parameters): Cope with polynomial
24039 mode sizes. Require a constant size for BLKmode parameters
24040 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24041 forces a parameter to be padded at the lsb end in order to
24042 fill a complete number of words, require the parameter size
24043 to be ordered wrt UNITS_PER_WORD.
24045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24046 Alan Hayward <alan.hayward@arm.com>
24047 David Sherwood <david.sherwood@arm.com>
24049 * reload1.c (spill_stack_slot_width): Change element type
24050 from unsigned int to poly_uint64_pod.
24051 (alter_reg): Treat mode sizes as polynomial.
24053 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24054 Alan Hayward <alan.hayward@arm.com>
24055 David Sherwood <david.sherwood@arm.com>
24057 * reload.c (complex_word_subreg_p): New function.
24058 (reload_inner_reg_of_subreg, push_reload): Use it.
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 * lra-constraints.c (process_alt_operands): Reject matched
24065 operands whose sizes aren't ordered.
24066 (match_reload): Refer to this check here.
24068 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24069 Alan Hayward <alan.hayward@arm.com>
24070 David Sherwood <david.sherwood@arm.com>
24072 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24073 that the mode size is in the set {1, 2, 4, 8, 16}.
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 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24080 Use plus_constant instead of gen_rtx_PLUS.
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 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24087 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24088 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24089 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24090 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24091 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24092 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24093 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24094 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24095 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24097 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24098 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24099 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24100 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24101 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24102 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24103 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24104 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24105 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24106 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24108 * expr.c (emit_move_resolve_push): Treat the input and result
24109 of PUSH_ROUNDING as a poly_int64.
24110 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24111 (emit_push_insn): Likewise.
24112 * lra-eliminations.c (mark_not_eliminable): Likewise.
24113 * recog.c (push_operand): Likewise.
24114 * reload1.c (elimination_effects): Likewise.
24115 * rtlanal.c (nonzero_bits1): Likewise.
24116 * calls.c (store_one_arg): Likewise. Require the padding to be
24117 known at compile time.
24119 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24120 Alan Hayward <alan.hayward@arm.com>
24121 David Sherwood <david.sherwood@arm.com>
24123 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24124 Use plus_constant instead of gen_rtx_PLUS.
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 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24131 rather than an int.
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 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24138 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24139 via stack temporaries. Treat the mode size as polynomial too.
24141 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24142 Alan Hayward <alan.hayward@arm.com>
24143 David Sherwood <david.sherwood@arm.com>
24145 * expr.c (expand_expr_real_2): When handling conversions involving
24146 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24147 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24148 as a poly_uint64 too.
24150 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24151 Alan Hayward <alan.hayward@arm.com>
24152 David Sherwood <david.sherwood@arm.com>
24154 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24156 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24157 Alan Hayward <alan.hayward@arm.com>
24158 David Sherwood <david.sherwood@arm.com>
24160 * combine.c (can_change_dest_mode): Handle polynomial
24161 REGMODE_NATURAL_SIZE.
24162 * expmed.c (store_bit_field_1): Likewise.
24163 * expr.c (store_constructor): Likewise.
24164 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24165 and polynomial REGMODE_NATURAL_SIZE.
24166 (gen_lowpart_common): Likewise.
24167 * reginfo.c (record_subregs_of_mode): Likewise.
24168 * rtlanal.c (read_modify_subreg_p): Likewise.
24170 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24171 Alan Hayward <alan.hayward@arm.com>
24172 David Sherwood <david.sherwood@arm.com>
24174 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24175 numbers of elements.
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 * match.pd: Cope with polynomial numbers of vector elements.
24183 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24184 Alan Hayward <alan.hayward@arm.com>
24185 David Sherwood <david.sherwood@arm.com>
24187 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24188 in a POINTER_PLUS_EXPR.
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 * omp-simd-clone.c (simd_clone_subparts): New function.
24195 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24196 (ipa_simd_modify_function_body): Likewise.
24198 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24199 Alan Hayward <alan.hayward@arm.com>
24200 David Sherwood <david.sherwood@arm.com>
24202 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24203 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24204 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24205 (expand_vector_condition, vector_element): Likewise.
24206 (subparts_gt): New function.
24207 (get_compute_type): Use subparts_gt.
24208 (count_type_subparts): Delete.
24209 (expand_vector_operations_1): Use subparts_gt instead of
24210 count_type_subparts.
24212 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24213 Alan Hayward <alan.hayward@arm.com>
24214 David Sherwood <david.sherwood@arm.com>
24216 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24217 (vect_compile_time_alias): ...this new function. Do the calculation
24218 on poly_ints rather than trees.
24219 (vect_prune_runtime_alias_test_list): Update call accordingly.
24221 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24222 Alan Hayward <alan.hayward@arm.com>
24223 David Sherwood <david.sherwood@arm.com>
24225 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24227 (vect_schedule_slp_instance): Likewise.
24229 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24230 Alan Hayward <alan.hayward@arm.com>
24231 David Sherwood <david.sherwood@arm.com>
24233 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24234 constant and extern definitions for variable-length vectors.
24235 (vect_get_constant_vectors): Note that the number of units
24236 is known to be constant.
24238 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24239 Alan Hayward <alan.hayward@arm.com>
24240 David Sherwood <david.sherwood@arm.com>
24242 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24243 of units as polynomial. Choose between WIDE and NARROW based
24246 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24247 Alan Hayward <alan.hayward@arm.com>
24248 David Sherwood <david.sherwood@arm.com>
24250 * tree-vect-stmts.c (simd_clone_subparts): New function.
24251 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
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 (vectorizable_call): Treat the number of
24258 vectors as polynomial. Use build_index_vector for
24259 IFN_GOMP_SIMD_LANE.
24261 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24262 Alan Hayward <alan.hayward@arm.com>
24263 David Sherwood <david.sherwood@arm.com>
24265 * tree-vect-stmts.c (get_load_store_type): Treat the number of
24266 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24267 for variable-length vectors.
24268 (vectorizable_mask_load_store): Treat the number of units as
24269 polynomial, asserting that it is constant if the condition has
24270 already been enforced.
24271 (vectorizable_store, vectorizable_load): Likewise.
24273 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24274 Alan Hayward <alan.hayward@arm.com>
24275 David Sherwood <david.sherwood@arm.com>
24277 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24278 of units as polynomial. Punt if we can't tell at compile time
24279 which vector contains the final result.
24281 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24282 Alan Hayward <alan.hayward@arm.com>
24283 David Sherwood <david.sherwood@arm.com>
24285 * tree-vect-loop.c (vectorizable_induction): Treat the number
24286 of units as polynomial. Punt on SLP inductions. Use an integer
24287 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24288 cast of such a series for variable-length floating-point
24291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24292 Alan Hayward <alan.hayward@arm.com>
24293 David Sherwood <david.sherwood@arm.com>
24295 * tree.h (build_index_vector): Declare.
24296 * tree.c (build_index_vector): New function.
24297 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24298 of units as polynomial, forcibly converting it to a constant if
24299 vectorizable_reduction has already enforced the condition.
24300 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
24301 to create a {1,2,3,...} vector.
24302 (vectorizable_reduction): Treat the number of units as polynomial.
24303 Choose vectype_in based on the largest scalar element size rather
24304 than the smallest number of units. Enforce the restrictions
24307 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24308 Alan Hayward <alan.hayward@arm.com>
24309 David Sherwood <david.sherwood@arm.com>
24311 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24312 number of units as polynomial.
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 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24319 * target.def (autovectorize_vector_sizes): Return the vector sizes
24320 by pointer, using vector_sizes rather than a bitmask.
24321 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24322 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24323 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24325 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24326 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24327 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24328 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24329 * omp-general.c (omp_max_vf): Likewise.
24330 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24331 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24332 * tree-vect-loop.c (vect_analyze_loop): Likewise.
24333 * tree-vect-slp.c (vect_slp_bb): Likewise.
24334 * doc/tm.texi: Regenerate.
24335 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24337 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24338 the vector size as a poly_uint64 rather than an unsigned int.
24339 (current_vector_size): Change from an unsigned int to a poly_uint64.
24340 (get_vectype_for_scalar_type): Update accordingly.
24341 * tree.h (build_truth_vector_type): Take the size and number of
24342 units as a poly_uint64 rather than an unsigned int.
24343 (build_vector_type): Add a temporary overload that takes
24344 the number of units as a poly_uint64 rather than an unsigned int.
24345 * tree.c (make_vector_type): Likewise.
24346 (build_truth_vector_type): Take the number of units as a poly_uint64
24347 rather than an unsigned int.
24349 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24350 Alan Hayward <alan.hayward@arm.com>
24351 David Sherwood <david.sherwood@arm.com>
24353 * target.def (get_mask_mode): Take the number of units and length
24354 as poly_uint64s rather than unsigned ints.
24355 * targhooks.h (default_get_mask_mode): Update accordingly.
24356 * targhooks.c (default_get_mask_mode): Likewise.
24357 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24358 * doc/tm.texi: Regenerate.
24360 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24361 Alan Hayward <alan.hayward@arm.com>
24362 David Sherwood <david.sherwood@arm.com>
24364 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24365 * omp-general.c (omp_max_vf): Likewise.
24366 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24367 (expand_omp_simd): Handle polynomial safelen.
24368 * omp-low.c (omplow_simd_context): Add a default constructor.
24369 (omplow_simd_context::max_vf): Change from int to poly_uint64.
24370 (lower_rec_simd_input_clauses): Update accordingly.
24371 (lower_rec_input_clauses): Likewise.
24373 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24374 Alan Hayward <alan.hayward@arm.com>
24375 David Sherwood <david.sherwood@arm.com>
24377 * tree-vectorizer.h (vect_nunits_for_cost): New function.
24378 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24379 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24380 (vect_analyze_slp_cost): Likewise.
24381 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24382 (vect_model_load_cost): Likewise.
24384 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24385 Alan Hayward <alan.hayward@arm.com>
24386 David Sherwood <david.sherwood@arm.com>
24388 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24389 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24390 from an unsigned int * to a poly_uint64_pod *.
24391 (calculate_unrolling_factor): New function.
24392 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
24394 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24395 Alan Hayward <alan.hayward@arm.com>
24396 David Sherwood <david.sherwood@arm.com>
24398 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24399 from an unsigned int to a poly_uint64.
24400 (_loop_vec_info::slp_unrolling_factor): Likewise.
24401 (_loop_vec_info::vectorization_factor): Change from an int
24403 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24404 (vect_get_num_vectors): New function.
24405 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24406 (vect_get_num_copies): Use vect_get_num_vectors.
24407 (vect_analyze_data_ref_dependences): Change max_vf from an int *
24408 to an unsigned int *.
24409 (vect_analyze_data_refs): Change min_vf from an int * to a
24411 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24412 than an unsigned HOST_WIDE_INT.
24413 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24414 (vect_analyze_data_ref_dependence): Change max_vf from an int *
24415 to an unsigned int *.
24416 (vect_analyze_data_ref_dependences): Likewise.
24417 (vect_compute_data_ref_alignment): Handle polynomial vf.
24418 (vect_enhance_data_refs_alignment): Likewise.
24419 (vect_prune_runtime_alias_test_list): Likewise.
24420 (vect_shift_permute_load_chain): Likewise.
24421 (vect_supportable_dr_alignment): Likewise.
24422 (dependence_distance_ge_vf): Take the vectorization factor as a
24423 poly_uint64 rather than an unsigned HOST_WIDE_INT.
24424 (vect_analyze_data_refs): Change min_vf from an int * to a
24426 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24427 vfm1 as a poly_uint64 rather than an int. Make the same change
24428 for the returned bound_scalar.
24429 (vect_gen_vector_loop_niters): Handle polynomial vf.
24430 (vect_do_peeling): Likewise. Update call to
24431 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24432 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24434 * tree-vect-loop.c (vect_determine_vectorization_factor)
24435 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24436 (vect_get_known_peeling_cost): Likewise.
24437 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24438 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24439 (vect_transform_loop): Likewise. Use the lowest possible VF when
24440 updating the upper bounds of the loop.
24441 (vect_min_worthwhile_factor): Make static. Return an unsigned int
24442 rather than an int.
24443 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24444 polynomial unroll factors.
24445 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24446 (vect_make_slp_decision): Likewise.
24447 (vect_supported_load_permutation_p): Likewise, and polynomial
24449 (vect_analyze_slp_cost): Handle polynomial vf.
24450 (vect_slp_analyze_node_operations): Likewise.
24451 (vect_slp_analyze_bb_1): Likewise.
24452 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24453 than an unsigned HOST_WIDE_INT.
24454 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24455 (vectorizable_load): Handle polynomial vf.
24456 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24458 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24460 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24461 Alan Hayward <alan.hayward@arm.com>
24462 David Sherwood <david.sherwood@arm.com>
24464 * match.pd: Handle bit operations involving three constants
24465 and try to fold one pair.
24467 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24469 * tree-vect-loop-manip.c: Include gimple-fold.h.
24470 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24471 niters_maybe_zero parameters. Handle other cases besides a step of 1.
24472 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24473 Add a path that uses a step of VF instead of 1, but disable it
24475 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24476 and niters_no_overflow parameters. Update calls to
24477 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24478 Create a new SSA name if the latter choses to use a ste other
24479 than zero, and return it via niters_vector_mult_vf_var.
24480 * tree-vect-loop.c (vect_transform_loop): Update calls to
24481 vect_do_peeling, vect_gen_vector_loop_niters and
24482 slpeel_make_loop_iterate_ntimes.
24483 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24484 (vect_gen_vector_loop_niters): Update declarations after above changes.
24486 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24488 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24489 128-bit round to integer instructions.
24490 (ceil<mode>2): Likewise.
24491 (btrunc<mode>2): Likewise.
24492 (round<mode>2): Likewise.
24494 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24496 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24497 unaligned VSX load/store on P8/P9.
24498 (expand_block_clear): Allow the use of unaligned VSX
24499 load/store on P8/P9.
24501 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24503 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24505 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24506 swap associated with both a load and a store.
24508 2018-01-02 Andrew Waterman <andrew@sifive.com>
24510 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24511 * config/riscv/riscv.md (clear_cache): Use it.
24513 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
24515 * web.c: Remove out-of-date comment.
24517 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24519 * expr.c (fixup_args_size_notes): Check that any existing
24520 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24521 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24522 (emit_single_push_insn): ...here.
24524 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24526 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24527 (const_vector_encoded_nelts): New function.
24528 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24529 (const_vector_int_elt, const_vector_elt): Declare.
24530 * emit-rtl.c (const_vector_int_elt_1): New function.
24531 (const_vector_elt): Likewise.
24532 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24533 of CONST_VECTOR_ELT.
24535 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24537 * expr.c: Include rtx-vector-builder.h.
24538 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24539 directly on the tree encoding.
24540 (const_vector_from_tree): Likewise.
24541 * optabs.c: Include rtx-vector-builder.h.
24542 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24543 sequence of "u" values.
24544 * vec-perm-indices.c: Include rtx-vector-builder.h.
24545 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24546 directly on the vec_perm_indices encoding.
24548 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24550 * doc/rtl.texi (const_vector): Describe new encoding scheme.
24551 * Makefile.in (OBJS): Add rtx-vector-builder.o.
24552 * rtx-vector-builder.h: New file.
24553 * rtx-vector-builder.c: Likewise.
24554 * rtl.h (rtx_def::u2): Add a const_vector field.
24555 (CONST_VECTOR_NPATTERNS): New macro.
24556 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24557 (CONST_VECTOR_DUPLICATE_P): Likewise.
24558 (CONST_VECTOR_STEPPED_P): Likewise.
24559 (CONST_VECTOR_ENCODED_ELT): Likewise.
24560 (const_vec_duplicate_p): Check for a duplicated vector encoding.
24561 (unwrap_const_vec_duplicate): Likewise.
24562 (const_vec_series_p): Check for a non-duplicated vector encoding.
24563 Say that the function only returns true for integer vectors.
24564 * emit-rtl.c: Include rtx-vector-builder.h.
24565 (gen_const_vec_duplicate_1): Delete.
24566 (gen_const_vector): Call gen_const_vec_duplicate instead of
24567 gen_const_vec_duplicate_1.
24568 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24569 (gen_const_vec_duplicate): Use rtx_vector_builder.
24570 (gen_const_vec_series): Likewise.
24571 (gen_rtx_CONST_VECTOR): Likewise.
24572 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24573 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24574 Build a new vector rather than modifying a CONST_VECTOR in-place.
24575 (handle_special_swappables): Update call accordingly.
24576 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24577 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24578 Build a new vector rather than modifying a CONST_VECTOR in-place.
24579 (handle_special_swappables): Update call accordingly.
24581 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24583 * simplify-rtx.c (simplify_const_binary_operation): Use
24584 CONST_VECTOR_ELT instead of XVECEXP.
24586 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24588 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24589 the selector elements to be different from the data elements
24590 if the selector is a VECTOR_CST.
24591 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24592 ssizetype for the selector.
24594 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24596 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24597 before testing each element individually.
24598 * tree-vect-generic.c (lower_vec_perm): Likewise.
24600 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24602 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24603 * selftest-run-tests.c (selftest::run_tests): Call it.
24604 * vector-builder.h (vector_builder::operator ==): New function.
24605 (vector_builder::operator !=): Likewise.
24606 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24607 (vec_perm_indices::all_from_input_p): New function.
24608 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24609 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24610 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24611 instead of reading the VECTOR_CST directly. Detect whether both
24612 vector inputs are the same before constructing the vec_perm_indices,
24613 and update the number of inputs argument accordingly. Use the
24614 utility functions added above. Only construct sel2 if we need to.
24616 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24618 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24619 the broadcast of the low byte.
24620 (expand_mult_highpart): Use an explicit encoding for the permutes.
24621 * optabs-query.c (can_mult_highpart_p): Likewise.
24622 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24623 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24624 (vectorizable_bswap): Likewise.
24625 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24626 explicit encoding for the power-of-2 permutes.
24627 (vect_permute_store_chain): Likewise.
24628 (vect_grouped_load_supported): Likewise.
24629 (vect_permute_load_chain): Likewise.
24631 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24633 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24634 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24635 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24636 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24637 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24638 (vect_gen_perm_mask_any): Likewise.
24640 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24642 * int-vector-builder.h: New file.
24643 * vec-perm-indices.h: Include int-vector-builder.h.
24644 (vec_perm_indices): Redefine as an int_vector_builder.
24645 (auto_vec_perm_indices): Delete.
24646 (vec_perm_builder): Redefine as a stand-alone class.
24647 (vec_perm_indices::vec_perm_indices): New function.
24648 (vec_perm_indices::clamp): Likewise.
24649 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24650 (vec_perm_indices::new_vector): New function.
24651 (vec_perm_indices::new_expanded_vector): Update for new
24652 vec_perm_indices class.
24653 (vec_perm_indices::rotate_inputs): New function.
24654 (vec_perm_indices::all_in_range_p): Operate directly on the
24655 encoded form, without computing elided elements.
24656 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24657 encoding. Update for new vec_perm_indices class.
24658 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24659 the given vec_perm_builder.
24660 (expand_vec_perm_var): Update vec_perm_builder constructor.
24661 (expand_mult_highpart): Use vec_perm_builder instead of
24662 auto_vec_perm_indices.
24663 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24664 vec_perm_indices instead of auto_vec_perm_indices. Use a single
24665 or double series encoding as appropriate.
24666 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24667 vec_perm_indices instead of auto_vec_perm_indices.
24668 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24669 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24670 (vect_permute_store_chain): Likewise.
24671 (vect_grouped_load_supported): Likewise.
24672 (vect_permute_load_chain): Likewise.
24673 (vect_shift_permute_load_chain): Likewise.
24674 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24675 (vect_transform_slp_perm_load): Likewise.
24676 (vect_schedule_slp_instance): Likewise.
24677 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24678 (vectorizable_mask_load_store): Likewise.
24679 (vectorizable_bswap): Likewise.
24680 (vectorizable_store): Likewise.
24681 (vectorizable_load): Likewise.
24682 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24683 vec_perm_indices instead of auto_vec_perm_indices. Use
24684 tree_to_vec_perm_builder to read the vector from a tree.
24685 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24686 vec_perm_builder instead of a vec_perm_indices.
24687 (have_whole_vector_shift): Use vec_perm_builder and
24688 vec_perm_indices instead of auto_vec_perm_indices. Leave the
24689 truncation to calc_vec_perm_mask_for_shift.
24690 (vect_create_epilog_for_reduction): Likewise.
24691 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24692 from auto_vec_perm_indices to vec_perm_indices.
24693 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24694 instead of changing individual elements.
24695 (aarch64_vectorize_vec_perm_const): Use new_vector to install
24696 the vector in d.perm.
24697 * config/arm/arm.c (expand_vec_perm_d::perm): Change
24698 from auto_vec_perm_indices to vec_perm_indices.
24699 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24700 instead of changing individual elements.
24701 (arm_vectorize_vec_perm_const): Use new_vector to install
24702 the vector in d.perm.
24703 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24704 Update vec_perm_builder constructor.
24705 (rs6000_expand_interleave): Likewise.
24706 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24707 (rs6000_expand_interleave): Likewise.
24709 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24711 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24712 to qimode could truncate the indices.
24713 * optabs.c (expand_vec_perm_var): Likewise.
24715 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24717 * Makefile.in (OBJS): Add vec-perm-indices.o.
24718 * vec-perm-indices.h: New file.
24719 * vec-perm-indices.c: Likewise.
24720 * target.h (vec_perm_indices): Replace with a forward class
24722 (auto_vec_perm_indices): Move to vec-perm-indices.h.
24723 * optabs.h: Include vec-perm-indices.h.
24724 (expand_vec_perm): Delete.
24725 (selector_fits_mode_p, expand_vec_perm_var): Declare.
24726 (expand_vec_perm_const): Declare.
24727 * target.def (vec_perm_const_ok): Replace with...
24728 (vec_perm_const): ...this new hook.
24729 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24730 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24731 * doc/tm.texi: Regenerate.
24732 * optabs.def (vec_perm_const): Delete.
24733 * doc/md.texi (vec_perm_const): Likewise.
24734 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24735 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24736 expand_vec_perm for constant permutation vectors. Assert that
24737 the mode of variable permutation vectors is the integer equivalent
24738 of the mode that is being permuted.
24739 * optabs-query.h (selector_fits_mode_p): Declare.
24740 * optabs-query.c: Include vec-perm-indices.h.
24741 (selector_fits_mode_p): New function.
24742 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
24743 is defined, instead of checking whether the vec_perm_const_optab
24744 exists. Use targetm.vectorize.vec_perm_const instead of
24745 targetm.vectorize.vec_perm_const_ok. Check whether the indices
24746 fit in the vector mode before using a variable permute.
24747 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
24748 vec_perm_indices instead of an rtx.
24749 (expand_vec_perm): Replace with...
24750 (expand_vec_perm_const): ...this new function. Take the selector
24751 as a vec_perm_indices rather than an rtx. Also take the mode of
24752 the selector. Update call to shift_amt_for_vec_perm_mask.
24753 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
24754 Use vec_perm_indices::new_expanded_vector to expand the original
24755 selector into bytes. Check whether the indices fit in the vector
24756 mode before using a variable permute.
24757 (expand_vec_perm_var): Make global.
24758 (expand_mult_highpart): Use expand_vec_perm_const.
24759 * fold-const.c: Includes vec-perm-indices.h.
24760 * tree-ssa-forwprop.c: Likewise.
24761 * tree-vect-data-refs.c: Likewise.
24762 * tree-vect-generic.c: Likewise.
24763 * tree-vect-loop.c: Likewise.
24764 * tree-vect-slp.c: Likewise.
24765 * tree-vect-stmts.c: Likewise.
24766 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
24768 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
24769 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24770 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24771 (aarch64_vectorize_vec_perm_const): ...this new function.
24772 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24773 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24774 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24775 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24776 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24777 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24778 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24780 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
24781 check for NEON modes.
24782 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24783 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24784 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24785 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24787 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
24788 the old VEC_PERM_CONST conditions.
24789 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24790 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24791 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24792 (ia64_vectorize_vec_perm_const_ok): Merge into...
24793 (ia64_vectorize_vec_perm_const): ...this new function.
24794 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24795 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24796 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24797 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24798 * config/mips/mips.c (mips_expand_vec_perm_const)
24799 (mips_vectorize_vec_perm_const_ok): Merge into...
24800 (mips_vectorize_vec_perm_const): ...this new function.
24801 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24802 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24803 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24804 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24805 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24806 (rs6000_expand_vec_perm_const): Delete.
24807 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24809 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24810 (altivec_expand_vec_perm_const_le): Take each operand individually.
24811 Operate on constant selectors rather than rtxes.
24812 (altivec_expand_vec_perm_const): Likewise. Update call to
24813 altivec_expand_vec_perm_const_le.
24814 (rs6000_expand_vec_perm_const): Delete.
24815 (rs6000_vectorize_vec_perm_const_ok): Delete.
24816 (rs6000_vectorize_vec_perm_const): New function.
24817 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24818 an element count and rtx array.
24819 (rs6000_expand_extract_even): Update call accordingly.
24820 (rs6000_expand_interleave): Likewise.
24821 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24822 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24823 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24824 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24825 (rs6000_expand_vec_perm_const): Delete.
24826 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24827 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24828 (altivec_expand_vec_perm_const_le): Take each operand individually.
24829 Operate on constant selectors rather than rtxes.
24830 (altivec_expand_vec_perm_const): Likewise. Update call to
24831 altivec_expand_vec_perm_const_le.
24832 (rs6000_expand_vec_perm_const): Delete.
24833 (rs6000_vectorize_vec_perm_const_ok): Delete.
24834 (rs6000_vectorize_vec_perm_const): New function. Remove stray
24835 reference to the SPE evmerge intructions.
24836 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24837 an element count and rtx array.
24838 (rs6000_expand_extract_even): Update call accordingly.
24839 (rs6000_expand_interleave): Likewise.
24840 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
24841 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
24843 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24845 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24847 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
24848 vector mode and that that mode matches the mode of the data
24850 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
24851 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
24852 directly using expand_vec_perm_1 when forcing selectors into
24854 (expand_vec_perm_var): New function, split out from expand_vec_perm.
24856 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24858 * optabs-query.h (can_vec_perm_p): Delete.
24859 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
24860 * optabs-query.c (can_vec_perm_p): Split into...
24861 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
24862 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
24863 particular selector is valid.
24864 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24865 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24866 (vect_grouped_load_supported): Likewise.
24867 (vect_shift_permute_load_chain): Likewise.
24868 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24869 (vect_transform_slp_perm_load): Likewise.
24870 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24871 (vectorizable_bswap): Likewise.
24872 (vect_gen_perm_mask_checked): Likewise.
24873 * fold-const.c (fold_ternary_loc): Likewise. Don't take
24874 implementations of variable permutation vectors into account
24875 when deciding which selector to use.
24876 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
24877 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
24878 with a false third argument.
24879 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
24880 to test whether the constant selector is valid and can_vec_perm_var_p
24881 to test whether a variable selector is valid.
24883 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24885 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
24886 * optabs-query.c (can_vec_perm_p): Likewise.
24887 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
24888 instead of vec_perm_indices.
24889 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
24890 (vect_gen_perm_mask_checked): Likewise,
24891 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
24892 (vect_gen_perm_mask_checked): Likewise,
24894 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24896 * optabs-query.h (qimode_for_vec_perm): Declare.
24897 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
24898 (qimode_for_vec_perm): ...this new function.
24899 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
24901 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24903 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
24904 does not have a conditional at the top.
24906 2018-01-02 Richard Biener <rguenther@suse.de>
24908 * ipa-inline.c (big_speedup_p): Fix expression.
24910 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24913 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
24916 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24920 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24921 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24922 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
24923 cond_taken_branch_cost 3->4.
24925 2018-01-01 Jakub Jelinek <jakub@redhat.com>
24927 PR tree-optimization/83581
24928 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
24929 TODO_cleanup_cfg if any changes have been made.
24931 PR middle-end/83608
24932 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
24933 convert_modes if target mode has the right side, but different mode
24936 PR middle-end/83609
24937 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
24938 last argument when extracting from CONCAT. If either from_real or
24939 from_imag is NULL, use expansion through memory. If result is not
24940 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
24941 the parts directly to inner mode, if even that fails, use expansion
24944 PR middle-end/83623
24945 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
24946 check for bswap in mode rather than HImode and use that in expand_unop
24949 Copyright (C) 2018 Free Software Foundation, Inc.
24951 Copying and distribution of this file, with or without modification,
24952 are permitted in any medium without royalty provided the copyright
24953 notice and this notice are preserved.