1 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3 * tree-ssa-math-opts.c (is_mult_by): New function.
4 (is_square_of): Use the above.
5 (optimize_recip_sqrt): New function.
6 (pass_cse_reciprocals::execute): Use the above.
8 2018-09-05 Richard Biener <rguenther@suse.de>
11 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
12 to zero-init the emplaced vec.
14 2018-09-05 Martin Liska <mliska@suse.cz>
16 PR tree-optimization/87205
17 * tree-switch-conversion.c (pass_lower_switch::execute):
18 Group cases for switch statements.
20 2018-09-05 Richard Biener <rguenther@suse.de>
22 PR tree-optimization/87217
23 * tree-ssa-sccvn.c (vuse_valueize): New.
24 (vn_reference_lookup_pieces): Use it.
25 (vn_reference_lookup): Likewise.
27 2018-09-05 Nathan Sidwell <nathan@acm.org>
30 * stor-layout.c (place_field): Scan forwards to check last
31 bitfield when ms_bitfield_placement is in effect.
33 2018-09-05 Richard Biener <rguenther@suse.de>
36 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
39 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
40 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
42 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
43 * config.gcc (extra_objs): Build it.
44 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
46 * config/aarch64/aarch64-passes.def
47 (pass_tag_collision_avoidance): New pass.
48 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
49 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
50 (aarch64_classify_address): Remove static qualifier.
51 (aarch64_address_info, aarch64_address_type): Move to...
52 * config/aarch64/aarch64-protos.h: ... here.
53 (make_pass_tag_collision_avoidance): New function.
54 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
57 2018-09-05 Martin Liska <mliska@suse.cz>
59 * doc/gcov.texi: Update documentation of humar
61 * gcov.c (format_count): Print one decimal place, it provides
62 more fine number of situations like '1G' vs. '1.4G'.
64 2018-09-05 Martin Liska <mliska@suse.cz>
67 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
68 * optc-gen.awk: Allow 'Var' for Deprecated options in order
69 to generate a MASK value.
71 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
74 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
75 if frame pointer isn't used.
76 (compute_frame_pointer_to_fb_displacement): Likewise.
78 2018-09-04 Jakub Jelinek <jakub@redhat.com>
81 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
82 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
83 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
84 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
85 and OPTION_MASK_ISA_XSAVEC_UNSET.
87 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
89 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
90 XOR operations in NAND case.
92 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
94 * wide-int-range.cc (wide_int_range_convert): New.
95 * wide-int-range.h (wide_int_range_convert): New.
96 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
97 code into wide_int_range_convert.
98 (extract_range_into_wide_ints): Do not munge anti range constants
99 into the entire domain. Just return the range back.
101 2018-09-04 Martin Liska <mliska@suse.cz>
103 * genmatch.c (output_line_directive): Add new argument
105 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
107 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
109 * doc/invoke.texi (Option Summary): Add whitespace.
111 * doc/invoke.texi (Option Summary): Add -Waligned-new.
113 2018-09-04 Richard Biener <rguenther@suse.de>
115 PR tree-optimization/87211
116 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
117 backedge value we're supposed to treat as VARYING also number
118 the PHI to VARYING in case it got a different value-number already.
120 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
122 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
123 (extract_range_from_binary_expr_1): Do not call
124 vrp_can_optimize_bit_op.
125 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
127 (wide_int_range_get_mask_and_bounds): New.
128 (wide_int_range_optimize_bit_op): New.
129 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
130 (wide_int_range_bit_and): Same.
131 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
132 (wide_int_range_optimize_bit_op): New.
133 (wide_int_range_get_mask_and_bounds): New.
135 2018-09-04 Richard Biener <rguenther@suse.de>
137 PR tree-optimization/87176
138 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
139 variable. When value-numbering a virtual PHI node make sure
140 to not value-number to the backedge value.
142 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
144 * doc/extend.texi (Long Long, Hex Floats): Document support for
145 long long and hex floats in more recent versions of ISO C++.
147 2018-09-03 Richard Biener <rguenther@suse.de>
149 PR tree-optimization/87177
150 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
153 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
155 * bb-reorder.c (edge_order): Convert to C-qsort-style
156 tri-state comparator.
157 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
159 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
161 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
162 tri-state comparator.
163 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
165 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
167 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
168 (mergesort): ... here as maximum count for using netsort.
169 (gcc_qsort): Set nlim to 3 if stable sort is requested.
170 (gcc_stablesort): New.
171 * system.h (gcc_stablesort): Declare.
173 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
175 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
176 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
177 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
179 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
181 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
182 lxsdx and stxsdx alternatives.
183 (*mov<mode>_hardfloat64): Ditto.
184 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
186 2018-09-03 Richard Biener <rguenther@suse.de>
188 PR tree-optimization/87200
189 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
192 2018-09-03 Martin Liska <mliska@suse.cz>
194 PR tree-optimization/87201
195 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
196 Fix parenthesis in an expression.
198 2018-09-03 Richard Biener <rguenther@suse.de>
200 PR tree-optimization/87197
201 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
202 visited. CSE the VN_INFO hashtable lookup.
204 PR tree-optimization/87169
205 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
206 iterating make sure there's no extra backedges from irreducible
207 regions feeding the header. Mark the destination block
210 2018-09-03 Martin Liska <mliska@suse.cz>
213 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
214 * common/common-targhooks.c (default_get_valid_option_values):
216 * common/common-targhooks.h (default_get_valid_option_values):
218 * common/config/i386/i386-common.c: Move processor_target_table
220 (ix86_get_valid_option_values): New function.
221 (TARGET_GET_VALID_OPTION_VALUES): New macro.
222 * config/i386/i386.c (struct ptt): Move to i386-common.c.
223 (PTA_*): Move all defined masks into i386-common.c.
224 (ix86_function_specific_restore): Use new processor_cost_table.
225 * config/i386/i386.h (struct ptt): Moved from i386.c.
226 (struct pta): Likewise.
227 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
228 * doc/tm.texi.in: Likewise.
229 * opt-suggestions.c (option_proposer::suggest_option):
230 Pass prefix to build_option_suggestions.
231 (option_proposer::get_completions): Likewise.
232 (option_proposer::build_option_suggestions): Use the new target
234 * opts.c (struct option_help_tuple): New struct.
235 (print_filtered_help): Use the new target hook.
237 2018-09-03 Martin Liska <mliska@suse.cz>
240 * predict.c (set_even_probabilities): Add likely_edges
241 argument and handle cases where we have precisely one
243 (combine_predictions_for_bb): Catch also likely_edges.
244 (tree_predict_by_opcode): Handle gswitch statements.
245 * tree-cfg.h (find_case_label_for_value): New declaration.
246 (find_taken_edge_switch_expr): Likewise.
247 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
248 Find pivot in decision tree based on probabily, not by number of
251 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
253 * doc/standards.texi (Standards): Update Objective-C reference.
255 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
257 * doc/install.texi (Prerequisites): Update link for MPC.
259 2018-09-01 Michael Matz <matz@suse.de>
261 PR tree-optimization/87074
262 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
263 PHIs for outer-loop uses.
265 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
267 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
268 * doc/invoke.texi (C Dialect Options): Ditto.
270 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
272 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
274 2018-08-31 Richard Biener <rguenther@suse.de>
276 PR tree-optimization/87168
277 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
278 (rpo_elim::eliminate_avail): When OP was not visited it must
281 2018-08-31 David Malcolm <dmalcolm@redhat.com>
283 * tree-vrp.c (copy_value_range): Convert param "from" from
284 "value_range *" to "const value_range *".
285 (range_is_null): Likewise for param "vr".
286 (range_int_cst_p): Likewise.
287 (range_int_cst_singleton_p): Likewise.
288 (symbolic_range_p): Likewise.
289 (value_ranges_intersect_p): Likewise for both params.
290 (value_range_nonnegative_p): Likewise for param "vr".
291 (value_range_constant_singleton): Likewise.
292 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
293 (extract_range_into_wide_ints): Likewise for param "vr".
294 (extract_range_from_multiplicative_op): Likewise for params "vr0"
296 (vrp_can_optimize_bit_op): Likewise.
297 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
299 (extract_range_from_unary_expr): Likewise.
300 (debug_value_range): Likewise for param "vr".
301 (value_range::dump): Add "const" qualifier.
302 (vrp_prop::check_array_ref): Convert local "vr" from
303 "value_range *" to "const value_range *".
304 (vrp_prop::check_mem_ref): Likewise.
305 (vrp_prop::visit_stmt): Likewise for local "old_vr".
306 (vrp_intersect_ranges_1): Likewise for param "vr_1".
307 (vrp_intersect_ranges): Likewise.
308 (simplify_stmt_for_jump_threading): Likewise for local "vr".
309 (vrp_prop::vrp_finalize): Likewise.
310 * tree-vrp.h (value_range::dump): Add "const" qualifier.
311 (vrp_intersect_ranges): Add "const" qualifier to params as above.
312 (extract_range_from_unary_expr): Likewise.
313 (value_range_constant_singleton): Likewise.
314 (symbolic_range_p): Likewise.
315 (copy_value_range): Likewise.
316 (extract_range_from_binary_expr_1): Likewise.
317 (range_int_cst_p): Likewise.
318 (vrp_set_zero_nonzero_bits): Likewise.
319 (range_int_cst_singleton_p): Likewise.
321 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
323 * config/aarch64/arm_neon.h (vabsd_s64): New.
324 (vnegd_s64): Likewise.
326 2018-08-31 Martin Jambor <mjambor@suse.cz>
328 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
330 2018-08-31 Martin Liska <mliska@suse.cz>
332 * ipa-icf.c (sem_item::add_type): Use
333 sem_item::m_type_hash_cache.
334 * ipa-icf.h: Move the cache from sem_item_optimizer
337 2018-08-31 Nathan Sidwell <nathan@acm.org>
339 * doc/extend.texi (Backwards Compatibility): Remove implicit
340 extern C leeway of () being (...).
342 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
344 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
346 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
350 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
352 2018-08-31 Jakub Jelinek <jakub@redhat.com>
355 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
356 gen_int_mode. Formatting fixes.
358 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
360 * target.def (custom_function_descriptors): Improve documentation.
361 * doc/tm.texi.in (Trampolines): Expand discussion of function
362 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
363 beginning of the section.
364 * doc/tm.texi: Regenerated.
366 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
368 * cfg.h (class auto_edge_flag): Spell out the template-id of the
369 base class in the initializer list. This is a workaround for
370 building with older GCC.
371 (class auto_bb_flag): Likewise.
373 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
375 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
376 (altivec_vcmpequ<VI_char>_p): Remove star.
377 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
379 (expand_strncmp_vec_sequence): New function.
380 (emit_final_str_compare_vec): New function.
381 (expand_strn_compare): Add support for vector strncmp.
382 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
383 length specification to bytes.
384 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
385 (vcmpnezb_p): New pattern.
386 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
387 for option -mstring-compare-inline-limit.
389 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
391 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
392 (PTA_SKYLAKE): Add PTA_AES.
393 (PTA_GOLDMONT): Likewise.
395 2018-08-29 Jan Hubicka <jh@suse.cz>
398 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
399 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
401 2018-08-29 Jan Hubicka <jh@suse.cz>
403 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
405 (hash_tree): Do not visit TYPE_STUB_DECL.
406 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
407 stream TYPE_STUB_DECL.
408 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
409 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
410 after free_lang_data.
411 (type_in_anonymous_namespace_p): Likewise.
413 2018-08-29 Jan Hubicka <jh@suse.cz>
415 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
416 comment that it has to be even number.
417 (class sreal): Change m_sig type to int32_t.
418 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
419 int64_t for temporary calculations.
420 (sreal_verify_basics): Drop one bit from minimum and maximum.
422 2018-08-30 Richard Biener <rguenther@suse.de>
424 PR tree-optimization/87147
425 * tree-ssa-sccvn.c (SSA_VISITED): New function.
426 (visit_phi): When the degenerate result is from the backedge and
427 we didn't visit its definition yet drop to VARYING.
428 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
430 2018-08-29 Jan Hubicka <jh@suse.cz>
432 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
434 (hash_tree): Likewise.
436 2018-08-29 Jan Hubicka <jh@suse.cz>
438 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
439 and TYPE_NEXT_REF_TO.
441 2018-08-29 Jan Hubicka <jh@suse.cz>
443 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
444 comment that it has to be even number.
445 (class sreal): Change m_sig type to int32_t.
446 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
447 int64_t for temporary calculations.
448 (sreal_verify_basics): Drop one bit from minimum and maximum.
450 2018-08-30 Tamar Christina <tamar.christina@arm.com>
452 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
454 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
457 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
458 if to_add is negative.
460 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
463 * builtins.c (c_strlen): Improve range checks.
465 2018-08-29 Martin Sebor <msebor@redhat.com>
466 Jeff Law <law@redhat.com>
468 PR tree-optimization/86714
469 PR tree-optimization/86711
470 * builtins.c (c_strlen): Add arguments to call to string_constant.
471 * expr.c (string_constant): Add argument. Detect missing nul
472 terminator and outermost declaration it's missing in.
473 * expr.h (string_constant): Add argument.
474 * fold-const.c (read_from_constant_string): Add arguments to call to
476 (c_getstr): Likewise.
477 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
479 * tree-ssa-strlen.c (get_stridx): Likewise.
481 2018-08-29 Jan Hubicka <jh@suse.cz>
483 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
484 Do not stream DECL_VINDEX.
485 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
486 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
487 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
489 2018-08-29 Richard Biener <rguenther@suse.de>
491 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
492 virtual operands that are not default defs to honor region
494 (rpo_vn_valueize): Remove ineffective code here.
496 2018-08-29 Richard Biener <rguenther@suse.de>
498 PR tree-optimization/87132
499 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
500 when skipping defs reachable over backedges.
502 2018-08-29 Richard Biener <rguenther@suse.de>
504 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
505 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
506 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
507 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
508 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
509 (vn_reference_lookup_3): Remove use of const_parms.
510 (free_rpo_vn): Do not free const_parms.
511 (do_rpo_vn): Do not call init_const_parms.
512 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
513 SSA_NAME_POINTS_TO_READONLY_MEMORY.
514 (call_may_clobber_ref_p_1): Likewise.
516 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
519 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
521 (-ftree-scev-cprop): Document.
523 2018-08-29 Jan Hubicka <jh@suse.cz>
525 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
527 (sreal constructor): Update.
528 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
529 sreal:operator/): Update.
531 2018-08-29 Martin Liska <mliska@suse.cz>
533 * tree-switch-conversion.c (switch_conversion::expand):
534 Strenghten assumption about gswitch statements.
536 2018-08-29 Richard Biener <rguenther@suse.de>
538 PR tree-optimization/87117
539 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
540 re-value-number released SSA VDEFs.
542 2018-08-29 Richard Biener <rguenther@suse.de>
544 PR tree-optimization/87126
545 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
547 2018-08-28 Jim Wilson <jimw@sifive.com>
549 * config/riscv/pic.md: Rewrite.
550 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
552 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
553 (SOFTF, default_load, softload, softstore): New.
555 2018-08-28 Jeff Law <law@redhat.com>
557 * fold-const.c (fold_binary_loc): Remove recently added assert.
559 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
561 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
562 to OP parmeter of generated function.
564 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
566 PR tree-optimization/87009
567 * match.pd: Add boolean optimizations.
569 2018-08-28 Martin Sebor <msebor@redhat.com>
572 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
573 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
574 (pass_walloca::gate): Use it.
575 (alloca_call_type): Same.
576 (pass_walloca::execute): Same.
577 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
579 2018-08-28 David Malcolm <dmalcolm@redhat.com>
581 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
582 GCC_VERSION for usage of "__gcc_dump_printf__" format from
585 2018-08-28 Richard Biener <rguenther@suse.de>
587 PR tree-optimization/87124
588 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
589 constants before looking up avail.
591 2018-08-28 Jakub Jelinek <jakub@redhat.com>
594 * calls.c (maybe_warn_nonstring_arg): Punt early if
595 warn_stringop_overflow is zero. Don't call get_range_strlen
596 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
597 Swap comparison operands to have constants on rhs. Only use
598 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
601 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
603 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
604 use of tree_to_shwi. Remove duplicated test for the size being
605 a whole number of bytes.
607 2018-08-28 Richard Biener <rguenther@suse.de>
609 PR tree-optimization/87117
610 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
611 Handle removed stmt without LHS (GIMPLE_NOP).
613 2018-08-28 Richard Biener <rguenther@suse.de>
615 PR tree-optimization/87117
616 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
617 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
619 2018-08-28 Richard Biener <rguenther@suse.de>
621 PR tree-optimization/87117
622 * tree-ssa-pre.c (compute_avail): Do not make expressions
623 with predicated values available.
624 (get_expr_value_id): Assert we do not run into predicated value
627 2018-08-28 Richard Biener <rguenther@suse.de>
629 PR tree-optimization/87117
630 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
631 get virtual operands.
632 (get_expr_operands): Handle STRING_CST like other decls.
634 2018-08-28 Martin Liska <mliska@suse.cz>
636 * tree.h: Update documentation of fndecl_built_in_p
640 2018-08-27 Jeff Law <law@redhat.com>
641 PR tree-optimization/87110
642 * tree-ssa-dse.c (compute_trims): Handle non-constant
645 2018-08-27 Martin Sebor <msebor@redhat.com>
647 PR tree-optimization/86914
648 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
650 2018-08-27 Martin Sebor <msebor@redhat.com>
652 PR tree-optimization/87112
653 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
654 the type of the bound argument.
656 2018-08-27 Jeff Law <law@redhat.com>
658 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
659 type does not have a TYPE_SIZE_UNIT.
661 2018-08-27 Steve Ellcey <sellcey@cavium.com>
663 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
664 with include of backend.h.
666 2018-08-27 Richard Biener <rguenther@suse.de>
668 PR tree-optimization/86927
669 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
670 use const cond reduction code.
672 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
674 PR tree-optimization/85758
675 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
677 2018-08-27 David Malcolm <dmalcolm@redhat.com>
680 * diagnostic-show-locus.c (class layout_range): Update for
681 conversion of show_caret_p to a tri-state.
682 (layout_range::layout_range): Likewise.
683 (make_range): Likewise.
684 (layout::maybe_add_location_range): Likewise.
685 (layout::should_print_annotation_line_p): Don't show annotation
686 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
687 (layout::get_state_at_point): Update for conversion of
688 show_caret_p to a tri-state. Bail out early for
689 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
690 underlining or source colorization.
691 (gcc_rich_location::add_location_if_nearby): Update for conversion
692 of show_caret_p to a tri-state.
693 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
694 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
696 (selftest::test_one_liner_labels): Likewise.
697 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
698 conversion of show_caret_p to a tri-state.
699 * pretty-print.c (text_info::set_location): Likewise.
700 * pretty-print.h (text_info::set_location): Likewise.
701 * substring-locations.c (format_warning_n_va): Likewise.
702 * tree-diagnostic.c (default_tree_printer): Likewise.
703 * tree-pretty-print.c (newline_and_indent): Likewise.
705 2018-08-27 David Malcolm <dmalcolm@redhat.com>
708 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
709 line above for line-insertion fix-it hints.
710 (selftest::test_fixit_insert_containing_newline): Update the
711 expected results, and add a test with line-numbering enabled.
713 2018-08-27 Martin Liska <mliska@suse.cz>
716 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
717 params with DECL_HAS_VALUE_EXPR_P.
719 2018-08-27 Martin Liska <mliska@suse.cz>
721 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
722 selected expansion strategy.
724 2018-08-27 Martin Liska <mliska@suse.cz>
726 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
727 * builtins.c (is_builtin_fn): Likewise.
728 * attribs.c (diag_attr_exclusions): Use new function
729 fndecl_built_in_p and remove check for FUNCTION_DECL if
731 (builtin_mathfn_code): Likewise.
732 (fold_builtin_expect): Likewise.
733 (fold_call_expr): Likewise.
734 (fold_builtin_call_array): Likewise.
735 (fold_call_stmt): Likewise.
736 (set_builtin_user_assembler_name): Likewise.
737 (is_simple_builtin): Likewise.
738 * calls.c (gimple_alloca_call_p): Likewise.
739 (maybe_warn_nonstring_arg): Likewise.
740 * cfgexpand.c (expand_call_stmt): Likewise.
741 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
742 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
743 (cgraph_node::verify_node): Likewise.
744 * cgraphclones.c (build_function_decl_skip_args): Likewise.
745 (cgraph_node::create_clone): Likewise.
746 * config/arm/arm.c (arm_insert_attributes): Likewise.
747 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
748 * dse.c (scan_insn): Likewise.
749 * expr.c (expand_expr_real_1): Likewise.
750 * fold-const.c (operand_equal_p): Likewise.
751 (fold_binary_loc): Likewise.
752 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
753 * gimple-low.c (lower_stmt): Likewise.
754 * gimple-pretty-print.c (dump_gimple_call): Likewise.
755 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
756 * gimple.c (gimple_build_call_from_tree): Likewise.
757 (gimple_call_builtin_p): Likewise.
758 (gimple_call_combined_fn): Likewise.
759 * gimplify.c (gimplify_call_expr): Likewise.
760 (gimple_boolify): Likewise.
761 (gimplify_modify_expr): Likewise.
762 (gimplify_addr_expr): Likewise.
763 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
764 * ipa-cp.c (determine_versionability): Likewise.
765 * ipa-fnsummary.c (compute_fn_summary): Likewise.
766 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
767 * ipa-split.c (visit_bb): Likewise.
768 (split_function): Likewise.
769 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
770 * lto-cgraph.c (input_node): Likewise.
771 * lto-streamer-out.c (write_symbol): Likewise.
772 * omp-low.c (setjmp_or_longjmp_p): Likewise.
773 (lower_omp_1): Likewise.
774 * predict.c (strip_predict_hints): Likewise.
775 * print-tree.c (print_node): Likewise.
776 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
777 * trans-mem.c (is_tm_irrevocable): Likewise.
778 (is_tm_load): Likewise.
779 (is_tm_simple_load): Likewise.
780 (is_tm_store): Likewise.
781 (is_tm_simple_store): Likewise.
782 (is_tm_abort): Likewise.
783 (tm_region_init_1): Likewise.
784 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
785 * tree-cfg.c (verify_gimple_call): Likewise.
786 (move_stmt_r): Likewise.
787 (stmt_can_terminate_bb_p): Likewise.
788 * tree-eh.c (lower_eh_constructs_2): Likewise.
789 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
790 * tree-inline.c (remap_gimple_stmt): Likewise.
792 (estimate_num_insns): Likewise.
793 (fold_marked_statements): Likewise.
794 * tree-sra.c (scan_function): Likewise.
795 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
796 (optimize_stack_restore): Likewise.
797 (pass_fold_builtins::execute): Likewise.
798 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
799 (mark_all_reaching_defs_necessary_1): Likewise.
800 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
801 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
802 (pass_forwprop::execute): Likewise.
803 * tree-ssa-loop-im.c (stmt_cost): Likewise.
804 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
805 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
806 * tree-ssa-strlen.c (get_string_length): Likewise.
807 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
808 (find_func_aliases_for_call): Likewise.
809 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
810 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
811 * tree-tailcall.c (find_tail_calls): Likewise.
812 * tree.c (need_assembler_name_p): Likewise.
813 (free_lang_data_in_decl): Likewise.
814 (get_call_combined_fn): Likewise.
815 * ubsan.c (is_ubsan_builtin_p): Likewise.
816 * varasm.c (incorporeal_function_p): Likewise.
817 * tree.h (DECL_BUILT_IN): Remove and replace with
819 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
820 (fndecl_built_in_p): New.
822 2018-08-27 Martin Liska <mliska@suse.cz>
824 PR tree-optimization/86847
825 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
826 Dump also subtree probability.
827 (switch_decision_tree::do_jump_if_equal): New function.
828 (switch_decision_tree::emit_case_nodes): Handle special
829 situations in balanced tree that can be emitted much simpler.
830 Fix calculation of probabilities that happen in tree expansion.
831 * tree-switch-conversion.h (struct cluster): Add
833 (struct simple_cluster): Likewise.
834 (struct case_tree_node): Add new function has_child.
835 (do_jump_if_equal): New.
837 2018-08-27 Martin Liska <mliska@suse.cz>
839 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
840 Add new argument to bit_test_cluster constructor.
841 (bit_test_cluster::emit): Set bits really number of values
843 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
844 probability argument.
845 * tree-switch-conversion.h (struct bit_test_cluster):
846 Add m_handles_entire_switch.
848 2018-08-27 Martin Liska <mliska@suse.cz>
850 PR tree-optimization/86702
851 * tree-switch-conversion.c (jump_table_cluster::emit):
852 Make probabilities even for values in jump table
853 according to number of cases handled.
854 (switch_decision_tree::compute_cases_per_edge): Pass
855 argument to reset_out_edges_aux function.
856 (switch_decision_tree::analyze_switch_statement): Likewise.
857 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
860 2018-08-27 Martin Liska <mliska@suse.cz>
862 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
863 cfun argument explicitly.
864 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
865 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
866 function gimple_switch_default_bb.
867 (convert_switch_statements):
869 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
870 * stmt.c (label_to_block_fn): Use label_to_block and pass
871 cfun argument explicitly and use gimple_switch_label_bb.
872 (expand_case): Likewise.
873 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
874 cfun argument explicitly. Likewise.
875 (make_edges_bb): Likewise.
876 (make_cond_expr_edges): Likewise.
877 (get_cases_for_edge): Likewise.
878 (make_gimple_switch_edges): Likewise.
879 (label_to_block_fn): Likewise.
880 (label_to_block): Likewise.
881 (make_goto_expr_edges): Likewise.
882 (make_gimple_asm_edges): Likewise.
883 (main_block_label): Likewise.
884 (group_case_labels_stmt): Likewise.
885 (find_taken_edge_computed_goto): Likewise.
886 (find_taken_edge_switch_expr): Likewise.
887 (gimple_verify_flow_info): Likewise.
888 (gimple_redirect_edge_and_branch): Likewise.
889 (gimple_switch_label_bb): New function.
890 (gimple_switch_default_bb): Likewise.
891 (gimple_switch_edge): Likewise.
892 (gimple_switch_default_edge): Likewise.
893 * tree-cfg.h (label_to_block_fn): Remove and replace ...
894 (label_to_block): ... with this.
895 (gimple_switch_label_bb): New.
896 (gimple_switch_default_bb): Likewise.
897 (gimple_switch_edge): Likewise.
898 (gimple_switch_default_edge): Likewise.
899 * tree-cfgcleanup.c (convert_single_case_switch): Use
900 new gimple functions and pass new argument to label_to_block.
901 (cleanup_control_flow_bb):
902 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
903 cfun argument explicitly.
904 (make_eh_edges): Likewise.
905 (redirect_eh_dispatch_edge): Likewise.
906 (lower_resx): Likewise.
907 (lower_eh_dispatch): Likewise.
908 (maybe_remove_unreachable_handlers): Likewise.
909 (unsplit_eh): Likewise.
910 (cleanup_empty_eh): Likewise.
911 (verify_eh_edges): Likewise.
912 (verify_eh_dispatch_edge): Likewise.
913 * tree-ssa-dom.c (record_edge_info): Likewise.
914 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
915 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
916 (thread_through_normal_block): Likewise.
917 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
918 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
919 * tree-switch-conversion.c (switch_conversion::collect): Use new
921 (switch_conversion::check_final_bb): Likewise.
922 (switch_conversion::gather_default_values): Pass new argument
924 (switch_conversion::build_constructors): Likewise.
925 (switch_decision_tree::compute_cases_per_edge): Use new
926 gimple_switch_edge function.
927 (switch_decision_tree::analyze_switch_statement): Pass new argument
929 (switch_decision_tree::try_switch_expansion): Use
930 gimple_switch_default_edge.
931 * tree-vrp.c (find_switch_asserts): Pass new argument
933 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
934 (vr_values::simplify_switch_using_ranges): Likewise.
936 2018-08-27 Richard Biener <rguenther@suse.de>
938 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
939 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
941 * tree-ssa-sccvn.h (struct vn_pval): New structure.
942 (struct vn_nary_op_s): Add unwind_to member. Add
943 predicated_values flag and put result into a union together
944 with a linked list of vn_pval.
945 (struct vn_ssa_aux): Add name member to make maintaining
946 a map of SSA name to vn_ssa_aux possible. Remove no longer
947 needed info, dfsnum, low, visited, on_sccstack, use_processed
948 and range_info_anti_range_p members.
949 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
950 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
952 (vn_valueize): New global.
953 (vn_context_bb): Likewise.
954 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
955 VN_INFO_PTR_INFO): Remove.
956 * tree-ssa-sccvn.c: ... (rewrite)
957 (pass_fre::execute): For -O2+ initialize loops and run
958 RPO VN in optimistic mode (iterating). For -O1 and -Og
959 run RPO VN in non-optimistic mode.
960 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
961 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
962 * doc/invoke.texi (sccvn-max-scc-size): Remove.
963 (rpo-vn-max-loop-depth): Document.
964 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
965 when valuezing the VUSE signals we walked out of the region.
966 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
967 (phi_translate): Set VN context block to use for availability
969 (compute_avail): Likewise.
970 (pre_valueize): New function.
971 (pass_pre::execute): Adjust to the RPO VN API.
973 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
974 (propagate_constants_for_unrolling): Remove.
975 (tree_unroll_loops_completely): Perform value-numbering
976 on the unrolled bodies loop parent.
978 2018-08-27 Richard Biener <rguenther@suse.de>
980 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
981 for partial antic compute.
983 2018-08-27 Jakub Jelinek <jakub@redhat.com>
985 PR rtl-optimization/87065
986 * combine.c (simplify_if_then_else): Formatting fix.
987 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
989 (known_cond): Don't return const_true_rtx for vector modes. Use
990 CONST0_RTX instead of const0_rtx. Formatting fixes.
992 2018-08-27 Martin Liska <mliska@suse.cz>
994 PR gcov-profile/87069
995 * gcov.c (process_file): Record files already processed
996 and warn about a file being processed multiple times.
998 2018-08-27 Martin Liska <mliska@suse.cz>
1001 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1002 Set default values for x_aarch64_*_string strings.
1003 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1004 prefix. For -mabi do not print '=ABI' in help and use
1005 <option_value> format for -msve-vector-bits and -moverride
1008 2018-08-26 Jeff Law <law@redhat.com>
1010 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1013 2018-08-26 Marek Polacek <polacek@redhat.com>
1015 PR c++/87029, Implement -Wredundant-move.
1016 * doc/invoke.texi: Document -Wredundant-move.
1018 2018-08-25 Martin Sebor <msebor@redhat.com>
1020 PR tree-optimization/87059
1021 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1022 to the same type as the other.
1023 * fold-const.c (fold_binary_loc): Assert expectation.
1025 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1027 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1028 extraneous parentheses, dead code section and formatting.
1030 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1033 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1034 wide enough for jumps in the line-numbering to be visible.
1035 (layout::print_gap_in_line_numbering): New member function.
1036 (layout::calculate_line_spans): When using line numbering, merge
1037 line spans that are only 1 line apart.
1038 (diagnostic_show_locus): When printing line numbers, show gaps in
1039 line numbering directly, rather than printing headers.
1040 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1041 line-numbering with multiple line spans.
1042 (selftest::test_fixit_insert_containing_newline_2): Add test of
1043 line-numbering, in which the spans are close enough to be merged.
1045 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1047 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1048 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1049 * tree-vrp.c (range_is_nonnull): Remove.
1050 (range_includes_zero_p): Accept value_range instead of min/max.
1051 (extract_range_from_binary_expr_1): Do not early bail on
1053 Use range_includes_zero_p instead of range_is_nonnull.
1054 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1055 of range_is_nonnull.
1056 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1057 special case VR_ANTI_RANGE.
1058 (vrp_finalize): Same.
1059 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1061 (range_is_nonnull): Remove.
1062 * vr-values.c (vrp_stmt_computes_nonzero): Use
1063 range_includes_zero_p instead of range_is_nonnull.
1064 (extract_range_basic): Pass value_range to range_includes_zero_p
1065 instead of range_is_nonnull.
1067 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1069 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1070 * emit-rtl.h (rtl_data): Remove return_bnd.
1071 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1072 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1073 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1074 (POINTER_BOUNDS_MODE): Remove definition.
1075 (make_pointer_bounds_mode): Remove.
1076 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1077 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1078 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1079 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1080 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1081 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1082 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1084 * config/i386/i386-modes.def (BND32, BND64): Remove.
1085 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1086 (dbx64_register_map): Ditto.
1087 (svr4_dbx_register_map): Ditto.
1088 (indirect_thunk_bnd_needed): Remove.
1089 (indirect_thunks_bnd_used): Ditto.
1090 (indirect_return_bnd_needed): Ditto.
1091 (indirect_return_via_cx_bnd): Ditto.
1092 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1093 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1094 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1095 (output_indirect_thunk_function): Remove handling of
1096 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1097 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1098 (ix86_save_reg): Remove handling of crtl->return_bnd.
1099 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1100 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1101 and UNSPEC_BNDLX_ADDR.
1102 (ix86_output_indirect_branch_via_reg): Remove handling of
1103 indirect_thunk_prefix_bnd.
1104 (ix86_output_indirect_branch_via_push): Ditto.
1105 (ix86_output_function_return): Ditto.
1106 (ix86_output_indirect_function_return): Ditto.
1107 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1108 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1109 (CALL_USED_REGISTERS): Ditto.
1110 (REG_ALLOC_ORDER): Update for removal of bound registers.
1111 (HI_REGISTER_NAMES): Ditto.
1112 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1113 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1114 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1115 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1116 (FIRST_PSEUDO_REG): Update.
1117 (BND): Remove mode iterator.
1118 * config/i386/predicates.md (bnd_mem_operator): Remove.
1120 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1122 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1125 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1127 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1128 the case in which the permute needs only a single element and
1129 repeats for every vector of the result. Extend that case to
1130 handle variable-length vectors.
1131 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1133 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1136 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1137 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1139 2018-08-24 Richard Biener <rguenther@suse.de>
1141 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1142 bb_flags_allocated members.
1143 (auto_flag): New RAII class for allocating flags.
1144 (auto_edge_flag): New RAII class for allocating edge flags.
1145 (auto_bb_flag): New RAII class for allocating bb flags.
1146 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1148 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1149 in favor of temporarily allocated BB flag.
1150 * hsa-brig.c: Re-order includes.
1151 * hsa-dump.c: Likewise.
1152 * hsa-regalloc.c: Likewise.
1153 * print-rtl.c: Likewise.
1154 * profile-count.c: Likewise.
1156 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1159 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1162 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1165 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1166 from wide_int_range_multiplicative_op.
1168 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1170 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1173 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1175 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1178 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1180 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1181 full GENERIC expression used for replacement.
1183 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1185 * tree-vrp.c (abs_extent_range): Remove.
1186 (extract_range_into_wide_ints): Pass wide ints by reference.
1187 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1188 Pass wide ints by reference in all calls to
1189 extract_range_into_wide_ints.
1190 * wide-int-range.cc (wide_int_range_div): New.
1191 * wide-int-range.h (wide_int_range_div): New.
1192 (wide_int_range_includes_zero_p): New.
1193 (wide_int_range_zero_p): New.
1195 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1197 * config/aarch64/aarch64.md (arches): New enum.
1198 (arch): New enum attr.
1199 (arch_enabled): New attr.
1200 (enabled): Now uses arch_enabled only.
1201 (simd, sve, fp16): Removed attribute.
1202 (fp): Attr now defined in terms of 'arch'.
1203 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1204 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1205 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1206 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1207 attributes into 'arch'.
1208 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1209 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1210 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1211 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1212 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1213 'simd' attribute into 'arch'.
1214 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1215 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1216 Convert use of 'fp' attribute to 'arch'.
1217 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1218 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1220 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1221 (different modes) Merge 'fp' and 'simd' into 'arch'.
1222 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1225 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1227 PR rtl-optimization/87026
1228 * expmed.c (canonicalize_comparison): If we can no longer create
1229 pseudoregisters, don't.
1231 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1234 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1236 * config/arm/arm.c (speculation_barrier_libfunc): New static
1238 (arm_init_libfuncs): Initialize it.
1239 (arm_emit_speculation_barrier): New function.
1240 * config/arm/arm.md (speculation_barrier): Call
1241 arm_emit_speculation_barrier for architectures that do not have
1243 (speculation_barrier_insn): Only match on Armv7 or later.
1245 2018-08-23 Richard Biener <rguenther@suse.de>
1248 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1251 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1253 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1254 of single-vector TBLs.
1255 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1258 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1261 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1262 aarch64_evpc_tbl guard.
1264 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1266 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1269 2018-08-22 Martin Sebor <msebor@redhat.com>
1272 * tree-pretty-print.c (pretty_print_string): Add argument.
1273 (dump_generic_node): Call to pretty_print_string with string size.
1275 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1277 PR rtl-optimization/86771
1278 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1279 of two SETs into those two SETs, one to be placed at i2, if that SETs
1280 destination is modified between i2 and i3.
1282 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1284 PR tree-optimization/86725
1285 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1287 (vect_analyze_scalar_cycles_1): Check it.
1289 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1291 PR tree-optimization/86725
1292 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1293 an outer loop phi as a double reduction, make sure that the
1294 single user of the phi result is an inner loop phi.
1296 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1298 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1299 grouped stores with gaps to a strided group.
1301 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1303 * tree-vect-stmts.c (get_group_load_store_type)
1304 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1305 first statement in a group.
1307 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1309 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1310 the sequence used in gcc/gcc.c.
1312 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1315 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1318 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1320 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1321 Darwin10-specific unwinder-shim.
1322 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1323 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1324 New to cater for Darwin10 Rosetta.
1326 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1328 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1329 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1331 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1336 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1337 (dwarf2out_switch_text_section): Generate a local label for the
1338 second function sub-section and apply it as the second FDE start
1340 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1341 second sub-section start.
1343 2018-08-22 Richard Biener <rguenther@suse.de>
1345 PR tree-optimization/86988
1346 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1348 2018-08-22 Richard Biener <rguenther@suse.de>
1350 PR tree-optimization/86945
1351 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1353 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1355 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1356 a comment about how uses of r2 for .sdata2 come about.
1358 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1360 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1362 2018-08-21 Marek Polacek <polacek@redhat.com>
1364 PR c++/86981, Implement -Wpessimizing-move.
1365 * doc/invoke.texi: Document -Wpessimizing-move.
1367 2018-08-21 Jan Hubicka <jh@suse.cz>
1369 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1370 * tree.h (is_redundant_typedef): Remove.
1371 * dwarf2out.c (is_redundant_typedef): Turn into static function.
1373 2018-08-21 Jan Hubicka <jh@suse.cz>
1375 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1378 2018-08-21 Tamar Christina <tamar.christina@arm.com>
1380 * expmed.c (extract_low_bits): Reject invalid subregs early.
1382 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1385 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1388 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1390 * config/vxworks.h: Guard vxworks_asm_out_constructor and
1391 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1392 * config/vxworks.c: Likewise.
1394 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1396 * config/vxworks.c: Set targetm.have_ctors_dtors
1397 if HAVE_INITFINI_ARRAY_SUPPORT.
1398 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1399 if HAVE_INITFINI_ARRAY_SUPPORT.
1401 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1403 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1404 default search path for VxWorks < 7.
1406 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1408 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1409 (get_format_string): Refer to c_getstr.
1411 2018-08-21 Tom de Vries <tdevries@suse.de>
1413 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1414 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1415 (debuginfo_early_stop): Declare.
1416 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1417 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1418 (debuginfo_early_stop): New function.
1419 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1420 and debuginfo_early_stop.
1421 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1422 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1423 (general_init): Call debuginfo_early_init.
1424 (finalize): Call debuginfo_fini.
1425 (do_compile): Call debuginfo_init.
1426 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1428 (@item -fdump-debug, @item -fdump-earlydebug): Add.
1430 2018-08-21 Tom de Vries <tdevries@suse.de>
1432 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1433 flag_dump_noaddr and flag_dump_unnumbered.
1435 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
1437 * wide-int-range.cc (wide_int_range_abs): New.
1438 (wide_int_range_order_set): Rename from wide_int_range_min_max.
1439 * wide-int-range.h (wide_int_range_abs): New.
1440 (wide_int_range_min_max): New.
1441 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1442 case to call wide_int_range_abs.
1443 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1444 (extract_range_from_abs_expr): Delete.
1446 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
1449 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1450 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1453 2018-08-20 Nathan Sidwell <nathan@acm.org>
1454 Jeff Law <law@redhat.com>
1456 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1457 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1459 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1462 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1463 (decl_attributes): Likewise.
1464 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1466 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1467 * diagnostic-core.h (class auto_diagnostic_group): New class.
1468 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1469 (diagnostic_report_diagnostic): Handle the first diagnostics within
1471 (emit_diagnostic): Add auto_diagnostic_group instance.
1473 (inform_n): Likewise.
1474 (warning): Likewise.
1475 (warning_at): Likewise.
1476 (warning_n): Likewise.
1477 (pedwarn): Likewise.
1478 (permerror): Likewise.
1480 (error_n): Likewise.
1481 (error_at): Likewise.
1483 (fatal_error): Likewise.
1484 (internal_error): Likewise.
1485 (internal_error_no_backtrace): Likewise.
1486 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1487 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1488 * diagnostic.h (struct diagnostic_context): Add fields
1489 "diagnostic_group_nesting_depth",
1490 "diagnostic_group_emission_count", "begin_group_cb",
1492 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1493 Add auto_diagnostic_group instance(s).
1494 (find_explicit_erroneous_behavior): Likewise.
1495 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1496 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1497 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1498 (gimplify_va_arg_expr): Likewise.
1499 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1500 (HSA_SORRY_AT): Likewise.
1501 * ipa-devirt.c (compare_virtual_tables): Likewise.
1502 (warn_odr): Likewise.
1503 * multiple_target.c (expand_target_clones): Likewise.
1504 * opts-common.c (cmdline_handle_error): Likewise.
1505 * reginfo.c (globalize_reg): Likewise.
1506 * substring-locations.c (format_warning_n_va): Likewise.
1507 * tree-inline.c (expand_call_inline): Likewise.
1508 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1509 * tree-ssa-loop-niter.c
1510 (do_warn_aggressive_loop_optimizations): Likewise.
1511 * tree-ssa-uninit.c (warn_uninit): Likewise.
1512 * tree.c (warn_deprecated_use): Likewise.
1514 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
1517 * config/i386/i386.md (eh_return): Always update EH return
1518 address in word_mode.
1520 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
1522 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1523 TARGET_SPLIT_COMPLEX_ARG is defined.
1525 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1527 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1529 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1532 * expr.c (expand_assignment): Assert that bitpos is positive.
1533 (store_field): Likewise
1534 (expand_expr_real_1): Make sure that bitpos is positive.
1535 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1538 2018-08-20 Nathan Sidwell <nathan@acm.org>
1540 * Makefile.in (CPP_ID_DATA_H): Delete.
1541 (CPP_INTERNAL_H): Don't add it.
1542 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1543 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1545 2018-08-20 Richard Biener <rguenther@suse.de>
1547 PR tree-optimization/78655
1548 * tree-vrp.c (extract_range_from_binary_expr_1): Make
1549 pointer + offset nonnull if either operand is nonnull work.
1551 2018-08-20 Tom de Vries <tdevries@suse.de>
1553 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1554 unless the referenced die describes the added property using
1555 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
1556 Otherwise, add a DW_AT_location to the referenced die.
1558 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
1561 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1562 register_operand when calling ix86_set_reg_reg_cost.
1563 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1564 Set *total to 0 for operands that satisfy x86_64_immediate_operand
1565 predicate and to 1 otherwise.
1567 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
1569 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1570 emit a diagnostic that it is not supported and reset the option.
1571 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1572 supported and consume the option. (ASM_FINAL_SPEC): New.
1574 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1576 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1579 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
1581 C-SKY port: Documentation
1583 * doc/extend.texi (C-SKY Function Attributes): New section.
1584 * doc/invoke.texi (Option Summary): Add C-SKY options.
1585 (C-SKY Options): New section.
1586 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1588 2018-08-17 Jojo <jijie_rong@c-sky.com>
1589 Huibin Wang <huibin_wang@c-sky.com>
1590 Sandra Loosemore <sandra@codesourcery.com>
1591 Chung-Lin Tang <cltang@codesourcery.com>
1593 C-SKY port: Backend implementation
1595 * config/csky/*: New.
1596 * common/config/csky/*: New.
1598 2018-08-17 Jojo <jijie_rong@c-sky.com>
1599 Huibin Wang <huibin_wang@c-sky.com>
1600 Sandra Loosemore <sandra@codesourcery.com>
1601 Chung-Lin Tang <cltang@codesourcery.com>
1602 Andrew Jenner <andrew@codesourcery.com>
1604 C-SKY port: Configury
1606 * config.gcc (csky-*-*): New.
1607 * configure.ac: Add csky to targets for dwarf2 debug_line support.
1608 * configure: Regenerated.
1610 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1612 * dump-context.h: Include "dumpfile.h".
1613 (dump_context::dump_printf_va): Convert final param from va_list
1614 to va_list *. Convert from ATTRIBUTE_PRINTF to
1615 ATTRIBUTE_GCC_DUMP_PRINTF.
1616 (dump_context::dump_printf_loc_va): Likewise.
1617 * dumpfile.c: Include "stringpool.h".
1618 (make_item_for_dump_printf_va): Delete.
1619 (make_item_for_dump_printf): Delete.
1620 (class dump_pretty_printer): New class.
1621 (dump_pretty_printer::dump_pretty_printer): New ctor.
1622 (dump_pretty_printer::emit_items): New member function.
1623 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1625 (dump_pretty_printer::emit_item): New member function.
1626 (dump_pretty_printer::stash_item): New member function.
1627 (dump_pretty_printer::format_decoder_cb): New member function.
1628 (dump_pretty_printer::decode_format): New member function.
1629 (dump_context::dump_printf_va): Reimplement in terms of
1630 dump_pretty_printer.
1631 (dump_context::dump_printf_loc_va): Convert final param from va_list
1633 (dump_context::begin_scope): Reimplement call to
1634 make_item_for_dump_printf.
1635 (dump_printf): Update for change to dump_printf_va.
1636 (dump_printf_loc): Likewise.
1637 (selftest::test_capture_of_dump_calls): Convert "stmt" from
1638 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
1639 with %T, %E, and %G.
1640 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1641 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1642 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1643 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1644 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1645 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1646 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1647 within a dump_printf_loc call to "%wu".
1648 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1649 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
1650 missing space after "=".
1651 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1652 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1653 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1654 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1655 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
1656 duplicate "vectorized" from message.
1658 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1660 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1661 polyNxK_t element's TYPE_STRING_FLAG.
1663 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
1665 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1666 (they were unnamed before). Fix comments.
1668 2018-08-17 Nathan Sidwell <nathan@acm.org>
1670 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1672 2018-08-17 Richard Biener <rguenther@suse.de>
1674 PR tree-optimization/86841
1675 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1677 2018-08-17 Martin Liska <mliska@suse.cz>
1679 * common.opt: Remove Warn, Init and Report for options with
1680 Ignore/Deprecated flag. Warning is done automatically for
1682 * config/i386/i386.opt: Likewise.
1683 * config/ia64/ia64.opt: Likewise.
1684 * config/rs6000/rs6000.opt: Likewise.
1685 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1686 Remove usage of flag_check_pointer_bounds.
1687 * lto-wrapper.c (merge_and_complain): Do not handle
1688 OPT_fcheck_pointer_bounds.
1689 (append_compiler_options): Likewise.
1690 * opt-functions.awk: Do not handle Deprecated.
1691 * optc-gen.awk: Check that Var, Report and Init are not
1692 used for an option with Ignore/Deprecated flag.
1693 * opts-common.c (decode_cmdline_option): Do not report
1695 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1697 * opts.h (struct cl_option): Remove cl_deprecated flag.
1698 (CL_ERR_DEPRECATED): Remove error enum value.
1700 2018-08-17 Richard Biener <rguenther@suse.de>
1703 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1704 across a va-arg-pack using call adjust its return value accordingly.
1706 2018-08-16 Martin Sebor <msebor@redhat.com>
1708 PR tree-optimization/86853
1709 * gimple-ssa-sprintf.c (struct format_result): Rename member.
1710 (struct fmtresult): Add member and initialize it in ctors.
1711 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
1712 (format_string): Handle %S the same as %ls. Set MAYFAIL.
1713 (format_directive): Set POSUNDER4K when MAYFAIL is set.
1714 (parse_directive): Handle %C same as %c.
1715 (sprintf_dom_walker::compute_format_length): Adjust.
1716 (is_call_safe): Adjust.
1718 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1720 * builtins.c (c_strlen): Add new parameter eltsize. Use it
1721 for determining how to count the elements.
1722 * builtins.h (c_strlen): Adjust prototype.
1723 * expr.c (string_constant): Add new parameter mem_size.
1724 Set *mem_size appropriately.
1725 * expr.h (string_constant): Adjust protoype.
1726 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1727 * gimple-fold.h (get_range_strlen): Adjust prototype.
1728 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1729 (format_string): Call get_string_length with eltsize.
1731 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1733 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1734 to emit the span, rather than setting it as the prefix.
1736 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1738 * diagnostic-show-locus.c (layout::start_annotation_line): Add
1739 "margin_char" parameter, defaulting to space. Use it in place
1740 of pp_space for the initial part of the margin.
1741 (layout::print_leading_fixits): Use '+' when filling the margin
1742 of line-insertion fix-it hints.
1744 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1746 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1749 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1751 * config/rs6000/altivec.md: Don't set length attribute to the default
1753 * config/rs6000/darwin.md: Ditto.
1754 * config/rs6000/dfp.md: Ditto.
1755 * config/rs6000/htm.md: Ditto.
1756 * config/rs6000/rs6000.md: Ditto.
1757 * config/rs6000/sync.md: Ditto.
1758 * config/rs6000/vsx.md: Ditto.
1760 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1762 * config/rs6000/altivec.md: Don't set length attribute to the default
1763 value, for branch instructions.
1764 * config/rs6000/darwin.md: Ditto.
1765 * config/rs6000/rs6000.md: Ditto.
1767 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
1769 * config/rs6000/rs6000.md (length): Always define as const_int 4.
1770 (unnamed conditional branch define_insn): Set length to 4 or 8
1771 depending on offset.
1772 (<bd>_<mode>): Similar, for alternative 0.
1773 (<bd>tf_<mode>): Ditto.
1775 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1777 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1779 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
1781 * doc/rtl.texi: Replace old RTX class names with new names.
1784 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
1786 * expmed.h (canonicalize_comparison): New declaration.
1787 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1788 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1789 * optabs.c (prepare_cmp_insn): Likewise.
1790 * rtl.h (unsigned_condition_p): New function which checks if a
1791 comparison operator is unsigned.
1793 2018-08-16 Nathan Sidwell <nathan@acm.org>
1795 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1796 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1798 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1801 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1802 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1803 (mov<mov>): ..this and enable unconditionally.
1805 2018-08-16 Tamar Christina <tamar.christina@arm.com>
1807 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1809 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
1811 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1812 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1813 "Common" with "Target".
1815 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1817 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1818 * doc/invoke.texi (mmitigate-rop): Remove.
1819 * config/i386/i386.c: Do not include "regrename.h".
1820 (ix86_rop_should_change_byte_p, reg_encoded_number)
1821 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
1823 (ix86_reorg): Remove call to ix86_mitigate_rop.
1824 * config/i386/i386.md (attr "modrm_class"): Remove.
1825 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
1826 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
1827 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
1829 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
1831 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
1832 allow folding of mergeh() and mergel() for the float and double types.
1833 (fold_mergehl_helper): Rework to handle building a permute tree
1836 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
1838 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
1841 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1843 * common.opt (fdiagnostics-show-labels): New option.
1844 * diagnostic-show-locus.c (class layout_range): Add field
1846 (class layout): Add field "m_show_labels_p".
1847 (layout_range::layout_range): Add param "label" and use it to
1849 (make_range): Pass in NULL for new "label" param of layout_range's
1851 (layout::layout): Initialize m_show_labels_p.
1852 (layout::maybe_add_location_range): Pass in loc_range->m_label
1853 when constructing layout_range instances.
1854 (struct line_label): New struct.
1855 (layout::print_any_labels): New member function.
1856 (layout::print_line): Call it if label-printing is enabled.
1857 (selftest::test_one_liner_labels): New test.
1858 (selftest::test_diagnostic_show_locus_one_liner): Call it.
1859 * diagnostic.c (diagnostic_initialize): Initialize
1860 context->show_labels_p.
1861 * diagnostic.h (struct diagnostic_context): Add field
1863 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1864 -fno-diagnostics-show-labels.
1865 * dwarf2out.c (gen_producer_string): Add
1866 OPT_fdiagnostics_show_labels to the ignored options.
1867 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1869 (gcc_rich_location::maybe_add_expr): Likewise.
1870 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1871 label" param, defaulting to NULL.
1872 (gcc_rich_location::add_expr): Add "label" param.
1873 (gcc_rich_location::maybe_add_expr): Likewise.
1874 (class text_range_label): New class.
1875 (class range_label_for_type_mismatch): New class.
1876 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1877 of format_warning_va.
1878 (fmtwarn_n): Likewise for new params of format_warning_n_va.
1879 * lto-wrapper.c (merge_and_complain): Add
1880 OPT_fdiagnostics_show_labels to the "pick one setting" options.
1881 (append_compiler_options): Likewise to the dropped options.
1882 (append_diag_options): Likewise to the passed-on options.
1883 * opts.c (common_handle_option): Handle the new option.
1884 * selftest-diagnostic.c
1885 (test_diagnostic_context::test_diagnostic_context): Enable
1887 * substring-locations.c: Include "gcc-rich-location.h".
1888 (format_warning_n_va): Add "fmt_label" and "param_label" params
1889 and use them as appropriate.
1890 (format_warning_va): Add "fmt_label" and "param_label" params,
1891 passing them on to format_warning_n_va.
1892 (format_warning_at_substring): Likewise.
1893 (format_warning_at_substring_n): Likewise.
1894 * substring-locations.h (format_warning_va): Add "fmt_label" and
1895 "param_label" params.
1896 (format_warning_n_va): Likewise.
1897 (format_warning_at_substring): Likewise.
1898 (format_warning_at_substring_n): Likewise.
1899 * toplev.c (general_init): Initialize global_dc->show_labels_p.
1901 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
1904 * builtins.c (expand_builtin_memcmp): Do not expand the call
1905 when overflow is detected.
1907 2018-08-15 Martin Sebor <msebor@redhat.com>
1909 PR tree-optimization/71625
1910 * config/aarch64/aarch64-builtins.c
1911 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
1913 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
1915 * config/s390/s390.c (s390_reorg): Remove loop.
1917 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1920 (darwin_function_switched_text_sections): Delete.
1921 * gcc/config/darwin.h
1922 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
1924 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1927 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
1928 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
1929 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
1931 2018-08-15 Martin Liska <mliska@suse.cz>
1933 PR tree-optimization/86925
1934 * predict.c (expr_expected_value_1): When taking
1935 later predictor, assign also probability.
1936 Use fold_build2_initializer_loc in order to fold
1937 the expression in -frounding-math.
1939 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
1941 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
1943 (expand_vec_perm_1): Try the new method.
1945 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
1948 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
1949 Check whether lra_live_max_point is 0 before dividing.
1951 2018-08-14 Martin Sebor <msebor@redhat.com>
1953 PR tree-optimization/86650
1954 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
1955 (vrp_prop::check_mem_ref): Same.
1957 2018-08-13 Liu Hao <lh_mouse@126.com>
1959 * pretty-print.c (eat_esc_sequence): Swap the foreground and
1960 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
1961 and clear it thereafter, as it only works for DBCS.
1963 2018-08-13 Liu Hao <lh_mouse@126.com>
1965 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
1966 handle returned by _get_osf_handle().
1968 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1970 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
1971 for folding vec_perm.
1973 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1975 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
1976 Add support for gimple-folding of vec_pack() and vec_unpack()
1979 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
1981 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
1982 vec_xst variants to the list.
1983 (rs6000_gimple_fold_builtin): Add support for folding unaligned
1984 vector loads and stores.
1986 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
1988 * config.gcc (rs6000-ibm-aix4.x): Delete.
1989 (rs6000-ibm-aix5.1): Delete.
1990 (rs6000-ibm-aix5.2): Delete.
1991 (rs6000-ibm-aix5.3): Delete.
1992 * config/rs6000/aix43.h: Delete.
1993 * config/rs6000/aix51.h: Delete.
1994 * config/rs6000/aix52.h: Delete.
1995 * config/rs6000/t-aix43: Delete.
1997 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
1999 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2001 (s390_decompose_address): Factor out constant pool ref
2004 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2006 * config/nds32/nds32-predicates.c
2007 (nds32_can_use_bclr_p): Change return type as bool.
2008 (nds32_can_use_bset_p): Ditto.
2009 (nds32_can_use_btgl_p): Ditto.
2010 (nds32_can_use_bitci_p): Ditto.
2011 * config/nds32/nds32-protos.h
2012 (nds32_can_use_bclr_p): Change declaration.
2013 (nds32_can_use_bset_p): Ditto.
2014 (nds32_can_use_btgl_p): Ditto.
2015 (nds32_can_use_bitci_p): Ditto.
2017 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2019 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2020 Support -msched-prolog-epilog option.
2021 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2023 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2025 * common/config/nds32/nds32-common.c
2026 (nds32_option_optimization_table): Enalbe -malways-align.
2028 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2030 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2032 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2033 OPT_misr_secure_ case.
2034 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2035 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2036 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2038 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2039 (nds32_isr_info): New field security_level.
2040 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2041 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2042 * config/nds32/nds32.opt (misr-secure): New option.
2043 * config/nds32/nds32_init.inc: New file.
2044 * config/nds32/nds32_isr.h: New file.
2046 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2048 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2049 Update comment for atomic instructions.
2050 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2051 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2053 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2054 load for __ATOMIC_SEQ_CST model.
2055 (atomic_loaddi_1): Remove float register target.
2056 (atomic_storedi): Handle CONST_INT values.
2057 (atomic_storedi_1): Remove float register source. Add special case
2059 (memory_barrier): New expander and insn.
2061 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2063 PR tree-optimization/86835
2064 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2065 new_stmt after def_gsi, make sure to insert new_square_stmt after
2066 that stmt, not 2 stmts before it.
2068 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2071 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2074 2018-08-10 Martin Liska <mliska@suse.cz>
2077 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2079 * builtins.c (expand_builtin_expect_with_probability):
2081 (expand_builtin_expect_with_probability): New function.
2082 (build_builtin_expect_predicate): Add new argumnet probability
2083 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2084 (fold_builtin_expect):
2087 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2088 * builtins.h (fold_builtin_expect): Set new argument.
2089 * doc/extend.texi: Document __builtin_expect_with_probability.
2090 * doc/invoke.texi: Likewise.
2091 * gimple-fold.c (gimple_fold_call): Pass new argument.
2092 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2093 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2094 * predict.c (get_predictor_value): New function.
2095 (expr_expected_value): Add new argument probability. Assume
2096 that predictor and probability are always non-null.
2097 (expr_expected_value_1): Likewise. For __builtin_expect and
2098 __builtin_expect_with_probability set probability. Handle
2099 combination in binary expressions.
2100 (tree_predict_by_opcode): Simplify code by simply calling
2101 get_predictor_value.
2102 (pass_strip_predict_hints::execute): Add handling of
2103 BUILT_IN_EXPECT_WITH_PROBABILITY.
2104 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2106 * tree.h (DECL_BUILT_IN_P): New function.
2108 2018-08-10 Martin Liska <mliska@suse.cz>
2110 PR tree-optimization/85799
2111 * passes.def: Add argument for pass_strip_predict_hints.
2112 * predict.c (class pass_strip_predict_hints): Add new argument
2114 (strip_predictor_early): New function.
2115 (pass_strip_predict_hints::execute): Call the function to
2117 (strip_predict_hints): New function.
2118 * predict.def: Fix comment.
2120 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2122 * Makefile.in: Clarify which tm.texi to copy over to assert the
2123 right to grant a GFDL license for all.
2125 2018-08-09 Jeff Law <law@redhat.com>
2127 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2130 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2132 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2135 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2137 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2138 reductions for variable-length vectors.
2140 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2143 * common.opt (fdiagnostics-show-line-numbers): New option.
2144 * diagnostic-show-locus.c (class layout): Add fields
2145 "m_show_line_numbers_p" and "m_linenum_width";
2146 (num_digits): New function.
2147 (test_num_digits): New function.
2148 (layout::layout): Initialize new fields. Update m_x_offset
2149 logic to handle any left margin.
2150 (layout::print_source_line): Print line number when requested.
2151 (layout::start_annotation_line): New member function.
2152 (layout::print_annotation_line): Call it.
2153 (layout::print_leading_fixits): Likewise.
2154 (layout::print_trailing_fixits): Likewise. Update calls to
2155 move_to_column for new parameter.
2156 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2157 it to potentially call start_annotation_line.
2158 (layout::show_ruler): Call start_annotation_line.
2159 (selftest::test_line_numbers_multiline_range): New selftest.
2160 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2161 and selftest::test_line_numbers_multiline_range.
2162 * diagnostic.c (diagnostic_initialize): Initialize
2163 show_line_numbers_p.
2164 * diagnostic.h (struct diagnostic_context): Add field
2165 "show_line_numbers_p".
2166 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2167 -fno-diagnostics-show-line-numbers.
2168 * dwarf2out.c (gen_producer_string): Add
2169 OPT_fdiagnostics_show_line_numbers to the ignored options.
2170 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2171 one setting" options.
2172 (append_compiler_options): Likewise to the dropped options.
2173 (append_diag_options): Likewise to the passed-on options.
2174 * opts.c (common_handle_option): Handle the new option.
2175 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2177 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2179 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2180 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2181 third argument of type "const signed char" to descriptions of
2182 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2183 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2184 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2185 __builtin_bcdsub_ov functions.
2187 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2189 PR tree-optimization/86858
2190 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2191 flow_bb_inside_loop_p calls.
2193 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2195 PR tree-optimization/86871
2196 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2197 instead of gimple_assign_lhs.
2199 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2202 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2203 register constraint to operand 0.
2204 (add<mode>3_carryinC): Likewise.
2205 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2207 2018-08-09 Martin Liska <mliska@suse.cz>
2210 * common.opt: Remove extra line.
2212 2018-08-09 Martin Liska <mliska@suse.cz>
2214 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2215 at the end of a line, make first letter capital and end up
2216 a sentence with a dot.
2217 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2218 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2219 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2220 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2221 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2222 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2223 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2224 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2225 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2226 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2227 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2228 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2229 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2230 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2231 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2232 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2233 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2234 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2236 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2239 * config/s390/s390.c (s390_option_override_internal): Reduce the
2240 stack-clash-protection-probe-interval param if it would be too big
2243 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2246 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2247 * config/m68k/m68k.c (handle_move_double): Don't call
2248 m68k_final_prescan_insn.
2249 (m68k_adjust_decorated_operand): Renamed from
2250 m68k_final_prescan_insn, remove first and third operand and
2252 (print_operand): Call it.
2253 (print_operand_address): Call it.
2255 2018-08-08 Nathan Sidwell <nathan@acm.org>
2257 * diagnostic.c (diagnostic_report_current_module): Use
2258 linemap_included_from & linemap_included_from_linemap.
2260 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2262 * config/aarch64/aarch64-cores.def: Add phecda core.
2263 * config/aarch64/aarch64-tune.md: Regenerate.
2264 * doc/invoke.texi: Add phecda core.
2266 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2269 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2271 * config/s390/s390.md ("movti"): Add more alternatives for
2272 constant to GPR copies.
2274 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2276 * config/s390/s390.c: Fix whitespace damage throughout the file.
2277 * config/s390/s390.h: Likewise.
2278 * config/s390/tpf.h: Likewise.
2280 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2282 * config/s390/s390.c (s390_loadrelative_operand_p):
2283 Remove TARGET_CPU_ZARCH usages.
2284 (s390_rtx_costs): Likewise.
2285 (s390_legitimate_constant_p): Likewise.
2286 (s390_cannot_force_const_mem): Likewise.
2287 (legitimate_reload_constant_p): Likewise.
2288 (s390_preferred_reload_class): Likewise.
2289 (legitimize_pic_address): Likewise.
2290 (legitimize_tls_address): Likewise.
2291 (s390_split_branches): Removed.
2292 (s390_add_execute): Removed.
2293 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2294 (s390_mainpool_start): Likewise.
2295 (s390_mainpool_finish): Likewise.
2296 (s390_mainpool_cancel): Removed.
2297 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2298 (s390_chunkify_cancel): Likewise.
2299 (s390_return_addr_rtx): Likewise.
2300 (s390_register_info): Remove split_branches_pending_p uages.
2301 (s390_optimize_register_info): Likewise.
2302 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2303 split_branches_pending_p usages.
2304 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2305 (s390_load_got): Likewise.
2306 (s390_expand_split_stack_prologue): Likewise.
2307 (output_asm_nops): Likewise.
2308 (s390_function_profiler): Likewise.
2309 (s390_emit_call): Likewise.
2310 (s390_conditional_register_usage): Likewise.
2311 (s390_optimize_prologue): Likewise.
2312 (s390_reorg): Remove TARGET_CPU_ZARCH and
2313 split_branches_pending_p usages.
2314 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2316 (s390_output_indirect_thunk_function): Likewise.
2317 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2318 (TARGET_CPU_ZARCH_P): Removed.
2319 (struct machine_function): Remove split_branches_pending_p.
2320 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2322 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2324 * common/config/s390/s390-common.c (processor_flags_table):
2326 * config.gcc: Remove with_arch/with_tune support.
2327 * config/s390/2064.md: Remove cpu attribute comparisons.
2328 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2330 * config/s390/linux.h (ASM_SPEC):
2331 Remove -march support.
2332 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2333 Use a table to get an arch level.
2334 * config/s390/s390-opts.h (enum processor_type):
2336 * config/s390/s390.c
2337 (processor_table): Remove entries, add arch_level values.
2338 (s390_issue_rate): Remove cases.
2339 (s390_option_override): Adjust
2340 s390_option_override_internal() call.
2341 (s390_option_override_internal): Remove deprecation warning.
2342 (s390_valid_target_attribute_tree): Adjust
2343 s390_option_override_internal() call.
2344 * config/s390/s390.h (struct s390_processor):
2345 Share with s390-c.c, add arch_level field.
2346 * config/s390/s390.md:
2347 Remove occurrences in cpu attribute.
2348 * config/s390/s390.opt: Remove -march/-mtune support.
2349 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2350 * doc/invoke.texi: Remove deprecation warning.
2352 2018-08-08 Luis Machado <luis.machado@linaro.org>
2354 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2356 (qdf24xx_tunings): Set vector cost structure to
2357 qdf24xx_vector_cost.
2359 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2360 <register_sextend>: Set to 3.
2362 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2365 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2366 * config/aarch64/aarch64-simd.md
2367 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2368 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2369 (aarch64_frecpx<mode>): ...this new pattern.
2370 * config/aarch64/aarch64-simd-builtins.def: Remove comment
2371 about aarch64_frecp<FRECP:frecp_suffix><mode>.
2373 2018-08-07 Martin Liska <mliska@suse.cz>
2376 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2377 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2378 * predict.def (PRED_MALLOC_NONNULL): New predictor.
2379 * doc/extend.texi: Document that malloc attribute adds
2382 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
2385 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2386 Define to speculation_safe_value_not_needed.
2388 2018-08-06 Jeff Law <law@redhat.com>
2390 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2391 the vr_values instance to cprop_into_stmt.
2392 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2393 (cprop_operand): Also query EVRP to determine if OP is a constant.
2395 2018-08-06 Nathan Sidwell <nathan@acm.org>
2397 * diagnostic.c (diagnostic_report_current_module): Reroll
2398 included-at loop. Translate text.
2400 2018-08-06 David Malcolm <dmalcolm@redhat.com>
2402 * function-tests.c (selftest::test_expansion_to_rtl): Call
2403 free_after_compilation.
2405 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2407 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2409 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
2411 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2412 loops with memory block operations from getting unrolled.
2414 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
2417 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2418 Define to speculation_safe_value_not_needed.
2420 2018-08-06 Jeff Law <law@redhat.com>
2422 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2425 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2428 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2429 with all enabled __intN types.
2431 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2433 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2435 * alias.c (record_set): Check for clobber high.
2436 * cfgexpand.c (expand_gimple_stmt): Likewise.
2437 * combine-stack-adj.c (single_set_for_csa): Likewise.
2438 * combine.c (find_single_use_1): Likewise.
2439 (set_nonzero_bits_and_sign_copies): Likewise.
2440 (get_combine_src_dest): Likewise.
2441 (is_parallel_of_n_reg_sets): Likewise.
2442 (try_combine): Likewise.
2443 (record_dead_and_set_regs_1): Likewise.
2444 (reg_dead_at_p_1): Likewise.
2445 (reg_dead_at_p): Likewise.
2446 * dce.c (deletable_insn_p): Likewise.
2447 (mark_nonreg_stores_1): Likewise.
2448 (mark_nonreg_stores_2): Likewise.
2449 * df-scan.c (df_find_hard_reg_defs): Likewise.
2450 (df_uses_record): Likewise.
2451 (df_get_call_refs): Likewise.
2452 * dwarf2out.c (mem_loc_descriptor): Likewise.
2453 * haifa-sched.c (haifa_classify_rtx): Likewise.
2454 * ira-build.c (create_insn_allocnos): Likewise.
2455 * ira-costs.c (scan_one_insn): Likewise.
2456 * ira.c (equiv_init_movable_p): Likewise.
2457 (rtx_moveable_p): Likewise.
2458 (interesting_dest_for_shprep): Likewise.
2459 * jump.c (mark_jump_label_1): Likewise.
2460 * postreload-gcse.c (record_opr_changes): Likewise.
2461 * postreload.c (reload_cse_simplify): Likewise.
2462 (struct reg_use): Add source expr.
2463 (reload_combine): Check for clobber high.
2464 (reload_combine_note_use): Likewise.
2465 (reload_cse_move2add): Likewise.
2466 (move2add_note_store): Likewise.
2467 * print-rtl.c (print_pattern): Likewise.
2468 * recog.c (decode_asm_operands): Likewise.
2469 (store_data_bypass_p): Likewise.
2470 (if_test_bypass_p): Likewise.
2471 * regcprop.c (kill_clobbered_value): Likewise.
2472 (kill_set_value): Likewise.
2473 * reginfo.c (reg_scan_mark_refs): Likewise.
2474 * reload1.c (maybe_fix_stack_asms): Likewise.
2475 (eliminate_regs_1): Likewise.
2476 (elimination_effects): Likewise.
2477 (mark_not_eliminable): Likewise.
2478 (scan_paradoxical_subregs): Likewise.
2479 (forget_old_reloads_1): Likewise.
2480 * reorg.c (find_end_label): Likewise.
2481 (try_merge_delay_insns): Likewise.
2482 (redundant_insn): Likewise.
2483 (own_thread_p): Likewise.
2484 (fill_simple_delay_slots): Likewise.
2485 (fill_slots_from_thread): Likewise.
2486 (dbr_schedule): Likewise.
2487 * resource.c (update_live_status): Likewise.
2488 (mark_referenced_resources): Likewise.
2489 (mark_set_resources): Likewise.
2490 * rtl.c (copy_rtx): Likewise.
2491 * rtlanal.c (reg_referenced_p): Likewise.
2492 (single_set_2): Likewise.
2493 (noop_move_p): Likewise.
2494 (note_stores): Likewise.
2495 * sched-deps.c (sched_analyze_reg): Likewise.
2496 (sched_analyze_insn): Likewise.
2498 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2500 * cse.c (invalidate_reg): New function extracted from...
2501 (invalidate): ...here.
2502 (canonicalize_insn): Check for clobber high.
2503 (invalidate_from_clobbers): invalidate clobber highs.
2504 (invalidate_from_sets_and_clobbers): Likewise.
2505 (count_reg_usage): Check for clobber high.
2506 (insn_live_p): Likewise.
2507 * cselib.c (cselib_expand_value_rtx_1):Likewise.
2508 (cselib_invalidate_regno): Check for clobber in setter.
2509 (cselib_invalidate_rtx): Pass through setter.
2510 (cselib_invalidate_rtx_note_stores):
2511 (cselib_process_insn): Check for clobber high.
2512 * cselib.h (cselib_invalidate_rtx): Add operand.
2514 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2516 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2517 (mark_not_eliminable): Likewise.
2518 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2519 * lra-lives.c (process_bb_lives): Check for clobber high.
2520 * lra.c (new_insn_reg): Remember clobber highs.
2521 (collect_non_operand_hard_regs): Check for clobber high.
2522 (lra_set_insn_recog_data): Likewise.
2523 (add_regs_to_insn_regno_info): Likewise.
2524 (lra_update_insn_regno_info): Likewise.
2526 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2528 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2529 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2531 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2533 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2534 (copy_insn_1): Likewise.
2535 (gen_hard_reg_clobber_high): New gen function.
2536 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2537 * genemit.c (gen_exp): Likewise.
2538 (gen_emit_seq): Pass through info.
2539 (gen_insn): Check for CLOBBER_HIGH.
2540 (gen_expand): Pass through info.
2541 (gen_split): Likewise.
2542 (output_add_clobbers): Likewise.
2543 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2544 (remove_clobbers): Likewise.
2545 * rtl.h (gen_hard_reg_clobber_high): New declaration.
2547 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2549 * doc/rtl.texi (clobber_high): Add.
2550 (parallel): Add in clobber high
2551 * rtl.c (rtl_check_failed_code3): Add function.
2552 * rtl.def (CLOBBER_HIGH): Add expression.
2553 * rtl.h (RTL_CHECKC3): Add macro.
2554 (rtl_check_failed_code3): Add declaration.
2555 (XC3EXP): Add macro.
2557 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
2560 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2561 cfun->machine->max_used_stack_alignment if needed.
2563 2018-08-04 Martin Sebor <msebor@redhat.com>
2565 PR tree-optimization/86571
2566 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2569 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
2572 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2575 2018-08-03 Jeff Law <law@redhat.com>
2578 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2579 Define to speculation_safe_value_not_needed.
2581 2018-08-03 David Malcolm <dmalcolm@redhat.com>
2583 * doc/gcov.texi (-x): Remove duplicate "to".
2584 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2585 (-Wif-not-aligned): Remove duplicate "is".
2586 (-flto): Remove duplicate "the".
2587 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2588 duplicate "v5.00.b".
2589 (MSP430 Options): Remove duplicate "and" from the description
2590 of "-mgprel-sec=regexp".
2591 (x86 Options): Remove duplicate copies of "vmldLog102" and
2592 vmlsLog104 from description of "-mveclibabi=type".
2594 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
2596 * internal-fn.h (first_commutative_argument): Declare.
2597 * internal-fn.c (first_commutative_argument): New function.
2598 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2599 restrictions for pattern statements. Use first_commutative_argument
2600 to look for commutative operands in calls to internal functions.
2602 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
2604 * Makefile.in (wide-int-range.o): New.
2605 * tree-vrp.c: Move all the wide_int_* functions to...
2606 * wide-int-range.cc: ...here.
2607 * tree-vrp.h: Move all the wide_int_* prototypes to...
2608 * wide-int-range.h: ...here.
2610 2018-08-03 Tom de Vries <tdevries@suse.de>
2612 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2614 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2615 * except.c (output_function_exception_table): Do early exit if
2616 targetm_common.except_unwind_info (&global_options) == UI_NONE.
2618 2018-08-03 Martin Liska <mliska@suse.cz>
2620 * predict.c (dump_prediction): Change to 2 digits
2623 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
2625 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2627 (falkor_am_1_gtov_gtov): ... a new insn reservation.
2629 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
2631 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2632 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2633 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2634 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2635 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2637 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2639 * diagnostic-show-locus.c (diagnostic_show_locus): Use
2640 pp_take_prefix when saving the existing prefix.
2641 * diagnostic.c (diagnostic_append_note): Likewise.
2642 * langhooks.c (lhd_print_error_function): Likewise.
2643 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2644 param's type. Free the existing prefix.
2645 (pp_take_prefix): New function.
2646 (pretty_printer::pretty_printer): Drop the prefix parameter.
2647 Rename the length parameter to match the comment.
2648 (pretty_printer::~pretty_printer): Free the prefix.
2649 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2651 (struct pretty_printer): Drop the "const" from "prefix" field's
2652 type and clarify memory management.
2653 (pp_set_prefix): Drop the "const" from the 2nd param.
2654 (pp_take_prefix): New decl.
2656 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2658 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2659 for word_mode_ok here instead of passing as argument.
2660 (expand_block_compare): Change select_block_compare_mode() call.
2661 (expand_strncmp_gpr_sequence): New function.
2662 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2664 2018-08-02 Jeff Law <law@redhat.com>
2667 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2668 Define to speculation_safe_value_not_needed.
2671 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2672 Define to speculation_safe_value_not_needed.
2674 2018-08-02 Tom de Vries <tdevries@suse.de>
2677 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2678 function. Return UI_TARGET unconditionally.
2679 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2680 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2682 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2684 * genemit.c (print_overload_test): Fix typo.
2686 2018-08-02 Richard Biener <rguenther@suse.de>
2688 PR tree-optimization/86816
2689 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2690 which checks for value availability before querying it.
2691 (gvn_uses_equal): Use it.
2692 (same_succ_hash): Likewise.
2693 (gimple_equal_p): Likewise.
2695 2018-08-02 Nick Clifton <nickc@redhat.com>
2698 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2699 Define to speculation_safe_value_not_needed.
2702 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2703 Define to speculation_safe_value_not_needed.
2706 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2707 Define to speculation_safe_value_not_needed.
2710 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2711 Define to speculation_safe_value_not_needed.
2714 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2715 Define to speculation_safe_value_not_needed.
2718 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2719 Define to speculation_safe_value_not_needed.
2722 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2723 Define to speculation_safe_value_not_needed.
2726 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2727 Define to speculation_safe_value_not_needed.
2730 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2731 speculation_safe_value_not_needed.
2734 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2735 to speculation_safe_value_not_needed.
2737 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2739 * doc/md.texi: Expand the documentation of instruction names
2740 to mention port-local uses. Document '@' in pattern names.
2741 * read-md.h (overloaded_instance, overloaded_name): New structs.
2743 (md_reader::handle_overloaded_name): New member function.
2744 (md_reader::get_overloads): Likewise.
2745 (md_reader::m_first_overload): New member variable.
2746 (md_reader::m_next_overload_ptr): Likewise.
2747 (md_reader::m_overloads_htab): Likewise.
2748 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2749 m_next_overload_ptr and m_overloads_htab.
2750 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2751 (get_mode_token, get_code_token, get_int_token): New functions.
2752 (map_attr_string): Add an optional argument that passes back
2753 the associated iterator.
2754 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2755 (md_reader::handle_overloaded_name, add_overload_instance): New
2757 (apply_iterators): Handle '@' names. Report an error if '@'
2758 is used without iterators.
2759 (initialize_iterators): Initialize the new iterator_group fields.
2760 * genopinit.c (handle_overloaded_code_for)
2761 (handle_overloaded_gen): New functions.
2762 (main): Use them to print declarations of maybe_code_for_* and
2763 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2764 * genemit.c (print_overload_arguments, print_overload_test)
2765 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2766 (main): Use it to print definitions of maybe_code_for_* and
2767 maybe_gen_* functions.
2768 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2769 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2770 instead of explicit mode checks.
2771 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2772 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2773 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2774 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2775 (aarch64_expand_compare_and_swap): Likewise
2776 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2777 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2778 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2779 (aarch64_constant_pool_reload_icode): Delete.
2780 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2781 instead of aarch64_constant_pool_reload_icode. Use
2782 code_for_aarch64_reload_mov instead of explicit mode checks.
2783 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2784 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2785 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2786 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2787 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2788 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2789 (aarch64_atomic_load_op_code): Delete.
2790 (aarch64_emit_atomic_load_op): Likewise.
2791 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2792 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
2793 instead of aarch64_emit_atomic_load_op.
2794 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2795 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2796 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2797 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2798 character before the pattern name.
2799 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2800 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2801 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2802 (aarch64_frecps<mode>): Likewise.
2803 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2804 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2805 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2806 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2807 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2809 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
2811 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2812 Allow HFmode constants if TARGET_FP_F16INST.
2814 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
2817 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2818 No longer check last store for clobber of address register.
2820 2018-08-02 Martin Liska <mliska@suse.cz>
2822 PR gcov-profile/86817
2823 * gcov.c (process_all_functions): New function.
2825 (process_file): Move functions processing to
2826 process_all_functions.
2828 2018-08-02 David Malcolm <dmalcolm@redhat.com>
2830 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
2831 "const" to the "gimple *" and "rtx_insn *" parameters.
2832 * dumpfile.h (dump_user_location_t::dump_user_location_t):
2834 (dump_location_t::dump_location_t): Likewise.
2836 2018-08-01 Martin Sebor <msebor@redhat.com>
2838 PR tree-optimization/86650
2839 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
2840 rather than a "gcall *". Directly pass the data of interest
2841 to percent_K_format, rather than building a temporary CALL_EXPR
2843 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
2844 (gimple_fold_builtin_strncat): Adjust.
2845 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
2846 gcall* argument with gimple*.
2847 * gimple-ssa-warn-restrict.c (check_call): Same.
2848 (wrestrict_dom_walker::before_dom_children): Same.
2849 (builtin_access::builtin_access): Same.
2850 (check_bounds_or_overlap): Same
2851 (maybe_diag_overlap): Same.
2852 (maybe_diag_offset_bounds): Same.
2853 * tree-diagnostic.c (default_tree_printer): Move usage of
2854 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2856 * tree-pretty-print.c (percent_K_format): Add argument.
2857 * tree-pretty-print.h: Add argument.
2858 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2859 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2860 (maybe_diag_stxncpy_trunc): Same.
2861 (handle_builtin_stxncpy): Same.
2862 (handle_builtin_strcat): Same.
2864 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2866 * match.pd: Optimise pointer range checks.
2868 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2870 PR tree-optimization/86758
2871 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2872 to remove pattern statements.
2874 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2876 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2877 result of dfs_enumerate_from when constructing stmt_vec_infos,
2878 instead of additionally calling get_loop_body.
2880 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2882 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2884 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2885 When creating an iv, assert that the step is not known to be zero.
2886 (vect_setup_realignment): Update call accordingly.
2887 * tree-vect-stmts.c (vectorizable_store): Likewise.
2888 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
2890 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2892 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2893 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2894 (vectorizable_reduction): Likewise.
2895 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2896 (vect_detect_hybrid_slp_stmts): Likewise.
2897 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2899 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
2901 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2902 (wide_int_set_zero_nonzero_bits): ...this.
2903 (zero_nonzero_bits_from_vr): Rename to...
2904 (vrp_set_zero_nonzero_bits): ...this.
2905 (extract_range_from_multiplicative_op_1): Abstract wide int
2907 (wide_int_range_multiplicative_op): ...here.
2908 (extract_range_from_binary_expr_1): Extract wide int binary
2909 operations into their own functions.
2910 (wide_int_range_lshift): New.
2911 (wide_int_range_can_optimize_bit_op): New.
2912 (wide_int_range_shift_undefined_p): New.
2913 (wide_int_range_bit_xor): New.
2914 (wide_int_range_bit_ior): New.
2915 (wide_int_range_bit_and): New.
2916 (wide_int_range_trunc_mod): New.
2917 (extract_range_into_wide_ints): New.
2918 (vrp_shift_undefined_p): New.
2919 (extract_range_from_multiplicative_op): New.
2920 (vrp_can_optimize_bit_op): New.
2921 * tree-vrp.h (value_range::dump): New.
2922 (wide_int_range_multiplicative_op): New.
2923 (wide_int_range_lshift):New.
2924 (wide_int_range_shift_undefined_p): New.
2925 (wide_int_range_bit_xor): New.
2926 (wide_int_range_bit_ior): New.
2927 (wide_int_range_bit_and): New.
2928 (wide_int_range_trunc_mod): New.
2929 (zero_nonzero_bits_from_bounds): Rename to...
2930 (wide_int_set_zero_nonzero_bits): ...this.
2931 (zero_nonzero_bits_from_vr): Rename to...
2932 (vrp_set_zero_nonzero_bits): ...this.
2933 (range_easy_mask_min_max): Rename to...
2934 (wide_int_range_can_optimize_bit_op): this.
2935 * vr-values.c (simplify_bit_ops_using_ranges): Rename
2936 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2938 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2940 * tree-vectorizer.h (vect_orig_stmt): New function.
2941 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
2942 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
2943 (vect_create_epilog_for_reduction): Likewise.
2944 (vectorizable_live_operation): Likewise.
2945 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2946 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
2947 * tree-vect-stmts.c (vectorizable_call): Likewise.
2948 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2950 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2952 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
2954 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
2955 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
2956 (vect_transform_loop): Likewise.
2957 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2959 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2961 * tree-vectorizer.h (vect_schedule_slp): Return void.
2962 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2963 (vect_schedule_slp): Likewise.
2965 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2967 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
2969 (vect_transform_loop): Update calls accordingly. Schedule SLP
2970 instances before the main loop, if any exist.
2972 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
2974 PR tree-optimization/86749
2975 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
2976 If the lhs is used in a COND_EXPR, check that it is being used
2977 as the "then" or "else" value.
2979 2018-08-01 Tom de Vries <tdevries@suse.de>
2982 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2983 speculation_safe_value_not_needed.
2985 2018-08-01 Richard Biener <rguenther@suse.de>
2987 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
2990 2018-08-01 Martin Liska <mliska@suse.cz>
2992 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
2993 format how successful transformation is dumped.
2994 (gimple_mod_pow2_value_transform): Likewise.
2995 (gimple_mod_subtract_transform): Likewise.
2996 (gimple_stringops_transform): Likewise.
2998 2018-08-01 Martin Liska <mliska@suse.cz>
3001 * value-prof.c (interesting_stringop_to_profile_p):
3002 Simplify the code and add BUILT_IN_MEMMOVE.
3003 (gimple_stringops_transform): Likewise.
3005 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3007 * config/aarch64/aarch64-simd.md
3008 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3009 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3010 use GPI iterator instead of SI mode.
3012 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3014 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3015 rs6000_speculation_barrier.
3016 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3017 new barrier pattern name.
3019 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3021 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3022 (speculation_barrier): New insn.
3024 2018-08-01 Richard Biener <rguenther@suse.de>
3027 * graphite.h: Include isl/id.h and isl/space.h to allow build
3030 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3033 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3034 mode for COFF targets.
3035 * defaults.h (TARGET_COFF): Define.
3036 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3037 TARGET_COFF): Define.
3038 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3039 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3040 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3042 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3044 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3045 * gimple-streamer-out.c (output_bb): Save it.
3046 * lto-streamer-in.c (input_struct_function_base): Restore
3047 instance discriminator if available. Create map on demand.
3048 * lto-streamer-out.c (output_struct_function_base): Save it if
3050 * final.c (decl_to_instance_map): Document LTO strategy.
3052 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3053 Olivier Hainque <hainque@adacore.com>
3055 * debug.h (decl_to_instance_map_t): New type.
3056 (decl_to_instance_map): Declare.
3057 (maybe_create_decl_to_instance_map): New inline function.
3058 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3059 to track basic block discriminators.
3060 (final_start_function_1): Initialize them.
3061 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3063 (decl_to_instance_map): New variable.
3064 (map_decl_to_instance, maybe_set_discriminator): New functions.
3065 (notice_source_line): Set discriminator.
3067 2018-07-31 Ian Lance Taylor <iant@golang.org>
3069 * targhooks.c (default_have_speculation_safe_value): Add
3072 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3074 * dump-context.h: Include "pretty-print.h".
3075 (dump_context::refresh_dumps_are_enabled): New decl.
3076 (dump_context::emit_item): New decl.
3077 (class dump_context): Add fields "m_test_pp" and
3079 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3080 (temp_dump_context::get_dumped_text): New decl.
3081 (class temp_dump_context): Add field "m_pp".
3082 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3083 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3085 (set_dump_file): Update for above change.
3086 (set_alt_dump_file): Likewise.
3087 (dump_loc): New overload, taking a pretty_printer *.
3088 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3089 to any test pretty-printer.
3090 (make_item_for_dump_gimple_stmt): New function, adapted from
3091 optinfo::add_gimple_stmt.
3092 (dump_context::dump_gimple_stmt): Call it, and use the result,
3093 eliminating the direct usage of dump_file and alt_dump_file in
3094 favor of indirectly using them via emit_item.
3095 (make_item_for_dump_gimple_expr): New function, adapted from
3096 optinfo::add_gimple_expr.
3097 (dump_context::dump_gimple_expr): Call it, and use the result,
3098 eliminating the direct usage of dump_file and alt_dump_file in
3099 favor of indirectly using them via emit_item.
3100 (make_item_for_dump_generic_expr): New function, adapted from
3102 (dump_context::dump_generic_expr): Call it, and use the result,
3103 eliminating the direct usage of dump_file and alt_dump_file in
3104 favor of indirectly using them via emit_item.
3105 (make_item_for_dump_printf_va): New function, adapted from
3106 optinfo::add_printf_va.
3107 (make_item_for_dump_printf): New function.
3108 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3109 and use the result, eliminating the direct usage of dump_file and
3110 alt_dump_file in favor of indirectly using them via emit_item.
3111 (make_item_for_dump_dec): New function.
3112 (dump_context::dump_dec): Call it, and use the result,
3113 eliminating the direct usage of dump_file and alt_dump_file in
3114 favor of indirectly using them via emit_item.
3115 (make_item_for_dump_symtab_node): New function, adapted from
3116 optinfo::add_symtab_node.
3117 (dump_context::dump_symtab_node): Call it, and use the result,
3118 eliminating the direct usage of dump_file and alt_dump_file in
3119 favor of indirectly using them via emit_item.
3120 (dump_context::begin_scope): Reimplement, avoiding direct usage
3121 of dump_file and alt_dump_file in favor of indirectly using them
3123 (dump_context::emit_item): New member function.
3124 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3125 Set up test pretty-printer on the underlying context. Call
3126 refresh_dumps_are_enabled.
3127 (temp_dump_context::~temp_dump_context): Call
3128 refresh_dumps_are_enabled.
3129 (temp_dump_context::get_dumped_text): New member function.
3130 (selftest::verify_dumped_text): New function.
3131 (ASSERT_DUMPED_TEXT_EQ): New macro.
3132 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3133 and then without optinfo enabled. Add uses of
3134 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3135 * dumpfile.h: Update comment for the dump_* API.
3136 * optinfo-emit-json.cc
3137 (selftest::test_building_json_from_dump_calls): Update for new
3138 param for temp_dump_context ctor.
3139 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3140 and "m_owned" field.
3141 (optinfo_item::~optinfo_item): Likewise.
3142 (optinfo::add_item): New member function.
3143 (optinfo::emit): Update comment.
3144 (optinfo::add_string): Delete.
3145 (optinfo::add_printf): Delete.
3146 (optinfo::add_printf_va): Delete.
3147 (optinfo::add_gimple_stmt): Delete.
3148 (optinfo::add_gimple_expr): Delete.
3149 (optinfo::add_tree): Delete.
3150 (optinfo::add_symtab_node): Delete.
3151 (optinfo::add_dec): Delete.
3152 * optinfo.h (class dump_context): New forward decl.
3153 (optinfo::add_item): New decl.
3154 (optinfo::add_string): Delete.
3155 (optinfo::add_printf): Delete.
3156 (optinfo::add_printf_va): Delete.
3157 (optinfo::add_gimple_stmt): Delete.
3158 (optinfo::add_gimple_expr): Delete.
3159 (optinfo::add_tree): Delete.
3160 (optinfo::add_symtab_node): Delete.
3161 (optinfo::add_dec): Delete.
3162 (optinfo::add_poly_int): Delete.
3163 (optinfo_item::optinfo_item): Remove "owned" param.
3164 (class optinfo_item): Remove field "m_owned".
3166 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3169 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3170 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3171 requested variable alignment.
3172 (expand_one_ssa_partition): Likewise.
3173 (expand_one_var): Likewise.
3175 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3177 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3178 to speculation_safe_value_not_needed.
3180 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3182 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3183 * targhooks.c (speculation_safe_value_not_needed): New function.
3184 * target.def (have_speculation_safe_value): Update documentation.
3185 * doc/tm.texi: Regenerated.
3187 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3189 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3190 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3192 (despeculate_copy<ALLI:mode>_insn): New insn.
3193 (despeculate_copyti_insn): New insn.
3194 (despeculate_simple<ALLI:mode>): New insn
3195 (despeculate_simpleti): New insn.
3196 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3198 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3199 aarch64_speculation_safe_value.
3200 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3202 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3204 * config/aarch64/aarch64-speculation.cc: New file.
3205 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3206 before pass_reorder_blocks.
3207 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3209 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3210 X14 and X15 when tracking speculation.
3211 * config/aarch64/aarch64.md (register name constants): Add
3212 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3213 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3214 (speculation_barrier): New insn attribute.
3215 (cmp<mode>): Allow SP in comparisons.
3216 (speculation_tracker): New insn.
3217 (speculation_barrier): Add speculation_barrier attribute.
3218 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3219 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3220 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3222 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3224 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3225 aarch64_track_speculation is true.
3226 (tb<optab><mode>1): Likewise.
3227 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3228 generate CB[N]Z when tracking speculation.
3229 (aarch64_split_compare_and_swap): Likewise.
3230 (aarch64_split_atomic_op): Likewise.
3232 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3234 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3236 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3238 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3239 (speculation_barrier): New insn.
3241 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3243 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3244 * config/arm/arm.md (speculation_barrier): New expand.
3245 (speculation_barrier_insn): New pattern.
3247 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3249 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3250 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3251 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3252 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3254 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3255 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3256 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3257 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3258 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3259 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3260 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3261 * builtins.c (expand_speculation_safe_value): New function.
3262 (expand_builtin): Call it.
3263 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3264 * doc/extend.texi: Document __builtin_speculation_safe_value.
3265 * doc/md.texi: Document "speculation_barrier" pattern.
3266 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3267 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3268 * doc/tm.texi: Regenerated.
3269 * target.def (have_speculation_safe_value, speculation_safe_value): New
3271 * targhooks.c (default_have_speculation_safe_value): New function.
3272 (default_speculation_safe_value): New function.
3273 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3274 (default_speculation_safe_value): Add prototype.
3276 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3278 * dump-context.h (dump_context::dump_loc): New decl.
3279 * dumpfile.c (dump_context::dump_loc): New member function.
3280 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3281 and dump_gimple_stmt.
3282 (dump_context::dump_gimple_expr_loc): Likewise, using
3284 (dump_context::dump_generic_expr_loc): Likewise, using
3286 (dump_context::dump_printf_loc_va): Likewise, using
3288 (dump_context::begin_scope): Explicitly using the global function
3289 "dump_loc", rather than the member function.
3291 2018-07-31 Martin Sebor <msebor@redhat.com>
3293 PR tree-optimization/86741
3294 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3296 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3298 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3299 depend on whether prefetch instructions will be emitted or not.
3300 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3301 will be emitted or not.
3302 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3303 (TARGET_SETMEM_PFD): New macros.
3305 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3307 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3308 (NULL_STMT_VEC_INFO): Delete.
3309 (stmt_vec_info::operator*): Likewise.
3310 (stmt_vec_info::operator gimple *): Likewise.
3311 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3312 of NULL_STMT_VEC_INFO.
3313 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3314 (vect_reassociating_reduction_p): Likewise.
3315 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3316 (vectorizable_store): Likewise.
3317 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3318 (vec_info::free_stmt_vec_infos): Likewise.
3320 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3322 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3323 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3325 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3327 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3328 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3329 (vec_info::free_stmt_vec_info): New private member functions.
3330 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3331 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3332 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3333 set_stmt_vec_info_vec and free_stmt_vec_infos.
3334 * tree-vect-loop.c (_loop_vec_info): Remove call to
3335 set_stmt_vec_info_vec.
3336 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3337 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3338 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3339 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3340 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3341 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3342 with the clearing in the xcalloc.
3343 (stmt_vec_info_vec): Delete.
3344 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3345 (vectorize_loops): Likewise.
3346 (vec_info::~vec_info): Remove argument from call to
3347 free_stmt_vec_infos.
3348 (vec_info::add_stmt): Remove vinfo argument from call to
3351 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3353 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3354 rather than a gimple stmt.
3355 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3356 information for pattern statements when passed the original
3357 statement; instead wait to be passed the pattern statement itself.
3358 Don't call set_vinfo_for_stmt here.
3359 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3360 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3361 stmt_vec_infos here.
3362 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3363 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3364 stmt_vec_infos entry.
3366 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3368 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3369 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3370 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3371 * tree-vect-stmts.c (vectorizable_call): Likewise.
3372 (vectorizable_simd_clone_call): Likewise.
3374 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3376 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3377 * tree-vectorizer.c (vec_info::remove_stmt): New function.
3378 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3379 * tree-vect-loop.c (vect_transform_loop): Likewise.
3380 * tree-vect-slp.c (vect_schedule_slp): Likewise.
3381 * tree-vect-stmts.c (vect_remove_stores): Likewise.
3383 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3385 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3386 (vect_dr_stmt): Delete.
3387 * tree-vectorizer.c (vec_info::lookup_dr): New function.
3388 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3390 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3391 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3392 (vect_verify_datarefs_alignment, vect_peeling_supportable)
3393 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3394 (vect_analyze_data_refs): Likewise.
3395 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
3397 (vect_find_same_alignment_drs): Likewise.
3398 (vect_slp_analyze_node_dependences): Update calls accordingly.
3399 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3400 instead of DR_VECT_AUX.
3401 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3402 of a vector data references. Use vec_info::lookup_dr instead of
3404 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3405 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3406 instead of DR_VECT_AUX.
3408 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3410 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3412 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3414 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3415 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3416 (vect_gen_prolog_loop_niters): Likewise.
3418 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3420 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3421 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3422 (vect_known_alignment_in_bytes, vect_dr_behavior)
3423 (vect_get_scalar_dr_size): Take references as dr_vec_infos
3424 instead of data_references. Update calls to other routines for
3425 which the same change has been made.
3426 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3427 dr_vec_infos instead of stmt_vec_infos.
3428 (vect_analyze_data_ref_dependence): Update call accordingly.
3429 (vect_slp_analyze_data_ref_dependence)
3430 (vect_record_base_alignments): Use DR_VECT_AUX.
3431 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3432 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3433 (vector_alignment_reachable_p, vect_get_data_access_cost)
3434 (vect_peeling_supportable, vect_analyze_group_access_1)
3435 (vect_analyze_group_access, vect_analyze_data_ref_access)
3436 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3437 (vect_compile_time_alias, vect_small_gap_p)
3438 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3439 (vect_supportable_dr_alignment): Take references as dr_vec_infos
3440 instead of data_references. Update calls to other routines for
3441 which the same change has been made.
3442 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3443 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3444 (vect_slp_analyze_and_verify_node_alignment)
3445 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3446 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3447 (vect_setup_realignment): Use dr_vec_infos. Update calls after
3449 (_vect_peel_info::dr): Replace with...
3450 (_vect_peel_info::dr_info): ...this new field.
3451 (vect_peeling_hash_get_most_frequent)
3452 (vect_peeling_hash_choose_best_peeling): Update accordingly.
3453 (vect_peeling_hash_get_lowest_cost):
3454 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
3455 routines for which the same change has been made.
3456 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
3458 * tree-vect-loop-manip.c (get_misalign_in_elems)
3459 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
3461 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3462 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3463 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3464 (get_group_load_store_type, get_negative_load_store_type)
3465 (vect_get_data_ptr_increment, vectorizable_store)
3466 (vectorizable_load): Likewise.
3467 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3468 Update calls to other routines for which the same change has been made.
3470 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3472 * tree-vectorizer.h (vec_info::move_dr): New member function.
3473 (dataref_aux): Rename to...
3474 (dr_vec_info): ...this and add "dr" and "stmt" fields.
3475 (_stmt_vec_info::dr_aux): Update accordingly.
3476 (_stmt_vec_info::data_ref_info): Delete.
3477 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3478 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3479 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3480 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3482 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
3483 (STMT_VINFO_DR_INFO): New macro.
3484 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3485 (set_dr_misalignment): Update after rename of dataref_aux.
3486 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
3487 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3488 initialization of STMT_VINFO_DATA_REF.
3489 * tree-vectorizer.c (vec_info::move_dr): New function.
3490 * tree-vect-patterns.c (vect_recog_bool_pattern)
3491 (vect_recog_mask_conversion_pattern)
3492 (vect_recog_gather_scatter_pattern): Use it.
3493 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3494 the "dr" and "stmt" fields of dr_vec_info instead of
3495 STMT_VINFO_DATA_REF.
3497 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3499 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3500 (is_pattern_stmt_p): Use it.
3501 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3502 on pattern statements.
3504 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3506 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3507 original stmt as a stmt_vec_info rather than a gimple stmt.
3508 (vect_pattern_recog_1): Take the statement directly as a
3509 stmt_vec_info, rather than via a gimple_stmt_iterator.
3510 Update call to vect_mark_pattern_stmts.
3511 (vect_pattern_recog): Update calls accordingly.
3513 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3515 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3516 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3517 a vect_def_type for the first argument.
3518 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3519 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
3520 operand if it isn't defined by a vectorized statement.
3521 (vect_build_gather_load_calls): Remove the mask_dt argument and
3522 update calls to vect_get_vec_def_for_stmt_copy.
3523 (vectorizable_bswap): Likewise the dt argument.
3524 (vectorizable_call): Update calls to vectorizable_bswap and
3525 vect_get_vec_def_for_stmt_copy.
3526 (vectorizable_simd_clone_call, vectorizable_assignment)
3527 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3528 (vectorizable_comparison): Update calls to
3529 vect_get_vec_def_for_stmt_copy.
3530 (vectorizable_store): Likewise. Remove now-unnecessary calls to
3532 (vect_get_loop_based_defs): Remove dt argument and update call
3533 to vect_get_vec_def_for_stmt_copy.
3534 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3535 and vect_get_vec_def_for_stmt_copy.
3536 (vectorizable_load): Update calls to vect_build_gather_load_calls
3537 and vect_get_vec_def_for_stmt_copy.
3538 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3539 (vectorizable_reduction, vectorizable_live_operation): Update calls
3540 to vect_get_vec_def_for_stmt_copy.
3542 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3544 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3545 and gimple stmt arguments with a stmt_vec_info.
3546 (vect_record_base_alignments): Update calls accordingly.
3547 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3548 and gimple stmt arguments with a stmt_vec_info.
3549 (vect_build_slp_tree_1): Remove vinfo argument and update call
3550 to vect_record_max_nunits.
3551 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3552 and vect_record_max_nunits.
3554 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3556 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3557 file and take a stmt_vec_info instead of a gimple stmt.
3558 (supportable_widening_operation, vect_finish_replace_stmt)
3559 (vect_finish_stmt_generation, vect_get_store_rhs)
3560 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3561 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3562 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3563 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3564 (vect_create_data_ref_ptr, bump_vector_ptr)
3565 (vect_permute_store_chain, vect_setup_realignment)
3566 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3567 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3568 (vectorizable_reduction, vectorizable_induction)
3569 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3570 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3571 than gimple stmts as arguments.
3572 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3573 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3574 (can_group_stmts_p, vect_check_gather_scatter)
3575 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3576 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3577 (vect_permute_load_chain, vect_shift_permute_load_chain)
3578 (vect_transform_grouped_load)
3579 (vect_record_grouped_load_vectors): Likewise.
3580 * tree-vect-loop.c (vect_fixup_reduc_chain)
3581 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3582 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3583 (vectorizable_reduction, vectorizable_induction)
3584 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3585 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3586 (vect_get_load_store_mask): Likewise.
3587 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3588 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3589 * tree-vect-stmts.c (vect_mark_relevant)
3590 (is_simple_and_all_uses_invariant)
3591 (exist_non_indexing_operands_for_use_p, process_use)
3592 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3593 (vect_get_vec_def_for_operand, vect_get_vec_defs)
3594 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3595 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3596 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3597 (get_negative_load_store_type, get_load_store_type)
3598 (vect_check_load_store_mask, vect_check_store_rhs)
3599 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3600 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3601 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3602 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3603 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3604 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3605 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3606 (supportable_widening_operation): Likewise.
3608 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3610 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3611 a stmt_vec_info instead of a gcall.
3612 (vect_check_gather_scatter): Update call accordingly.
3613 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3615 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3616 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3617 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3618 instead of a gimple stmt.
3619 (vect_transform_loop): Update calls accordingly.
3620 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3621 stmt_vec_infos instead of gimple stmts.
3622 (vect_analyze_slp_instance): Update use accordingly.
3623 * tree-vect-stmts.c (read_vector_array, write_vector_array)
3624 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3625 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3626 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3627 (vect_gen_widened_results_half, vect_get_loop_based_defs)
3628 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3629 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3630 down to subroutines.
3632 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3634 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3635 of the worklist from a vector of gimple stmts to a vector of
3637 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3638 (vect_mark_stmts_to_be_vectorized): Likewise
3640 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3642 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3643 statement before passing it to vect_analyze_stmt.
3644 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3645 the chain of phi vector definitions. Track the exit phi via its
3647 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3648 STMT_VINFO_REDUC_DEF.
3649 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3650 stmt_vec_infos to handle the statement chains.
3651 (vect_get_slp_defs): Record the first statement in the node
3652 using a stmt_vec_info.
3653 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3654 statements here and pass their stmt_vec_info down to subroutines.
3655 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3656 down to vect_finish_stmt_generation.
3657 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3658 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3659 stmt_vec_infos to subroutines.
3660 (vect_remove_stores): Use stmt_vec_infos to handle the statement
3663 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3665 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3666 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3667 (vect_permute_store_chain, vect_setup_realignment)
3668 (vect_permute_load_chain, vect_shift_permute_load_chain)
3669 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3670 stmts internally, and when passing values to other vectorizer routines.
3671 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3672 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3673 (vect_analyze_loop_operations, get_initial_def_for_reduction)
3674 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3675 (vectorizable_reduction, vectorizable_induction)
3676 (vectorizable_live_operation, vect_transform_loop_stmt)
3677 (vect_transform_loop): Likewise.
3678 * tree-vect-patterns.c (vect_reassociating_reduction_p)
3679 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3680 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3681 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3682 (vect_slp_analyze_node_operations_1): Likewise.
3683 * tree-vect-stmts.c (vect_mark_relevant, process_use)
3684 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3685 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3686 (vect_finish_stmt_generation_1, get_group_load_store_type)
3687 (get_load_store_type, vect_build_gather_load_calls)
3688 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3689 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3690 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3691 (vectorizable_store, vectorizable_load, vectorizable_condition)
3692 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3693 (supportable_widening_operation): Likewise.
3694 (vect_get_vector_types_for_stmt): Likewise.
3695 * tree-vectorizer.h (vect_dr_behavior): Likewise.
3697 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3699 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3700 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3701 (vect_permute_store_chain, vect_permute_load_chain)
3702 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3703 repeated stmt_vec_info lookups.
3704 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3705 (vect_update_ivs_after_vectorizer): Likewise.
3706 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3707 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3708 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3709 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3710 (vect_bb_slp_scalar_cost): Likewise.
3711 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3713 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3715 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3716 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3717 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3718 to get gassigns and gcalls, rather than operating on generc gimple
3720 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3721 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3722 (vectorizable_load, vect_analyze_stmt): Likewise.
3723 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3725 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3727 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3728 return stmt_vec_infos rather than gimple stmts. Do not accept
3730 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3732 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3733 Update use of get_later_stmt.
3734 (vect_get_constant_vectors): Update call accordingly.
3735 (vect_schedule_slp_instance): Likewise
3736 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3737 (vect_slp_analyze_instance_dependence): Likewise.
3738 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3740 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3742 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3743 (stmt_info_for_cost::stmt_info): ...this new field.
3744 (add_stmt_costs): Update accordingly.
3745 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3746 (vect_get_known_peeling_cost): Likewise.
3747 (vect_estimate_min_profitable_iters): Likewise.
3748 * tree-vect-stmts.c (record_stmt_cost): Likewise.
3750 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3752 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3753 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3754 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3756 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3758 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3760 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3761 a gimple stmt to a stmt_vec_info.
3762 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3764 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3766 * tree-vectorizer.h (vec_info::grouped_stores): Change from
3767 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3768 (_loop_vec_info::reduction_chains): Likewise.
3769 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3771 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3773 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3775 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3776 a gimple stmt to a stmt_vec_info.
3777 (_stmt_vec_info::next_element): Likewise.
3778 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3779 (vect_slp_analyze_and_verify_node_alignment)
3780 (vect_analyze_group_access_1, vect_analyze_group_access)
3781 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3782 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3783 (vect_supportable_dr_alignment): Update accordingly.
3784 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3785 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3786 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3787 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3788 * tree-vect-slp.c (vect_build_slp_tree_1)
3789 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3790 (vect_split_slp_store_group, vect_analyze_slp_instance)
3791 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3792 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3793 (get_group_load_store_type, get_load_store_type)
3794 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3795 (vect_transform_stmt, vect_remove_stores): Likewise.
3797 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3799 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3801 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3802 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3803 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3804 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3805 (vector_alignment_reachable_p, vect_get_data_access_cost)
3806 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3807 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3808 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3809 (vect_analyze_group_access_1, vect_analyze_group_access)
3810 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3811 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3812 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3813 result of vect_dr_stmt and use the stmt_vec_info instead of
3814 the associated gimple stmt.
3815 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3816 (vect_gen_prolog_loop_niters): Likewise.
3817 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3819 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3821 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
3822 to a vec<stmt_vec_info>.
3823 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
3824 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
3826 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
3827 to a vec<stmt_vec_info>.
3828 (bst_traits::value_type, bst_traits::value_type): Likewise.
3829 (bst_traits::hash): Update accordingly.
3830 (vect_get_and_check_slp_defs): Change the stmts parameter from
3831 a vec<gimple *> to a vec<stmt_vec_info>.
3832 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
3833 (vect_build_slp_tree): Likewise.
3834 (vect_build_slp_tree_2): Likewise. Update uses of
3835 SLP_TREE_SCALAR_STMTS.
3836 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
3837 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
3838 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
3839 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
3840 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
3841 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
3842 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
3843 (vect_get_constant_vectors, vect_get_slp_defs)
3844 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
3845 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
3846 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3847 instead of gimple stmts.
3848 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3849 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3850 (vect_slp_analyze_instance_dependence): Update uses of
3851 SLP_TREE_SCALAR_STMTS.
3852 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3853 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3854 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3855 (get_initial_defs_for_reduction): Likewise.
3856 (vect_create_epilog_for_reduction): Likewise.
3857 (vectorize_fold_left_reduction): Likewise.
3858 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3859 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3860 (can_vectorize_live_stmts): Likewise.
3862 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3864 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3865 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3866 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3868 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3870 (gather_scalar_reductions): Update after above interface changes.
3871 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3872 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3874 (vect_force_simple_reduction): Likewise.
3875 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3876 LOOP_VINFO_REDUCTIONS.
3877 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3879 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3881 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3882 a gimple stmt to a stmt_vec_info.
3883 * tree-vect-loop.c (vect_active_double_reduction_p)
3884 (vect_force_simple_reduction, vectorizable_reduction): Update
3887 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3889 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3890 vec<gimple *> to a vec<stmt_vec_info>.
3891 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3892 the reduction_phis argument from a vec<gimple *> to a
3894 (vectorizable_reduction): Likewise the phis local variable that
3895 is passed to vect_create_epilog_for_reduction. Update for new type
3896 of SLP_TREE_VEC_STMTS.
3897 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3898 (vectorizable_live_operation): Likewise.
3899 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3900 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3902 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3904 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3905 a gimple stmt to a stmt_vec_info.
3906 (vectorizable_condition, vectorizable_live_operation)
3907 (vectorizable_reduction, vectorizable_induction): Pass back the
3908 vectorized statement as a stmt_vec_info.
3909 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
3910 use of STMT_VINFO_VEC_STMT.
3911 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
3912 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
3913 as stmt_vec_infos rather than gimple stmts.
3914 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
3916 (vectorizable_live_operation): Likewise.
3917 (vectorizable_reduction, vectorizable_induction): Likewise,
3918 updating use of STMT_VINFO_VEC_STMT.
3919 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
3920 of STMT_VINFO_VEC_STMT.
3921 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
3922 (vectorizable_simd_clone_call, vectorizable_conversion)
3923 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3924 (vectorizable_store, vectorizable_load, vectorizable_condition)
3925 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
3926 from a gimple stmt to a stmt_vec_info.
3927 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
3928 pointer to a stmt_vec_info to the vectorizable_* routines.
3930 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3932 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
3933 a gimple stmt to a stmt_vec_info.
3934 (is_pattern_stmt_p): Update accordingly.
3935 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
3936 (vect_record_grouped_load_vectors): Likewise.
3937 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3938 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
3939 (vect_model_reduction_cost): Likewise.
3940 (vect_create_epilog_for_reduction): Likewise.
3941 (vectorizable_reduction, vectorizable_induction): Likewise.
3942 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3943 Return the stmt_vec_info for the pattern statement.
3944 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
3945 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
3946 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3947 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
3948 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3949 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
3950 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
3951 (free_stmt_vec_info, vect_is_simple_use): Likewise.
3953 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3955 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
3956 (vect_finish_stmt_generation): Likewise.
3957 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3958 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
3959 (vect_build_gather_load_calls): Use the return value of the above
3960 functions instead of a separate call to vinfo_for_stmt. Use narrow
3961 scopes for the input gimple stmt and wider scopes for the associated
3962 stmt_vec_info. Use vec_info::lookup_def when setting these
3963 stmt_vec_infos from an SSA_NAME definition.
3964 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3965 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3966 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3967 (vectorizable_store, vectorizable_load, vectorizable_condition)
3968 (vectorizable_comparison): Likewise.
3969 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
3970 (vectorizable_reduction): Likewise.
3972 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3974 * tree-vectorizer.h (vect_is_simple_use): Add an optional
3975 stmt_vec_info * parameter before the optional gimple **.
3976 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3977 (process_use, vect_get_vec_def_for_operand_1): Update callers.
3978 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
3979 * tree-vect-loop.c (vectorizable_reduction): Likewise.
3980 (vectorizable_live_operation): Likewise.
3981 * tree-vect-patterns.c (type_conversion_p): Likewise.
3982 (vect_look_through_possible_promotion): Likewise.
3983 (vect_recog_rotate_pattern): Likewise.
3984 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3986 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3988 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
3989 a typedef to a wrapper class.
3990 (NULL_STMT_VEC_INFO): New macro.
3991 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
3992 (stmt_vec_info::operator*): New function.
3993 (stmt_vec_info::operator gimple *): Likewise.
3994 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
3995 (add_stmt_costs): Likewise.
3996 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3997 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3998 (vect_get_known_peeling_cost): Likewise.
3999 (vect_estimate_min_profitable_iters): Likewise.
4000 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4001 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4002 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4003 (vectorizable_store, free_stmt_vec_infos): Likewise.
4004 (new_stmt_vec_info): Change return type of xcalloc to
4007 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4009 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4010 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4011 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4012 a single_imm_use-based sequence.
4013 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4015 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4017 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4018 * tree-vectorizer.c (vec_info::lookup_def): New function.
4019 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4020 (vect_widened_op_tree): Likewise.
4021 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4022 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4023 (vectorizable_reduction): Likewise.
4024 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4026 (vect_is_slp_reduction): Update calls accordingly. Use
4027 vec_info::lookup_def.
4028 (vect_is_simple_reduction): Likewise
4029 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4031 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4033 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4034 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4035 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4037 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4038 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4039 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4040 (vect_is_slp_reduction, vectorizable_induction)
4041 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4042 * tree-vect-patterns.c (vect_init_pattern_stmt):
4043 (vect_determine_min_output_precision_1, vect_determine_precisions)
4044 (vect_pattern_recog): Likewise.
4045 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4046 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4047 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4048 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4049 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4050 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4051 info field from a loop to a loop_vec_info.
4053 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4055 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4056 (vec_info::add_stmt): Declare.
4057 * tree-vectorizer.c (vec_info::add_stmt): New function.
4058 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4059 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4060 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4061 (vectorizable_induction): Likewise.
4062 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4063 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4064 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4065 (vectorizable_load): Likewise.
4066 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4067 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4068 (vect_recog_gather_scatter_pattern): Likewise.
4069 (append_pattern_def_seq): Likewise. Remove a check that is
4070 performed by add_stmt itself.
4072 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4074 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4075 which make_ssa_name was called with new_stmt before new_stmt
4078 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4080 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4082 (vect_is_slp_reduction): ...here...
4083 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4084 that are already known to be false.
4086 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4088 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4089 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4090 STMT_VINFO_NUM_SLP_USES when it's true.
4091 (vect_free_slp_instance): Add a final_p parameter and pass it to
4093 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4094 (vect_analyze_slp_instance): Likewise.
4095 (vect_slp_analyze_operations): Likewise.
4096 (vect_slp_analyze_bb_1): Likewise.
4097 * tree-vectorizer.c (vec_info): Likewise.
4098 * tree-vect-loop.c (vect_transform_loop): Likewise.
4100 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4102 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4103 function is not called for second and subsequent members of
4106 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4108 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4109 cases for nested loops from here to ...
4110 (vect_create_epilog_for_reduction): ...here. Only call
4111 vect_is_simple_use for inner-loop reductions.
4113 2018-07-31 Martin Liska <mliska@suse.cz>
4115 PR gcov-profile/85338
4116 PR gcov-profile/85350
4117 PR gcov-profile/85372
4118 * profile.c (struct location_triplet): New.
4119 (struct location_triplet_hash): Likewise.
4120 (output_location): Do not output a BB that
4121 is already recorded for a line.
4122 (branch_prob): Use streamed_locations.
4124 2018-07-31 Martin Liska <mliska@suse.cz>
4126 PR gcov-profile/85370
4127 * coverage.c (coverage_begin_function): Do not mark target
4128 clones as artificial functions.
4130 2018-07-31 Martin Liska <mliska@suse.cz>
4132 PR gcov-profile/83813
4133 PR gcov-profile/84758
4134 PR gcov-profile/85217
4135 PR gcov-profile/85332
4136 * profile.c (branch_prob): Do not record GOTO expressions
4137 for GIMPLE statements which locations are already streamed.
4139 2018-07-31 Olivier Hainque <hainque@adacore.com>
4141 * gcc.c (handle_spec_function): Accept a soft_matched_part
4142 argument, as do_spec_1. Pass it down to ...
4143 (eval_spec_function): Accept a soft_matched_part argument,
4144 and pass it down to ...
4145 (do_spec_2): Accept a soft_matched_part argument, and pass
4146 it down to do_spec_1.
4147 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4148 (handle_braces): Update call to handle_spec_function.
4149 (driver::set_up_specs): Update calls to do_spec_2.
4150 (compare_debug_dump_opt_spec_function): Likewise.
4151 (compare_debug_self_opt_spec_function): Likewise.
4153 2018-07-31 Olivier Hainque <hainque@adacore.com>
4155 * common.opt (nolibc): New option.
4156 * doc/invoke.texi (Link Options): Document it.
4157 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4158 * config/alpha/linux.h: Likewise.
4159 * config/arc/elf.h: Likewise.
4160 * config/arm/uclinux-elf.h: Likewise.
4161 * config/arm/unknown-elf.h: Likewise.
4162 * config/avr/avrlibc.h: Likewise.
4163 * config/bfin/bfin.h: Likewise.
4164 * config/bfin/linux.h: Likewise.
4165 * config/bfin/uclinux.h: Likewise.
4166 * config/darwin.h: Likewise.
4167 * config/darwin10.h: Likewise.
4168 * config/darwin12.h: Likewise.
4169 * config/gnu-user.h: Likewise.
4170 * config/lm32/uclinux-elf.h: Likewise.
4171 * config/pa/pa-hpux11.h: Likewise.
4172 * config/pa/pa64-hpux.h: Likewise.
4173 * config/sparc/sparc.h: Likewise.
4175 2018-07-31 Olivier Hainque <hainque@adacore.com>
4177 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4178 undefined variables.
4180 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4183 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4186 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4188 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4189 terminated string literal.
4191 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4193 PR rtl-optimization/85160
4194 * combine.c (is_just_move): New function.
4195 (try_combine): Allow combining two instructions into two if neither of
4196 the original instructions was a move.
4198 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4201 * doc/extend.texi (Global Register Variables): Discourage use of type
4203 (Local Register Variables): Likewise.
4205 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4207 PR tree-optimization/86506
4208 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4210 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4213 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4214 hard_regno, make sure no insn between `from` and `to` clobbers it.
4216 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4217 Tom de Vries <tdevries@suse.de>
4219 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4220 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4221 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4222 PTX_DEFAULT_RUNTIME_DIM.
4223 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4225 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4227 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4228 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4229 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4231 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4233 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4235 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4236 predicate to reflect toc fusion has been deleted.
4237 (toc_fusion_mem_raw): Delete, no longer used.
4238 (toc_fusion_mem_wrapped): Likewise.
4239 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4241 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4242 Delete, no longer used.
4243 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4244 meant to be used for toc fusion.
4245 (rs6000_debug_print_mode): Delete toc fusion debugging.
4246 (rs6000_debug_reg_global): Likewise.
4247 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4248 fusion and secondary reload support that were never used.
4249 (rs6000_option_override_internal): Delete TOC fusion, that was only
4250 partially defined, and it did not work unless you also used the
4252 (rs6000_legitimate_address_p): Delete TOC fusion support.
4253 (rs6000_opt_masks): Likewise.
4254 (fusion_wrap_memory_address): Delete function, no longer used.
4255 (fusion_split_address); Delete TOC fusion support.
4256 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4257 longer used with toc fusion being deleted.
4258 (TARGET_TOC_FUSION_FP): Likewise.
4259 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4261 (toc fusion spliter): Delete TOC fusion support.
4262 (toc_fusionload_<mode>): Likewise.
4263 (toc_fusionload_di): Likewise.
4264 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4265 longer needs to be named. Rename predicate to delete TOC fusion.
4266 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4267 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4268 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4269 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4270 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4272 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4274 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4275 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4276 __int128 in built-in function prototypes.
4277 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4278 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4280 2018-07-27 Martin Sebor <msebor@redhat.com>
4282 PR tree-optimization/86696
4283 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4284 types, including enums.
4285 (handle_char_store): Be prepared for the above function to fail.
4287 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4289 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4290 when optimization level is lower than 2 or optimize for size.
4292 2018-07-26 Martin Sebor <msebor@redhat.com>
4294 PR tree-optimization/86043
4295 PR tree-optimization/86042
4296 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4297 (get_string_cst_length): Rename...
4298 (get_min_string_length): ...to this. Add argument.
4299 (handle_char_store): Extend to handle multi-character stores by
4301 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4302 * tree.h (initializer_zerop): Add argument.
4304 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4307 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4308 declare target to variables if they have always,{to,from,tofrom} map
4311 2018-07-26 Martin Liska <mliska@suse.cz>
4314 * lto-wrapper.c: Add linker_output as prefix
4315 for ltrans_output_file.
4317 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4319 PR rtl-optimization/85805
4320 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4321 value for hard registers if that was written in the same mode.
4323 2018-07-26 Martin Liska <mliska@suse.cz>
4325 PR gcov-profile/86536
4326 * gcov.c (format_gcov): Use printf format %.*f directly
4327 and do not handle special values.
4329 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4331 * common/config/arc/arc-common.c (arc_option_optimization_table):
4332 Update default optimizations for size.
4334 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4336 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4337 * config/arc/constraints.md (CfZ): New constraint.
4338 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4339 (subsf3_fpu): Likewise.
4340 (cmpsf_fpu): Likewise.
4341 (cmpsf_fpu_uneq): Likewise.
4343 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4345 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4347 (arc_is_uncached_mem_p): uncached applies to both the variable and
4350 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4352 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4355 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4357 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4358 field "m_scopes" from vec to auto_vec.
4360 2018-07-25 Martin Liska <mliska@suse.cz>
4362 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4365 2018-07-25 Richard Biener <rguenther@suse.de>
4368 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4369 special wrt context_die late.
4370 (gen_subprogram_die): Re-use DIEs in local scope.
4372 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
4374 PR tree-optimization/86644
4375 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
4377 2018-07-25 Martin Liska <mliska@suse.cz>
4380 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4381 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4383 2018-07-25 Martin Liska <mliska@suse.cz>
4386 * params.def: Explain ASan abbreviation and provide
4387 a documentation link.
4389 2018-07-24 Martin Sebor <msebor@redhat.com>
4391 PR tree-optimization/86622
4392 PR tree-optimization/86532
4393 * builtins.h (string_length): Declare.
4394 * builtins.c (c_strlen): Correct handling of non-constant offsets.
4395 (check_access): Be prepared for non-constant length ranges.
4396 (string_length): Make extern.
4397 * expr.c (string_constant): Only handle the minor non-constant
4398 array index. Use string_constant to compute the length of
4399 a generic string constant.
4401 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
4403 PR tree-optimization/86618
4404 * tree-vect-stmts.c (vectorizable_call): Don't take the address
4405 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4407 2018-07-24 David Malcolm <dmalcolm@redhat.com>
4409 PR tree-optimization/86636
4410 * json.cc (json::object::set): Fix comment. Add assertions.
4411 (json::array::append): Move here from json.h. Add comment and an
4413 (json::string::string): Likewise.
4414 * json.h (json::array::append): Move to json.cc.
4415 (json::string::string): Likewise.
4416 * optinfo-emit-json.cc
4417 (optrecord_json_writer::impl_location_to_json): Assert that we
4418 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4419 wrapper around it. Expand the location once, rather than three
4421 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4422 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4424 (optrecord_json_writer::optinfo_to_json): Likewise, in four
4425 places. Fix some overlong lines.
4427 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
4429 * config/aarch64/aarch64-simd.md
4430 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4431 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4432 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4433 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4434 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4435 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4436 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4437 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4438 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4440 2018-07-24 Jakub Jelinek <jakub@redhat.com>
4443 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4444 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
4445 and abs_d == d, do the power of two handling if profitable.
4447 2018-07-24 Richard Biener <rguenther@suse.de>
4449 * match.pd: Add BIT_FIELD_REF canonicalizations.
4451 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4454 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4456 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4458 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4459 terminated STRING_CST object.
4461 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4463 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4465 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4467 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4468 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4469 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4470 the elements into a register.
4471 (rs6000_split_v4si_init_di_reg): Delete.
4472 (rs6000_split_v4si_init): Delete.
4473 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4474 (vsx_init_v4si): Rewrite as a define_expand.
4476 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
4478 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4479 zero_extend argument from memory): New.
4481 2018-07-22 Martin Sebor <msebor@redhat.com>
4484 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4485 diagnosing calls with unknown arguments unless -Walloca-larger-than
4486 is restricted to less than PTRDIFF_MAX bytes.
4488 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
4490 * doc/gcov.texi (Invoking Gcov): Editorial changes.
4492 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4494 * pretty-print.c (text_info::set_location): Remove redundant
4495 "line_table" parameter from call to rich_location::set_range.
4497 2018-07-20 Martin Sebor <msebor@redhat.com>
4500 * builtins.c (expand_builtin_alloca): Adjust.
4501 * calls.c (alloc_max_size): Simplify.
4502 * cgraphunit.c (cgraph_node::expand): Adjust.
4503 * common.opt (larger_than_size, warn_frame_larger_than): Remove
4505 (frame_larger_than_size): Same.
4506 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4507 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4509 * doc/invoke.texi (GCC Command Options): Document option arguments.
4510 Explain byte-size arguments and suffixes.
4511 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4512 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4513 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4514 * doc/options.texi (UInteger): Expand.
4515 (Host_Wide_Int, ByteSize): Document new properties.
4516 * final.c (final_start_function_1): Include sizes in an error message.
4517 * function.c (frame_offset_overflow): Same.
4518 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4519 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4520 Diagnose unbounded alloca calls only for limits of less than
4522 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
4523 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
4525 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
4526 only for limits of less than PTRDIFF_MAX.
4527 * langhooks-def.h (lhd_handle_option): Change function argument
4529 * langhooks.c (lhd_handle_option): Same.
4530 * langhooks.h (handle_option): Same.
4531 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4533 (var_type, var_type_struct): Same.
4534 (var_set): Handle ByteSize flag.
4535 * optc-gen.awk: Add comments to output to ease debugging. Make
4536 use of HOST_WIDE_INT where appropriate.
4537 * opts-gen-save.awk: Use %lx to format unsigned long.
4538 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4539 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4540 arguments. Parse bytes-size suffixes.
4541 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4542 (enum_value_to_arg): Same.
4543 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
4544 (handle_option): Adjust.
4545 (generate_option): Change function argument to HOST_WIDE_INT.
4546 (cmdline_handle_error): Adjust.
4547 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4548 (set_option): Change function argument to HOST_WIDE_INT.
4549 (option_enabled): Handle cl_host_wide_int.
4550 (get_option_state): Handle CLVC_SIZE.
4551 (control_warning_option): Same.
4552 * opts.c (common_handle_option): Change function argument to
4553 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
4554 OPT_Wvla_larger_than_.
4555 * opts.h (enum cl_var_type): Add an enumerator.
4556 * stor-layout.c (layout_decl): Print a more meaningful warning.
4557 * toplev.c (output_stack_usage): Adjust.
4559 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
4561 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4562 call to inline_expand_builtin_string_cmp.
4563 (expand_builtin_strcmp): Likewise.
4564 (expand_builtin_strncmp): Likewise.
4565 (inline_string_cmp): Delete the last parameter, change char_type_node
4566 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4568 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4569 the inlining expansion on target where the type of the call has same or
4570 narrower precision than unsigned char.
4572 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4574 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4575 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4576 * common.opt (fsave-optimization-record): New option.
4577 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4578 * doc/invoke.texi (-fsave-optimization-record): New option.
4579 * dumpfile.c: Include "optinfo-emit-json.h".
4580 (struct kv_pair): Move to coretypes.h.
4581 (optgroup_options): Make non-static.
4582 (dump_context::end_scope): Call
4583 optimization_records_maybe_pop_dump_scope.
4584 * dumpfile.h (optgroup_options): New decl.
4585 * json.cc: New file.
4587 * optinfo-emit-json.cc: New file.
4588 * optinfo-emit-json.h: New file.
4589 * optinfo.cc: Include "optinfo-emit-json.h".
4590 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4591 (optinfo_enabled_p): Check optimization_records_enabled_p.
4592 (optinfo_wants_inlining_info_p): Likewise.
4593 * optinfo.h: Update comment.
4594 * profile-count.c (profile_quality_as_string): New function.
4595 * profile-count.h (profile_quality_as_string): New decl.
4596 (profile_count::quality): New accessor.
4597 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4598 and optinfo_emit_json_cc_tests.
4599 * selftest.h (selftest::json_cc_tests): New decl.
4600 (selftest::optinfo_emit_json_cc_tests): New decl.
4601 * toplev.c: Include "optinfo-emit-json.h".
4602 (compile_file): Call optimization_records_finish.
4603 (do_compile): Call optimization_records_start.
4604 * tree-ssa-live.c: Include optinfo.h.
4605 (remove_unused_scope_block_p): Retain inlining information if
4606 optinfo_wants_inlining_info_p returns true.
4608 2018-07-20 Richard Biener <rguenther@suse.de>
4611 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4612 to cover -flto-partition=none.
4614 2018-07-20 Martin Liska <mliska@suse.cz>
4616 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4617 (get_decl_source_range): Remove unused function.
4619 2018-07-20 Richard Biener <rguenther@suse.de>
4621 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4622 (struct vn_phi_s): Likewise.
4623 (struct vn_reference_s): Likewise.
4624 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4625 for searching the slot of an entry known to be in the hash itself.
4626 (vn_phi_hasher::equal): Likewise.
4627 (vn_reference_hasher::equal): Likewise.
4628 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4630 (optimistic_info, current_info): Remove, keeping only valid_info.
4631 (vn_reference_lookup_1): Remove fallback lookup.
4632 (vn_reference_lookup_2): Likewise.
4633 (vn_nary_op_lookup_1): Likewise.
4634 (vn_phi_lookup): Likewise.
4635 (vn_nary_build_or_lookup_1): Make sure to not chain the built
4637 (vn_reference_insert): Adjust, chain the inserted hash element
4638 at last_inserted_ref.
4639 (vn_reference_insert_pieces): Likewise.
4640 (visit_reference_op_call): Likewise.
4641 (vn_nary_op_insert_into): Chain the inserted hash element at
4643 (vn_nary_op_insert_pieces): Adjust.
4644 (vn_nary_op_insert): Likewise.
4645 (vn_nary_op_insert_stmt): Likewise.
4646 (vn_phi_insert): Adjust, chain the inserted hash element at
4648 (process_scc): Remove clearing and copying the optimistic
4649 table. Instead remove elements inserted during an optimistic
4650 iteration from the single table we maintain.
4651 (init_scc_vn): Adjust.
4652 (free_scc_vn): Likewise.
4653 (sccvn_dom_walker::record_cond): Likewise.
4654 (sccvn_dom_walker::after_dom_children): Likewise.
4656 2018-07-19 Martin Sebor <msebor@redhat.com>
4658 PR tree-optimization/84047
4659 PR tree-optimization/83776
4660 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4661 (check_array_bounds): Call it.
4663 2018-07-19 Martin Sebor <msebor@redhat.com>
4665 * align.h (align_flags): Use member initialization.
4667 2018-07-19 David Malcolm <dmalcolm@redhat.com>
4669 * Makefile.in (OBJS): Add optinfo.o.
4670 * coretypes.h (class symtab_node): New forward decl.
4671 (struct cgraph_node): New forward decl.
4672 (class varpool_node): New forward decl.
4673 * dump-context.h: New file.
4674 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4676 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4677 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4678 (set_alt_dump_file): Likewise.
4679 (dump_context::~dump_context): New dtor.
4680 (dump_gimple_stmt): Move implementation to...
4681 (dump_context::dump_gimple_stmt): ...this new member function.
4682 Add the stmt to any pending optinfo, creating one if need be.
4683 (dump_gimple_stmt_loc): Move implementation to...
4684 (dump_context::dump_gimple_stmt_loc): ...this new member function.
4685 Start a new optinfo and add the stmt to it.
4686 (dump_gimple_expr): Move implementation to...
4687 (dump_context::dump_gimple_expr): ...this new member function.
4688 Add the stmt to any pending optinfo, creating one if need be.
4689 (dump_gimple_expr_loc): Move implementation to...
4690 (dump_context::dump_gimple_expr_loc): ...this new member function.
4691 Start a new optinfo and add the stmt to it.
4692 (dump_generic_expr): Move implementation to...
4693 (dump_context::dump_generic_expr): ...this new member function.
4694 Add the tree to any pending optinfo, creating one if need be.
4695 (dump_generic_expr_loc): Move implementation to...
4696 (dump_context::dump_generic_expr_loc): ...this new member
4697 function. Add the tree to any pending optinfo, creating one if
4699 (dump_printf): Move implementation to...
4700 (dump_context::dump_printf_va): ...this new member function. Add
4701 the text to any pending optinfo, creating one if need be.
4702 (dump_printf_loc): Move implementation to...
4703 (dump_context::dump_printf_loc_va): ...this new member function.
4704 Start a new optinfo and add the stmt to it.
4705 (dump_dec): Move implementation to...
4706 (dump_context::dump_dec): ...this new member function. Add the
4707 value to any pending optinfo, creating one if need be.
4708 (dump_context::dump_symtab_node): New member function.
4709 (dump_context::get_scope_depth): New member function.
4710 (dump_context::begin_scope): New member function.
4711 (dump_context::end_scope): New member function.
4712 (dump_context::ensure_pending_optinfo): New member function.
4713 (dump_context::begin_next_optinfo): New member function.
4714 (dump_context::end_any_optinfo): New member function.
4715 (dump_context::s_current): New global.
4716 (dump_context::s_default): New global.
4717 (dump_scope_depth): Delete global.
4718 (dumpfile_ensure_any_optinfo_are_flushed): New function.
4719 (dump_symtab_node): New function.
4720 (get_dump_scope_depth): Reimplement in terms of dump_context.
4721 (dump_begin_scope): Likewise.
4722 (dump_end_scope): Likewise.
4723 (selftest::temp_dump_context::temp_dump_context): New ctor.
4724 (selftest::temp_dump_context::~temp_dump_context): New dtor.
4725 (selftest::verify_item): New function.
4726 (ASSERT_IS_TEXT): New macro.
4727 (ASSERT_IS_TREE): New macro.
4728 (ASSERT_IS_GIMPLE): New macro.
4729 (selftest::test_capture_of_dump_calls): New test.
4730 (selftest::dumpfile_c_tests): Call it.
4731 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4732 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4733 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4734 descriptive comment.
4735 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4736 (dump_node, dump_bb): Move these unrelated decls.
4737 (class dump_manager): Add leading comment.
4738 * optinfo.cc: New file.
4739 * optinfo.h: New file.
4741 2018-07-19 Michael Collison <michael.collison@arm.com>
4742 Richard Henderson <rth@redhat.com>
4744 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4745 (subti): Handle op1 zero.
4746 (subvti4, usub4ti4): New.
4747 (*sub<GPI>3_compare1_imm): New.
4748 (sub<GPI>3_carryinCV): New.
4749 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4750 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4752 2018-07-19 Michael Collison <michael.collison@arm.com>
4753 Richard Henderson <rth@redhat.com>
4755 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4756 (addti3): Create simpler code if low part is already known to be 0.
4757 (addvti4, uaddvti4): New.
4758 (*add<GPI>3_compareC_cconly_imm): New.
4759 (*add<GPI>3_compareC_cconly): New.
4760 (*add<GPI>3_compareC_imm): New.
4761 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4762 handle constants within this pattern..
4763 (*add<GPI>3_compareV_cconly_imm): New.
4764 (*add<GPI>3_compareV_cconly): New.
4765 (*add<GPI>3_compareV_imm): New.
4766 (add<GPI>3_compareV): New.
4767 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4768 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4769 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4770 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4771 with 'comparison' operator.
4772 (*add<GPI>3_compareV_cconly_imm): Ditto.
4773 (*add<GPI>3_compareV_cconly): Ditto.
4774 (*add<GPI>3_compareV_imm): Ditto.
4775 (add<GPI>3_compareV): Ditto.
4776 (add<mode>3_carryinC): Ditto.
4777 (*add<mode>3_carryinC_zero): Ditto.
4778 (*add<mode>3_carryinC): Ditto.
4779 (add<mode>3_carryinV): Ditto.
4780 (*add<mode>3_carryinV_zero): Ditto.
4781 (*add<mode>3_carryinV): Ditto.
4783 2018-07-19 Michael Collison <michael.collison@arm.com>
4784 Richard Henderson <rth@redhat.com>
4786 * config/aarch64/aarch64-modes.def (CC_V): New.
4787 * config/aarch64/aarch64-protos.h
4788 (aarch64_addti_scratch_regs): Declare
4789 (aarch64_subvti_scratch_regs): Declare.
4790 (aarch64_expand_subvti): Declare.
4791 (aarch64_gen_unlikely_cbranch): Declare
4792 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4793 for signed overflow using CC_Vmode.
4794 (aarch64_get_condition_code_1): Handle CC_Vmode.
4795 (aarch64_gen_unlikely_cbranch): New function.
4796 (aarch64_addti_scratch_regs): New function.
4797 (aarch64_subvti_scratch_regs): New function.
4798 (aarch64_expand_subvti): New function.
4800 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4802 * config/aarch64/aarch64-option-extensions.def: New entry for profile
4804 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4805 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4808 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4811 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4812 address check not strict.
4814 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
4816 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4818 (store_pair_lanes<mode>): Likewise.
4819 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
4820 enum value 'ADDR_QUERY_LDP_STP_N'.
4821 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
4822 (aarch64_print_address_internal): Add declaration.
4823 (aarch64_print_ldpstp_address): Remove.
4824 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
4825 (aarch64_print_operand): Change printing of 'y'.
4826 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
4827 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
4828 'true' rather than '1'.
4829 * config/aarch64/constraints.md (Uml): Likewise.
4830 (Uml): Rename to Umn.
4833 2018-07-19 Richard Biener <rguenther@suse.de>
4835 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
4837 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
4838 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
4839 (vn_reference_hasher): Likewise.
4840 (struct vn_tables_s): Remove obstack and alloc-pool members.
4841 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
4842 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
4843 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
4844 (vn_reference_insert_pieces): Likewise.
4845 (alloc_vn_nary_op_noinit): Adjust.
4846 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4847 (vn_phi_eq): Adjust.
4848 (shared_lookup_phiargs): Remove.
4849 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4850 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4851 (visit_reference_op_call): Likewise.
4852 (copy_nary, copy_phi, copy_reference): Remove.
4853 (process_scc): Rewind the obstack when iterating. Do not
4854 copy the elements to valid_info but just move them from one
4855 hashtable to the other.
4856 (allocate_vn_table): Adjust.
4857 (free_vn_table): Likewise.
4858 (init_scc_vn): Likewise.
4859 (free_scc_vn): Likewise.
4861 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
4864 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4865 indirect_return as function type attribute.
4866 (ix86_attribute_table): Change indirect_return to function
4868 * doc/extend.texi: Update indirect_return attribute.
4870 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
4872 * wide-int.h (widest2_int): New.
4873 * gimple-fold.c (arith_overflowed_p): Use it.
4874 * tree.h (widest2_int_cst): New.
4875 * tree-vrp.c (wide_int_binop_overflow): Rename from
4876 vrp_int_const_binop.
4877 Rewrite to work on trees.
4878 (extract_range_from_multiplicative_op_1): Abstract code to...
4879 (wide_int_range_min_max): ...here.
4880 (wide_int_range_cross_product): ...and here.
4881 (extract_range_from_binary_expr_1): Abstract overflow code to...
4882 (wide_int_range_mult_wrapping): ...here.
4883 * tree-vrp.h (wide_int_range_cross_product): New.
4884 (wide_int_range_mult_wrapping): New.
4886 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
4887 Julia Koval <julia.koval@intel.com>
4889 * config/i386/x86-tune-costs.h (skylake_memcpy,
4890 skylake_memset): Replace rep_prefix with unrolling for size 512.
4892 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
4895 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4896 comparision with EQ_EXPR in last stmt.
4898 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
4900 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4901 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4902 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4903 previously known as "PowerPC AltiVec Built-in Functions". Move
4904 some material to new subsubsections "PowerPC AltiVec Built-in
4905 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4907 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
4908 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
4909 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
4910 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
4912 2018-07-18 Richard Biener <rguenther@suse.de>
4914 PR tree-optimization/86557
4915 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
4918 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
4920 * config/s390/s390.c (s390_function_profiler): Generate CFI.
4922 2018-07-17 Jeff Law <law@redhat.com>
4924 * config/arm/arm.c (get_label_padding): Update for recent
4925 changes to label_to_alignment.
4927 PR tree-optimization/86010
4928 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
4930 * config/mips/mips.c (vr4130_align_insns): Update for recent
4931 changes to label_to_alignment.
4933 * config/frv/frv.c (frv_label_align): Update for recent changes
4934 to label_to_alignment.
4936 * config/nios2/nios2.c (nios2_label_align): Update for recent
4937 changes which dropped ALIGN_LABELS_LOG.
4939 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
4941 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
4942 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
4944 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
4946 * config/arc/arc.c (arc_label_align): Use align_labels instead of
4947 deprecated align_labels_log.
4949 2018-07-17 Richard Biener <rguenther@suse.de>
4952 * dwarf2out.c (init_sections_and_labels): Always generate
4953 a debug_line_str_section for early LTO debug.
4954 (dwarf2out_finish): Reset debug_line_str_hash output early.
4955 Bump counter for extra dwarf5 .debug_loc labels to not conflict
4957 (dwarf2out_early_finish): Output debug_line_str.
4959 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4961 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
4962 index register on z196 or later.
4964 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
4966 * config/s390/s390.c (s390_default_align): Set default function
4968 (s390_override_options_after_change): Call s390_default align.
4969 (s390_option_override_internal): Call s390_default_align.
4970 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
4972 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4975 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
4976 to _looptemp_ clauses, other than the first two.
4978 2018-07-17 Martin Liska <mliska@suse.cz>
4980 * opts.c: Do not enable OPT_falign_* for -Os.
4982 2018-07-17 Martin Liska <mliska@suse.cz>
4984 * align.h (MAX_CODE_ALIGN): New.
4985 (MAX_CODE_ALIGN_VALUE): New.
4986 * common/config/i386/i386-common.c (ix86_handle_option):
4987 (MAX_CODE_ALIGN): Moved to align.h.
4988 * final.c (MAX_CODE_ALIGN): Likewise.
4989 * opts.c (parse_and_check_align_values):
4990 (MAX_CODE_ALIGN): Likewise.
4991 (MAX_CODE_ALIGN_VALUE): Likewise.
4993 2018-07-17 Martin Liska <mliska@suse.cz>
4995 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
4996 in order to fulfil coding style.
4997 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4998 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4999 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5000 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5001 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5002 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5003 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5004 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5005 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5007 2018-07-17 Martin Liska <mliska@suse.cz>
5009 * align.h: New file.
5010 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5012 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5013 align_flags of label_to_alignment.
5014 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5016 * config/m68k/m68k.c: Do not use removed align_labels_value and
5018 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5019 (LOOP_ALIGN): Likewise.
5020 (LABEL_ALIGN): Likewise.
5021 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5022 Remove not used macro.
5023 (rs6000_loop_align): Change return type to align_flags.
5024 (rs6000_loop_align_max_skip): Remove.
5025 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5026 Change return type to align_flags.
5027 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5028 Remove not used macro.
5029 (rs6000_loop_align): Change return type to align_flags.
5030 (rs6000_loop_align_max_skip): Remove.
5031 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5032 * config/rx/rx-protos.h (rx_align_for_label): Make it
5034 * config/rx/rx.c (rx_align_for_label): Change return type
5036 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5038 into align_flags class.
5039 (LABEL_ALIGN): Likewise.
5040 (LOOP_ALIGN): Likewise.
5041 * config/s390/s390.c (s390_label_align): Use align_flags
5043 (s390_asm_output_function_label): Likewise.
5044 * config/sh/sh.c (sh_override_options_after_change):
5045 Use align_flags class directly without macros.
5046 (find_barrier): Likewise.
5047 (barrier_align): Likewise.
5048 (sh_loop_align): Likewise.
5049 * config/spu/spu.c (spu_option_override):
5050 Use align_flags_tuple::get_value instead of removed macros.
5051 (spu_sched_init): Likewise.
5052 * config/spu/spu.h (GTY): Likewise.
5053 * config/visium/visium.c (visium_option_override):
5054 Set "8" as default secondary alignment.
5055 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5056 in order to guarantee secondary alignment of 8.
5057 * coretypes.h: Include align.h header file.
5058 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5059 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5060 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5061 * doc/tm.texi.in: Likewise.
5062 * final.c (struct label_alignment): Remove not used structure.
5063 (LABEL_ALIGN): Change type to align_flags.
5064 (LOOP_ALIGN): Likewise.
5065 (JUMP_ALIGN): Likewise.
5066 (default_loop_align_max_skip): Remove.
5067 (default_label_align_max_skip): Likewise.
5068 (default_jump_align_max_skip): Likewise.
5069 (default_label_align_after_barrier_max_skip):
5070 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5071 (LABEL_TO_MAX_SKIP): Remove.
5072 (label_to_alignment): Return align_flags type instead of integer.
5073 (label_to_max_skip): Remove.
5074 (align_fuzz): Use align_flags type.
5075 (compute_alignments): Use align_flags type and use align_flags::max
5076 to combine multiple alignments.
5077 (grow_label_align): Grow vec instead of C array.
5078 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5079 (shorten_branches): Use align_flags type and use align_flags::max
5080 to combine multiple alignments.
5081 (final_scan_insn_1): Remove usage of secondary alignment that comes
5082 from label alignment, but instead use proper secondary alignment
5083 which is computed in grow_label_align.
5084 * flags.h (struct align_flags_tuple): Move to align.h.
5085 (struct align_flags): Likewise.
5086 (state_align_loops): Rename to align_loops.
5087 (state_align_jumps): Rename to align_jumps.
5088 (state_align_labels): Rename to align_labels.
5089 (state_align_functions): Rename to align_functions.
5090 (align_loops_log): Remove.
5091 (align_jumps_log): Remove.
5092 (align_labels_log): Remove.
5093 (align_functions_log): Remove.
5094 (align_loops_max_skip): Remove.
5095 (align_jumps_max_skip): Remove.
5096 (align_labels_max_skip): Remove.
5097 (align_functions_max_skip): Remove.
5098 (align_loops_value): Remove.
5099 (align_jumps_value): Remove.
5100 (align_labels_value): Remove.
5101 (align_functions_value): Remove.
5102 * output.h (label_to_alignment): Change return type to align_flags.
5103 (label_to_max_skip): Remove.
5104 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5105 jump_align_max_skip macros.
5106 * targhooks.h (default_loop_align_max_skip): Remove.
5107 (default_label_align_max_skip): Likewise.
5108 (default_jump_align_max_skip): Likewise.
5109 (default_label_align_after_barrier_max_skip): Remove.
5110 * toplev.c (read_log_maxskip): Use ::normalize function.
5111 (parse_N_M): Remove not used argument and also call ::normalize.
5112 (parse_alignment_opts): Do not pass unused arguments.
5113 * varasm.c (assemble_start_function): Use directly align_functions
5114 instead of removed macros.
5115 * system.h: Do not poison removed macros.
5117 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5120 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5121 and cond temporaries don't have reference type if iterator has
5122 pointer type. For init use &for_pre_body instead of pre_p if
5123 for_pre_body is non-empty.
5125 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5127 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5128 double-double modes to SFmode directly directly.
5129 (trunc<mode>sf2_fprs): Delete.
5131 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5133 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5134 for conversions between IFmode and the decimal floating point modes.
5135 (init_float128_ieee): Use the correct names for conversions between
5136 KFmode and the decimal floating point modes.
5138 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5140 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5141 for the conversions between TDmode and IFmode.
5142 (init_float128_ieee): Use more correct names for the conversions
5143 between TDmode and KFmode.
5145 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5147 PR tree-optimization/86526
5148 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5149 (inline_expand_builtin_string_cmp): Likewise.
5150 (inline_string_cmp): Likewise. Use c_readstr instead of
5151 builtin_memcpy_read_str. Add unit_mode temporary.
5153 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5156 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5157 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5159 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5161 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5162 Alphabetize prototypes of built-in functions, separating out
5163 built-in functions that are listed in this section but should be
5164 described elsewhere.
5166 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5169 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5170 conditional move when trapping comparison was split to a
5171 non-trapping one (and vice versa).
5173 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5175 * config/s390/s390.c (s390_function_profiler): Generate nops
5176 instead of profiler call sequences.
5177 * config/s390/s390.opt: Add the new option.
5179 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5181 * config/s390/s390.c (s390_function_profiler): Generate
5182 __mcount_loc section.
5183 * config/s390/s390.opt: Add the new option.
5185 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5187 * common.opt: Add the new warning.
5188 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5189 %r0,__fentry__" when -mfentry is specified.
5190 (s390_option_override_internal): Disallow -mfentry for 31-bit
5192 * config/s390/s390.opt: Add the new option.
5194 2018-07-16 Richard Biener <rguenther@suse.de>
5197 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5198 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5200 2018-07-16 Martin Liska <mliska@suse.cz>
5203 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5206 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5208 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5210 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5212 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5214 * config/arc/arc-cpus.def (hs4x): New cpu.
5216 * config/arc/arc-tables.opt: Regenerate.
5217 * config/arc/arc.c (arc_sched_issue_rate): New function.
5218 (TARGET_SCHED_ISSUE_RATE): Define.
5219 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5220 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5222 (attr tune): Add ARCHS4x tune values.
5223 (attr tune_dspmpy): Define.
5224 (*tst): Correct instruction type.
5225 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5226 * config/arc/arcHS4x.md: New file.
5227 * config/arc/fpu.md: Update instruction type attributes.
5228 * config/arc/t-multilib: Regenerate.
5230 2018-07-16 Tom de Vries <tdevries@suse.de>
5233 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5235 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5237 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5240 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5242 PR tree-optimization/86514
5243 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5244 conversion to a boolean type from a type with greater precision.
5246 2018-07-16 Tom de Vries <tdevries@suse.de>
5248 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5249 dump_flags request TDF_SLIM.
5251 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5253 * fold-const.c (int_const_binop_1): Abstract...
5254 (wide_int_binop): ...wide int code here.
5255 (poly_int_binop): ...poly int code here.
5256 Abstract the rest of int_const_binop_1 into int_const_binop.
5257 * fold-const.h (wide_int_binop): New.
5258 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5259 Remove useless PLUS/MINUS_EXPR case.
5260 (zero_nonzero_bits_from_vr): Move wide int code...
5261 (zero_nonzero_bits_from_bounds): ...here.
5262 (extract_range_from_binary_expr_1): Move mask optimization code...
5263 (range_easy_mask_min_max): ...here.
5264 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5265 (range_easy_mask_min_max): New.
5267 2018-07-15 Jeff Law <law@redhat.com>
5270 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5273 2018-07-14 Jim Wilson <jimw@sifive.com>
5275 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5277 2018-07-14 Paul Koning <ni1d@arrl.net>
5279 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5281 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5283 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5286 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5287 Steve Munroe <munroesj52@gmail.com>
5289 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5290 (_mm_andnot_si128): Likewise.
5291 (_mm_or_si128): Likewise.
5292 (_mm_xor_si128): Likewise.
5294 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5297 * builtins.c (expand_builtin_memcmp): Inline the calls first
5298 when result_eq is false.
5299 (expand_builtin_strcmp): Inline the calls first.
5300 (expand_builtin_strncmp): Likewise.
5301 (inline_string_cmp): New routine. Expand a string compare
5302 call by using a sequence of char comparison.
5303 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5304 a call to str(n)cmp/memcmp.
5305 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5307 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5309 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5311 * config/arm/driver-arm.c: Include arm-native.h.
5312 (host_detect_local_cpu): Use auto-generated data tables.
5313 (vendors, arm_cpu_table): Delete. Move part information to ...
5314 * config/arm/arm-cpus.in: ... here.
5315 * config/arm/parsecpu.awk (gen_native): New function.
5316 (vendor, part): New CPU fields.
5317 (END): Add support for building the native CPU detection tables.
5318 * config/arm/t-arm (arm-native.h): Add build rule.
5319 (driver-arm.o): Add dependency on arm-native.h.
5321 2018-07-13 Richard Biener <rguenther@suse.de>
5324 * match.pd (addr1 - addr2): Allow either of the operand to
5327 2018-07-13 Tom de Vries <tdevries@suse.de>
5329 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5332 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5334 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5335 arrays instead of numbered variables.
5337 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5339 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5340 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5342 2018-07-13 Richard Biener <rguenther@suse.de>
5345 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5346 instead of get_context_die.
5348 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5349 Richard Biener <rguenther@suse.de>
5352 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5353 that the loop latch destination where phi is defined.
5355 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5357 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5358 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5359 (riscv_set_current_function): Extract getting interrupt type to new
5361 (riscv_get_interrupt_type): New function.
5362 (riscv_merge_decl_attributes): New function, checking interrupt type is
5364 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5366 2018-07-12 Paul Koning <ni1d@arrl.net>
5368 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5371 2018-07-12 Paul Koning <ni1d@arrl.net>
5373 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5374 zero reference, add doloop_end instead.
5375 * doc/md.texi (decrement_and_branch_until_zero): Remove.
5376 (Looping patterns): Remove decrement_and_branch_until_zero. Add
5377 detail for doloop_end.
5379 2018-07-12 Martin Sebor <msebor@redhat.com>
5382 * attribs.c (decl_attributes): Reject conflicting attributes before
5383 calling attribute handlers.
5385 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5387 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5389 (gcc::dump_manager::get_dump_file_name): likewise.
5390 (dump_begin): Likewise.
5391 * dumpfile.h (dump_begin): Update prototype.
5392 (gcc::dump_manager::get_dump_file_name,
5393 gcc::dump_manager::get_dump_file_name): Update prototype.
5395 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5397 * internal-fn.h (vectorizable_internal_fn_p): New function.
5398 * tree-vect-slp.c (compatible_calls_p): Likewise.
5399 (vect_build_slp_tree_1): Remove nops argument. Handle calls
5400 to internal functions.
5401 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5403 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5405 * fold-const.h (inverse_conditions_p): Declare.
5406 * fold-const.c (inverse_conditions_p): New function.
5407 * match.pd: Use inverse_conditions_p. Add folds of view_converts
5408 that test the inverse condition of a conditional internal function.
5409 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5410 * internal-fn.c (internal_fn_mask_index): Handle conditional
5412 (vectorized_internal_fn_supported_p): New function.
5413 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5414 (any_pred_load_store): Replace with...
5415 (need_to_predicate): ...this new variable.
5416 (redundant_ssa_names): New variable.
5417 (ifcvt_can_use_mask_load_store): Move initial checks to...
5418 (ifcvt_can_predicate): ...this new function. Handle tree codes
5419 for which a conditional internal function exists.
5420 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5421 instead of ifcvt_can_use_mask_load_store. Update after variable
5423 (predicate_load_or_store): New function, split out from
5424 predicate_mem_writes.
5425 (check_redundant_cond_expr): New function.
5426 (value_available_p): Likewise.
5427 (predicate_rhs_code): Likewise.
5428 (predicate_mem_writes): Rename to...
5429 (predicate_statements): ...this. Use predicate_load_or_store
5430 and predicate_rhs_code.
5431 (combine_blocks, tree_if_conversion): Update after above name changes.
5432 (ifcvt_local_dce): Handle redundant_ssa_names.
5433 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5434 general conditional functions.
5435 * tree-vect-stmts.c (vectorizable_call): Likewise.
5437 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5438 Alan Hayward <alan.hayward@arm.com>
5439 David Sherwood <david.sherwood@arm.com>
5441 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5442 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5443 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5444 plus and minus and convert them into IFN_COND_FMA-based sequences.
5445 (convert_mult_to_fma): Handle conditional plus and minus.
5447 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5449 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5450 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5451 (cond_fnms_optab): New optabs.
5452 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5454 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5455 * internal-fn.h (get_conditional_internal_fn): Declare.
5456 (get_unconditional_internal_fn): Likewise.
5457 * internal-fn.c (cond_ternary_direct): New macro.
5458 (expand_cond_ternary_optab_fn): Likewise.
5459 (direct_cond_ternary_optab_supported_p): Likewise.
5460 (FOR_EACH_COND_FN_PAIR): Likewise.
5461 (get_conditional_internal_fn): New function.
5462 (get_unconditional_internal_fn): Likewise.
5463 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5464 (gimple_match_op::gimple_match_op): Add a new overload for 5
5466 (gimple_match_op::set_op): Likewise.
5467 (gimple_resimplify5): Declare.
5468 * genmatch.c (decision_tree::gen): Generate simplifications for
5470 * gimple-match-head.c (gimple_simplify): Define an overload for
5471 5 operands. Handle calls with 5 arguments in the top-level overload.
5472 (convert_conditional_op): Handle conversions from unconditional
5473 internal functions to conditional ones.
5474 (gimple_resimplify5): New function.
5475 (build_call_internal): Pass a fifth operand.
5476 (maybe_push_res_to_seq): Likewise.
5477 (try_conditional_simplification): Try converting conditional
5478 internal functions to unconditional internal functions.
5479 Handle 3-operand unconditional forms.
5480 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5481 Define ternary equivalents of the current rules for binary conditional
5483 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5485 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5486 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5487 (optab): Handle them.
5488 (SVE_COND_FP_TERNARY): New int iterator.
5489 (sve_fmla_op, sve_fmad_op): New int attributes.
5490 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5491 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5492 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5494 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5496 * target.def (preferred_else_value): New target hook.
5497 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5498 * doc/tm.texi: Regenerate.
5499 * targhooks.h (default_preferred_else_value): Declare.
5500 * targhooks.c (default_preferred_else_value): New function.
5501 * internal-fn.h (conditional_internal_fn_code): Declare.
5502 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5503 (get_conditional_internal_fn): Use it.
5504 (conditional_internal_fn_code): New function.
5505 * gimple-match.h (gimple_match_cond): New struct.
5506 (gimple_match_op): Add a cond member function.
5507 (gimple_match_op::gimple_match_op): Update all forms to take a
5509 * genmatch.c (expr::gen_transform): Use the same condition as res_op
5510 for the suboperation, but don't specify a particular else_value.
5511 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5512 (visit_nary_op, visit_reference_op_load): Pass
5513 gimple_match_cond::UNCOND to the gimple_match_op constructor.
5514 * gimple-match-head.c: Include tree-eh.h
5515 (convert_conditional_op): New function.
5516 (maybe_resimplify_conditional_op): Likewise.
5517 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5518 (gimple_resimplify2): Likewise.
5519 (gimple_resimplify3): Likewise.
5520 (gimple_resimplify4): Likewise.
5521 (maybe_push_res_to_seq): Return null for conditional operations.
5522 (try_conditional_simplification): New function.
5523 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
5525 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5527 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5529 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5531 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5533 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5535 (hash_tree): Do not hash DECL_FCONTEXT
5536 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5537 Do not stream DECL_FCONTEXT.
5538 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5539 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5541 2018-07-12 Richard Biener <rguenther@suse.de>
5544 * dwarf2out.c (gen_block_die): Only output blocks when they have
5545 at least one !DECL_IGNORED_P variable.
5547 2018-07-12 Richard Biener <rguenther@suse.de>
5550 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5551 Remove -mieee-fp handling.
5553 2018-07-12 Richard Biener <rguenther@suse.de>
5555 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5556 left-over from last patch.
5558 2018-07-12 Jakub Jelinek <jakub@redhat.com>
5560 PR tree-optimization/86492
5561 * gimple-ssa-store-merging.c
5562 (imm_store_chain_info::coalesce_immediate_stores): Call
5563 check_no_overlap even for the merge_overlapping case. Formatting fix.
5565 2018-07-12 Richard Biener <rguenther@suse.de>
5568 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5569 move possibly trapping operations into the conditional.
5571 2018-07-12 Richard Biener <rguenther@suse.de>
5573 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5574 (vn_lookup_simplify_result): Remove recursion limit applied
5576 (vn_nary_build_or_lookup_1): Adjust.
5577 (try_to_simplify): Likewise.
5578 * gimple-match-head.c (gimple_resimplify1): Instead apply one
5580 (gimple_resimplify2): Likewise.
5581 (gimple_resimplify3): Likewise.
5582 (gimple_resimplify4): Likewise.
5584 2018-07-11 Jakub Jelinek <jakub@redhat.com>
5586 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5587 Use __mmask64 type instead of __mmask8 for __M argument.
5588 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5589 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5591 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5592 __mmask16 for __M argument.
5593 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5594 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5595 to __mmask16 instead of __mmask8.
5596 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5597 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5598 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5599 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5600 instead of __mmask16 for __U argument.
5601 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5602 __mmask16 instead of __mmask8 for __U argument.
5603 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5605 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5607 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5609 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5611 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5613 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5615 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5617 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5619 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5621 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5623 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5624 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5625 return type as well as __M argument type and all casts from __mmask8
5627 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5628 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5629 return type as well as __M argument type and all casts from __mmask8
5631 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5632 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5633 return type as well as __M argument type and all casts from __mmask8
5635 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5636 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5637 return type as well as __M argument type and all casts from __mmask8
5639 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5640 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5643 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
5645 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5646 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5649 2018-07-11 Paul Koning <ni1d@arrl.net>
5651 * doc/md.texi (define_subst): Document how multiple occurrences of
5652 the same argument in the replacement pattern are handled.
5654 2018-07-11 Paul Koning <ni1d@arrl.net>
5656 * doc/extend.texi (Common Variable Attributes): Move "mode" into
5658 (Common Type Attributes): Add "mode" attribute.
5660 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
5662 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5663 stream DECL_ORIGINAL_TYPE.
5664 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5665 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5666 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5667 Do not walk original type.
5668 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5670 (write_ts_decl_non_common_tree_pointers): Do not stream
5672 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5673 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5675 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5677 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5678 thread twice from the same starting edge.
5680 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
5682 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5683 * gimple.c (gimple_call_nonnull_result_p): ...here...
5684 (gimple_call_nonnull_arg): ...and here.
5685 * gimple.h (gimple_call_nonnull_result_p): New.
5686 (gimple_call_nonnull_arg): New.
5688 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
5690 * config/arm/arm-cpus.in: Move information from fpu field of each
5691 cpu definition to the isa field.
5692 * config/arm/parsecpu.awk (fpu): Delete match rule.
5693 (gen_comm_data): Don't add bits from the CPU's FPU entry.
5695 2018-07-11 Richard Biener <rguenther@suse.de>
5698 * dwarf2out.c (init_sections_and_labels): Use
5699 output_asm_line_debug_info consistently.
5700 (dwarf2out_early_finish): Likewise.
5701 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5704 2018-07-11 Richard Biener <rguenther@suse.de>
5706 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5707 Rework father_bb setting in a way to avoid propagating constants
5708 multiple times on a loop body.
5710 2018-07-10 Mark Wielaard <mark@klomp.org>
5713 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5715 2018-07-10 Richard Biener <rguenther@suse.de>
5717 * hash-map.h (hash_map::iterator::operator*): Return
5718 references to key and value.
5720 2018-07-10 Jakub Jelinek <jakub@redhat.com>
5723 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5724 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5725 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5726 (gimplify_omp_for): For composite loops, move outer
5727 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5728 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
5729 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
5730 TREE_LIST for both the original class iterator and the "last" helper
5731 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
5732 loop, remember has_decl_expr from outer composite loops for the
5733 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5735 2018-07-09 Martin Sebor <msebor@redhat.com>
5739 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5740 accessing implicitly initialized array elements.
5741 * expr.c (string_constant): Handle string initializers of
5742 character arrays within aggregates.
5743 * gimple-fold.c (fold_array_ctor_reference): Add argument.
5744 Store element offset. As a special case, handle zero size.
5745 (fold_nonarray_ctor_reference): Same.
5746 (fold_ctor_reference): Add argument. Store subobject offset.
5747 * gimple-fold.h (fold_ctor_reference): Add argument.
5749 2018-07-09 Paul Koning <ni1d@arrl.net>
5751 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5752 (pdp11_insn_cost): New function.
5753 (pdp11_md_asm_adjust): New function.
5754 (TARGET_INVALID_WITHIN_DOLOOP): Define.
5755 (pdp11_rtx_costs): Update to match machine better.
5756 (output_addr_const_pdp11): Correct format mismatch warnings.
5757 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5758 * config/pdp11/pdp11.md: General change to add base_cost and/or
5759 length attributes for use by new pdp11_insn_cost function.
5760 (MIN_BRANCH): Correct definition.
5762 (doloop_end): Use standard pattern name for looping pattern.
5763 (doloop_end_nocc): New.
5764 (movsf): Add another constraint alternative.
5765 (zero_extendqihi2): Add constraint alternatives for not in place
5767 (zero_extendhisi2): Remove.
5768 (shift patterns): Add CC handling variants.
5772 (define_peephole2): New peephole to recognize mov that sets CC for
5775 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5777 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5778 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5781 2018-07-09 Jakub Jelinek <jakub@redhat.com>
5784 * real.c (real_nextafter): Return true if result is denormal.
5786 2018-07-09 Martin Liska <mliska@suse.cz>
5788 * common.opt: Add back wrongly removed attribute.
5790 2018-07-09 Richard Biener <rguenther@suse.de>
5793 * dwarf2out.c (gen_block_die): For an early generated DIE
5794 always output high/low PC attributes.
5796 2018-07-09 Tom de Vries <tdevries@suse.de>
5798 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5799 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5800 onto VAR_DECL with abstract origin.
5802 2018-07-07 Jim Wilson <jimw@sifive.com>
5804 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5806 2018-07-07 Tom de Vries <tdevries@suse.de>
5808 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5810 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
5812 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5814 (combine_bound): Use wide-int overflow calculation instead of
5816 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5818 * fold-const.c (int_const_binop_2): Same.
5819 (extract_muldiv_1): Same.
5820 (fold_div_compare): Same.
5821 (fold_abs_const): Same.
5823 * poly-int.h (add): Same.
5827 * predict.c (predict_iv_comparison): Same.
5828 * profile-count.c (slow_safe_scale_64bit): Same.
5829 * simplify-rtx.c (simplify_const_binary_operation): Same.
5830 * tree-chrec.c (tree_fold_binomial): Same.
5831 * tree-data-ref.c (split_constant_offset_1): Same.
5832 * tree-if-conv.c (idx_within_array_bound): Same.
5833 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
5834 * tree-ssa-phiopt.c (minmax_replacement): Same.
5835 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
5836 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
5837 * vr-values.c (vr_values::adjust_range_with_scev): Same.
5838 * wide-int.cc (wi::add_large): Same.
5839 (wi::mul_internal): Same.
5840 (wi::sub_large): Same.
5841 (wi::divmod_internal): Same.
5842 * wide-int.h: Change overflow type to overflow_type for neg, add,
5843 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
5844 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
5845 mul_internal, divmod_internal.
5846 (overflow_type): New enum.
5847 (accumulate_overflow): New.
5849 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5851 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5852 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5854 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5856 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5857 argument is checked for zero before entering loop, avoid checking again.
5859 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
5861 * gimplify.h (generic_expr_could_trap_p): Set as global function.
5862 * gimplify.h (generic_expr_could_trap_p): Likwise.
5863 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5865 2018-07-06 Jakub Jelinek <jakub@redhat.com>
5867 PR tree-optimization/86401
5868 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5869 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5870 (fold_bit_and_mask): ... here. New helper function for match.pd.
5871 * fold-const.h (fold_bit_and_mask): Declare.
5872 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5874 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
5877 * target.def (translate_mode_attribute): New hook.
5878 * targhooks.h (default_translate_mode_attribute): Declare.
5879 * targhooks.c (default_translate_mode_attribute): New function.
5880 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5881 * doc/tm.texi: Regenerate.
5882 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5883 (rs6000_translate_mode_attribute): New function.
5885 2018-07-06 Paul Koning <ni1d@arrl.net>
5887 * doc/md.texi (define_split): Document DONE and FAIL.
5888 (define_peephole2): Ditto.
5890 2018-07-05 Jeff Law <law@redhat.com>
5892 PR tree-optimization/86010
5893 * tree-ssa-dse.c (compute_trims): More aggressively trim at
5894 both the head and tail of mem* and str* calls.
5896 2018-07-05 Jim Wilson <jimw@sifive.com>
5898 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5900 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
5902 * config/aarch64/aarch64-simd.md: correct flags text for
5903 MIN_EXPR replacement.
5905 2018-07-05 James Clarke <jrtc27@jrtc27.com>
5907 * configure: Regenerated.
5909 2018-07-05 Carl Love <cel@us.ibm.com>
5911 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
5912 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
5913 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
5914 VSX_BUILTIN_DOUBLEL_V4SF.
5916 2018-07-05 Martin Sebor <msebor@redhat.com>
5919 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
5920 than its domain to compute its the upper bound of a char array.
5922 2018-07-05 Nathan Sidwell <nathan@acm.org>
5924 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
5925 * doc/cpp.texi: Update comment.
5926 * doc/tm.texi: Rebuilt.
5927 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
5928 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
5929 * doc/extend.texi (Backwards Compatibility): Clarify it is system
5930 headers affected by extern "C".
5931 * system.h: Poison NO_IMPLICIT_EXTERN_C.
5932 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
5933 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
5934 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
5935 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
5936 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
5937 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
5938 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
5939 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
5940 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
5941 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
5942 config/sparc/sp64-elf.h, config/spu/spu.h,
5943 config/stormy16/stormy16.h, config/v850/v850.h,
5944 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
5945 define NO_IMPLICIT_EXTERN_C.
5946 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
5948 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5951 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5952 instead of GET_MODE_SIZE when comparing Units.
5954 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5957 * rtlanal.c (set_noop_p): Constrain on mode change,
5958 include hard-reg-set.h
5960 2018-07-05 Tamar Christina <tamar.christina@arm.com>
5962 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
5964 2018-07-05 Jakub Jelinek <jakub@redhat.com>
5967 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5970 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5972 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5974 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
5977 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5979 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5981 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
5984 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
5986 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
5988 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
5989 neg_*_op* variables.
5991 2018-07-04 Martin Liska <mliska@suse.cz>
5993 * tree-switch-conversion.c: Define
5994 max_ratio_for_speed and max_ratio_for_size constants.
5996 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5997 Martin Liska <mliska@suse.cz>
6002 * common.opt: Rename align options with 'str_' prefix.
6003 * common/config/i386/i386-common.c (set_malign_value): New
6005 (ix86_handle_option): Use it to set -falign-* options/
6006 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6007 type from int to string.
6008 * config/aarch64/aarch64.c: Update default values from int
6010 * config/alpha/alpha.c (alpha_override_options_after_change):
6012 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6013 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6014 max skip conditionally.
6015 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6016 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6017 max skip conditionally.
6018 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6019 max skip conditionally.
6020 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6021 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6022 max skip conditionally.
6023 * config/i386/i386.c (struct ptt): Change type from int to
6025 (ix86_default_align): Set default values.
6026 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6027 max skip conditionally.
6028 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6029 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6030 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6031 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6032 max skip conditionally.
6033 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6034 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6035 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6036 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6037 max skip conditionally.
6038 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6039 * config/ia64/ia64.c (ia64_option_override): Set default values
6040 for alignment options.
6041 * config/m68k/m68k.c: Handle new str_align_* options.
6042 * config/mips/mips.c (mips_set_compression_mode): Change
6044 (mips_option_override): Set default values for options.
6045 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6047 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6049 * config/rx/rx.c (rx_option_override): Likewise.
6050 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6051 (LABEL_ALIGN): Use align_labels_log.
6052 (LOOP_ALIGN): Use align_loops_align.
6053 * config/s390/s390.c (s390_asm_output_function_label): Use new
6055 * config/sh/sh.c (sh_override_options_after_change):
6056 Change type of constants.
6057 * config/spu/spu.c (spu_sched_init): Likewise.
6058 * config/sparc/sparc.c (sparc_option_override): Set default
6060 * config/visium/visium.c (visium_option_override): Likewise.
6061 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6062 emit p2align format with last argument if it's not needed.
6063 * doc/invoke.texi: Document extended format of -falign-*.
6064 * final.c: Use align_labels alignment.
6065 * flags.h (struct target_flag_state): Change type to use
6067 (struct align_flags_tuple): New.
6068 (struct align_flags): Likewise.
6069 (align_loops_log): Redefine macro to use new types.
6070 (align_loops_max_skip): Redefine macro to use new types.
6071 (align_jumps_log): Redefine macro to use new types.
6072 (align_jumps_max_skip): Redefine macro to use new types.
6073 (align_labels_log): Redefine macro to use new types.
6074 (align_labels_max_skip): Redefine macro to use new types.
6075 (align_functions_log): Redefine macro to use new types.
6076 (align_loops): Redefine macro to use new types.
6077 (align_jumps): Redefine macro to use new types.
6078 (align_labels): Redefine macro to use new types.
6079 (align_functions): Redefine macro to use new types.
6080 (align_functions_max_skip): Redefine macro to use new types.
6081 (align_loops_value): New macro.
6082 (align_jumps_value): New macro.
6083 (align_labels_value): New macro.
6084 (align_functions_value): New macro.
6085 * function.c (invoke_set_current_function_hook): Propagate
6086 alignment values from flags to global variables default in
6088 * ipa-icf.c (sem_function::equals_wpa): Use
6089 cl_optimization_option_eq instead of memcmp.
6090 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6092 (cl_optimization_stream_in): Likewise.
6093 * optc-save-gen.awk: Support strings in cl_optimization.
6094 * opth-gen.awk: Likewise.
6095 * opts.c (finish_options): Remove error checking of invalid
6097 (MAX_CODE_ALIGN): Remove.
6098 (MAX_CODE_ALIGN_VALUE): Likewise.
6099 (parse_and_check_align_values): New function.
6100 (check_alignment_argument): Likewise.
6101 (common_handle_option): Use check_alignment_argument.
6102 * opts.h (parse_and_check_align_values): Declare.
6103 * toplev.c (init_alignments): Remove.
6104 (read_log_maxskip): New.
6105 (parse_N_M): Likewise.
6106 (parse_alignment_opts): Likewise.
6107 (backend_init_target): Remove usage of init_alignments.
6108 * toplev.h (parse_alignment_opts): Declare.
6109 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6111 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6112 * tree.c (cl_option_hasher::equal): New.
6113 * varasm.c: Use new global macros.
6115 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6117 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6118 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6119 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6120 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6121 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6122 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6123 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6124 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6125 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6126 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6127 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6128 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6129 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6131 2018-07-04 Martin Liska <mliska@suse.cz>
6132 Jonathan Wakely <jwakely@redhat.com>
6134 * coverage.c: Use correct type.
6135 * doc/invoke.texi: Language correction.
6137 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6140 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6141 ENDBRANCH for non-tail call which may return via indirect branch.
6142 * doc/extend.texi: Document indirect_return attribute.
6144 2018-07-03 Martin Sebor <msebor@redhat.com>
6146 PR tree-optimization/86274
6147 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6149 (format_floating): Correct handling of infinities and NaNs.
6151 2018-07-03 Martin Sebor <msebor@redhat.com>
6153 * print-tree.c (print_real_cst): New function.
6154 (print_node_brief): Call it.
6155 (print_node): Ditto.
6157 2018-07-03 Jeff Law <law@redhat.com>
6159 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6160 into a single pattern.
6162 * config/h8300/h8300.md (ors code_iterator): New.
6163 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6164 a single pattern and single splitter.
6165 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6166 (iorqi3_1, xorqi3_1): Likewise.
6167 (iorqi3, xorqi3 expanders): Similarly.
6169 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6170 (movmd_internal) into a single pattern using the P mode iterator.
6171 (movmd splitters): Similarly.
6172 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6173 (movsd splitters): Similarly.
6175 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6176 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6177 right table based on the size of the operand.
6178 * config/h8300/h8300.md (length_table): Corresponding changes. All
6179 references to "addb", "addw" and "addl" changed to "add".
6180 (btst patterns): Merge two variants into a single pattern.
6181 (tstqi, tsthi): Likewise.
6182 (addhi3_incdec, addsi3_incdec): Likewise.
6183 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6184 (mulhi3, mulsi3): Likewise.
6185 (udivhi3, udivsi3): Likewise.
6186 (divhi3, divsi3): Likewise.
6187 (andorqi3, andorhi3, andorsi3): Likewise.
6189 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6192 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6193 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6195 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6197 PR tree-optimization/85694
6198 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6199 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6201 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6202 (<u>avg<mode>3_ceil): New patterns.
6204 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6206 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6207 scan-tree-dump directive.
6208 * gcc.dg/vect/slp-perm-2.c: Likewise.
6209 * gcc.dg/vect/slp-perm-3.c: Likewise.
6210 * gcc.dg/vect/slp-perm-5.c: Likewise.
6211 * gcc.dg/vect/slp-perm-6.c: Likewise.
6212 * gcc.dg/vect/slp-perm-7.c: Likewise.
6213 * gcc.dg/vect/slp-perm-8.c: Likewise.
6215 2018-07-03 Marek Polacek <polacek@redhat.com>
6218 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6220 2018-07-03 Richard Biener <rguenther@suse.de>
6223 * tree-ssa-structalias.c (find_func_clobbers): Properly
6224 handle indirect calls.
6226 2018-07-03 Jeff Law <law@redhat.com>
6228 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6229 (shifts): New code iterator.
6230 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6231 expander. Fix HImode handling on H8/SX.
6232 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6233 (subqi3, subhi3, subsi3 expanders): Likewise.
6234 (andqi3, andhi3, andsi3 expanders): Likewise.
6235 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6236 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6237 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6238 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6239 (zero_extendqihi2, zero_extendqisi2): Likewise.
6240 (extendqihi2, extendqisi2): Likewise.
6241 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6242 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6243 (rotlqi3_1, rotlhi3_1): Likewise.
6244 (logicalhi3_sn, logicalsi3_sn): Likewise.
6245 (logicalhi3, logicalsi3): Likewise.
6247 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6249 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6250 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6251 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6252 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6253 type to append_pattern_def_seq instead of creating a stmt_vec_info
6255 (build_mask_conversion): Likewise. Remove vinfo argument.
6256 (vect_add_conversion_to_patterm): Likewise, renaming to...
6257 (vect_add_conversion_to_pattern): ...this.
6258 (vect_recog_mask_conversion_pattern): Update call to
6259 build_mask_conversion. Pass the vector type to
6260 append_pattern_def_seq here too.
6261 (vect_recog_gather_scatter_pattern): Update call to
6262 vect_add_conversion_to_pattern.
6264 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6266 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6267 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6268 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6269 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6270 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6271 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6272 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6273 append_pattern_def_seq instead of new_pattern_def_seq.
6274 (vect_recog_divmod_pattern): Do both of the above.
6275 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6278 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6280 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6281 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6282 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6283 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6284 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6285 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6286 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6287 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6288 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6289 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6290 parameter with a single stmt_vec_info.
6291 (vect_recog_func_ptr): Likewise.
6292 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6293 (vect_try_gather_scatter_pattern): ...this.
6294 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6295 the stmt_vec_info of the statement to be matched. Don't clear
6296 STMT_VINFO_RELATED_STMT.
6297 (vect_pattern_recog): Update call accordingly.
6299 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6301 PR tree-optimization/85694
6302 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6303 (uavgM3_ceil): Document new optabs.
6304 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6305 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6307 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6308 (savg_ceil_optab): New optabs.
6309 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6310 (vect_vect_recog_func_ptrs): Add it.
6311 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6312 constant directly from the associated lhs.
6314 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6316 * tree-vect-patterns.c (vect_split_statement): New function.
6317 (vect_convert_input): Use it to try to split an existing cast.
6319 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6321 * poly-int.h (print_hex): New function.
6322 * dumpfile.h (dump_dec, dump_hex): Declare.
6323 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6324 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6325 min_input_precision, operation_precision and operation_sign.
6326 * tree-vect-patterns.c (vect_get_range_info): New function.
6327 (vect_same_loop_or_bb_p, vect_single_imm_use)
6328 (vect_operation_fits_smaller_type): Delete.
6329 (vect_look_through_possible_promotion): Add an optional
6330 single_use_p parameter.
6331 (vect_recog_over_widening_pattern): Rewrite to use new
6332 stmt_vec_info infomration. Handle one operation at a time.
6333 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6334 (vect_truncatable_operation_p, vect_set_operation_type)
6335 (vect_set_min_input_precision): New functions.
6336 (vect_determine_min_output_precision_1): Likewise.
6337 (vect_determine_min_output_precision): Likewise.
6338 (vect_determine_precisions_from_range): Likewise.
6339 (vect_determine_precisions_from_users): Likewise.
6340 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6341 (vect_vect_recog_func_ptrs): Put over_widening first.
6343 (vect_pattern_recog): Call vect_determine_precisions.
6345 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6347 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6348 statements that have been replaced by further pattern statements.
6349 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6351 2018-07-03 Richard Biener <rguenther@suse.de>
6353 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6354 always set *dt. Dump vectype in vectype overload.
6355 * dumpfile.h (dump_gimple_expr): New function.
6356 (dump_gimple_expr_loc): Likewise.
6357 * dumpfile.c (dump_gimple_expr): New function.
6358 (dump_gimple_expr_loc): Likewise.
6360 2018-07-02 Jeff Law <law@redhat.com>
6362 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6363 the H8/300, H8/300H and H8/S variants into a single pattern.
6364 (movhi_h8300, movqi_h8300hs): Similarly.
6365 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6366 (QHI mode iterator): New.
6368 * config/h8300/h8300.md: Remove trailing whitespace.
6370 2018-07-02 Jim Wilson <jimw@sifive.com>
6372 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6373 instead of emit_insn for interrupt returns.
6374 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6375 (riscv_sret, riscv_uret): Likewise.
6377 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6379 * pretty-print.c (selftest::test_pp_format): Move save and restore
6380 of quotes to class auto_fix_quotes, and add an instance.
6381 * selftest.c: Include "intl.h".
6382 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6383 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6384 * selftest.h (selftest::auto_fix_quotes): New class.
6386 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
6388 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6389 (aarch64_sve_prepare_conditional_op): Remove.
6390 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6391 Allow aarch64_simd_reg_or_zero as select operand; remove
6392 the aarch64_sve_prepare_conditional_op call.
6393 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6394 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6395 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6396 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6397 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6398 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6399 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6400 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6401 and a splitters to match all of the *_any patterns.
6402 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6404 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6405 (SVE_COND_FP_BINARY_REV): Remove.
6406 (sve_int_op_rev, sve_fp_op_rev): New.
6407 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6408 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6409 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6410 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6411 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6412 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6413 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6414 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6415 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6417 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6418 Remove match_dup 1 from the inner unspec.
6419 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6421 * config/aarch64/aarch64.md (movprfx): New attr.
6422 (length): Default movprfx to 8.
6423 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6424 (*madd<SVE_I>, *msub<SVE_I): Likewise.
6425 (*<su>mul<SVE_I>3_highpart): Likewise.
6426 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6427 (*v<ASHIFT><SVE_I>3): Likewise.
6428 (*<su><MAXMIN><SVE_I>3): Likewise.
6429 (*<su><MAXMIN><SVE_F>3): Likewise.
6430 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6431 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6432 (*div<SVE_F>4): Likewise.
6434 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
6436 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6439 2018-07-02 Richard Biener <rguenther@suse.de>
6441 PR tree-optimization/86363
6442 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6443 memset argument refers to a non-variable address.
6445 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6447 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6448 {PLUS,MINUS}_EXPR code to...
6449 (adjust_symbolic_bound): ...here,
6450 (combine_bound): ...here,
6451 (set_value_range_with_overflow): ...and here.
6453 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6455 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6457 (extract_range_from_abs_expr): ...here.
6459 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
6461 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6462 -fno-omit-frame-pointer when not optimizing.
6464 2018-07-02 Martin Liska <mliska@suse.cz>
6467 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6468 (propagate_nothrow): Likewise.
6470 2018-07-02 Martin Liska <mliska@suse.cz>
6473 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6475 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6477 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6478 function in r262149, changing "loc" param from source_location to
6479 const dump_location_t &.
6480 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6481 declaration, as above.
6483 2018-07-01 Paul Koning <ni1d@arrl.net>
6485 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6486 -munit-asm, -mgnu-asm, -mdec-asm.
6487 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6488 (pdp11_output_labelref): New.
6489 (pdp11_output_def): New.
6490 (pdp11_output_addr_vec_elt): New.
6491 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
6492 %# and %@ format codes.
6493 (pdp11_option_override): New.
6494 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6495 (pdp11_output_ident): New.
6496 (pdp11_asm_named_section): New.
6497 (pdp11_asm_init_sections): New.
6498 (pdp11_file_start): New.
6499 (pdp11_file_end): New.
6500 (output_ascii): Use .ascii/.asciz for -mdec-asm.
6501 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
6502 %o, like %c but octal.
6503 (pdp11_option_override): New.
6504 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6506 (DATA_SECTION_ASM_OP): Ditto.
6507 (READONLY_DATA_SECTION_ASM_OP): New.
6508 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6509 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6510 (ASM_OUTPUT_LABELREF): Ditto.
6511 (ASM_OUTPUT_DEF): Ditto.
6512 (ASM_OUTPUT_EXTERNAL): New.
6513 (ASM_OUTPUT_SOURCE_FILENAME): New.
6514 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6515 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6516 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
6517 %# and %@ format codes.
6518 * config/pdp11/pdp11.opt (mgnu-asm): New.
6519 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6520 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6521 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6523 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
6525 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6526 dereferencing path[] beyond its length.
6528 (debug_all_paths): New.
6529 (rewire_first_differing_edge): New.
6530 (adjust_paths_after_duplication): New.
6531 (duplicate_thread_path): Call adjust_paths_after_duplication.
6533 (thread_through_all_blocks): Add new argument to
6534 duplicate_thread_path.
6536 2018-06-30 Jim Wilson <jimw@sifive.com>
6538 * config/riscv/predicates.md (p2m1_shift_operand): New.
6539 (high_mask_shift_operand): New.
6540 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6541 pattern using p2m1_shift_operand.
6542 (lshsi3_zero_extend_3+2): New combiner pattern using
6543 high_mask_shift_operand.
6545 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6547 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6549 (vect_recog_rotate_pattern): ...here.
6550 (vect_convert_input): Try to insert casts of invariants in the
6552 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6553 preheader to be empty.
6555 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6557 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6558 vector type. If given, install it in the new statement's
6560 (vect_element_precision): New function.
6561 (vect_unpromoted_value): New struct.
6562 (vect_unpromoted_value::vect_unpromoted_value): New function.
6563 (vect_unpromoted_value::set_op): Likewise.
6564 (vect_look_through_possible_promotion): Likewise.
6565 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6566 (vect_widened_op_tree, vect_convert_input): Likewise.
6567 (vect_convert_inputs, vect_convert_output): Likewise.
6568 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6569 to handle the optional cast of the multiplication result and
6570 vect_widened_op_tree to detect the widened multiplication itself.
6571 Do not require the input and output of promotion casts to have
6572 the same sign, but base the signedness of the operation on the
6573 input rather than the result. If the pattern includes two
6574 promotions, check that those promotions have the same sign.
6575 Do not restrict the MULT_EXPR handling to a double-width result;
6576 handle quadruple-width results and wider. Use vect_convert_inputs
6577 to convert the inputs to the common type.
6578 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
6579 to handle the optional cast of the ABS result. Also allow a sign
6580 change or a sign extension between the ABS and MINUS.
6581 Use vect_widened_op_tree to detect the widened subtraction and use
6582 vect_convert_inputs to convert the inputs to the common type.
6583 (vect_handle_widen_op_by_const): Delete.
6584 (vect_recog_widen_op_pattern): New function.
6585 (vect_recog_widen_mult_pattern): Use it.
6586 (vect_recog_widen_shift_pattern): Likewise.
6587 (vect_recog_widen_sum_pattern): Use
6588 vect_look_through_possible_promotion to handle the promoted
6591 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6593 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6594 the containing gimple_seq *.
6595 * gimple-iterator.h (gsi_for_stmt): Declare it.
6596 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6597 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6598 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6599 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6600 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6602 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6604 (vect_mark_pattern_stmts): ...here. Handle cases in which the
6605 statement being replaced is part of an existing pattern
6606 definition sequence, inserting the new pattern statements before
6608 (vect_pattern_recog_1): Don't return a bool. If the statement
6609 is already part of a pattern, instead apply pattern matching
6610 to the pattern definition statements. Don't clear the
6611 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6612 (vect_pattern_recog): Don't break after the first match;
6613 continue processing the pattern definition statements instead.
6614 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6616 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6618 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6619 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6620 (vect_recog_widen_sum_pattern): Use it.
6622 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6624 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6625 phi is not a pattern statement and has not been replaced by
6626 a pattern statement.
6627 * tree-vect-patterns.c (type_conversion_p): Don't check
6628 STMT_VINFO_IN_PATTERN_P.
6629 (vect_recog_vector_vector_shift_pattern): Likewise.
6630 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6631 the pattern statement rather than the original statement; check
6632 directly for a WIDEN_MULT_EXPR here.
6633 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6634 vect_is_simple_use to return the pattern statement rather
6635 than the original statement; use is_pattern_stmt_p to check
6636 for such a pattern statement.
6637 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6638 to return the pattern statement rather than the original statement;
6639 don't do the same transformation here.
6640 (vect_is_simple_use): If the defining statement has been replaced
6641 by a pattern statement, return the pattern statement instead.
6642 Remove the corresponding (local) transformation from the vectype
6645 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
6647 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6648 end and default to null.
6649 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6650 (vectorizable_reduction): Update calls accordingly, dropping the
6651 gimple ** argument if the passed-back statement isn't needed.
6652 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6653 (vect_recog_rotate_pattern): Likewise.
6654 (vect_recog_mask_conversion_pattern): Likewise.
6655 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6656 (vect_mask_constant_operand_p): Likewise.
6657 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6658 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6659 (get_group_load_store_type, get_load_store_type): Likewise.
6660 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6661 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6662 (vectorizable_conversion, vectorizable_assignment): Likewise.
6663 (vectorizable_shift, vectorizable_operation): Likewise.
6664 (vectorizable_store, vect_is_simple_cond): Likewise.
6665 (vectorizable_condition, vectorizable_comparison): Likewise.
6666 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6667 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6668 and move it to the end. Cope with null def_stmt_outs.
6670 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6672 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6674 2018-06-29 Jeff Law <law@redhat.com>
6676 * config/v850/v850.c (v850_legitimate_address_p): Handle large
6677 displacements for TARGET_V850E2V3 and newer.
6678 (TARGET_LRA_P): Remove. Defaults to LRA now.
6679 * config/v850/v850.md (sign23byte_load): Remove.
6680 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6681 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6683 2018-06-29 Martin Liska <mliska@suse.cz>
6686 * coverage.c (coverage_init): Mangle full path name.
6687 * doc/invoke.texi: Document the change.
6688 * gcov-io.c (mangle_path): New.
6689 * gcov-io.h (mangle_path): Likewise.
6690 * gcov.c (mangle_name): Use mangle_path for path mangling.
6692 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6694 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6695 if starting source register is not even.
6697 2018-06-29 Martin Liska <mliska@suse.cz>
6699 PR tree-optimization/86263
6700 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6701 Make edge redirection.
6703 2018-06-29 David Malcolm <dmalcolm@redhat.com>
6705 * dumpfile.c (dump_loc): Add indentation based on scope depth.
6706 (dump_scope_depth): New variable.
6707 (get_dump_scope_depth): New function.
6708 (dump_begin_scope): New function.
6709 (dump_end_scope): New function.
6710 * dumpfile.h (get_dump_scope_depth): New declaration.
6711 (dump_begin_scope): New declaration.
6712 (dump_end_scope): New declaration.
6713 (class auto_dump_scope): New class.
6714 (AUTO_DUMP_SCOPE): New macro.
6715 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6718 2018-06-29 Richard Biener <rguenther@suse.de>
6720 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6721 compute_all_dependences succeeds.
6722 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6723 exceed --param loop-max-datarefs-for-datadeps.
6725 2018-06-29 Jakub Jelinek <jakub@redhat.com>
6727 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6729 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
6732 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6733 alternative 0 in preferred_for_speed attribute.
6735 2018-06-28 Paul Koning <ni1d@arrl.net>
6737 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6738 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6739 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6740 * config/pdp11/pdp11.md: Correct "length" attribute calculation
6741 for shift insn patterns.
6743 2018-06-28 David Malcolm <dmalcolm@redhat.com>
6745 * cgraph.c (cgraph_node::get_body): Replace assignments to
6746 "dump_file" with calls to set_dump_file.
6747 * dumpfile.c (alt_dump_file): Make static, and group with...
6748 (alt_flags): ...this definition.
6749 (dumps_are_enabled): New variable.
6750 (refresh_dumps_are_enabled): New function.
6751 (set_dump_file): New function.
6752 (set_alt_dump_file): New function.
6753 (gcc::dump_manager::dump_start): Replace assignments to
6754 "dump_file" and "alt_dump_file" with calls to set_dump_file and
6756 (gcc::dump_manager::dump_finish): Likewise.
6757 * dumpfile.h (alt_dump_file): Delete decl.
6758 (dumps_are_enabled): New variable decl.
6759 (set_dump_file): New function decl.
6760 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6762 * tree-nested.c (lower_nested_functions): Replace assignments to
6763 "dump_file" with calls to set_dump_file.
6765 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6767 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6768 goto_locus of each outgoing edge of each basic block.
6770 2018-06-28 Richard Biener <rguenther@suse.de>
6772 * dwarf2out.c (decl_scope_table): Remove.
6773 (push_decl_scope): Likewise.
6774 (pop_decl_scope): Likewise.
6775 (gen_type_die_for_member): Do not call push/pop_decl_scope.
6776 (gen_struct_or_union_type_die): Likewise.
6777 (gen_tagged_type_die): Likewise.
6778 (dwarf2out_init): Do not initialize decl_scope_table.
6779 (dwarf2out_c_finalize): Do not free it.
6781 2018-06-28 Richard Biener <rguenther@suse.de>
6783 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6784 deciding whether to not re-use a DIE.
6786 2018-06-28 Richard Biener <rguenther@suse.de>
6788 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6789 DW_AT_abstract_origin attribute.
6791 2018-06-28 Martin Liska <mliska@suse.cz>
6793 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6794 Use newly introduced constants.
6795 * tree-switch-conversion.h (struct jump_table_cluster):
6796 Define max_ratio_for_size and max_ratio_for_speed.
6798 2018-06-28 Martin Liska <mliska@suse.cz>
6800 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6801 Add new checking assert to catch invalid state.
6802 (jump_table_cluster::can_be_handled): Handle single case
6804 (jump_table_cluster::is_beneficial): Bail out for such case.
6805 (bit_test_cluster::find_bit_tests):
6806 Add new checking assert to catch invalid state.
6807 (bit_test_cluster::can_be_handled): Handle single case
6809 (bit_test_cluster::is_beneficial): Bail out for such case.
6810 (switch_decision_tree::analyze_switch_statement):
6813 2018-06-28 Martin Liska <mliska@suse.cz>
6815 * common.opt: Introduce -completion option.
6816 * gcc.c (driver_handle_option): Handle it.
6817 (driver::main): Print completions if completion
6819 * opt-suggestions.c (option_proposer::get_completions):
6821 (option_proposer::suggest_completion): Likewise.
6822 (option_proposer::find_param_completions): Likewise.
6823 (verify_autocompletions): Likewise.
6824 (test_completion_valid_options): Likewise.
6825 (test_completion_valid_params): Likewise.
6826 (in_completion_p): Likewise.
6827 (empty_completion_p): Likewise.
6828 (test_completion_partial_match): Likewise.
6829 (test_completion_garbage): Likewise.
6830 (opt_proposer_c_tests): Likewise.
6831 * opt-suggestions.h: Declare new functions.
6832 * opts.c (common_handle_option): Handle OPT__completion_.
6833 * selftest-run-tests.c (selftest::run_tests): Add
6834 opt_proposer_c_tests.
6835 * selftest.c (assert_str_startswith): New.
6836 * selftest.h (assert_str_startswith): Likewise.
6837 (opt_proposer_c_tests): New.
6838 (ASSERT_STR_STARTSWITH): Likewise.
6840 2018-06-28 Martin Liska <mliska@suse.cz>
6842 * Makefile.in: Add opt-suggestions.o.
6843 * gcc-main.c: Include opt-suggestions.h.
6844 * gcc.c (driver::driver): Likewise.
6845 (driver::~driver): Remove m_option_suggestions.
6846 (driver::build_option_suggestions): Moved to option_proposer.
6847 (driver::suggest_option): Likewise.
6848 (driver::handle_unrecognized_options): Use option_proposer.
6849 * gcc.h (class driver): Add new memver m_option_proposer.
6850 * opt-suggestions.c: New file.
6851 * opt-suggestions.h: New file.
6853 2018-06-28 Martin Liska <mliska@suse.cz>
6855 * vec.h (class auto_string_vec): New (moved from auto_argvec).
6856 (auto_string_vec::~auto_string_vec): Likewise.
6858 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
6860 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6861 prevent_decl_creation_for_types fields up and add reset_location field.
6862 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6863 statement if id->reset_location is true.
6864 (copy_edges_for_bb): Do not set goto_locus on the new edges if
6865 id->reset_location is true.
6866 (copy_phis_for_bb): Force input_location on the arguments if
6867 id->reset_location is true.
6868 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6869 is set on the function to be inlined.
6871 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
6873 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6875 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
6877 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6878 registers for Pmode.
6879 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6880 hard registers for the clobbered pseudo.
6882 2018-06-27 Paul Koning <ni1d@arrl.net>
6884 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6885 mutually exclusive options.
6886 * config/pdp11/constraints.md (h): New constraint.
6887 (O): Update definition to match shift code generation.
6888 (D): New constraint.
6889 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6891 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6893 (output_jump): Change arguments.
6894 (pdp11_fixed_cc_regs): New function.
6895 (pdp11_cc_mode): Ditto.
6896 (pdp11_expand_shift): Ditto.
6897 (pdp11_assemble_shift): Ditto.
6898 (pdp11_small_shift): Ditto.
6899 (pdp11_branch_cost): Remove.
6900 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6902 (pdp11_register_move_cost): Update for CC registers.
6903 (pdp11_rtx_costs): Add case for LSHIFTRT.
6904 (pdp11_output_jump): Add CCNZ mode conditional branches.
6905 (notice_update_cc_on_set): Remove.
6906 (pdp11_cc_mode): New function.
6907 (simple_memory_operand): Correct pre/post decrement case.
6908 (no_side_effect_operand): New function.
6909 (pdp11_regno_reg_class): Add CC_REGS class.
6910 (pdp11_fixed_cc_regs): New function.
6911 (pdp11_small_shift): New function.
6912 (pdp11_expand_shift): New function to expand shift insns.
6913 (pdp11_assemble_shift): New function to output shifts.
6914 (pdp11_branch_cost): Remove.
6915 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
6916 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
6917 (WCHAR_TYPE): Ditto.
6918 (PTRDIFF_TYPE): Ditto.
6919 (ADJUST_INSN_LENGTH): New macro.
6920 (FIXED_REGISTERS): Add CC registers.
6921 (CALL_USED_REGISTERS): Ditto.
6923 (REG_CLASS_NAMES): Ditto.
6924 (REG_CLASS_CONTENTS): Ditto.
6925 (SELECT_CC_MODE): Use new function.
6926 (TARGET_FLAGS_REGNUM): New macro.
6927 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
6928 (cc0_reg_rtx): Remove.
6929 (CC_STATUS_MDEP): Remove.
6930 (CC_STATUS_MDEFP_INIT): Remove.
6931 (CC_IN_FPU): Remove.
6932 (NOTICE_UPDATE_CC): Remove.
6933 (REGISTER_NAMES): Add CC registers.
6934 (BRANCH_COST): Change to constant 1.
6935 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
6937 * config/pdp11/pdp11.opt (mbcopy): Remove.
6938 (mbcopy-builtin): Remove.
6939 (mbranch-cheap): Remove.
6940 (mbranch-expensive): Remove.
6941 * config/pdp11/predicates.md (expand_shift_operand): Update to
6942 match shift code generation.
6943 (ccnz_operator): New predicate.
6944 * doc/invoke.texi (PDP-11 Options): Remove deleted options
6945 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
6946 Remove non-existent option -mabshi, -mno-abshi. Document mutually
6948 * doc/md.texi (PDP-11): Document new D and h constraints. Update
6949 description of O constraint.
6951 2018-06-27 Jeff Law <law@redhat.com>
6952 Austin Law <austinklaw@gmail.com>
6954 * config/v850/v850.md (addsi3_set_flags): New pattern.
6955 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
6956 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
6957 (zero_extendhisi2_v850_set_flags): Likewise.
6958 (zero_extendqisi2_v850_set_flags): Likewise.
6959 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
6960 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
6961 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
6963 * config/v850/v850-protos.h (notice_update_cc): Remove.
6964 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
6965 (v850_print_operand): Handle 'D' and "d".
6966 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
6967 Add handling of arithmetic/logical operations compared against zero.
6968 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
6969 Do not look at v850_compare_op, instead get mode from last argument.
6970 (v850_gen_compare): Remove
6971 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
6972 after reload for prologue insns.
6973 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
6975 (construct_save_jarl): Likewise.
6976 (TARGET_FLAGS_REGNUM): Define.
6977 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
6978 (NOTICE_UPDATE_CC): Remove.
6979 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
6980 than cc0. Conditionalize on reload_completed.
6981 (cmpsi_insn, setfcc_insn): Likewise.
6982 (tst1 splitter): Turn into define_and_split which sets the flags
6984 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
6985 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
6986 (cstoresf4, cstoredf4): Clobber the flags.
6987 (cmpsi, cmpsf, cmpdf): Remove expanders.
6988 (setf_insn): Remove pattern.
6989 (addsi3): Turn into define_and_split which clobbers the flags after
6990 reload and a suitable pattern (addsi3_clobber_flags) for use after
6992 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
6993 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
6994 (ashrsi3, ashrsi3_v850e2): Likewise.
6995 (bins): Clobber the flags.
6996 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6997 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6998 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6999 (call_value_internal_short, call_value_internal_long): Likewise.
7000 (callt_save_interrupt, callt_return_interrupt): Likewise.
7001 (save_interrupt, return_interrupt): Likewise.
7002 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7003 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7004 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7005 (All FP comparisons): Only allow after reload has completed.
7007 (divh, divhu): Tweak output template.
7008 (branch_z_normal, branch_z_invert): Remove
7009 (branch_nz_normal, branch_nz_invert): Likewise.
7010 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7012 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7013 * config/v850/v850.c (notice_update_cc): Remove.
7014 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7015 (CC_NO_CARRY): Likewise.
7016 (NOTICE_UPDATE_CC): Define to nothing.
7017 * config/v850/v850.md: Remove block comment on cc0 handling
7018 Remove "cc" attribute from all patterns. Remove cc_status handling
7019 from all patterns. Minor formatting fixes.
7021 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7023 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7024 (cortex-a76.cortex-a55): Likewise.
7025 * config/aarch64/aarch64-tune.md: Regenerate.
7026 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7027 cortex-a76.cortex-a55.
7029 2018-06-27 Jeff Law <law@redhat.com>
7031 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7032 (MULTILIB_DIRNAMES): Similarly.
7034 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7036 * gimple.h (gimple_return_retbnd): Delete.
7037 (gimple_return_set_retbnd): Likewise.
7038 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7039 gimple_return_set_retbnd.
7040 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7041 gimple_return_retbnd and adjust.
7042 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7043 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7044 Explicitly return NULL in a couple more cases. Move assertion
7045 on debug statements and remove unreachable code.
7046 (reset_debug_binding): Do not test id->retbnd.
7047 (expand_call_inline): Do not set it.
7049 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7051 * configure.ac: Add --disable-gcov option.
7052 * configure: Regenerate.
7053 * Makefile.in: Honour @enable_gcov@.
7054 * doc/install.texi: Document --disable-gcov.
7056 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7058 * config/arm/arm-cpus.in (cortex-a76): New entry.
7059 (cortex-a76.cortex-a55): Likewise.
7060 * config/arm/arm-tables.opt: Regenerate.
7061 * config/arm/arm-tune.md: Likewise.
7062 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7063 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7064 cortex-a76.cortex-a55.
7066 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7069 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7071 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7073 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7075 (EPILOGUE_USES): Likewise.
7077 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7079 * tree-inline.c (remap_location): New function extracted from...
7080 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7081 (copy_phis_for_bb): ...here. Call remap_location.
7082 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7084 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7086 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7087 unaligned vsx for 16B memset.
7089 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7092 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7093 ieee128_float_type_node to long_double_type_node unless
7094 TARGET_LONG_DOUBLE_128 is set.
7096 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7098 * cfgloop.c (get_loop_location): Convert return type from
7099 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7100 by implicit construction from rtx_insn *, and using
7101 dump_user_location_t::from_function_decl for the fallback case.
7102 * cfgloop.h (get_loop_location): Convert return type from
7103 location_t to dump_user_location_t.
7104 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7105 dump_printf_loc to pass in a dump_location_t rather than a
7106 location_t, via the gimple stmt.
7107 * coverage.c (get_coverage_counts): Update calls to
7108 dump_printf_loc to pass in dump_location_t rather than a
7110 * doc/optinfo.texi (Dump types): Convert example of
7111 dump_printf_loc from taking "locus" to taking "insn". Update
7112 description of the "_loc" calls to cover dump_location_t.
7113 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7115 (dump_user_location_t::dump_user_location_t): New constructors,
7116 from gimple *stmt and rtx_insn *.
7117 (dump_user_location_t::from_function_decl): New function.
7118 (dump_loc): Make static.
7119 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7120 const dump_location_t &.
7121 (dump_generic_expr_loc): Delete.
7122 (dump_printf_loc): Convert param "loc" from location_t to
7123 const dump_location_t &.
7124 (selftest::test_impl_location): New function.
7125 (selftest::dumpfile_c_tests): New function.
7126 * dumpfile.h: Include "profile-count.h".
7127 (class dump_user_location_t): New class.
7128 (struct dump_impl_location_t): New struct.
7129 (class dump_location_t): New class.
7130 (dump_printf_loc): Convert 2nd param from source_location to
7131 const dump_location_t &.
7132 (dump_generic_expr_loc): Delete.
7133 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7134 const dump_location_t &.
7135 * gimple-fold.c (fold_gimple_assign): Update call to
7136 dump_printf_loc to pass in a dump_location_t rather than a
7137 location_t, via the gimple stmt.
7138 (gimple_fold_call): Likewise.
7139 * gimple-loop-interchange.cc
7140 (loop_cand::analyze_iloop_reduction_var): Update for change to
7141 check_reduction_path.
7142 (tree_loop_interchange::interchange): Update for change to
7144 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7145 change in return-type of find_loop_location.
7146 (graphite_regenerate_ast_isl): Likewise.
7147 * graphite-optimize-isl.c (optimize_isl): Likewise.
7148 * graphite.c (graphite_transform_loops): Likewise.
7149 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7150 pass in a dump_location_t rather than a location_t, via the
7152 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7153 * ipa.c (walk_polymorphic_call_targets): Likewise.
7154 * loop-unroll.c (report_unroll): Convert "locus" param from
7155 location_t to dump_location_t.
7156 (decide_unrolling): Update for change to get_loop_location's
7158 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7159 location_t to dump_user_location_t.
7160 (grid_find_single_omp_among_assignments_1): Updates calls to
7161 dump_printf_loc to pass in a dump_location_t rather than a
7162 location_t, via the gimple stmt.
7163 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7164 location_t to dump_location_t. Updates calls to dump_printf_loc
7165 to pass in a dump_location_t rather than a location_t, via the
7167 (grid_inner_loop_gridifiable_p): Likewise.
7168 (grid_dist_follows_simple_pattern): Likewise.
7169 (grid_gfor_follows_tiling_pattern): Likewise.
7170 (grid_target_follows_gridifiable_pattern): Likewise.
7171 (grid_attempt_target_gridification): Convert initialization
7172 of local "grid" from memset to zero-initialization; FIXME: does
7173 this require C++11? Update call to dump_printf_loc to pass in a
7174 optinfo_location rather than a location_t, via the gimple stmt.
7175 * profile.c (read_profile_edge_counts): Updates call to
7176 dump_printf_loc to pass in a dump_location_t rather than a
7178 (compute_branch_probabilities): Likewise.
7179 * selftest-run-tests.c (selftest::run_tests): Call
7181 * selftest.h (dumpfile_c_tests): New decl.
7182 * tree-loop-distribution.c (pass_loop_distribution::execute):
7183 Update for change in return type of find_loop_location.
7184 * tree-parloops.c (parallelize_loops): Likewise.
7185 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7186 "locus" from location_t to dump_user_location_t.
7187 (canonicalize_loop_induction_variables): Likewise.
7188 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7189 for change in return type of find_loop_location.
7190 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7191 to dump_printf_loc to pass in a dump_location_t rather than a
7192 location_t, via the stmt.
7193 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7195 * tree-vect-loop-manip.c (find_loop_location): Convert return
7196 type from source_location to dump_user_location_t.
7197 (vect_do_peeling): Update for above change.
7198 (vect_loop_versioning): Update for change in type of
7200 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7201 from location_t to dump_user_location_t.
7202 (vect_estimate_min_profitable_iters): Update for change in type
7204 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7205 location_t to dump_location_t.
7206 (vect_slp_bb): Update for change in type of vect_location.
7207 * tree-vectorizer.c (vect_location): Convert from source_location
7208 to dump_user_location_t.
7209 (try_vectorize_loop_1): Update for change in vect_location's type.
7210 (vectorize_loops): Likewise.
7211 (increase_alignment): Likewise.
7212 * tree-vectorizer.h (vect_location): Convert from source_location
7213 to dump_user_location_t.
7214 (find_loop_location): Convert return type from source_location to
7215 dump_user_location_t.
7216 (check_reduction_path): Convert 1st param from location_t to
7217 dump_user_location_t.
7218 * value-prof.c (check_counter): Update call to dump_printf_loc to
7219 pass in a dump_user_location_t rather than a location_t; update
7220 call to error_at for change in type of "locus".
7221 (check_ic_target): Update call to dump_printf_loc to
7222 pass in a dump_user_location_t rather than a location_t, via the
7225 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7227 * config/s390/s390.h (enum processor_flags): Do not use
7228 default tune parameter when -march was specified.
7230 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7233 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7234 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7237 2018-06-26 Richard Biener <rguenther@suse.de>
7239 PR tree-optimization/86287
7241 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7242 (vect_analyze_loop): Initialize n_stmts.
7244 2018-06-26 Richard Biener <rguenther@suse.de>
7247 * fold-const.c (fold_convertible_p): Pointer extension
7250 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7253 * dwarf2out.c (loc_list_has_views): Adjust comments.
7254 (dw_loc_list): Split single cross-partition range with
7257 2018-06-25 Jeff Law <law@redhat.com>
7259 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7260 on -mbig-switch by default.
7262 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7264 (const_float_0_operand): Remove unused predicate.
7265 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7266 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7267 (recipsf2): New expander. Original pattern now called
7269 (recipdf2, recipdf2_insn): Similarly.
7270 (rsqrtsf2, rsqrtsf2_insn): Similarly
7271 (rsqrtdf2, rsqrtdf2_insn): Similarly
7273 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7275 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7276 Simplify logic for FreeBSD (twice).
7278 2018-06-25 Martin Sebor <msebor@redhat.com>
7280 PR tree-optimization/86204
7281 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7282 a strnlen result if it's less than the length of the string.
7284 2018-06-25 Martin Sebor <msebor@redhat.com>
7286 PR tree-optimization/85700
7287 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7288 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7289 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7291 2018-06-25 Martin Sebor <msebor@redhat.com>
7293 * doc/extend.texi (Zero-length arrays): Update and clarify.
7295 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7297 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7298 added IEEE/IBM long double multilib support on PowerPC little
7299 endian Linux systems.
7300 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7301 (MULTILIB_DEFAULTS): Likewise.
7302 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7304 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7305 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7306 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7308 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7311 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7312 (REORDER_45): Likewise.
7314 2018-06-25 Jeff Law <law@redhat.com>
7316 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7317 dividend to 32 bits. Adjust length.
7318 (udivmodhi4): Cleanup output template. Fix length.
7320 2018-06-25 Carl Love <cel@us.ibm.com>
7322 * config/rs6000/vsx.md: Change word selector to prefered location.
7324 2018-06-25 Richard Biener <rguenther@suse.de>
7326 PR tree-optimization/86304
7327 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7328 epilogue-if-converted loops as well.
7330 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7332 * lto-section-out.c (lto_begin_section): Do not print section
7333 name for noaddr and unnumbered dumps.
7335 2018-06-25 Richard Biener <rguenther@suse.de>
7337 * tree-vectorizer.h (struct vec_info_shared): New structure
7338 with parts split out from struct vec_info and loop_nest from
7339 struct _loop_vec_info.
7340 (struct vec_info): Adjust accordingly.
7341 (struct _loop_vec_info): Likewise.
7342 (LOOP_VINFO_LOOP_NEST): Adjust.
7343 (LOOP_VINFO_DATAREFS): Likewise.
7344 (LOOP_VINFO_DDRS): Likewise.
7345 (struct _bb_vec_info): Likewise.
7346 (BB_VINFO_DATAREFS): Likewise.
7347 (BB_VINFO_DDRS): Likewise.
7348 (struct _stmt_vec_info): Add dr_aux member.
7349 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7350 (DR_MISALIGNMENT_UNINITIALIZED): New.
7351 (set_dr_misalignment): Adjust.
7352 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7353 (vect_analyze_loop): Adjust prototype.
7354 (vect_analyze_loop_form): Likewise.
7355 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7356 Compute dependences lazily.
7357 (vect_record_base_alignments): Use shared datarefs/ddrs.
7358 (vect_verify_datarefs_alignment): Likewise.
7359 (vect_analyze_data_refs_alignment): Likewise.
7360 (vect_analyze_data_ref_accesses): Likewise.
7361 (vect_analyze_data_refs): Likewise.
7362 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7363 constructor parameter for shared part.
7364 (vect_analyze_loop_form): Pass in shared part and adjust.
7365 (vect_analyze_loop_2): Pass in storage for the number of
7366 stmts. Move loop nest finding to the caller. Compute
7368 (vect_analyze_loop): Pass in shared part.
7369 (vect_transform_loop): Verify shared datarefs are unchanged.
7370 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7371 constructor parameter for shared part.
7372 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7373 (vect_slp_bb): Verify shared datarefs are unchanged before
7375 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7377 (new_stmt_vec_info): Initialize DR_AUX misalignment to
7378 DR_MISALIGNMENT_UNINITIALIZED.
7379 * tree-vectorizer.c (vec_info::vec_info): Add constructor
7380 parameter for shared part.
7381 (vec_info::~vec_info): Adjust.
7382 (vec_info_shared::vec_info_shared): New.
7383 (vec_info_shared::~vec_info_shared): Likewise.
7384 (vec_info_shared::save_datarefs): Likewise.
7385 (vec_info_shared::check_datarefs): Likewise.
7386 (try_vectorize_loop_1): Construct shared part live for analyses
7387 of a single loop for multiple vector sizes.
7388 * tree-parloops.c (gather_scalar_reductions): Adjust.
7390 2018-06-25 Richard Biener <rguenther@suse.de>
7392 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7393 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7394 (vect_analyze_data_refs): Remove similar code from here and
7395 simplify accordingly.
7397 2018-06-25 Richard Biener <rguenther@suse.de>
7399 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7400 for reverse storage order accesses rather than asserting
7401 they cannot happen here.
7403 2018-06-25 Tom de Vries <tdevries@suse.de>
7406 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7407 Use data16 instead of .byte for insn prefix.
7409 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
7412 * parser.c (make_char_string_pack): Pass this literal chars
7413 through cpp_interpret_string.
7414 (cp_parser_userdef_numeric_literal): Check the result of
7415 make_char_string_pack.
7417 2018-06-24 Maya Rashish <coypu@sdf.org>
7419 * ginclude/stddef.h: Simplify conditions around avoiding
7420 re-definition of __size_t.
7422 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7424 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7425 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7427 2018-06-22 Maya Rashish <coypu@sdf.org>
7429 * doc/invoke.texi (mno-fancy-math-387): Update for changes
7430 made to OpenBSD and NetBSD through the years.
7432 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7434 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7435 behavior of vec_pack (vector double, vector double) to match
7436 behavior of vec_float2 (vector double, vector double).
7438 2018-06-22 Olivier Hainque <hainque@adacore.com>
7440 * gimplify.c (gimplify_function_tree): Prevent creation
7441 of a trampoline for the address of the current function
7442 passed to entry/exit instrumentation hooks.
7444 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
7447 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7450 2018-06-22 Martin Liska <mliska@suse.cz>
7452 PR tree-optimization/86263
7453 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7454 Bail out if is_enabled is false.
7455 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7457 (jump_table_cluster::is_enabled): New function.
7459 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7461 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7462 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7463 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7464 (lto_input_ts_binfo_tree_pointers): Likewise.
7465 * tree-streamer-out.c (streamer_write_tree_bitfields,
7466 write_ts_binfo_tree_pointers): Likewise.
7467 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7469 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7471 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7473 2018-06-22 Martin Liska <mliska@suse.cz>
7475 * symbol-summary.h (get): Make it pure and inline move
7476 functionality from ::get function.
7477 (get): Remove and inline into ::get and ::get_create.
7478 (get_create): Move code from ::get function.
7480 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7483 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7484 -x assembler-with-cpp.
7486 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7488 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7489 _FILE_OFFSET_BITS=64 for C++.
7491 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
7493 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7494 conversion insn that shows up when pr85657-3.c is compiled using
7495 IEEE 128-bit long double.
7496 (neg<mode>2_internal): Use the correct mode to check whether the
7497 mode is IBM extended.
7498 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7499 multiply and divide external functions from being created more
7502 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7504 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7506 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
7507 the edge can be forwarded.
7508 (cfg_layout_merge_blocks): Likewise.
7510 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7512 * except.c (finish_eh_generation): Commit edge insertions only after
7513 the EH edges have been redirected from post-landing to landing pads.
7515 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7517 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7518 create_tmp_var_for to create the FRAME decl.
7519 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7521 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
7523 * tree-inline.c (copy_edges_for_bb): Minor tweak.
7524 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7525 debug statement when resetting its value.
7526 (expand_call_inline): Copy the locus of the call onto the assignment
7527 of the return value, if any. Use local variable in more cases.
7529 2018-06-21 Martin Liska <mliska@suse.cz>
7531 * ipa-pure-const.c (propagate_nothrow): Use
7532 funct_state_summaries->get.
7533 (dump_malloc_lattice): Likewise.
7534 (propagate_malloc): Likewise.
7536 2018-06-21 Richard Biener <rguenther@suse.de>
7538 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7539 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7540 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7542 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7543 BLOCK_ABSTRACT_ORIGIN unconditionally.
7545 2018-06-21 David Malcolm <dmalcolm@redhat.com>
7547 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7549 * ipa-reference.c (ipa_reference_c_finalize): Delete
7550 ipa_ref_opt_sum_summaries and set it to NULL.
7552 2018-06-21 Tom de Vries <tdevries@suse.de>
7554 PR tree-optimization/85859
7555 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7556 test with comment from bb_no_side_effects_p.
7558 2018-06-21 Richard Biener <rguenther@suse.de>
7560 PR tree-optimization/86232
7561 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7562 max for constant niter.
7564 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7566 * config/aarch64/aarch64-simd.md
7567 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7569 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
7571 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7572 Make opernads of the unspec commutative.
7574 2018-06-21 Richard Biener <rguenther@suse.de>
7576 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7577 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7578 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7579 (vect_analyze_data_ref_dependence): Re-order checks to deal with
7581 (vect_record_base_alignments): Do not record base alignment
7582 for gathers or scatters.
7583 (vect_compute_data_ref_alignment): Drop return value that is always
7584 true. Bail out early for gathers or scatters.
7585 (vect_enhance_data_refs_alignment): Bail out early for gathers
7587 (vect_find_same_alignment_drs): Likewise.
7588 (vect_analyze_data_refs_alignment): Remove dead code.
7589 (vect_slp_analyze_and_verify_node_alignment): Likewise.
7590 (vect_analyze_data_refs): For possible gathers or scatters do
7591 not create an alternate DR, just check their possible validity
7592 and mark them. Adjust DECL_NONALIASED handling to not rely
7594 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7595 update inits of gathers or scatters.
7596 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7597 Also copy gather/scatter flag to pattern vinfo.
7599 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
7601 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7602 behavior of vec_packsu (vector unsigned long long, vector unsigned
7603 long long) to match behavior of vec_packs with same signature.
7605 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
7606 Thomas Schwinge <thomas@codesourcery.com>
7607 Cesar Philippidis <cesar@codesourcery.com>
7609 * gimplify.c (gimplify_scan_omp_clauses): Add support for
7610 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7611 (gimplify_adjust_omp_clauses): Likewise.
7612 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7613 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7614 (gimplify_omp_target_update): Update handling of acc update and
7616 * omp-low.c (install_var_field): Remove unused parameter
7617 base_pointers_restrict.
7618 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7619 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7621 (omp_target_base_pointers_restrict_p): Delete.
7622 (scan_omp_target): Update call to scan_sharing_clauses.
7623 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7625 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7626 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7627 (convert_local_omp_clauses): Likewise.
7628 * tree-pretty-print.c (dump_omp_clause): Likewise.
7629 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
7631 (omp_clause_code_name): Likewise.
7633 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7636 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7639 PR tree-optimization/86231
7640 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
7641 anti-range don't overwrite *vr0min before using it to compute *vr0max.
7643 2018-06-20 Tom de Vries <tdevries@suse.de>
7645 PR tree-optimization/86097
7646 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7647 iv type if signedness of iv type is not the same as that of *nit.
7649 2018-06-20 Jakub Jelinek <jakub@redhat.com>
7651 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
7652 EDGE_EH edges, verify they are all EDGE_EH.
7654 2018-06-20 Maya Rashish <coypu@sdf.org>
7656 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7658 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7660 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7661 * config/aarch64/aarch64.c (xgene1_tunings): Add
7662 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7663 (aarch64_mode_valid_for_sched_fusion_p):
7664 Allow 16-byte modes.
7665 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7666 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7668 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7670 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7671 * config/aarch64/iterators.md (VQ2): New mode iterator.
7673 2018-06-20 Martin Liska <mliska@suse.cz>
7675 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7676 Change default ratio from 10 to 8.
7678 2018-06-20 Martin Liska <mliska@suse.cz>
7680 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7682 (bit_test_cluster::find_bit_tests): Likewise.
7683 (switch_decision_tree::analyze_switch_statement): Find clusters.
7684 * tree-switch-conversion.h (struct jump_table_cluster): Document
7687 2018-06-20 Martin Liska <mliska@suse.cz>
7689 * tree-switch-conversion.c (switch_conversion::collect):
7690 Record m_uniq property.
7691 (switch_conversion::expand): Bail out for special conditions.
7692 (group_cluster::~group_cluster): New.
7693 (group_cluster::group_cluster): Likewise.
7694 (group_cluster::dump): Likewise.
7695 (jump_table_cluster::emit): New.
7696 (switch_decision_tree::fix_phi_operands_for_edges): New.
7697 (struct case_node): Remove struct.
7698 (jump_table_cluster::can_be_handled): New.
7699 (case_values_threshold): Moved to header.
7700 (reset_out_edges_aux): Likewise.
7701 (jump_table_cluster::is_beneficial): New.
7702 (bit_test_cluster::can_be_handled): Likewise.
7703 (add_case_node): Remove.
7704 (bit_test_cluster::is_beneficial): New.
7705 (case_bit_test::cmp): New.
7706 (bit_test_cluster::emit): New.
7707 (expand_switch_as_decision_tree_p): Remove.
7708 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7709 (fix_phi_operands_for_edge): Likewise.
7710 (switch_decision_tree::analyze_switch_statement): New.
7711 (compute_cases_per_edge): Move ...
7712 (switch_decision_tree::compute_cases_per_edge): ... here.
7713 (try_switch_expansion): Likewise.
7714 (switch_decision_tree::try_switch_expansion): Likewise.
7715 (record_phi_operand_mapping): Likewise.
7716 (switch_decision_tree::record_phi_operand_mapping): Likewise.
7717 (emit_case_decision_tree): Likewise.
7718 (switch_decision_tree::emit): Likewise.
7719 (balance_case_nodes): Likewise.
7720 (switch_decision_tree::balance_case_nodes): Likewise.
7721 (dump_case_nodes): Likewise.
7722 (switch_decision_tree::dump_case_nodes): Likewise.
7723 (emit_jump): Likewise.
7724 (switch_decision_tree::emit_jump): Likewise.
7725 (emit_cmp_and_jump_insns): Likewise.
7726 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7727 (emit_case_nodes): Likewise.
7728 (switch_decision_tree::emit_case_nodes): Likewise.
7729 (conditional_probability): Remove.
7730 * tree-switch-conversion.h (enum cluster_type): New.
7732 (struct cluster): Likewise.
7733 (cluster::cluster): Likewise.
7734 (struct simple_cluster): Likewise.
7735 (simple_cluster::simple_cluster): Likewise.
7736 (struct group_cluster): Likewise.
7737 (struct jump_table_cluster): Likewise.
7738 (struct bit_test_cluster): Likewise.
7739 (struct min_cluster_item): Likewise.
7740 (struct case_tree_node): Likewise.
7741 (case_tree_node::case_tree_node): Likewise.
7742 (jump_table_cluster::case_values_threshold): Likewise.
7743 (struct case_bit_test): Likewise.
7744 (struct switch_decision_tree): Likewise.
7745 (struct switch_conversion): Likewise.
7746 (switch_decision_tree::reset_out_edges_aux): Likewise.
7748 2018-06-20 Martin Liska <mliska@suse.cz>
7750 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7751 (hoist_edge_and_branch_if_true): Likewise.
7752 (expand_switch_using_bit_tests_p): Likewise.
7753 (struct case_bit_test): Likewise.
7754 (case_bit_test_cmp): Likewise.
7755 (emit_case_bit_tests): Likewise.
7756 (switch_conversion::switch_conversion): New class.
7757 (struct switch_conv_info): Remove old struct.
7758 (collect_switch_conv_info): More to ...
7759 (switch_conversion::collect): ... this.
7760 (check_range): Likewise.
7761 (switch_conversion::check_range): Likewise.
7762 (check_all_empty_except_final): Likewise.
7763 (switch_conversion::check_all_empty_except_final): Likewise.
7764 (check_final_bb): Likewise.
7765 (switch_conversion::check_final_bb): Likewise.
7766 (create_temp_arrays): Likewise.
7767 (switch_conversion::create_temp_arrays): Likewise.
7768 (free_temp_arrays): Likewise.
7769 (gather_default_values): Likewise.
7770 (switch_conversion::gather_default_values): Likewise.
7771 (build_constructors): Likewise.
7772 (switch_conversion::build_constructors): Likewise.
7773 (constructor_contains_same_values_p): Likewise.
7774 (switch_conversion::contains_same_values_p): Likewise.
7775 (array_value_type): Likewise.
7776 (switch_conversion::array_value_type): Likewise.
7777 (build_one_array): Likewise.
7778 (switch_conversion::build_one_array): Likewise.
7779 (build_arrays): Likewise.
7780 (switch_conversion::build_arrays): Likewise.
7781 (gen_def_assigns): Likewise.
7782 (switch_conversion::gen_def_assigns): Likewise.
7783 (prune_bbs): Likewise.
7784 (switch_conversion::prune_bbs): Likewise.
7785 (fix_phi_nodes): Likewise.
7786 (switch_conversion::fix_phi_nodes): Likewise.
7787 (gen_inbound_check): Likewise.
7788 (switch_conversion::gen_inbound_check): Likewise.
7789 (process_switch): Use the newly created class.
7790 (switch_conversion::expand): New.
7791 (switch_conversion::~switch_conversion): New.
7792 * tree-switch-conversion.h: New file.
7794 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7796 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7797 tree-vect-patterns.c.
7798 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7799 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
7800 (vect_recog_sad_pattern): Likewise.
7801 (vect_recog_widen_sum_pattern): Likewise.
7802 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
7803 (vect_recog_widen_shift_pattern): Remove the type_in argument.
7804 (vect_recog_rotate_pattern): Likewise.
7805 (vect_recog_mult_pattern): Likewise.
7806 (vect_recog_vector_vector_shift_pattern): Likewise.
7807 (vect_recog_divmod_pattern): Likewise.
7808 (vect_recog_mixed_size_cond_pattern): Likewise.
7809 (vect_recog_bool_pattern): Likewise.
7810 (vect_recog_mask_conversion_pattern): Likewise.
7811 (vect_try_gather_scatter_pattern): Likewise.
7812 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
7813 (vect_recog_over_widening_pattern): Likewise.
7814 (vect_recog_gather_scatter_pattern): Likewise.
7815 (vect_recog_func_ptr): Move from tree-vectorizer.h
7816 (vect_vect_recog_func_ptrs): Move further down the file.
7817 (vect_recog_func): Likewise. Remove the third argument.
7818 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7819 (vect_pattern_recog_1): Expect the pattern function to do any
7820 necessary target tests. Also expect it to provide a vector type.
7821 Remove the type_in handling.
7823 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7825 * tree-vect-patterns.c (vect_pattern_detected): New function.
7826 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
7827 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
7828 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
7829 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
7830 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7831 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7832 (vect_recog_mask_conversion_pattern)
7833 (vect_try_gather_scatter_pattern): Likewise.
7835 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7837 * tree-vect-patterns.c (vect_get_internal_def): New function.
7838 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7839 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
7840 (search_type_for_mask_1): Use it.
7842 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7844 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7845 redundant WIDEN_SUM_EXPR handling.
7846 (vect_recog_sad_pattern): Likewise.
7848 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7850 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7851 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7852 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7853 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7854 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7856 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7858 * tree-vect-stmts.c (vectorizable_call): Make sure that we
7859 use the stmt_vec_info of the original bb statement for the
7860 new zero assignment, even if the call is part of a pattern.
7862 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7864 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7865 that the sequence is attached to the original statement rather
7866 than the pattern statement.
7867 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7868 PATTERN_DEF_SEQ from the original statement rather than
7869 the main pattern statement.
7870 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7871 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7872 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7874 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
7876 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7877 definition statements before the early exit for statements that aren't
7879 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7881 (vect_transform_loop): ...here. Process pattern definition
7882 statements without first checking whether the main pattern
7883 statement is live or relevant.
7885 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7887 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7888 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7890 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
7892 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7893 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7894 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7895 (expand_block_compare): Change select_block_compare_mode call.
7896 (expand_strncmp_align_check): Use new functions, fix comment.
7897 (emit_final_str_compare_gpr): New function.
7898 (expand_strn_compare): Refactor and clean up code.
7899 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7901 2018-06-19 Tony Reix <tony.reix@atos.com>
7902 Damien Bergamini <damien.bergamini@atos.com>
7903 David Edelsohn <dje.gcc@gmail.com>
7905 * collect2.c (static_obj): New variable.
7906 (static_libs): New variable.
7907 (is_in_list): Uncomment declaration.
7908 (main): Track AIX libraries linked statically.
7909 (is_in_list): Uncomment definition.
7910 (scan_prog_file): Don't add AIX shared libraries initializer
7911 to constructor list if linking statically.
7913 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
7915 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
7917 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
7919 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
7921 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
7924 2018-06-19 Martin Liska <mliska@suse.cz>
7926 * config/i386/i386.c (ix86_can_inline_p): Do not use
7927 ipa_fn_summaries::get_create.
7928 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
7930 (devirtualization_time_bonus): Likewise.
7931 (ipcp_propagate_stage): Likewise.
7932 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7933 (edge_set_predicate): Likewise.
7934 (evaluate_conditions_for_known_args): Likewise.
7935 (evaluate_properties_for_edge): Likewise.
7936 (ipa_call_summary::reset): Tranform to ...
7937 (ipa_call_summary::~ipa_call_summary): ... this.
7938 (ipa_fn_summary::reset): Transform to ...
7939 (ipa_fn_summary::~ipa_fn_summary): ... this.
7940 (ipa_fn_summary_t::remove): Rename to ...
7941 (ipa_fn_summary_t::remove_callees): ... this.
7942 (ipa_fn_summary_t::duplicate): Use placement new
7943 instead of memory copy.
7944 (ipa_call_summary_t::duplicate): Likewise.
7945 (ipa_call_summary_t::remove): Remove.
7946 (dump_ipa_call_summary): Change get_create to get.
7947 (ipa_dump_fn_summary): Dump only when summary exists.
7948 (analyze_function_body): Use symbol_summary::get instead
7950 (compute_fn_summary): Likewise.
7951 (estimate_edge_devirt_benefit): Likewise.
7952 (estimate_edge_size_and_time): Likewise.
7953 (inline_update_callee_summaries): Likewise.
7954 (remap_edge_change_prob): Likewise.
7955 (remap_edge_summaries): Likewise.
7956 (ipa_merge_fn_summary_after_inlining): Likewise.
7957 (write_ipa_call_summary): Likewise.
7958 (ipa_fn_summary_write): Likewise.
7959 (ipa_free_fn_summary): Likewise.
7960 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
7961 (struct ipa_call_summary): Likewise.
7962 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
7964 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
7965 (estimate_size_after_inlining): Likewise.
7966 (estimate_growth): Likewise.
7967 (growth_likely_positive): Likewise.
7968 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7969 (inline_call): Likewise.
7970 * ipa-inline.c (caller_growth_limits): Likewise.
7971 (can_inline_edge_p): Likewise.
7972 (can_inline_edge_by_limits_p): Likewise.
7973 (compute_uninlined_call_time): Likewise.
7974 (compute_inlined_call_time): Likewise.
7975 (want_inline_small_function_p): Likewise.
7976 (edge_badness): Likewise.
7977 (update_caller_keys): Likewise.
7978 (update_callee_keys): Likewise.
7979 (inline_small_functions): Likewise.
7980 (inline_to_all_callers_1): Likewise.
7981 (dump_overall_stats): Likewise.
7982 (early_inline_small_functions): Likewise.
7983 (early_inliner): Likewise.
7984 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7985 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7986 * ipa-pure-const.c (malloc_candidate_p): Likewise.
7987 * ipa-split.c (execute_split_functions): Likewise.
7988 * symbol-summary.h: Likewise.
7989 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7991 2018-06-19 Richard Biener <rguenther@suse.de>
7993 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
7994 (vectorize_loops): ... here. Fix dbgcnt handling.
7995 (try_vectorize_loop): Wrap try_vectorize_loop_1.
7997 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8000 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8001 ieee128 argument takes up only one (vector) register, not two (floating
8004 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8006 * gimplify.c (gimplify_init_constructor): Really never clear for an
8007 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8009 2018-06-19 Richard Biener <rguenther@suse.de>
8011 PR tree-optimization/86179
8012 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8013 after failed recognition.
8015 2018-06-18 Martin Sebor <msebor@redhat.com>
8018 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8019 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8020 Handle integer subtraction.
8021 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8022 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8024 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8026 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8027 param from rtx to rtx_insn *.
8028 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8030 (frv_ifcvt_modify_insn): Likwise.
8031 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8032 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8033 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8034 as_a <rtx_insn *> cast to local "unprotected_region" once
8035 it's been established that it's not NULL or pc_rtx.
8036 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8037 param "sethi" from rtx to rtx_insn *.
8038 (nds32_group_float_insns): Likewise for param "insn".
8039 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8041 (vax_output_int_subtract): Likewise.
8042 * config/vax/vax.c (vax_output_int_add): Likewise for param
8044 (vax_output_int_subtract): Likewise.
8045 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8046 (emit_pattern_after): Likewise for param "after".
8047 (emit_insn_after): Likewise.
8048 (emit_jump_insn_after): Likewise.
8049 (emit_call_insn_after): Likewise.
8050 (emit_debug_insn_after): Likewise.
8051 (emit_pattern_before): Likewise for param "before".
8052 (emit_insn_before): Likewise.
8053 (emit_jump_insn_before): Likewise.
8054 * final.c (get_insn_template): Likewise for param "insn", removing
8056 * output.h (get_insn_template): Likewise for 2nd param.
8057 * rtl.h (emit_insn_before): Likewise.
8058 (emit_jump_insn_before): Likewise.
8059 (emit_debug_insn_before_noloc): Likewise.
8060 (emit_insn_after): Likewise.
8061 (emit_jump_insn_after): Likewise.
8062 (emit_call_insn_after): Likewise.
8063 (emit_debug_insn_after): Likewise.
8064 (set_insn_deleted): Likewise for param.
8066 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8069 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8070 floating point modes, so that IFmode is numerically greater than
8071 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8072 to declare the ordering. This prevents IFmode from being
8073 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8074 machine. Include rs6000-modes.h to share the fractional values
8075 between genmodes* and the rest of the compiler.
8079 * config/rs6000/rs6000-modes.h: New file.
8080 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8081 meaning of rs6000_long_double_size so that 126..128 selects an
8082 appropriate 128-bit floating point type.
8083 (rs6000_option_override_internal): Likewise.
8084 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8085 (TARGET_LONG_DOUBLE_128): Change the meaning of
8086 rs6000_long_double_size so that 126..128 selects an appropriate
8087 128-bit floating point type.
8088 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8089 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8090 source and destination to match the standard usage.
8091 (truncifkf2): Likewise.
8092 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8093 ISA 2.07 to use an explicit clobber, instead of passing in a
8095 (copysign<mode>3_soft): Likewise.
8097 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8099 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8100 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8101 (vect_slp_analyze_instance_dependence): Likewise.
8102 (vect_enhance_data_refs_alignment): Likewise.
8103 (vect_analyze_data_refs_alignment): Likewise.
8104 (vect_slp_analyze_and_verify_instance_alignment
8105 (vect_analyze_data_ref_accesses): Likewise.
8106 (vect_prune_runtime_alias_test_list): Likewise.
8107 (vect_analyze_data_refs): Likewise.
8108 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8109 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8110 (vect_analyze_scalar_cycles_1): Likewise.
8111 (vect_get_loop_niters): Likewise.
8112 (vect_analyze_loop_form_1): Likewise.
8113 (vect_update_vf_for_slp): Likewise.
8114 (vect_analyze_loop_operations): Likewise.
8115 (vect_analyze_loop): Likewise.
8116 (vectorizable_induction): Likewise.
8117 (vect_transform_loop): Likewise.
8118 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8119 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8120 (vect_make_slp_decision): Likewise.
8121 (vect_detect_hybrid_slp): Likewise.
8122 (vect_slp_analyze_operations): Likewise.
8123 (vect_slp_bb): Likewise.
8124 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8125 (vectorizable_bswap): Likewise.
8126 (vectorizable_call): Likewise.
8127 (vectorizable_simd_clone_call): Likewise.
8128 (vectorizable_conversion): Likewise.
8129 (vectorizable_assignment): Likewise.
8130 (vectorizable_shift): Likewise.
8131 (vectorizable_operation): Likewise.
8132 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8134 2018-06-18 Martin Sebor <msebor@redhat.com>
8136 PR tree-optimization/81384
8137 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8138 * builtins.c (expand_builtin_strnlen): New function.
8139 (expand_builtin): Call it.
8140 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8141 * builtins.def (BUILT_IN_STRNLEN): New.
8142 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8143 Warn for bounds in excess of maximum object size.
8144 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8145 single-value ranges. Handle strnlen.
8146 (handle_builtin_strlen): Handle strnlen.
8147 (strlen_check_and_optimize_stmt): Same.
8148 * doc/extend.texi (Other Builtins): Document strnlen.
8150 2018-06-18 Maya Rashish <coypu@sdf.org>
8152 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8153 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8154 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8156 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8158 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8160 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8162 * tree.c (escaped_string::escape): Replace cast to char * by
8163 const_cast<char *> (unescaped).
8165 2018-06-18 Nick Clifton <nickc@redhat.com>
8168 * tree.c (escaped_string): New class. Converts an unescaped
8169 string into its escaped equivalent.
8170 (warn_deprecated_use): Use the new class to convert the
8171 deprecation message, if present.
8172 (test_escaped_strings): New self test.
8173 (test_c_tests): Add test_escaped_strings.
8174 * doc/extend.texi (deprecated): Add a note that the
8175 deprecation message is affected by the -fmessage-length
8176 option, and that control characters will be escaped.
8177 (#pragma GCC error): Document this pragma.
8178 (#pragma GCC warning): Likewise.
8179 * doc/invoke.texi (-fmessage-length): Document this option's
8180 effect on the #warning and #error preprocessor directives and
8181 the deprecated attribute.
8183 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8185 * tree.c (decl_value_expr_lookup): Revert latest change.
8186 (decl_value_expr_insert): Likewise.
8188 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8190 * gimplify.c (nonlocal_vlas): Delete.
8191 (nonlocal_vla_vars): Likewise.
8192 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8194 (gimplify_body): Do not create and destroy nonlocal_vlas.
8195 * tree-nested.c: Include diagnostic.h.
8196 (use_pointer_in_frame): Tweak.
8197 (lookup_field_for_decl): Add assertion and declare the transformation.
8198 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8199 internal error when the reference is in a wrong context. Do not
8200 create a debug decl by default.
8201 (note_nonlocal_block_vlas): Delete.
8202 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8203 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8204 create a debug decl by default.
8205 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8206 call is in a wrong context.
8207 (fixup_vla_decls): New function.
8208 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8209 debug variables were created.
8210 * tree.c (decl_value_expr_lookup): Add checking assertion.
8211 (decl_value_expr_insert): Likewise.
8213 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8216 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8217 * tree-scalar-evolution.c (interpret_expr): Likewise.
8218 (expression_expensive_p): Likewise.
8219 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8220 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8221 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8222 (ssa_defined_by_minus_one_stmt_p): New.
8224 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8227 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8228 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8229 * dojump.c (do_jump): Likewise.
8230 * expr.c (expand_expr_real_2): Check operand type's sign.
8231 * fold-const.c (const_unop): Handle ABSU_EXPR.
8232 (fold_abs_const): Likewise.
8233 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8234 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8235 (strip_sign_op_1): Likesise.
8236 * match.pd: Add new pattern to generate ABSU_EXPR.
8237 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8238 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8239 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8240 * tree-inline.c (estimate_operator_cost): Likewise.
8241 * tree-pretty-print.c (dump_generic_node): Likewise.
8242 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8243 * tree.def (ABSU_EXPR): New.
8245 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8248 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8249 documented as preserved for backward compatibility only.
8250 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8252 PR rtl-optimization/86108
8253 * bb-reorder.c (create_forwarder_block): Renamed to ...
8254 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8255 jump from new landing pad to the second part.
8256 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8259 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8262 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8263 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8264 Only call store_expr for halves if the mode is the same.
8267 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8268 Fix up comment formatting.
8270 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8272 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8273 (typed_splay_tree::closure,
8274 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8275 (typed_splay_tree::typed_splay_tree,
8276 typed_splay_tree::operator =): Declared private.
8277 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8278 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8279 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8280 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8281 typed_splay_tree::splay_tree_splay,
8282 typed_splay_tree::splay_tree_foreach_helper,
8283 typed_splay_tree::splay_tree_insert,
8284 typed_splay_tree::splay_tree_remove,
8285 typed_splay_tree::splay_tree_lookup,
8286 typed_splay_tree::splay_tree_predecessor,
8287 typed_splay_tree::splay_tree_successor,
8288 typed_splay_tree::splay_tree_min,
8289 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8290 (typed_splay_tree::root, typed_splay_tree::comp,
8291 typed_splay_tree::delete_key,
8292 typed_splay_tree::delete_value): New data members.
8293 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8294 typed_splay_tree::remove.
8296 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8298 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8299 -mginv and -mno-ginv to the assembler.
8300 * config/mips/mips.opt (-mcrc): New option.
8302 * doc/invoke.text (-mcrc): Document.
8305 2018-06-15 Nick Clifton <nickc@redhat.com>
8308 * tree.c (escaped_string): New class. Converts an unescaped
8309 string into its escaped equivalent.
8310 (warn_deprecated_use): Use the new class to convert the
8311 deprecation message, if present.
8312 (test_escaped_strings): New self test.
8313 (test_c_tests): Add test_escaped_strings.
8314 * doc/extend.texi (deprecated): Add a note that the
8315 deprecation message is affected by the -fmessage-length
8316 option, and that control characters will be escaped.
8317 (#pragma GCC error): Document this pragma.
8318 (#pragma GCC warning): Likewise.
8319 * doc/invoke.texi (-fmessage-length): Document this option's
8320 effect on the #warning and #error preprocessor directives and
8321 the deprecated attribute.
8323 2018-06-15 Richard Biener <rguenther@suse.de>
8325 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8326 here, also noting vector size used.
8327 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8328 size used in MSG_OPTIMIZED_LOCATIONS dump.
8329 (pass_slp_vectorize::execute): Adjust.
8331 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8334 * config/arc/arc.c (arc_return_address_register): Fix
8337 2018-06-15 Richard Biener <rguenther@suse.de>
8340 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8341 leave useless conversion stripping to force_gimple_operand_gsi.
8342 (gimplify_build2): Likewise.
8343 (gimplify_build1): Likewise.
8345 2018-06-15 Richard Biener <rguenther@suse.de>
8348 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8349 before adjusting their block.
8351 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8353 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8354 multilibs for *-*-rtems*.
8355 * config/riscv/t-rtems: New file.
8357 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8360 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8361 unsigned_type_for returns NULL.
8364 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8365 subregs of multi-word pseudos unless the float mode has word size.
8367 2018-06-14 Richard Biener <rguenther@suse.de>
8370 * tree-vect-generic.c (build_word_mode_vector_type): Remove
8371 duplicate and harmful type_hash_canon.
8372 * tree.c (type_hash_canon): Assert we didn't find ourselves.
8374 2018-06-14 Richard Biener <rguenther@suse.de>
8377 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8380 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
8382 * config/rtems.h (STDINT_LONG32): Define.
8384 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
8385 Prachi Godbole <prachi.godbole@imgtec.com>
8387 * config/mips/mips-cpus.def: Define P6600.
8388 * config/mips/mips-tables.opt: Regenerate.
8389 * config/mips/mips.c (mips_ucbranch_type): New enum.
8390 (mips_rtx_cost_data): Add support for P6600.
8391 (mips_issue_rate): Likewise.
8392 (mips_multipass_dfa_lookahead): Likewise.
8393 (mips_avoid_hazard): Likewise.
8394 (mips_reorg_process_insns): Likewise.
8395 (mips_classify_branch_p6600): New function.
8396 * config/mips/mips.h (TUNE_P6600): New define.
8397 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8398 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8399 * config/mips/mips.md: Include p6600.md.
8400 (processor): Add p6600.
8401 * config/mips/p6600.md: New file.
8402 * doc/invoke.texi: Add p6600 to supported architectures.
8404 2018-06-13 Martin Sebor <msebor@redhat.com>
8406 PR tree-optimization/86114
8407 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8409 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8411 2018-06-13 Richard Biener <rguenther@suse.de>
8413 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8414 Properly set vector type of the intermediate stmt.
8415 * tree-vect-stmts.c (vectorizable_operation): The destination
8416 var always has vectype_out type.
8418 2018-06-13 Jeff Law <law@redhat.com>
8420 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8421 integer 0 for argument to print_rtl_with_bb.
8422 (rl78_reorg): Likewise.
8424 2018-06-13 David Malcolm <dmalcolm@redhat.com>
8426 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8427 from rtx to rtx_insn *.
8428 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8430 (add_sched_insns_for_speculation): Likewise for local "target",
8431 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8432 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8433 from rtx_insn ** to rtx_code_label **.
8434 (reorg_emit_nops): Likewise.
8435 (c6x_reorg): Likewise for local "call_labels".
8436 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8438 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8439 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8440 the loops over LABEL_REFS.
8441 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8443 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8444 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8445 (split_branches): Strengthen local "olabel" from rtx to
8446 rtx_insn *, adding a safe_as_a cast.
8447 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8449 (add_insn_after): Likewise for first two params.
8450 (add_insn_before): Likewise.
8451 (remove_insn): Likewise for param.
8452 (emit_pattern_before_noloc): Likewise for second and third params.
8453 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8454 (emit_call_insn_before_noloc): Likewise.
8455 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8457 (emit_barrier_before): Likewise.
8458 (emit_label_before): Strengthen "label" param from "rtx" to
8459 "rtx_code_label *". Strengthen "before" param from "rtx" to
8461 (emit_insn_after_1): Strengthen "after" param from "rtx" to
8463 (emit_pattern_after_noloc): Likewise.
8464 (emit_insn_after_noloc): Likewise.
8465 (emit_jump_insn_after_noloc): Likewise.
8466 (emit_call_insn_after_noloc): Likewise.
8467 (emit_debug_insn_after_noloc): Likewise.
8468 (emit_barrier_after): Likewise.
8469 (emit_label_after): Likewise for both params.
8470 (emit_pattern_after_setloc): Likewise for "after" param. Convert
8471 "loc" param from "int" to "location_t".
8472 (emit_insn_after_setloc): Likewise.
8473 (emit_jump_insn_after_setloc): Likewise.
8474 (emit_call_insn_after_setloc): Likewise.
8475 (emit_debug_insn_after_setloc): Likewise.
8476 (emit_pattern_before_setloc): Likewise for "before" param. Convert
8477 "loc" param from "int" to "location_t".
8478 (emit_pattern_before): Convert NULL_RTX to NULL.
8479 (emit_insn_before_setloc): Convert "loc" param from "int" to
8481 (emit_jump_insn_before_setloc): Likewise.
8482 (emit_call_insn_before_setloc): Likewise.
8483 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8484 rtx_insn *. Convert "loc" param from "int" to "location_t".
8485 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8486 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8487 Convert 3rd param from "int" to "location_t".
8488 (emit_barrier_before, emit_barrier_after, next_real_insn):
8489 Strengthen param from rtx to rtx_insn *.
8490 (emit_label_before): Strengthen 1st param from "rtx" to
8491 "rtx_code_label *". Strengthen 2nd param from "rtx" to
8493 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8494 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8495 Strengthen 2nd param from "rtx" to "rtx_insn *".
8496 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8497 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8498 Likewise. Convert 3rd param from "int" to "location_t".
8499 (emit_label_after): Strengthen 1st param from "rtx" to
8501 (next_real_insn, remove_insn): Strengthen param from "rtx" to
8503 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8504 from "rtx" to "rtx_insn *".
8506 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
8508 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8509 bodies streamed in with -Q.
8510 * dumpfile.c (dump_files): Add lto-stream-out dump file.
8511 * dumpfile.h (tree_dump_index): Add lto_stream_out.
8512 * gimple-streamer-out.c: Include gimple-pretty-print.h
8513 (output_bb): Dump stmts streamed.
8514 * lto-section-out.c: Include print-tree.h
8515 (lto_begin_section): Dump sections created.
8516 (lto_output_decl_index): Dump decl encoded.
8517 * lto-streamer-out.c: Include print-tree.h
8518 (create_output_block): Dump output block created.
8519 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8520 (output_function): Dump function output.
8521 (output_constructor): Dump constructor streamed.
8522 (write_global_stream): Output indexes encoded.
8523 (produce_asm_for_decls): Dump streams encoded.
8524 * lto-streamer.c (streamer_dump_file): New global var.
8525 * lto-streamer.h (streamer_dump_file): Declare.
8526 * passes.c (ipa_write_summaries): Initialize streamer dump.
8527 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8530 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
8533 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8534 offsets for register save directives. Emit a second batch of save
8535 directives, if need be, when the function accesses prior frames.
8537 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8539 * config/arc/fpu.md (fmasf4): Force operand to register.
8540 (fnmasf4): Likewise.
8542 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8544 * config/arc/arc-protos.h (arc_pad_return): Remove.
8545 * config/arc/arc.c (machine_function): Remove force_short_suffix
8547 (arc_print_operand): Adjust printing of '&'.
8548 (arc_verify_short): Remove conditional printing of short suffix.
8549 (arc_final_prescan_insn): Remove reference to size_reason.
8550 (pad_return): New function.
8551 (arc_reorg): Call pad_return.
8552 (arc_pad_return): Remove.
8553 (arc_init_machine_status): Remove reference to force_short_suffix.
8554 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8555 (attr length): When attribute iscompact is true force to 2
8556 regardless; in the case of maybe check if we want to force the
8557 instruction to have 4 bytes length.
8558 (nopv): Change it to generate 4 byte long nop as well.
8559 (blockage): New pattern.
8560 (simple_return): Remove call to arc_pad_return.
8561 (p_return_i): Likewise.
8563 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8565 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8567 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8569 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8572 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8574 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8575 for ARC700 and ARCv2.
8577 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
8580 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8581 operands[2] instead of operands[1].
8584 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8586 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8587 case, check whether the outer register overlaps an unallocatable
8588 register, not just whether it fits the required class.
8590 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
8592 * poly-int.h (can_div_trunc_p): Add new overload in which all values
8594 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8595 (memrefs_conflict_p): Likewise.
8596 (init_alias_analysis): Likewise.
8597 * cfgexpand.c (expand_debug_expr): Likewise.
8598 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8599 * cse.c (fold_rtx): Likewise.
8600 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8601 * expr.c (emit_block_move_hints): Likewise.
8602 (clear_storage_hints, push_block, emit_push_insn): Likewise.
8603 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8604 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8605 (emit_group_store): Likewise.
8606 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
8607 to read the PRE/POST_MODIFY increment.
8608 * calls.c (store_one_arg): Use strip_offset.
8609 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8611 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8613 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8614 (simplify_binary_operation_1): Extend CONST_INT handling to
8616 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8617 than a HOST_WIDE_INT.
8618 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8620 (adjust_mems, add_stores): Update accodingly.
8621 (vt_canonicalize_addr): Track polynomial offsets.
8622 (emit_note_insn_var_location): Likewise.
8623 (vt_add_function_parameter): Likewise.
8624 (vt_initialize): Likewise.
8626 2018-06-12 Jeff Law <law@redhat.com>
8628 * config.gcc (alpha*-*-freebsd*): Remove.
8629 * config/alpha/freebsd.h: Remove.
8631 2018-06-12 David Malcolm <dmalcolm@redhat.com>
8634 * spellcheck-tree.c (levenshtein_distance): Rename to...
8635 (get_edit_distance): ...this, and update for underlying renaming.
8636 * spellcheck-tree.h (levenshtein_distance): Rename to...
8637 (get_edit_distance): ...this.
8638 * spellcheck.c (levenshtein_distance): Rename to...
8639 (get_edit_distance): ...this. Convert from Levenshtein distance
8640 to Damerau-Levenshtein distance by supporting transpositions of
8641 adjacent characters. Rename "v1" to "v_next" and "v0" to
8643 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8644 (selftest::test_edit_distance_unit_test_oneway): ...this, and
8645 update for underlying renaming.
8646 (selftest::levenshtein_distance_unit_test): Rename to...
8647 (selftest::test_get_edit_distance_unit): ...this, and update for
8648 underlying renaming.
8649 (selftest::test_find_closest_string): Add example from PR 69968
8650 where transposition helps
8651 (selftest::test_metric_conditions): Update for renaming.
8652 (selftest::test_metric_conditions): Likewise.
8653 (selftest::spellcheck_c_tests): Likewise.
8654 * spellcheck.h (levenshtein_distance): Rename both overloads to...
8655 (get_edit_distance): ...this.
8656 (best_match::consider): Update for renaming.
8658 2018-06-12 Martin Sebor <msebor@redhat.com>
8660 PR tree-optimization/85259
8661 * builtins.c (compute_objsize): Handle constant offsets.
8662 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8663 true iff a warning has been issued.
8664 * gimple.h (gimple_nonartificial_location): New function.
8665 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8666 gimple_nonartificial_location and handle -Wno-system-headers.
8667 (handle_builtin_stxncpy): Same.
8669 2018-06-12 Martin Sebor <msebor@redhat.com>
8672 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8674 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
8676 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8677 BUILTIN_VEC_XST entries for pointer to double and long long.
8679 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
8682 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8684 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8687 2018-06-12 Martin Liska <mliska@suse.cz>
8689 * doc/options.texi: Document IntegerRange.
8691 2018-06-12 Martin Liska <mliska@suse.cz>
8693 * config/i386/i386.opt: Make MPX-related options as Deprecated.
8694 * opt-functions.awk: Handle Deprecated flag.
8695 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8697 (read_cmdline_option): Report warning for a deprecated option.
8698 * opts.h (struct cl_option): Add new field cl_deprecated.
8699 (CL_ERR_DEPRECATED): New.
8701 2018-06-12 Martin Liska <mliska@suse.cz>
8703 * doc/options.texi: Document Deprecated option flag.
8705 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8707 * config/arc/arc-arch.h (arc_extras): New enum.
8708 (arc_cpu_t):Add field extra.
8709 (arc_cpu_types): Consider the extras.
8710 * config/arc/arc-cpus.def: Add extras info.
8711 * config/arc/arc-opts.h (processor_type): Consider extra field.
8712 * config/arc/arc.c (arc_override_options): Handle extra field.
8714 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
8716 * config/arc/arc-arch.h: Update ARC_OPTX macro.
8717 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8719 * config/arc/arc.c (arc_init): Update pic warning.
8720 (irq_range): Update irq range parsing warnings.
8721 (arc_override_options): Update various warning messages.
8722 (arc_handle_aux_attribute): Likewise.
8724 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
8726 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8728 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8730 * doc/sourcebuild.texi: Document usage of line number 0 in verify
8731 compiler messages directives.
8733 2018-06-12 Matthew Fortune <mfortune@gmail.com>
8735 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8736 * config/mips/mips-tables.opt: Regenerate.
8737 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8739 * doc/invoke.texi: Document -march=i6500.
8741 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
8743 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8744 (i6400_gpmul): Add cpu_unit.
8745 (i6400_gpdiv): Likewise.
8746 (i6400_msa_add_d): Update reservations.
8747 (i6400_msa_int_add) Likewise.
8748 (i6400_msa_short_logic3) Likewise.
8749 (i6400_msa_short_logic2) Likewise.
8750 (i6400_msa_short_logic) Likewise.
8751 (i6400_msa_move) Likewise.
8752 (i6400_msa_cmp) Likewise.
8753 (i6400_msa_short_float2) Likewise.
8754 (i6400_msa_div_d) Likewise.
8755 (i6400_msa_long_logic1) Likewise.
8756 (i6400_msa_long_logic2) Likewise.
8757 (i6400_msa_mult) Likewise.
8758 (i6400_msa_long_float2) Likewise.
8759 (i6400_msa_long_float4) Likewise.
8760 (i6400_msa_long_float5) Likewise.
8761 (i6400_msa_long_float8) Likewise.
8762 (i6400_fpu_fadd): Include frint type.
8763 (i6400_fpu_store): New define_insn_reservation.
8764 (i6400_fpu_load): Likewise.
8765 (i6400_fpu_move): Likewise.
8766 (i6400_fpu_fcmp): Likewise.
8767 (i6400_fpu_fmadd): Likewise.
8768 (i6400_int_mult): Include imul3nc type and update reservation.
8769 (i6400_int_div): Include idiv3 type and update reservation.
8770 (i6400_int_load): Update to check type not move_type.
8771 (i6400_int_store): Likewise.
8772 (i6400_int_prefetch): Set zero latency.
8774 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
8776 * gcc.c: Document new %@{...} sequence.
8777 (LINK_COMMAND_SPEC): Use it for the -L switches.
8778 (cpp_unique_options): Use it for the -I switches.
8779 (at_file_argbuf): New global variable.
8780 (in_at_file): Likewise.
8781 (alloc_args): Create at_file_argbuf.
8782 (clear_args): Truncate at_file_argbuf.
8783 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8784 (open_at_file): New function.
8785 (close_at_file): Likewise.
8786 (create_at_file): Delete.
8787 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8790 (validate_switches_from_spec): Deal with %@{...} sequence.
8791 (validate_switches): Likewise.
8792 (driver::finalize): Call clear_args.
8794 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
8796 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8798 2018-06-11 Martin Sebor <msebor@redhat.com>
8800 * doc/invoke.texi (-Wall): List -Wc++17-compat.
8801 (Wno-class-memaccess): Add @opindex.
8802 (Wno-templates, Wno-multiple-inheritance): Same.
8803 (Wno-virtual-inheritance, Wno-namespaces): Same.
8804 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8805 (Wno-format-overflow, Wno-format-truncation): Same.
8806 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8807 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8808 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8809 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8810 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8811 (Wno-misspelled-isr): Same.
8813 2018-06-11 Martin Sebor <msebor@redhat.com>
8815 * PR tree-optimization/86083
8816 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8818 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
8820 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
8822 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
8825 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
8826 on the correct operand.
8827 (*movdi_internal64): Ditto.
8829 2018-06-11 Martin Liska <mliska@suse.cz>
8831 PR tree-optimization/86089
8832 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
8834 2018-06-11 Julia Koval <julia.koval@intel.com>
8836 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
8837 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
8838 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
8840 2018-06-11 Olivier Hainque <hainque@adacore.com>
8842 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
8843 for Ada with strict dwarf2.
8845 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
8848 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8851 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
8853 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8855 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
8857 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8860 2018-06-08 Martin Liska <mliska@suse.cz>
8862 * tree-cfg.h (debug_function): Fix argument type to match
8865 2018-06-08 Martin Liska <mliska@suse.cz>
8867 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8868 Remove usage of MPX-related (and removed) fields.
8869 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8871 2018-06-08 David Malcolm <dmalcolm@redhat.com>
8873 * cfg.c (debug): Use TDF_NONE rather than 0.
8874 * cfghooks.c (debug): Likewise.
8875 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8876 (struct dump_option_value_info): Convert to...
8877 (struct kv_pair): ...this template type.
8878 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8880 (optinfo_verbosity_options): Likewise.
8881 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8883 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8884 than int for "optgroup_flags" param.
8885 (dump_generic_expr_loc): Use dump_flags_t rather than int for
8887 (dump_dec): Likewise.
8888 (dump_finish): Use TDF_NONE rather than 0.
8889 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8890 rather than int for "optgroup_flags" param. Use TDF_NONE rather
8891 than 0. Update for change to option_ptr.
8892 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8893 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
8894 0. Update for changes to optinfo_verbosity_options and
8896 (opt_info_switch_p): Convert optgroup_flags from int to
8898 (dump_basic_block): Use dump_flags_t rather than int
8899 for "dump_kind" param.
8900 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8901 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8902 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8903 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8904 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8905 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8906 TDF_NONE): Convert from macros to...
8907 (enum dump_flag): ...this new enum.
8908 (dump_flags_t): Update to use enum.
8909 (operator|, operator&, operator~, operator|=, operator&=):
8910 Implement for dump_flags_t.
8911 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
8912 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
8913 Convert from macros to...
8914 (enum optgroup_flag): ...this new enum.
8915 (optgroup_flags_t): New typedef.
8916 (operator|, operator|=): Implement for optgroup_flags_t.
8917 (struct dump_file_info): Convert field "alt_flags" to
8918 dump_flags_t. Convert field "optgroup_flags" to
8920 (dump_basic_block): Use dump_flags_t rather than int for param.
8921 (dump_generic_expr_loc): Likewise.
8922 (dump_dec): Likewise.
8923 (dump_register): Convert param "optgroup_flags" to
8925 (opt_info_enable_passes): Likewise.
8926 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
8928 * gimple-pretty-print.c (debug): Likewise.
8929 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
8930 (merged_store_group::apply_stores): Likewise.
8931 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
8932 * gimple.c (verify_gimple_pp): Likewise.
8933 * graphite-poly.c (print_pbb_body): Likewise.
8934 * passes.c (pass_manager::register_one_dump_file): Convert
8935 local "optgroup_flags" to optgroup_flags_t.
8936 * print-tree.c (print_node): Use TDF_NONE rather than 0.
8938 (debug_body): Likewise.
8939 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
8940 to optgroup_flags_t.
8941 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
8943 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
8944 (convert_mult_to_fma): Likewise.
8945 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
8946 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
8947 * tree-vect-data-refs.c (dump_lower_bound): Convert param
8948 "dump_kind" to dump_flags_t.
8950 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8952 * config/rs6000/rs6000.c (min, max): Delete.
8954 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
8956 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
8957 -mabi=spe and -mabi=no-spe.
8959 2018-06-08 Martin Liska <mliska@suse.cz>
8961 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
8962 where we expect an existing summary.
8964 2018-06-08 Martin Liska <mliska@suse.cz>
8966 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
8967 * ipa-inline.h (estimate_edge_growth): Likewise.
8969 2018-06-08 Martin Liska <mliska@suse.cz>
8971 * cgraph.c (function_version_hasher::hash): Use
8972 cgraph_node::get_uid ().
8973 (function_version_hasher::equal):
8974 * cgraph.h (cgraph_node::get_uid): New method.
8975 * ipa-inline.c (update_caller_keys): Use
8976 cgraph_node::get_uid ().
8977 (update_callee_keys): Likewise.
8978 * ipa-utils.c (searchc): Likewise.
8979 (ipa_reduced_postorder): Likewise.
8980 * lto-cgraph.c (input_node): Likewise.
8981 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
8982 * symbol-summary.h (symtab_insertion): Likewise.
8983 (symtab_removal): Likewise.
8984 (symtab_duplication): Likewise.
8985 * tree-pretty-print.c (dump_function_header): Likewise.
8986 * tree-sra.c (convert_callers_for_node): Likewise.
8988 2018-06-08 Martin Liska <mliska@suse.cz>
8990 * cgraph.c (symbol_table::create_edge): Always assign a new
8992 (symbol_table::free_edge): Do not recycle numbers.
8993 * cgraph.h (cgraph_edge::get): New method.
8994 * symbol-summary.h (symtab_removal): Use it.
8995 (symtab_duplication): Likewise.
8996 (call_summary::hashable_uid): Remove.
8998 2018-06-08 Martin Liska <mliska@suse.cz>
9000 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9001 (initialize_growth_caches): Remove.
9002 (free_growth_caches): Likewise.
9003 (do_estimate_edge_time): Use edge_growth_cache.
9004 (do_estimate_edge_size): Likewise.
9005 (do_estimate_edge_hints): Likewise.
9006 * ipa-inline.c (reset_edge_caches): Likewise.
9007 (recursive_inlining): Likewise.
9008 (inline_small_functions): Likewise.
9009 * ipa-inline.h (initialize_growth_caches): Remove.
9010 (estimate_edge_size): Likewise.
9011 (estimate_edge_time): Likewise.
9012 (estimate_edge_hints): Likewise.
9013 (reset_edge_growth_cache): Likewise.
9014 * symbol-summary.h (call_summary::remove): New method.
9016 2018-06-08 Martin Liska <mliska@suse.cz>
9018 * ipa-cp.c (class edge_clone_summary): New summary.
9019 (grow_edge_clone_vectors): Remove.
9020 (ipcp_edge_duplication_hook): Remove.
9021 (class edge_clone_summary_t): New call_summary class.
9022 (ipcp_edge_removal_hook): Remove.
9023 (edge_clone_summary_t::duplicate): New function.
9024 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9025 (create_specialized_node): Likewise.
9026 (ipcp_driver): Initialize edge_clone_summaries and do not
9029 2018-06-08 Martin Liska <mliska@suse.cz>
9031 * symbol-summary.h (get): New function.
9032 (call_summary::m_initialize_when_cloning): New class member.
9034 2018-06-08 Martin Liska <mliska@suse.cz>
9036 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9037 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9038 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9039 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9040 (remove_cgraph_node_from_order): Use the removed_nodes set.
9041 (do_per_function_toporder): Likwise.
9042 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9043 instead of summary_uid.
9044 (symtab_removal): Likewise.
9045 (symtab_duplication): Likewise.
9047 2018-06-08 Martin Liska <mliska@suse.cz>
9049 * ipa-cp.c (ipcp_store_bits_results): Use
9050 ipcp_transformation_sum.
9051 (ipcp_store_vr_results): Likewise.
9052 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9054 (ipcp_transformation_initialize): ... this.
9055 (ipa_set_node_agg_value_chain):
9056 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9057 (write_ipcp_transformation_info): Likewise.
9058 (read_ipcp_transformation_info): Likewise.
9059 (ipcp_update_bits): Likewise.
9060 (ipcp_update_vr): Likewise.
9061 (ipcp_transform_function): Likewise.
9062 * ipa-prop.h: Rename ipcp_transformation_summary to
9063 ipcp_transformation.
9064 (class ipcp_transformation_t): New function summary.
9065 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9066 (ipa_get_agg_replacements_for_node): Likewise.
9068 2018-06-08 Martin Liska <mliska@suse.cz>
9070 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9072 (class funct_state_summary_t): New function_summary class.
9073 (has_function_state): Remove.
9074 (get_function_state): Likewise.
9075 (set_function_state): Likewise.
9076 (add_new_function): Likewise.
9077 (funct_state_summary_t::insert): New function.
9078 (duplicate_node_data): Remove.
9079 (remove_node_data): Remove.
9080 (funct_state_summary_t::duplicate): New function.
9081 (register_hooks): Create new funct_state_summaries.
9082 (pure_const_generate_summary): Use it.
9083 (pure_const_write_summary): Likewise.
9084 (pure_const_read_summary): Likewise.
9085 (propagate_pure_const): Likewise.
9086 (propagate_nothrow): Likewise.
9087 (dump_malloc_lattice): Likewise.
9088 (propagate_malloc): Likewise.
9089 (execute): Do not register hooks, just remove summary
9091 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9094 2018-06-08 Martin Liska <mliska@suse.cz>
9096 * ipa-reference.c (remove_node_data): Remove.
9097 (duplicate_node_data): Likewise.
9098 (class ipa_ref_var_info_summary_t): New class.
9099 (class ipa_ref_opt_summary_t): Likewise.
9100 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9101 (get_reference_optimization_summary): Use
9102 ipa_ref_opt_sum_summaries.
9103 (set_reference_vars_info): Remove.
9104 (set_reference_optimization_summary): Likewise.
9105 (ipa_init): Create summaries.
9106 (init_function_info): Use function summary.
9107 (ipa_ref_opt_summary_t::duplicate): New function.
9108 (ipa_ref_opt_summary_t::remove): New function.
9109 (get_read_write_all_from_node): Fix GNU coding style.
9110 (propagate): Use function summary.
9111 (write_node_summary_p): Fix GNU coding style.
9112 (stream_out_bitmap): Likewise.
9113 (ipa_reference_read_optimization_summary): Use function summary.
9114 (ipa_reference_c_finalize): Do not release hooks.
9116 2018-06-08 Martin Liska <mliska@suse.cz>
9118 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9119 (analyze_function_body): Extract multiple calls of get_create.
9120 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9121 * ipa-inline.c (recursive_inlining): Use ::get method.
9122 * ipa-inline.h (estimate_edge_growth): Likewise.
9124 2018-06-08 Martin Liska <mliska@suse.cz>
9126 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9128 (hsa_function_summary::hsa_function_summary): Use the new enum
9130 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9131 * hsa-gen.c (hsa_get_host_function): Likewise.
9132 (get_brig_function_name): Likewise.
9133 * ipa-hsa.c (process_hsa_functions): Likewise.
9134 (ipa_hsa_write_summary): Likewise.
9135 * symbol-summary.h (symtab_duplication): Use ::get function/
9136 (get): New function.
9138 2018-06-08 Martin Liska <mliska@suse.cz>
9140 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9142 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9143 (hsa_register_kernel): Likewise.
9144 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9145 * hsa-gen.c (hsa_get_host_function): Likewise.
9146 (get_brig_function_name): Likewise.
9147 (generate_hsa): Likewise.
9148 (pass_gen_hsail::execute): Likewise.
9149 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9150 (devirtualization_time_bonus): Likewise.
9151 (ipcp_propagate_stage): Likewise.
9152 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9153 (edge_set_predicate): Likewise.
9154 (evaluate_conditions_for_known_args): Likewise.
9155 (evaluate_properties_for_edge): Likewise.
9156 (ipa_fn_summary::reset): Likewise.
9157 (ipa_fn_summary_t::duplicate): Likewise.
9158 (dump_ipa_call_summary): Likewise.
9159 (ipa_dump_fn_summary): Likewise.
9160 (analyze_function_body): Likewise.
9161 (compute_fn_summary): Likewise.
9162 (estimate_edge_devirt_benefit): Likewise.
9163 (estimate_edge_size_and_time): Likewise.
9164 (estimate_calls_size_and_time): Likewise.
9165 (estimate_node_size_and_time): Likewise.
9166 (inline_update_callee_summaries): Likewise.
9167 (remap_edge_change_prob): Likewise.
9168 (remap_edge_summaries): Likewise.
9169 (ipa_merge_fn_summary_after_inlining): Likewise.
9170 (ipa_update_overall_fn_summary): Likewise.
9171 (read_ipa_call_summary): Likewise.
9172 (inline_read_section): Likewise.
9173 (write_ipa_call_summary): Likewise.
9174 (ipa_fn_summary_write): Likewise.
9175 (ipa_free_fn_summary): Likewise.
9176 * ipa-hsa.c (process_hsa_functions): Likewise.
9177 (ipa_hsa_write_summary): Likewise.
9178 (ipa_hsa_read_section): Likewise.
9179 * ipa-icf.c (sem_function::merge): Likewise.
9180 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9181 (do_estimate_edge_time): Likewise.
9182 (estimate_size_after_inlining): Likewise.
9183 (estimate_growth): Likewise.
9184 (growth_likely_positive): Likewise.
9185 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9186 (inline_call): Likewise.
9187 * ipa-inline.c (caller_growth_limits): Likewise.
9188 (can_inline_edge_p): Likewise.
9189 (can_inline_edge_by_limits_p): Likewise.
9190 (compute_uninlined_call_time): Likewise.
9191 (compute_inlined_call_time): Likewise.
9192 (want_inline_small_function_p): Likewise.
9193 (edge_badness): Likewise.
9194 (update_caller_keys): Likewise.
9195 (update_callee_keys): Likewise.
9196 (recursive_inlining): Likewise.
9197 (inline_small_functions): Likewise.
9198 (inline_to_all_callers_1): Likewise.
9199 (dump_overall_stats): Likewise.
9200 (early_inline_small_functions): Likewise.
9201 (early_inliner): Likewise.
9202 * ipa-inline.h (estimate_edge_growth): Likewise.
9203 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9204 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9205 * ipa-prop.h (IPA_NODE_REF): Likewise.
9206 (IPA_EDGE_REF): Likewise.
9207 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9208 (propagate_malloc): Likewise.
9209 * ipa-split.c (execute_split_functions): Likewise.
9210 * symbol-summary.h: Rename get to get_create.
9212 (get_create): Likewise.
9213 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9215 2018-06-08 Martin Liska <mliska@suse.cz>
9217 * symbol-summary.h (release): Move definition out of class
9219 (symtab_removal): Likewise.
9220 (symtab_duplication): Likewise.
9222 2018-06-08 Martin Liska <mliska@suse.cz>
9224 * symbol-summary.h (function_summary): Move constructor
9225 implementation out of class declaration.
9226 (release): Likewise.
9227 (symtab_insertion): Likewise.
9228 (symtab_removal): Likewise.
9229 (symtab_duplication): Likewise.
9232 2018-06-08 Martin Liska <mliska@suse.cz>
9234 * Makefile.in: Remove support for MPX (macros, related functions,
9235 fields in cgraph_node, ...).
9236 * builtin-types.def (BT_BND): Likewise.
9237 (BT_FN_BND_CONST_PTR): Likewise.
9238 (BT_FN_CONST_PTR_BND): Likewise.
9239 (BT_FN_VOID_PTR_BND): Likewise.
9240 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9241 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9242 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9243 (expand_builtin_mempcpy_with_bounds): Likewise.
9244 (expand_builtin_memset_with_bounds): Likewise.
9245 (expand_builtin_memset_args): Likewise.
9246 (std_expand_builtin_va_start): Likewise.
9247 (expand_builtin): Likewise.
9248 (expand_builtin_with_bounds): Likewise.
9249 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9250 (DEF_LIB_BUILTIN_CHKP): Likewise.
9251 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9252 (DEF_CHKP_BUILTIN): Likewise.
9253 (BUILT_IN_MEMCPY): Likewise.
9254 (BUILT_IN_MEMMOVE): Likewise.
9255 (BUILT_IN_MEMPCPY): Likewise.
9256 (BUILT_IN_MEMSET): Likewise.
9257 (BUILT_IN_STPCPY): Likewise.
9258 (BUILT_IN_STRCAT): Likewise.
9259 (BUILT_IN_STRCHR): Likewise.
9260 (BUILT_IN_STRCPY): Likewise.
9261 (BUILT_IN_STRLEN): Likewise.
9262 (BUILT_IN_MEMCPY_CHK): Likewise.
9263 (BUILT_IN_MEMMOVE_CHK): Likewise.
9264 (BUILT_IN_MEMPCPY_CHK): Likewise.
9265 (BUILT_IN_MEMSET_CHK): Likewise.
9266 (BUILT_IN_STPCPY_CHK): Likewise.
9267 (BUILT_IN_STRCAT_CHK): Likewise.
9268 (BUILT_IN_STRCPY_CHK): Likewise.
9269 * calls.c (store_bounds): Likewise.
9270 (emit_call_1): Likewise.
9271 (special_function_p): Likewise.
9272 (maybe_warn_nonstring_arg): Likewise.
9273 (initialize_argument_information): Likewise.
9274 (finalize_must_preallocate): Likewise.
9275 (compute_argument_addresses): Likewise.
9276 (expand_call): Likewise.
9277 * cfgexpand.c (expand_call_stmt): Likewise.
9278 (expand_return): Likewise.
9279 (expand_gimple_stmt_1): Likewise.
9280 (pass_expand::execute): Likewise.
9281 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9282 (cgraph_node::remove): Likewise.
9283 (cgraph_node::dump): Likewise.
9284 (cgraph_node::verify_node): Likewise.
9285 * cgraph.h (chkp_function_instrumented_p): Likewise.
9286 (symtab_node::get_alias_target): Likewise.
9287 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9288 (cgraph_local_p): Likewise.
9289 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9290 (cgraph_edge::rebuild_references): Likewise.
9291 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9292 (walk_polymorphic_call_targets): Likewise.
9293 (cgraph_node::expand_thunk): Likewise.
9294 (symbol_table::output_weakrefs): Likewise.
9295 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9296 (ix86_handle_option): Likewise.
9297 * config/i386/constraints.md: Likewise.
9298 * config/i386/i386-builtin-types.def (BND): Likewise.
9302 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9303 (BDESC_FIRST): Likewise.
9305 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9306 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9307 * config/i386/i386.c (enum reg_class): Likewise.
9308 (ix86_target_string): Likewise.
9309 (ix86_option_override_internal): Likewise.
9310 (ix86_conditional_register_usage): Likewise.
9311 (ix86_valid_target_attribute_inner_p): Likewise.
9312 (ix86_set_indirect_branch_type): Likewise.
9313 (ix86_set_current_function): Likewise.
9314 (ix86_function_arg_regno_p): Likewise.
9315 (init_cumulative_args): Likewise.
9316 (ix86_function_arg_advance): Likewise.
9317 (ix86_function_arg): Likewise.
9318 (ix86_pass_by_reference): Likewise.
9319 (ix86_function_value_regno_p): Likewise.
9320 (ix86_function_value_1): Likewise.
9321 (ix86_function_value_bounds): Likewise.
9322 (ix86_return_in_memory): Likewise.
9323 (ix86_setup_incoming_vararg_bounds): Likewise.
9324 (ix86_va_start): Likewise.
9325 (indirect_thunk_need_prefix): Likewise.
9326 (print_reg): Likewise.
9327 (ix86_print_operand): Likewise.
9328 (ix86_expand_call): Likewise.
9329 (ix86_output_function_return): Likewise.
9330 (reg_encoded_number): Likewise.
9331 (BDESC_VERIFYS): Likewise.
9332 (ix86_init_mpx_builtins): Likewise.
9333 (ix86_init_builtins): Likewise.
9334 (ix86_emit_cmove): Likewise.
9335 (ix86_emit_move_max): Likewise.
9336 (ix86_expand_builtin): Likewise.
9337 (ix86_builtin_mpx_function): Likewise.
9338 (ix86_get_arg_address_for_bt): Likewise.
9339 (ix86_load_bounds): Likewise.
9340 (ix86_store_bounds): Likewise.
9341 (ix86_load_returned_bounds): Likewise.
9342 (ix86_store_returned_bounds): Likewise.
9343 (ix86_class_likely_spilled_p): Likewise.
9344 (ix86_hard_regno_mode_ok): Likewise.
9345 (x86_order_regs_for_local_alloc): Likewise.
9346 (ix86_mitigate_rop): Likewise.
9347 (ix86_bnd_prefixed_insn_p): Likewise.
9348 (ix86_mpx_bound_mode): Likewise.
9349 (ix86_make_bounds_constant): Likewise.
9350 (ix86_initialize_bounds): Likewise.
9351 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9352 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9353 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9354 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9355 (TARGET_CHKP_BOUND_MODE): Likewise.
9356 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9357 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9358 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9359 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9360 * config/i386/i386.h (TARGET_MPX): Likewise.
9361 (TARGET_MPX_P): Likewise.
9362 (VALID_BND_REG_MODE): Likewise.
9363 (FIRST_BND_REG): Likewise.
9364 (LAST_BND_REG): Likewise.
9365 (enum reg_class): Likewise.
9366 (BND_REG_P): Likewise.
9367 (BND_REGNO_P): Likewise.
9368 (BNDmode): Likewise.
9369 (ADJUST_INSN_LENGTH): Likewise.
9370 * config/i386/i386.md: Likewise.
9371 * config/i386/i386.opt: Likewise.
9372 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9373 (defined): Likewise.
9374 (LINK_MPX): Likewise.
9375 (MPX_SPEC): Likewise.
9376 (LIBMPX_SPEC): Likewise.
9377 (LIBMPXWRAPPERS_SPEC): Likewise.
9378 (CHKP_SPEC): Likewise.
9379 * config/i386/predicates.md: Likewise.
9380 * dbxout.c (dbxout_type): Likewise.
9381 * doc/extend.texi: Likewise.
9382 * doc/invoke.texi: Likewise.
9383 * doc/md.texi: Likewise.
9384 * doc/tm.texi: Likewise.
9385 * doc/tm.texi.in: Likewise.
9386 * dwarf2out.c (is_base_type): Likewise.
9387 (gen_formal_types_die): Likewise.
9388 (gen_subprogram_die): Likewise.
9389 (gen_type_die_with_usage): Likewise.
9390 (gen_decl_die): Likewise.
9391 (dwarf2out_late_global_decl): Likewise.
9392 * expr.c (expand_assignment): Likewise.
9393 (emit_storent_insn): Likewise.
9394 (store_expr_with_bounds): Likewise.
9395 (store_expr): Likewise.
9396 (expand_expr_real_1): Likewise.
9397 * expr.h (store_expr_with_bounds): Likewise.
9398 * function.c (use_register_for_decl): Likewise.
9399 (struct bounds_parm_data): Likewise.
9400 (assign_parms_augmented_arg_list): Likewise.
9401 (assign_parm_find_entry_rtl): Likewise.
9402 (assign_parm_is_stack_parm): Likewise.
9403 (assign_parm_load_bounds): Likewise.
9404 (assign_bounds): Likewise.
9405 (assign_parms): Likewise.
9406 (expand_function_start): Likewise.
9407 * gcc.c (CHKP_SPEC): Likewise.
9408 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9409 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9410 (wrestrict_dom_walker::check_call): Likewise.
9411 * gimple.c (gimple_build_call_from_tree): Likewise.
9412 * gimple.h (enum gf_mask): Likewise.
9413 (gimple_call_with_bounds_p): Likewise.
9414 (gimple_call_set_with_bounds): Likewise.
9415 * gimplify.c (gimplify_init_constructor): Likewise.
9416 * ipa-cp.c (initialize_node_lattices): Likewise.
9417 (propagate_constants_across_call): Likewise.
9418 (find_more_scalar_values_for_callers_subset): Likewise.
9419 * ipa-hsa.c (process_hsa_functions): Likewise.
9420 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9421 * ipa-icf.c (sem_function::merge): Likewise.
9422 * ipa-inline.c (early_inliner): Likewise.
9423 * ipa-pure-const.c (warn_function_noreturn): Likewise.
9424 (warn_function_cold): Likewise.
9425 (propagate_pure_const): Likewise.
9426 * ipa-ref.h (enum GTY): Likewise.
9427 * ipa-split.c (find_retbnd): Likewise.
9428 (consider_split): Likewise.
9429 (split_function): Likewise.
9430 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9431 * ipa.c (walk_polymorphic_call_targets): Likewise.
9432 (symbol_table::remove_unreachable_nodes): Likewise.
9433 (process_references): Likewise.
9434 (cgraph_build_static_cdtor_1): Likewise.
9435 * lto-cgraph.c (lto_output_node): Likewise.
9436 (output_refs): Likewise.
9437 (compute_ltrans_boundary): Likewise.
9438 (input_overwrite_node): Likewise.
9439 (input_node): Likewise.
9440 (input_cgraph_1): Likewise.
9441 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9442 * passes.c (pass_manager::execute_early_local_passes): Likewise.
9443 (class pass_chkp_instrumentation_passes): Likewise.
9444 (make_pass_chkp_instrumentation_passes): Likewise.
9445 * passes.def: Likewise.
9446 * rtl.h (struct GTY): Likewise.
9447 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9448 * stor-layout.c (layout_type): Likewise.
9449 * symtab.c: Likewise.
9450 * target.def: Likewise.
9451 * targhooks.c (default_chkp_bound_type): Likewise.
9452 (default_chkp_bound_mode): Likewise.
9453 (default_builtin_chkp_function): Likewise.
9454 (default_chkp_function_value_bounds): Likewise.
9455 (default_chkp_make_bounds_constant): Likewise.
9456 (default_chkp_initialize_bounds): Likewise.
9457 * targhooks.h (default_chkp_bound_type): Likewise.
9458 (default_chkp_bound_mode): Likewise.
9459 (default_builtin_chkp_function): Likewise.
9460 (default_chkp_function_value_bounds): Likewise.
9461 (default_chkp_make_bounds_constant): Likewise.
9462 (default_chkp_initialize_bounds): Likewise.
9463 * toplev.c (compile_file): Likewise.
9464 (process_options): Likewise.
9465 * tree-core.h (DEF_BUILTIN): Likewise.
9466 (DEF_BUILTIN_CHKP): Likewise.
9467 * tree-inline.c (declare_return_variable): Likewise.
9468 (remap_gimple_stmt): Likewise.
9469 (copy_bb): Likewise.
9470 (initialize_inlined_parameters): Likewise.
9471 (expand_call_inline): Likewise.
9472 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9473 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9474 (make_pass_ipa_chkp_produce_thunks): Likewise.
9475 (make_pass_chkp): Likewise.
9476 (make_pass_chkp_opt): Likewise.
9477 (make_pass_chkp_instrumentation_passes): Likewise.
9478 * tree-pretty-print.c (dump_generic_node): Likewise.
9479 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9480 * tree-ssa-dce.c (propagate_necessity): Likewise.
9481 (eliminate_unnecessary_stmts): Likewise.
9482 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9483 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9484 * tree-ssa-sccvn.h: Likewise.
9485 * tree-ssa-strlen.c (get_string_length): Likewise.
9486 (valid_builtin_call): Likewise.
9487 (adjust_last_stmt): Likewise.
9488 (handle_builtin_strchr): Likewise.
9489 (handle_builtin_strcpy): Likewise.
9490 (handle_builtin_stxncpy): Likewise.
9491 (handle_builtin_memcpy): Likewise.
9492 (handle_builtin_strcat): Likewise.
9493 (strlen_check_and_optimize_stmt): Likewise.
9494 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9495 * tree-streamer-in.c: Likewise.
9496 * tree-streamer.c (record_common_node): Likewise.
9497 * tree.c (tree_code_size): Likewise.
9498 (wide_int_to_tree_1): Likewise.
9499 (type_contains_placeholder_1): Likewise.
9500 (build_common_tree_nodes): Likewise.
9501 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9502 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9503 (POINTER_BOUNDS_P): Likewise.
9504 (BOUNDED_TYPE_P): Likewise.
9505 (BOUNDED_P): Likewise.
9506 (CALL_WITH_BOUNDS_P): Likewise.
9507 (pointer_bounds_type_node): Likewise.
9508 * value-prof.c (gimple_ic): Likewise.
9509 * var-tracking.c (vt_add_function_parameters): Likewise.
9510 * varasm.c (make_decl_rtl): Likewise.
9511 (assemble_start_function): Likewise.
9512 (output_constant): Likewise.
9513 (maybe_assemble_visibility): Likewise.
9514 * varpool.c (ctor_for_folding): Likewise.
9515 * chkp-builtins.def: Remove.
9516 * ipa-chkp.c: Remove.
9517 * ipa-chkp.h: Remove.
9518 * rtl-chkp.c: Remove.
9519 * rtl-chkp.h: Remove.
9520 * tree-chkp-opt.c: Remove.
9521 * tree-chkp.c: Remove.
9522 * tree-chkp.h: Remove.
9524 2018-06-07 Carl Love <cel@us.ibm.com>
9526 * config/rs6000/vsx.md (vextract_fp_from_shorth,
9527 vextract_fp_from_shortl): Add BE support.
9529 2018-06-07 Paul Koning <ni1d@arrl.net>
9531 * compare-elim.c (try_merge_compare): Don't merge compare if
9532 address contains a side effect.
9533 (try_eliminate_compare): Likewise.
9535 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
9537 * config.gcc: Support "tremont".
9538 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9539 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9541 * config/i386/i386.c (m_TREMONT): Define.
9542 (processor_target_table): Add "tremont".
9543 (PTA_TREMONT): Define.
9544 (ix86_lea_outperforms): Add TARGET_TREMONT.
9545 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9546 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9547 and M_INTEL_GOLDMONT_PLUS.
9548 (fold_builtin_cpu): Add "tremont".
9549 (ix86_add_stmt_cost): Add TARGET_TREMONT.
9550 (ix86_option_override_internal): Add "tremont".
9551 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9552 (processor_type): Add PROCESSOR_TREMONT.
9553 * config/i386/x86-tune.def: Add m_TREMONT.
9554 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9556 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9558 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9559 symbol defined for msp430i* devices to be lower case.
9561 2018-06-07 Richard Biener <rguenther@suse.de>
9563 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9564 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
9565 Properly wrap signed arithmetic if overflow wraps.
9567 2018-06-07 Jakub Jelinek <jakub@redhat.com>
9569 PR tree-optimization/69615
9570 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9571 of a cast from a same precision integral SSA_NAME in a bb dominated
9572 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
9573 cast to utype if rhs2 has already a compatible type.
9575 2018-06-07 Richard Biener <rguenther@suse.de>
9577 PR tree-optimization/85935
9578 * graphite-scop-detection.c (find_params_in_bb): Analyze
9579 condition operands with respect to the correct loop. Assert
9580 the analysis doesn't fail.
9582 2018-06-04 Carl Love <cel@us.ibm.com>
9584 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9585 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
9586 as it is slightly cheaper.
9587 (first_match_or_eos_index_<mode>):
9588 Calculate index using natural element order.
9589 (first_match_index_<mode>):
9590 Calculate index using natural element order.
9591 (first_match_or_eos_index_<mode>):
9592 Calculate index using natural order.
9593 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9594 for BE and LE modes.
9595 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9596 P9V_BUILTIN_VCLZLSBB_V16QI.
9597 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9600 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9602 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9603 indentation and line wrap for many prototypes. Add missing
9604 @smallexample directives around block of prototypes for vec_xl and
9607 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
9609 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9610 track if we pass or return IEEE 128-bit floating point.
9611 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9612 C++ mangling that is compatible with GCC 8.1.
9613 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9614 (init_cumulative_args): Note if we pass or return IEEE 128-bit
9615 floating point types.
9616 (rs6000_function_arg_advance_1): Likewise.
9617 (rs6000_mangle_type): Optionally generate mangled names that match
9618 what GCC 8.1 generated for IEEE 128-bit floating point types.
9619 (rs6000_globalize_decl_name): If we have an external function that
9620 passes or returns IEEE 128-bit types, generate a weak reference
9621 from the mangled name used in GCC 8.1 to the current mangled
9623 (rs6000_init_builtins): Make __ibm128 use the long double type if
9624 long double is IBM extended double. Make __float128 use the long
9625 double type if long double is IEEE 128-bit.
9628 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9629 macro for __ibm128 built-in functions.
9630 (PACK_IF): Add __ibm128 pack/unpack functions.
9631 (UNPACK_IF): Likewise.
9632 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9633 enable long double built-in functions if long double is IEEE
9634 128-bit floating point.
9635 (rs6000_invalid_builtin): Update long double built-in function
9637 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9638 functions, adjust the built-in function to use the long double
9639 built-in function if __ibm128 and long double are the same type.
9640 * doc/extend.texi (PowerPC builtins): Update documention for
9641 __builtin_{,un}pack_longdouble. Add documentation for
9642 __builtin_{,un}pack_ibm128.
9644 2018-06-06 Jim Wilson <jimw@sifive.com>
9646 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9647 (struct machine_function): New field interrupt_mode.
9648 (riscv_handle_type_attribute): New function. Add forward declaration.
9649 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9650 (riscv_expand_epilogue): Check interrupt_mode field.
9651 (riscv_set_current_function): Check interrupt attribute args and
9652 set interrupt_mode field.
9653 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9654 (riscv_sret, riscv_uret): New.
9655 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9656 new arguments to interrupt attribute.
9658 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
9661 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9662 Don't handle -mcpu=power8 if -mpower9-vector is also used.
9664 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
9666 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9667 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9668 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9669 several redundant entries.
9671 2018-06-06 David Malcolm <dmalcolm@redhat.com>
9673 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9674 type from "rtx" to "rtx_insn *".
9675 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9676 for local "call_insn", removing cast.
9677 (ix86_expand_call): Likewise, introducing a "call_insn" local.
9679 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
9681 PR tree-optimization/86066
9682 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9683 for BIT_INSERT_EXPR stores.
9685 2018-06-06 Richard Biener <rguenther@suse.de>
9687 PR tree-optimization/86062
9688 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9689 component refs ontop
9690 of to be offsetted base.
9692 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9694 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9695 to be static and remove check on interrupt attribute name.
9697 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
9699 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9700 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9702 2018-06-05 Steve Ellcey <sellcey@cavium.com>
9705 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9707 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9708 Remove second argument, change how error is called.
9709 (aarch64_layout_arg): Remove second argument from
9710 aarch64_err_no_fpadvsimd call.
9711 (aarch64_init_cumulative_args): Ditto.
9712 (aarch64_gimplify_va_arg_expr): Ditto.
9713 * config/aarch64/aarch64.md (mov<mode>): Ditto.
9715 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
9717 * config/i386/i386.md (simple_return_indirect_internal): New expander.
9718 (*simple_return_indirect_internal<mode>): Rename from
9719 simple_return_indirect_internal. Use W mode iterator.
9720 (rstorssp): New expander.
9721 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
9722 (clrssbsy): New expander.
9723 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
9725 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
9727 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9729 (cmse_check_pointed_object): Likewise.
9731 2018-06-05 Martin Liska <mliska@suse.cz>
9733 PR gcov-profile/47618
9734 * doc/invoke.texi: Document how -fprofile-dir format
9737 2018-06-05 Richard Biener <rguenther@suse.de>
9739 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9740 removal pretend DOM info isn't available so we do not update
9741 it and only remove edges, not dominated blocks. Actually free
9742 DOM info in case we removed something. Remove unreachable blocks.
9743 (mfb_keep_latches): Work with either DOM info or marked backedges.
9744 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9745 first. Mark backedges if DOM info isn't available.
9746 (Re-)compute DOM info after cleanup_control_flow_pre.
9748 2018-06-05 Richard Biener <rguenther@suse.de>
9750 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9751 (locus_discrim_hasher::hash): Adjust.
9752 (locus_discrim_hasher::equal): Likewise.
9753 (next_discriminator_for_locus): Work on line directly.
9754 (same_line_p): Pass in expanded locus1 as well.
9755 (assign_discriminators): Avoid redundant location expansions.
9757 2018-06-05 Richard Biener <rguenther@suse.de>
9759 PR tree-optimization/86046
9760 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9761 if required after clearing TREE_ADDRESSABLE.
9763 2018-06-05 Richard Biener <rguenther@suse.de>
9765 PR tree-optimization/86047
9766 * tree-ssa-loop.c (for_each_index): Glob handling of all
9767 decls and constants and really handle all of them.
9769 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9772 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9773 qualifier_void_pointer and qualifier_const_void_pointer.
9774 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9775 (arm_init_builtins): Handle the above.
9776 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9777 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9778 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9781 2018-06-05 Martin Liska <mliska@suse.cz>
9783 * auto-profile.c (read_autofdo_file): Do not use
9784 gcov_ctr_summary struct.
9785 (afdo_callsite_hot_enough_for_early_inline): Likewise.
9786 * coverage.c (struct counts_entry): Likewise.
9787 (read_counts_file): Read just single summary entry.
9788 (get_coverage_counts): Use gcov_summary struct.
9789 * coverage.h (get_coverage_counts): Likewise.
9790 * gcov-dump.c (dump_working_sets): Likewise.
9791 (tag_summary): Dump just single summary.
9792 * gcov-io.c (gcov_write_summary): Write just histogram
9794 (gcov_read_summary): Read just single summary.
9795 (compute_working_sets): Use gcov_summary struct.
9796 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9797 of GCOV_COUNTERS_SUMMABLE.
9798 (GCOV_COUNTERS_SUMMABLE): Remove.
9799 (GCOV_FIRST_VALUE_COUNTER): Replace with
9800 GCOV_COUNTER_V_INTERVAL.
9801 (struct gcov_ctr_summary): Remove.
9802 (struct gcov_summary): Directly use fields of former
9804 (compute_working_sets): Use gcov_summary struct.
9805 * gcov.c (read_count_file): Do not use ctrs fields.
9806 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9808 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9810 * profile.c: Likewise.
9811 * profile.h: Likewise.
9813 2018-06-05 Martin Liska <mliska@suse.cz>
9815 PR gcov-profile/84846
9816 * gcov.c (output_lines): Print working directory only
9817 in intermediate format.
9819 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
9821 * config/s390/s390-builtin-types.def: Add void function type.
9822 * config/s390/s390-builtins.def: Use the function type for the
9825 2018-06-04 Jim Wilson <jimw@sifive.com>
9827 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
9829 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
9830 and maybe_eh_return. Change regno to unsigned int. Use new args to
9831 handle EH_RETURN_DATA_REGNO registers properly.
9832 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
9833 (riscv_expand_epilogue): Update comment. Change argument name and
9834 type. Update code to use new name and type. Pass new args to
9835 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
9837 * config/riscv/riscv.md (NORMAL_RETURN): New.
9838 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
9839 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
9840 (eh_return): Call gen_eh_return_internal and emit barrier.
9841 (eh_return_internal): Call riscv_expand_epilogue.
9843 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
9845 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
9846 bit_insertion field and declare can_be_merged_into method.
9847 (merged_store_group::can_be_merged_into): New method.
9848 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9849 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
9850 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9852 2018-06-04 Richard Biener <rguenther@suse.de>
9854 PR tree-optimization/85955
9855 * builtins.c (fold_builtin_sincos): Convert pointers to
9856 destination to appropriate type before dereferencing.
9858 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
9860 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9862 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
9864 * expr.c (expand_expr_real_1): Force the operand into memory if
9865 its TYPE_MODE is BLKmode and if there is no integer mode for
9866 the number of bits being extracted.
9868 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9872 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9873 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9875 2018-06-04 Richard Biener <rguenther@suse.de>
9877 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9878 (cleanup_tree_cfg_noloop): ... single caller. Do
9879 start_recording_case_labels later.
9881 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
9883 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9884 to _IMMINTRIN_H_INCLUDED.
9885 * config/i386/pconfigintrin.h: Ditto.
9886 * config/i386/waitpkgintrin.h: Ditto.
9887 * config/i386/immintrin.h: Add includes for sgxintrin.h,
9888 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9889 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9890 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9891 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9892 waitpkgintrin.h and cldemoteintrin.h.
9894 2018-06-04 Richard Biener <rguenther@suse.de>
9896 PR tree-optimization/86038
9897 * tracer.c (find_best_successor): Check probability for
9898 being initialized, bail out if not.
9900 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
9903 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9904 of bits to ignore when comparing architectures.
9906 2018-06-04 Jakub Jelinek <jakub@redhat.com>
9908 PR tree-optimization/69615
9909 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
9910 maximum or minimum of the type, try to merge it also as if
9911 range1 is + [-, x - 1] or + [x + 1, -].
9914 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
9916 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
9918 PR tree-optimization/86034
9919 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
9920 the unsigned bitfield type in a bit insertion sequence if it does not
9921 have a larger precision than the bitfield size.
9922 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
9924 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
9926 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
9928 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9930 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
9931 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
9932 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
9933 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
9935 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
9937 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
9938 Disable -fdelete-null-pointer-checks for ELF toolchain.
9940 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9941 Kito Cheng <kito.cheng@gmail.com>
9943 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
9944 (nds32le-*-*, nds32be-*-*): Integrate checking process.
9945 (nds32*-*-*): Add glibc and uclibc conditions.
9946 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
9947 (TARGET_EXCEPT_UNWIND_INFO): Define.
9948 * config/nds32/elf.h: New file.
9949 * config/nds32/linux.h: New file.
9950 * config/nds32/nds32-elf.opt: New file.
9951 * config/nds32/nds32-linux.opt: New file.
9952 * config/nds32/nds32-fp-as-gp.c
9953 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
9954 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
9956 (nds32_asm_file_end): Ditto.
9957 (nds32_print_operand): Ditto.
9958 (nds32_insert_attributes): Ditto.
9959 (nds32_init_libfuncs): New function.
9960 (TARGET_HAVE_TLS): Define.
9961 (TARGET_INIT_LIBFUNCS): Define.
9962 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
9964 (TARGET_ELF): Apply different mcmodel setting.
9965 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
9966 been migrated into elf.h and linux.h files.
9967 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
9968 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
9969 (mcmodel): The content has been migrated into nds32-elf.opt and
9970 nds32-linux.opt files.
9971 * config/nds32/t-elf: New file.
9972 * config/nds32/t-linux: New file.
9974 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
9975 Shiva Chen <shiva0217@gmail.com>
9977 * config/nds32/constants.md (unspec_volatile_element): Add
9978 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
9979 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
9981 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
9982 (make_pass_nds32_fp_as_gp): Declare.
9983 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
9985 (nds32_asm_function_end_prologue): Remove unused asm output.
9986 (nds32_asm_function_begin_epilogue): Remove unused asm output.
9987 (nds32_asm_file_start): Output necessary fp_as_gp information.
9988 (nds32_option_override): Adjust register usage.
9989 (nds32_expand_prologue): Consider fp_as_gp situation.
9990 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
9991 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
9994 (simple_return): Ditto.
9995 (omit_fp_begin): Output special directive for fp_as_gp.
9996 (omit_fp_end): Output special directive for fp_as_gp.
9997 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9998 mforbid-fp-as-gp): New options.
10000 2018-06-01 Mark Wielaard <mark@klomp.org>
10002 * dwarf2out.c (dwarf2out_finish): Remove generation of
10003 DW_AT_loclists_base.
10005 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10007 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10008 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10009 (struct merged_store_group): Add bit_insertion field.
10010 (dump_char_array): Use standard hexadecimal format.
10011 (merged_store_group::merged_store_group): Set bit_insertion to false.
10012 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10013 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10014 also print the mask in the dump file.
10015 (pass_store_merging::gate): Minor tweak.
10016 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10017 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10018 stores with INTEGER_CST stores.
10019 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10020 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10021 and use it throughout. Generate bit insertion sequences if need be.
10022 (pass_store_merging::process_store): Remove redundant condition.
10023 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10025 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10027 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10028 the 128-bit floating point types. Fix function comment.
10030 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10032 * config/aarch64/aarch64-simd.md
10033 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10035 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10038 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10040 PR tree-optimization/85989
10041 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10043 (backprop::intersect_uses): Check it when deciding whether this
10044 is a backedge reference.
10045 (backprop::process_block): Add each phi to m_visited_phis
10046 after visiting it, then clear it at the end.
10048 2018-06-01 Richard Biener <rguenther@suse.de>
10050 * tree-vectorizer.h (vect_dr_stmt): New function.
10051 (vect_get_load_cost): Adjust.
10052 (vect_get_store_cost): Likewise.
10053 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10054 Use vect_dr_stmt instead of DR_SMTT.
10055 (vect_record_base_alignments): Likewise.
10056 (vect_calculate_target_alignment): Likewise.
10057 (vect_compute_data_ref_alignment): Likewise and make static.
10058 (vect_update_misalignment_for_peel): Likewise.
10059 (vect_verify_datarefs_alignment): Likewise.
10060 (vector_alignment_reachable_p): Likewise.
10061 (vect_get_data_access_cost): Likewise. Pass down
10062 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10063 (vect_get_peeling_costs_all_drs): Likewise.
10064 (vect_peeling_hash_get_lowest_cost): Likewise.
10065 (vect_enhance_data_refs_alignment): Likewise.
10066 (vect_find_same_alignment_drs): Likewise.
10067 (vect_analyze_data_refs_alignment): Likewise.
10068 (vect_analyze_group_access_1): Likewise.
10069 (vect_analyze_group_access): Likewise.
10070 (vect_analyze_data_ref_access): Likewise.
10071 (vect_analyze_data_ref_accesses): Likewise.
10072 (vect_vfa_segment_size): Likewise.
10073 (vect_small_gap_p): Likewise.
10074 (vectorizable_with_step_bound_p): Likewise.
10075 (vect_prune_runtime_alias_test_list): Likewise.
10076 (vect_analyze_data_refs): Likewise.
10077 (vect_supportable_dr_alignment): Likewise.
10078 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10079 (vect_gen_prolog_loop_niters): Likewise.
10080 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10081 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10083 (vect_recog_mask_conversion_pattern): Likewise.
10084 (vect_try_gather_scatter_pattern): Likewise.
10085 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10086 to vect_get_store_cost.
10087 (vect_get_store_cost): Get stmt_info instead of DR.
10088 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10089 (vect_get_load_cost): Get stmt_info instead of DR.
10091 2018-06-01 Richard Biener <rguenther@suse.de>
10093 PR middle-end/86017
10094 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10095 vars wrapped in MEM_REFs.
10097 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10099 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10100 Fix subreg tests so that we only return a choice between
10101 GENERAL_REGS and FP_REGS if the original classes included both.
10103 2018-06-01 Richard Biener <rguenther@suse.de>
10106 * tree-ssa-structalias.c (get_function_part_constraint):
10107 Handle NULL fi->decl.
10108 (find_func_aliases_for_call): Properly handle indirect
10109 fi from direct call.
10110 (find_func_clobbers): Likewise.
10111 (ipa_pta_execute): Likewise.
10112 (create_variable_info_for): For functions that are ifunc_resolver
10113 resolve to a varinfo that contains the result of the resolver call.
10114 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10117 2018-05-31 Michael Collison <michael.collison@arm.com>
10119 * config/aarch64/aarch64.md:
10120 (*fix_to_zero_extenddfdi2): New pattern.
10121 * gcc.target/aarch64/fix_extend1.c: New testcase.
10123 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10125 PR middle-end/78809
10126 PR middle-end/83026
10127 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10128 and BUILT_IN_STRNCMP_EQ.
10129 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10130 BUILT_IN_STRNCMP_EQ.
10131 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10132 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10133 (gimple_fold_builtin): Likewise.
10134 * tree-ssa-strlen.c (compute_string_length): New function.
10135 (determine_min_obsize): New function.
10136 (handle_builtin_string_cmp): New function to handle calls to
10137 string compare functions.
10138 (strlen_optimize_stmt): Add handling to builtin string compare
10140 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10141 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10142 * tree.c (build_common_builtin_nodes): Add new defines of
10143 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10145 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10148 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10149 functions with naked attribute.
10151 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10153 * config/i386/sse.md (avx_vec_concat<mode>):
10154 Substitute concat_tg_mode mode attribute with xtg_mode.
10155 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10156 (concat_tg_mode): Remove mode attribute.
10158 2018-05-31 Martin Sebor <msebor@redhat.com>
10161 * calls.c (alloc_max_size): Correct a logic error/typo.
10162 Treat excessive arguments as infinite. Warn for invalid arguments.
10163 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10165 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10168 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10169 and movx for Haswell.
10171 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10172 Cesar Philippidis <cesar@codesourcery.com>
10174 PR middle-end/85879
10175 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10176 when emitting error on private/firstprivate reductions.
10177 * omp-low.c (lower_omp_target): Avoid reference-type processing
10178 on pointers for firstprivate clause.
10180 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10182 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10185 * config/aarch64/aarch64-simd.md
10186 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10187 (aarch64_ld1_x3_<mode>): Likewise
10188 (aarch64_st1x2<VALLDIF:mode>): Likewise
10189 (aarch64_st1_x2_<mode>): Likewise
10190 (aarch64_st1x3<VALLDIF:mode>): Likewise
10191 (aarch64_st1_x3_<mode>): Likewise
10192 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10193 (vld1_s8_x3): Likewise.
10194 (vld1_u16_x3): Likewise.
10195 (vld1_s16_x3): Likewise.
10196 (vld1_u32_x3): Likewise.
10197 (vld1_s32_x3): Likewise.
10198 (vld1_u64_x3): Likewise.
10199 (vld1_s64_x3): Likewise.
10200 (vld1_f16_x3): Likewise.
10201 (vld1_f32_x3): Likewise.
10202 (vld1_f64_x3): Likewise.
10203 (vld1_p8_x3): Likewise.
10204 (vld1_p16_x3): Likewise.
10205 (vld1_p64_x3): Likewise.
10206 (vld1q_u8_x3): Likewise.
10207 (vld1q_s8_x3): Likewise.
10208 (vld1q_u16_x3): Likewise.
10209 (vld1q_s16_x3): Likewise.
10210 (vld1q_u32_x3): Likewise.
10211 (vld1q_s32_x3): Likewise.
10212 (vld1q_u64_x3): Likewise.
10213 (vld1q_s64_x3): Likewise.
10214 (vld1q_f16_x3): Likewise.
10215 (vld1q_f32_x3): Likewise.
10216 (vld1q_f64_x3): Likewise.
10217 (vld1q_p8_x3): Likewise.
10218 (vld1q_p16_x3): Likewise.
10219 (vld1q_p64_x3): Likewise.
10220 (vst1_s64_x2): Likewise.
10221 (vst1_u64_x2): Likewise.
10222 (vst1_f64_x2): Likewise.
10223 (vst1_s8_x2): Likewise.
10224 (vst1_p8_x2): Likewise.
10225 (vst1_s16_x2): Likewise.
10226 (vst1_p16_x2): Likewise.
10227 (vst1_s32_x2): Likewise.
10228 (vst1_u8_x2): Likewise.
10229 (vst1_u16_x2): Likewise.
10230 (vst1_u32_x2): Likewise.
10231 (vst1_f16_x2): Likewise.
10232 (vst1_f32_x2): Likewise.
10233 (vst1_p64_x2): Likewise.
10234 (vst1q_s8_x2): Likewise.
10235 (vst1q_p8_x2): Likewise.
10236 (vst1q_s16_x2): Likewise.
10237 (vst1q_p16_x2): Likewise.
10238 (vst1q_s32_x2): Likewise.
10239 (vst1q_s64_x2): Likewise.
10240 (vst1q_u8_x2): Likewise.
10241 (vst1q_u16_x2): Likewise.
10242 (vst1q_u32_x2): Likewise.
10243 (vst1q_u64_x2): Likewise.
10244 (vst1q_f16_x2): Likewise.
10245 (vst1q_f32_x2): Likewise.
10246 (vst1q_f64_x2): Likewise.
10247 (vst1q_p64_x2): Likewise.
10248 (vst1_s64_x3): Likewise.
10249 (vst1_u64_x3): Likewise.
10250 (vst1_f64_x3): Likewise.
10251 (vst1_s8_x3): Likewise.
10252 (vst1_p8_x3): Likewise.
10253 (vst1_s16_x3): Likewise.
10254 (vst1_p16_x3): Likewise.
10255 (vst1_s32_x3): Likewise.
10256 (vst1_u8_x3): Likewise.
10257 (vst1_u16_x3): Likewise.
10258 (vst1_u32_x3): Likewise.
10259 (vst1_f16_x3): Likewise.
10260 (vst1_f32_x3): Likewise.
10261 (vst1_p64_x3): Likewise.
10262 (vst1q_s8_x3): Likewise.
10263 (vst1q_p8_x3): Likewise.
10264 (vst1q_s16_x3): Likewise.
10265 (vst1q_p16_x3): Likewise.
10266 (vst1q_s32_x3): Likewise.
10267 (vst1q_s64_x3): Likewise.
10268 (vst1q_u8_x3): Likewise.
10269 (vst1q_u16_x3): Likewise.
10270 (vst1q_u32_x3): Likewise.
10271 (vst1q_u64_x3): Likewise.
10272 (vst1q_f16_x3): Likewise.
10273 (vst1q_f32_x3): Likewise.
10274 (vst1q_f64_x3): Likewise.
10275 (vst1q_p64_x3): Likewise.
10277 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10279 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10280 user_label_prefix to name.
10282 * tree-core.h: Update comment about the format of NAME string
10283 passed to handler in attribute_spec.
10285 * config/msp430/msp430.md: Remove erroneous subreg expression from
10286 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10287 zero_extend{q,h}isi2.
10289 2018-05-30 Borislav Petkov <bp@suse.de>
10291 * doc/extend.texi: Document some architecture specific
10292 constraints and sort entries.
10294 2018-05-30 Martin Sebor <msebor@redhat.com>
10296 PR middle-end/85369
10297 * builtins.c (expand_builtin_stpcpy_1): New function.
10298 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10299 only if the former succeeds.
10301 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10303 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10306 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10308 * doc/invoke.texi (-flinker-output): Document
10310 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10312 * passes.c (ipa_write_summaries): Only modify statements if body
10314 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10315 incrementally linking.
10316 (ipa_passes): Likewise.
10317 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10318 pass down resolution info.
10319 * common.opt (flag_incremental_link): Update info.
10320 * gcc.c (plugin specs): Turn flinker-output=* to
10321 -plugin-opt=-linker-output-known
10322 * toplev.c (compile_file): Also cut compilation when doing incremental
10324 * flag-types. (enum lto_partition_model): Add
10325 LTO_LINKER_OUTPUT_NOLTOREL.
10326 (invoke.texi): Add -flinker-output docs.
10327 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10328 link same way as WPA; do not stream in dead initializers.
10330 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10331 darf2out_register_external_decl): Support incremental link.
10333 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10335 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10337 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10339 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10340 it down to simple_object_copy_lto_debug_sections.
10341 (run_gcc): Determine incremental LTO link time and configure
10342 lto1 into non-wpa mode, disable renaming of debug sections.
10344 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10346 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10347 descriptions of various incorrectly documented functions.
10349 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10352 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10353 address check not strict.
10355 2018-05-30 Richard Biener <rguenther@suse.de>
10357 PR tree-optimization/85964
10358 * tracer.c (better_p): Drop initialized count check, we only
10359 call the function with initialized counts now.
10360 (find_best_successor): Do find a best edge if one
10361 has uninitialized count.
10362 (find_best_predecessor): Likewise. Do BB frequency check only
10363 if count is initialized.
10365 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10367 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10368 (aarch64_ldrstr_offset_compare): New.
10369 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10370 load/store orderings.
10371 (aarch64_gen_adjusted_ldpstp): Likewise.
10373 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
10375 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10376 Check for subset of GENERAL_REGS and FP_REGS.
10377 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10380 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
10382 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10383 and wi::to_poly_offset. Add the current offset and then check
10384 whether the sum fits, rather than using an unchecked addition of
10385 a checked term. Check for a shwi rather than a uhwi.
10386 * expr.c (get_bit_range): Use tree_to_poly_uint64.
10387 (store_constructor): Use poly_int_tree_p.
10388 (expand_expr_real_1): Likewise.
10389 * function.c (assign_temp): Likewise.
10390 * fold-const.c (const_binop): Use poly_int_tree_p and
10391 wi::to_poly_offset.
10392 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
10394 * ipa-icf-gimple.c (func_checker::compare_operand): Use
10395 to_poly_offset for MEM offsets.
10396 * ipa-icf.c (sem_variable::equals): Likewise.
10397 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10398 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10399 wi::to_poly_offset for BIT_FIELD_REF offsets.
10400 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10401 wi::to_poly_offset.
10402 * var-tracking.c (emit_note_insn_var_location): Use
10403 tree_to_poly_uint64.
10405 2018-05-29 Jim Wilson <jimw@sifive.com>
10407 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10409 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
10412 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10413 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10415 (sse4_1_round<mode>2): Use nonimmediate_operand
10416 for operand 1 predicate.
10418 2018-05-29 Martin Sebor <msebor@redhat.com>
10419 Richard Biener <rguenther@suse.de>
10422 * calls.c (get_size_range): Call determine_value_range instead
10423 of get_value_range..
10424 * tree-vrp.h (determine_value_range): Declared new function.
10425 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10427 2018-05-29 Richard Biener <rguenther@suse.de>
10429 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10430 sure to use non-pattern stmts for get_earlier_stmt arguments.
10431 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10432 called on pattern stmts.
10433 (get_later_stmt): Likewise.
10435 2018-05-29 Martin Liska <mliska@suse.cz>
10437 PR gcov-profile/85759
10438 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10441 2018-05-29 Jakub Jelinek <jakub@redhat.com>
10443 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10445 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10449 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10450 VEC_PACK_FLOAT_EXPR): New tree codes.
10451 * tree-pretty-print.c (op_code_prio): Handle
10452 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10453 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10454 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10455 * tree-inline.c (estimate_operator_cost): Likewise.
10456 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10457 * fold-const.c (const_binop): Likewise.
10458 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10459 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10460 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10461 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10462 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10463 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10464 * expr.c (expand_expr_real_2): Likewise.
10465 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10466 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10467 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10469 * optabs.c (expand_widen_pattern_expr): For
10470 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10471 sign from result type rather than operand's type.
10472 (expand_binop_directly): For vec_packu_float_optab and
10473 vec_packs_float_optab allow result type to be different from operand's
10475 * optabs-tree.c (optab_for_tree_code): Handle
10476 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10477 VEC_PACK_FLOAT_EXPR. Formatting fixes.
10478 * tree-vect-generic.c (expand_vector_operations_1): Handle
10479 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10480 VEC_PACK_FLOAT_EXPR.
10481 * tree-vect-stmts.c (supportable_widening_operation): Handle
10483 (supportable_narrowing_operation): Handle FLOAT_EXPR.
10484 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10485 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10486 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
10487 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10489 (vec_pack<floatprefix>_float_<mode>): New expander.
10490 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10492 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10493 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10494 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10495 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10496 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10498 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10499 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10500 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10501 VEC_PACK_FLOAT_EXPR): Document.
10503 2018-05-29 Richard Biener <rguenther@suse.de>
10505 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10507 (stmt_vec_info_vec): Make pointer.
10508 (init_stmt_vec_info_vec): Remove.
10509 (free_stmt_vec_info_vec): Likewise.
10510 (set_stmt_vec_info_vec): New function.
10511 (free_stmt_vec_infos): Likewise.
10512 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10513 (set_vinfo_for_stmt): Likewise.
10514 (get_earlier_stmt): Likewise.
10515 (get_later_stmt): Likewise.
10516 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10517 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10518 (vec_info::~vec_info): Free stmt_vec_infos.
10519 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10520 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10521 (pass_slp_vectorize::execute): Likewise.
10522 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10523 (free_stmt_vec_info_vec): Likewise.
10524 (set_stmt_vec_info_vec): New function.
10525 (free_stmt_vec_infos): Likewise.
10526 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10527 the global stmt_vec_info_vec.
10528 * tree-parloops.c (gather_scalar_reductions): Use
10529 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10532 2018-05-29 Richard Biener <rguenther@suse.de>
10534 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10536 2018-05-29 Martin Liska <mliska@suse.cz>
10537 David Malcolm <dmalcolm@redhat.com>
10539 * vec.c (test_reverse): New.
10540 (vec_c_tests): Add new test.
10541 * vec.h (vl_ptr>::reverse): New function.
10543 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
10545 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10547 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10550 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
10552 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10554 2018-05-28 Richard Biener <rguenther@suse.de>
10556 PR tree-optimization/85933
10557 * tree-vect-data-refs.c (vect_record_base_alignments): Only
10558 look at stmts marked as vectorizable.
10560 2018-05-28 Richard Biener <rguenther@suse.de>
10562 PR tree-optimization/85934
10563 * tree-vect-generic.c (expand_vector_operations_1): Hoist
10564 vector boolean check before scalar optimization.
10566 2018-05-28 Jakub Jelinek <jakub@redhat.com>
10568 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10571 2018-05-28 Mark Wielaard <mark@klomp.org>
10573 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10574 if it is an expression containing a minus sign.
10576 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
10578 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10580 2018-05-27 Paul Koning <ni1d@arrl.net>
10582 * config/pdp11/pdp11.md (truncsihi2): Remove.
10584 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
10585 Chung-Ju Wu <jasonwucj@gmail.com>
10587 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10589 (unaligned_store_dw): Ditto.
10590 * config/nds32/nds32-memory-manipulation.c
10591 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10592 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10593 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10594 (emit_setmem_word_loop): Rename to ...
10595 (emit_setmem_doubleword_loop): ... this.
10596 (nds32_gen_dup_4_byte_to_word_value): New function.
10597 (nds32_gen_dup_8_byte_to_double_word_value): New function.
10598 (nds32_expand_setmem_loop): Refine implementation.
10599 (nds32_expand_setmem_loop_v3m): Ditto.
10600 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10603 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10605 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10607 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
10609 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10610 (nds32_init_machine_status): Initialize machine->attr_naked_p and
10611 machine->attr_no_prologue_p.
10612 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10613 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10614 (nds32_expand_epilogue): Consider attr_naked_p.
10615 (nds32_expand_epilogue_v3pop): Likewise.
10616 (nds32_can_use_return_insn): Likewise.
10617 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10618 attr_no_prologue_p fields.
10619 * config/nds32/nds32.opt (mret-in-naked-func): New option.
10621 2018-05-27 Jakub Jelinek <jakub@redhat.com>
10624 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10626 * config/i386/sse.md
10627 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10629 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10631 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10633 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10635 (*<floatsuffix>floatv2div2sf2): Rename to ...
10636 (*float<floatunssuffix>v2div2sf2): ... this.
10637 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10638 (float<floatunssuffix>v2div2sf2_mask): ... this.
10639 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10640 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10641 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10643 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10645 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10647 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10649 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10651 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10653 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10654 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10655 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10656 gen_ufix_truncv8dfv8si2.
10657 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10658 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10659 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10660 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10661 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10662 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10663 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10664 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10666 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10670 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10672 2018-05-25 Jim Wilson <jimw@sifive.com>
10674 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10675 * config/riscv/riscv.c (struct machine_function): Add
10676 interrupt_handler_p and attribute_checked_p fields.
10677 (riscv_attribute_table): Add interrupt.
10678 (riscv_interrupt_type_p): New.
10679 (riscv_save_reg_p): Save extra regs for interrupt handler.
10680 (riscv_use_save_libcall): Return false for interrupt handler.
10681 (riscv_first_stack_step): Add forward declaration.
10682 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
10683 for interrupt handler with large frame. Use it for saved reg list.
10684 (riscv_expand_prologue): Move flag_stack_usage_info support to
10685 eliminate duplication.
10686 (riscv_expand_epilogue): Generate mret for interrupt handler.
10687 (riscv_epilogue_uses): New.
10688 (riscv_can_use_return_insn): Return false for interrupt handler.
10689 (riscv_function_ok_for_sibcall): Likewise.
10690 (riscv_set_current_function): Add interrupt handler support.
10691 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10692 * config/riscv/riscv.md (UNSPECV_MRET): New.
10694 (riscv_frflags, riscv_fsflags): Use tab after opcode.
10696 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10698 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
10700 PR tree-optimization/85712
10701 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10702 this candidate has already been replaced in-situ by a copy.
10704 2018-05-25 Jason Merrill <jason@redhat.com>
10706 PR c++/80485 - inline function non-zero address.
10707 * symtab.c (nonzero_address): Check DECL_COMDAT.
10709 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
10712 * config/alpha/alpha.md (ashlsi3): New insn pattern.
10713 (*ashlsi_se): Rename from *ashldi_se. Define as sign
10714 extension of SImode operation. Use const123_operand predicate.
10715 (*saddsi_1): Remove.
10716 (*saddl_se_1): Ditto.
10717 (*ssubsi_1): Ditto.
10718 (*ssubl_se_1): Ditto.
10719 * config/alpha/predicates.md (const123_operand): New predicate.
10720 * config/alpha/constraints.md (P): Use IN_RANGE.
10722 2018-05-25 Richard Biener <rguenther@suse.de>
10724 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10726 (ref_maybe_used_by_stmt_p): Likewise.
10727 (stmt_may_clobber_ref_p): Likewise.
10728 (stmt_may_clobber_ref_p_1): Likewise.
10729 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10731 (ref_maybe_used_by_stmt_p): Likewise.
10732 (stmt_may_clobber_ref_p): Likewise.
10733 (stmt_may_clobber_ref_p_1): Likewise.
10734 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10735 the alias oracle to disambiguate DRs with stmts DR analysis
10737 (vect_analyze_data_refs): Do not give up on not analyzable
10738 DRs for BB vectorization. Remove code truncating the dataref
10741 2018-05-25 Jakub Jelinek <jakub@redhat.com>
10744 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10745 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
10746 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10748 2018-05-25 Richard Biener <rguenther@suse.de>
10750 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10751 function, combining stmt data ref gathering and fatal analysis
10753 (vect_analyze_data_refs): Remove now redudnant code and simplify.
10754 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10755 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10756 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10757 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10759 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10761 PR tree-optimization/85720
10762 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10763 SCC if all partitions are builtins.
10764 (version_loop_by_alias_check): New parameter. Generate cancelable
10765 runtime alias check if all partitions are builtins.
10766 (distribute_loop): Update call to above function.
10768 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10770 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10771 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10772 (parm_default_def_partition_arg): Ditto.
10773 (set_parm_default_def_partition): Ditto.
10774 (get_parm_default_def_partitions): Ditto and make it static.
10775 (get_undefined_value_partitions): Ditto and make it static.
10776 (remove_ssa_form): Refactor call to init_var_map here.
10777 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10778 computation for loop region.
10779 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10780 (register_default_def): Delete.
10781 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10782 (parm_default_def_partition_arg): Ditto.
10783 (set_parm_default_def_partition): Ditto.
10784 (get_parm_default_def_partitions): Ditto and make it static.
10785 (get_undefined_value_partitions): Ditto and make it static.
10786 (coalesce_with_default, coalesce_with_default): Update comment.
10787 (create_coalesce_list_for_region): New func factored out from
10788 create_outofssa_var_map.
10789 (populate_coalesce_list_for_outofssa): New func factored out from
10790 create_outofssa_var_map and coalesce_ssa_name.
10791 (create_outofssa_var_map): Delete.
10792 (coalesce_ssa_name): Refactor to support live range computation.
10793 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10794 (get_parm_default_def_partitions): Delete.
10795 (get_undefined_value_partitions): Ditto.
10796 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10797 computation for loop region.
10798 (new_tree_live_info, loe_visit_block): Ditto.
10799 (live_worklist, set_var_live_on_entry): Ditto.
10800 (calculate_live_on_exit, verify_live_on_entry): Ditto.
10801 * tree-ssa-live.h (struct _var_map): New fields.
10802 (init_var_map): Change decl.
10803 (region_contains_p): New.
10805 2018-05-25 Bin Cheng <bin.cheng@arm.com>
10807 * tree-ssa-live.h (live_merge_and_clear): Delete.
10809 2018-05-25 Richard Biener <rguenther@suse.de>
10812 * tree-dump.c (dequeue_and_dump): Remove access to removed
10813 operand 2 of a SWITCH_EXPR.
10815 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10817 * doc/sourcebuild.texi (vect_double_cond_arith): Include
10818 multiplication and division.
10819 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
10820 (cond_udiv@var{m}, cond_umod@var{m}): Document.
10821 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
10822 (cond_udiv_optab, cond_umod_optab): New optabs.
10823 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10824 (IFN_COND_RDIV): New internal functions.
10825 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
10826 TRUNC_MOD_EXPR and RDIV_EXPR.
10827 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
10828 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
10830 (SVE_INT_BINARY): Include mult.
10831 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
10832 (optab, sve_int_op): Handle mult.
10833 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
10835 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
10836 for SVE_INT_BINARY_SD.
10838 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10840 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
10841 (optab, sve_int_op): Handle div and udiv.
10842 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
10843 for SVE_INT_BINARY_SD.
10844 (*<optab><mode>3): New insn for the same.
10846 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10848 * tree-vect-patterns.c: Include predict.h.
10849 (vect_recog_divmod_pattern): Restrict check for division support
10850 to when optimizing for size.
10852 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10854 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10855 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10856 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10857 (gimple_match_op::set_op): Likewise.
10858 (gimple_resimplify4): Declare.
10859 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10860 (expr::gen_transform): Likewise.
10861 (decision_tree::gen): Generate a simplification routine for 4 operands.
10862 * gimple-match-head.c (gimple_simplify): Add an overload for
10863 4 operands. In the top-level function, handle up to 4 call
10864 arguments and call gimple_resimplify4.
10865 (gimple_resimplify4): New function.
10866 (build_call_internal): Pass a fourth operand.
10867 (maybe_push_to_seq): Likewise.
10868 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10869 Fold VEC_COND_EXPRs of an operation and a default value into
10870 an IFN_COND_* function if possible.
10871 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10873 (SVE_COND_FP_BINARY): Include them.
10874 (optab, sve_fp_op): Handle them.
10875 (SVE_INT_BINARY_REV): New code iterator.
10876 (SVE_COND_FP_BINARY_REV): New int iterator.
10877 (commutative): New int attribute.
10878 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10880 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10882 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10883 (*cond_<optab><mode>): New patterns for reversed operands.
10885 2018-05-25 Richard Biener <rguenther@suse.de>
10887 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10888 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10889 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10890 (STMT_VINFO_GROUPED_ACCESS): Adjust.
10891 * tree-vect-data-refs.c (everywhere): Adjust users.
10892 * tree-vect-loop.c (everywhere): Likewise.
10893 * tree-vect-slp.c (everywhere): Likewise.
10894 * tree-vect-stmts.c (everywhere): Likewise.
10895 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10897 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10899 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10901 (gcc_cv_as_section_exclude): ... this.
10902 Try Solaris as #exclude syntax.
10903 * configure: Regenerate.
10904 * config.in: Regenerate.
10905 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10907 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
10908 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
10910 * varasm.c (default_elf_asm_named_section): Don't check if
10911 HAVE_GAS_SECTION_EXCLUDE is defined.
10913 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10915 * doc/md.texi: Update the documentation of the cond_* optabs
10916 to mention the new final operand. Fix GET_MODE_NUNITS call.
10917 Describe the scalar case too.
10918 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
10919 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
10921 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
10922 (get_conditional_internal_fn): Update comment.
10923 * tree-vect-loop.c (vectorizable_reduction): Pass the original
10924 accumulator value as a final argument to conditional functions.
10925 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
10926 a define_expand and add an "else" operand. Assert for now that
10927 the else operand is equal to operand 2. Use SVE_INT_BINARY and
10928 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
10929 (*cond_<optab><mode>): New patterns.
10930 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
10931 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10932 (UNSPEC_COND_EOR): Delete.
10933 (optab): Remove associated mappings.
10934 (SVE_INT_BINARY): New code iterator.
10935 (sve_int_op): Remove int attribute and add "minus" to the code
10937 (SVE_COND_INT_OP): Delete.
10938 (SVE_COND_FP_OP): Rename to...
10939 (SVE_COND_FP_BINARY): ...this.
10941 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
10943 * optabs.c (can_reuse_operands_p): New function.
10944 (maybe_legitimize_operands): Try to reuse the results for
10947 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10949 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
10950 Add {q} suffix to insn mnemonic.
10952 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10954 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
10955 (msp430_warn_func_return): New.
10957 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
10959 * fold-const.c (tree_nonzero_bits): New function.
10960 * fold-const.h (tree_nonzero_bits): Likewise.
10961 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
10962 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
10964 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
10968 * varasm.c (assemble_alias): Check ifunc_resolver only on
10971 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
10974 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
10975 when memory input operand is handled.
10977 2018-05-24 Luis Machado <luis.machado@linaro.org>
10979 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
10981 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
10983 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10985 * match.pd: Delay FMA folds until after vectorization.
10987 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
10990 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10991 address check not strict.
10993 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
10995 * gimple-match.h (gimple_match_op): New class.
10996 (mprts_hook): Replace parameters with a gimple_match_op *.
10997 (maybe_build_generic_op): Likewise.
10998 (gimple_simplified_result_is_gimple_val): Replace parameters with
10999 a const gimple_match_op *.
11000 (gimple_simplify): Replace code_helper * and tree * parameters with
11001 a gimple_match_op * parameter.
11002 (gimple_resimplify1): Replace code_helper *, tree and tree *
11003 parameters with a gimple_match_op * parameter.
11004 (gimple_resimplify2): Likewise.
11005 (gimple_resimplify3): Likewise.
11006 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11007 parameters with a gimple_match_op * parameter.
11008 * gimple-match-head.c (gimple_simplify): Change prototypes of
11009 auto-generated functions to take a gimple_match_op * instead of
11010 separate code_helper * and tree * parameters. Make the same
11011 change in the top-level overload and update calls to the
11012 gimple_resimplify routines. Update calls to the auto-generated
11013 functions and to maybe_push_res_to_seq in the publicly-facing
11014 operation-specific gimple_simplify overloads.
11015 (gimple_match_op::MAX_NUM_OPS): Define.
11016 (gimple_resimplify1): Replace rcode and ops with a single res_op
11017 parameter. Update call to gimple_simplify.
11018 (gimple_resimplify2): Likewise.
11019 (gimple_resimplify3): Likewise.
11020 (mprts_hook): Replace parameters with a gimple_match_op *.
11021 (maybe_build_generic_op): Likewise.
11022 (build_call_internal): Replace type, nargs and ops with
11023 a gimple_match_op *.
11024 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11025 with a single gimple_match_op *. Update calls to mprts_hook,
11026 build_call_internal and gimple_simplified_result_is_gimple_val.
11027 Factor out code that is common to the tree_code and combined_fn cases.
11028 * genmatch.c (expr::gen_transform): Replace tem_code and
11029 tem_ops with a gimple_match_op called tem_op. Update calls
11030 to the gimple_resimplify functions and maybe_push_res_to_seq.
11031 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11032 res_ops. Update call to the gimple_resimplify functions.
11033 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11034 (decision_tree::gen): Make the functions take a gimple_match_op *
11035 called res_op instead of separate res_code and res_ops parameters.
11036 Update call accordingly.
11037 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11038 and ops with a single res_op parameter. Update calls to
11039 maybe_build_generic_op and maybe_push_res_to_seq.
11040 (fold_stmt_1): Update calls to gimple_simplify and
11041 replace_stmt_with_simplification.
11042 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11043 and gimple_simplified_result_is_gimple_val.
11044 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11046 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11047 with a gimple_match_op *.
11048 (vn_nary_build_or_lookup): Likewise. Update call to
11049 vn_nary_build_or_lookup_1.
11050 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11051 gimple_match_op *. Update calls to the gimple_resimplify routines
11052 and to gimple_simplified_result_is_gimple_val.
11053 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11054 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11055 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11056 (visit_nary_op): Likewise.
11057 (visit_reference_op_load): Likewise.
11059 2018-05-23 Luis Machado <luis.machado@linaro.org>
11061 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11062 modifier for printing the step amount.
11064 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11067 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11070 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11072 * doc/sourcebuild.texi (Endianness): New subsubsection.
11074 2018-05-23 Luis Machado <luis.machado@linaro.org>
11076 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11077 <prefetch_dynamic_strides>: New const bool field.
11078 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11079 prefetch_dynamic_strides.
11080 (exynosm1_prefetch_tune): Likewise.
11081 (thunderxt88_prefetch_tune): Likewise.
11082 (thunderx_prefetch_tune): Likewise.
11083 (thunderx2t99_prefetch_tune): Likewise.
11084 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11086 (aarch64_override_options_internal): Update to set
11087 PARAM_PREFETCH_DYNAMIC_STRIDES.
11088 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11089 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11090 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11091 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11092 prefetch-dynamic-strides setting.
11094 2018-05-23 Luis Machado <luis.machado@linaro.org>
11096 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11097 <minimum_stride>: New const int field.
11098 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11099 minimum_stride field defaulting to -1.
11100 (exynosm1_prefetch_tune): Likewise.
11101 (thunderxt88_prefetch_tune): Likewise.
11102 (thunderx_prefetch_tune): Likewise.
11103 (thunderx2t99_prefetch_tune): Likewise.
11104 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11105 <default_opt_level>: Set to 3.
11106 (aarch64_override_options_internal): Update to set
11107 PARAM_PREFETCH_MINIMUM_STRIDE.
11108 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11109 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11110 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11111 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11112 stride is constant and is below the minimum stride threshold.
11114 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11116 * config/arm/arm-cpus.in (mode26): Delete.
11117 (armv4): Delete mode26 reference.
11118 * config/arm/arm.c (arm_configure_build_target): Delete use of
11121 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11123 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11125 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11126 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11128 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11129 (floatunsdidf2): Ditto.
11131 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11133 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11134 (fixuns_trunc<mode>si2_avx512f): Ditto.
11135 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11136 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11137 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11139 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11141 PR rtl-optimization/79985
11142 * df-scan.c (df_insn_refs_collect): Remove special case for
11143 global registers and asm statements.
11145 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11147 * extend.texi (Global Register Variables): Rewrite the bullet list.
11148 Note that the register is available for allocation. Note that access
11149 via inline asm must use constraints. Add note about async-signal
11150 handlers. Remove paragraph about automagic register selection.
11152 2018-05-23 Richard Biener <rguenther@suse.de>
11154 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11155 of fixed offset from memset VN.
11157 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11159 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11160 first_interp field.
11161 (alloc_cand_and_find_basis): Initialize first_interp field.
11162 (slsr_process_mul): Modify first_interp field.
11163 (slsr_process_add): Likewise.
11164 (slsr_process_cast): Modify first_interp field for each new
11166 (slsr_process_copy): Likewise.
11167 (dump_candidate): Dump first_interp field.
11168 (replace_mult_candidate): Process all interpretations, not just
11170 (replace_rhs_if_not_dup): Likewise.
11171 (replace_one_candidate): Likewise.
11173 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11175 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11177 (aarch64_needs_frame_chain): New function.
11178 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11180 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11183 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11184 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11185 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11186 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11187 as true for strict-align.
11188 (aarch64_can_inline_p): Perform checks even when callee has no
11189 attributes to check for strict alignment.
11190 * doc/extend.texi (AArch64 Function Attributes): Document
11192 * doc/invoke.texi: (AArch64 Options): Likewise.
11194 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11196 PR tree-optimization/85853
11197 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11198 the handling of the root of the node to...
11199 (vect_slp_analyze_node_operations_1): ...this new function,
11200 and run the whole thing with the child nodes' def types
11201 set according to their SLP node's def type.
11203 2018-05-23 Richard Biener <rguenther@suse.de>
11205 PR middle-end/85874
11206 * tree-data-ref.c (create_runtime_alias_checks): Defer
11207 and ignore overflow warnings.
11209 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11211 PR tree-optimization/85822
11212 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11215 2018-05-23 Richard Biener <rguenther@suse.de>
11217 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11218 memset constants via native_interpret_expr.
11220 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11223 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11225 (cgraph_node::create_alias): Likewise.
11226 (cgraph_node::get_availability): Check ifunc_resolver instead
11227 of looking up ifunc attribute.
11228 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11229 * varasm.c (do_assemble_alias): Likewise.
11230 (assemble_alias): Likewise.
11231 (default_binds_local_p_3): Likewise.
11232 * cgraph.h (cgraph_node): Add ifunc_resolver.
11233 (cgraph_node::only_called_directly_or_aliased_p): Return false
11234 for IFUNC resolver.
11235 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11237 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11238 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11239 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11240 instead of looking up ifunc attribute.
11242 2018-05-22 Luis Machado <luis.machado@linaro.org>
11244 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11246 2018-05-22 Martin Sebor <msebor@redhat.com>
11248 PR middle-end/85359
11249 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11250 only when expasion succeeds.
11251 (expand_builtin_strcmp): Same.
11252 (expand_builtin_strncmp): Same.
11254 2018-05-22 Martin Sebor <msebor@redhat.com>
11256 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11258 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11259 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11261 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11262 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11264 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11265 Add check for legitimate_address.
11266 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11267 (aarch64_swap_ldrstr_operands): New.
11268 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11271 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11272 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11274 * config/aarch64/aarch64.md: New patterns to generate stp
11276 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11277 single words and double words.
11278 (load_pair_sw, load_pair_dw): Likewise.
11279 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11281 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11283 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11284 for different mode ldpstp and add peephole for merged zero stores.
11285 Likewise for loads.
11286 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11288 (aarch64_gen_store_pair): Rename calls to match new patterns.
11289 (aarch64_gen_load_pair): Rename calls to match new patterns.
11290 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11291 (load_pair<DREG:mode><DREG2:mode>): ... This.
11292 (store_pair<mode>): Rename to...
11293 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11294 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11295 New mode iterators.
11296 (V_INT_EQUIV): Handle SImode.
11297 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11300 2018-05-22 Martin Sebor <msebor@redhat.com>
11303 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11304 or ajust the presumed bound on an operation to avoid unnecessary
11307 2018-05-22 Martin Sebor <msebor@redhat.com>
11309 PR tree-optimization/85826
11310 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11311 assuming that a DECL necesarily has a constant size.
11313 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11315 PR middle-end/85862
11316 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11318 2018-05-22 Richard Biener <rguenther@suse.de>
11320 PR tree-optimization/85834
11321 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11322 non-constant and non-zero memset arguments.
11324 2018-05-22 Martin Liska <mliska@suse.cz>
11327 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11329 2018-05-22 Richard Biener <rguenther@suse.de>
11331 PR tree-optimization/85863
11332 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11333 comparisons when vectype is specified.
11334 (vectorizable_condition): Do not specify vectype for
11335 vect_is_simple_cond when SLP vectorizing.
11337 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11340 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11341 define __ibm128 as long double.
11342 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11343 as a distinct type when IEEE 128-bit support is enabled.
11344 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11345 128-bit types to use the correct functions.
11346 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11347 convert between 128-bit floating point types that have different
11348 modes but the same representation, instead of using gen_lowpart to
11350 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11352 (IFKF_reg): New attributes to give the register constraints for
11354 (extend<mode>tf2_internal): New insns to mark an explicit
11355 conversion between 128-bit floating point types that have a
11356 different mode but share the same representation.
11358 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11360 PR tree-optimization/85814
11361 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11362 a null return from get_strinfo when unsharing the next
11363 strinfo in the chain.
11365 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11368 * varasm.c (weak_finish): Clean up weak_decls.
11370 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11372 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11373 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11374 UNSPEC_UADALP values.
11375 * config/aarch64/iterators.md (ABAL): New int iterator.
11378 (sur): Add mappings for the above.
11379 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11381 (aarch64_<sur>abal<mode>_4): Likewise.
11382 (aarch64_<sur>adalp<mode>_3): Likewise.
11383 (<sur>sadv16qi): New define_expand.
11385 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
11387 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11388 (*movdf_internal): Ditto.
11389 (*rcpsf2_sse): Ditto.
11390 (*rsqrtsf2_sse): Ditto.
11391 (*sqrt<mode>2_sse): Ditto.
11393 2018-05-21 Tamar Christina <tamar.christina@arm.com>
11395 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11397 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11398 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11399 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11400 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11402 * config/aarch64/arm_neon.h: Likewise.
11403 * config/aarch64/iterators.md (VQ_I): New.
11405 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
11407 * config.gcc: Add arc/t-multilib-linux to tmake_file for
11409 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11412 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11414 * config/nds32/constraints.md (S): New constraint.
11415 * config/nds32/nds32.md (call_internal): Use constraint S.
11416 (call_value_internal): Likewise.
11417 (sibcall_internal): Likewise.
11418 (sibcall_value_internal): Likewise.
11420 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11421 Chung-Ju Wu <jasonwucj@gmail.com>
11423 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11424 into consideration.
11426 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11427 Chung-Ju Wu <jasonwucj@gmail.com>
11429 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11430 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11431 (nds32_rtx_costs_impl): Simplify.
11432 (nds32_address_cost_impl): Simplify.
11433 (nds32_init_rtx_costs): New function.
11434 (nds32_rtx_costs_speed_prefer): Likewise.
11435 (nds32_rtx_costs_size_prefer): Likewise.
11436 (nds32_address_cost_speed_prefer): Likewise.
11437 (nds32_address_cost_speed_fwprop): Likewise.
11438 (nds32_address_cost_size_prefer): Likewise.
11439 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11440 * config/nds32/nds32.c (nds32_option_override): Use
11441 nds32_init_rtx_costs function.
11443 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11445 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11446 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11447 (TARGET_PIPELINE_N8): Likewise.
11448 (TARGET_PIPELINE_N10): Likewise.
11449 (TARGET_PIPELINE_N13): Likewise.
11450 (TARGET_PIPELINE_GRAYWOLF): Likewise.
11452 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
11454 * config/nds32/nds32-fpu.md: Update copyright year.
11456 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11458 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11460 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11462 * config/nds32/nds32.c
11463 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11464 * config/nds32/nds32.opt (minline-asm-r15): New option.
11466 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11468 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11470 * config/nds32/nds32.md (abssi2): New pattern.
11472 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
11474 * config/i386/i386.md (rex64namesuffix): New mode attribute.
11475 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11476 Merge insn pattern from sse_cvtsi2ss<round_name> and
11477 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11478 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11479 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11480 using SWI48 mode iterator.
11481 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11482 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11483 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11484 pattern from sse_cvttss2si<round_saeonly_name>
11485 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11486 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11487 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11488 using SWI48 mode iterator.
11489 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11490 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11491 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11492 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11493 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11494 using SWI48 mode iterator.
11495 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11496 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11497 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11498 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11499 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11500 SWI48 mode iterator.
11501 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11502 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11503 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11504 pattern from sse_cvttsd2si<round_saeonly_name>
11505 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11507 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11509 * config/nds32/nds32-md-auxiliary.c
11510 (nds32_valid_smw_lwm_base_p): Refine.
11511 (nds32_output_smw_single_word): Refine.
11512 (nds32_output_smw_double_word): New.
11513 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11515 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11517 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11518 (nds32_output_stack_pop): Refine.
11519 (nds32_expand_unaligned_load): Refine.
11520 (nds32_expand_unaligned_store): Refine.
11522 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11523 Chung-Ju Wu <jasonwucj@gmail.com>
11525 * config/nds32/constants.md: Add TP_REGNUM constant.
11526 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11527 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11529 * config/nds32/nds32-doubleword.md: Consider flag_pic.
11530 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11531 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11532 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11533 and PIC code generation.
11534 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11536 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11538 * config/nds32/nds32.md: Support TLS and PIC.
11539 * config/nds32/nds32.c: Support TLS and PIC.
11540 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11541 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11544 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
11546 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11547 mode with E_ prefix.
11549 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11550 Chung-Ju Wu <jasonwucj@gmail.com>
11552 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11553 * config/nds32/nds32-md-auxiliary.c
11554 (symbolic_reference_mentioned_p): New.
11555 (nds32_legitimize_ict_address): New.
11556 (nds32_expand_ict_move): New.
11557 (nds32_indirect_call_referenced_p): New.
11558 (nds32_symbol_binds_local_p): Delete.
11559 (nds32_long_call_p): Modify.
11560 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11561 * config/nds32/nds32-protos.h
11562 (symbolic_reference_mentioned_p): Declare.
11563 (nds32_legitimize_ict_address): Declare.
11564 (nds32_expand_ict_move): Declare.
11565 (nds32_indirect_call_referenced_p): Declare.
11566 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11567 (nds32_relax_group): Use nds32_ict_const_p as condition.
11568 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11569 (nds32_asm_file_start): Output ict_model directive in asm code.
11570 (nds32_legitimate_address_p): Consider indirect call.
11571 (nds32_print_operand): Consider indirect call.
11572 (nds32_print_operand_address): Consider indirect call.
11573 (nds32_insert_attributes): Handle "indirect_call" attribute.
11574 (TARGET_LEGITIMATE_ADDRESS_P): Define.
11575 (TARGET_LEGITIMATE_CONSTANT_P): Define.
11576 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11577 (TARGET_DELEGITIMIZE_ADDRESS): Define.
11578 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11579 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11580 (TARGET_ICT_MODEL_SMALL): Define.
11581 (TARGET_ICT_MODEL_LARGE): Define.
11582 * config/nds32/nds32.md (movsi): Consider ict model.
11583 (call, call_value): Consider ict model.
11584 (sibcall, sibcall_value): Consider ict model.
11585 * config/nds32/nds32.opt (mict-model): New option.
11586 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11589 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
11590 Monk Chiang <sh.chiang04@gmail.com>
11591 Jim Wilson <jimw@sifive.com>
11593 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11594 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
11595 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11596 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11597 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
11598 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11599 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11600 compute save_libcall_adjustment properly.
11601 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11602 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11603 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11604 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11605 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11606 (ABI_SPEC): Handle mabi=ilp32e.
11607 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11608 (RVE): Add RVE mask.
11609 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11610 <-march>: Add rv32e as an example.
11612 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
11615 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11616 (intra_create_variable_infos): Handle C++ constructors.
11618 2018-05-18 Martin Liska <mliska@suse.cz>
11620 * passes.def: Remove a redundant pass.
11622 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
11625 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11627 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11629 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11631 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11633 (armv2, armv2a, armv3, armv3m): Delete architectures.
11634 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11635 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11636 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11638 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11639 (*mulsidi3adddi): Likewise.
11640 (mulsidi3): Likewise.
11641 (*mulsidi3_nov6): Likewise.
11642 (umulsidi3): Likewise.
11643 (umulsidi3_nov6): Likewise.
11644 (umaddsidi4): Likewise.
11645 (*umulsidi3adddi): Likewise.
11646 (smulsi3_highpart): Likewise.
11647 (*smulsi3_highpart_nov6): Likewise.
11648 (umulsi3_highpart): Likewise.
11649 (*umulsi3_highpart_nov6): Likewise.
11650 * config/arm/arm.h (arm_arch3m): Delete.
11651 * config/arm/arm.c (arm_arch3m): Delete.
11652 (arm_option_override_internal): Update armv3-related comment.
11653 (arm_configure_build_target): Delete use of isa_bit_mode32.
11654 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11655 (arm_rtx_costs_internal): Delete check of arm_arch3m.
11656 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11657 (mulsa3): Likewise.
11658 (mulusa3): Likewise.
11659 * config/arm/arm-protos.h (arm_arch3m): Delete.
11660 * config/arm/arm-tables.opt: Regenerate.
11661 * config/arm/arm-tune.md: Likewise.
11662 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11663 deleted architectures.
11665 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11667 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11668 (armv5t, armv5te): New features.
11669 (ARMv5, ARMv5e): Delete fgroups.
11670 (ARMv5t, ARMv5te): Adjust for above changes.
11671 (ARMv6m): Likewise.
11672 (armv5, armv5e): Delete arches.
11673 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11675 (*call_reg_arm): Likewise.
11676 (*call_value_reg_armv5): Likewise.
11677 (*call_value_reg_arm): Likewise.
11678 (*call_symbol): Likewise.
11679 (*call_value_symbol): Likewise.
11680 (*sibcall_insn): Likewise.
11681 (*sibcall_value_insn): Likewise.
11682 (clzsi2): Likewise.
11683 (prefetch): Likewise.
11684 (define_split and define_peephole2 dependent on arm_arch5):
11686 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11688 (TARGET_ARM_QBIT): Likewise.
11689 (TARGET_DSP_MULTIPLY): Likewise.
11690 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11691 (arm_arch5, arm_arch5e): Delete.
11692 (arm_arch5t, arm_arch5te): Declare.
11693 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11694 (arm_arch5t): Declare.
11695 (arm_option_reconfigure_globals): Update for the above.
11696 (arm_options_perform_arch_sanity_checks): Update comment, replace
11697 use of arm_arch5 with arm_arch5t.
11698 (use_return_insn): Likewise.
11699 (arm_emit_call_insn): Likewise.
11700 (output_return_instruction): Likewise.
11701 (arm_final_prescan_insn): Likewise.
11702 (arm_coproc_builtin_available): Likewise.
11703 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11704 arm_arch5e with arm_arch5t and arm_arch5te.
11705 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11706 (arm_arch5t, arm_arch5te): Declare.
11707 * config/arm/arm-tables.opt: Regenerate.
11708 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11709 * config/arm/t-multilib: Likewise.
11710 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11711 instead of arm_arch5.
11712 (*call_reg_thumb1): Likewise.
11713 (*call_value_reg_thumb1_v5): Likewise.
11714 (*call_value_reg_thumb1): Likewise.
11715 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11717 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11719 2018-05-18 Martin Liska <mliska@suse.cz>
11721 PR gcov-profile/84846
11722 * doc/gcov.texi: Document -t option of gcov tool.
11724 2018-05-18 Martin Liska <mliska@suse.cz>
11726 PR gcov-profile/84846
11727 * gcov.c (print_usage): Add new -t option.
11728 (process_args): Handle the option.
11729 (generate_results): Use stdout as output when requested by
11732 2018-05-18 Martin Liska <mliska@suse.cz>
11734 PR gcov-profile/84846
11735 * coverage.c (coverage_init): Write PWD to .gcno file.
11736 * doc/gcov.texi: Document how working directory is printed.
11737 * gcov-dump.c (dump_gcov_file): Print PWD.
11738 * gcov.c (output_intermediate_file): Likewise.
11739 (read_graph_file): Read PWD string.
11740 (output_lines): Print PWD.
11742 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11744 PR middle-end/85817
11745 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11746 for retval and return false if all args to phi are zero.
11748 2018-05-18 Richard Biener <rguenther@suse.de>
11750 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11752 (evrp_dom_walker::before_dom_children): Call it.
11754 2018-05-18 Richard Biener <rguenther@suse.de>
11756 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11757 results when processing array refs with variable index.
11759 2018-05-18 Toon Moene <toon@moene.org>
11761 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11762 directly after that of -floop-interchange. Indicate that both
11763 options are enabled by default when specifying -O3.
11765 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11767 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11768 iterator. Delete separate integer-mode vec_set<mode> expander.
11769 (aarch64_simd_vec_setv2di): Delete.
11770 (vec_setv2di): Delete.
11771 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11772 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
11773 the "w, r" alternative.
11775 2018-05-18 Martin Liska <mliska@suse.cz>
11777 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11778 * tree-pass.h (make_pass_lower_switch_O0): New function.
11779 * tree-switch-conversion.c (node_has_low_bound): Remove.
11780 (node_has_high_bound): Likewise.
11781 (node_is_bounded): Likewise.
11782 (class pass_lower_switch): Make it a template type and create
11784 (pass_lower_switch::execute): Add template argument.
11785 (make_pass_lower_switch): New function.
11786 (make_pass_lower_switch_O0): New function.
11787 (do_jump_if_equal): Remove.
11788 (emit_case_nodes): Simplify to just handle all 3 cases and leave
11789 all the hard work to tree optimization passes.
11791 2018-05-18 Martin Liska <mliska@suse.cz>
11793 * dbgcnt.c (limit_low): Renamed from limit.
11794 (limit_high): New variable.
11795 (dbg_cnt_is_enabled): Check for upper limit.
11796 (dbg_cnt): Adjust dumping.
11797 (dbg_cnt_set_limit_by_index): Add new argument for high
11799 (dbg_cnt_set_limit_by_name): Likewise.
11800 (dbg_cnt_process_single_pair): Parse new format.
11801 (dbg_cnt_process_opt): Use strtok.
11802 (dbg_cnt_list_all_counters): Remove 'value' and add
11804 * doc/invoke.texi: Document changes.
11806 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
11808 * doc/sourcebuild.texi (scalar_all_fma): Document.
11809 * tree.def (FMA_EXPR): Delete.
11810 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11811 * internal-fn.c (ternary_direct): New macro.
11812 (expand_ternary_optab_fn): Likewise.
11813 (direct_ternary_optab_supported_p): Likewise.
11814 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11815 * builtins.c (fold_builtin_fma): Delete.
11816 (fold_builtin_3): Don't call it.
11817 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11818 * expr.c (expand_expr_real_2): Likewise.
11819 * fold-const.c (operand_equal_p): Likewise.
11820 (fold_ternary_loc): Likewise.
11821 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
11822 * gimple.c (DEFTREECODE): Likewise.
11823 * gimplify.c (gimplify_expr): Likewise.
11824 * optabs-tree.c (optab_for_tree_code): Likewise.
11825 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
11826 * tree-eh.c (operation_could_trap_p): Likewise.
11827 (stmt_could_throw_1_p): Likewise.
11828 * tree-inline.c (estimate_operator_cost): Likewise.
11829 * tree-pretty-print.c (dump_generic_node): Likewise.
11830 (op_code_prio): Likewise.
11831 * tree-ssa-loop-im.c (stmt_cost): Likewise.
11832 * tree-ssa-operands.c (get_expr_operands): Likewise.
11833 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
11834 * fold-const-call.h (fold_fma): Delete.
11835 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
11836 CFN_FNMA and CFN_FNMS.
11837 (fold_fma): Delete.
11838 * genmatch.c (combined_fn): New enum.
11839 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
11840 (commutative_op): New function.
11841 (commutate): Use it. Handle more than 2 operands.
11842 (dt_operand::gen_gimple_expr): Use commutative_op.
11843 (parser::parse_expr): Allow :c to be used with non-binary
11844 operators if the commutative operand is known.
11845 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
11846 CFN_FMS, CFN_FNMA and CFN_FNMS.
11847 (backprop::process_assign_use): Remove FMA_EXPR handling.
11848 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11849 (gen_hsa_fma): New function.
11850 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11851 IFN_FNMA and IFN_FNMS.
11852 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11853 * gimple-fold.h (follow_all_ssa_edges): Declare.
11854 * gimple-fold.c (follow_all_ssa_edges): New function.
11855 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11856 gimple_build interface and use follow_all_ssa_edges to fold the result.
11857 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11858 instead of checking for optabs directly.
11859 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11860 rather than FMA_EXPRs.
11861 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11862 call to IFN_FMA instead of an FMA_EXPR.
11864 2018-05-17 Jim Wilson <jimw@sifive.com>
11866 * expr.c (do_tablejump): When converting index to Pmode, if we have a
11867 sign extended promoted subreg, and the range does not have the sign bit
11868 set, then do a sign extend.
11870 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11871 test, check for sign extended subreg and/or constant operands, and
11872 do a sign extend in that case.
11874 2018-05-17 Steve Ellcey <sellcey@cavium.com>
11876 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11877 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11879 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11880 Change logics_shift_reg to logics_shift_imm.
11881 (thunderx2t99_fp_loadpair_basic): Delete.
11882 (thunderx2t99_fp_storepair_basic): Delete.
11883 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11884 (thunderx2t99_asimd_polynomial): Delete.
11885 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11886 and neon_fp_mul_d_scalar_q.
11887 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11888 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11889 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11890 (thunderx2t99_asimd_lut): Add missing tbl types.
11891 (thunderx2t99_asimd_ext): Delete.
11892 (thunderx2t99_asimd_load1_1_mult): Delete.
11893 (thunderx2t99_asimd_load1_2_mult): Delete.
11894 (thunderx2t99_asimd_load1_ldp): New.
11895 (thunderx2t99_asimd_load1): New.
11896 (thunderx2t99_asimd_load2): Add missing *load2* types.
11897 (thunderx2t99_asimd_load3): New.
11898 (thunderx2t99_asimd_load4): New.
11899 (thunderx2t99_asimd_store1_1_mult): Delete.
11900 (thunderx2t99_asimd_store1_2_mult): Delete.
11901 (thunderx2t99_asimd_store2_mult): Delete.
11902 (thunderx2t99_asimd_store2_onelane): Delete.
11903 (thunderx2t99_asimd_store_stp): New.
11904 (thunderx2t99_asimd_store1): New.
11905 (thunderx2t99_asimd_store2): New.
11906 (thunderx2t99_asimd_store3): New.
11907 (thunderx2t99_asimd_store4): New.
11909 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
11911 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
11912 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
11914 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
11915 Segher Boessenkool <segher@kernel.crashing.org>
11918 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
11921 2018-05-17 Richard Biener <rguenther@suse.de>
11923 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
11924 for pruning loop and prune defs feeding only already visited PHIs.
11926 2018-05-17 Richard Biener <rguenther@suse.de>
11928 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
11930 2018-05-17 Bin Cheng <bin.cheng@arm.com>
11931 Richard Biener <rguenther@suse.de>
11933 PR tree-optimization/85793
11934 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
11935 for VMAT_ELEMENTWISE.
11937 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11939 * internal-fn.h (lookup_internal_fn): Declare
11940 * internal-fn.c (lookup_internal_fn): New function.
11941 * gimple.c (gimple_build_call_from_tree): Handle calls to
11942 internal functions.
11943 * gimple-pretty-print.c (dump_gimple_call): Print "." before
11944 internal function names.
11945 * tree-pretty-print.c (dump_generic_node): Likewise.
11946 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
11948 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
11950 * gimple-fold.h (gimple_build): Make the function forms take
11951 combined_fn rather than built_in_function.
11952 (gimple_simplify): Likewise.
11953 * gimple-match-head.c (gimple_simplify): Likewise.
11954 * gimple-fold.c (gimple_build): Likewise.
11955 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
11956 rather than gimple_build_call_internal.
11957 (get_initial_defs_for_reduction): Likewise.
11958 (vect_create_epilog_for_reduction): Likewise.
11959 (vectorizable_live_operation): Likewise.
11961 2018-05-17 Martin Liska <mliska@suse.cz>
11963 * gimple-ssa-sprintf.c (format_directive): Do not use
11964 space in between 'G_' and '('.
11966 2018-05-17 Jakub Jelinek <jakub@redhat.com>
11969 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
11970 even if the mask is not all ones.
11973 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
11975 (ix86_gimple_fold_builtin): Likewise.
11978 * config/i386/i386.c: Include tree-vector-builder.h.
11979 (ix86_vector_shift_count): New function.
11980 (ix86_fold_builtin): Fold shift builtins by scalar count.
11981 (ix86_gimple_fold_builtin): Likewise.
11983 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
11984 _mm512_setzero): New intrinsics.
11986 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
11987 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11989 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
11990 code generation for cases where splatting a value is not useful.
11991 * simplify-rtx.c (simplify_ternary_operation): Simplify
11992 vec_merge across a vec_duplicate and a paradoxical subreg forming
11993 a vector mode to a vec_concat.
11995 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
11997 * config.gcc: Support "goldmont-plus".
11998 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12000 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12001 PROCESSOR_GOLDMONT_PLUS.
12002 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12003 (processor_target_table): Add "goldmont-plus".
12004 (PTA_GOLDMONT_PLUS): Define.
12005 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12006 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12007 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12008 (fold_builtin_cpu): Add "goldmont-plus".
12009 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12010 (ix86_option_override_internal): Add "goldmont-plus".
12011 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12012 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12013 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12014 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12016 2018-05-17 Richard Biener <rguenther@suse.de>
12018 PR tree-optimization/85757
12019 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12020 remove defs that only feed that PHI from further processing.
12022 2018-05-16 Jim Wilson <jimw@sifive.com>
12024 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12026 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12028 2018-05-16 Mark Wielaard <mark@klomp.org>
12030 * dwarf2out.c (count_index_strings): New function.
12031 (output_indirect_strings): Call count_index_strings and generate
12032 header for dwarf_version >= 5.
12034 2018-05-16 Mark Wielaard <mark@klomp.org>
12036 * dwarf2out.c (dwarf_FORM): New function.
12037 (set_indirect_string): Use dwarf_FORM.
12038 (reset_indirect_string): Likewise.
12039 (size_of_die): Likewise.
12040 (value_format): Likewise.
12041 (output_die): Likewise.
12042 (add_skeleton_AT_string): Likewise.
12043 (output_macinfo_op): Likewise.
12044 (index_string): Likewise.
12045 (output_index_string_offset): Likewise.
12046 (output_index_string): Likewise.
12047 (count_index_strings): Likewise.
12049 2018-05-16 Carl Love <cel@us.ibm.com>
12051 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12052 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12054 2018-05-16 Martin Jambor <mjambor@suse.cz>
12056 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12057 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12059 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12061 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12062 (fnma<mode>4): Likewise.
12063 (fms<mode>4): Likewise.
12064 (fnms<mode>4): Likewise.
12065 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12066 (aarch64_fnma<mode>4): Likewise.
12067 (aarch64_fms<mode>4): Likewise.
12068 (aarch64_fnms<mode>4): Likewise.
12069 (aarch64_fnmadd<mode>4): Likewise.
12071 2018-05-16 Jason Merrill <jason@redhat.com>
12073 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12075 2018-05-16 Richard Biener <rguenther@suse.de>
12077 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12078 (dump_stmt_cost): Declare.
12079 (add_stmt_cost): Dump cost we add.
12080 (add_stmt_costs): New function.
12081 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12082 No longer exported.
12083 (vect_analyze_stmt): Adjust prototype.
12084 (vectorizable_condition): Likewise.
12085 (vectorizable_live_operation): Likewise.
12086 (vectorizable_reduction): Likewise.
12087 (vectorizable_induction): Likewise.
12088 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12089 cost vector to pass to vectorizable_ and record afterwards.
12090 (vect_model_reduction_cost): Take cost vector argument and adjust.
12091 (vect_model_induction_cost): Likewise.
12092 (vectorizable_reduction): Likewise.
12093 (vectorizable_induction): Likewise.
12094 (vectorizable_live_operation): Likewise.
12095 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12096 SLP_TREE_NUMBER_OF_VEC_STMTS.
12097 (vect_analyze_slp_cost_1): Remove.
12098 (vect_analyze_slp_cost): Likewise.
12099 (vect_slp_analyze_node_operations): Take visited args and
12100 a target cost vector. Avoid processing already visited stmt sets.
12101 (vect_slp_analyze_operations): Use a local cost vector to gather
12102 costs and register those of non-discarded instances.
12103 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12104 (vect_schedule_slp_instance): Remove copying of
12105 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12107 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12108 adding cost. Record cost entry location.
12109 (vect_prologue_cost_for_slp_op): Function to compute cost of
12110 a constant or invariant generated for SLP vect in the prologue,
12111 split out from vect_analyze_slp_cost_1.
12112 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12113 (vect_model_promotion_demotion_cost): Likewise.
12114 (vect_model_store_cost): Likewise, make static.
12115 (vect_model_load_cost): Likewise.
12116 (vectorizable_bswap): Add cost vector arg and adjust.
12117 (vectorizable_call): Likewise.
12118 (vectorizable_simd_clone_call): Likewise.
12119 (vectorizable_conversion): Likewise.
12120 (vectorizable_assignment): Likewise.
12121 (vectorizable_shift): Likewise.
12122 (vectorizable_operation): Likewise.
12123 (vectorizable_store): Likewise.
12124 (vectorizable_load): Likewise.
12125 (vectorizable_condition): Likewise.
12126 (vectorizable_comparison): Likewise.
12127 (can_vectorize_live_stmts): Likewise.
12128 (vect_analyze_stmt): Likewise.
12129 (vect_transform_stmt): Adjust calls to vectorizable_*.
12130 * tree-vectorizer.c: Include gimple-pretty-print.h.
12131 (dump_stmt_cost): New function.
12133 2018-05-16 Richard Biener <rguenther@suse.de>
12135 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12136 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12137 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12138 (check_name): New callback.
12139 (dse_classify_store): Track cycles via a visited bitmap of PHI
12140 defs and simplify handling of in-loop and across loop dead stores
12141 and properly fail for loop-variant refs. Handle byte-tracking with
12142 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12145 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12147 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12148 (vect_get_mask_type_for_stmt): Likewise.
12149 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12151 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12152 to determine the statement's vector type and the vector type that
12153 should be used for calculating nunits. Deal with cases in which
12154 the type has to be deferred.
12155 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12156 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12157 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12158 (vect_determine_vf_for_stmt): New functions, split out from...
12159 (vect_determine_vectorization_factor): ...here.
12160 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12161 (vect_get_mask_type_for_stmt): New functions, split out from
12162 vect_determine_vectorization_factor.
12164 2018-05-16 Richard Biener <rguenther@suse.de>
12166 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12167 verify the [VEC_]COND_EXPR embedded comparison.
12169 2018-05-15 Martin Sebor <msebor@redhat.com>
12171 PR tree-optimization/85753
12172 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12173 RECORD_TYPE in addition to ARRAY_TYPE.
12175 2018-05-15 Martin Sebor <msebor@redhat.com>
12177 PR middle-end/85643
12178 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12180 2018-05-15 Richard Biener <rguenther@suse.de>
12182 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12183 add by_clobber_p one. Change algorithm to collect all defs
12184 representing uses we need to walk and try reducing them to
12185 a single one before failing.
12186 (dse_dom_walker::dse_optimize_stmt): Adjust.
12188 2018-05-13 Mark Wielaard <mark@klomp.org>
12190 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12191 (size_of_loc_descr): Likewise.
12192 (output_loc_operands): Likewise.
12193 (output_loc_operands_raw): Likewise.
12194 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12195 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12196 (hash_loc_operands): Likewise.
12197 (compare_loc_operands): Likewise.
12199 2018-05-14 Mark Wielaard <mark@klomp.org>
12201 * dwarf2out.c (count_index_addrs): New function.
12202 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12204 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12206 PR tree-optimization/83648
12207 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12208 return value as malloc candidate.
12210 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12213 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12214 param as true in call to suggest_attribute.
12216 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12218 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12219 -mreadonly-in-sdata.
12221 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12223 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12225 (aarch64_crypto_aesd_fused): Likewise.
12227 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12229 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12230 (movsi_aarch64): Likewise.
12231 (load_pairsi): Likewise.
12232 (load_pairdi): Likewise.
12233 (store_pairsi): Likewise.
12234 (store_pairdi): Likewise.
12235 (load_pairsf): Likewise.
12236 (load_pairdf): Likewise.
12237 (store_pairsf): Likewise.
12238 (store_pairdf): Likewise.
12239 (zero_extend): Likewise.
12240 (trunc): Swap alternatives.
12241 (fcvt_target): Add '?' to prefer w over r.
12243 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12246 * config/i386/i386.md: Disallow non-commutative arithmetics in
12247 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12248 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12249 in the peephole2 before it.
12251 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12253 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12254 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12255 (ix86_handle_option): Handle -mcldemote.
12256 * config.gcc: New header.
12257 * config/i386/cldemoteintrin.h: New file.
12258 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12259 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12261 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12262 OPTION_MASK_ISA_CLDEMOTE.
12263 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12264 (ix86_valid_target_attribute_inner_p): Ditto.
12265 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12266 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12267 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12268 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12269 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12271 * config/i386/i386.opt: Add -mcldemote.
12272 * config/i386/x86intrin.h: New header.
12273 * doc/invoke.texi: Add -mcldemote.
12275 2018-05-14 Richard Biener <rguenther@suse.de>
12277 * doc/match-and-simplify.texi: Adjust :s documentation.
12279 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12281 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12282 intended memcpy size.
12283 (REORDER_45): Likewise.
12285 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12287 * sort.cc: New file.
12288 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12289 * vec.c (qsort_chk): Use gcc_qsort.
12290 * Makefile.in (OBJS-libcommon): Add sort.o.
12291 (build/sort.o): New target. Use it...
12292 (BUILD_RTL): ... here, and...
12293 (build/gencfn-macros): ... here, and...
12294 (build/genmatch): ... here.
12296 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12297 Chung-Ju Wu <jasonwucj@gmail.com>
12299 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12300 * config/nds32/nds32-graywolf.md: New file.
12301 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12302 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12304 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12305 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12306 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12307 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12308 * config/nds32/pipelines.md: Include n15 settings.
12310 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12311 Chung-Ju Wu <jasonwucj@gmail.com>
12313 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12314 * config/nds32/nds32-n13.md: New file.
12315 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12316 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12318 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12319 * config/nds32/nds32.md (pipeline_model): Add n13.
12320 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12321 * config/nds32/pipelines.md: Include n13 settings.
12323 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12324 Chung-Ju Wu <jasonwucj@gmail.com>
12326 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12327 * config/nds32/nds32-n10.md: New file.
12328 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12329 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12331 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12332 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12333 * config/nds32/nds32.md (pipeline_model): Add n10.
12334 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12335 * config/nds32/pipelines.md: Include n10 settings.
12337 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12338 Kito Cheng <kito.cheng@gmail.com>
12339 Chung-Ju Wu <jasonwucj@gmail.com>
12341 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12342 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12343 Add enum values for DSP extension instructions.
12344 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12346 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12347 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12348 New code iterators.
12349 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12350 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12351 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12352 * config/nds32/nds32-intrinsic.md: Likewise.
12353 * config/nds32/nds32_intrinsic.h: Likewise.
12354 * config/nds32/nds32-md-auxiliary.c: Likewise.
12355 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12356 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12357 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12358 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12359 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12360 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12361 TYPE_DMAC in switch statement.
12362 * config/nds32/nds32.c: New checking and implementation for DSP
12363 extension instructions.
12364 * config/nds32/nds32.h: Likewise.
12365 * config/nds32/nds32.md: Likewise.
12366 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12367 * config/nds32/predicates.md: Implement new predicates for DSP
12370 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12372 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12373 Reformat alternatives and attributes so it is easier to identify
12374 which constraints/attributes go with which instruction.
12375 (mov<mode>_hardfloat32, FMOVE64): Likewise.
12376 (mov<mode>_softfloat32, FMOVE64): Likewise.
12377 (mov<mode>_hardfloat64, FMOVE64): Likewise.
12378 (mov<mode>_softfloat64, FMOVE64): Likewise.
12380 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
12382 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12384 (Basic PowerPC Built-in Functions): The new name of the
12385 subsection previously known as "PowerPC Built-in Functions".
12386 (Basic PowerPC Built-in Functions Available on all Configurations):
12388 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12389 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12390 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12391 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12393 2018-05-11 Martin Jambor <mjambor@suse.cz>
12396 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12399 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12402 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12404 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
12406 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12407 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12408 (ix86_handle_option): Handle -mwaitpkg.
12409 * config.gcc: New header.
12410 * config/i386/cpuid.h (bit_WAITPKG): New bit.
12411 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12412 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12414 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12415 OPTION_MASK_ISA_WAITPKG.
12416 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12417 (ix86_option_override_internal): Add PTA_WAITPKG.
12418 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12419 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12420 IX86_BUILTIN_TPAUSE.
12421 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12422 __builtin_ia32_umwait and __builtin_ia32_tpause.
12423 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12424 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12425 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12426 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12427 UNSPECV_TPAUSE): New.
12428 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12429 * config/i386/i386.opt: Add -mwaitpkg.
12430 * config/i386/waitpkgintrin.h: New file.
12431 * config/i386/x86intrin.h: New header.
12432 * doc/invoke.texi: Add -mwaitpkg.
12434 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12437 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12439 (cortex-m0): Use armv6s-m isa.
12440 (cortex-m0plus): Likewise.
12441 (cortex-m1): Likewise.
12442 (cortex-m0.small-multiply): Likewise.
12443 (cortex-m0plus.small-multiply): Likewise.
12444 (cortex-m1.small-multiply): Likewise.
12446 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
12447 Jakub Jelinek <jakub@redhat.com>
12449 PR tree-optimization/85692
12450 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12451 source permute as well.
12453 2018-05-11 Martin Liska <mliska@suse.cz>
12456 * doc/extend.texi: Document LLVM style format for no_sanitize
12459 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12461 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12462 mode_supports_vsx_dform_quad to mode_supports_dq_form.
12463 (mode_supports_vsx_dform_quad): Likewise.
12464 (mode_supports_vmx_dform): Move these functions to be next to the
12465 other mode_supports functions.
12466 (mode_supports_dq_form): Likewise.
12467 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12468 mode_supports_dq_form.
12469 (reg_offset_addressing_ok_p): Likewise.
12470 (offsettable_ok_by_alignment): Likewise.
12471 (rs6000_legitimate_offset_address_p): Likewise.
12472 (legitimate_lo_sum_address_p): Likewise.
12473 (rs6000_legitimize_address): Likewise.
12474 (rs6000_legitimize_reload_address): Likewise.
12475 (rs6000_secondary_reload_inner): Likewise.
12476 (rs6000_preferred_reload_class): Likewise.
12477 (rs6000_output_move_128bit): Likewise.
12479 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12481 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12482 Generate SImode target register for null target.
12483 <case IX86_BUILTIN_XGETBV>: Ditto.
12484 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12485 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12487 2018-05-10 Carl Love <cel@us.ibm.com>
12489 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12490 dcbtt and dcbtstt if operands[2] is 0.
12492 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
12495 * config/i386/sse.md (usadv64qi): New expander.
12497 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
12499 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12500 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12501 -maltivec=be support.
12502 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12503 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12504 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12505 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12506 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12507 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12508 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12509 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12510 altivec_vsumsws): Adjust.
12511 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12512 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12513 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12515 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12516 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12517 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12518 (altivec_lve<VI_char>x): Delete expand.
12519 (*altivec_lve<VI_char>x_internal): Rename to...
12520 (altivec_lve<VI_char>x): ... this.
12521 (altivec_lvxl_<mode>): Delete expand.
12522 (*altivec_lvxl_<mode>_internal): Rename to ...
12523 (altivec_lvxl_<mode>): ... this.
12524 (altivec_stvxl_<mode>): Delete expand.
12525 (*altivec_stvxl_<mode>_internal): Rename to ...
12526 (altivec_stvxl_<mode>): ... this.
12527 (altivec_stve<VI_char>x): Delete expand.
12528 (*altivec_stve<VI_char>x_internal): Rename to ...
12529 (altivec_stve<VI_char>x): ... this.
12530 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12531 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12532 reduc_plus_scal_<mode>): Adjust.
12533 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12535 (rs6000_cpu_cpp_builtins): Adjust.
12536 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12537 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12538 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12539 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12540 -maltivec=be support.
12541 (rs6000_split_vec_extract_var): Adjust.
12542 (rs6000_split_v4si_init): Adjust.
12543 (swap_selector_for_mode): Delete.
12544 (altivec_expand_lvx_be, altivec_expand_stvx_be,
12545 altivec_expand_stvex_be): Delete.
12546 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12547 -maltivec=be support.
12548 (rs6000_gimple_fold_builtin): Ditto.
12549 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12551 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12552 (TARGET_DIRECT_MOVE_64BIT): Adjust.
12553 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12554 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12555 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12556 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12557 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12558 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12559 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12560 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12561 anonymous split): Adjust.
12562 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12563 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12565 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
12567 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12568 when --with-gxx-include-dir is also specified.
12569 * configure: Regenerate.
12571 2018-05-09 Jim Wilson <jimw@sifive.com>
12574 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12575 * config/riscv/t-withmultilib: New.
12576 * config/riscv/withmultilib.h: New.
12577 * doc/install.texi: Document RISC-V --with-multilib-list support.
12579 2018-05-09 Richard Biener <rguenther@suse.de>
12581 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12583 (vect_bb_vectorization_profitable_p): Adjust. Compute
12584 actual scalar cost using the cost vector and the add_stmt_cost
12587 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12589 PR rtl-optimization/85645
12590 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12591 in the REG_CFA_REGISTER note for LR, don't leave it empty.
12593 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12595 PR rtl-optimization/85645
12596 * shrink-wrap.c (spread_components): Return a boolean saying if
12597 anything was changed.
12598 (try_shrink_wrapping_separate): Iterate spread_components until
12599 nothing changes anymore.
12601 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12603 PR rtl-optimization/85645
12604 * regrename.c (build_def_use): Also kill the chains that include the
12605 destination of a REG_CFA_REGISTER note.
12607 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
12609 PR rtl-optimization/85645
12610 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12611 insn that has a REG_CFA_REGISTER note.
12613 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
12615 * cfgexpand.c (expand_clobber): New function.
12616 (expand_gimple_stmt_1): Use it.
12617 * tree-vect-stmts.c (vect_clobber_variable): New function,
12619 (vectorizable_simd_clone_call): ...here.
12620 (vectorizable_store): Emit a clobber either side of an
12621 IFN_STORE_LANES sequence.
12622 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12624 2018-05-09 Tom de Vries <tom@codesourcery.com>
12627 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12628 (define_insn "trap_if_false"): Add exit after trap.
12630 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
12632 PR rtl-optimization/85638
12633 * bb-reorder.c: Include common/common-target.h.
12634 (create_forwarder_block): New function extracted from...
12635 (fix_up_crossing_landing_pad): ...here. Rename into...
12636 (dw2_fix_up_crossing_landing_pad): ...this.
12637 (sjlj_fix_up_crossing_landing_pad): New function.
12638 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12639 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12640 from both partitions and exit the loop after one iteration.
12642 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12645 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12647 (Basic PowerPC Built-in Functions): The new name of the
12648 subsection previously known as "PowerPC Built-in Functions".
12649 (Basic PowerPC Built-in Functions Available on all Configurations):
12651 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12653 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12655 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12657 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12660 2018-05-08 Jim Wilson <jimw@sifive.com>
12662 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12663 (LD_EMUL_SUFFIX): New.
12664 (LINK_SPEC): Use it.
12666 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
12668 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12670 (Basic PowerPC Built-in Functions): The new name of the
12671 subsection previously known as "PowerPC Built-in Functions".
12672 (Basic PowerPC Built-in Functions Available on all Configurations):
12674 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12676 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12678 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12680 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12683 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12686 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12687 after cmpelim optimization.
12689 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
12691 * config.gcc: Support "goldmont".
12692 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12693 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12694 PROCESSOR_GOLDMONT.
12695 * config/i386/i386.c (m_GOLDMONT): Define.
12696 (processor_target_table): Add "goldmont".
12697 (PTA_GOLDMONT): Define.
12698 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12699 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12700 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12701 (fold_builtin_cpu): Add "goldmont".
12702 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12703 (ix86_option_override_internal): Add "goldmont".
12704 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12705 (processor_type): Add PROCESSOR_GOLDMONT.
12706 * config/i386/i386.md: Add CPU "glm".
12707 * config/i386/glm.md: New file.
12708 * config/i386/x86-tune.def: Add m_GOLDMONT.
12709 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12711 2018-05-08 Jakub Jelinek <jakub@redhat.com>
12714 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12716 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12717 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
12718 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
12721 * config/i386/i386.c (ix86_fold_builtin): Handle
12722 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12725 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12726 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12728 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
12731 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12732 (check_arch): Likewise.
12733 (check_fpu): Return the result rather than printing it.
12734 (end arch): Fix operator precedence.
12735 (end cpu): Likewise.
12736 (END): Print the result from check_fpu.
12738 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12739 Alan Hayward <alan.hayward@arm.com>
12740 David Sherwood <david.sherwood@arm.com>
12742 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12743 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12744 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12745 (*fcmuo<mode>_and): New patterns.
12747 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
12749 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12750 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12751 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12752 (cmp_op, sve_imm_con): New code attributes.
12753 (SVE_COND_INT_CMP, imm_con): Delete.
12754 (cmp_op): Remove above unspecs from int attribute.
12755 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12757 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
12758 comparison-specific unspecs.
12759 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12760 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12761 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12762 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12763 (*vec_fcm<cmp_op><mode>): Rename to...
12764 (*fcm<cmp_op><mode>): ...this and adjust likewise.
12765 (*vec_fcmuo<mode>): Rename to...
12766 (*fcmuo<mode>): ...this and adjust likewise.
12767 (*pred_fcm<cmp_op><mode>): New pattern.
12768 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12769 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12771 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12773 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12774 (aarch64_emit_sve_predicated_cond): New function.
12775 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12776 (aarch64_emit_unspec_cond_or): Replace with...
12777 (aarch64_emit_sve_or_conds): ...this new function. Use
12778 aarch64_emit_sve_ptrue_op for the individual comparisons and
12779 aarch64_emit_binop to OR them together.
12780 (aarch64_emit_inverted_unspec_cond): Replace with...
12781 (aarch64_emit_sve_inverted_cond): ...this new function. Use
12782 aarch64_emit_sve_ptrue_op for the comparison and
12783 aarch64_emit_unop to invert the result.
12784 (aarch64_expand_sve_vec_cmp_float): Update after the above
12785 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
12787 2018-05-07 Nathan Sidwell <nathan@acm.org>
12789 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12790 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12791 (Backwards Compatibility): Likewise.
12793 2018-05-07 Luis Machado <luis.machado@linaro.org>
12797 2018-05-07 Luis Machado <luis.machado@linaro.org>
12799 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12800 <prefetch_dynamic_strides>: New const bool field.
12801 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12802 prefetch_dynamic_strides.
12803 (exynosm1_prefetch_tune): Likewise.
12804 (thunderxt88_prefetch_tune): Likewise.
12805 (thunderx_prefetch_tune): Likewise.
12806 (thunderx2t99_prefetch_tune): Likewise.
12807 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12809 (aarch64_override_options_internal): Update to set
12810 PARAM_PREFETCH_DYNAMIC_STRIDES.
12811 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12812 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12813 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12814 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12815 prefetch-dynamic-strides setting.
12817 2018-05-07 Luis Machado <luis.machado@linaro.org>
12819 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12820 <minimum_stride>: New const int field.
12821 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12822 minimum_stride field.
12823 (exynosm1_prefetch_tune): Likewise.
12824 (thunderxt88_prefetch_tune): Likewise.
12825 (thunderx_prefetch_tune): Likewise.
12826 (thunderx2t99_prefetch_tune): Likewise.
12827 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12828 (aarch64_override_options_internal): Update to set
12829 PARAM_PREFETCH_MINIMUM_STRIDE.
12830 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12831 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12832 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12833 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12834 stride is constant and is below the minimum stride threshold.
12836 2018-05-07 Luis Machado <luis.machado@linaro.org>
12838 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
12841 2018-05-07 Luis Machado <luis.machado@linaro.org>
12843 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12844 <prefetch_dynamic_strides>: New const bool field.
12845 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12846 prefetch_dynamic_strides.
12847 (exynosm1_prefetch_tune): Likewise.
12848 (thunderxt88_prefetch_tune): Likewise.
12849 (thunderx_prefetch_tune): Likewise.
12850 (thunderx2t99_prefetch_tune): Likewise.
12851 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12853 (aarch64_override_options_internal): Update to set
12854 PARAM_PREFETCH_DYNAMIC_STRIDES.
12855 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12856 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12857 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12858 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12859 prefetch-dynamic-strides setting.
12861 2018-05-07 Luis Machado <luis.machado@linaro.org>
12863 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12864 <minimum_stride>: New const int field.
12865 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12866 minimum_stride field.
12867 (exynosm1_prefetch_tune): Likewise.
12868 (thunderxt88_prefetch_tune): Likewise.
12869 (thunderx_prefetch_tune): Likewise.
12870 (thunderx2t99_prefetch_tune): Likewise.
12871 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12872 (aarch64_override_options_internal): Update to set
12873 PARAM_PREFETCH_MINIMUM_STRIDE.
12874 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12875 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12876 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12877 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12878 stride is constant and is below the minimum stride threshold.
12880 2018-05-06 Jakub Jelinek <jakub@redhat.com>
12883 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12884 the type is addressable. Don't force op into register if it has
12887 2018-05-05 Roland McGrath <mcgrathr@google.com>
12890 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12891 any section for which we don't know a specific type it should have,
12892 regardless of name. Previously this was done only for the exact
12893 names ".init_array", ".fini_array", and ".preinit_array".
12894 (default_elf_asm_named_section): Add comment about
12895 relationship with default_section_type_flags and SECTION_NOTYPE.
12896 (get_section): Don't consider it a type conflict if one side has
12897 SECTION_NOTYPE and the other doesn't, as long as neither has the
12898 SECTION_BSS et al used in the default_section_type_flags logic.
12900 2018-05-05 Tom de Vries <tom@codesourcery.com>
12903 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12904 (workaround_barsyncs): New function.
12905 (nvptx_reorg): Use workaround_barsyncs.
12906 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12907 (define_expand "nvptx_membar_cta"): New define_expand.
12908 (define_insn "*nvptx_membar_cta"): New insn.
12910 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
12912 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
12913 To improve optimization opportunities.
12914 * builtin-types.def: The new needed builtin types for the above.
12916 2018-05-04 Richard Biener <rguenther@suse.de>
12918 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
12919 * gimple-ssa-store-merging.c
12920 (imm_store_chain_info::output_merged_store): Remove redundant create,
12921 release split_store vector contents on failure.
12922 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
12923 scalar stmt vector on cache hit.
12925 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
12927 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
12929 * config.gcc (powerpc-xilinx-eabi*): Remove.
12930 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
12932 (fusion_addis_mem_combo_load): Ditto.
12933 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
12935 (rs6000_cpu_cpp_builtins): Ditto.
12936 * config/rs6000/rs6000-linux.c
12937 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
12938 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
12939 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
12941 (rs6000_setup_reg_addr_masks): Ditto.
12942 (rs6000_init_hard_regno_mode_ok): Ditto.
12943 (rs6000_option_override_internal): Ditto.
12944 (legitimate_lo_sum_address_p): Ditto.
12945 (rs6000_legitimize_address): Ditto.
12946 (rs6000_legitimize_reload_address): Ditto.
12947 (rs6000_legitimate_address_p): Ditto.
12948 (abi_v4_pass_in_fpr): Ditto.
12949 (setup_incoming_varargs): Ditto.
12950 (rs6000_gimplify_va_arg): Ditto.
12951 (rs6000_split_multireg_move): Ditto.
12952 (rs6000_savres_strategy): Ditto.
12953 (rs6000_emit_prologue_components): Ditto.
12954 (rs6000_emit_epilogue_components): Ditto.
12955 (rs6000_emit_prologue): Ditto.
12956 (rs6000_emit_epilogue): Ditto.
12957 (rs6000_elf_file_end): Ditto.
12958 (rs6000_function_value): Ditto.
12959 (rs6000_libcall_value): Ditto.
12960 * config/rs6000/rs6000.h: Ditto.
12961 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
12962 (TARGET_MINMAX): ... this. New.
12963 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
12964 * config/rs6000/rs6000.md: Remove Xilinx FP support.
12965 (*movsi_internal1_single): Delete.
12966 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
12967 mfpu=, mxilinx-fpu): Delete.
12968 * config/rs6000/singlefp.h: Delete.
12969 * config/rs6000/sysv4.h: Remove Xilinx FP support.
12970 * config/rs6000/t-rs6000: Ditto.
12971 * config/rs6000/t-xilinx: Delete.
12972 * config/rs6000/titan.md: Adjust for fp_type removal.
12973 * config/rs6000/vsx.md: Remove Xilinx FP support.
12974 (VStype_simple): Delete.
12975 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
12976 * config/rs6000/xfpu.h: Delete.
12977 * config/rs6000/xfpu.md: Delete.
12978 * config/rs6000/xilinx.h: Delete.
12979 * config/rs6000/xilinx.opt: Delete.
12980 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
12981 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
12983 2018-05-04 Tom de Vries <tom@codesourcery.com>
12986 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
12989 2018-05-04 Richard Biener <rguenther@suse.de>
12991 PR middle-end/85627
12992 * tree-complex.c (update_complex_assignment): We are always in SSA form.
12993 (expand_complex_div_wide): Likewise.
12994 (expand_complex_operations_1): Likewise.
12995 (expand_complex_libcall): Preserve EH info of the original stmt.
12996 (tree_lower_complex): Handle removed blocks.
12997 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12998 on complex multiplication and division libcall builtins.
13000 2018-05-04 Richard Biener <rguenther@suse.de>
13002 PR middle-end/85574
13003 * fold-const.c (negate_expr_p): Restrict negation of operand
13004 zero of a division to when we know that can happen without
13006 (fold_negate_expr_1): Likewise.
13008 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13011 * real.h (real_nextafter): Declare.
13012 * real.c (real_nextafter): New function.
13013 * fold-const-call.c (fold_const_nextafter): New function.
13014 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13015 CASE_CFN_NEXTTOWARD.
13016 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13017 even when arg1_mode is different from arg0_mode.
13019 2018-05-03 Nathan Sidwell <nathan@acm.org>
13021 * doc/extend.texi (Deprecated Features): Remove
13022 -ffriend-injection.
13023 (Backwards Compatibility): Likewise.
13024 * doc/invoke.texi (C++ Language Options): Likewise.
13025 (C++ Dialect Options): Likewise.
13027 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13030 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13031 _mm512_mask_mullox_epi64): New intrinsics.
13033 2018-05-03 Tom de Vries <tom@codesourcery.com>
13036 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13037 dump files): Add offload-tree.
13039 2018-05-03 Richard Biener <rguenther@suse.de>
13041 PR tree-optimization/85615
13042 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13043 to loops not nested in BBs loop father to avoid creating multi-entry
13046 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13048 PR tree-optimization/70291
13049 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13050 arguments. Change return type to tree. Emit libcall as a new
13051 statement rather than replacing existing one when inplace_p is true.
13052 (expand_complex_multiplication_components): New function.
13053 (expand_complex_multiplication): Expand floating-point complex
13054 multiplication using the above.
13055 (expand_complex_division): Rename inner_type parameter to type.
13056 Update expand_complex_libcall call-site.
13057 (expand_complex_operations_1): Update expand_complex_multiplication
13058 and expand_complex_division call-sites.
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): In condition require that
13066 the highest significant bit of the shift count mask is clear. In
13067 check whether and[sq]i3 is needed verify that all significant bits
13068 of the shift count other than the highest are set.
13070 2018-05-02 Tom de Vries <tom@codesourcery.com>
13073 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13074 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13075 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13076 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13077 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13078 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13079 __builtin_goacc_parlevel_size.
13081 2018-05-02 Richard Biener <rguenther@suse.de>
13083 PR tree-optimization/85597
13084 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13085 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13088 2018-05-02 Tom de Vries <tom@codesourcery.com>
13091 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13092 dump files): Add ltrans-tree.
13094 2018-05-02 Tom de Vries <tom@codesourcery.com>
13097 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13098 dump files): Add wpa-ipa.
13100 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13102 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13103 powerpc*-*-linux*paired* target.
13104 * config/rs6000/750cl.h: Delete.
13105 * config/rs6000/paired.h: Delete.
13106 * config/rs6000/paired.md: Delete.
13107 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13109 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13110 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13111 comment. Remove paired float support.
13112 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13113 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13115 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13116 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13118 * config/rs6000/rs6000.c: Remove paired float support.
13119 (paired_expand_vector_init, paired_expand_vector_move,
13120 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13121 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13122 paired_expand_builtin, paired_expand_predicate_builtin,
13123 paired_init_builtins): Delete.
13124 * config/rs6000/rs6000.h: Remove paired float support.
13125 * config/rs6000/rs6000.md: Remove paired float support.
13126 (move_from_CR_ov_bit): Delete.
13127 * config/rs6000/rs6000.opt (mpaired): Delete.
13128 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13129 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13131 2018-05-02 Richard Biener <rguenther@suse.de>
13133 PR middle-end/85567
13134 * gimplify.c (gimplify_save_expr): When in SSA form allow
13135 SAVE_EXPRs to compute to SSA vars.
13137 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13140 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13141 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13142 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13143 clobber operands[2], instead use a new pseudo. Formatting fixes.
13145 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13147 PR tree-optimization/85586
13148 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13149 exit early for statements in the same group if the accesses are
13152 2018-05-02 Tom de Vries <tom@codesourcery.com>
13155 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13158 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13160 PR tree-optimization/85143
13161 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13163 2018-05-01 Tom de Vries <tom@codesourcery.com>
13166 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13167 not found" error message.
13169 2018-05-01 Tom de Vries <tom@codesourcery.com>
13172 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13173 * vec.c (test_ordered_remove_if): New function.
13174 (vec_c_tests): Call test_ordered_remove_if.
13175 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13176 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13177 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13178 VEC_ORDERED_REMOVE_IF.
13180 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13182 PR tree-optimization/82665
13183 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13184 pointer subtraction where arguments come from a memchr call.
13186 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13188 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13189 --push-state --as-needed and --pop-state instead of --as-needed and
13190 --no-as-needed if ld supports it.
13191 * configure: Regenerated.
13194 * doc/install.texi2html: Replace _002d with - and _002a with * in
13195 generated html files using sed.
13197 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13200 * gcc-rich-location.c (blank_line_before_p): New function.
13201 (use_new_line): New function.
13202 (gcc_rich_location::add_fixit_insert_formatted): New function.
13203 * gcc-rich-location.h
13204 (gcc_rich_location::add_fixit_insert_formatted): New function.
13206 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13208 * selftest.c (assert_streq): Rename "expected" and "actual" to
13209 "val1" and "val2". Extend NULL-handling to cover both inputs
13210 symmetrically, while still requiring both to be non-NULL for a pass.
13211 * selftest.h (assert_streq): Rename "expected" and "actual" to
13213 (ASSERT_EQ): Likewise.
13214 (ASSERT_EQ_AT): Likewise.
13215 (ASSERT_KNOWN_EQ): Likewise.
13216 (ASSERT_KNOWN_EQ_AT): Likewise.
13217 (ASSERT_NE): Likewise.
13218 (ASSERT_MAYBE_NE): Likewise.
13219 (ASSERT_MAYBE_NE_AT): Likewise.
13220 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13221 the assertion to pass.
13222 (ASSERT_STREQ_AT): Likewise.
13224 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13226 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13227 interaction with -pie.
13229 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13231 * selftest.h: Fix alphabetization of per-source-file selftest
13234 2018-04-30 Jason Merrill <jason@redhat.com>
13236 PR c++/61982 - dead stores to destroyed objects.
13237 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13240 2018-04-30 Jason Merrill <jason@redhat.com>
13242 * tree.c (build_clobber): New.
13243 * tree.h: Declare it.
13244 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13246 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13248 * diagnostic-show-locus.c (layout::layout): Update for
13249 location_get_source_line returning a char_span.
13250 (struct char_span): Move to input.h.
13251 (struct correction): Update for fields in char_span becoming
13253 (struct source_line): Update for location_get_source_line
13254 returning a char_span.
13255 (layout::print_line): Likewise.
13256 * edit-context.c (edited_file::print_content): Likewise.
13257 (edited_file::print_diff_hunk): Likewise.
13258 (edited_file::print_run_of_changed_lines): Likewise.
13259 (edited_file::get_num_lines): Likewise.
13260 (edited_line::edited_line): Likewise.
13261 * final.c (asm_show_source): Likewise.
13262 * input.c (location_get_source_line): Convert return type
13263 from const char * to char_span, losing the final "line_len"
13265 (dump_location_info): Update for the above.
13266 (get_substring_ranges_for_loc): Likewise. Use a char_span
13267 when handling the literal within the line.
13268 (test_reading_source_line): Update for location_get_source_line
13269 returning a char_span.
13270 * input.h (class char_span): Move here from
13271 diagnostic-show-locus.c, converting from a struct to a class.
13272 Make data members private.
13273 (char_span::operator bool): New.
13274 (char_span::length): New.
13275 (char_span::get_buffer): New.
13276 (char_span::operator[]): New.
13277 (char_span::subspan): Make const.
13278 (char_span::xstrdup): New.
13279 (location_get_source_line): Convert return type from const char *
13280 to char_span, losing the final "line_size" param.
13282 2018-04-30 Jan Hubicka <jh@suse.cz>
13284 * lto-wrapper.c (ltrans_priorities): New static var.
13285 (cmp_priority): New.
13286 (run_gcc): Read priorities and if doing parallel build order
13287 the Makefile by them.
13289 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13291 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13293 2018-04-30 Richard Biener <rguenther@suse.de>
13295 * tree-cfg.c (verify_address): Remove base argument, add
13296 flag whether to check TREE_ADDRESSABLE and do that.
13297 (verify_expr): Remove.
13298 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13299 (verify_gimple_assign_single): Likewise.
13300 (verify_gimple_switch): Likewise.
13301 (verify_expr_location_1): Dereference tp once. Add (disabled)
13302 piece from verify_expr.
13303 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13305 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13307 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13309 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13311 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13312 (small_data_pattern): Likewise.
13313 (arc_rewrite_small_data): Likewise.
13314 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13315 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13316 (get_symbol_alignment): New function.
13317 (legitimate_small_data_address_p): Likewise.
13318 (legitimate_scaled_address): Update, call
13319 legitimate_small_data_address_p.
13320 (output_sdata): New static variable.
13321 (arc_print_operand): Update how we handle small data operands.
13322 (arc_print_operand_address): Likewise.
13323 (arc_legitimate_address_p): Update, use
13324 legitimate_small_data_address_p.
13325 (arc_rewrite_small_data_p): Remove.
13326 (arc_rewrite_small_data_1): Likewise.
13327 (arc_rewrite_small_data): Likewise.
13328 (small_data_pattern): Likewise.
13329 (compact_sda_memory_operand): Update to use
13330 legitimate_small_data_address_p and get_symbol_alignment.
13331 (prepare_move_operands): Don't rewite sdata pattern.
13332 (prepare_extend_operands): Remove.
13333 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13335 (zero_extendqisi2): Likewise.
13336 (zero_extendhisi2): Likewise.
13337 (extendqihi2): Likewise.
13338 (extendqisi2): Likewise.
13339 (extendhisi2): Likewise.
13340 (addsi3): Likewise.
13341 (subsi3): Likewise.
13342 (andsi3): Likewise.
13343 * config/arc/constraints.md (Usd): Change it to memory constraint.
13345 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13347 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13348 as source of std instructions.
13349 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13350 allow 6-bit constants as source for store instructions.
13351 (movdi_insn): Update instruction pattern to allow 6-bit constants
13352 as source for store instructions.
13354 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13356 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13358 2018-04-30 Nathan Sidwell <nathan@acm.org>
13359 Sandra Loosemore <sandra@codesourcery.com>
13361 * dumpfile.c (dump_open): Allow '-' for stdout.
13362 * doc/invoke.texi (Developer Options): Document dump filename
13363 determination early. Document stdin/stdout selection.
13365 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13367 Microblaze Target: PIC data text relative
13369 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13370 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13372 * config/microblaze/microblaze.h (microblaze_constant_address_p):
13373 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13374 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13375 New addressing mode for data-text relative position indepenedent code.
13376 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13377 'ADDRESS_SYMBOLIC_TXT_REL'.
13378 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13379 (microblaze_legitimate_pic_operand): Exclude function calls from
13380 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13381 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13383 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13384 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13385 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13386 for 'address + offset'.
13387 (microblaze_expand_prologue): Add new function prologue call for
13389 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13390 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13391 table in case of TARGET_PIC_DATA_TEXT_REL.
13392 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13393 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13394 Add new macros 'UNSPEC_TEXT',
13395 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13396 + exclude function calls from 'UNSPEC_PLT' in case of data text
13398 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13399 new target hook for generating address diff vector tables in case of
13401 * doc/tm.texi : Regenerate.
13402 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13403 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13404 of addr diff vector generation.
13405 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13406 target hook definition.
13407 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13408 Add default function for generate_pic_addr_diff_vec -> flag_pic.
13409 * doc/invoke.texi (Add new pic option): Add new microblaze pic
13410 option for data text relative.
13412 2018-04-30 Richard Biener <rguenther@suse.de>
13414 * tree-chrec.h (evolution_function_is_constant_p): Remove
13416 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13418 2018-04-30 Richard Biener <rguenther@suse.de>
13421 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13423 2018-04-30 Richard Biener <rguenther@suse.de>
13425 PR tree-optimization/28364
13426 PR tree-optimization/85275
13427 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13428 copying first exit test.
13430 2018-04-28 Mark Wielaard <mark@klomp.org>
13432 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13433 dwarf_version >= 5.
13434 (dwarf_AT): Handle DW_AT_addr_base.
13435 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13437 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
13440 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13441 (*ashl<dwi>3_doubleword_mask_1): Ditto.
13442 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13443 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13445 2018-04-28 Richard Biener <rguenther@suse.de>
13447 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13448 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13449 to reflect use. Only add interesting stmts.
13451 2018-04-27 Martin Jambor <mjambor@suse.cz>
13454 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13455 the jump function allows for passing through aggregate values.
13457 2018-04-27 David Malcolm <dmalcolm@redhat.com>
13459 * input.h (in_system_header_at): Convert from macro to inline
13461 (from_macro_expansion_at): Likewise.
13462 (from_macro_definition_at): Likewise.
13464 2018-04-27 Jeff Law <law@redhat.com>
13466 * config.gcc: Mark tile* targets as deprecated/obsolete.
13468 2018-04-27 Richard Biener <rguenther@suse.de>
13470 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13473 2018-04-27 Richard Biener <rguenther@suse.de>
13475 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13477 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
13479 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13480 with Yd constraint. Set "preferred_for_speed" attribute from
13481 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13482 with Yd constraint.
13483 (*movdi_internal): Ditto.
13484 (movti_interunit splitters): Remove
13485 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13486 (movdi_interunit splitters): Ditto.
13487 * config/i386/constraints.md (Ye): Remove.
13488 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13490 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13493 * config/aarch64/constraints.md (Usg): Limit to 31.
13494 (Usj): Limit to 63.
13496 2018-04-27 Jakub Jelinek <jakub@redhat.com>
13498 PR tree-optimization/85529
13499 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13500 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13501 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13502 zero extension or masking of the MSB bit.
13503 (optimize_range_tests): Add FIRST_BB argument, pass it through
13504 to optimize_range_tests_var_bound.
13505 (maybe_optimize_range_tests, reassociate_bb): Adjust
13506 optimize_range_tests callers.
13508 2018-04-26 Richard Biener <rguenther@suse.de>
13509 Jakub Jelinek <jakub@redhat.com>
13511 * cgraph.h (symbol_table): Just declare debug method here.
13512 * symtab.c (symbol_table::debug): Define.
13514 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
13516 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13518 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
13520 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13521 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13522 (*movdi_internal): Substitute Yi and Yj constraint with x
13523 and Ym and Yn constraint with y constraint. Update "isa"
13524 attribute and set "preferred_for_speed" attribute from
13525 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13526 (*movsi_internal): Ditto.
13527 (*movdf_internal): Ditto.
13528 (*movsf_internal): Ditto.
13529 (*zero_extendsidi2): Ditto.
13530 * config/i386/sse.md (vec_set<mode>_0): Ditto.
13531 (sse2_loadld): Ditto.
13532 (*vec_extract<ssevecmodelower>_0): Ditto.
13533 (*vec_extractv4si_0_zext_sse4): Ditto.
13534 (vec_concatv2di): Ditto.
13535 (*vec_dup<mode>): Ditto.
13536 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13537 * config/i386/constraints.md (Yi): Remove.
13542 2018-04-26 Nathan Sidwell <nathan@acm.org>
13544 * dumpfile.c (dump_open): New.
13545 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13546 (dump_finish): Detect stdio/stderr by value not name.
13548 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
13550 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13552 2018-04-26 Tom de Vries <tom@codesourcery.com>
13555 * config/nvptx/nvptx.c (verify_neutering_jumps)
13556 (verify_neutering_labels): New function
13557 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13559 2018-04-26 Tom de Vries <tom@codesourcery.com>
13562 * config/nvptx/nvptx.c (needs_neutering_p): New function.
13563 (nvptx_single): Use needs_neutering_p to skip over insns that do not
13566 2018-04-26 Richard Biener <rguenther@suse.de>
13567 Tom de Vries <tom@codesourcery.com>
13570 * lto-streamer-out.c (output_function): Fixup loops if required to match
13571 discovery done in the reader.
13573 2018-04-26 Richard Biener <rguenther@suse.de>
13575 PR tree-optimization/85116
13576 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13577 have a loop exit from the single latch predecessor. Remove
13578 case of header with just condition.
13579 (ch_base::copy_headers): Exclude infinite loops from any
13581 (pass_ch::execute): Record exits.
13583 2018-04-26 Richard Biener <rguenther@suse.de>
13585 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13586 prologue cost vector and pass it to vect_get_load_cost.
13587 (vect_get_peeling_costs_all_drs): Likewise.
13588 (vect_peeling_hash_get_lowest_cost): Likewise.
13589 (vect_enhance_data_refs_alignment): Likewise.
13591 2018-04-26 Richard Biener <rguenther@suse.de>
13593 PR middle-end/85450
13594 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13595 checking of integer<->pointer conversions.
13596 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13597 sign-/zero-extending pointer types.
13598 (expand_omp_for_static_chunk): Likewise.
13600 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
13601 Jean Lee <xiaoyur347@gmail.com>
13603 * config/mips/mips.c (mips_asan_shadow_offset): New function.
13604 (TARGET_ASAN_SHADOW_OFFSET): Define.
13605 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13606 true for -fsanitize=address.
13608 2018-04-25 Mark Wielaard <mark@klomp.org>
13610 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13613 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13615 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13616 than "alu", remove explicit "memory" and "imm_disp" attributes.
13617 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13619 PR middle-end/85414
13620 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13621 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13622 gen_lowpart_no_emit.
13624 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
13627 * config/i386/i386.c (ix86_expand_builtin): Change memory
13628 operand to XI, extend p0 to Pmode.
13629 * config/i386/i386.md: Change unspec volatile and operand
13630 1 mode to XI, change operand 0 mode to P.
13632 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13634 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13635 GET_MODE_MASK before any checking.
13636 (nds32_can_use_bset_p): Likewise.
13637 (nds32_can_use_btgl_p): Likewise.
13639 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13641 * config/nds32/nds32-doubleword.md: New define_split pattern for
13642 illegal register number.
13644 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13646 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13648 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
13650 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13652 2018-04-25 Richard Biener <rguenther@suse.de>
13654 * lto-streamer.h (LTO_major_version): Bump to 8.
13656 2018-04-25 Jakub Jelinek <jakub@redhat.com>
13658 * BASE-VER: Set to 9.0.0.
13660 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
13662 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13663 in __abskf2 and __powikf2.
13665 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13668 * config/aarch64/constraints.md (Usg, Usj): New constraints.
13669 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13670 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13671 Use the above on operand 2. Reindent.
13672 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13674 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13677 * common/config/i386/i386-common.c (ix86_handle_option): Don't
13679 * config/i386/i386.opt (mcet): Removed.
13680 * doc/install.texi: Remove -mcet documentation.
13681 * doc/invoke.texi: Likewise.
13683 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
13686 * doc/install.texi: Remove -mcet from bootstrap-cet.
13688 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13691 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13692 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13696 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13697 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13698 containing a CONST_VECTOR.
13700 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
13702 * doc/install.texi: Update newlib dependency for nvptx.
13704 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13707 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13708 instead of INTVAL when shifting x left.
13710 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
13712 PR tree-optimization/85478
13713 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13714 vect_grouped_store_supported for single element vectors.
13716 2018-04-24 Richard Biener <rguenther@suse.de>
13719 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13720 load cost increase to the case of non-constant step.
13722 2018-04-24 Jakub Jelinek <jakub@redhat.com>
13725 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13726 destination if any_malformed_asm.
13728 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
13730 PR middle-end/85496
13731 * expr.c (store_field): In the bitfield case, if the value comes from
13732 a function call and is returned in registers by means of a PARALLEL,
13733 do not change the mode of the temporary unless BLKmode and VOIDmode.
13735 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
13737 PR rtl-optimization/85423
13738 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13739 dependencies to debug insns when the previous insn is non-debug.
13741 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13743 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13744 enums into a single definition.
13745 (fls): Fix predicates and printing.
13748 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
13750 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13751 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13752 and short u6 immediate.
13753 (check_if_valid_sleep_operand): Remove.
13754 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13756 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13758 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13759 flag_always_save_lp condition.
13760 * config/nds32/nds32.opt (malways-save-lp): New option.
13762 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13764 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13765 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13766 * config/nds32/nds32.h
13767 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13768 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13770 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13772 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13773 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13775 2018-04-22 Shiva Chen <shiva0217@gmail.com>
13776 Chung-Ju Wu <jasonwucj@gmail.com>
13778 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13780 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13781 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13783 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13785 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13787 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13789 * config/nds32/nds32-protos.h (nds32_data_alignment,
13790 nds32_local_alignment): Declare.
13791 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13792 nds32_local_alignment): New functions.
13793 (TARGET_CONSTANT_ALIGNMENT): Define.
13794 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13796 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13798 * config/nds32/nds32.c
13799 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13800 (TARGET_MODES_TIEABLE_P): Likewise.
13802 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
13804 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13805 level Ofast and Og.
13807 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
13808 Chung-Ju Wu <jasonwucj@gmail.com>
13810 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13811 for unaligned access.
13812 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13814 * config/nds32/nds32-intrinsic.md: Likewise.
13815 * config/nds32/nds32_intrinsic.h: Likewise.
13816 * config/nds32/nds32.h (nds32_builtins): Likewise.
13817 * config/nds32/nds32.opt (munaligned-access): New option.
13818 * config/nds32/nds32.c (nds32_asm_file_start): Display
13819 flag_unaligned_access status.
13821 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13823 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
13824 -mno-relax is present.
13825 * config/riscv/linux.h (LINK_SPEC): Ditto.
13827 2018-04-20 Martin Sebor <msebor@redhat.com>
13830 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
13832 (gimple_fold_builtin_stxcpy_chk): Same.
13833 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
13835 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
13838 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
13839 __powikf2 when long double is IEEE 128-bit.
13841 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
13843 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
13844 step to make sure stack always aligned.
13846 2018-04-20 Carl Love <cel@us.ibm.com>
13849 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13850 size check for arg0.
13852 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
13853 Tom de Vries <tom@codesourcery.com>
13856 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13857 Emit insns for calls too.
13858 (nvptx_find_par): Always look for worker-level predecessor insn.
13859 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
13861 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13862 (nvptx_process_pars): Propagate frames for calls.
13864 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
13867 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13869 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13870 (ix86_handle_option): Don't handle OPT_mibt.
13871 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13873 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13875 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13876 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13877 (ix86_target_macros): Define __CET__ with flag_cf_protection
13878 for -fcf-protection.
13879 * config/i386/i386.c (isa2_opts): Remove -mibt.
13880 * config/i386/i386.h (TARGET_IBT): Removed.
13881 (TARGET_IBT_P): Likewise.
13882 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13883 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13884 * config/i386/i386.opt (mcet): Update help message.
13885 (mshstk): Likewise.
13887 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
13888 -mcet as an alias for -mshstk.
13890 2018-04-20 Richard Biener <rguenther@suse.de>
13892 PR middle-end/85475
13893 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13894 complexity by forcing a single use of the multiply operand.
13896 2018-04-20 Martin Jambor <mjambor@suse.cz>
13899 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13900 recursion dependency to only apply to non-clones.
13902 2018-04-20 Martin Jambor <mjambor@suse.cz>
13905 * ipa-cp.c (create_specialized_node): Check that clones of
13906 self-recursive edges exist during IPA-CP.
13908 2018-04-19 Toon Moene <toon@moene.org>
13910 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
13913 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13915 PR tree-optimization/85467
13916 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
13917 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
13918 VECTOR_CST element to type.
13920 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13923 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
13924 * config/i386/i386.md (builtin_setjmp_setup): Removed.
13925 (builtin_longjmp): Likewise.
13926 (save_stack_nonlocal): New pattern.
13927 (restore_stack_nonlocal): Likewise.
13929 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13932 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13933 Replace ASM_OUTPUT_LABEL with fprintf.
13935 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
13938 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13939 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
13940 * config/i386/i386-c.c (ix86_target_macros_internal): Also
13941 define __IBT__ and __SHSTK__ for -fcf-protection.
13942 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
13944 (ix86_trampoline_init): Likewise.
13945 (x86_output_mi_thunk): Likewise.
13946 (ix86_notrack_prefixed_insn_p): Likewise.
13947 (ix86_option_override_internal): Don't disallow -fcf-protection.
13948 * config/i386/i386.md (rdssp<mode>): Also enable for
13950 (incssp<mode>): Likewise.
13951 (nop_endbr): Likewise.
13952 * config/i386/i386.opt (mcet): Change help message to built-in
13955 (mshstk): Likewise.
13956 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
13957 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
13958 enable CET built-in functions.
13960 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
13962 * common/config/i386/i386-common.c
13963 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
13964 OPTION_MASK_ISA_MOVDIRI_UNSET,
13965 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
13966 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
13967 * config.gcc (movdirintrin.h): New header.
13968 * config/i386/cpuid.h (bit_MOVDIRI,
13969 bit_MOVDIR64B): New bits.
13970 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
13972 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
13973 (VOID, PVOID, PCVOID)): New function types.
13974 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
13975 __builtin_ia32_directstoreu_u64,
13976 __builtin_ia32_movdir64b): New builtins.
13977 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
13978 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
13980 (ix86_valid_target_attribute_inner_p): Ditto.
13981 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
13982 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
13983 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
13984 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
13985 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
13986 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
13987 (movdiri<mode>, movdir64b_<mode>): New.
13988 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
13989 * config/i386/immintrin.h: Include movdirintrin.h.
13990 * config/i386/movdirintrin.h: New file.
13991 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
13993 2018-04-19 Richard Biener <rguenther@suse.de>
13995 PR middle-end/85455
13996 * cfg.c (clear_bb_flags): When loop state says we have
13997 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13999 2018-04-19 Richard Biener <rguenther@suse.de>
14001 PR tree-optimization/84737
14002 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14003 copying restrict info.
14004 (vect_setup_realignment): Use it.
14005 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14006 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14007 the first DR to all generated stores.
14008 (vectorizable_load): Likewise for loads.
14010 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14012 PR tree-optimization/85446
14013 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14014 the integral and pointer types to have the same precision.
14016 * doc/install.texi: Document --disable-cet being the default and
14019 2018-04-18 Martin Liska <mliska@suse.cz>
14021 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14024 2018-04-18 Martin Liska <mliska@suse.cz>
14027 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14030 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14031 arguments if they are comparable.
14033 2018-04-18 Martin Liska <mliska@suse.cz>
14036 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14039 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14042 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14045 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14046 ENDBR after calling __morestack.
14048 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14051 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14052 by using gcc_base_ver to generate a gcc_driver_version, and use
14053 it when generating GCC_DRIVER_NAME.
14054 * configure: Regenerate.
14056 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14059 * config.gcc: Obsolete powerpc*-*-*spe*.
14061 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14064 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14065 (stabstr_D): Change type of unum from unsigned int to
14066 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14069 2018-04-17 Jim Wilson <jimw@sifive.com>
14072 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14073 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14074 Set arg_pointer_offset after using pretend_args_size.
14076 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14078 PR rtl-optimization/85431
14079 * dse.c (record_store): Ignore zero width stores.
14082 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14083 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14084 __builtin_stack_restore rather than after it.
14085 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14086 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14087 argument instead of virtual_dynamic_stack_rtx.
14089 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14091 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14093 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14094 Add note to error message to explain internal mapping of overloaded
14095 built-in function name to non-overloaded built-in function name.
14096 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14099 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14102 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14103 where the inputs overlap with the output.
14105 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14107 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14108 (=v, v) alternative and explicit "memory" attribute.
14109 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14110 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14112 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14113 "sselog1" type instead of "sselog".
14114 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14115 "sselog". Remove explicit "memory" attribute.
14116 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14117 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14119 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14120 "sselog1" type instead of "sselog". Remove explicit "memory"
14122 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14123 use "sselog1" type instead of "sselog". Remove explicit "memory"
14125 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14126 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14128 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14129 "sselog1" type instead of "sselog". Remove explicit "memory"
14131 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14132 use "sselog1" type instead of "sselog". Remove explicit "memory"
14136 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14138 PR middle-end/85414
14139 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14142 2018-04-17 Martin Jambor <mjambor@suse.cz>
14145 * ipa-cp.c (create_specialized_node): Call
14146 expand_all_artificial_thunks if necessary.
14148 2018-04-17 Martin Liska <mliska@suse.cz>
14151 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14152 in message, remote space in between '_G' and '('.
14154 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14157 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14158 avx512f_vmcmp<mode>3<round_saeonly_name>,
14159 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14160 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14161 avx512f_rndscale<mode><round_saeonly_name>,
14162 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14163 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14164 Use %<iptr>2 instead of %2 for -masm=intel.
14165 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14166 avx512f_vcvttss2usi<round_saeonly_name>,
14167 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14169 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14170 avx512f_vcvttsd2usi<round_saeonly_name>,
14171 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14172 Use %q1 instead of %1 for -masm=intel.
14173 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14174 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14175 of %3 for -masm=intel.
14176 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14178 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14180 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14182 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14183 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14185 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14187 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14188 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14189 %g1 and one with %0 and %1.
14190 (avx512er_vmrcp28<mode><round_saeonly_name>,
14191 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14192 %1 for -masm=intel.
14193 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14194 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14195 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14196 of %0 and %{%4%} for -masm=intel.
14197 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14198 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14199 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14200 order of %0 and %{%5%}%{z%} for -masm=intel.
14202 2018-04-17 Jan Hubicka <jh@suse.cz>
14205 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14207 2018-04-17 Martin Liska <mliska@suse.cz>
14210 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14211 for target_clone error message. Make default implementation
14212 clone to be a local declaration.
14213 (separate_attrs): Add new argument and check for an empty
14215 (expand_target_clones): Handle it.
14216 (ipa_target_clone): Make redirection just for target_clones
14219 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14220 Tom de Vries <tom@codesourcery.com>
14222 PR middle-end/84955
14223 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14224 tiled basic blocks without omp continue statements.
14226 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14229 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14230 vec_extract expression as having side effects to make sure it gets
14233 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14236 * config/i386/i386.c (get_builtin_code_for_version): Check
14239 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14242 * config.gcc: Support "skylake".
14243 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14245 * config/i386/i386.c (m_SKYLAKE): Define.
14246 (processor_target_table): Add "skylake".
14247 (ix86_option_override_internal): Add "skylake".
14248 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14249 PROCESSOR_CANNONLAKE.
14250 (get_builtin_code_for_version): Fix priority for
14251 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14252 PROCESSOR_SKYLAKE-AVX512.
14253 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14254 (processor_type): Add PROCESSOR_SKYLAKE.
14256 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14257 Jason Merrill <jason@redhat.com>
14260 * convert.c (convert_to_integer_1): Use direct recursion for
14261 enumeral types and types with a precision less than the number
14262 of bits in their mode.
14264 2018-04-16 Julia Koval <julia.koval@intel.com>
14267 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14268 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14270 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14273 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14274 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14275 and -mno-direct-move.
14277 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14280 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14281 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14282 Ensure negative shifts result in {0}.
14284 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14286 PR rtl-optimization/79916
14287 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14288 regs (if any) to define how to gnerate SD moves when LRA is in
14291 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14293 PR rtl-optimization/85393
14294 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14295 * except.c (expand_dw2_landing_pad_for_region): Make static.
14296 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14297 a label and unconditional jump to old_bb, rather than
14298 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14301 PR rtl-optimization/85376
14302 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14303 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14304 instead of a specific value.
14306 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14307 Bin Cheng <bin.cheng@arm.com>
14309 PR tree-optimization/82965
14310 PR tree-optimization/83991
14311 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14312 by_profile_only parameter.
14313 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14314 information if the loop was predicted to iterate too many times.
14315 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14317 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14320 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14323 2018-04-13 Martin Liska <mliska@suse.cz>
14324 Jakub Jelinek <jakub@redhat.com>
14326 PR middle-end/81657
14327 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14328 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14329 * builtins.c (expand_builtin_memory_copy_args): Use
14330 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14331 handle dest_addr == pc_rtx.
14333 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14336 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14337 asked to not generate direct moves.
14338 (fix_trunc<mode>si2_stfiwx): Similar.
14339 (fix_trunc<mode>si2_internal): Similar.
14341 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14344 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14345 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14346 lookup if dest in some wider mode is known to be const0_rtx and
14347 if so, record permanent equivalence for it to be ZERO_EXTEND of
14348 the narrower mode destination.
14350 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14352 * lto-streamer-out.c (output_function): Revert 259346.
14353 * omp-expand.c (expand_oacc_for): Likewise.
14355 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14357 PR rtl-optimization/85354
14358 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14359 * sel-sched.c (sel_global_init): ... here.
14361 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14364 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14365 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14366 mode for PE-COFF targets.
14367 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14368 (i386_pe_asm_lto_end): Likewise.
14369 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14370 (TARGET_ASM_LTO_END): Likewise.
14371 * config/i386/winnt.c (saved_debug_info_level): New static variable.
14372 (i386_pe_asm_lto_start): New function.
14373 (i386_pe_asm_lto_end): Likewise.
14375 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14376 Richard Biener <rguenther@suse.de>
14378 PR middle-end/84955
14379 * lto-streamer-out.c (output_function): Fix CFG loop state before
14381 * omp-expand.c (expand_oacc_for): Handle calls to internal
14382 functions like regular functions.
14384 2018-04-12 Richard Biener <rguenther@suse.de>
14387 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14388 for the early LTO debug to properly generate references to it
14389 during DIE emission. Do not re-use that for the skeleton for
14391 (dwarf2out_early_finish): Likewise.
14393 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14396 * config/i386/sse.md
14397 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14398 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14399 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14400 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14401 and output is a reg, avoid creating invalid lowpart subreg, but
14402 instead split into a 512-bit move. Don't split if not AVX512VL,
14403 input is xmm16+ reg and output is a mem.
14404 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14405 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14406 xmm16+ reg and output is a mem.
14408 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14410 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14411 also for flag_dwarf2_cfi_asm.
14413 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14415 PR rtl-optimization/85342
14416 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14417 a bool scalar var inside of the loop instead. Don't try to update
14418 recog_data.operand after failed apply_change_group.
14420 2018-04-12 Tom de Vries <tom@codesourcery.com>
14423 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14424 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
14425 array with flexible array member as array without given dimension.
14426 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14427 argument for undefined param to true.
14429 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
14432 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14433 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14434 from PowerPC section.
14435 * config/rs6000/sysv4.opt (mcall-): Improve help text.
14436 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14437 help text that is too long.
14438 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14439 help text that is too long.
14440 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14441 help text that is too long.
14443 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
14445 * config/alpha/alpha.md (stack_probe_internal): Rename
14446 from "probe_stack". Update all callers.
14448 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14450 PR rtl-optimization/84566
14451 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14452 sched_macro_fuse_insns.
14454 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14457 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14458 (compute_block_dependences): ... from here.
14460 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14462 PR tree-optimization/85331
14463 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14464 from int to HOST_WIDE_INT.
14466 2018-04-11 Martin Jambor <mjambor@suse.cz>
14469 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14470 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14471 not the same as the source val.
14472 (cgraph_edge_brings_value_p): New parameter.
14473 (gather_edges_for_value): Pass destination value to
14474 cgraph_edge_brings_value_p.
14475 (perhaps_add_new_callers): Likewise.
14476 (get_info_about_necessary_edges): Likewise and exclude values brought
14477 only by self-recursive edges.
14478 (create_specialized_node): Redirect only clones of self-calling edges.
14479 (+self_recursive_pass_through_p): New function.
14480 (find_more_scalar_values_for_callers_subset): Use it.
14481 (find_aggregate_values_for_callers_subset): Likewise.
14482 (known_aggs_to_agg_replacement_list): Removed.
14483 (decide_whether_version_node): Re-calculate known constants for all
14484 remaining context clones.
14486 2018-04-11 Richard Biener <rguenther@suse.de>
14489 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14490 from early DWARF output.
14491 (dwarf2out_early_finish): Output line info unconditionally into
14492 early DWARF and add reference to it.
14494 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14497 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14498 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14499 other than V2DFmode using iptr mode attribute.
14500 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14502 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14504 PR rtl-optimization/84659
14505 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14507 2018-04-11 Jakub Jelinek <jakub@redhat.com>
14510 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14512 (output_loc_list): Pass address of a dummy size variable even in the
14513 locview handling loop.
14514 (index_location_lists): Add comment on why skip_loc_list_entry can't
14517 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
14520 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14523 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
14526 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14527 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14528 and -mstring-compare-inline-limit.
14530 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14533 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14534 for stack clash protection in a register whenever we need it to be in
14537 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14539 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14540 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14542 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
14545 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14547 (mlong-double-): Ditto.
14548 * config/rs6000/sysv4.opt (msdata=): Ditto.
14549 (mtls-size=): Ditto.
14551 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14553 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14554 erroneous entries for
14555 "vector int vec_ldl (int, long int *)", and
14556 "vector unsigned int vec_ldl (int, unsigned long int *)".
14557 Add comments and entries for
14558 "vector bool char vec_ldl (int, bool char *)",
14559 "vector bool short vec_ldl (int, bool short *)",
14560 "vector bool int vec_ldl (int, bool int *)",
14561 "vector bool long long vec_ldl (int, bool long long *)",
14562 "vector pixel vec_ldl (int, pixel *)",
14563 "vector long long vec_ldl (int, long long *)",
14564 "vector unsigned long long vec_ldl (int, unsigned long long *)".
14565 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14566 type tree bool_long_long_type_node and correct definition of
14567 bool_V2DI_type_node to make reference to this new type tree.
14568 (rs6000_mangle_type): Replace erroneous reference to
14569 bool_long_type_node with bool_long_long_type_node.
14570 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14571 comments to emphasize sign distinctions for char and int types and
14572 replace RS6000_BTI_bool_long constant with
14573 RS6000_BTI_bool_long_long constant. Also add comment to restrict
14574 use of RS6000_BTI_pixel.
14575 (bool_long_type_node): Remove this macro definition.
14576 (bool_long_long_type_node): New macro definition
14578 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14580 PR rtl-optimization/85300
14581 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14582 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14583 simplify_unary_operation fails.
14585 2018-04-10 Martin Liska <mliska@suse.cz>
14587 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14588 cgraph_edge and ipa_ref.
14590 2018-04-10 Jakub Jelinek <jakub@redhat.com>
14594 * config/i386/sse.md
14595 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14596 computation of the VEC_MERGE selector from mask.
14597 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14598 Fix decoding of the VEC_MERGE selector into mask.
14600 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14602 PR tree-optimization/85286
14603 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14605 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
14607 * final.c (final_1): Set insn_last_address as well as
14608 insn_current_address.
14610 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14613 * explow.c (emit_stack_probe): Call validize_mem on memory location
14614 before passing it to gen_probe_stack. Create address operand and
14615 legitimize it for the probe_stack_address case.
14617 2018-04-09 Jan Hubicka <jh@suse.cz>
14620 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14621 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14622 * tree.c (free_lang_data_in_type): Fix handling of binfos;
14624 (free_lang_data): Rebuild type inheritance graph.
14626 2018-04-09 Martin Sebor <msebor@redhat.com>
14628 * invoke.texi (-finline-small-functions): Mention other optimization
14630 (-findirect-inlining, -fpartial-inlining): Same.
14631 (-finline-functions-called-once): Same.
14632 (-freorder-blocks-and-partition): Same.
14634 2018-04-09 Jan Hubicka <jh@suse.cz>
14637 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14638 jumps; choose last target that matches the criteria (i.e.
14639 no partition changes for non-crossing jumps).
14640 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14641 support for redirecting crossing jumps to non-crossing.
14643 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
14645 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14646 also for naked functions.
14648 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
14650 * config/arc/arc.md (add_shift): New pattern.
14651 (add_shift2): Likewise.
14652 (sub_shift): Likewise.
14653 (sub_shift_cmp0_noout): Likewise.
14654 (compare_si_ashiftsi): Likewise.
14655 (xbfu_cmp0_noout): New combine pattern.
14656 (xbfu_cmp0"): Likewise.
14657 (movsi_set_cc_insn): Place the predicable variant first.
14658 (commutative_binary_cmp0_noout): Remove clobber.
14659 (commutative_binary_cmp0): New pattern.
14660 (noncommutative_binary_cmp0): Likewise.
14661 (noncommutative_binary_cmp0_noout): Likewise.
14662 (noncommutative_binary_comparison_result_used): Removed.
14663 (rsub_cmp0): New pattern.
14664 (rsub_cmp0_noout): Likewise.
14665 (extzvsi): Changed, keep only meaningful variants.
14666 (SQH, SEZ): New iterators.
14667 (SQH_postfix): New mode attribute.
14668 (SEZ_prefix): New code attribute.
14669 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14670 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14671 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14672 of numerical value.
14673 (noncommutative_operator): Check the availability of barrel
14676 2018-04-09 Richard Biener <rguenther@suse.de>
14678 PR tree-optimization/85284
14679 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14680 Only use the niter constraining form of simple_iv when the exit
14681 is always executed.
14683 2018-04-09 Tom de Vries <tom@codesourcery.com>
14686 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14687 (define_expand "*memory_barrier"): New define_expand.
14688 (define_insn "memory_barrier"): New insn.
14690 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14692 PR rtl-optimization/80463
14693 PR rtl-optimization/83972
14694 PR rtl-optimization/83480
14696 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14697 correct producer for the insn.
14698 (tidy_control_flow): Fixup seqnos in case of debug insns.
14700 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14702 PR rtl-optimization/83913
14704 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14705 different sched-times when merging exprs.
14707 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14709 PR rtl-optimization/83962
14711 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14712 tidy_fallthru_edge and tidy_control_flow.
14714 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
14716 PR rtl-optimization/83530
14718 * sel-sched.c (force_next_insn): New global variable.
14719 (remove_insn_for_debug): When force_next_insn is true, also leave only
14720 next insn in the ready list.
14721 (sel_sched_region): When the region wasn't scheduled, make another pass
14722 over it with force_next_insn set to 1.
14724 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14726 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14728 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14729 for interrupt control.
14730 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14731 functions for interrupt control.
14732 * config/nds32/nds32-intrinsic.md: Likewise.
14733 * config/nds32/nds32_intrinsic.h: Likewise.
14734 * config/nds32/nds32.h (nds32_builtins): Likewise.
14736 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14738 * config/nds32/nds32.c (nds32_init_machine_status,
14739 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14740 strict_aligned_p field.
14741 (nds32_expand_to_rtl_hook): New function.
14742 (TARGET_EXPAND_TO_RTL_HOOK): Define.
14743 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14745 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14746 Chung-Ju Wu <jasonwucj@gmail.com>
14748 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14749 * config/nds32/nds32-n7.md: New file.
14750 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14751 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14753 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14754 * config/nds32/nds32.md (pipeline_model): Add n7.
14755 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14756 * config/nds32/pipelines.md: Include n7 settings.
14758 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14759 Chung-Ju Wu <jasonwucj@gmail.com>
14761 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14762 * config/nds32/nds32-e8.md: New file.
14763 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14764 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14766 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14767 * config/nds32/nds32.md (pipeline_model): Add e8.
14768 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14769 * config/nds32/pipelines.md: Include e8 settings.
14771 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14772 Chung-Ju Wu <jasonwucj@gmail.com>
14774 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14775 * config/nds32/nds32-n8.md: New file.
14776 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14777 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14779 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14780 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14781 * config/nds32/nds32.md (pipeline_model): Add n8.
14782 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14783 * config/nds32/pipelines.md: Include n8 settings.
14785 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
14786 Chung-Ju Wu <jasonwucj@gmail.com>
14788 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14789 * config/nds32/nds32-n9-2r1w.md: New file.
14790 * config/nds32/nds32-n9-3r2w.md: New file.
14791 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14792 nds32_register_ports): New or modify for cpu n9.
14793 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14795 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14796 * config/nds32/nds32-utils.c: New file.
14797 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14798 TARGET_MUL_SLOW): Define.
14799 * config/nds32/nds32.md (pipeline_model): New attribute.
14800 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14801 New options that support cpu n9.
14802 * config/nds32/pipelines.md: Include n9 settings.
14803 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14805 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
14807 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14808 information if necessary.
14809 (output_cond_branch_compare_zero): Likewise.
14810 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14811 (nds32_target_alignment): Refine for alignment.
14812 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14813 (FUNCTION_BOUNDARY): Modify.
14814 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14816 * config/nds32/nds32.opt (malways-align, malign-functions): New.
14818 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
14820 * config/nds32/constants.md (unspec_volatile_element): Add values for
14821 TLB operation and data prefetch.
14822 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14823 functions for TLB operation and data prefetch.
14824 * config/nds32/nds32-intrinsic.md: Likewise.
14825 * config/nds32/nds32_intrinsic.h: Likewise.
14826 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
14827 (nds32_print_operand): Likewise.
14828 * config/nds32/nds32.h (nds32_builtins): Likewise.
14830 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
14831 Andrew Pinski <pinsika@gcc.gnu.org>
14833 PR middle-end/82976
14834 * match.pd: Use constant_boolean_node of correct type instead of
14835 boolean_true_node or boolean_false_node for simplifying
14836 pointer comparisons to zero.
14838 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14840 PR tree-optimization/80021
14841 * tree.c (verify_type_variant): Make error call in verify_variant_match
14842 translatable and remove final full stop.
14844 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14846 * config/nds32/constants.md (unspec_volatile_element): Add
14847 UNSPEC_VOLATILE_EH_RETURN.
14848 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14849 nds32_output_stack_pop): Support dwarf exception handling process.
14850 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14851 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14852 exception handling process.
14853 (nds32_compute_stack_frame): Likewise.
14854 (nds32_return_addr_rtx): Likewise.
14855 (nds32_initial_elimination_offset): Likewise.
14856 (nds32_expand_prologue): Likewise.
14857 (nds32_expand_epilogue): Likewise.
14858 (nds32_dynamic_chain_address): New function.
14859 * config/nds32/nds32.h (machine_function): Add fields for dwarf
14860 exception handling.
14861 (DYNAMIC_CHAIN_ADDRESS): Define.
14862 (EH_RETURN_DATA_REGNO): Define.
14863 (EH_RETURN_STACKADJ_RTX): Define.
14864 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14865 patterns for dwarf exception handling.
14867 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14869 * config/nds32/nds32.h: Clean up obsolete macros.
14871 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14873 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14874 Add enum values for particular instructions.
14875 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14876 particular intrinsic functions.
14877 * config/nds32/nds32-intrinsic.md: Likewise.
14878 * config/nds32/nds32_intrinsic.h: Likewise.
14879 * config/nds32/nds32.h (nds32_builtins): Likewise.
14880 * config/nds32/nds32.md (type): Add pbsad and pbsada.
14881 (btst, ave): New patterns for particular instructions.
14883 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14885 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14886 Add enum values for atomic load/store and memory sync.
14887 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14889 * config/nds32/nds32-intrinsic.md: Likewise.
14890 * config/nds32/nds32_intrinsic.h: Likewise.
14891 * config/nds32/nds32.h (nds32_builtins): Likewise.
14893 2018-04-07 Jakub Jelinek <jakub@redhat.com>
14895 PR tree-optimization/85257
14896 * fold-const.c (native_encode_vector): If not all elts could fit
14897 and off is -1, return 0 rather than offset.
14898 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14899 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14900 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
14901 adjust buffer in native_interpret_expr call.
14903 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14905 * config/nds32/constants.md (unspec_volatile_element): Add cache
14906 control enum values.
14907 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
14908 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
14909 * config/nds32/nds32.c (nds32_cctl_names): New.
14910 (nds32_print_operand): Handle cache control register names.
14911 * config/nds32/nds32.h (nds32_builtins): New enum values.
14912 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
14914 * config/nds32/nds32.md (type): Add mmu.
14915 * config/nds32/pipelines.md (simple_insn): Add mmu.
14917 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14919 * config/nds32/nds32.md (type): Remove call.
14920 * config/nds32/pipelines.md (simple_insn): Likewise.
14922 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14924 * config/nds32/constants.md (unspec_volatile_element): Add
14925 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
14926 UNSPEC_VOLATILE_FMFCFG.
14927 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
14928 description for fmfcfg and fmfcsr.
14929 (bdesc_1arg): Add fmtcsr.
14930 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
14931 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
14932 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
14933 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
14934 unspec_fmfcfg): New patterns.
14935 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
14936 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
14937 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
14938 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
14939 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
14940 __nds32__fmfcfg): Define.
14942 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
14944 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
14945 intrinsic register names.
14946 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
14947 intrinsic register enum values and macros.
14949 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
14951 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
14952 for load/store addressing form.
14953 (nds32_print_operand_address): Likewise.
14955 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
14958 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
14959 based on LABEL_REF. Remove useless assertion.
14960 (pic_address_needs_scratch): Fix formatting.
14961 (sparc_legitimize_pic_address): Minor tweaks.
14962 (sparc_delegitimize_address): Adjust assertion accordingly.
14963 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
14964 into symbolic_operand.
14965 (movsi_high_pic_label_ref): Likewise.
14966 (movsi_lo_sum_pic_label_ref): Likewise.
14967 (movdi_pic_label_ref): Likewise.
14968 (movdi_high_pic_label_ref): Likewise.
14969 (movdi_lo_sum_pic_label_ref): Likewise.
14971 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
14973 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
14974 custom LIB_SPEC setup.
14976 2018-04-06 Ruslan Bukin <br@bsdpad.com>
14977 Kito Cheng <kito.cheng@gmail.com>
14979 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
14980 * config/riscv/freebsd.h: New.
14982 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14984 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
14985 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
14988 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14989 Kito Cheng <kito.cheng@gmail.com>
14991 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
14992 nds32_output_call, nds32_symbol_binds_local_p): New functions.
14993 * config/nds32/nds32-protos.h (nds32_output_call,
14994 nds32_output_return): Declare.
14995 * config/nds32/nds32.md: Refine all the call and return patterns.
14997 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15000 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15001 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15003 PR rtl-optimization/84872
15004 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15005 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15006 EDGE_CROSSING edge.
15008 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15010 * expr.c (copy_blkmode_to_reg): Revert 254862.
15011 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15013 2018-04-06 Richard Biener <rguenther@suse.de>
15015 PR middle-end/85244
15016 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15017 after seeing a component reference with an adjacent field. Treat
15018 refs to arrays at struct end of external decls similar to
15019 refs to unconstrained commons.
15021 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15024 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15025 look through SAVE_EXPRs with non-side-effects argument. Adjust
15027 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15030 2018-04-06 Richard Biener <rguenther@suse.de>
15032 PR middle-end/85180
15033 * alias.c (find_base_term): New wrapper around find_base_term
15034 unwinding CSELIB_VAL_PTR changes.
15035 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15038 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15040 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15042 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15043 constant definitions.
15044 ("nop"): lr 0,0 -> nopr r0
15045 ("nop_lr0", "nop_lr1"): New insn definitions.
15047 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15049 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15050 NDS32_V3PUSH_AVAILABLE_P macro.
15052 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15053 Chung-Ju Wu <jasonwucj@gmail.com>
15055 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15056 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15057 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15058 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15059 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15060 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15061 * config/nds32/constraints.md: New constraints and checking for hard
15062 float configuration.
15063 * config/nds32/iterators.md: New mode iterator and attribute for hard
15064 float configuration.
15065 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15067 * config/nds32/nds32-fpu.md: New file.
15068 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15069 deal with hard float code generation.
15070 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15072 (abi_type, float_reg_number): New enum type.
15073 * config/nds32/nds32-predicates.c: New predicates for hard float.
15074 * config/nds32/nds32-protos.h: Declare functions for hard float.
15075 * config/nds32/nds32.c: Implementation for hard float configuration.
15076 * config/nds32/nds32.h: Definitions for hard float configuration.
15077 * config/nds32/nds32.md: Include hard float machine description and
15078 modify patterns for hard float configuration.
15079 * config/nds32/nds32.opt: New options for hard float configuration.
15080 * config/nds32/predicates.md: New predicates for hard float
15083 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15085 * common/config/nds32/nds32-common.c
15086 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15088 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15090 PR middle-end/85195
15091 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15092 CONSTRUCTOR_ELT (ctor, ...)->value.
15094 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15097 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15099 2018-04-05 Tom de Vries <tom@codesourcery.com>
15102 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15105 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15106 Kito Cheng <kito.cheng@gmail.com>
15108 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15109 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15110 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15111 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15113 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15114 Kito Cheng <kito.cheng@gmail.com>
15116 * config/nds32/constraints.md (Ufe): New memory constraint.
15117 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15118 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15119 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15121 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15122 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15124 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15126 * config/nds32/nds32.md: Use optimize_size in the condition for
15127 alu-shift instructions.
15129 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15131 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15133 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15135 * config/nds32/nds32.md (negsi2): Refine pattern.
15137 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15138 Chung-Ju Wu <jasonwucj@gmail.com>
15140 * config/nds32/iterators.md (shift_rotate): New code iterator.
15141 (shift): New code attribute.
15142 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15143 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15144 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15145 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15146 bit-wise operations.
15147 (andsi3, *andsi3): Ditto.
15148 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15149 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15150 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15151 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15152 nds32_ior_operand, nds32_xor_operand): New predicates.
15154 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15156 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15157 (addsi3, subsi3): ... this.
15159 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15161 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15163 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15165 * config/nds32/nds32.md: Adjust indention.
15167 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15169 * config/nds32/nds32.md (feature): New attribute.
15171 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15173 * config/nds32/nds32.md (subtype): New attribute.
15175 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15178 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15179 expansion to perform a bitwise AND of the argument followed by a
15180 boolean negation of the result.
15182 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15184 PR rtl-optimization/84878
15185 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15186 the basic block. Assert the use reference is not artificial and that
15187 it has an associated insn.
15189 2018-04-04 Michael Matz <matz@suse.de>
15191 * builtins.c (compute_objsize): Pass correct operand
15192 to array_at_struct_end_p.
15194 2018-04-04 Richard Biener <rguenther@suse.de>
15197 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15198 from contexts for DINFO_LEVEL_TERSE and below.
15200 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15202 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15203 resiter_operand condition.
15204 * config/nds32/nds32.md (*move<mode>): Ditto.
15206 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15207 Monk Chiang <sh.chiang04@gmail.com>
15209 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15211 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15213 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15215 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15216 Kito Cheng <kito.cheng@gmail.com>
15218 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15219 nds32_cond_code_str, output_cond_branch,
15220 output_cond_branch_compare_zero, nds32_expand_cbranch,
15221 nds32_expand_cstore, nds32_expand_movcc,
15222 nds32_output_cbranchsi4_equality_zero,
15223 nds32_output_cbranchsi4_equality_reg,
15224 nds32_output_cbranchsi4_equality_reg_or_const_int,
15225 nds32_output_cbranchsi4_greater_less_zero: New functions.
15226 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15227 nds32_expand_cstore, nds32_expand_movcc,
15228 nds32_output_cbranchsi4_equality_zero,
15229 nds32_output_cbranchsi4_equality_reg,
15230 nds32_output_cbranchsi4_equality_reg_or_const_int,
15231 nds32_output_cbranchsi4_greater_less_zero): Declare.
15232 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15233 nds32_rimm11s_operand): New predicates.
15234 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15235 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15238 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15240 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15241 * config/nds32/nds32.md: Ditto.
15242 * config/nds32/pipelines.md: Ditto.
15244 2018-04-04 Richard Biener <rguenther@suse.de>
15246 PR tree-optimization/85168
15247 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15248 propagating abnormals.
15250 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15252 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15254 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15255 Kito Cheng <kito.cheng@gmail.com>
15257 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15258 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15259 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15260 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15261 * config/nds32/nds32.md (sibcall_internal): New.
15262 (sibcall_register): Remove.
15263 (sibcall_immediate): Remove.
15264 (sibcall_value_internal): New.
15265 (sibcall_value_register): Remove.
15266 (sibcall_value_immediate): Remove.
15267 * config/nds32/predicates.md (nds32_general_register_operand): New.
15268 (nds32_call_address_operand): New.
15270 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15272 PR rtl-optimization/85167
15273 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15274 bb_defs if *split_p, instead preinitialize it to NULL.
15276 PR tree-optimization/85156
15277 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15278 evaluating the argument multiple times.
15280 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15282 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15284 (_mm_cvtpd_ps): Likewise.
15285 (_mm_cvttpd_epi32): Likewise.
15286 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15287 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15288 vector, pixel, and bool following altivec.h include.
15290 2018-04-03 Martin Sebor <msebor@redhat.com>
15292 * doc/extend.texi (Common Function Attributes): Clarify.
15293 (const attribute): Likewise.
15294 (pure attribute): Likewise.
15296 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15299 * config/i386/i386.c (ix86_expand_vector_set): Use
15300 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15302 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15304 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15305 instructions when changing rounding bits to preserve precision bits
15306 in the x87 control word.
15308 2018-04-03 Martin Liska <mliska@suse.cz>
15310 PR tree-optimization/82491
15311 * rtl.h (strip_offset_and_add): Replace += suboffset with
15312 poly_uint64 () + suboffset.
15314 2018-03-29 Martin Liska <mliska@suse.cz>
15315 Martin Jambor <mjambor@suse.cz>
15318 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15319 param_type is not an integral or pointer type.
15321 2018-04-03 Richard Biener <rguenther@suse.de>
15323 * sese.h (recompute_all_dominators): Remove.
15325 2018-04-02 Martin Sebor <msebor@redhat.com>
15327 * doc/invoke.texi (-Wrestrict): Fix typos.
15329 2018-04-02 Jim Wilson <jimw@sifive.com>
15331 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15332 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15333 (<optab>di3, <optab>si3_extend): Likewise.
15334 (<optab>si3_mask, <optab>si3_mask_1): New.
15335 (<optab>di3_mask, <optab>di3_mask_1): New.
15336 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15337 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15338 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15340 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15342 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15345 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15347 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15348 (nds32_canonicalize_comparison): New function.
15350 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15351 Kito Cheng <kito.cheng@gmail.com>
15352 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15354 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15355 * config/nds32/constants.md (unspec_volatile_element): Add
15356 UNSPEC_VOLATILE_RELAX_GROUP.
15357 * config/nds32/nds32-relax-opt.c: New file.
15358 * config/nds32/nds32-predicates.c
15359 (nds32_symbol_load_store_p): New function.
15360 * config/nds32/nds32-protos.h
15361 (nds32_symbol_load_store_p): Declare function.
15362 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15363 * config/nds32/nds32.c
15364 (nds32_register_pass): New function to register pass.
15365 (nds32_register_passes): New function to register passes.
15366 * config/nds32/nds32.md (relax_group): New pattern.
15367 * config/nds32/nds32.opt (mrelax-hint): New option.
15368 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15370 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
15372 * config/nds32/t-nds32: Modify files dependency.
15374 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15376 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15377 (PROFILE_HOOK): Define its implementation.
15379 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15381 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15382 type and 32-bit size.
15384 2018-04-01 Jakub Jelinek <jakub@redhat.com>
15386 PR middle-end/85090
15387 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15388 (V_128_256): New mode iterator.
15389 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15390 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15391 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15393 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15394 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15396 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
15399 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15400 NaN inputs correctly.
15402 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
15405 * config/rs6000/vsx.md (??r): New mode attribute.
15406 (*vsx_mov<mode>_64bit): Use it.
15407 (*vsx_mov<mode>_32bit): Likewise.
15409 2018-03-30 Martin Sebor <msebor@redhat.com>
15411 PR tree-optimization/84818
15412 * builtins.c (check_access): Use warning_n.
15414 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15417 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15419 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15422 2018-03-30 Julia Koval <julia.koval@intel.com>
15425 * x86-tune.def (movx, partial_reg_dependency): Enable for
15428 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
15430 PR inline-asm/84985
15431 * lra-constraints.c (process_alt_operands): Move setting
15432 this_alternative_matches below.
15434 2018-03-29 Martin Liska <mliska@suse.cz>
15437 * doc/invoke.texi: Document how LTO works with debug info.
15438 Describe auto-load support of binutils. Mention 'x86-64'
15439 as valid option value of -march option.
15441 2018-03-29 Jakub Jelinek <jakub@redhat.com>
15443 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15446 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15447 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15448 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15451 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15454 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15455 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15456 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15457 for RS6000_BTM_POWERPC64.
15458 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15459 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15460 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15463 (DIVDEU): Likewise.
15465 2018-03-28 Carl Love <cel@us.ibm.com>
15468 2017-09-27 Carl Love <cel@us.ibm.com>
15470 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15471 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15472 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15475 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15477 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15478 instead of __vector bool.
15479 (_mm_max_pu8): Likewise.
15480 (_mm_min_pi16): Likewise.
15482 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15485 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15486 (DIVWEUO): Likewise.
15487 (DIVDEO): Likewise.
15488 (DIVDEUO): Likewise.
15489 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15490 DIVWEUO and DIVDEUO.
15491 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15492 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15493 (div_extend): Likewise.
15494 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15496 (__builtin_divweuo): Likewise.
15497 (__builtin_divdeo): Likewise.
15498 (__builtin_divdeuo): Likewise.
15500 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15503 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15504 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15506 PR tree-optimization/82004
15507 * gimple-match-head.c (optimize_pow_to_exp): New function.
15508 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15509 Don't fold to exp if optimize_pow_to_exp is false.
15511 2018-03-28 Martin Liska <mliska@suse.cz>
15514 * calls.c (initialize_argument_information): Fix trailing space.
15515 * common.opt: Fix typo and provide better explanation for
15516 -fsanitize-coverage option.
15517 * config/i386/i386.opt: Fix typo.
15519 2018-03-28 Jakub Jelinek <jakub@redhat.com>
15520 Martin Liska <mliska@suse.cz>
15523 * gimplify.c (asan_poison_variable): Don't do the check for
15524 gimplify_omp_ctxp here.
15525 (gimplify_decl_expr): Do it here.
15526 (gimplify_target_expr): Likewise.
15528 2018-03-28 Martin Liska <mliska@suse.cz>
15531 * config/i386/i386.c (ix86_function_arg_advance): Do not call
15532 chkp_type_bounds_count if MPX is not enabled.
15534 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
15536 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15538 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
15541 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15542 function to create the function decl for complex long double
15543 multiply and divide for -mabi=ieeelongdouble.
15544 (init_float128_ieee): Call it.
15546 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
15549 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15550 -fcf-protection=branch -mibt.
15551 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15553 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15556 * config/arm/arm.c (arm_valid_symbolic_address): Handle
15557 arm_word_relocations.
15559 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
15562 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15563 extern array declarations.
15565 2018-03-27 Richard Biener <rguenther@suse.de>
15567 PR middle-end/84067
15568 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15569 explicit single_use checks.
15571 2018-03-27 Richard Biener <rguenther@suse.de>
15573 PR tree-optimization/85082
15574 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15577 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15579 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15580 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15581 Turn on fasynchronous-unwind-tables and funwind-tables.
15583 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
15586 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15587 (*bmi_blsr_<mode>_ccz): Ditto.
15589 2018-03-26 Tom de Vries <tom@codesourcery.com>
15591 PR tree-optimization/85063
15592 * omp-general.c (offloading_function_p): New function. Factor out
15594 * omp-offload.c (pass_omp_target_link::gate): ... here.
15595 * omp-general.h (offloading_function_p): Declare.
15596 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15597 with attribute omp declare target for offloading functions.
15599 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
15601 PR tree-optimization/84005
15602 * tree-data-ref.h (get_base_for_alignment): Declare.
15603 * tree-data-ref.c (get_base_for_alignment_1): New function.
15604 (get_base_for_alignment): Likewise.
15605 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15606 get_base_for_alignment to find a suitable base object, instead
15607 of always using drb->base_address.
15609 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15611 PR inline-asm/85022
15612 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15613 known size by default.
15615 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
15617 PR inline-asm/85030
15618 * lra-constraints.c (process_alt_operands): Don't match BLKmode
15619 and non BLKmode operands.
15621 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15624 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15625 Clean up attributes.
15627 2018-03-23 Richard Biener <rguenther@suse.de>
15630 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15631 we are going to emit early debug for LTO.
15633 2018-03-23 Jakub Jelinek <jakub@redhat.com>
15635 PR inline-asm/85034
15636 * function.c (match_asm_constraints_1): Don't optimize if input
15637 doesn't satisfy general_operand predicate for output's mode.
15639 PR inline-asm/85022
15640 * alias.c (write_dependence_p): Don't require for x_canonicalized
15641 non-VOIDmode if x has VOIDmode.
15644 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15645 just don't try to optimize it rather than assert it never happens.
15647 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15649 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15650 macro expansions for definition of ST_INTERNAL_<mode> and
15651 LD_INTERNAL_<mode> builtins.
15652 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15654 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15656 (altivec_expand_st_builtin): Likewise.
15657 (altivec_expand_builtin): Remove calls to deleted functions.
15658 (rs6000_address_for_altivec): Delete this function.
15659 * config/rs6000/vector.md: Remove expands for
15660 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15662 2018-03-22 Sudakshina Das <sudi.das@arm.com>
15665 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15666 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15667 re-computing once computed.
15668 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15669 (arm_init_machine_status): Initialize
15670 machine->static_chain_stack_bytes.
15672 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15675 * doc/extend.texi: Add four new prototypes for vec_ld.
15676 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15677 definitions for more logical presentation.
15678 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15679 entries for V1TI variants of __builtin_altivec_ld builtin.
15680 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15681 handling of V1TI variant of LVX icode pattern.
15682 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15683 (rs6000_gimple_fold_builtin): Likewise.
15684 (altivec_init_builtins): Add code to define
15685 __builtin_altivec_lvx_v1ti function.
15687 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15689 PR inline-asm/84941
15690 * function.c (match_asm_constraints_1): Don't do the optimization
15691 if input isn't a REG, SUBREG, MEM or constant.
15693 2018-03-22 Tom de Vries <tom@codesourcery.com>
15695 PR tree-optimization/84956
15696 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15697 bb_has_abnormal_pred.
15699 2018-03-22 Jakub Jelinek <jakub@redhat.com>
15702 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15703 DECL_INITIAL (decl) to decl at the end.
15704 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15705 adjust the comment.
15707 2018-03-21 Joseph Myers <joseph@codesourcery.com>
15709 * doc/extend.texi (__builtin_tgmath): Document when complex
15710 integer types are treated as _Complex _Float64.
15712 2018-03-21 Tom de Vries <tom@codesourcery.com>
15714 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15716 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15718 PR tree-optimization/84960
15719 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15720 if it is ENTRY block, move them into single succ of ENTRY in that case.
15722 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
15724 PR tree-optimization/84811
15725 * poly-int.h (poly_span_traits): Remove the T3 parameter and
15726 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15727 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15728 (known_subrange_p): Update accordingly. Cast each value involved
15729 in the size comparison, rather than casting the result of the
15732 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15734 PR tree-optimization/84982
15735 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15736 by flipping the least significant bit rather than all bits from
15737 bitpos to bitpos + bitsize - 1.
15739 2018-03-21 Nathan Sidwell <nathan@acm.org>
15741 * doc/extend.texi (Deprecated Features): Remove mention of
15742 long-deleted deprecations.
15744 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15747 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15748 * configure: Regenerate.
15750 2018-03-21 Tom de Vries <tom@codesourcery.com>
15752 PR tree-optimization/83126
15753 * tree-parloops.c (num_phis): New function.
15754 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15756 2018-03-21 Nathan Sidwell <nathan@acm.org>
15758 * doc/extend.texi (Deprecated Features): Update deprecated flags,
15759 mention anon-struct/union members and trailing attributes.
15761 2018-03-21 Bin Cheng <bin.cheng@arm.com>
15763 PR tree-optimization/84969
15764 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15765 builtin memset partitions if they set different rhs values.
15767 2018-03-21 Jakub Jelinek <jakub@redhat.com>
15769 PR rtl-optimization/84989
15770 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15771 VEC_DUPLICATE with scalar result mode.
15773 2018-03-21 Martin Liska <mliska@suse.cz>
15776 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15777 not intended return statement.
15779 2018-03-21 Martin Liska <mliska@suse.cz>
15782 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15783 (chkp_find_bound_slots_1): Limit number of iterations.
15785 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
15788 * Minor grammar fixes for x86 options.
15790 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15793 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15794 holding REG_CFA_RESTORE notes, instead turn them into a USE.
15796 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
15799 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15800 (altivec_lvx_<mode>_1op): Likewise.
15801 (altivec_stvx_<mode>_2op): Likewise.
15802 (altivec_stvx_<mode>_1op): Likewise.
15803 (altivec_lvx_<VM2:mode>): New define_expand.
15804 (altivec_stvx_<VM2:mode>): Likewise.
15805 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15806 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15807 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15808 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15809 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15810 (rs6000_gen_lvx): Likewise.
15811 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15812 (altivec_expand_stv_builtin): Likewise.
15813 (altivec_expand_builtin): Likewise.
15814 * config/rs6000/vector.md: Likewise.
15816 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15819 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
15822 2018-03-20 Richard Biener <rguenther@suse.de>
15825 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
15826 sign-conversions as zero, fall back to standard scalar_stmt
15829 2018-03-20 Martin Liska <mliska@suse.cz>
15832 * predict.c (rebuild_frequencies): Handle case when we have
15833 PROFILE_ABSENT, but flag_guess_branch_prob is false.
15835 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15838 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
15839 flag_section_anchors.
15840 * varasm.c (use_blocks_for_decl_p): Remove hack for
15841 dw2_force_const_mem.
15844 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
15846 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
15847 be created, use lowpart_subreg of operands[0] rather than operands[0]
15849 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15850 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15851 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15852 and n constraint instead of aarch64_shift_imm_di and Usd.
15853 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15854 (*aarch64_<optab>_reg_minus<mode>3): ... this.
15856 2018-03-20 Sudakshina Das <sudi.das@arm.com>
15859 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15860 to favor GPR over NEON registers.
15861 (<shift>di3_neon): Likewise.
15863 2018-03-20 Tom de Vries <tom@codesourcery.com>
15866 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15867 (nvptx_process_pars): Emit bar.sync asap and alap.
15869 2018-03-20 Tom de Vries <tom@codesourcery.com>
15872 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15873 seen_label if seen_label is already set.
15875 2018-03-20 Jakub Jelinek <jakub@redhat.com>
15878 * config/i386/i386.c (fold_builtin_cpu): For features above 31
15879 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15880 Use 1U instead of 1. Formatting fixes.
15883 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15884 instead of TREE_TYPE (s1) for the return value.
15886 2018-03-19 Jakub Jelinek <jakub@redhat.com>
15888 PR tree-optimization/84946
15889 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15890 bitsize + bitsize in poly_uint64 rather than poly_int64.
15893 * dwarf2asm.c: Include fold-const.c.
15894 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15895 of decl rather than decl itself.
15897 PR rtl-optimization/84643
15898 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15900 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
15903 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15904 calling assemble_variable.
15906 2018-03-19 Sudakshina Das <sudi.das@arm.com>
15909 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
15910 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
15912 2018-03-19 Jim Wilson <jimw@sifive.com>
15915 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
15916 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
15917 (riscv_first_stack_step): Likewise.
15918 (riscv_option_override): Use STACK_BOUNDARY instead of
15919 MIN_STACK_BOUNDARY.
15920 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
15921 MIN_STACK_BOUNDARY.
15922 (BIGGEST_ALIGNMENT): Set to 128.
15923 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
15924 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
15927 2018-03-19 Richard Biener <rguenther@suse.de>
15929 PR tree-optimization/84933
15930 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
15931 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
15933 2018-03-19 Richard Biener <rguenther@suse.de>
15935 PR tree-optimization/84859
15936 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
15937 (cond_if_else_store_replacement): Perform sinking operation on
15938 single-store BBs regardless of MAX_STORES_TO_SINK setting.
15939 Generalize what a BB with a single eligible store is.
15941 2018-03-19 Richard Biener <rguenther@suse.de>
15943 PR tree-optimization/84929
15944 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
15945 chrec_is_positive against non-chrec arg.
15947 2018-03-19 Tamar Christina <tamar.christina@arm.com>
15950 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
15952 2018-03-18 Martin Liska <mliska@suse.cz>
15954 PR rtl-optimization/84635
15955 * regrename.c (build_def_use): Use matches_mode only when
15958 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
15960 PR tree-optimization/84913
15961 * tree-vect-loop.c (vectorizable_reduction): Don't try to
15962 vectorize chains of COND_EXPRs.
15964 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15966 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
15968 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15970 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
15972 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
15974 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
15976 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15977 Kito Cheng <kito.cheng@gmail.com>
15979 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
15980 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
15981 (nds32_adjust_reg_alloc_order): New function.
15982 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
15984 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
15986 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
15987 nds32_print_operand, nds32_print_operand_address): Use
15988 HOST_WIDE_INT_PRINT_DEC instead.
15990 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
15992 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
15994 2018-03-17 Jakub Jelinek <jakub@redhat.com>
15997 * config/i386/i386.c (initial_ix86_tune_features,
15998 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15999 unsigned long long.
16000 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16001 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16002 rather than 1u << ix86_tune. Formatting fix.
16003 (ix86_option_override_internal): Change ix86_arch_mask from
16004 unsigned int to unsigned HOST_WIDE_INT, initialize to
16005 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16006 (ix86_function_specific_restore): Likewise.
16008 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16011 * postreload.c (reload_combine_recognize_pattern): Perform
16012 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16013 truncate_int_for_mode the result for the destination's mode.
16016 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16017 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16019 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16022 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16025 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16026 regno_allocno_class_array and sorted_pseudos.
16027 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16028 insns where regno is used.
16030 2018-03-16 Martin Liska <mliska@suse.cz>
16033 * multiple_target.c (create_dispatcher_calls): Redirect
16034 reference in the symbol table.
16036 2018-03-16 Martin Liska <mliska@suse.cz>
16039 * multiple_target.c (create_dispatcher_calls): Redirect also
16042 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16046 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16047 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16048 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16050 2018-03-16 Julia Koval <julia.koval@intel.com>
16052 * doc/invoke.texi (Skylake Server): Add CLWB.
16053 Cannonlake): Remove CLWB.
16055 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16057 PR tree-optimization/84841
16058 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16060 (FLOAT_ONE_CONST_TYPE): Define.
16061 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16062 (sort_by_operand_rank): Put entries with higher constant_type last
16063 rather than first to match comments.
16065 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16067 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16070 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16073 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16074 check and use address of target always.
16076 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16079 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16080 (indirect_thunk_bnd_needed): Likewise.
16081 (indirect_thunks_used): Likewise.
16082 (indirect_thunks_bnd_used): Likewise.
16083 (indirect_return_needed): New.
16084 (indirect_return_bnd_needed): Likewise.
16085 (output_indirect_thunk_function): Add a bool argument for
16087 (output_indirect_thunk_function): Don't generate alias for
16088 function return thunk.
16089 (ix86_code_end): Call output_indirect_thunk_function to generate
16090 function return thunks.
16091 (ix86_output_function_return): Set indirect_return_bnd_needed
16092 and indirect_return_needed instead of indirect_thunk_bnd_needed
16093 and indirect_thunk_needed.
16095 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16097 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16098 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16099 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16101 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16102 Paul Hua <paul.hua.gm@gmail.com>
16105 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16107 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16109 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16110 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16111 resp. SFmode cases.
16113 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16116 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16117 instead of GET_MODE_SIZE when comparing Units.
16119 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16122 * varasm.c (hash_section): Return an unchangeble hash value
16123 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16124 Return !aarch64_can_use_per_function_literal_pools_p ().
16126 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16129 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16130 rather than address of cmode as last argument to prepare_cmp_insn.
16132 2018-03-15 Julia Koval <julia.koval@intel.com>
16134 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16135 F_AVX512VNNI, F_AVX512BITALG): New.
16137 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16140 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16141 insn for floating-point loads and stores.
16143 2018-03-14 Carl Love <cel@us.ibm.com>
16145 * config/rs6000/rs6000-c.c: Add macro definitions for
16146 ALTIVEC_BUILTIN_VEC_PERMXOR.
16147 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16148 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16149 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16150 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16152 * config/doc/extend.texi: Add prototypes for vec_permxor.
16154 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16157 * diagnostic-show-locus.c (class layout_point): Convert m_line
16158 from int to linenum_type.
16159 (line_span::comparator): Use linenum "compare" function when
16160 comparing line numbers.
16161 (test_line_span): New function.
16162 (layout_range::contains_point): Convert param "row" from int to
16164 (layout_range::intersects_line_p): Likewise.
16165 (layout::will_show_line_p): Likewise.
16166 (layout::print_source_line): Likewise.
16167 (layout::should_print_annotation_line_p): Likewise.
16168 (layout::print_annotation_line): Likewise.
16169 (layout::print_leading_fixits): Likewise.
16170 (layout::annotation_line_showed_range_p): Likewise.
16171 (struct line_corrections): Likewise for field m_row.
16172 (line_corrections::line_corrections): Likewise for param "row".
16173 (layout::print_trailing_fixits): Likewise.
16174 (layout::get_state_at_point): Likewise.
16175 (layout::get_x_bound_for_row): Likewise.
16176 (layout::print_line): Likewise.
16177 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16178 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16179 * input.c (selftest::test_linenum_comparisons): New function.
16180 (selftest::input_c_tests): Call it.
16181 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16182 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16183 * selftest.h (ASSERT_GT): New macro.
16184 (ASSERT_GT_AT): New macro.
16185 (ASSERT_LT): New macro.
16186 (ASSERT_LT_AT): New macro.
16188 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16190 PR rtl-optimization/84780
16191 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16193 2018-03-14 Martin Liska <mliska@suse.cz>
16195 * tree.c (record_node_allocation_statistics): Use
16196 get_stats_node_kind.
16197 (get_stats_node_kind): New function extracted from
16198 record_node_allocation_statistics.
16199 (free_node): Use get_stats_node_kind.
16201 2018-03-14 Richard Biener <rguenther@suse.de>
16203 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16204 that the value-set of ANTIC_IN doesn't grow.
16207 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16209 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16210 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16212 2018-03-14 Julia Koval <julia.koval@intel.com>
16214 * config.gcc (icelake-client, icelake-server): New.
16216 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16217 (initial_ix86_arch_features): Ditto.
16218 (PTA_SKYLAKE): Add SGX.
16219 (PTA_ICELAKE): Remove.
16220 (PTA_ICELAKE_CLIENT): New.
16221 (PTA_ICELAKE_SERVER): New.
16222 (ix86_option_override_internal): Split up icelake on icelake client and
16224 (get_builtin_code_for_version): Ditto.
16225 (fold_builtin_cpu): Ditto.
16226 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16227 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16228 * config/i386/i386.h (processor_type): Ditto.
16229 * doc/invoke.texi: Ditto.
16231 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16234 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16235 INTEGER_CST offset, add it together with bitpos / 8 and
16236 sign extend based on POINTER_SIZE.
16240 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16243 * config/i386/constraints.md (Yc): New register constraint.
16244 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16245 Use Yc constraint for alternative 2 of operand 0. Remove
16246 preferred_for_speed attribute.
16248 2018-03-14 Richard Biener <rguenther@suse.de>
16250 PR tree-optimization/84830
16251 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16252 with the old one to avoid oscillations.
16254 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16257 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16259 (assign_by_spills): Return a flag of reload assignment failure.
16260 Do not process the reload assignment failures. Do not spill other
16261 reload pseudos if they has the same reg class. Update n if
16263 (lra_assign): Add a return arg. Set up from the result of
16264 assign_by_spills call.
16265 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16266 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16267 usage_insns if it is not NULL.
16268 (spill_hard_reg_in_range): New function.
16269 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16270 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16271 function prototypes.
16272 (lra_assign): Change prototype.
16273 * lra.c (lra): Add code to deal with fails by splitting hard reg
16276 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16278 * config/riscv/riscv.opt (mrelax): New option.
16279 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16280 "norelax" when riscv_mrelax is disabled.
16281 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16283 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16286 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16287 reassociation for int modes.
16289 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16291 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16292 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16294 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16295 * config/aarch64/aarch64-sve.md
16296 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16297 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16298 (*extend<mode><Vwide>2): Rename to...
16299 (aarch64_sve_extend<mode><Vwide>2): ...this.
16300 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16301 renaming the old pattern to...
16302 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16304 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16305 define_expand, renaming the old pattern to...
16306 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16307 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16308 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16309 account when deciding which SVE instruction the optab should use.
16310 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16312 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16314 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16315 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16316 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16317 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16318 (tlsdesc_small_<mode>): Turn a define_expand and use
16319 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16320 (tlsdesc_small_advsimd_<mode>): ...this.
16321 (tlsdesc_small_sve_<mode>): New pattern.
16323 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16325 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16326 (UNSPEC_UMUL_HIGHPART): New constants.
16327 (MUL_HIGHPART): New int iteraor.
16328 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16329 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16331 (*<su>mul<mode>3_highpart): New define_insn.
16333 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16336 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16339 2018-03-13 Martin Liska <mliska@suse.cz>
16342 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16344 (sem_item_optimizer::~sem_item_optimizer): Release it.
16345 (sem_item_optimizer::merge_classes): Register variable aliases.
16346 (sem_item_optimizer::fixup_pt_set): New function.
16347 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16348 * ipa-icf.h: Declare new variables and functions.
16350 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16352 PR middle-end/84834
16353 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16354 integer_pow2p@2 and test integer_pow2p in condition.
16355 (A < 0 ? C : 0): Similarly for @1.
16357 PR middle-end/84831
16358 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16359 characters starting at p contain '\0' character, don't look beyond
16363 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16364 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16367 * reg-stack.c (change_stack): Change update_end var from int to
16368 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16369 also call set_block_for_insn on the newly added insns and rescan.
16372 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16373 on the last operand.
16376 * tree.c (stabilize_reference_1): Return save_expr (e) for
16377 STATEMENT_LIST even if it doesn't have side-effects.
16379 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
16381 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16383 2018-03-12 Renlin Li <renlin.li@arm.com>
16385 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16386 aarch64_output_scalar_simd_mov_immediate.
16388 2018-03-12 Martin Sebor <msebor@redhat.com>
16390 PR tree-optimization/83456
16391 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16392 for perfectly overlapping calls to memcpy.
16393 (gimple_fold_builtin_memory_chk): Same.
16394 (gimple_fold_builtin_strcpy): Handle no-warning.
16395 (gimple_fold_builtin_stxcpy_chk): Same.
16396 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16398 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16400 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16401 parameter. Use it for SFmode.
16402 (rs6000_function_arg_advance_1): Adjust.
16403 (rs6000_function_arg): Adjust.
16404 (rs6000_gimplify_va_arg): Pass false for that new parameter.
16406 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16408 PR rtl-optimization/84169
16409 PR rtl-optimization/84780
16410 * combine.c (can_combine_p): Check for a 2-insn combination whether
16411 the destination register is used between the two insns, too.
16413 2018-03-12 Richard Biener <rguenther@suse.de>
16415 PR tree-optimization/84803
16416 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16417 for refs DR analysis didn't process.
16419 2018-03-12 Richard Biener <rguenther@suse.de>
16421 PR tree-optimization/84777
16422 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16423 force-vectorize loops ignore whether we are optimizing for size.
16425 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
16427 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16428 (TARGET_MD_ASM_ADJUST): Define.
16430 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
16431 Kito Cheng <kito.cheng@gmail.com>
16432 Chung-Ju Wu <jasonwucj@gmail.com>
16434 * config/nds32/nds32.c (nds32_compute_stack_frame,
16435 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16436 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16437 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16438 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16439 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16440 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16441 * config/nds32/nds32.md (prologue, epilogue): Use macro
16442 NDS32_V3PUSH_AVAILABLE_P to do checking.
16444 2018-03-11 Jakub Jelinek <jakub@redhat.com>
16447 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16448 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16449 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
16450 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
16451 addition of most attributes on !orig_type_die or the attribute not
16452 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16454 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16455 Chung-Ju Wu <jasonwucj@gmail.com>
16457 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16458 __NDS32_VH__ macro.
16459 * config/nds32/nds32.opt (mvh): New option.
16461 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16462 Chung-Ju Wu <jasonwucj@gmail.com>
16464 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16466 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16467 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16470 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
16471 Chung-Ju Wu <jasonwucj@gmail.com>
16473 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16475 * config/nds32/nds32-multiple.md (strlensi): New pattern.
16476 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16478 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
16479 Kito Cheng <kito.cheng@gmail.com>
16480 Chung-Ju Wu <jasonwucj@gmail.com>
16482 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16483 UNSPEC_FFMISM and UNSPEC_FLMISM.
16484 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16485 for ffb, ffmism and flmism.
16486 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16487 (unspec_ffmism): Ditto.
16488 (unspec_flmism): Ditto.
16489 (nds32_expand_builtin_impl): Check if string extension is available.
16490 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16491 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16493 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
16496 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16499 * lra-assigns.c (assign_by_spills): Return a flag of reload
16500 assignment failure. Do not process the reload assignment
16501 failures. Do not spill other reload pseudos if they has the same
16503 (lra_assign): Add a return arg. Set up from the result of
16504 assign_by_spills call.
16505 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16506 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16507 usage_insns if it is not NULL.
16508 (spill_hard_reg_in_range): New function.
16509 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16510 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16511 function prototypes.
16512 (lra_assign): Change prototype.
16513 * lra.c (lra): Add code to deal with fails by splitting hard reg
16516 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
16519 * config/i386/i386.opt: Replace Enforcment with Enforcement.
16521 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
16524 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16525 (dw_val_node): Add val_symbolic_view.
16526 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16527 (symview_upper_bound): New.
16528 (new_line_info_table): Initialize symviews_since_reset.
16529 (dwarf2out_source_line): Count symviews_since_reset and set
16530 symview_upper_bound.
16531 (dw_val_equal_p): Handle symview.
16532 (add_AT_symview): New.
16533 (print_dw_val): Handle symview.
16534 (attr_checksum, attr_checksum_ordered): Likewise.
16535 (same_dw_val_p, size_of_die): Likewise.
16536 (value_format, output_die): Likewise.
16537 (add_high_low_attributes): Use add_AT_symview for entry_view.
16538 (dwarf2out_finish): Reset symview_upper_bound, clear
16541 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
16544 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16545 Add strict argument and use it.
16546 (rs6000_split_multireg_move): Update for new strict argument.
16547 (mem_operand_gpr): Disallow all non-offsettable addresses.
16548 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16550 2018-03-09 Jakub Jelinek <jakub@redhat.com>
16553 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16554 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16555 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16558 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16559 decl, use remap_type if we want to use the type.
16561 2018-03-09 Martin Sebor <msebor@redhat.com>
16563 PR tree-optimization/84526
16564 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16566 (builtin_access::generic_overlap): Be prepared to handle non-array
16569 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
16571 PR rtl-optimization/84682
16572 * lra-constraints.c (process_address_1): Check is_address flag
16573 for address constraints.
16574 (process_alt_operands): Likewise.
16575 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16576 preprocess_constraints.
16577 * recog.h (preprocess_constraints): Add oploc parameter.
16579 * recog.c (preprocess_constraints): Test address_operand for
16580 CT_ADDRESS constraints.
16582 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
16585 * lra-assigns.c (assign_by_spills): Return a flag of reload
16586 assignment failure. Do not process the reload assignment
16587 failures. Do not spill other reload pseudos if they has the same
16589 (lra_assign): Add a return arg. Set up from the result of
16590 assign_by_spills call.
16591 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16592 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16593 usage_insns if it is not NULL.
16594 (spill_hard_reg_in_range): New function.
16595 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16596 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16597 function prototypes.
16598 (lra_assign): Change prototype.
16599 * lra.c (lra): Add code to deal with fails by splitting hard reg
16602 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16605 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16606 Accept complain bool parameter. Only emit errors if it is true.
16607 (arm_parse_cpu_option_name): Likewise.
16608 (arm_target_thumb_only): Adjust callers of the above.
16609 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16610 prototype to take a default true bool parameter.
16611 (arm_parse_arch_option_name): Likewise.
16613 2018-03-09 David Malcolm <dmalcolm@redhat.com>
16614 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
16618 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16619 * configure: Regenerate.
16620 * configure.ac ("linker --version-script option"): New.
16621 ("linker soname option"): New.
16623 2018-03-09 Richard Biener <rguenther@suse.de>
16625 PR tree-optimization/84775
16626 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16627 immediate uses of predicate stmts and mark them modified.
16630 PR tree-optimization/84178
16631 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16633 (version_loop_for_if_conversion): Delay update_ssa call.
16634 (tree_if_conversion): Delay update_ssa until after predicate
16637 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
16640 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16641 when the function accesses prior frames.
16643 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16646 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16647 gen_llsym, otherwise call maybe_gen_llsym.
16649 PR inline-asm/84742
16650 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16651 has ',' character inside of it.
16653 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16656 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16657 as clobbering CC_REGNUM.
16659 2018-03-08 Richard Biener <rguenther@suse.de>
16661 PR middle-end/84552
16662 * tree-scalar-evolution.c: Include tree-into-ssa.h.
16663 (follow_copies_to_constant): Do not follow SSA names registered
16666 2018-03-08 Richard Biener <rguenther@suse.de>
16668 PR tree-optimization/84178
16669 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16671 (version_loop_for_if_conversion): Delay update_ssa call.
16672 (tree_if_conversion): Delay update_ssa until after predicate
16675 2018-03-08 David Malcolm <dmalcolm@redhat.com>
16677 PR tree-optimization/84178
16678 * tree-if-conv.c (release_bb_predicate): Remove the
16679 the assertion that the stmts have NULL use_ops.
16680 Discard the statements, asserting that they haven't
16681 yet been added to a BB.
16683 2018-03-08 Richard Biener <rguenther@suse.de>
16685 PR tree-optimization/84746
16686 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16687 (phi_translate): Pass in destination ANTIC_OUT set.
16688 (phi_translate_1): Likewise. For a simplified result lookup
16689 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16690 (phi_translate_set): Adjust.
16691 (do_pre_regular_insertion): Likewise.
16692 (do_pre_partial_partial_insertion): Likewise.
16694 2018-03-08 Martin Liska <mliska@suse.cz>
16696 PR gcov-profile/84735
16697 * doc/gcov.texi: Document usage of profile files.
16698 * gcov-io.h: Document changes in the format.
16700 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
16704 * dwarf2out.c (struct dw_line_info_table): Update comments for
16706 (FORCE_RESET_NEXT_VIEW): New.
16707 (FORCE_RESETTING_VIEW_P): New.
16708 (RESETTING_VIEW_P): Check for -1 too.
16709 (ZERO_VIEW_P): Likewise.
16710 (new_line_info_table): Force-reset next view.
16711 (dwarf2out_begin_function): Likewise.
16712 (dwarf2out_source_line): Simplify zero_view_p initialization.
16713 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16714 view directly. Omit view when omitting .loc at line 0.
16716 2018-03-08 Jakub Jelinek <jakub@redhat.com>
16718 PR tree-optimization/84740
16719 * tree-switch-conversion.c (process_switch): Call build_constructors
16720 only if info.phi_count is non-zero.
16722 PR tree-optimization/84739
16723 * tree-tailcall.c (find_tail_calls): Check call arguments against
16724 DECL_ARGUMENTS (current_function_decl) rather than
16725 DECL_ARGUMENTS (func) when checking for tail recursion.
16727 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16729 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16730 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16731 Volker Reichelt's entry and add entries for people that perform
16732 GCC fuzzy testing and report numerous bugs.
16734 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
16737 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16738 readonly data in sdata, if that is disabled.
16739 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16740 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16741 -mreadonly-in-sdata option.
16743 2018-03-07 Martin Sebor <msebor@redhat.com>
16745 PR tree-optimization/84468
16746 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16747 basic block when looking for nul assignment.
16749 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
16752 * except.h (output_function_exception_table): Adjust prototype.
16753 * except.c (output_function_exception_table): Remove FNNAME parameter
16754 and add SECTION parameter. Ouput one part of the table at a time.
16755 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16756 the first part of the exception table and emit unwind directives.
16757 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16758 (i386_pe_seh_cold_init): Likewise.
16759 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16760 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16761 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16762 (ix86_output_call_insn): Emit a nop in one more case for SEH.
16763 * config/i386/winnt.c: Include except.h.
16764 (struct seh_frame_state): Add reg_offset, after_prologue and
16765 in_cold_section fields.
16766 (i386_pe_seh_end_prologue): Set seh->after_prologue.
16767 (i386_pe_seh_cold_init): New function.
16768 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16769 to seh->in_cold_section.
16770 (seh_emit_push): Record the offset of the push.
16771 (seh_emit_save): Record the offet of the save.
16772 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16773 Test seh->after_prologue to disregard the epilogue.
16774 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16775 (i386_pe_end_cold_function): New function.
16777 2018-03-07 Jakub Jelinek <jakub@redhat.com>
16780 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16781 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16784 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16786 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16787 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16789 PR middle-end/84723
16790 * multiple_target.c: Include tree-inline.h and intl.h.
16791 (expand_target_clones): Diagnose and fail if node->definition and
16792 !tree_versionable_function_p (node->decl).
16794 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
16796 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16798 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16799 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16800 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16802 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16805 * combine.c (try_combine): Use reg_or_subregno instead of handling
16806 just paradoxical SUBREGs and REGs.
16808 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
16810 * config/arc/arc.c (arc_finalize_pic): Remove function.
16811 (arc_must_save_register): We use single base PIC register, remove
16812 checks to save/restore the PIC register.
16813 (arc_expand_prologue): Likewise.
16814 * config/arc/arc-protos.h (arc_set_default_type_attributes):
16816 (arc_verify_short): Likewise.
16817 (arc_attr_type): Likewise.
16818 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16819 (walk_stores): Likewise.
16820 (arc_address_cost): Make it static.
16821 (arc_verify_short): Likewise.
16822 (branch_dest): Likewise.
16823 (arc_attr_type): Likewise.
16824 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
16825 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
16826 (arc_final_prescan_insn): Remove inserting the nops due to
16827 hardware hazards. It is done in reorg step.
16828 (insn_length_variant_t): Remove.
16829 (insn_length_parameters_t): Likewise.
16830 (arc_insn_length_parameters): Likewise.
16831 (arc_get_insn_variants): Likewise.
16832 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
16834 2018-03-06 Jakub Jelinek <jakub@redhat.com>
16836 PR inline-asm/84683
16837 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
16840 PR tree-optimization/84687
16841 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
16843 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
16845 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16847 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16848 Rename to ppc_speculation_barrier.
16849 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16850 __builtin_ppc_speculation_barrier.
16852 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16855 * combine.c (combine_simplify_rtx): Don't try to simplify if
16856 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16859 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
16861 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16862 to 32 bytes when compiling for POWER9.
16864 2018-03-05 Jakub Jelinek <jakub@redhat.com>
16867 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16868 regparm >= 3 with no arg reg available also for calls with
16869 flag_force_indirect_call. Pass decl to ix86_function_regparm.
16872 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16874 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
16876 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
16879 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16881 2018-03-05 Richard Biener <rguenther@suse.de>
16883 PR tree-optimization/84486
16884 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16885 When inserting a __builtin_assume_aligned call set the LHS
16886 SSA name alignment info accordingly.
16888 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
16890 PR tree-optimization/84114
16891 * config/aarch64/aarch64.c (aarch64_reassociation_width)
16892 Avoid reassociation of FLOAT_MODE addition.
16894 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
16896 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16897 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16898 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16899 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16900 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16901 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16902 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16904 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16905 __builtin_ia32_wbinvd): New builtins.
16906 (SPECIAL_ARGS2): New.
16907 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
16908 (SPECIAL_ARGS2): New.
16909 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
16910 (ix86_valid_target_attribute_inner_p): Ditto.
16911 (ix86_init_mmx_sse_builtins): Add special_args2.
16912 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
16913 TARGET_WBNOINVD_P): New.
16914 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
16915 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
16916 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
16917 * config/i386/immintrin.h (_wbinvd): New intrinsic.
16918 * config/i386/pconfigintrin.h: New file.
16919 * config/i386/wbnoinvdintrin.h: Ditto.
16920 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
16922 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
16924 2018-03-05 Richard Biener <rguenther@suse.de>
16926 PR tree-optimization/84670
16927 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16929 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16930 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16931 (compute_antic_aux): Only assert the number of values in ANTIC_IN
16932 doesn't grow if all successors (recursively) were visited at least
16935 2018-03-05 Richard Biener <rguenther@suse.de>
16937 PR tree-optimization/84650
16938 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
16939 if executed in the loop pipeline.
16941 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
16943 * doc/configfiles.texi (Configuration Files): Move info about
16944 conditionalizing $target-protos.h to...
16945 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
16946 differs from $target-protos.h.
16948 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
16949 Chung-Ju Wu <jasonwucj@gmail.com>
16951 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
16952 * config/nds32/nds32-multiple.md (setmemsi): Define.
16953 * config/nds32/nds32-memory-manipulation.c
16954 (nds32_gen_dup_4_byte_to_word_value): New.
16955 (emit_setmem_word_loop): New.
16956 (emit_setmem_byte_loop): New.
16957 (nds32_expand_setmem_loop): New.
16958 (nds32_expand_setmem_loop_v3m): New.
16959 (nds32_expand_setmem_unroll): New.
16960 (nds32_expand_setmem): New.
16962 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16963 Chung-Ju Wu <jasonwucj@gmail.com>
16965 * config/nds32/nds32-memory-manipulation.c
16966 (nds32_emit_load_store): New.
16967 (nds32_emit_post_inc_load_store): New.
16968 (nds32_emit_mem_move): New.
16969 (nds32_emit_mem_move_block): New.
16970 (nds32_expand_movmemsi_loop_unknown_size): New.
16971 (nds32_expand_movmemsi_loop_known_size): New.
16972 (nds32_expand_movmemsi_loop): New.
16973 (nds32_expand_movmemsi_unroll): New.
16974 (nds32_expand_movmemqi): Rename ...
16975 (nds32_expand_movmemsi): ... to this.
16976 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
16977 (movmemsi): ... to this.
16978 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
16979 (nds32_expand_movmemsi): ... to this.
16981 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16982 Monk Chiang <sh.chiang04@gmail.com>
16983 Chung-Ju Wu <jasonwucj@gmail.com>
16985 * config/nds32/nds32-protos.h
16986 (nds32_expand_load_multiple): New arguments.
16987 (nds32_expand_store_multiple): Ditto.
16988 (nds32_valid_multiple_load_store): Rename ...
16989 (nds32_valid_multiple_load_store_p): ... to this.
16990 * config/nds32/nds32-memory-manipulation.c
16991 (nds32_expand_load_multiple): Refine implementation.
16992 (nds32_expand_store_multiple): Ditto.
16993 * config/nds32/nds32-multiple.md
16994 (load_multiple): Update nds32_expand_load_multiple interface.
16995 (store_multiple): Update nds32_expand_store_multiple interface.
16996 * config/nds32/nds32-predicates.c
16997 (nds32_valid_multiple_load_store): Rename ...
16998 (nds32_valid_multiple_load_store_p): ... to this and refine
17000 * config/nds32/predicates.md
17001 (nds32_load_multiple_and_update_address_operation): New predicate.
17002 (nds32_store_multiple_and_update_address_operation): New predicate.
17004 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17005 Chung-Ju Wu <jasonwucj@gmail.com>
17007 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17008 (combo): New attribute.
17009 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17011 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17013 * config/nds32/nds32.opt: Change -mcmodel= default value.
17015 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17016 Monk Chiang <sh.chiang04@gmail.com>
17017 Chung-Ju Wu <jasonwucj@gmail.com>
17019 * config/nds32/constants.md (unspec_element): New enum.
17020 * config/nds32/constraints.md (Umw): New constraint.
17021 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17022 * config/nds32/nds32-intrinsic.md: Likewise.
17023 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17024 (nds32_valid_smw_lwm_base_p): New.
17025 (nds32_output_smw_single_word): New.
17026 (nds32_output_lmw_single_word): New.
17027 (nds32_expand_unaligned_load): New.
17028 (nds32_expand_unaligned_store): New.
17029 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17030 (nds32_output_smw_single_word): Declare.
17031 (nds32_output_lmw_single_word): Declare.
17032 (nds32_expand_unaligned_load): Declare.
17033 (nds32_expand_unaligned_store): Declare.
17034 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17035 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17036 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17037 NDS32_BUILTIN_UASTORE_DW.
17038 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17041 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17042 Kito Cheng <kito.cheng@gmail.com>
17043 Chung-Ju Wu <jasonwucj@gmail.com>
17045 * config/nds32/nds32-intrinsic.c
17046 (nds32_expand_builtin_null_ftype_reg): Delete.
17047 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17048 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17049 (nds32_read_argument): New.
17050 (nds32_legitimize_target): Ditto.
17051 (nds32_legitimize_argument): Ditto.
17052 (nds32_check_constant_argument): Ditto.
17053 (nds32_expand_unop_builtin): Ditto.
17054 (nds32_expand_unopimm_builtin): Ditto.
17055 (nds32_expand_binop_builtin): Ditto.
17056 (nds32_builtin_decl_impl): Ditto.
17057 (builtin_description): Ditto.
17058 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17059 (nds32_init_builtins_impl): Ditto.
17060 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17061 (nds32_builtin_decl): New.
17062 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17063 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17065 2018-03-02 Jeff Law <law@redhat.com>
17067 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17068 (redundant_insn, fill_simple_delay_slots): Likewise.
17069 (fill_slots_from_thread): Likewise.
17070 * resource.c (mark_referenced_resources): Likewise.
17071 (mark_set_resources, find_dead_or_set_registers): Likewise.
17073 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17075 * substring-locations.h (format_warning_va): Formatting fix for
17076 ATTRIBUTE_GCC_DIAG.
17077 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17079 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17080 * substring-locations.c: Include intl.h.
17081 (format_warning_va): Turned into small wrapper around
17082 format_warning_n_va, renamed to ...
17083 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17084 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17086 (format_warning_at_substring_n): New function.
17087 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17088 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17089 format_warning_at_substring with just a shorter name instead of
17090 const function pointer.
17091 (fmtwarn_n): New function.
17092 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17093 appropriate, get rid of all the fmtstr temporaries, move conditionals
17094 with G_() wrapped string literals directly into fmtwarn arguments,
17095 cast dir.len to (int), formatting fixes.
17097 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17099 * doc/invoke.texi: Remove "Cilk Plus" references.
17101 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17102 Richard Biener <rguenther@suse.de>
17105 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17106 for error or warning attributes if CALL_FROM_THUNK_P is set.
17109 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17112 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17113 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17116 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17117 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17119 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17120 instead of -1U in last predictors element's probability member.
17122 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17125 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17126 arguments if they are comparable.
17128 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17130 PR tree-optimization/84634
17131 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17132 masks and masked_loop_p with a single loop_masks, making sure it's
17133 null for bb vectorization.
17135 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17137 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17138 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17139 loop->force_vectorize to check whether there is no alias.
17141 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17144 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17146 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17148 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17149 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17150 instead of a loop around prev_real_insn.
17151 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17154 PR inline-asm/84625
17155 * config/i386/i386.c (ix86_print_operand): Use conditional
17156 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17159 2018-03-02 Richard Biener <rguenther@suse.de>
17161 PR tree-optimization/84427
17162 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17163 (bitmap_set_subtract_values): Rewrite to handle multiple
17166 (prune_clobbered_mems): Likewise.
17167 (phi_translate): Take edge instead of pred/phiblock.
17168 (phi_translate_1): Likewise.
17169 (phi_translate_set): Likewise. Insert all translated
17170 exprs for a value into the set, keeping possibly multiple
17171 expressions per value.
17172 (compute_antic_aux): Adjust for phi_translate changes.
17173 When intersecting union the expressions and prune those
17174 not in the final value set, keeping possibly multiple
17175 expressions per value. Do not use value-insertion
17176 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17177 all expressions. Add verification that the value-sets
17178 only shrink during iteration.
17179 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17180 (do_pre_regular_insertion): Likewise.
17181 (do_pre_partial_partial_insertion): Likewise.
17183 2018-03-02 Richard Biener <rguenther@suse.de>
17186 * config/darwin.c (saved_debug_info_level): New static global.
17187 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17188 (darwin_asm_lto_end): Restore debug info generation settings.
17190 2018-03-01 Martin Liska <mliska@suse.cz>
17193 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17194 volatile arguments.
17196 2018-03-01 Richard Biener <rguenther@suse.de>
17199 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17200 type annotation with LTO when debug was disabled at compile-time.
17202 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17204 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17206 (mips_final_postscan_insn): Likewise.
17208 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17210 PR rtl-optimization/84528
17211 * alias.c (init_alias_target): Add commentary.
17212 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17213 a unique base value if the frame pointer is not eliminated
17214 to the stack pointer.
17216 2018-03-01 Tom de Vries <tom@codesourcery.com>
17218 PR rtl-optimization/83327
17219 * lra-int.h (hard_regs_spilled_into): Declare.
17220 * lra.c (hard_regs_spilled_into): Define.
17221 (init_reg_info): Init hard_regs_spilled_into.
17222 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17223 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17224 (process_bb_lives): Handle hard_regs_spilled_into.
17225 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17226 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17228 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17230 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17231 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17232 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17233 * config/rs6000/aix72.h: New file.
17235 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17237 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17238 instead of warning_at with conditional singular and plural messages
17242 * stor-layout.c (update_alignment_for_field): For
17243 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17244 && !DECL_PACKED (field), do the alignment update, just use
17245 only desired_align instead of MAX (type_align, desired_align)
17247 (place_field): Don't do known_align < desired_align handling
17248 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17249 is non-NULL, instead do it after rli->prev_field handling and
17250 only if not within a bitfield word. For DECL_PACKED (field)
17251 use type_align of BITS_PER_UNIT.
17253 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17255 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17256 superfluous parentheses and trailing spaces.
17258 2018-02-28 Richard Biener <rguenther@suse.de>
17260 PR tree-optimization/84584
17261 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17262 SCoPs with fake exit edge.
17264 2018-02-28 Martin Liska <mliska@suse.cz>
17267 * timevar.c (timer::print): Fix format to properly print 100%
17270 2018-02-28 Richard Biener <rguenther@suse.de>
17272 PR middle-end/84607
17273 * genmatch.c (capture_info::walk_match): Do not mark
17274 captured expressions without operands as expr_p given
17275 they act more like predicates and should be subject to
17276 "lost tail" side-effect preserving.
17278 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17280 PR rtl-optimization/81611
17281 * auto-inc-dec.c (attempt_change): Move dead note from
17282 mem_insn if it's the next use of regno
17283 (find_address): Take address use of reg holding
17284 non-incremented value. Add parm to limit search to the named
17286 (merge_in_block): Attempt to use a mem insn that is the next
17287 use of the original regno.
17289 2018-02-27 Martin Sebor <msebor@redhat.com>
17292 * doc/invoke.texi (-Wmissing-attributes): New option.
17293 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17295 2018-02-27 Martin Sebor <msebor@redhat.com>
17297 PR translation/84207
17298 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17299 n argument to unsigned HOST_WIDE_INT.
17300 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17301 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17302 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17303 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17305 2018-02-27 Richard Biener <rguenther@suse.de>
17307 PR tree-optimization/84512
17308 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17309 Do not use the estimate returned from record_stmt_cost for
17310 the scalar iteration cost but sum properly using add_stmt_cost.
17312 2018-02-27 Richard Biener <rguenther@suse.de>
17314 PR tree-optimization/84466
17315 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17316 Adjust last change to less strictly validate use operands.
17318 2018-02-27 Martin Liska <mliska@suse.cz>
17320 PR gcov-profile/84548
17321 * gcov.c (process_file): Allow partial overlap and consider it
17322 also as group functions.
17323 (output_lines): Properly calculate range of lines for a group.
17325 2018-02-27 Martin Liska <mliska@suse.cz>
17327 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17328 'ggc' suffixes. Change first column width.
17329 (timer::print): Fix formatting of the column.
17331 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17333 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17334 preserve inline entry blocks for the sake of debug inline
17335 entry point markers alone.
17336 (remove_unused_locals): Suggest in comments a better place to
17337 force the preservation of inline entry blocks that are
17338 otherwise unused, but do not preserve them.
17340 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17342 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17344 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17347 * config/i386/constraints.md (Bs): Replace
17348 ix86_indirect_branch_register with
17349 TARGET_INDIRECT_BRANCH_REGISTER.
17351 * config/i386/i386.md (indirect_jump): Likewise.
17352 (tablejump): Likewise.
17353 (*sibcall_memory): Likewise.
17354 (*sibcall_value_memory): Likewise.
17355 Peepholes of indirect call and jump via memory: Likewise.
17356 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17357 (*sibcall_value_GOT_32): Likewise.
17358 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17359 (GOT_memory_operand): Likewise.
17360 (call_insn_operand): Likewise.
17361 (sibcall_insn_operand): Likewise.
17362 (GOT32_symbol_operand): Likewise.
17363 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17365 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17367 PR rtl-optimization/83496
17368 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17369 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17370 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17371 redundant insn, if any.
17372 (relax_delay_slots): Likewise.
17373 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17375 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
17377 PR tree-optimization/83965
17378 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17379 that grouped statements are part of a reduction chain. Return
17380 true if the statement is not marked as a reduction itself but
17381 is part of a group.
17382 (vect_recog_dot_prod_pattern): Don't check whether the statement
17383 is part of a group here.
17384 (vect_recog_sad_pattern): Likewise.
17385 (vect_recog_widen_sum_pattern): Likewise.
17387 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17390 * final.c (rest_of_clean_state): Also look for calls inside sequences.
17392 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17395 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17397 (ix86_output_indirect_function_return): New prototype.
17398 (ix86_split_simple_return_pop_internal): Likewise.
17399 * config/i386/i386.c (indirect_return_via_cx): New.
17400 (indirect_return_via_cx_bnd): Likewise.
17401 (indirect_thunk_name): Handle return va CX_REG.
17402 (output_indirect_thunk_function): Create alias for
17403 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17404 (ix86_output_indirect_jmp): Remove the bool argument.
17405 (ix86_output_indirect_function_return): New function.
17406 (ix86_split_simple_return_pop_internal): Likewise.
17407 * config/i386/i386.md (*indirect_jump): Don't pass false
17408 to ix86_output_indirect_jmp.
17409 (*tablejump_1): Likewise.
17410 (simple_return_pop_internal): Change it to define_insn_and_split.
17411 Call ix86_split_simple_return_pop_internal to split it for
17412 -mfunction-return=.
17413 (simple_return_indirect_internal): Call
17414 ix86_output_indirect_function_return instead of
17415 ix86_output_indirect_jmp.
17417 2018-02-26 Jakub Jelinek <jakub@redhat.com>
17420 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17421 memset and value initialization afterwards.
17423 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
17425 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17427 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17430 * common/config/aarch64/aarch64-common.c
17431 (aarch_option_optimization_table[]): Switch
17432 off fomit-frame-pointer
17434 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17435 Chung-Ju Wu <jasonwucj@gmail.com>
17437 * config/nds32/nds32-multiple.md (load_multiple): Disallow
17439 (store_multiple): Ditto.
17441 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17443 * config.gcc: Add --with-cpu support for nds32 target.
17444 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17445 * config/nds32/nds32.opt: Add -mcpu= option.
17447 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
17449 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17450 isel=yes): Warn for these deprecated options.
17452 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
17454 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17455 ISA_2_5_MASKS_EMBEDDED.
17457 2018-02-23 Jakub Jelinek <jakub@redhat.com>
17459 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17460 p->max as pointers rather than using iterative_hash_expr.
17462 2018-02-23 Carl Love <cel@us.ibm.com>
17464 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17465 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17467 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17468 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17469 P8V_BUILTIN_VEC_VUNSIGNED2.
17471 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
17474 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17475 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17477 * lra-constraints.c (curr_insn_transform): Set up
17478 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
17480 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17481 * lra-eliminations.c (spill_pseudos): Ditto.
17482 (process_insn_for_elimination): Ditto.
17483 * lra-lives.c (reg_early_clobber_p): Use the new macros.
17484 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17485 LRA_NON_CLOBBERED_ALT.
17487 2018-02-22 Martin Sebor <msebor@redhat.com>
17489 PR tree-optimization/84480
17490 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17491 to maybe_diag_stxncpy_trunc. Call it.
17492 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17493 from gimple_fold_builtin_strcpy. Print inlining stack.
17494 (handle_builtin_stxncpy): Print inlining stack.
17495 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17497 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
17500 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17501 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17502 and -fcheck-pointer-bounds are used together.
17503 (indirect_thunk_prefix): New enum.
17504 (indirect_thunk_need_prefix): New function.
17505 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
17506 "_nt" instead of "_bnd" for NOTRACK prefix.
17507 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17508 (output_indirect_thunk_function): Likewise.
17510 (ix86_code_end): Update output_indirect_thunk_function calls.
17511 (ix86_output_indirect_branch_via_reg): Replace
17512 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17513 (ix86_output_indirect_branch_via_push): Likewise.
17514 (ix86_output_function_return): Likewise.
17515 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17516 incompatible with -fcf-protection=branch and
17517 -fcheck-pointer-bounds.
17519 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17522 * config/aarch64/aarch64.c (aarch64_print_address_internal):
17523 Change gcc_assert call to output_operand_lossage.
17525 2018-02-22 Steve Ellcey <sellcey@cavium.com>
17527 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17529 2018-02-22 DJ Delorie <dj@redhat.com>
17530 Sebastian Perta <sebastian.perta@renesas.com>
17531 Oleg Endo <olegendo@gcc.gnu.org>
17533 * config/rx/rx.c (rx_rtx_costs): New function.
17534 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17536 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
17538 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17540 2018-02-22 Martin Liska <mliska@suse.cz>
17543 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17544 Add "native" as a possible value.
17546 2018-02-22 Martin Liska <mliska@suse.cz>
17549 * config/i386/i386.c (ix86_option_override_internal):
17550 Add "native" as a possible value for -march and -mtune.
17552 2018-02-22 Jakub Jelinek <jakub@redhat.com>
17555 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17556 to all type variants.
17558 PR tree-optimization/84503
17559 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17560 width as info->bitpos + info->bitsize - start.
17561 (merged_store_group::merge_overlapping): Simplify width computation.
17562 (check_no_overlap): New function.
17563 (imm_store_chain_info::try_coalesce_bswap): Compute expected
17564 start + width and last_order of the group, fail if check_no_overlap
17566 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17567 to group if check_no_overlap fails.
17569 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17571 * config/rs6000/altivec.md: Delete contraint arguments to
17572 define_expand, define_split, and define_peephole2, and in
17573 define_insn_and_split if always unused.
17574 * config/rs6000/darwin.md: Ditto.
17575 * config/rs6000/dfp.md: Ditto.
17576 * config/rs6000/rs6000.md: Ditto.
17577 * config/rs6000/sync.md: Ditto.
17578 * config/rs6000/vector.md: Ditto.
17579 * config/rs6000/vsx.md: Ditto.
17581 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
17583 * config/rs6000/altivec.md: Write output control strings as braced
17584 blocks instead of double-quoted strings.
17585 * config/rs6000/darwin.md: Ditto.
17586 * config/rs6000/rs6000.md: Ditto.
17587 * config/rs6000/vector.md: Ditto.
17588 * config/rs6000/vsx.md: Ditto.
17590 2018-02-21 Jason Merrill <jason@redhat.com>
17592 PR c++/84314 - ICE with templates and fastcall attribute.
17593 * attribs.c (build_type_attribute_qual_variant): Remove assert.
17595 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17597 * ipa-cp.c (determine_versionability): Fix comment typos.
17599 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
17602 * ipa-cp.c (determine_versionability): Do not version functions caling
17605 2018-02-21 Martin Liska <mliska@suse.cz>
17608 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17609 Add "native" as a possible value.
17610 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
17611 the macro when native cpu detection is available.
17613 2018-02-21 Martin Liska <mliska@suse.cz>
17616 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17617 Add "native" as a possible value.
17618 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17619 when native cpu detection is available.
17621 2018-02-21 Jakub Jelinek <jakub@redhat.com>
17622 Martin Sebor <msebor@redhat.com>
17624 PR tree-optimization/84478
17625 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17627 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17628 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17629 support which is conservatively correct, for 2 only stay conservative
17630 for maxlen. Formatting and comment capitalization fixes. Add STRICT
17631 argument to the 2 argument get_range_strlen, adjust 6 arg
17632 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17634 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17635 (gimple_fold_builtin_strlen): Pass true as last argument to
17638 2018-02-20 Martin Sebor <msebor@redhat.com>
17640 PR middle-end/84095
17641 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17642 (builtin_memref::set_base_and_offset): Same. Handle inner references.
17643 (builtin_memref::builtin_memref): Factor out parts into
17644 set_base_and_offset and call it.
17646 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17648 PR middle-end/84406
17649 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17650 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17651 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
17652 search at the associated MODE_INT.
17654 2018-02-20 Jeff Law <law@redhat.com>
17656 PR middle-end/82123
17657 PR tree-optimization/81592
17658 PR middle-end/79257
17659 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17660 for range data rather than using global data.
17661 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17662 range data rather than using global data.
17663 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17664 pass it to children as needed.
17665 (struct directive::fmtresult): Similarly.
17666 (struct directive::set_width): Similarly.
17667 (struct directive::set_precision): Similarly.
17668 (format_integer, format_directive, parse_directive): Similarly.
17669 (format_none): Accept unnamed vr_values parameter.
17670 (format_percent, format_floating, format_character): Similarly.
17671 (format_string, format_plain): Similarly.
17672 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17673 the EVRP range analyzer for range data rather than using global data.
17674 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17675 gimple-ssa-evrp-analyze.h
17676 (class sprintf_dom_walker): Add after_dom_children member function.
17677 Add evrp_range_analyzer member.
17678 (sprintf_dom_walker::before_dom_children): Call into the EVRP
17679 range analyzer as needed.
17680 (sprintf_dom_walker::after_dom_children): New member function.
17681 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17683 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17684 (evrp_range_analyzer::pop_to_marker): Likewise.
17686 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
17688 PR tree-optimization/84419
17689 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17690 with the required type if its current type is compatible but
17693 2018-02-20 Jakub Jelinek <jakub@redhat.com>
17695 PR middle-end/82004
17696 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17697 after vectorization.
17699 2018-02-20 Martin Liska <mliska@suse.cz>
17702 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17703 possible values if we don't have a hint.
17705 2018-02-20 Martin Liska <mliska@suse.cz>
17709 * final.c (shorten_branches): Build align_tab array with one
17711 * opts.c (finish_options): Add alignment option limit check.
17712 (MAX_CODE_ALIGN): Likewise.
17713 (MAX_CODE_ALIGN_VALUE): Likewise.
17714 * doc/invoke.texi: Document maximum allowed option value for
17715 all -falign-* options.
17717 2018-02-19 Jakub Jelinek <jakub@redhat.com>
17720 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17721 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17722 * var-tracking.c (emit_note_insn_var_location): Remove all references
17723 to NOTE_INSN_CALL_ARG_LOCATION.
17724 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17725 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17726 Use copy_rtx_if_shared.
17727 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17728 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17729 (dwarf2out_var_location): Remove handling of
17730 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17732 * final.c (final_scan_insn): Remove all references to
17733 NOTE_INSN_CALL_ARG_LOCATION.
17734 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
17735 before dumping final insns.
17736 * except.c (emit_note_eh_region_end): Remove all references to
17737 NOTE_INSN_CALL_ARG_LOCATION.
17738 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17739 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17740 * config/arc/arc.c (hwloop_optimize): Likewise.
17741 * config/arm/arm.c (create_fix_barrier): Likewise.
17742 * config/s390/s390.c (s390_chunkify_start): Likewise.
17743 * config/sh/sh.c (find_barrier): Likewise.
17744 * config/i386/i386.c (rest_of_insert_endbranch,
17745 ix86_seh_fixup_eh_fallthru): Likewise.
17746 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17747 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17748 * config/frv/frv.c (frv_function_prologue): Likewise.
17749 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
17751 (note_outside_basic_block_p): Remove all references to
17752 NOTE_INSN_CALL_ARG_LOCATION.
17753 * gengtype.c (adjust_field_rtx_def): Likewise.
17754 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17756 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17757 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17760 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17763 PR tree-optimization/84452
17764 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17765 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17768 2018-02-19 Martin Liska <mliska@suse.cz>
17771 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17773 2018-02-19 Martin Liska <mliska@suse.cz>
17774 Richard Sandiford <richard.sandiford@linaro.org>
17776 PR tree-optimization/82491
17777 * gimple-fold.c (get_base_constructor): Make earlier bail out
17780 2018-02-19 Carl Love <cel@us.ibm.com>
17782 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17783 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17785 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17786 P8V_BUILTIN_VEC_NEG.
17788 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
17790 * config/rl78/rl78.md (movdf): New define expand.
17792 2018-02-19 Martin Liska <mliska@suse.cz>
17795 * doc/invoke.texi: Fix typo.
17796 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17798 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
17800 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17801 handle rs6000_single_float and rs6000_double_float specially for
17804 2018-02-16 Jeff Law <law@redhat.com>
17806 * config/rx/rx.c (add_pop_cfi_notes): New function.;
17807 (pop_regs): Use it.
17809 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17812 * ipa-inline.c (inline_small_functions): Fix a typo.
17814 2018-02-16 Nathan Sidwell <nathan@acm.org>
17816 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17818 2018-02-16 Carl Love <cel@us.ibm.com>
17820 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
17821 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
17822 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
17823 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
17824 expansion to P8V_BUILTIN_VEC_FLOAT2.
17826 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
17828 PR rtl-optimization/70023
17829 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
17830 src_regno into account.
17832 2018-02-16 Carl Love <cel@us.ibm.com>
17834 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
17835 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
17836 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
17837 * config/rs6000/rs6000.c: Remove case statements for
17838 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
17839 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
17840 and P9V_BUILTIN_VEC_VINSERT4B.
17841 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
17842 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
17843 * config/rs6000/vsx.md:
17844 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17847 2018-02-16 Carl Love <cel@us.ibm.com>
17849 * config/rs6000/altivec.h: Add builtin names vec_extract4b
17851 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17853 * config/rs6000/rs6000-c.c: Add the definitions for
17854 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17855 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17856 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17857 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
17858 definition for insert4b and define insn *insert3b_internal.
17859 * doc/extend.texi: Add documentation for vec_extract4b.
17861 2018-02-16 Nathan Sidwell <nathan@acm.org>
17863 * doc/extend.texi (Backwards Compatibility): Mention friend
17864 injection. Note for-scope is deprecated.
17865 * doc/invoke.texi (-ffriend-injection): Deprecate.
17867 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
17869 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17870 that moved to I2, also allow destinations that are a paradoxical
17871 subreg (instead of a normal reg).
17873 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
17876 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17879 2018-02-16 Richard Biener <rguenther@suse.de>
17881 PR tree-optimization/84037
17882 PR tree-optimization/84016
17884 * config/i386/i386.c (ix86_builtin_vectorization_cost):
17885 Adjust vec_construct for the fact we need additional higher latency
17886 128bit inserts for AVX256 and AVX512 vector builds.
17887 (ix86_add_stmt_cost): Scale vector construction cost for
17890 2018-02-16 Richard Biener <rguenther@suse.de>
17892 PR tree-optimization/84417
17893 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17894 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17895 (non_rewritable_lvalue_p): Likewise, use poly-ints.
17897 2018-02-16 Martin Liska <mliska@suse.cz>
17900 * internal-fn.def (ASAN_CHECK): Set proper flags.
17901 (ASAN_MARK): Likewise.
17903 2018-02-16 Julia Koval <julia.koval@intel.com>
17905 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17906 from PTA_CANNONLAKE.
17908 2018-02-16 Jakub Jelinek <jakub@redhat.com>
17911 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
17912 Use ++iter rather than iter++ for std::list iterators.
17913 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
17914 defer deleting them until all nodes in the forest are processed. Do
17915 free even leaf nodes. Change to_process into auto_vec.
17918 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
17919 * vec.h (vec_default_construct): Use memset instead of placement new
17920 if BROKEN_VALUE_INITIALIZATION is defined.
17921 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
17922 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
17925 PR rtl-optimization/83723
17926 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
17927 * lra.c (lra_substitute_pseudo): Likewise. If true, use
17928 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
17930 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
17932 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
17934 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
17936 PR rtl-optimization/81443
17937 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
17938 from inner REGs to paradoxical SUBREGs.
17940 2018-02-16 Richard Biener <rguenther@suse.de>
17942 PR tree-optimization/84399
17943 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17944 For operands we can analyze at their definition make sure we can
17945 analyze them at each use as well.
17947 2018-02-16 Richard Biener <rguenther@suse.de>
17949 PR tree-optimization/84190
17950 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
17951 volatile accesses if the decl isn't volatile.
17953 2018-02-15 Jason Merrill <jason@redhat.com>
17955 PR c++/84314 - ICE with templates and fastcall attribute.
17956 * attribs.c (build_type_attribute_qual_variant): Don't clobber
17957 TYPE_CANONICAL on an existing type.
17959 2018-02-15 Jakub Jelinek <jakub@redhat.com>
17961 PR tree-optimization/84383
17962 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
17963 dstoff nor call operand_equal_p if dstbase is NULL.
17965 PR tree-optimization/84334
17966 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
17967 also a CONSTANT_CLASS_P, punt.
17969 2018-02-14 Jim Wilson <jimw@sifive.com>
17971 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
17972 first SMALL_OPERAND check. New local min_second_step. Move assert
17973 to where locals are set. Add TARGET_RVC support.
17974 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
17976 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
17978 * doc/invoke.texi: Correct -Wformat-overflow code sample.
17980 2018-02-14 Martin Sebor <msebor@redhat.com>
17982 PR tree-optimization/83698
17983 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
17984 arrays constrain the offset range to their bounds.
17985 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
17986 (builtin_access::overlap): Avoid setting the size of overlap if it's
17988 (maybe_diag_overlap): Also consider arrays when deciding what values
17989 of offsets to include in diagnostics.
17991 2018-02-14 Martin Sebor <msebor@redhat.com>
17994 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
17995 that correspond to the kind of a declaration.
17997 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18000 * config/pa/pa.md: Load address of PIC label using the linkage table
18001 if the label is nonlocal.
18003 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18005 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18006 warning message if user requests -maltivec=be.
18007 * doc/invoke.texi: Document deprecation of -maltivec=be.
18009 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18012 * config/rs6000/rs6000-c.c: Update definitions for
18013 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18014 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18016 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18019 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18020 add _get_ssp intrinsics. Remove argument from
18021 __builtin_ia32_rdssp[d|q].
18022 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18023 * config/i386/i386-builtin.def: Remove argument from
18024 __builtin_ia32_rdssp[d|q].
18025 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18026 ix86_expand_special_args_builtin for _rdssp[d|q].
18027 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18028 Clear register before usage.
18029 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18030 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18032 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18034 PR tree-optimization/84357
18035 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18036 operand 1 of an ARRAY_REF too.
18038 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18041 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18042 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18044 (set_of_reg): New struct.
18045 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18046 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18047 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18049 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18050 Split into bitclr, bitset, bitinvert patterns if appropriate.
18051 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18052 use rx_fuse_in_memory_bitop.
18053 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18054 to named insn, correct maximum insn length.
18056 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18059 * machmode.def: Define a complex mode for PARTIAL_INT.
18060 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18062 * doc/rtl.texi: Document CSPImode.
18063 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18065 (msp430_hard_regno_nregs_with_padding): Likewise.
18067 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18070 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18072 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18074 PR rtl-optimization/84169
18075 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18076 we generated a parallel as new i3 and we split that to new i2 and i3
18077 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18078 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18079 those to i2, not i1. Partially rewrite this scan code.
18081 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18084 * stor-layout.c (place_field): For variable length fields, adjust
18085 offset_align afterwards not just based on the field's alignment,
18086 but also on the size.
18088 PR middle-end/84309
18089 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18090 of exps and logs in the use_exp2 case.
18092 2018-02-13 Jeff Law <law@redhat.com>
18094 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18095 entry for "vector".
18097 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18100 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18104 * common.opt (gas-loc-support, gas-locview-support): New.
18105 (ginline-points, ginternal-reset-location-views): New.
18106 * doc/invoke.texi: Document them. Use @itemx where intended.
18107 (gvariable-location-views): Adjust.
18108 * target.def (reset_location_view): New.
18109 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18110 (TARGET_RESET_LOCATION_VIEW): New.
18111 * doc/tm.texi: Rebuilt.
18112 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18113 (dwarf2out_default_as_locview_support): New.
18114 (output_asm_line_debug_info): Use option variables.
18115 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18116 (output_loc_list): Likewise.
18117 (add_high_low_attributes): Check option variables.
18118 Don't output entry view attribute in strict mode.
18119 (gen_inlined_subroutine_die): Check option variables.
18120 (dwarf2out_inline_entry): Likewise.
18121 (init_sections_and_labels): Likewise.
18122 (dwarf2out_early_finish): Likewise.
18123 (maybe_reset_location_view): New, from...
18124 (dwarf2out_var_location): ... here. Call it.
18125 * debug.h (dwarf2out_default_as_loc_support): Declare.
18126 (dwarf2out_default_as_locview_support): Declare.
18127 * hooks.c (hook_int_rtx_insn_0): New.
18128 * hooks.h (hook_int_rtx_insn_0): Declare.
18129 * toplev.c (process_options): Take -gas-loc-support and
18130 -gas-locview-support from dwarf2out. Enable
18131 -gvariable-location-views by default only with locview
18132 assembler support. Enable -ginternal-reset-location-views by
18133 default only if the target defines the corresponding hook.
18134 Enable -ginline-points by default if location views are
18135 enabled; force it disabled if statement frontiers are
18137 * tree-inline.c (expand_call_inline): Check option variables.
18138 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18140 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18142 PR tree-optimization/84321
18143 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18144 handling. Also check whether the anti-range contains any values
18145 that satisfy the mask; switch to a VR_RANGE if not.
18147 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18150 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18152 2018-02-13 Martin Jambor <mjambor@suse.cz>
18155 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18156 of call statements, also set location of a load to a temporary.
18158 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18160 * config/rl78/rl78.c (add_vector_labels): New function.
18161 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18162 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18163 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18164 which checks that no arguments are passed.
18165 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18166 * doc/extend.texi: Documentation for the new attribute.
18168 2018-02-13 Andreas Schwab <schwab@suse.de>
18170 * config/riscv/linux.h (CPP_SPEC): Define.
18172 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18175 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18176 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18177 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18178 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18179 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18180 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18181 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18182 temporarily for AES and PCLMUL builtins.
18184 PR tree-optimization/84339
18185 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18186 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18189 PR middle-end/84309
18190 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18191 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18192 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18194 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18196 * omp-simd-clone.h: New file.
18197 * omp-simd-clone.c: Include omp-simd-clone.h.
18198 (expand_simd_clones): No longer static.
18199 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18200 cgraph.h and omp-simd-clone.h.
18201 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18202 (vect_recog_widen_shift_pattern): Formatting fix.
18203 (vect_pattern_recog_1): Don't check optab for calls.
18206 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18207 operands[2] into a REG before using gen_lowpart on it.
18209 2018-02-12 Jeff Law <law@redhat.com>
18212 * config/sh/sh.c (find_barrier): Consider a sibling call
18215 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18216 successfully back substituting a reg.
18218 2018-02-12 Richard Biener <rguenther@suse.de>
18220 PR tree-optimization/84037
18221 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18222 parameter, move visited init to caller.
18223 (vect_slp_analyze_operations): Separate cost from validity
18224 check, initialize visited once for all instances.
18225 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18227 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18229 (vect_model_promotion_demotion_cost): Likewise.
18230 (vectorizable_bswap): Guard cost modeling with !slp_node
18231 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18233 (vectorizable_call): Likewise.
18234 (vectorizable_conversion): Likewise.
18235 (vectorizable_assignment): Likewise.
18236 (vectorizable_shift): Likewise.
18237 (vectorizable_operation): Likewise.
18238 (vectorizable_store): Likewise.
18239 (vectorizable_load): Likewise.
18240 (vectorizable_condition): Likewise.
18241 (vectorizable_comparison): Likewise.
18243 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18246 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18247 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18248 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18250 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18252 PR middle-end/83665
18253 * params.def (inline-min-speedup): Increase from 8 to 15.
18254 (max-inline-insns-auto): Decrease from 40 to 30.
18255 * ipa-split.c (consider_split): Add some buffer for function to
18256 be considered inlining candidate.
18257 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18260 2018-02-12 Richard Biener <rguenther@suse.de>
18262 PR tree-optimization/84037
18263 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18264 matched stmts if we cannot swap the non-matched ones.
18266 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18268 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18269 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18270 _mm_maskz_scalef_round_ss): New intrinsics.
18271 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18272 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18273 __builtin_ia32_scalefss_round): Remove.
18274 (__builtin_ia32_scalefsd_mask_round,
18275 __builtin_ia32_scalefss_mask_round): New intrinsics.
18276 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18277 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18278 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18279 "<round_constraint>")): Changed to ...
18280 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18281 "<round_scalar_constraint>")): ... this.
18282 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18283 %0, %1, %2<round_op3>}"): Changed to ...
18284 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18285 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18286 %2<round_scalar_mask_op3>}"): ... this.
18287 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18289 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18291 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18292 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18293 (_mm_maskz_sqrt_round_ss): New intrinsics.
18294 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18295 (__builtin_ia32_sqrtsd_mask_round)
18296 (__builtin_ia32_sqrtss_mask_round): New builtins.
18297 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18298 (__builtin_ia32_sqrtss_round): Remove.
18299 (__builtin_ia32_sqrtsd_mask_round)
18300 (__builtin_ia32_sqrtss_mask_round): New builtins.
18301 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18302 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18303 ((match_operand:VF_128 1 "vector_operand"
18304 "xBm,<round_constraint>")): Changed to ...
18305 ((match_operand:VF_128 1 "vector_operand"
18306 "xBm,<round_scalar_constraint>")): ... this.
18307 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18308 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18309 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18310 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18311 %<iptr>1<round_scalar_mask_op3>}): ... this.
18312 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18313 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18315 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18318 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18319 Cast vec_cmpeq result to correct type.
18320 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18321 Cast vec_cmpgt result to correct type.
18323 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18325 * final.c (final_scan_insn_1): Renamed from...
18326 (final_scan_insn): ... this. New wrapper, to recover
18327 seen from the outermost call in recursive ones.
18328 * config/sparc/sparc.c (output_return): Drop seen from call.
18329 (output_sibcall): Likewise.
18330 * config/visium/visium.c (output_branch): Likewise.
18332 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18334 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18337 2018-02-10 Alan Modra <amodra@gmail.com>
18340 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18341 Specify LR as an input.
18343 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18346 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18347 remove_member_access_dummy_vars): New functions.
18348 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18349 lower_omp_1, execute_lower_omp): Use them.
18351 PR rtl-optimization/84308
18352 * shrink-wrap.c (spread_components): Release todo vector.
18354 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18356 PR rtl-optimization/57193
18357 * ira-color.c (struct allocno_color_data): Add member
18358 conflict_allocno_hard_prefs.
18359 (update_conflict_allocno_hard_prefs): New.
18360 (bucket_allocno_compare_func): Add a preference based on
18361 conflict_allocno_hard_prefs.
18362 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18363 (color_allocnos): Remove a dead code. Initiate
18364 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18366 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18369 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18370 constraint from =wa to wa. Avoid a subreg on the output operand,
18371 instead use a pseudo and subreg it in a move.
18372 (p9_xxbrd_<mode>): Changed to ...
18373 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18374 (p9_xxbrd_v2df): New expander.
18375 (p9_xxbrw_<mode>): Changed to ...
18376 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18377 (p9_xxbrw_v4sf): New expander.
18379 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18381 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18383 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
18386 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18387 multiply in 32-bit mode.
18388 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18389 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18392 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18394 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18395 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18396 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18397 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18399 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
18402 * dwarf2out.c (is_trivial_indirect_ref): New function.
18403 (dwarf2out_late_global_decl): Do not generate a location
18404 attribute for variables that have a non-trivial DECL_VALUE_EXPR
18405 and that are not defined in the current unit.
18407 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18409 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18410 instead of a libcall for UNORDERED.
18412 2018-02-09 Tamar Christina <tamar.christina@arm.com>
18415 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18416 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18418 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18421 * config/s390/s390.c (s390_set_current_function): Invoke
18422 s390_indirect_branch_settings also if fndecl didn't change.
18424 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18426 * config/rs6000/rs6000.md (blockage): Set length to zero.
18428 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18430 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18432 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18435 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18436 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18440 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18441 PARALLEL incoming that failed vt_get_decl_and_offset check.
18443 PR middle-end/84237
18444 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18445 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18447 (get_variable_section): For decls in named .bss* sections pass true as
18448 second argument to bss_initializer_p.
18450 2018-02-09 Marek Polacek <polacek@redhat.com>
18451 Jakub Jelinek <jakub@redhat.com>
18454 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18455 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
18456 Sync some changes from cxx_fold_indirect_ref.
18458 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18460 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18462 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18463 (BLOCK_INLINE_ENTRY_LABEL): New.
18464 (dwarf2out_var_location): Disregard inline entry markers.
18465 (inline_entry_data): New struct.
18466 (inline_entry_data_hasher): New hashtable type.
18467 (inline_entry_data_hasher::hash): New.
18468 (inline_entry_data_hasher::equal): New.
18469 (inline_entry_data_table): New variable.
18470 (add_high_low_attributes): Add DW_AT_entry_pc and
18471 DW_AT_GNU_entry_view attributes if a pending entry is found
18472 in inline_entry_data_table. Add old entry_pc attribute only
18473 if debug nonbinding markers are disabled.
18474 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18475 markers are enabled.
18476 (block_within_block_p, dwarf2out_inline_entry): New.
18477 (dwarf2out_finish): Check that no entries remained in
18478 inline_entry_data_table.
18479 * final.c (reemit_insn_block_notes): Handle inline entry notes.
18480 (final_scan_insn, notice_source_line): Likewise.
18481 (rest_of_clean_state): Skip inline entry markers.
18482 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18484 * gimple.c (gimple_build_debug_inline_entry): New.
18485 * gimple.h (enum gimple_debug_subcode): Add
18486 GIMPLE_DEBUG_INLINE_ENTRY.
18487 (gimple_build_debug_inline_entry): Declare.
18488 (gimple_debug_inline_entry_p): New.
18489 (gimple_debug_nonbind_marker_p): Adjust.
18490 * insn-notes.def (INLINE_ENTRY): New.
18491 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18492 inline entry marker notes.
18493 (print_insn): Likewise.
18494 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18495 (INSN_DEBUG_MARKER_KIND): Likewise.
18496 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18497 * tree-inline.c (expand_call_inline): Build and insert
18498 debug_inline_entry stmt.
18499 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18500 inline entry blocks early, if nonbind markers are enabled.
18501 (dump_scope_block): Dump fragment info.
18502 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18503 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18504 (gimple_build_debug_inline_entry): New.
18505 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18506 Enable/disable inline entry points too.
18507 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18508 (DEBUG_INSN): Describe inline entry markers.
18510 * common.opt (gvariable-location-views): New.
18511 (gvariable-location-views=incompat5): New.
18512 * config.in: Rebuilt.
18513 * configure: Rebuilt.
18514 * configure.ac: Test assembler for view support.
18515 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18516 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18517 * dwarf2out.c (var_loc_view): New typedef.
18518 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18519 (dwarf2out_locviews_in_attribute): New.
18520 (dwarf2out_locviews_in_loclist): New.
18521 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18522 (enum dw_line_info_opcode): Add LI_adv_address.
18523 (struct dw_line_info_table): Add view.
18524 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18525 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18526 (zero_view_p): New variable.
18527 (ZERO_VIEW_P): New macro.
18528 (output_asm_line_debug_info): New.
18529 (struct var_loc_node): Add view.
18530 (add_AT_view_list, AT_loc_list): New.
18531 (add_var_loc_to_decl): Add view param. Test it against last.
18532 (new_loc_list): Add view params. Record them.
18533 (AT_loc_list_ptr): Handle loc and view lists.
18534 (view_list_to_loc_list_val_node): New.
18535 (print_dw_val): Handle dw_val_class_view_list.
18536 (size_of_die): Likewise.
18537 (value_format): Likewise.
18538 (loc_list_has_views): New.
18539 (gen_llsym): Set vl_symbol too.
18540 (maybe_gen_llsym, skip_loc_list_entry): New.
18541 (dwarf2out_maybe_output_loclist_view_pair): New.
18542 (output_loc_list): Output view list or entries too.
18543 (output_view_list_offset): New.
18544 (output_die): Handle dw_val_class_view_list.
18545 (output_dwarf_version): New.
18546 (output_compilation_unit_header): Use it.
18547 (output_skeleton_debug_sections): Likewise.
18548 (output_rnglists, output_line_info): Likewise.
18549 (output_pubnames, output_aranges): Update version comments.
18550 (output_one_line_info_table): Output view numbers in asm comments.
18551 (dw_loc_list): Determine current endview, pass it to new_loc_list.
18552 Call maybe_gen_llsym.
18553 (loc_list_from_tree_1): Adjust.
18554 (add_AT_location_description): Create view list attribute if
18555 needed, check it's absent otherwise.
18556 (convert_cfa_to_fb_loc_list): Adjust.
18557 (maybe_emit_file): Call output_asm_line_debug_info for test.
18558 (dwarf2out_var_location): Reset views as needed. Precompute
18559 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
18560 attribute. Set view.
18561 (new_line_info_table): Reset next view.
18562 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18563 (dwarf2out_source_line): Likewise. Output view resets and labels to
18564 the assembler, or select appropriate line info opcodes.
18565 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18566 (optimize_string_length): Catch it. Adjust.
18567 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
18568 dw_val_class_view_list, and remove it if no longer needed.
18569 (hash_loc_list): Hash view numbers.
18570 (loc_list_hasher::equal): Compare them.
18571 (optimize_location_lists): Check whether a view list symbol is
18572 needed, and whether the locview attribute is present, and
18573 whether they match. Remove the locview attribute if no longer
18575 (index_location_lists): Call skip_loc_list_entry for test.
18576 (dwarf2out_finish): Call output_asm_line_debug_info for test.
18577 Use output_dwarf_version.
18578 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18579 (struct dw_val_node): Add val_view_list.
18580 * final.c (SEEN_NEXT_VIEW): New.
18581 (set_next_view_needed): New.
18582 (clear_next_view_needed): New.
18583 (maybe_output_next_view): New.
18584 (final_start_function): Rename to...
18585 (final_start_function_1): ... this. Take pointer to FIRST,
18586 add SEEN parameter. Emit param bindings in the initial view.
18587 (final_start_function): Reintroduce SEEN-less interface.
18588 (final): Rename to...
18589 (final_1): ... this. Take SEEN parameter. Output final pending
18590 next view at the end.
18591 (final): Reintroduce seen-less interface.
18592 (final_scan_insn): Output pending next view before switching
18593 sections or ending a block. Mark the next view as needed when
18594 outputting variable locations. Notify debug backend of section
18595 changes, and of location view changes.
18596 (rest_of_handle_final): Adjust.
18597 * toplev.c (process_options): Autodetect value for debug variable
18598 location views option. Warn on incompat5 without -gdwarf-5.
18599 * doc/invoke.texi (gvariable-location-views): New.
18600 (gvariable-location-views=incompat5): New.
18601 (gno-variable-location-views): New.
18603 2018-02-08 David Malcolm <dmalcolm@redhat.com>
18605 PR tree-optimization/84136
18606 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18607 that the result of find_edge is non-NULL.
18609 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18612 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18613 storing integer register in SImode. Fix cost of 256 and 512
18614 byte aligned SSE register store.
18616 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
18618 * config/i386/i386.c (ix86_multiplication_cost): Fix
18619 multiplication cost for TARGET_AVX512DQ.
18621 2018-02-08 Marek Polacek <polacek@redhat.com>
18623 PR tree-optimization/84238
18624 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18627 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18629 PR tree-optimization/84265
18630 * tree-vect-stmts.c (vectorizable_store): Don't treat
18631 VMAT_CONTIGUOUS accesses as grouped.
18632 (vectorizable_load): Likewise.
18634 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18636 PR tree-optimization/81635
18637 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18638 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18639 (test_round_for_mask): New functions.
18640 (wide_int_cc_tests): Call test_round_for_mask.
18641 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18642 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18643 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18644 range returned by get_range_info.
18646 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18649 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18650 * symtab.c: Include builtins.h
18651 (symtab_node::output_to_lto_symbol_table_p): Move here
18652 from lto-streamer-out.c:output_symbol_p.
18653 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18654 (output_symbol_p): Move all logic to symtab.c
18655 (produce_symtab): Update.
18657 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18659 * config/s390/s390-opts.h (enum indirect_branch): Define.
18660 * config/s390/s390-protos.h (s390_return_addr_from_memory)
18661 (s390_indirect_branch_via_thunk)
18662 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18663 (enum s390_indirect_branch_type): Define.
18664 * config/s390/s390.c (struct s390_frame_layout, struct
18665 machine_function): Remove.
18666 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18667 (indirect_branch_table_label_no, indirect_branch_table_name):
18669 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18670 (enum s390_indirect_branch_option): Define.
18671 (s390_return_addr_from_memory): New function.
18672 (s390_handle_string_attribute): New function.
18673 (s390_attribute_table): Add new attribute handler.
18674 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18675 (s390_indirect_branch_via_thunk): New function.
18676 (s390_indirect_branch_via_inline_thunk): New function.
18677 (s390_function_ok_for_sibcall): When jumping via thunk disallow
18678 sibling call optimization for non z10 compiles.
18679 (s390_emit_call): Force indirect branch target to be a single
18680 register. Add r1 clobber for non-z10 compiles.
18681 (s390_emit_epilogue): Emit return jump via return_use expander.
18682 (s390_reorg): Handle JUMP_INSNs as execute targets.
18683 (s390_option_override_internal): Perform validity checks for the
18684 new command line options.
18685 (s390_indirect_branch_attrvalue): New function.
18686 (s390_indirect_branch_settings): New function.
18687 (s390_set_current_function): Invoke s390_indirect_branch_settings.
18688 (s390_output_indirect_thunk_function): New function.
18689 (s390_code_end): Implement target hook.
18690 (s390_case_values_threshold): Implement target hook.
18691 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18693 * config/s390/s390.h (struct s390_frame_layout)
18694 (struct machine_function): Move here from s390.c.
18695 (TARGET_INDIRECT_BRANCH_NOBP_RET)
18696 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18697 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18698 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18699 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18700 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18701 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18702 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18703 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18704 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18705 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18706 (mnemonic attribute): Add values which aren't recognized
18708 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18709 pattern for branch conversion. Fix mnemonic attribute.
18710 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18711 indirect branch via thunk if requested.
18712 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18713 ("*indirect_jump"): Disable for branch conversion using out of
18715 ("indirect_jump_via_thunk<mode>_z10")
18716 ("indirect_jump_via_thunk<mode>")
18717 ("indirect_jump_via_inlinethunk<mode>_z10")
18718 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18719 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18720 ("casesi_jump_via_inlinethunk<mode>_z10")
18721 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18722 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18723 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18724 ("*indirect2_jump"): Disable for branch conversion.
18725 ("casesi_jump"): Turn into expander and expand patterns for branch
18727 ("return_use"): New expander.
18728 ("*return"): Emit return via thunk and rename it to ...
18729 ("*return<mode>"): ... this one.
18730 * config/s390/s390.opt: Add new options and and enum for the
18733 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
18735 * lra-constraints.c (match_reload): Unconditionally use
18736 gen_lowpart_SUBREG, rather than selecting between that
18737 and equivalent gen_rtx_SUBREG code.
18739 2018-02-08 Richard Biener <rguenther@suse.de>
18741 PR tree-optimization/84233
18742 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18743 changed flag instead of boguously re-using phi_inserted.
18745 2018-02-08 Martin Jambor <mjambor@suse.cz>
18747 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18748 static local variables.
18750 2018-02-08 Richard Biener <rguenther@suse.de>
18752 PR tree-optimization/84278
18753 * tree-vect-stmts.c (vectorizable_store): When looking for
18754 smaller vector types to perform grouped strided loads/stores
18755 make sure the mode is supported by the target.
18756 (vectorizable_load): Likewise.
18758 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18760 * config/aarch64/aarch64.c (aarch64_components_for_bb):
18761 Increase LDP/STP opportunities by adding adjacent callee-saves.
18763 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
18765 PR rtl-optimization/84068
18766 PR rtl-optimization/83459
18767 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18769 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
18771 PR tree-optimization/84224
18772 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18773 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18774 non-zero arguments.
18776 2018-02-07 Iain Sandoe <iain@codesourcery.com>
18779 * config/rs6000/altivec.md (*restore_world): Remove LR use.
18780 * config/rs6000/predicates.md (restore_world_operation): Adjust op
18781 count, remove one USE.
18783 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
18785 * doc/install.texi (Configuration): Document the
18786 --with-long-double-format={ibm,ieee} PowerPC configuration
18790 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18791 Convert from define_expand to be define_insn_and_split. Rework
18792 float/double/_Float128 conversions to QI/HI/SImode to work with
18793 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
18794 conversions to QI/HImode types did a store and then a load to
18795 truncate the value. For conversions to VSX registers, don't split
18796 the insn, instead emit the code directly. Use the code iterator
18797 any_fix to combine signed and unsigned conversions.
18798 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18799 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18800 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18801 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18802 (fix_<mode>di2_hw): Likewise.
18803 (fixuns_<mode>di2_hw): Likewise.
18804 (fix_<mode>si2_hw): Likewise.
18805 (fixuns_<mode>si2_hw): Likewise.
18806 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18807 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18808 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18809 fix<uns>_trunc<SFDF:mode>si2_p8.
18810 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18811 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18812 (fix<uns>_<mode>_mem): Likewise.
18813 (fctiw<u>z_<mode>_mem): Likewise.
18814 (fix<uns>_<mode>_mem): Likewise.
18815 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18816 the register allocator from doing a direct move to the GPRs to do
18817 a store, and instead use the ISA 3.0 store byte/half-word from
18818 vector register instruction. For IEEE 128-bit floating point,
18819 also optimize stores of 32-bit ints.
18820 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
18822 2018-02-07 Alan Hayward <alan.hayward@arm.com>
18824 * genextract.c (push_pathstr_operand): New function to support
18826 (walk_rtx): Call push_pathstr_operand.
18827 (print_path): Support [a-zA-Z].
18829 2018-02-07 Richard Biener <rguenther@suse.de>
18831 PR tree-optimization/84037
18832 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
18833 (cse_and_gimplify_to_preheader): Declare.
18834 (vect_get_place_in_interleaving_chain): Likewise.
18835 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18837 (_loop_vec_info::~_loop_vec_info): Delete it.
18838 (cse_and_gimplify_to_preheader): New function.
18839 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
18840 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
18841 (vectorizable_load): Likewise. For grouped stores always base
18842 the IV on the first element.
18843 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
18844 condition before gimplifying.
18846 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18848 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18849 *DIV_EXPR and *MOD_EXPR.
18851 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
18854 * config/i386/i386.c (ix86_option_override_internal): Mask out
18855 the CF_SET bit when checking -fcf-protection.
18857 2018-02-07 Tom de Vries <tom@codesourcery.com>
18860 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18863 2018-02-07 Richard Biener <rguenther@suse.de>
18865 PR tree-optimization/84204
18866 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18869 PR tree-optimization/84205
18870 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18871 special-case isl_ast_op_zdiv_r.
18873 PR tree-optimization/84223
18874 * graphite-scop-detection.c (gather_bbs::before_dom_children):
18875 Only add conditions from within the region.
18876 (gather_bbs::after_dom_children): Adjust.
18878 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
18881 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18882 * config/avr/avr.md: Only post-reload split REG-REG moves if
18883 either register is GENERAL_REG_P.
18885 2018-02-07 Jakub Jelinek <jakub@redhat.com>
18887 PR tree-optimization/84235
18888 * tree-ssa-scopedtables.c
18889 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18890 if the subtraction is performed in floating point type where NaNs are
18891 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18892 build 1. Formatting fix.
18894 2018-02-06 Jakub Jelinek <jakub@redhat.com>
18897 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18898 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18899 and skip it regardless of bb boundaries. Use CALL_P macro,
18900 don't test INSN_P (insn) together with CALL_P or JUMP_P check
18901 unnecessarily, formatting fix.
18903 2018-02-06 Michael Collison <michael.collison@arm.com>
18905 * config/arm/thumb2.md:
18906 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
18907 (*thumb_mov_notscc): Ditto.
18909 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
18912 * config/rs6000/rs6000.md (su code attribute): Use "u" for
18913 unsigned_fix, not "s".
18915 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18917 * configure.ac (gcc_fn_eh_frame_ro): New function.
18918 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
18919 correct .eh_frame permissions.
18920 * configure: Regenerate.
18922 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
18924 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
18925 irrelevant options.
18927 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18929 * config/rs6000/rs6000.c (rs6000_option_override_internal):
18930 Display warning message for -mno-speculate-indirect-jumps.
18932 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
18934 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
18936 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
18938 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
18940 PR tree-optimization/84225
18941 * tree-eh.c (find_trapping_overflow): Only call
18942 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
18944 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18947 * config/i386/i386.c: Reimplement the check of possible options
18948 -mibt/-mshstk conbination. Change error messages.
18949 * doc/invoke.texi: Fix a typo: remove extra '='.
18951 2018-02-06 Marek Polacek <polacek@redhat.com>
18953 PR tree-optimization/84228
18954 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
18956 2018-02-06 Tamar Christina <tamar.christina@arm.com>
18959 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
18960 emitted arch directives.
18961 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
18962 __ARM_FEATURE_COPROC before changing architectures.
18964 2018-02-06 Richard Biener <rguenther@suse.de>
18966 * config/i386/i386.c (print_reg): Fix typo.
18967 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
18969 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
18971 * configure: Regenerate.
18973 2018-02-05 Martin Sebor <msebor@redhat.com>
18975 PR tree-optimization/83369
18976 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
18979 2018-02-05 Martin Liska <mliska@suse.cz>
18981 * doc/invoke.texi: Cherry-pick upstream r323995.
18983 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
18985 * ira.c (ira_init_register_move_cost): Adjust comment.
18987 2018-02-05 Martin Liska <mliska@suse.cz>
18989 PR gcov-profile/84137
18990 * doc/gcov.texi: Fix typo in documentation.
18992 2018-02-05 Martin Liska <mliska@suse.cz>
18994 PR gcov-profile/83879
18995 * doc/gcov.texi: Document necessity of --dynamic-list-data when
18996 using dlopen functionality.
18998 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19000 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19001 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19002 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19003 _mm_maskz_range_round_ss): New intrinsics.
19004 (__builtin_ia32_rangesd128_round)
19005 (__builtin_ia32_rangess128_round): Remove.
19006 (__builtin_ia32_rangesd128_mask_round,
19007 __builtin_ia32_rangess128_mask_round): New builtins.
19008 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19009 __builtin_ia32_rangess128_round): Remove.
19010 (__builtin_ia32_rangesd128_mask_round,
19011 __builtin_ia32_rangess128_mask_round): New builtins.
19012 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19013 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19014 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19015 "<round_saeonly_constraint>")): Changed to ...
19016 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19017 "<round_saeonly_scalar_constraint>")): ... this.
19018 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19019 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19020 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19021 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19022 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19024 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19026 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19028 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19029 Remove all values except native, 8540 and 8548.
19031 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19033 * config/i386/i386.c (ix86_output_function_return): Pass
19034 INVALID_REGNUM, instead of -1, as invalid register number to
19035 indirect_thunk_name and output_indirect_thunk.
19037 2018-02-02 Julia Koval <julia.koval@intel.com>
19039 * config.gcc: Add -march=icelake.
19040 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19041 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19042 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19043 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19044 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19045 (processor_target_table): Add icelake.
19046 (ix86_option_override_internal): Handle new PTAs.
19047 (get_builtin_code_for_version): Handle icelake.
19048 (M_INTEL_COREI7_ICELAKE): New.
19049 (fold_builtin_cpu): Handle icelake.
19050 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19051 * doc/invoke.texi: Add -march=icelake.
19053 2018-02-02 Julia Koval <julia.koval@intel.com>
19055 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19056 to wide_int_bitmask.
19057 * wide-int-bitmask.h: New.
19059 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19062 * config/i386/i386.md: Replace Pmode with word_mode in
19063 builtin_setjmp_setup and builtin_longjmp to support x32.
19065 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19069 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19071 (rs6000_supported_cpu_names): New static variable.
19072 (linux_cpu_translation_table): Likewise.
19073 (elf_platform) <cpu>: Define new static variable and use it.
19074 Translate kernel AT_PLATFORM name to canonical name if needed.
19075 Error if platform name is unknown.
19077 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19080 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19082 2018-02-01 Jeff Law <law@redhat.com>
19085 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19086 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19087 the scratch if RELEASE_VIA_POP is false.
19088 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19089 If we have to save a temporary register, decrement SIZE appropriately.
19090 Pass new arguments to release_scratch_register_on_entry.
19091 (ix86_adjust_stack_and_probe): Likewise.
19092 (ix86_emit_probe_stack_range): Pass new arguments to
19093 release_scratch_register_on_entry.
19095 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19097 PR rtl-optimization/84157
19098 * combine.c (change_zero_ext): Use REG_P predicate in
19099 front of HARD_REGISTER_P predicate.
19101 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19103 * config/avr/avr.c (avr_option_override): Move disabling of
19104 -fdelete-null-pointer-checks to...
19105 * common/config/avr/avr-common.c (avr_option_optimization_table):
19108 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19110 PR tree-optimization/81635
19111 * tree-data-ref.c (split_constant_offset_1): For types that
19112 wrap on overflow, try to use range info to prove that wrapping
19115 2018-02-01 Renlin Li <renlin.li@arm.com>
19118 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19119 TAILCALL_ADDR_REGS.
19120 (aarch64_register_move_cost): Likewise.
19121 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19122 TAILCALL_ADDR_REGS.
19123 (REG_CLASS_NAMES): Likewise.
19124 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19125 TAILCALL_ADDR_REGS. Remove IP registers.
19126 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19128 2018-02-01 Richard Biener <rguenther@suse.de>
19130 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19131 for specifying RPO order and allow NULL for that.
19132 * domwalk.c (dom_walker::dom_walker): Likewise.
19133 (dom_walker::walk): Handle NULL RPO order.
19134 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19136 (rewrite_update_dom_walker): Likewise.
19137 (mark_def_dom_walker): Likewise.
19139 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19141 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19142 (aarch64_maybe_expand_sve_subreg_move): Declare.
19143 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19144 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19146 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19147 that are semantically a reverse operation.
19148 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19149 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19150 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19152 (aarch64_can_change_mode_class): For big-endian, forbid changes
19153 between two SVE modes if they have different element sizes.
19155 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19157 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19158 the TImode handling for big-endian targets.
19160 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19162 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19163 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19165 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19166 Remove BSWAP handing for big-endian targets and use the form of
19167 LD1RQ appropariate for the mode.
19169 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19171 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19172 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19173 duplicated element.
19175 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19178 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19179 check for operands that need to go through aarch64_sve_reload_be.
19181 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19183 PR tree-optimization/81661
19184 PR tree-optimization/84117
19185 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19186 * tree-eh.c: Include gimplify.h.
19187 (find_trapping_overflow, replace_trapping_overflow,
19188 rewrite_to_non_trapping_overflow): New functions.
19189 * tree-vect-loop.c: Include tree-eh.h.
19190 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19191 * tree-data-ref.c: Include tree-eh.h.
19192 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19194 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19196 PR rtl-optimization/84123
19197 * combine.c (change_zero_ext): Check if hard register satisfies
19198 can_change_dest_mode before calling gen_lowpart_SUBREG.
19200 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19203 * ira.c (ira_init_register_move_cost): Remove assert.
19205 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19207 PR rtl-optimization/84071
19208 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19209 * doc/tm.texi: Regenerate.
19211 2018-01-31 Richard Biener <rguenther@suse.de>
19213 PR tree-optimization/84132
19214 * tree-data-ref.c (analyze_miv_subscript): Properly
19215 check whether evolution_function_is_affine_multivariate_p
19216 before calling gcd_of_steps_may_divide_p.
19218 2018-01-31 Julia Koval <julia.koval@intel.com>
19221 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19222 * config/i386/i386.md (rdpid_rex64) New.
19223 (rdpid): Make 32bit only.
19225 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19228 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19229 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19231 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19234 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19236 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19238 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19240 PR rtl-optimization/84071
19241 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19242 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19244 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19246 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19247 (arc_attribute_table): Add 'aux' attribute.
19248 (arc_in_small_data_p): Consider aux like variables.
19249 (arc_is_aux_reg_p): New function.
19250 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19251 (arc_get_aux_arg): New function.
19252 (prepare_move_operands): Handle aux-register access.
19253 (arc_handle_aux_attribute): New function.
19254 * doc/extend.texi (ARC Variable attributes): Add subsection.
19256 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19258 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19259 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19260 (arc_attribute_table): Add 'uncached' attribute.
19261 (arc_print_operand): Print '.di' flag for uncached memory
19263 (arc_in_small_data_p): Do not consider for small data the uncached
19265 (arc_is_uncached_mem_p): New function.
19266 * config/arc/predicates.md (compact_store_memory_operand): Check
19267 for uncached memory accesses.
19268 (nonvol_nonimm_operand): Likewise.
19269 * doc/extend.texi (ARC Type Attribute): New subsection.
19271 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19274 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19275 falign-loops=): Add Optimization flag.
19277 2018-01-30 Jeff Law <law@redhat.com>
19280 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19281 INT_REGISTERS_SAVED. Check it prior to calling
19282 get_scratch_register_on_entry.
19283 (ix86_adjust_stack_and_probe): Similarly.
19284 (ix86_emit_probe_stack_range): Similarly.
19285 (ix86_expand_prologue): Corresponding changes.
19287 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19290 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19291 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19293 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19296 * lra-constraints.c (curr_insn_transform): Process AND in the
19299 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19301 PR rtl-optimization/83986
19302 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19303 dependence against last_pending_memory_flush in addition to
19304 pending_jump_insns.
19306 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19308 PR tree-optimization/81611
19309 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19312 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19315 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19318 2018-01-30 Richard Biener <rguenther@suse.de>
19319 Jakub Jelinek <jakub@redhat.com>
19321 PR tree-optimization/84111
19322 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19323 inner loops added during recursion, as they don't have up-to-date
19326 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19329 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19330 (can_inline_edge_by_limits_p): ... here.
19331 (can_early_inline_edge_p, check_callers,
19332 update_caller_keys, update_callee_keys, recursive_inlining,
19333 add_new_edges_to_heap, speculation_useful_p,
19334 inline_small_functions,
19335 inline_small_functions, flatten_function,
19336 inline_to_all_callers_1): Update.
19338 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19340 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19343 2018-01-30 Richard Biener <rguenther@suse.de>
19345 PR tree-optimization/83008
19346 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19347 invariant and constant vector uses in stmts when they need
19348 more than one stmt.
19350 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19353 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19354 * configure: Regenerate.
19356 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19358 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19360 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19361 Use gen_rtx_REG rather than gen_lowpart.
19363 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19365 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19366 rather than 0 when creating partial subregs.
19368 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19370 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19373 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
19376 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19377 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19378 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19379 flags. This restores the settings used before the 2017-07-24.
19380 Turning off pre increment/decrement/modify allows IVOPTS to
19381 optimize DF/SF loops where the index is an int.
19383 2018-01-29 Richard Biener <rguenther@suse.de>
19384 Kelvin Nilsen <kelvin@gcc.gnu.org>
19387 * tree-vect-stmts.c (vectorizable_call): Don't call
19388 targetm.vectorize_builtin_md_vectorized_function if callee is
19391 2018-01-22 Carl Love <cel@us.ibm.com>
19393 * doc/extend.tex: Fix typo in second arg in
19394 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19396 2018-01-29 Richard Biener <rguenther@suse.de>
19398 PR tree-optimization/84086
19399 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19400 (flush_ssaname_freelist): When SSA names were released reset
19401 the SCEV hash table.
19403 2018-01-29 Richard Biener <rguenther@suse.de>
19405 PR tree-optimization/84057
19406 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19407 removed paths when removing edges.
19409 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
19411 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19412 -mfunction-return=@var{choice}.
19414 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
19416 PR diagnostic/84034
19417 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19418 Handle CR like TAB.
19419 (layout::print_source_line): Likewise.
19420 (test_get_line_width_without_trailing_whitespace): Add test cases.
19422 2018-01-27 Jakub Jelinek <jakub@redhat.com>
19424 PR middle-end/84040
19425 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19428 2018-01-26 Jim Wilson <jimw@sifive.com>
19430 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19432 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19435 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19437 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19438 and CMP + SUB-immediate -> SUBS.
19440 2018-01-26 Martin Sebor <msebor@redhat.com>
19442 PR tree-optimization/83896
19443 * tree-ssa-strlen.c (get_string_len): Rename...
19444 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
19445 Avoid assuming length is constant.
19446 (handle_char_store): Use HOST_WIDE_INT for string length.
19448 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
19451 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19452 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19454 2018-01-26 Richard Biener <rguenther@suse.de>
19456 PR rtl-optimization/84003
19457 * dse.c (record_store): Only record redundant stores when
19458 the earlier store aliases at least all accesses the later one does.
19460 2018-01-26 Jakub Jelinek <jakub@redhat.com>
19462 PR rtl-optimization/83985
19463 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19464 REG_CFA_RESTORE insns.
19465 (delete_unmarked_insns): Don't ignore separate shrink wrapping
19466 REG_CFA_RESTORE insns here.
19469 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19470 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19472 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19474 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19475 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19476 (arc_init): Likewise.
19477 (arc_override_options): Likewise.
19478 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19480 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19482 * config/arc/arc.h (TARGET_DBNZ): Define.
19483 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19484 properly set the tune attribute.
19485 (dbnz): Use TARGET_DBNZ guard.
19486 * config/arc/arc.opt (mtune): Add core3 option.
19488 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19490 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19491 recognize new pic like addresses.
19492 (arc_delegitimize_address): Clean up.
19494 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19496 * config/arc/arc-arches.def: Option mrf16 valid for all
19498 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19499 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19500 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19501 * config/arc/arc-tables.opt: Regenerate.
19502 * config/arc/arc.c (arc_conditional_register_usage): Handle
19503 reduced register file case.
19504 (arc_file_start): Set must have build attributes.
19505 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19506 mrf16 option value.
19507 * config/arc/arc.opt (mrf16): Add new option.
19508 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19509 * config/arc/genmultilib.awk: Handle new mrf16 option.
19510 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19511 * config/arc/t-multilib: Regenerate.
19512 * doc/invoke.texi (ARC Options): Document mrf16 option.
19514 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19516 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19517 * config/arc/arc.c (arc_handle_secure_attribute): New function.
19518 (arc_attribute_table): Add 'secure_call' attribute.
19519 (arc_print_operand): Print secure call operand.
19520 (arc_function_ok_for_sibcall): Don't optimize tail calls when
19522 (arc_is_secure_call_p): New function. * config/arc/arc.md
19523 (call_i): Add support for sjli instruction.
19524 (call_value_i): Likewise.
19525 * config/arc/constraints.md (Csc): New constraint.
19527 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
19528 John Eric Martin <John.Martin@emmicro-us.com>
19530 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19531 * config/arc/arc.c (_arc_jli_section): New struct.
19532 (arc_jli_section): New type.
19533 (rc_jli_sections): New static variable.
19534 (arc_handle_jli_attribute): New function.
19535 (arc_attribute_table): Add jli_always and jli_fixed attribute.
19536 (arc_file_end): New function.
19537 (TARGET_ASM_FILE_END): Define.
19538 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19539 (arc_add_jli_section): New function.
19540 (jli_call_scan): Likewise.
19541 (arc_reorg): Call jli_call_scan.
19542 (arc_output_addsi): Remove 'S' from printing asm operand.
19543 (arc_is_jli_call_p): New function.
19544 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19546 (movhi_insn): Likewise.
19547 (movsi_insn): Likewise.
19548 (movsi_set_cc_insn): Likewise.
19549 (loadqi_update): Likewise.
19550 (load_zeroextendqisi_update): Likewise.
19551 (load_signextendqisi_update): Likewise.
19552 (loadhi_update): Likewise.
19553 (load_zeroextendhisi_update): Likewise.
19554 (load_signextendhisi_update): Likewise.
19555 (loadsi_update): Likewise.
19556 (loadsf_update): Likewise.
19557 (movsicc_insn): Likewise.
19558 (bset_insn): Likewise.
19559 (bxor_insn): Likewise.
19560 (bclr_insn): Likewise.
19561 (bmsk_insn): Likewise.
19562 (bicsi3_insn): Likewise.
19563 (cmpsi_cc_c_insn): Likewise.
19564 (movsi_ne): Likewise.
19565 (movsi_cond_exec): Likewise.
19566 (clrsbsi2): Likewise.
19567 (norm_f): Likewise.
19577 (call_i): Remove 'S' asm letter, add jli instruction.
19578 (call_value_i): Likewise.
19579 * config/arc/arc.op (mjli-always): New option.
19580 * config/arc/constraints.md (Cji): New constraint.
19581 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19583 (subsf3_fpx): Likewise.
19584 (mulsf3_fpx): Likewise.
19585 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19587 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19588 function attrbutes.
19589 * doc/invoke.texi (ARC): Document mjli-always option.
19591 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
19593 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19594 avoid addition with 0 and use incw and decw where possible.
19596 2018-01-26 Richard Biener <rguenther@suse.de>
19598 PR tree-optimization/81082
19599 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19600 association if it requires casting to unsigned.
19601 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19602 from fold_plusminus_mult_expr to catch important cases late when
19603 range info is available.
19605 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19607 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19608 * configure.ac (hidden_linkonce): New test.
19609 * configure: Regenerate.
19610 * config.in: Regenerate.
19612 2018-01-26 Julia Koval <julia.koval@intel.com>
19614 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19615 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19616 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19617 _mm_mask_bitshuffle_epi64_mask): Fix type.
19618 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19619 USI_FTYPE_V4DI_V4DI_USI): Remove.
19620 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19621 __builtin_ia32_vpshufbitqmb256_mask,
19622 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19623 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19624 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19626 2018-01-26 Alan Modra <amodra@gmail.com>
19629 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19630 UNSPEC_VBPERMQ. Sort other unspecs.
19632 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
19634 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19636 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
19638 PR middle-end/83055
19639 * predict.c (drop_profile): Do not push/pop cfun; update also
19641 (handle_missing_profiles): Fix logic looking for zero profiles.
19643 2018-01-25 Jakub Jelinek <jakub@redhat.com>
19645 PR middle-end/83977
19646 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19647 on functions with #pragma omp declare simd or functions with simd
19649 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19650 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19651 Remove trailing \n from warning_at calls.
19653 2018-01-25 Tom de Vries <tom@codesourcery.com>
19656 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19657 for neutered workers.
19659 2018-01-24 Joseph Myers <joseph@codesourcery.com>
19662 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19663 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19665 2018-01-24 Jeff Law <law@redhat.com>
19668 * i386.c (get_probe_interval): Move to earlier point.
19669 (ix86_compute_frame_layout): If -fstack-clash-protection and
19670 the frame is larger than the probe interval, then use pushes
19671 to save registers rather than reg->mem moves.
19672 (ix86_expand_prologue): Remove conditional for int_registers_saved
19675 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
19678 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19679 min/max for never referenced object.
19681 2018-01-24 Jakub Jelinek <jakub@redhat.com>
19683 PR middle-end/83977
19684 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19686 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19687 attributes from DECL_ATTRIBUTES (decl) without affecting
19688 DECL_ATTRIBUTES (current_function_decl).
19689 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19690 functions with non-NULL DECL_ABSTRACT_ORIGIN.
19692 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
19694 PR tree-optimization/83979
19695 * fold-const.c (fold_comparison): Use constant_boolean_node
19696 instead of boolean_{true,false}_node.
19698 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
19700 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19703 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19705 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19706 Simplify the clause that sets the length attribute.
19707 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19708 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19709 clause that sets the length attribute.
19710 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19712 2018-01-24 Tom de Vries <tom@codesourcery.com>
19715 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19716 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19717 Add strict parameter.
19718 (prevent_branch_around_nothing): Insert dummy insn between branch to
19719 label and label with no ptx insn inbetween.
19720 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19722 2018-01-24 Tom de Vries <tom@codesourcery.com>
19725 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19726 for neutered threads in warp.
19727 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19729 2018-01-24 Richard Biener <rguenther@suse.de>
19731 PR tree-optimization/83176
19732 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19735 2018-01-24 Richard Biener <rguenther@suse.de>
19737 PR tree-optimization/82819
19738 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19739 code generating pluses that are no-ops in the target precision.
19741 2018-01-24 Richard Biener <rguenther@suse.de>
19743 PR middle-end/84000
19744 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19746 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19748 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19749 to merge probabilities.
19750 * predict.c (probably_never_executed): Also mark as cold functions
19751 with global 0 profile and guessed local profile.
19752 * profile-count.c (profile_probability::combine_with_count): New
19754 * profile-count.h (profile_probability::operator*,
19755 profile_probability::operator*=, profile_probability::operator/,
19756 profile_probability::operator/=): Reduce precision to adjusted
19757 and set value to guessed on contradictory divisions.
19758 (profile_probability::combine_with_freq): Remove.
19759 (profile_probability::combine_wiht_count): Declare.
19760 (profile_count::force_nonzero):: Set to adjusted.
19761 (profile_count::probability_in):: Set quality to adjusted.
19762 * tree-ssa-tail-merge.c (replace_block_by): Use
19763 combine_with_count.
19765 2018-01-23 Andrew Waterman <andrew@sifive.com>
19766 Jim Wilson <jimw@sifive.com>
19768 * config/riscv/riscv.c (riscv_stack_boundary): New.
19769 (riscv_option_override): Set riscv_stack_boundary. Handle
19770 riscv_preferred_stack_boundary_arg.
19771 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19772 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19773 (STACK_BOUNDARY): Set to riscv_stack_boundary.
19774 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19775 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19776 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19778 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
19781 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19782 of struct ix86_frame.
19783 (ix86_expand_epilogue): Likewise. Add a local variable for
19784 the reg_save_offset field in struct ix86_frame.
19786 2018-01-23 Bin Cheng <bin.cheng@arm.com>
19788 PR tree-optimization/82604
19789 * tree-loop-distribution.c (enum partition_kind): New enum item
19790 PKIND_PARTIAL_MEMSET.
19791 (partition_builtin_p): Support above new enum item.
19792 (generate_code_for_partition): Ditto.
19793 (compute_access_range): Differentiate cases that equality can be
19794 proven at all loops, the innermost loops or no loops.
19795 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19796 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
19797 (finalize_partitions, distribute_loop): Don't fuse partition of
19798 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19799 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19800 parloop is enabled.
19802 2018-01-23 Martin Liska <mliska@suse.cz>
19804 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19805 order to ignore the predictor.
19806 (PRED_POLYMORPHIC_CALL): Likewise.
19807 (PRED_RECURSIVE_CALL): Likewise.
19809 2018-01-23 Martin Liska <mliska@suse.cz>
19811 * tree-profile.c (tree_profiling): Print function header to
19812 aware reader which function we are working on.
19813 * value-prof.c (gimple_find_values_to_profile): Do not print
19814 not interesting value histograms.
19816 2018-01-23 Martin Liska <mliska@suse.cz>
19818 * profile-count.h (enum profile_quality): Add
19819 profile_uninitialized as the first value. Do not number values
19820 as they are zero based.
19821 (profile_count::verify): Update sanity check.
19822 (profile_probability::verify): Likewise.
19824 2018-01-23 Nathan Sidwell <nathan@acm.org>
19826 * doc/invoke.texi (ffor-scope): Deprecate.
19828 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19830 PR tree-optimization/83510
19831 * domwalk.c (set_all_edges_as_executable): New function.
19832 (dom_walker::dom_walker): Convert bool param
19833 "skip_unreachable_blocks" to enum reachability. Move setup of
19834 edge flags to set_all_edges_as_executable and only do it when
19835 reachability is REACHABLE_BLOCKS.
19836 * domwalk.h (enum dom_walker::reachability): New enum.
19837 (dom_walker::dom_walker): Convert bool param
19838 "skip_unreachable_blocks" to enum reachability.
19839 (set_all_edges_as_executable): New decl.
19840 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
19841 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
19843 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
19844 but converting true to REACHABLE_BLOCKS.
19845 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19847 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19848 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19849 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19851 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19852 if check_all_array_refs will be called.
19854 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19856 * tree.c (selftest::test_location_wrappers): Add more test
19859 2018-01-23 David Malcolm <dmalcolm@redhat.com>
19861 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19862 (selftest::test_bit_in_range): Likewise.
19864 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19867 * doc/sourcebuild.texi (vect_float): Say that the selector
19868 only describes the situation when -funsafe-math-optimizations is on.
19869 (vect_float_strict): Document.
19871 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
19873 PR tree-optimization/83965
19874 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19875 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19876 instead of checking only for a reduction.
19877 (vect_recog_widen_sum_pattern): Likewise.
19879 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19881 * predict.c (probably_never_executed): Only use precise profile info.
19882 (compute_function_frequency): Skip after inlining hack since we now
19883 have quality checking.
19885 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
19887 * profile-count.h (profile_probability::very_unlikely,
19888 profile_probability::unlikely, profile_probability::even): Set
19889 precision to guessed.
19891 2018-01-23 Richard Biener <rguenther@suse.de>
19893 PR tree-optimization/83963
19894 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19895 Properly terminate dominator walk when crossing the exit edge not
19896 when visiting its source block.
19898 2018-01-23 Jakub Jelinek <jakub@redhat.com>
19901 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19902 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19904 2018-01-22 Jakub Jelinek <jakub@redhat.com>
19906 PR tree-optimization/83957
19907 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
19908 semicolon after for body surrounded by braces.
19910 PR tree-optimization/83081
19911 * profile-count.h (profile_probability::split): New method.
19912 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
19913 Use profile_probability::split.
19914 (do_compare_rtx_and_jump): Fix adjustment of probabilities
19915 when splitting a single conditional jump into 2.
19917 2018-01-22 David Malcolm <dmalcolm@redhat.com>
19919 PR tree-optimization/69452
19920 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
19923 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19925 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
19926 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
19927 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
19929 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19931 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
19933 * config/rl78/rl78.md (movdi): New define_expand.
19934 * config/rl78/rl78.c (rl78_split_movdi): New function.
19936 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
19939 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
19941 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
19942 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
19943 128-bit to produce an UNSPEC move to get the double word with the
19944 signbit and then a shift directly to do signbit.
19945 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
19946 implementation with a new version that just does either a direct
19947 move or a regular move. Move memory interface to separate insns.
19948 Move insns so they are next to the expander.
19949 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
19950 with signbit move. Split big and little endian case.
19951 (signbit<mode>2_dm_mem_le): Likewise.
19952 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
19953 (signbit<mode>2_dm2): Likewise.
19955 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19957 * config/rl78/rl78.md (anddi3): New define_expand.
19959 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19961 * config/rl78/rl78.md (umindi3): New define_expand.
19963 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19965 * config/rl78/rl78.md (smindi3): New define_expand.
19967 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19969 * config/rl78/rl78.md (smaxdi3): New define_expand.
19971 2018-01-22 Carl Love <cel@us.ibm.com>
19973 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
19974 LVX_V1TI): Add macro expansion.
19975 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
19976 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
19977 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
19978 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
19979 Change check to determine if the instruction is a byte reversing
19980 entry. Fix typo in comment.
19981 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
19982 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
19983 Add def_builtin calls for new builtins.
19984 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
19985 Add define_insn expansion.
19987 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19989 * config/rl78/rl78.md (umaxdi3): New define_expand.
19991 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
19993 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
19994 for non-QImode registers.
19996 2018-01-22 Richard Biener <rguenther@suse.de>
19998 PR tree-optimization/83963
19999 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20000 including the loop exit block.
20001 (scop_detection::merge_sese): Likewise.
20002 (scop_detection::add_scop): Do it here instead.
20004 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20006 * doc/sourcebuild.texi (arm_softfloat): Document.
20008 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20011 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20012 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20013 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20015 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20016 David Edelsohn <dje.gcc@gmail.com>
20019 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20020 Change "crset eq" to "crset 2".
20021 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20022 (*call_indirect_aix<mode>_nospec): Likewise.
20023 (*call_value_indirect_aix<mode>_nospec): Likewise.
20024 (*call_indirect_elfv2<mode>_nospec): Likewise.
20025 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20026 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20027 change assembly output from . to $.
20028 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20029 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20030 (*tablejump<mode>_internal1_nospec): Likewise.
20032 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20035 * config/sh/sh_optimize_sett_clrt.cc:
20036 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20038 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20040 PR tree-optimization/83940
20041 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20042 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20043 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20044 use it to pass back the definition type.
20045 (vect_check_store_rhs): Likewise rhs_dt_out.
20046 (vect_build_gather_load_calls): Add a mask_dt argument and use
20047 it instead of a call to vect_is_simple_use.
20048 (vectorizable_store): Update calls to vect_check_load_store_mask
20049 and vect_check_store_rhs. Use the dt returned by the latter instead
20050 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20051 instead of calls to vect_is_simple_use. Pass the scalar rather
20052 than the vector operand to vect_is_simple_use when handling
20053 second and subsequent copies of an rhs value.
20054 (vectorizable_load): Update calls to vect_check_load_store_mask
20055 and vect_build_gather_load_calls. Use the cached mask_dt and
20056 gs_info.offset_dt instead of calls to vect_is_simple_use.
20058 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20060 PR middle-end/83945
20061 * tree-emutls.c: Include gimplify.h.
20062 (lower_emutls_2): New function.
20063 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20064 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20065 it before further processing.
20068 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20069 UINTVAL (trueop1) instead of INTVAL (op1).
20071 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20075 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20076 INCOMING_FRAME_SP_OFFSET if not defined.
20077 (scan_trace): Add ENTRY argument. If true and
20078 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20079 emit a note to adjust the CFA offset.
20080 (create_cfi_notes): Adjust scan_trace callers.
20081 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20082 INCOMING_FRAME_SP_OFFSET in the CIE.
20083 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20084 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20086 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20087 * doc/tm.texi: Regenerated.
20089 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20091 PR rtl-optimization/83147
20092 * lra-constraints.c (remove_inheritance_pseudos): Use
20093 lra_substitute_pseudo_within_insn.
20095 2018-01-19 Tom de Vries <tom@codesourcery.com>
20096 Cesar Philippidis <cesar@codesourcery.com>
20099 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20101 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20104 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20105 spaces for function labels.
20107 2018-01-19 Martin Liska <mliska@suse.cz>
20109 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20110 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20111 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20112 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20113 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20114 (PRED_CONST_RETURN): Change from 69 to 65.
20115 (PRED_NULL_RETURN): Change from 91 to 71.
20116 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20117 (PRED_LOOP_GUARD): Change from 66 to 73.
20119 2018-01-19 Martin Liska <mliska@suse.cz>
20121 * predict.c (predict_insn_def): Add new assert.
20122 (struct branch_predictor): Change type to signed integer.
20123 (test_prediction_value_range): Amend test to cover
20124 PROB_UNINITIALIZED.
20125 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20126 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20127 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20128 (PRED_LOOP_IV_COMPARE): Likewise.
20129 * predict.h (PROB_UNINITIALIZED): Define new constant.
20131 2018-01-19 Martin Liska <mliska@suse.cz>
20133 * predict.c (dump_prediction): Add new format for
20134 analyze_brprob.py script which is enabled with -details
20136 * profile-count.h (precise_p): New function.
20138 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20140 PR tree-optimization/83922
20141 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20142 there are no statements that need masking.
20143 (vect_active_double_reduction_p): New function.
20144 (vect_analyze_loop_operations): Use it when handling phis that
20145 are not in the loop header.
20147 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20149 PR tree-optimization/83914
20150 * tree-vect-loop.c (vectorizable_induction): Don't convert
20151 init_expr or apply the peeling adjustment for inductions
20152 that are nested within the vectorized loop.
20154 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20156 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20159 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20163 * function.h (gimplify_parameters): Add gimple_seq * argument.
20164 * function.c: Include gimple.h and options.h.
20165 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20166 for the added local temporaries if needed.
20167 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20168 if there are any parameter cleanups, wrap whole body into a
20169 try/finally with the cleanups.
20171 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20174 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20175 Use GET_MODE_CLASS for scalar floating point.
20177 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20181 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20182 Fix call of call_cgraph_insertion_hooks.
20184 2018-01-18 Martin Sebor <msebor@redhat.com>
20186 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20188 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20191 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20194 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20197 * common.opt: (-ffile-prefix-map): New option.
20198 * opts.c (common_handle_option): Defer it.
20199 * opts-global.c (handle_common_deferred_options): Handle it.
20200 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20201 * file-prefix-map.h: New file.
20202 (remap_debug_filename, add_debug_prefix_map): ...here.
20203 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20204 * final.c (debug_prefix_map, add_debug_prefix_map
20205 remap_debug_filename): Move to...
20206 * file-prefix-map.c: New file.
20207 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20208 generalize, get rid of alloca(), use strrchr() instead of strchr().
20209 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20210 Implement in terms of add_prefix_map().
20211 (remap_macro_filename, remap_debug_filename): Implement in term of
20213 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20214 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20215 * dbxout.c: Include file-prefix-map.h.
20216 * varasm.c: Likewise.
20217 * vmsdbgout.c: Likewise.
20218 * xcoffout.c: Likewise.
20219 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20220 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20221 * doc/invoke.texi (-ffile-prefix-map): Document.
20222 (-fdebug-prefix-map): Update description.
20224 2018-01-18 Martin Liska <mliska@suse.cz>
20226 * config/i386/i386.c (indirect_thunk_name): Document that also
20228 (output_indirect_thunk): Document why both instructions
20229 (pause and lfence) are generated.
20231 2018-01-18 Richard Biener <rguenther@suse.de>
20233 PR tree-optimization/83887
20234 * graphite-scop-detection.c
20235 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20236 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20237 (scop_detection::merge_sese): Re-implement with a flood-fill
20238 algorithm that properly finds a SESE region if it exists.
20240 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20243 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20244 pointer_diff optimizations use view_convert instead of convert.
20246 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20248 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20249 Generate different code for -mno-speculate-indirect-jumps.
20250 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20251 (*call_indirect_aix<mode>): Disable for
20252 -mno-speculate-indirect-jumps.
20253 (*call_indirect_aix<mode>_nospec): New define_insn.
20254 (*call_value_indirect_aix<mode>): Disable for
20255 -mno-speculate-indirect-jumps.
20256 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20257 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20258 -mno-speculate-indirect-jumps.
20259 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20261 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20263 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20264 long double type, set the flags for noting the default long double
20265 type, even if we don't pass or return a long double type.
20267 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20270 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20273 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20275 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20276 support for merge[hl].
20277 (fold_mergehl_helper): New helper function.
20278 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20279 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20280 (altivec_vmrglw_direct): Add xxmrglw insn.
20282 2018-01-17 Andrew Waterman <andrew@sifive.com>
20284 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20285 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20287 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20290 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20291 call the lto_location_cache before reading the
20292 DECL_SOURCE_LOCATION of the types.
20294 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20295 Richard Sandiford <richard.sandiford@linaro.org>
20297 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20298 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20299 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20300 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20301 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20303 * config/aarch64/constraints.md (aarch64_movti_operand):
20305 * config/aarch64/predicates.md (Uti): Add new constraint.
20307 2018-01-17 Carl Love <cel@us.ibm.com>
20309 * config/rs6000/vsx.md (define_expand xl_len_r,
20310 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20311 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20313 (define_expand, define_insn): Move the shift left from the
20314 define_insn to the define_expand for lxvl and stxvl instructions.
20315 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20316 and XL_LEN_R definitions to PURE.
20318 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20320 * config/i386/i386.c (indirect_thunk_name): Declare regno
20321 as unsigned int. Compare regno with INVALID_REGNUM.
20322 (output_indirect_thunk): Ditto.
20323 (output_indirect_thunk_function): Ditto.
20324 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20325 in the call to output_indirect_thunk_function.
20327 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20329 PR middle-end/83884
20330 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20331 rather than the size of inner_type to determine the stack slot size
20332 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20334 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20337 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20340 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20342 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20343 endian Linux systems to optionally enable multilibs for selecting
20344 the long double type if the user configured an explicit type.
20345 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20346 have no long double multilibs if not defined.
20347 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20348 warn if the user used -mabi={ieee,ibm}longdouble and we built
20349 multilibs for long double.
20350 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20351 appropriate multilib option.
20352 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20354 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20355 for building long double multilibs.
20356 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20358 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20360 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20363 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20365 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20368 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20371 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20374 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20376 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20377 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20379 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
20381 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20382 different rtl trees depending on TARGET_64BIT.
20383 (rs6000_gen_lvx): Likewise.
20385 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20387 * config/visium/visium.md (nop): Tweak comment.
20388 (hazard_nop): Likewise.
20390 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20392 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20393 -mspeculate-indirect-jumps.
20394 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20395 for -mno-speculate-indirect-jumps.
20396 (*call_indirect_elfv2<mode>_nospec): New define_insn.
20397 (*call_value_indirect_elfv2<mode>): Disable for
20398 -mno-speculate-indirect-jumps.
20399 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20400 (indirect_jump): Emit different RTL for
20401 -mno-speculate-indirect-jumps.
20402 (*indirect_jump<mode>): Disable for
20403 -mno-speculate-indirect-jumps.
20404 (*indirect_jump<mode>_nospec): New define_insn.
20405 (tablejump): Emit different RTL for
20406 -mno-speculate-indirect-jumps.
20407 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20408 (tablejumpsi_nospec): New define_expand.
20409 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20410 (tablejumpdi_nospec): New define_expand.
20411 (*tablejump<mode>_internal1): Disable for
20412 -mno-speculate-indirect-jumps.
20413 (*tablejump<mode>_internal1_nospec): New define_insn.
20414 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20417 2018-01-16 Artyom Skrobov tyomitch@gmail.com
20419 * caller-save.c (insert_save): Drop unnecessary parameter. All
20422 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20423 Richard Biener <rguenth@suse.de>
20426 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20427 return early, inline manually is_gimple_sizepos. Make sure if we
20428 call gimplify_expr we don't end up with a gimple constant.
20429 * tree.c (variably_modified_type_p): Don't return true for
20430 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
20431 * gimplify.h (is_gimple_sizepos): Remove.
20433 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20435 PR tree-optimization/83857
20436 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20437 vectorizable_live_operation for pure SLP statements.
20438 (vectorizable_live_operation): Handle PHIs.
20440 2018-01-16 Richard Biener <rguenther@suse.de>
20442 PR tree-optimization/83867
20443 * tree-vect-stmts.c (vect_transform_stmt): Precompute
20444 nested_in_vect_loop_p since the scalar stmt may get invalidated.
20446 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20449 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20450 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20451 If off is not INTEGER_CST, issue a may not be aligned warning
20452 rather than isn't aligned. Use isn%'t rather than isn't.
20453 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20455 <case MULT_EXPR>: Improve the case when bottom and one of the
20456 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20457 operand, in that case check if the other operand is multiple of
20458 bottom divided by the INTEGER_CST operand.
20460 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20463 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20464 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20465 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20466 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20467 * config/pa/pa.c (pa_function_arg_advance): Likewise.
20468 (pa_function_arg, pa_arg_partial_bytes): Likewise.
20469 (pa_function_arg_size): New function.
20471 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20473 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20474 in a separate statement.
20476 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20478 PR tree-optimization/83847
20479 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20480 group gathers and scatters.
20482 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20484 PR rtl-optimization/86620
20485 * params.def (max-sched-ready-insns): Bump minimum value to 1.
20487 PR rtl-optimization/83213
20488 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20489 to last if both are JUMP_INSNs.
20491 PR tree-optimization/83843
20492 * gimple-ssa-store-merging.c
20493 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20494 store_immediate_info for bswap/nop orig_stores.
20496 2018-01-15 Andrew Waterman <andrew@sifive.com>
20498 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20500 <UDIV>: Increase cost if !TARGET_DIV.
20502 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
20504 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20505 (define_attr "cr_logical_3op"): New.
20506 (cceq_ior_compare): Adjust.
20507 (cceq_ior_compare_complement): Adjust.
20508 (*cceq_rev_compare): Adjust.
20509 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20510 (is_cracked_insn): Adjust.
20511 (insn_must_be_first_in_group): Adjust.
20512 * config/rs6000/40x.md: Adjust.
20513 * config/rs6000/440.md: Adjust.
20514 * config/rs6000/476.md: Adjust.
20515 * config/rs6000/601.md: Adjust.
20516 * config/rs6000/603.md: Adjust.
20517 * config/rs6000/6xx.md: Adjust.
20518 * config/rs6000/7450.md: Adjust.
20519 * config/rs6000/7xx.md: Adjust.
20520 * config/rs6000/8540.md: Adjust.
20521 * config/rs6000/cell.md: Adjust.
20522 * config/rs6000/e300c2c3.md: Adjust.
20523 * config/rs6000/e500mc.md: Adjust.
20524 * config/rs6000/e500mc64.md: Adjust.
20525 * config/rs6000/e5500.md: Adjust.
20526 * config/rs6000/e6500.md: Adjust.
20527 * config/rs6000/mpc.md: Adjust.
20528 * config/rs6000/power4.md: Adjust.
20529 * config/rs6000/power5.md: Adjust.
20530 * config/rs6000/power6.md: Adjust.
20531 * config/rs6000/power7.md: Adjust.
20532 * config/rs6000/power8.md: Adjust.
20533 * config/rs6000/power9.md: Adjust.
20534 * config/rs6000/rs64.md: Adjust.
20535 * config/rs6000/titan.md: Adjust.
20537 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20539 * config/i386/predicates.md (indirect_branch_operand): Rewrite
20540 ix86_indirect_branch_register logic.
20542 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20544 * config/i386/constraints.md (Bs): Update
20545 ix86_indirect_branch_register check. Don't check
20546 ix86_indirect_branch_register with GOT_memory_operand.
20548 * config/i386/predicates.md (GOT_memory_operand): Don't check
20549 ix86_indirect_branch_register here.
20550 (GOT32_symbol_operand): Likewise.
20552 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20554 * config/i386/predicates.md (constant_call_address_operand):
20555 Rewrite ix86_indirect_branch_register logic.
20556 (sibcall_insn_operand): Likewise.
20558 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20560 * config/i386/constraints.md (Bs): Replace
20561 ix86_indirect_branch_thunk_register with
20562 ix86_indirect_branch_register.
20564 * config/i386/i386.md (indirect_jump): Likewise.
20565 (tablejump): Likewise.
20566 (*sibcall_memory): Likewise.
20567 (*sibcall_value_memory): Likewise.
20568 Peepholes of indirect call and jump via memory: Likewise.
20569 * config/i386/i386.opt: Likewise.
20570 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20571 (GOT_memory_operand): Likewise.
20572 (call_insn_operand): Likewise.
20573 (sibcall_insn_operand): Likewise.
20574 (GOT32_symbol_operand): Likewise.
20576 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20578 PR middle-end/83837
20579 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20580 type rather than type addr's type points to.
20581 (expand_omp_atomic_mutex): Likewise.
20582 (expand_omp_atomic): Likewise.
20584 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
20587 * config/i386/i386.c (output_indirect_thunk_function): Use
20588 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20589 for __x86_return_thunk.
20591 2018-01-15 Richard Biener <rguenther@suse.de>
20593 PR middle-end/83850
20594 * expmed.c (extract_bit_field_1): Fix typo.
20596 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20599 * config/arm/iterators.md (VF): New mode iterator.
20600 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20601 Remove integer-related logic from pattern.
20602 (neon_vabd<mode>_3): Likewise.
20604 2018-01-15 Jakub Jelinek <jakub@redhat.com>
20606 PR middle-end/82694
20607 * common.opt (fstrict-overflow): No longer an alias.
20608 (fwrapv-pointer): New option.
20609 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20610 also for pointer types based on flag_wrapv_pointer.
20611 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20612 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20613 opts->x_flag_wrapv got set.
20614 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20615 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20616 POINTER_TYPE_OVERFLOW_UNDEFINED.
20617 * match.pd: Likewise in address comparison pattern.
20618 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20620 2018-01-15 Richard Biener <rguenther@suse.de>
20623 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20624 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
20625 Reset type names to their identifier if their TYPE_DECL doesn't
20626 have linkage (and thus is used for ODR and devirt).
20627 (save_debug_info_for_decl): Remove.
20628 (save_debug_info_for_type): Likewise.
20629 (add_tree_to_fld_list): Adjust.
20630 * tree-pretty-print.c (dump_generic_node): Make dumping of
20631 type names more robust.
20633 2018-01-15 Richard Biener <rguenther@suse.de>
20635 * BASE-VER: Bump to 8.0.1.
20637 2018-01-14 Martin Sebor <msebor@redhat.com>
20640 * builtins.c (check_access): Avoid warning when the no-warning bit
20643 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
20645 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20646 * ira-color (allocno_hard_regs_compare): Likewise.
20648 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
20651 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20652 Use .pushsection/.popsection.
20654 2018-01-14 Martin Sebor <msebor@redhat.com>
20657 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20659 2018-01-14 Jakub Jelinek <jakub@redhat.com>
20661 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20662 entry from extra_headers.
20663 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20664 extra_headers, make the list bitwise identical to the i?86-*-* one.
20666 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20668 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20669 -mcmodel=large with -mindirect-branch=thunk,
20670 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20671 -mfunction-return=thunk-extern.
20672 * doc/invoke.texi: Document -mcmodel=large is incompatible with
20673 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20674 -mfunction-return=thunk and -mfunction-return=thunk-extern.
20676 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20678 * config/i386/i386.c (print_reg): Print the name of the full
20679 integer register without '%'.
20680 (ix86_print_operand): Handle 'V'.
20681 * doc/extend.texi: Document 'V' modifier.
20683 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20685 * config/i386/constraints.md (Bs): Disallow memory operand for
20686 -mindirect-branch-register.
20688 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20689 (GOT_memory_operand): Likewise.
20690 (call_insn_operand): Likewise.
20691 (sibcall_insn_operand): Likewise.
20692 (GOT32_symbol_operand): Likewise.
20693 * config/i386/i386.md (indirect_jump): Call convert_memory_address
20694 for -mindirect-branch-register.
20695 (tablejump): Likewise.
20696 (*sibcall_memory): Likewise.
20697 (*sibcall_value_memory): Likewise.
20698 Disallow peepholes of indirect call and jump via memory for
20699 -mindirect-branch-register.
20700 (*call_pop): Replace m with Bw.
20701 (*call_value_pop): Likewise.
20702 (*sibcall_pop_memory): Replace m with Bs.
20703 * config/i386/i386.opt (mindirect-branch-register): New option.
20704 * doc/invoke.texi: Document -mindirect-branch-register option.
20706 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20708 * config/i386/i386-protos.h (ix86_output_function_return): New.
20709 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20710 set function_return_type.
20711 (indirect_thunk_name): Add ret_p to indicate thunk for function
20713 (output_indirect_thunk_function): Pass false to
20714 indirect_thunk_name.
20715 (ix86_output_indirect_branch_via_reg): Likewise.
20716 (ix86_output_indirect_branch_via_push): Likewise.
20717 (output_indirect_thunk_function): Create alias for function
20718 return thunk if regno < 0.
20719 (ix86_output_function_return): New function.
20720 (ix86_handle_fndecl_attribute): Handle function_return.
20721 (ix86_attribute_table): Add function_return.
20722 * config/i386/i386.h (machine_function): Add
20723 function_return_type.
20724 * config/i386/i386.md (simple_return_internal): Use
20725 ix86_output_function_return.
20726 (simple_return_internal_long): Likewise.
20727 * config/i386/i386.opt (mfunction-return=): New option.
20728 (indirect_branch): Mention -mfunction-return=.
20729 * doc/extend.texi: Document function_return function attribute.
20730 * doc/invoke.texi: Document -mfunction-return= option.
20732 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
20734 * config/i386/i386-opts.h (indirect_branch): New.
20735 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20736 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20737 with local indirect jump when converting indirect call and jump.
20738 (ix86_set_indirect_branch_type): New.
20739 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20740 (indirectlabelno): New.
20741 (indirect_thunk_needed): Likewise.
20742 (indirect_thunk_bnd_needed): Likewise.
20743 (indirect_thunks_used): Likewise.
20744 (indirect_thunks_bnd_used): Likewise.
20745 (INDIRECT_LABEL): Likewise.
20746 (indirect_thunk_name): Likewise.
20747 (output_indirect_thunk): Likewise.
20748 (output_indirect_thunk_function): Likewise.
20749 (ix86_output_indirect_branch_via_reg): Likewise.
20750 (ix86_output_indirect_branch_via_push): Likewise.
20751 (ix86_output_indirect_branch): Likewise.
20752 (ix86_output_indirect_jmp): Likewise.
20753 (ix86_code_end): Call output_indirect_thunk_function if needed.
20754 (ix86_output_call_insn): Call ix86_output_indirect_branch if
20756 (ix86_handle_fndecl_attribute): Handle indirect_branch.
20757 (ix86_attribute_table): Add indirect_branch.
20758 * config/i386/i386.h (machine_function): Add indirect_branch_type
20759 and has_local_indirect_jump.
20760 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20762 (tablejump): Likewise.
20763 (*indirect_jump): Use ix86_output_indirect_jmp.
20764 (*tablejump_1): Likewise.
20765 (simple_return_indirect_internal): Likewise.
20766 * config/i386/i386.opt (mindirect-branch=): New option.
20767 (indirect_branch): New.
20770 (thunk-inline): Likewise.
20771 (thunk-extern): Likewise.
20772 * doc/extend.texi: Document indirect_branch function attribute.
20773 * doc/invoke.texi: Document -mindirect-branch= option.
20775 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
20778 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20780 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
20782 * ipa-inline.c (want_inline_small_function_p): Return false if
20783 inlining has already failed with CIF_FINAL_ERROR.
20784 (update_caller_keys): Call want_inline_small_function_p before
20786 (update_callee_keys): Likewise.
20788 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
20790 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20792 (rs6000_quadword_masked_address_p): Likewise.
20793 (quad_aligned_load_p): Likewise.
20794 (quad_aligned_store_p): Likewise.
20795 (const_load_sequence_p): Add comment to describe the outer-most loop.
20796 (mimic_memory_attributes_and_flags): New function.
20797 (rs6000_gen_stvx): Likewise.
20798 (replace_swapped_aligned_store): Likewise.
20799 (rs6000_gen_lvx): Likewise.
20800 (replace_swapped_aligned_load): Likewise.
20801 (replace_swapped_load_constant): Capitalize argument name in
20802 comment describing this function.
20803 (rs6000_analyze_swaps): Add a third pass to search for vector loads
20804 and stores that access quad-word aligned addresses and replace
20805 with stvx or lvx instructions when appropriate.
20806 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20807 New function prototype.
20808 (rs6000_quadword_masked_address_p): Likewise.
20809 (rs6000_gen_lvx): Likewise.
20810 (rs6000_gen_stvx): Likewise.
20811 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20812 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20813 when memory address is aligned.
20814 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20815 this split to select lvx instruction when memory address is aligned.
20816 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20817 instruction when memory address is aligned.
20818 (*vsx_le_perm_load_v16qi): Likewise.
20819 (four unnamed splitters): Modify to select the stvx instruction
20820 when memory is aligned.
20822 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
20824 * predict.c (determine_unlikely_bbs): Handle correctly BBs
20825 which appears in the queue multiple times.
20827 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20828 Alan Hayward <alan.hayward@arm.com>
20829 David Sherwood <david.sherwood@arm.com>
20831 * tree-vectorizer.h (vec_lower_bound): New structure.
20832 (_loop_vec_info): Add check_nonzero and lower_bounds.
20833 (LOOP_VINFO_CHECK_NONZERO): New macro.
20834 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
20835 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
20836 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
20837 fields. Make seg_len the distance travelled, not including the
20839 (dr_direction_indicator): Declare.
20840 (dr_zero_step_indicator): Likewise.
20841 (dr_known_forward_stride_p): Likewise.
20842 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
20844 (runtime_alias_check_p): Allow runtime alias checks with
20846 (operator ==): Compare access_size and align.
20847 (prune_runtime_alias_test_list): Rework for new distinction between
20848 the access_size and seg_len.
20849 (create_intersect_range_checks_index): Likewise. Cope with polynomial
20851 (get_segment_min_max): New function.
20852 (create_intersect_range_checks): Use it.
20853 (dr_step_indicator): New function.
20854 (dr_direction_indicator): Likewise.
20855 (dr_zero_step_indicator): Likewise.
20856 (dr_known_forward_stride_p): Likewise.
20857 * tree-loop-distribution.c (data_ref_segment_size): Return
20858 DR_STEP * (niters - 1).
20859 (compute_alias_check_pairs): Update call to the dr_with_seg_len
20861 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20862 (vect_preserves_scalar_order_p): New function, split out from...
20863 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
20864 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20865 (vect_vfa_access_size): New function.
20866 (vect_vfa_align): Likewise.
20867 (vect_compile_time_alias): Take access_size_a and access_b arguments.
20868 (dump_lower_bound): New function.
20869 (vect_check_lower_bound): Likewise.
20870 (vect_small_gap_p): Likewise.
20871 (vectorizable_with_step_bound_p): Likewise.
20872 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20873 depencies if the vectorization factor is 1. Convert the checks
20874 for nonzero steps into checks on the bounds of DR_STEP. Try using
20875 a bunds check for variable steps if the minimum required step is
20876 relatively small. Update calls to the dr_with_seg_len
20877 constructor and to vect_compile_time_alias.
20878 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20880 (vect_loop_versioning): Call it.
20881 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20883 (vect_estimate_min_profitable_iters): Account for any bounds checks.
20885 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20886 Alan Hayward <alan.hayward@arm.com>
20887 David Sherwood <david.sherwood@arm.com>
20889 * doc/sourcebuild.texi (vect_scatter_store): Document.
20890 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20892 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20894 * genopinit.c (main): Add supports_vec_scatter_store and
20895 supports_vec_scatter_store_cached to target_optabs.
20896 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20897 IFN_MASK_SCATTER_STORE.
20898 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20900 * internal-fn.h (internal_store_fn_p): Declare.
20901 (internal_fn_stored_value_index): Likewise.
20902 * internal-fn.c (scatter_store_direct): New macro.
20903 (expand_scatter_store_optab_fn): New function.
20904 (direct_scatter_store_optab_supported_p): New macro.
20905 (internal_store_fn_p): New function.
20906 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
20907 IFN_MASK_SCATTER_STORE.
20908 (internal_fn_mask_index): Likewise.
20909 (internal_fn_stored_value_index): New function.
20910 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
20911 for scatter stores.
20912 * optabs-query.h (supports_vec_scatter_store_p): Declare.
20913 * optabs-query.c (supports_vec_scatter_store_p): New function.
20914 * tree-vectorizer.h (vect_get_store_rhs): Declare.
20915 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
20916 true for scatter stores.
20917 (vect_gather_scatter_fn_p): Handle scatter stores too.
20918 (vect_check_gather_scatter): Consider using scatter stores if
20919 supports_vec_scatter_store_p.
20920 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
20921 scatter stores too.
20922 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20923 internal_fn_stored_value_index.
20924 (check_load_store_masking): Handle scatter stores too.
20925 (vect_get_store_rhs): Make public.
20926 (vectorizable_call): Use internal_store_fn_p.
20927 (vectorizable_store): Handle scatter store internal functions.
20928 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
20929 when deciding whether the end of the group has been reached.
20930 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
20931 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
20932 (mask_scatter_store<mode>): New insns.
20934 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20935 Alan Hayward <alan.hayward@arm.com>
20936 David Sherwood <david.sherwood@arm.com>
20938 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
20939 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
20940 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
20942 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
20943 Use vect_truncate_gather_scatter_offset if we can't treat the
20944 operation as a normal gather load or scatter store.
20945 (get_group_load_store_type): Take the gather_scatter_info
20946 as argument. Try using a gather load or scatter store for
20947 single-element groups.
20948 (get_load_store_type): Update calls to get_group_load_store_type
20949 and vect_use_strided_gather_scatters_p.
20951 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20952 Alan Hayward <alan.hayward@arm.com>
20953 David Sherwood <david.sherwood@arm.com>
20955 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
20956 optional tree argument.
20957 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
20959 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
20960 but continue to use the current value as a fallback.
20961 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
20962 to compare the updates.
20963 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
20964 (get_load_store_type): Use it when handling a strided access.
20965 (vect_get_strided_load_store_ops): New function.
20966 (vect_get_data_ptr_increment): Likewise.
20967 (vectorizable_load): Handle strided gather loads. Always pass
20968 a step to vect_create_data_ref_ptr and bump_vector_ptr.
20970 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20971 Alan Hayward <alan.hayward@arm.com>
20972 David Sherwood <david.sherwood@arm.com>
20974 * doc/md.texi (gather_load@var{m}): Document.
20975 (mask_gather_load@var{m}): Likewise.
20976 * genopinit.c (main): Add supports_vec_gather_load and
20977 supports_vec_gather_load_cached to target_optabs.
20978 * optabs-tree.c (init_tree_optimization_optabs): Use
20979 ggc_cleared_alloc to allocate target_optabs.
20980 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
20981 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
20983 * internal-fn.h (internal_load_fn_p): Declare.
20984 (internal_gather_scatter_fn_p): Likewise.
20985 (internal_fn_mask_index): Likewise.
20986 (internal_gather_scatter_fn_supported_p): Likewise.
20987 * internal-fn.c (gather_load_direct): New macro.
20988 (expand_gather_load_optab_fn): New function.
20989 (direct_gather_load_optab_supported_p): New macro.
20990 (direct_internal_fn_optab): New function.
20991 (internal_load_fn_p): Likewise.
20992 (internal_gather_scatter_fn_p): Likewise.
20993 (internal_fn_mask_index): Likewise.
20994 (internal_gather_scatter_fn_supported_p): Likewise.
20995 * optabs-query.c (supports_at_least_one_mode_p): New function.
20996 (supports_vec_gather_load_p): Likewise.
20997 * optabs-query.h (supports_vec_gather_load_p): Declare.
20998 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20999 and memory_type field.
21000 (NUM_PATTERNS): Bump to 15.
21001 * tree-vect-data-refs.c: Include internal-fn.h.
21002 (vect_gather_scatter_fn_p): New function.
21003 (vect_describe_gather_scatter_call): Likewise.
21004 (vect_check_gather_scatter): Try using internal functions for
21005 gather loads. Recognize existing calls to a gather load function.
21006 (vect_analyze_data_refs): Consider using gather loads if
21007 supports_vec_gather_load_p.
21008 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21009 (vect_get_gather_scatter_offset_type): Likewise.
21010 (vect_convert_mask_for_vectype): Likewise.
21011 (vect_add_conversion_to_patterm): Likewise.
21012 (vect_try_gather_scatter_pattern): Likewise.
21013 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21014 (vect_vect_recog_func_ptrs): Add it.
21015 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21016 internal_fn_mask_index and internal_gather_scatter_fn_p.
21017 (check_load_store_masking): Take the gather_scatter_info as an
21018 argument and handle gather loads.
21019 (vect_get_gather_scatter_ops): New function.
21020 (vectorizable_call): Check internal_load_fn_p.
21021 (vectorizable_load): Likewise. Handle gather load internal
21023 (vectorizable_store): Update call to check_load_store_masking.
21024 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21025 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21026 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21027 (aarch64_gather_scale_operand_d): New predicates.
21028 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21029 (mask_gather_load<mode>): New insns.
21031 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21032 Alan Hayward <alan.hayward@arm.com>
21033 David Sherwood <david.sherwood@arm.com>
21035 * optabs.def (fold_left_plus_optab): New optab.
21036 * doc/md.texi (fold_left_plus_@var{m}): Document.
21037 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21038 * internal-fn.c (fold_left_direct): Define.
21039 (expand_fold_left_optab_fn): Likewise.
21040 (direct_fold_left_optab_supported_p): Likewise.
21041 * fold-const-call.c (fold_const_fold_left): New function.
21042 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21043 * tree-parloops.c (valid_reduction_p): New function.
21044 (gather_scalar_reductions): Use it.
21045 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21046 (vect_finish_replace_stmt): Declare.
21047 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21048 (needs_fold_left_reduction_p): New function, split out from...
21049 (vect_is_simple_reduction): ...here. Accept reductions that
21050 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21051 (vect_force_simple_reduction): Also store the reduction type in
21052 the assignment's STMT_VINFO_REDUC_TYPE.
21053 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21054 (merge_with_identity): New function.
21055 (vect_expand_fold_left): Likewise.
21056 (vectorize_fold_left_reduction): Likewise.
21057 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21058 scalar phi in place for it. Check for target support and reject
21059 cases that would reassociate the operation. Defer the transform
21060 phase to vectorize_fold_left_reduction.
21061 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21062 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21063 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21065 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21067 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21068 call to ifc_temp_var.
21070 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21071 Alan Hayward <alan.hayward@arm.com>
21072 David Sherwood <david.sherwood@arm.com>
21074 * target.def (legitimize_address_displacement): Take the original
21075 offset as a poly_int.
21076 * targhooks.h (default_legitimize_address_displacement): Update
21078 * targhooks.c (default_legitimize_address_displacement): Likewise.
21079 * doc/tm.texi: Regenerate.
21080 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21081 as an argument, moving assert of ad->disp == ad->disp_term to...
21082 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21083 Try calling targetm.legitimize_address_displacement before expanding
21084 the address rather than afterwards, and adjust for the new interface.
21085 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21086 Match the new hook interface. Handle SVE addresses.
21087 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21088 new hook interface.
21090 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21092 * Makefile.in (OBJS): Add early-remat.o.
21093 * target.def (select_early_remat_modes): New hook.
21094 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21095 * doc/tm.texi: Regenerate.
21096 * targhooks.h (default_select_early_remat_modes): Declare.
21097 * targhooks.c (default_select_early_remat_modes): New function.
21098 * timevar.def (TV_EARLY_REMAT): New timevar.
21099 * passes.def (pass_early_remat): New pass.
21100 * tree-pass.h (make_pass_early_remat): Declare.
21101 * early-remat.c: New file.
21102 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21104 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21106 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21107 Alan Hayward <alan.hayward@arm.com>
21108 David Sherwood <david.sherwood@arm.com>
21110 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21111 vfm1 with a bound_epilog parameter.
21112 (vect_do_peeling): Update calls accordingly, and move the prologue
21113 call earlier in the function. Treat the base bound_epilog as 0 for
21114 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21115 this base when peeling for gaps.
21116 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21117 with fully-masked loops.
21118 (vect_estimate_min_profitable_iters): Handle the single peeled
21119 iteration in that case.
21121 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21122 Alan Hayward <alan.hayward@arm.com>
21123 David Sherwood <david.sherwood@arm.com>
21125 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21126 single-element interleaving even if the size is not a power of 2.
21127 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21128 accesses for single-element interleaving if the group size is
21131 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21132 Alan Hayward <alan.hayward@arm.com>
21133 David Sherwood <david.sherwood@arm.com>
21135 * doc/md.texi (fold_extract_last_@var{m}): Document.
21136 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21137 * optabs.def (fold_extract_last_optab): New optab.
21138 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21139 * internal-fn.c (fold_extract_direct): New macro.
21140 (expand_fold_extract_optab_fn): Likewise.
21141 (direct_fold_extract_optab_supported_p): Likewise.
21142 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21143 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21144 EXTRACT_LAST_REDUCTION.
21145 (get_initial_def_for_reduction): Do not create an initial vector
21146 for EXTRACT_LAST_REDUCTION reductions.
21147 (vectorizable_reduction): Leave the scalar phi in place for
21148 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21149 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21150 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21151 transform phase to vectorizable_condition.
21152 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21154 (vect_finish_stmt_generation): ...here.
21155 (vect_finish_replace_stmt): New function.
21156 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21157 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21159 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
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 * doc/md.texi (extract_last_@var{m}): Document.
21166 * optabs.def (extract_last_optab): New optab.
21167 * internal-fn.def (EXTRACT_LAST): New internal function.
21168 * internal-fn.c (cond_unary_direct): New macro.
21169 (expand_cond_unary_optab_fn): Likewise.
21170 (direct_cond_unary_optab_supported_p): Likewise.
21171 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21172 loops using EXTRACT_LAST.
21173 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21174 (extract_last_<mode>): ...this optab.
21175 (vec_extract<mode><Vel>): Update accordingly.
21177 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21178 Alan Hayward <alan.hayward@arm.com>
21179 David Sherwood <david.sherwood@arm.com>
21181 * target.def (empty_mask_is_expensive): New hook.
21182 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21183 * doc/tm.texi: Regenerate.
21184 * targhooks.h (default_empty_mask_is_expensive): Declare.
21185 * targhooks.c (default_empty_mask_is_expensive): New function.
21186 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21187 if the target says that empty masks are expensive.
21188 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21190 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21192 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21193 Alan Hayward <alan.hayward@arm.com>
21194 David Sherwood <david.sherwood@arm.com>
21196 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21197 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21198 (vect_use_loop_mask_for_alignment_p): New function.
21199 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21200 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21201 niters_skip argument. Make sure that the first niters_skip elements
21202 of the first iteration are inactive.
21203 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21204 Update call to vect_set_loop_masks_directly.
21205 (get_misalign_in_elems): New function, split out from...
21206 (vect_gen_prolog_loop_niters): ...here.
21207 (vect_update_init_of_dr): Take a code argument that specifies whether
21208 the adjustment should be added or subtracted.
21209 (vect_update_init_of_drs): Likewise.
21210 (vect_prepare_for_masked_peels): New function.
21211 (vect_do_peeling): Skip prologue peeling if we're using a mask
21212 instead. Update call to vect_update_inits_of_drs.
21213 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21215 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21216 alignment. Do not include the number of peeled iterations in
21217 the minimum threshold in that case.
21218 (vectorizable_induction): Adjust the start value down by
21219 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21220 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21221 Take the number of skipped iterations into account when calculating
21223 * tree-vect-stmts.c (vect_gen_while_not): New function.
21225 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21226 Alan Hayward <alan.hayward@arm.com>
21227 David Sherwood <david.sherwood@arm.com>
21229 * doc/sourcebuild.texi (vect_fully_masked): Document.
21230 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21231 default value to 0.
21232 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21234 (vect_analyze_loop_2): ...here. Don't check the vectorization
21235 factor against the number of loop iterations if the loop is
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 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21243 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21244 (dump_groups): Update accordingly.
21245 (iv_use::mem_type): New member variable.
21246 (address_p): New function.
21247 (record_use): Add a mem_type argument and initialize the new
21249 (record_group_use): Add a mem_type argument. Use address_p.
21250 Remove obsolete null checks of base_object. Update call to record_use.
21251 (find_interesting_uses_op): Update call to record_group_use.
21252 (find_interesting_uses_cond): Likewise.
21253 (find_interesting_uses_address): Likewise.
21254 (get_mem_type_for_internal_fn): New function.
21255 (find_address_like_use): Likewise.
21256 (find_interesting_uses_stmt): Try find_address_like_use before
21257 calling find_interesting_uses_op.
21258 (addr_offset_valid_p): Use the iv mem_type field as the type
21259 of the addressed memory.
21260 (add_autoinc_candidates): Likewise.
21261 (get_address_cost): Likewise.
21262 (split_small_address_groups_p): Use address_p.
21263 (split_address_groups): Likewise.
21264 (add_iv_candidate_for_use): Likewise.
21265 (autoinc_possible_for_pair): Likewise.
21266 (rewrite_groups): Likewise.
21267 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21268 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21269 (get_alias_ptr_type_for_ptr_address): New function.
21270 (rewrite_use_address): Rewrite address uses in calls that were
21271 identified by find_address_like_use.
21273 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21274 Alan Hayward <alan.hayward@arm.com>
21275 David Sherwood <david.sherwood@arm.com>
21277 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21279 * gimple-expr.h (is_gimple_addressable: Likewise.
21280 * gimple-expr.c (is_gimple_address): Likewise.
21281 * internal-fn.c (expand_call_mem_ref): New function.
21282 (expand_mask_load_optab_fn): Use it.
21283 (expand_mask_store_optab_fn): Likewise.
21285 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21286 Alan Hayward <alan.hayward@arm.com>
21287 David Sherwood <david.sherwood@arm.com>
21289 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21290 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21291 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21292 (cond_umax@var{mode}): Document.
21293 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21294 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21295 (cond_umin_optab, cond_umax_optab): New optabs.
21296 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21297 (COND_IOR, COND_XOR): New internal functions.
21298 * internal-fn.h (get_conditional_internal_fn): Declare.
21299 * internal-fn.c (cond_binary_direct): New macro.
21300 (expand_cond_binary_optab_fn): Likewise.
21301 (direct_cond_binary_optab_supported_p): Likewise.
21302 (get_conditional_internal_fn): New function.
21303 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21304 Cope with reduction statements that are vectorized as calls rather
21306 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21307 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21308 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21309 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21310 (UNSPEC_COND_EOR): New unspecs.
21311 (optab): Add mappings for them.
21312 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21313 (sve_int_op, sve_fp_op): New int attributes.
21315 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21316 Alan Hayward <alan.hayward@arm.com>
21317 David Sherwood <david.sherwood@arm.com>
21319 * optabs.def (while_ult_optab): New optab.
21320 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21321 * internal-fn.def (WHILE_ULT): New internal function.
21322 * internal-fn.h (direct_internal_fn_supported_p): New override
21323 that takes two types as argument.
21324 * internal-fn.c (while_direct): New macro.
21325 (expand_while_optab_fn): New function.
21326 (convert_optab_supported_p): Likewise.
21327 (direct_while_optab_supported_p): New macro.
21328 * wide-int.h (wi::udiv_ceil): New function.
21329 * tree-vectorizer.h (rgroup_masks): New structure.
21330 (vec_loop_masks): New typedef.
21331 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21332 and fully_masked_p.
21333 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21334 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21335 (vect_max_vf): New function.
21336 (slpeel_make_loop_iterate_ntimes): Delete.
21337 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21338 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21339 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21340 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21341 internal-fn.h, stor-layout.h and optabs-query.h.
21342 (vect_set_loop_mask): New function.
21343 (add_preheader_seq): Likewise.
21344 (add_header_seq): Likewise.
21345 (interleave_supported_p): Likewise.
21346 (vect_maybe_permute_loop_masks): Likewise.
21347 (vect_set_loop_masks_directly): Likewise.
21348 (vect_set_loop_condition_masked): Likewise.
21349 (vect_set_loop_condition_unmasked): New function, split out from
21350 slpeel_make_loop_iterate_ntimes.
21351 (slpeel_make_loop_iterate_ntimes): Rename to..
21352 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21353 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21354 (vect_do_peeling): Update call accordingly.
21355 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21357 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21358 mask_compare_type, can_fully_mask_p and fully_masked_p.
21359 (release_vec_loop_masks): New function.
21360 (_loop_vec_info): Use it to free the loop masks.
21361 (can_produce_all_loop_masks_p): New function.
21362 (vect_get_max_nscalars_per_iter): Likewise.
21363 (vect_verify_full_masking): Likewise.
21364 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21365 retries, and free the mask rgroups before retrying. Check loop-wide
21366 reasons for disallowing fully-masked loops. Make the final decision
21367 about whether use a fully-masked loop or not.
21368 (vect_estimate_min_profitable_iters): Do not assume that peeling
21369 for the number of iterations will be needed for fully-masked loops.
21370 (vectorizable_reduction): Disable fully-masked loops.
21371 (vectorizable_live_operation): Likewise.
21372 (vect_halve_mask_nunits): New function.
21373 (vect_double_mask_nunits): Likewise.
21374 (vect_record_loop_mask): Likewise.
21375 (vect_get_loop_mask): Likewise.
21376 (vect_transform_loop): Handle the case in which the final loop
21377 iteration might handle a partial vector. Call vect_set_loop_condition
21378 instead of slpeel_make_loop_iterate_ntimes.
21379 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21380 (check_load_store_masking): New function.
21381 (prepare_load_store_mask): Likewise.
21382 (vectorizable_store): Handle fully-masked loops.
21383 (vectorizable_load): Likewise.
21384 (supportable_widening_operation): Use vect_halve_mask_nunits for
21386 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21387 (vect_gen_while): New function.
21388 * config/aarch64/aarch64.md (umax<mode>3): New expander.
21389 (aarch64_uqdec<mode>): New insn.
21391 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21392 Alan Hayward <alan.hayward@arm.com>
21393 David Sherwood <david.sherwood@arm.com>
21395 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21396 (reduc_xor_scal_optab): New optabs.
21397 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21398 (reduc_xor_scal_@var{m}): Document.
21399 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21400 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21401 internal functions.
21402 * fold-const-call.c (fold_const_call): Handle them.
21403 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21404 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21405 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21406 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21407 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21408 (UNSPEC_XORV): New unspecs.
21409 (optab): Add entries for them.
21410 (BITWISEV): New int iterator.
21411 (bit_reduc_op): New int attributes.
21413 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21414 Alan Hayward <alan.hayward@arm.com>
21415 David Sherwood <david.sherwood@arm.com>
21417 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21418 * internal-fn.def (VEC_SHL_INSERT): New internal function.
21419 * optabs.def (vec_shl_insert_optab): New optab.
21420 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21421 (duplicate_and_interleave): Likewise.
21422 * tree-vect-loop.c: Include internal-fn.h.
21423 (neutral_op_for_slp_reduction): New function, split out from
21424 get_initial_defs_for_reduction.
21425 (get_initial_def_for_reduction): Handle option 2 for variable-length
21426 vectors by loading the neutral value into a vector and then shifting
21427 the initial value into element 0.
21428 (get_initial_defs_for_reduction): Replace the code argument with
21429 the neutral value calculated by neutral_op_for_slp_reduction.
21430 Use gimple_build_vector for constant-length vectors.
21431 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21432 but the first group_size elements have a neutral value.
21433 Use duplicate_and_interleave otherwise.
21434 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21435 Update call to get_initial_defs_for_reduction. Handle SLP
21436 reductions for variable-length vectors by creating one vector
21437 result for each scalar result, with the elements associated
21438 with other scalar results stubbed out with the neutral value.
21439 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21440 Require IFN_VEC_SHL_INSERT for double reductions on
21441 variable-length vectors, or SLP reductions that have
21442 a neutral value. Require can_duplicate_and_interleave_p
21443 support for variable-length unchained SLP reductions if there
21444 is no neutral value, such as for MIN/MAX reductions. Also require
21445 the number of vector elements to be a multiple of the number of
21446 SLP statements when doing variable-length unchained SLP reductions.
21447 Update call to vect_create_epilog_for_reduction.
21448 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21449 and remove initial values.
21450 (duplicate_and_interleave): Make public.
21451 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21452 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21454 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21455 Alan Hayward <alan.hayward@arm.com>
21456 David Sherwood <david.sherwood@arm.com>
21458 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21459 (can_duplicate_and_interleave_p): New function.
21460 (vect_get_and_check_slp_defs): Take the vector of statements
21461 rather than just the current one. Remove excess parentheses.
21462 Restriction rejectinon of vect_constant_def and vect_external_def
21463 for variable-length vectors to boolean types, or types for which
21464 can_duplicate_and_interleave_p is false.
21465 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21466 (duplicate_and_interleave): New function.
21467 (vect_get_constant_vectors): Use gimple_build_vector for
21468 constant-length vectors and suitable variable-length constant
21469 vectors. Use duplicate_and_interleave for other variable-length
21470 vectors. Don't defer the update when inserting new statements.
21472 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21473 Alan Hayward <alan.hayward@arm.com>
21474 David Sherwood <david.sherwood@arm.com>
21476 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21477 min_profitable_iters doesn't go negative.
21479 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21480 Alan Hayward <alan.hayward@arm.com>
21481 David Sherwood <david.sherwood@arm.com>
21483 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21484 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21485 * optabs.def (vec_mask_load_lanes_optab): New optab.
21486 (vec_mask_store_lanes_optab): Likewise.
21487 * internal-fn.def (MASK_LOAD_LANES): New internal function.
21488 (MASK_STORE_LANES): Likewise.
21489 * internal-fn.c (mask_load_lanes_direct): New macro.
21490 (mask_store_lanes_direct): Likewise.
21491 (expand_mask_load_optab_fn): Handle masked operations.
21492 (expand_mask_load_lanes_optab_fn): New macro.
21493 (expand_mask_store_optab_fn): Handle masked operations.
21494 (expand_mask_store_lanes_optab_fn): New macro.
21495 (direct_mask_load_lanes_optab_supported_p): Likewise.
21496 (direct_mask_store_lanes_optab_supported_p): Likewise.
21497 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21499 (vect_load_lanes_supported): Likewise.
21500 * tree-vect-data-refs.c (strip_conversion): New function.
21501 (can_group_stmts_p): Likewise.
21502 (vect_analyze_data_ref_accesses): Use it instead of checking
21503 for a pair of assignments.
21504 (vect_store_lanes_supported): Take a masked_p parameter.
21505 (vect_load_lanes_supported): Likewise.
21506 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21507 vect_store_lanes_supported and vect_load_lanes_supported.
21508 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21509 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21510 parameter. Don't allow gaps for masked accesses.
21511 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
21512 and vect_load_lanes_supported.
21513 (get_load_store_type): Take a masked_p parameter and update
21514 call to get_group_load_store_type.
21515 (vectorizable_store): Update call to get_load_store_type.
21516 Handle IFN_MASK_STORE_LANES.
21517 (vectorizable_load): Update call to get_load_store_type.
21518 Handle IFN_MASK_LOAD_LANES.
21520 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21521 Alan Hayward <alan.hayward@arm.com>
21522 David Sherwood <david.sherwood@arm.com>
21524 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21526 * config/aarch64/aarch64-protos.h
21527 (aarch64_sve_struct_memory_operand_p): Declare.
21528 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21529 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21530 (VPRED, vpred): Handle SVE structure modes.
21531 * config/aarch64/constraints.md (Utx): New constraint.
21532 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21533 (aarch64_sve_struct_nonimmediate_operand): New predicates.
21534 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21535 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21536 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21537 structure modes. Split into pieces after RA.
21538 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21539 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21541 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21542 SVE structure modes.
21543 (aarch64_classify_address): Likewise.
21544 (sizetochar): Move earlier in file.
21545 (aarch64_print_operand): Handle SVE register lists.
21546 (aarch64_array_mode): New function.
21547 (aarch64_sve_struct_memory_operand_p): Likewise.
21548 (TARGET_ARRAY_MODE): Redefine.
21550 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21551 Alan Hayward <alan.hayward@arm.com>
21552 David Sherwood <david.sherwood@arm.com>
21554 * target.def (array_mode): New target hook.
21555 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21556 * doc/tm.texi: Regenerate.
21557 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21558 * hooks.c (hook_optmode_mode_uhwi_none): New function.
21559 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21560 targetm.array_mode.
21561 * stor-layout.c (mode_for_array): Likewise. Support polynomial
21564 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21565 Alan Hayward <alan.hayward@arm.com>
21566 David Sherwood <david.sherwood@arm.com>
21568 * fold-const.c (fold_binary_loc): Check the argument types
21569 rather than the result type when testing for a vector operation.
21571 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21573 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21574 * doc/tm.texi: Regenerate.
21576 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21577 Alan Hayward <alan.hayward@arm.com>
21578 David Sherwood <david.sherwood@arm.com>
21580 * doc/invoke.texi (-msve-vector-bits=): Document new option.
21581 (sve): Document new AArch64 extension.
21582 * doc/md.texi (w): Extend the description of the AArch64
21583 constraint to include SVE vectors.
21584 (Upl, Upa): Document new AArch64 predicate constraints.
21585 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21587 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21588 (msve-vector-bits=): New option.
21589 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21590 SVE when these are disabled.
21591 (sve): New extension.
21592 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21593 modes. Adjust their number of units based on aarch64_sve_vg.
21594 (MAX_BITSIZE_MODE_ANY_MODE): Define.
21595 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21596 aarch64_addr_query_type.
21597 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21598 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21599 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21600 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21601 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21602 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21603 (aarch64_simd_imm_zero_p): Delete.
21604 (aarch64_check_zero_based_sve_index_immediate): Declare.
21605 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21606 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21607 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21608 (aarch64_sve_float_mul_immediate_p): Likewise.
21609 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21610 rather than an rtx.
21611 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21612 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21613 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21614 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21615 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21616 (aarch64_regmode_natural_size): Likewise.
21617 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21618 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21620 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21621 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21622 for VG and the SVE predicate registers.
21623 (V_ALIASES): Add a "z"-prefixed alias.
21624 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21625 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21626 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21627 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21628 (REG_CLASS_NAMES): Add entries for them.
21629 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
21630 and the predicate registers.
21631 (aarch64_sve_vg): Declare.
21632 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21633 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21634 (REGMODE_NATURAL_SIZE): Define.
21635 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21637 * config/aarch64/aarch64.c: Include cfgrtl.h.
21638 (simd_immediate_info): Add a constructor for series vectors,
21639 and an associated step field.
21640 (aarch64_sve_vg): New variable.
21641 (aarch64_dbx_register_number): Handle VG and the predicate registers.
21642 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21643 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21644 (VEC_ANY_DATA, VEC_STRUCT): New constants.
21645 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21646 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21647 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21648 (aarch64_get_mask_mode): New functions.
21649 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21650 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21651 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
21652 predicate modes and predicate registers. Explicitly restrict
21653 GPRs to modes of 16 bytes or smaller. Only allow FP registers
21654 to store a vector mode if it is recognized by
21655 aarch64_classify_vector_mode.
21656 (aarch64_regmode_natural_size): New function.
21657 (aarch64_hard_regno_caller_save_mode): Return the original mode
21659 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21660 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21661 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21662 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21664 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
21665 does not overlap dest if the function is frame-related. Handle
21667 (aarch64_split_add_offset): New function.
21668 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21669 them aarch64_add_offset.
21670 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21671 and update call to aarch64_sub_sp.
21672 (aarch64_add_cfa_expression): New function.
21673 (aarch64_expand_prologue): Pass extra temporary registers to the
21674 functions above. Handle the case in which we need to emit new
21675 DW_CFA_expressions for registers that were originally saved
21676 relative to the stack pointer, but now have to be expressed
21677 relative to the frame pointer.
21678 (aarch64_output_mi_thunk): Pass extra temporary registers to the
21680 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
21681 IP0 and IP1 values for SVE frames.
21682 (aarch64_expand_vec_series): New function.
21683 (aarch64_expand_sve_widened_duplicate): Likewise.
21684 (aarch64_expand_sve_const_vector): Likewise.
21685 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21686 Handle SVE constants. Use emit_move_insn to move a force_const_mem
21687 into the register, rather than emitting a SET directly.
21688 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21689 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21690 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21691 (offset_9bit_signed_scaled_p): New functions.
21692 (aarch64_replicate_bitmask_imm): New function.
21693 (aarch64_bitmask_imm): Use it.
21694 (aarch64_cannot_force_const_mem): Reject expressions involving
21695 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
21696 (aarch64_classify_index): Handle SVE indices, by requiring
21697 a plain register index with a scale that matches the element size.
21698 (aarch64_classify_address): Handle SVE addresses. Assert that
21699 the mode of the address is VOIDmode or an integer mode.
21700 Update call to aarch64_classify_symbol.
21701 (aarch64_classify_symbolic_expression): Update call to
21702 aarch64_classify_symbol.
21703 (aarch64_const_vec_all_in_range_p): New function.
21704 (aarch64_print_vector_float_operand): Likewise.
21705 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
21706 "vN" for FP registers with SVE modes. Handle (const ...) vectors
21707 and the FP immediates 1.0 and 0.5.
21708 (aarch64_print_address_internal): Handle SVE addresses.
21709 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21710 (aarch64_regno_regclass): Handle predicate registers.
21711 (aarch64_secondary_reload): Handle big-endian reloads of SVE
21713 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21714 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21715 (aarch64_convert_sve_vector_bits): New function.
21716 (aarch64_override_options): Use it to handle -msve-vector-bits=.
21717 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21718 rather than an rtx.
21719 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21720 Handle SVE vector and predicate modes. Accept VL-based constants
21721 that need only one temporary register, and VL offsets that require
21722 no temporary registers.
21723 (aarch64_conditional_register_usage): Mark the predicate registers
21724 as fixed if SVE isn't available.
21725 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21726 Return true for SVE vector and predicate modes.
21727 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21728 rather than an unsigned int. Handle SVE modes.
21729 (aarch64_preferred_simd_mode): Update call accordingly. Handle
21731 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21733 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21734 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21735 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21736 (aarch64_sve_float_mul_immediate_p): New functions.
21737 (aarch64_sve_valid_immediate): New function.
21738 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21739 Explicitly reject structure modes. Check for INDEX constants.
21740 Handle PTRUE and PFALSE constants.
21741 (aarch64_check_zero_based_sve_index_immediate): New function.
21742 (aarch64_simd_imm_zero_p): Delete.
21743 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21744 vector modes. Accept constants in the range of CNT[BHWD].
21745 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21746 ask for an Advanced SIMD mode.
21747 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21748 (aarch64_simd_vector_alignment): Handle SVE predicates.
21749 (aarch64_vectorize_preferred_vector_alignment): New function.
21750 (aarch64_simd_vector_alignment_reachable): Use it instead of
21752 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21753 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21755 (MAX_VECT_LEN): Delete.
21756 (expand_vec_perm_d): Add a vec_flags field.
21757 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21758 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21759 (aarch64_evpc_ext): Don't apply a big-endian lane correction
21761 (aarch64_evpc_rev): Rename to...
21762 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
21763 (aarch64_evpc_rev_global): New function.
21764 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21765 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21767 (aarch64_evpc_sve_tbl): New function.
21768 (aarch64_expand_vec_perm_const_1): Update after rename of
21769 aarch64_evpc_rev. Handle SVE permutes too, trying
21770 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21771 than aarch64_evpc_tbl.
21772 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21773 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21774 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21775 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21776 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21777 (aarch64_expand_sve_vcond): New functions.
21778 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21779 of aarch64_vector_mode_p.
21780 (aarch64_dwarf_poly_indeterminate_value): New function.
21781 (aarch64_compute_pressure_classes): Likewise.
21782 (aarch64_can_change_mode_class): Likewise.
21783 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21784 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21785 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21786 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21787 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21788 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21789 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21790 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21792 (Dn, Dl, Dr): Accept const as well as const_vector.
21793 (Dz): Likewise. Compare against CONST0_RTX.
21794 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21795 of "vector" where appropriate.
21796 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21797 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21798 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21799 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21800 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21801 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21802 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21803 (v_int_equiv): Extend to SVE modes.
21804 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21806 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21807 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21808 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21809 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21810 (SVE_COND_FP_CMP): New int iterators.
21811 (perm_hilo): Handle the new unpack unspecs.
21812 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21814 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21815 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21816 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21817 (aarch64_equality_operator, aarch64_constant_vector_operand)
21818 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21819 (aarch64_sve_nonimmediate_operand): Likewise.
21820 (aarch64_sve_general_operand): Likewise.
21821 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
21822 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
21823 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
21824 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
21825 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
21826 (aarch64_sve_float_arith_immediate): Likewise.
21827 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
21828 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
21829 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
21830 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
21831 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
21832 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
21833 (aarch64_sve_float_arith_operand): Likewise.
21834 (aarch64_sve_float_arith_with_sub_operand): Likewise.
21835 (aarch64_sve_float_mul_operand): Likewise.
21836 (aarch64_sve_vec_perm_operand): Likewise.
21837 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
21838 (aarch64_mov_operand): Accept const_poly_int and const_vector.
21839 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
21840 as well as const_vector.
21841 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
21842 in file. Use CONST0_RTX and CONSTM1_RTX.
21843 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
21844 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
21845 Use aarch64_simd_imm_zero.
21846 * config/aarch64/aarch64-sve.md: New file.
21847 * config/aarch64/aarch64.md: Include it.
21848 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21849 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21850 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21851 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21852 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21853 (sve): New attribute.
21854 (enabled): Disable instructions with the sve attribute unless
21856 (movqi, movhi): Pass CONST_POLY_INT operaneds through
21857 aarch64_expand_mov_immediate.
21858 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21859 CNT[BHSD] immediates.
21860 (movti): Split CONST_POLY_INT moves into two halves.
21861 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21862 Split additions that need a temporary here if the destination
21863 is the stack pointer.
21864 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21865 (*add<mode>3_poly_1): New instruction.
21866 (set_clobber_cc): New expander.
21868 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21870 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21871 parameter and use it instead of GET_MODE_SIZE (innermode). Use
21872 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21873 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21874 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
21875 Change innermode from fixed_mode_size to machine_mode.
21876 (simplify_subreg): Update call accordingly. Handle a constant-sized
21877 subreg of a variable-length CONST_VECTOR.
21879 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21880 Alan Hayward <alan.hayward@arm.com>
21881 David Sherwood <david.sherwood@arm.com>
21883 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21884 (add_offset_to_base): New function, split out from...
21885 (create_mem_ref): ...here. When handling a scale other than 1,
21886 check first whether the address is valid without the offset.
21887 Add it into the base if so, leaving the index and scale as-is.
21889 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21892 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21893 fold_for_warn before checking if arg2 is INTEGER_CST.
21895 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
21897 * config/rs6000/predicates.md (load_multiple_operation): Delete.
21898 (store_multiple_operation): Delete.
21899 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21900 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21901 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21902 guarded by TARGET_STRING.
21903 (rs6000_output_load_multiple): Delete.
21904 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21905 OPTION_MASK_STRING / TARGET_STRING handling.
21906 (print_operand) <'N', 'O'>: Add comment that these are unused now.
21907 (const rs6000_opt_masks) <"string">: Change mask to 0.
21908 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
21909 (MASK_STRING): Delete.
21910 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
21912 (load_multiple): Delete.
21919 (store_multiple): Delete.
21926 (movmemsi_8reg): Delete.
21927 (corresponding unnamed define_insn): Delete.
21928 (movmemsi_6reg): Delete.
21929 (corresponding unnamed define_insn): Delete.
21930 (movmemsi_4reg): Delete.
21931 (corresponding unnamed define_insn): Delete.
21932 (movmemsi_2reg): Delete.
21933 (corresponding unnamed define_insn): Delete.
21934 (movmemsi_1reg): Delete.
21935 (corresponding unnamed define_insn): Delete.
21936 * config/rs6000/rs6000.opt (mno-string): New.
21937 (mstring): Replace by deprecation warning stub.
21938 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
21940 2018-01-12 Jakub Jelinek <jakub@redhat.com>
21942 * regrename.c (regrename_do_replace): If replacing the same
21943 reg multiple times, try to reuse last created gen_raw_REG.
21946 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
21947 main to workaround a bug in GDB.
21949 2018-01-12 Tom de Vries <tom@codesourcery.com>
21952 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
21954 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
21956 PR rtl-optimization/80481
21957 * ira-color.c (get_cap_member): New function.
21958 (allocnos_conflict_by_live_ranges_p): Use it.
21959 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21960 (setup_slot_coalesced_allocno_live_ranges): Ditto.
21962 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
21965 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
21966 (*saddl_se_1): Ditto.
21967 (*ssubsi_1): Ditto.
21968 (*ssubl_se_1): Ditto.
21970 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21972 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
21973 rather than wi::to_widest for DR_INITs.
21974 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
21975 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
21976 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
21978 (vect_analyze_group_access_1): Note that here.
21980 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21982 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
21983 polynomial type sizes.
21985 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
21987 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
21988 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
21989 (gimple_add_tmp_var): Likewise.
21991 2018-01-12 Martin Liska <mliska@suse.cz>
21993 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
21994 (gimple_alloc_sizes): Likewise.
21995 (dump_gimple_statistics): Use PRIu64 in printf format.
21996 * gimple.h: Change uint64_t to int.
21998 2018-01-12 Martin Liska <mliska@suse.cz>
22000 * tree-core.h: Use uint64_t instead of int.
22001 * tree.c (tree_node_counts): Likewise.
22002 (tree_node_sizes): Likewise.
22003 (dump_tree_statistics): Use PRIu64 in printf format.
22005 2018-01-12 Martin Liska <mliska@suse.cz>
22007 * Makefile.in: As qsort_chk is implemented in vec.c, add
22008 vec.o to linkage of gencfn-macros.
22009 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22010 passing the info to record_node_allocation_statistics.
22011 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22013 * ggc-common.c (struct ggc_usage): Add operator== and use
22014 it in operator< and compare function.
22015 * mem-stats.h (struct mem_usage): Likewise.
22016 * vec.c (struct vec_usage): Remove operator< and compare
22017 function. Can be simply inherited.
22019 2018-01-12 Martin Jambor <mjambor@suse.cz>
22022 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22023 * tree-ssa-math-opts.c: Include domwalk.h.
22024 (convert_mult_to_fma_1): New function.
22025 (fma_transformation_info): New type.
22026 (fma_deferring_state): Likewise.
22027 (cancel_fma_deferring): New function.
22028 (result_of_phi): Likewise.
22029 (last_fma_candidate_feeds_initial_phi): Likewise.
22030 (convert_mult_to_fma): Added deferring logic, split actual
22031 transformation to convert_mult_to_fma_1.
22032 (math_opts_dom_walker): New type.
22033 (math_opts_dom_walker::after_dom_children): New method, body moved
22034 here from pass_optimize_widening_mul::execute, added deferring logic
22036 (pass_optimize_widening_mul::execute): Moved most of code to
22037 math_opts_dom_walker::after_dom_children.
22038 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22039 * config/i386/i386.c (ix86_option_override_internal): Added
22040 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22042 2018-01-12 Richard Biener <rguenther@suse.de>
22045 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22046 inline instance vars.
22048 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22051 * config/rx/rx.c (rx_is_restricted_memory_address):
22052 Handle SUBREG case.
22054 2018-01-12 Richard Biener <rguenther@suse.de>
22056 PR tree-optimization/80846
22057 * target.def (split_reduction): New target hook.
22058 * targhooks.c (default_split_reduction): New function.
22059 * targhooks.h (default_split_reduction): Declare.
22060 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22061 target requests first reduce vectors by combining low and high
22063 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22064 (get_vectype_for_scalar_type_and_size): Export.
22065 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22066 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22067 * doc/tm.texi: Regenerate.
22068 * config/i386/i386.c (ix86_split_reduction): Implement
22069 TARGET_VECTORIZE_SPLIT_REDUCTION.
22071 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22074 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22075 in PIC mode except for TARGET_VXWORKS_RTP.
22076 * config/sparc/sparc.c: Include cfgrtl.h.
22077 (TARGET_INIT_PIC_REG): Define.
22078 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22079 (sparc_pic_register_p): New predicate.
22080 (sparc_legitimate_address_p): Use it.
22081 (sparc_legitimize_pic_address): Likewise.
22082 (sparc_delegitimize_address): Likewise.
22083 (sparc_mode_dependent_address_p): Likewise.
22084 (gen_load_pcrel_sym): Remove 4th parameter.
22085 (load_got_register): Adjust call to above. Remove obsolete stuff.
22086 (sparc_expand_prologue): Do not call load_got_register here.
22087 (sparc_flat_expand_prologue): Likewise.
22088 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22089 (sparc_use_pseudo_pic_reg): New function.
22090 (sparc_init_pic_reg): Likewise.
22091 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22092 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22094 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22096 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22097 Add item for branch_cost.
22099 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22101 PR rtl-optimization/83565
22102 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22103 not extend the result to a larger mode for rotate operations.
22104 (num_sign_bit_copies1): Likewise.
22106 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22109 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22111 Use values-Xc.o for -pedantic.
22112 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22114 2018-01-12 Martin Liska <mliska@suse.cz>
22117 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22119 (possible_polymorphic_call_targets): Use it.
22120 (ipa_devirt): Likewise.
22122 2018-01-12 Martin Liska <mliska@suse.cz>
22124 * profile-count.h (enum profile_quality): Use 0 as invalid
22125 enum value of profile_quality.
22127 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22129 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22130 -mext-string options.
22132 2018-01-12 Richard Biener <rguenther@suse.de>
22134 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22135 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22136 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22138 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22140 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22142 * configure.ac (--with-long-double-format): Add support for the
22143 configuration option to change the default long double format on
22145 * config.gcc (powerpc*-linux*-*): Likewise.
22146 * configure: Regenerate.
22147 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22148 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22149 used without modification.
22151 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22153 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22154 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22155 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22156 MISC_BUILTIN_SPEC_BARRIER.
22157 (rs6000_init_builtins): Likewise.
22158 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22160 (speculation_barrier): New define_insn.
22161 * doc/extend.texi: Document __builtin_speculation_barrier.
22163 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22166 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22167 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22168 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22170 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22171 integral modes instead of "ss" and "sd".
22172 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22173 vectors with 32-bit and 64-bit elements.
22174 (vecdupssescalarmodesuffix): New mode attribute.
22175 (vec_dup<mode>): Use it.
22177 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22180 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22181 frame if argument is passed on stack.
22183 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22186 * ree.c (combine_reaching_defs): Optimize also
22187 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22188 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22190 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22192 PR middle-end/83189
22193 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22195 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22197 PR middle-end/83718
22198 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22199 after they are computed.
22201 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22203 PR tree-optimization/83695
22204 * gimple-loop-linterchange.cc
22205 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22206 reset cached scev information after interchange.
22207 (pass_linterchange::execute): Remove call to scev_reset_htab.
22209 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22211 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22212 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22213 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22214 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22215 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22216 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22217 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22218 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22219 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22220 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22221 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22222 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22223 (V_lane_reg): Likewise.
22224 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22226 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22227 (vfmal_lane_low<mode>_intrinsic,
22228 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22229 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22230 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22231 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22232 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22233 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22235 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22237 * config/arm/arm-cpus.in (fp16fml): New feature.
22238 (ALL_SIMD): Add fp16fml.
22239 (armv8.2-a): Add fp16fml as an option.
22240 (armv8.3-a): Likewise.
22241 (armv8.4-a): Add fp16fml as part of fp16.
22242 * config/arm/arm.h (TARGET_FP16FML): Define.
22243 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22245 * config/arm/arm-modes.def (V2HF): Define.
22246 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22247 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22248 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22249 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22250 vfmsl_low, vfmsl_high): New set of builtins.
22251 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22252 (vfml_op): New code attribute.
22253 (VFMLHALVES): New int iterator.
22254 (VFML, VFMLSEL): New mode attributes.
22255 (V_reg): Define mapping for V2HF.
22256 (V_hi, V_lo): New mode attributes.
22257 (VF_constraint): Likewise.
22258 (vfml_half, vfml_half_selector): New int attributes.
22259 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22261 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22262 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22264 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22265 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22266 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22267 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22269 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22270 Document new effective target and option set.
22272 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22274 * config/arm/arm-cpus.in (armv8_4): New feature.
22275 (ARMv8_4a): New fgroup.
22276 (armv8.4-a): New arch.
22277 * config/arm/arm-tables.opt: Regenerate.
22278 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22279 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22280 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22281 Add matching rules for -march=armv8.4-a and extensions.
22282 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22284 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22287 * config/rx/rx.md (BW): New mode attribute.
22288 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22290 2018-01-11 Richard Biener <rguenther@suse.de>
22292 PR tree-optimization/83435
22293 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22294 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22295 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22297 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22298 Alan Hayward <alan.hayward@arm.com>
22299 David Sherwood <david.sherwood@arm.com>
22301 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22303 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22304 (aarch64_print_address_internal): Use it to check for a zero offset.
22306 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22307 Alan Hayward <alan.hayward@arm.com>
22308 David Sherwood <david.sherwood@arm.com>
22310 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22311 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22312 Return a poly_int64 rather than a HOST_WIDE_INT.
22313 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22314 rather than a HOST_WIDE_INT.
22315 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22316 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22317 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22318 final_offset from HOST_WIDE_INT to poly_int64.
22319 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22320 to_constant when getting the number of units in an Advanced SIMD
22322 (aarch64_builtin_vectorized_function): Check for a constant number
22324 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22326 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22327 attribute instead of GET_MODE_NUNITS.
22328 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22329 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22330 GET_MODE_SIZE for fixed-size registers.
22331 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22332 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22333 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22334 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22335 (aarch64_print_operand, aarch64_print_address_internal)
22336 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22337 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22338 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22339 Handle polynomial GET_MODE_SIZE.
22340 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22341 wider than SImode without modification.
22342 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22343 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22344 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22345 passing and returning SVE modes.
22346 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22347 rather than GEN_INT.
22348 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22349 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22350 (aarch64_allocate_and_probe_stack_space): Likewise.
22351 (aarch64_layout_frame): Cope with polynomial offsets.
22352 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22353 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22354 polynomial offsets.
22355 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22356 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22357 poly_int64 rather than a HOST_WIDE_INT.
22358 (aarch64_get_separate_components, aarch64_process_components)
22359 (aarch64_expand_prologue, aarch64_expand_epilogue)
22360 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22361 (aarch64_anchor_offset): New function, split out from...
22362 (aarch64_legitimize_address): ...here.
22363 (aarch64_builtin_vectorization_cost): Handle polynomial
22364 TYPE_VECTOR_SUBPARTS.
22365 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22367 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22368 number of elements from the PARALLEL rather than the mode.
22369 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22370 rather than GET_MODE_BITSIZE.
22371 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22372 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22373 (aarch64_expand_vec_perm_const_1): Handle polynomial
22374 d->perm.length () and d->perm elements.
22375 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
22376 Apply to_constant to d->perm elements.
22377 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22378 polynomial CONST_VECTOR_NUNITS.
22379 (aarch64_move_pointer): Take amount as a poly_int64 rather
22381 (aarch64_progress_pointer): Avoid temporary variable.
22382 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22383 the mode attribute instead of GET_MODE.
22385 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22386 Alan Hayward <alan.hayward@arm.com>
22387 David Sherwood <david.sherwood@arm.com>
22389 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22390 x exists before using it.
22391 (aarch64_add_constant_internal): Rename to...
22392 (aarch64_add_offset_1): ...this. Replace regnum with separate
22393 src and dest rtxes. Handle the case in which they're different,
22394 including when the offset is zero. Replace scratchreg with an rtx.
22395 Use 2 additions if there is no spare register into which we can
22396 move a 16-bit constant.
22397 (aarch64_add_constant): Delete.
22398 (aarch64_add_offset): Replace reg with separate src and dest
22399 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
22400 Use aarch64_add_offset_1.
22401 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22402 an rtx rather than an int. Take the delta as a poly_int64
22403 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
22404 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22405 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22406 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22407 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22408 and aarch64_add_sp.
22409 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22410 aarch64_add_constant.
22412 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22414 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22415 Use scalar_float_mode.
22417 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22419 * config/aarch64/aarch64-simd.md
22420 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22421 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22422 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22423 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22424 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22425 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22426 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22427 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22428 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22429 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22431 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22434 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22435 targ_options->x_arm_arch_string is non NULL.
22437 2018-01-11 Tamar Christina <tamar.christina@arm.com>
22439 * config/aarch64/aarch64.h
22440 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
22442 2018-01-11 Sudakshina Das <sudi.das@arm.com>
22445 * expmed.c (emit_store_flag_force): Swap if const op0
22446 and change VOIDmode to mode of op0.
22448 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22450 PR rtl-optimization/83761
22451 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22452 than bytes to mode_for_size.
22454 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22456 PR middle-end/83189
22457 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22458 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22461 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22463 PR middle-end/83575
22464 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22465 when in layout mode.
22466 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22467 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22470 2018-01-10 Michael Collison <michael.collison@arm.com>
22472 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22473 * config/aarch64/aarch64-option-extension.def: Add
22474 AARCH64_OPT_EXTENSION of 'fp16fml'.
22475 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22476 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22477 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22478 * config/aarch64/constraints.md (Ui7): New constraint.
22479 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22480 (VFMLA_SEL_W): Ditto.
22483 (VFMLA16_LOW): New int iterator.
22484 (VFMLA16_HIGH): Ditto.
22485 (UNSPEC_FMLAL): New unspec.
22486 (UNSPEC_FMLSL): Ditto.
22487 (UNSPEC_FMLAL2): Ditto.
22488 (UNSPEC_FMLSL2): Ditto.
22489 (f16mac): New code attribute.
22490 * config/aarch64/aarch64-simd-builtins.def
22491 (aarch64_fmlal_lowv2sf): Ditto.
22492 (aarch64_fmlsl_lowv2sf): Ditto.
22493 (aarch64_fmlalq_lowv4sf): Ditto.
22494 (aarch64_fmlslq_lowv4sf): Ditto.
22495 (aarch64_fmlal_highv2sf): Ditto.
22496 (aarch64_fmlsl_highv2sf): Ditto.
22497 (aarch64_fmlalq_highv4sf): Ditto.
22498 (aarch64_fmlslq_highv4sf): Ditto.
22499 (aarch64_fmlal_lane_lowv2sf): Ditto.
22500 (aarch64_fmlsl_lane_lowv2sf): Ditto.
22501 (aarch64_fmlal_laneq_lowv2sf): Ditto.
22502 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22503 (aarch64_fmlalq_lane_lowv4sf): Ditto.
22504 (aarch64_fmlsl_lane_lowv4sf): Ditto.
22505 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22506 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22507 (aarch64_fmlal_lane_highv2sf): Ditto.
22508 (aarch64_fmlsl_lane_highv2sf): Ditto.
22509 (aarch64_fmlal_laneq_highv2sf): Ditto.
22510 (aarch64_fmlsl_laneq_highv2sf): Ditto.
22511 (aarch64_fmlalq_lane_highv4sf): Ditto.
22512 (aarch64_fmlsl_lane_highv4sf): Ditto.
22513 (aarch64_fmlalq_laneq_highv4sf): Ditto.
22514 (aarch64_fmlsl_laneq_highv4sf): Ditto.
22515 * config/aarch64/aarch64-simd.md:
22516 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22517 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22518 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22519 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22520 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22521 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22522 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22523 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22524 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22525 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22526 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22527 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22528 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22529 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22530 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22531 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22532 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22533 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22534 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22535 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22536 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22537 (vfmlsl_low_u32): Ditto.
22538 (vfmlalq_low_u32): Ditto.
22539 (vfmlslq_low_u32): Ditto.
22540 (vfmlal_high_u32): Ditto.
22541 (vfmlsl_high_u32): Ditto.
22542 (vfmlalq_high_u32): Ditto.
22543 (vfmlslq_high_u32): Ditto.
22544 (vfmlal_lane_low_u32): Ditto.
22545 (vfmlsl_lane_low_u32): Ditto.
22546 (vfmlal_laneq_low_u32): Ditto.
22547 (vfmlsl_laneq_low_u32): Ditto.
22548 (vfmlalq_lane_low_u32): Ditto.
22549 (vfmlslq_lane_low_u32): Ditto.
22550 (vfmlalq_laneq_low_u32): Ditto.
22551 (vfmlslq_laneq_low_u32): Ditto.
22552 (vfmlal_lane_high_u32): Ditto.
22553 (vfmlsl_lane_high_u32): Ditto.
22554 (vfmlal_laneq_high_u32): Ditto.
22555 (vfmlsl_laneq_high_u32): Ditto.
22556 (vfmlalq_lane_high_u32): Ditto.
22557 (vfmlslq_lane_high_u32): Ditto.
22558 (vfmlalq_laneq_high_u32): Ditto.
22559 (vfmlslq_laneq_high_u32): Ditto.
22560 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22561 (AARCH64_FL_FOR_ARCH8_4): New.
22562 (AARCH64_ISA_F16FML): New ISA flag.
22563 (TARGET_F16FML): New feature flag for fp16fml.
22564 (doc/invoke.texi): Document new fp16fml option.
22566 2018-01-10 Michael Collison <michael.collison@arm.com>
22568 * config/aarch64/aarch64-builtins.c:
22569 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22570 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22571 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22572 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22573 (AARCH64_ISA_SHA3): New ISA flag.
22574 (TARGET_SHA3): New feature flag for sha3.
22575 * config/aarch64/iterators.md (sha512_op): New int attribute.
22576 (CRYPTO_SHA512): New int iterator.
22577 (UNSPEC_SHA512H): New unspec.
22578 (UNSPEC_SHA512H2): Ditto.
22579 (UNSPEC_SHA512SU0): Ditto.
22580 (UNSPEC_SHA512SU1): Ditto.
22581 * config/aarch64/aarch64-simd-builtins.def
22582 (aarch64_crypto_sha512hqv2di): New builtin.
22583 (aarch64_crypto_sha512h2qv2di): Ditto.
22584 (aarch64_crypto_sha512su0qv2di): Ditto.
22585 (aarch64_crypto_sha512su1qv2di): Ditto.
22586 (aarch64_eor3qv8hi): Ditto.
22587 (aarch64_rax1qv2di): Ditto.
22588 (aarch64_xarqv2di): Ditto.
22589 (aarch64_bcaxqv8hi): Ditto.
22590 * config/aarch64/aarch64-simd.md:
22591 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22592 (aarch64_crypto_sha512su0qv2di): Ditto.
22593 (aarch64_crypto_sha512su1qv2di): Ditto.
22594 (aarch64_eor3qv8hi): Ditto.
22595 (aarch64_rax1qv2di): Ditto.
22596 (aarch64_xarqv2di): Ditto.
22597 (aarch64_bcaxqv8hi): Ditto.
22598 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22599 (vsha512h2q_u64): Ditto.
22600 (vsha512su0q_u64): Ditto.
22601 (vsha512su1q_u64): Ditto.
22602 (veor3q_u16): Ditto.
22603 (vrax1q_u64): Ditto.
22604 (vxarq_u64): Ditto.
22605 (vbcaxq_u16): Ditto.
22606 * config/arm/types.md (crypto_sha512): New type attribute.
22607 (crypto_sha3): Ditto.
22608 (doc/invoke.texi): Document new sha3 option.
22610 2018-01-10 Michael Collison <michael.collison@arm.com>
22612 * config/aarch64/aarch64-builtins.c:
22613 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22614 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22615 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22616 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22617 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22618 (AARCH64_ISA_SM4): New ISA flag.
22619 (TARGET_SM4): New feature flag for sm4.
22620 * config/aarch64/aarch64-simd-builtins.def
22621 (aarch64_sm3ss1qv4si): Ditto.
22622 (aarch64_sm3tt1aq4si): Ditto.
22623 (aarch64_sm3tt1bq4si): Ditto.
22624 (aarch64_sm3tt2aq4si): Ditto.
22625 (aarch64_sm3tt2bq4si): Ditto.
22626 (aarch64_sm3partw1qv4si): Ditto.
22627 (aarch64_sm3partw2qv4si): Ditto.
22628 (aarch64_sm4eqv4si): Ditto.
22629 (aarch64_sm4ekeyqv4si): Ditto.
22630 * config/aarch64/aarch64-simd.md:
22631 (aarch64_sm3ss1qv4si): Ditto.
22632 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22633 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22634 (aarch64_sm4eqv4si): Ditto.
22635 (aarch64_sm4ekeyqv4si): Ditto.
22636 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22637 (sm3part_op): Ditto.
22638 (CRYPTO_SM3TT): Ditto.
22639 (CRYPTO_SM3PART): Ditto.
22640 (UNSPEC_SM3SS1): New unspec.
22641 (UNSPEC_SM3TT1A): Ditto.
22642 (UNSPEC_SM3TT1B): Ditto.
22643 (UNSPEC_SM3TT2A): Ditto.
22644 (UNSPEC_SM3TT2B): Ditto.
22645 (UNSPEC_SM3PARTW1): Ditto.
22646 (UNSPEC_SM3PARTW2): Ditto.
22647 (UNSPEC_SM4E): Ditto.
22648 (UNSPEC_SM4EKEY): Ditto.
22649 * config/aarch64/constraints.md (Ui2): New constraint.
22650 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22651 * config/arm/types.md (crypto_sm3): New type attribute.
22652 (crypto_sm4): Ditto.
22653 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22654 (vsm3tt1aq_u32): Ditto.
22655 (vsm3tt1bq_u32): Ditto.
22656 (vsm3tt2aq_u32): Ditto.
22657 (vsm3tt2bq_u32): Ditto.
22658 (vsm3partw1q_u32): Ditto.
22659 (vsm3partw2q_u32): Ditto.
22660 (vsm4eq_u32): Ditto.
22661 (vsm4ekeyq_u32): Ditto.
22662 (doc/invoke.texi): Document new sm4 option.
22664 2018-01-10 Michael Collison <michael.collison@arm.com>
22666 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22667 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22668 (AARCH64_FL_FOR_ARCH8_4): New.
22669 (AARCH64_FL_V8_4): New flag.
22670 (doc/invoke.texi): Document new armv8.4-a option.
22672 2018-01-10 Michael Collison <michael.collison@arm.com>
22674 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22675 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22676 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22677 * config/aarch64/aarch64-option-extension.def: Add
22678 AARCH64_OPT_EXTENSION of 'sha2'.
22679 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22680 (crypto): Disable sha2 and aes if crypto disabled.
22681 (crypto): Enable aes and sha2 if enabled.
22682 (simd): Disable sha2 and aes if simd disabled.
22683 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22685 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22686 (TARGET_SHA2): New feature flag for sha2.
22687 (TARGET_AES): New feature flag for aes.
22688 * config/aarch64/aarch64-simd.md:
22689 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22690 conditional on TARGET_AES.
22691 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22692 (aarch64_crypto_sha1hsi): Make pattern conditional
22694 (aarch64_crypto_sha1hv4si): Ditto.
22695 (aarch64_be_crypto_sha1hv4si): Ditto.
22696 (aarch64_crypto_sha1su1v4si): Ditto.
22697 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22698 (aarch64_crypto_sha1su0v4si): Ditto.
22699 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22700 (aarch64_crypto_sha256su0v4si): Ditto.
22701 (aarch64_crypto_sha256su1v4si): Ditto.
22702 (doc/invoke.texi): Document new aes and sha2 options.
22704 2018-01-10 Martin Sebor <msebor@redhat.com>
22706 PR tree-optimization/83781
22707 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22710 2018-01-11 Martin Sebor <msebor@gmail.com>
22711 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22713 PR tree-optimization/83501
22714 PR tree-optimization/81703
22716 * tree-ssa-strlen.c (get_string_cst): Rename...
22717 (get_string_len): ...to this. Handle global constants.
22718 (handle_char_store): Adjust.
22720 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
22721 Jim Wilson <jimw@sifive.com>
22723 * config/riscv/riscv-protos.h (riscv_output_return): New.
22724 * config/riscv/riscv.c (struct machine_function): New naked_p field.
22725 (riscv_attribute_table, riscv_output_return),
22726 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22727 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22728 (riscv_compute_frame_info): Only compute frame->mask if not a naked
22730 (riscv_expand_prologue): Add early return for naked function.
22731 (riscv_expand_epilogue): Likewise.
22732 (riscv_function_ok_for_sibcall): Return false for naked function.
22733 (riscv_set_current_function): New.
22734 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22735 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22736 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22737 * doc/extend.texi (RISC-V Function Attributes): New.
22739 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
22741 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22742 check for 128-bit long double before checking TCmode.
22743 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22744 128-bit long doubles before checking TFmode or TCmode.
22745 (FLOAT128_IBM_P): Likewise.
22747 2018-01-10 Martin Sebor <msebor@redhat.com>
22749 PR tree-optimization/83671
22750 * builtins.c (c_strlen): Unconditionally return zero for the empty
22752 Use -Warray-bounds for warnings.
22753 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22754 for non-constant array indices with COMPONENT_REF, arrays of
22755 arrays, and pointers to arrays.
22756 (gimple_fold_builtin_strlen): Determine and set length range for
22757 non-constant character arrays.
22759 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
22761 PR middle-end/81897
22762 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22765 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
22767 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22769 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22772 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22773 VECTOR_MEM_ALTIVEC_OR_VSX_P.
22774 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22775 indexed_or_indirect_operand predicate.
22776 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22777 (*vsx_le_perm_load_v8hi): Likewise.
22778 (*vsx_le_perm_load_v16qi): Likewise.
22779 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22780 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22781 (*vsx_le_perm_store_v8hi): Likewise.
22782 (*vsx_le_perm_store_v16qi): Likewise.
22783 (eight unnamed splitters): Likewise.
22785 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
22787 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22788 * config/rs6000/emmintrin.h: Likewise.
22789 * config/rs6000/mmintrin.h: Likewise.
22790 * config/rs6000/xmmintrin.h: Likewise.
22792 2018-01-10 David Malcolm <dmalcolm@redhat.com>
22795 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22797 * tree.c (tree_nop_conversion): Return true for location wrapper
22799 (maybe_wrap_with_location): New function.
22800 (selftest::check_strip_nops): New function.
22801 (selftest::test_location_wrappers): New function.
22802 (selftest::tree_c_tests): Call it.
22803 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22804 (maybe_wrap_with_location): New decl.
22805 (EXPR_LOCATION_WRAPPER_P): New macro.
22806 (location_wrapper_p): New inline function.
22807 (tree_strip_any_location_wrapper): New inline function.
22809 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
22812 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22813 stack_realign_offset for the largest alignment of stack slot
22815 (ix86_find_max_used_stack_alignment): New function.
22816 (ix86_finalize_stack_frame_flags): Use it. Set
22817 max_used_stack_alignment if we don't realign stack.
22818 * config/i386/i386.h (machine_function): Add
22819 max_used_stack_alignment.
22821 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
22823 * config/arm/arm.opt (-mbranch-cost): New option.
22824 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
22827 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
22830 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
22831 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
22833 2018-01-10 Richard Biener <rguenther@suse.de>
22836 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
22837 early out so it also covers the case where we have a non-NULL
22840 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22842 PR tree-optimization/83753
22843 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
22844 for non-strided grouped accesses if the number of elements is 1.
22846 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
22849 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22850 * i386.h (TARGET_USE_GATHER): Define.
22851 * x86-tune.def (X86_TUNE_USE_GATHER): New.
22853 2018-01-10 Martin Liska <mliska@suse.cz>
22856 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22857 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22859 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22860 CLEANUP_NO_PARTITIONING is not set.
22862 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
22864 * doc/rtl.texi: Remove documentation of (const ...) wrappers
22865 for vectors, as a partial revert of r254296.
22866 * rtl.h (const_vec_p): Delete.
22867 (const_vec_duplicate_p): Don't test for vector CONSTs.
22868 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22869 * expmed.c (make_tree): Likewise.
22872 * common.md (E, F): Use CONSTANT_P instead of checking for
22874 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22875 checking for CONST_VECTOR.
22877 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22879 PR middle-end/83575
22880 * predict.c (force_edge_cold): Handle in more sane way edges
22881 with no prediction.
22883 2018-01-09 Carl Love <cel@us.ibm.com>
22885 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22887 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22888 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22889 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22890 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
22891 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22892 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
22893 * config/rs6000/rs6000-protos.h: Add extern defition for
22894 rs6000_generate_float2_double_code.
22895 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22897 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22898 (float2_v2df): Add define_expand.
22900 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
22903 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22904 op_mode in the force_to_mode call.
22906 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22908 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
22909 instead of checking each element individually.
22910 (aarch64_evpc_uzp): Likewise.
22911 (aarch64_evpc_zip): Likewise.
22912 (aarch64_evpc_ext): Likewise.
22913 (aarch64_evpc_rev): Likewise.
22914 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
22915 instead of checking each element individually. Return true without
22917 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
22918 whether all selected elements come from the same input, instead of
22919 checking each element individually. Remove calls to gen_rtx_REG,
22920 start_sequence and end_sequence and instead assert that no rtl is
22923 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22925 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
22926 order of HIGH and CONST checks.
22928 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
22930 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
22931 if the destination isn't an SSA_NAME.
22933 2018-01-09 Richard Biener <rguenther@suse.de>
22935 PR tree-optimization/83668
22936 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
22938 (canonicalize_loop_form): ... here, renamed from ...
22939 (canonicalize_loop_closed_ssa_form): ... this and amended to
22940 swap successor edges for loop exit blocks to make us use
22941 the RPO order we need for initial schedule generation.
22943 2018-01-09 Joseph Myers <joseph@codesourcery.com>
22945 PR tree-optimization/64811
22946 * match.pd: When optimizing comparisons with Inf, avoid
22947 introducing or losing exceptions from comparisons with NaN.
22949 2018-01-09 Martin Liska <mliska@suse.cz>
22952 * asan.c (shadow_mem_size): Add gcc_assert.
22954 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
22956 Don't save registers in main().
22959 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
22960 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
22961 * config/avr/avr.c (avr_set_current_function): Don't error if
22962 naked, OS_task or OS_main are specified at the same time.
22963 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
22965 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
22967 * common/config/avr/avr-common.c (avr_option_optimization_table):
22968 Switch on -mmain-is-OS_task for optimizing compilations.
22970 2018-01-09 Richard Biener <rguenther@suse.de>
22972 PR tree-optimization/83572
22973 * graphite.c: Include cfganal.h.
22974 (graphite_transform_loops): Connect infinite loops to exit
22975 and remove fake edges at the end.
22977 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22979 * ipa-inline.c (edge_badness): Revert accidental checkin.
22981 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
22984 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
22985 symbols; not inline clones.
22987 2018-01-09 Jakub Jelinek <jakub@redhat.com>
22990 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
22991 hard registers. Formatting fixes.
22993 PR preprocessor/83722
22994 * gcc.c (try_generate_repro): Pass
22995 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
22996 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22999 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23000 Kito Cheng <kito.cheng@gmail.com>
23002 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23003 (riscv_leaf_function_p): Delete.
23004 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23006 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23008 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23010 (do_ifelse): New function.
23011 (do_isel): New function.
23012 (do_sub3): New function.
23013 (do_add3): New function.
23014 (do_load_mask_compare): New function.
23015 (do_overlap_load_compare): New function.
23016 (expand_compare_loop): New function.
23017 (expand_block_compare): Call expand_compare_loop() when appropriate.
23018 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23019 option description.
23020 (-mblock-compare-inline-loop-limit): New option.
23022 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23025 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23026 Reverse order of second and third operands in first alternative.
23027 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23028 of first and second elements in UNSPEC_VPERMR vector.
23029 (altivec_expand_vec_perm_le): Likewise.
23031 2018-01-08 Jeff Law <law@redhat.com>
23033 PR rtl-optimizatin/81308
23034 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23035 (process_switch): If group_case_labels makes a change, then set
23037 (pass_convert_switch::execute): If a switch is converted, then
23038 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23040 PR rtl-optimization/81308
23041 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23044 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23046 PR target/83663 - Revert r255946
23047 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23048 generation for cases where splatting a value is not useful.
23049 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23050 across a vec_duplicate and a paradoxical subreg forming a vector
23051 mode to a vec_concat.
23053 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23055 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23056 -march=armv8.3-a variants.
23057 * config/arm/t-multilib: Likewise.
23058 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23060 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23062 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23064 (cceq_ior_compare_complement): Give it a name so I can use it, and
23065 change boolean_or_operator predicate to boolean_operator so it can
23066 be used to generate a crand.
23067 (eqne): New code iterator.
23068 (bd/bd_neg): New code_attrs.
23069 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23070 a single define_insn.
23071 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23072 decrement (bdnzt/bdnzf/bdzt/bdzf).
23073 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23074 with the new names of the branch decrement patterns, and added the
23075 names of the branch decrement conditional patterns.
23077 2018-01-08 Richard Biener <rguenther@suse.de>
23079 PR tree-optimization/83563
23080 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23083 2018-01-08 Richard Biener <rguenther@suse.de>
23085 PR middle-end/83713
23086 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23088 2018-01-08 Richard Biener <rguenther@suse.de>
23090 PR tree-optimization/83685
23091 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23092 references to abnormals.
23094 2018-01-08 Richard Biener <rguenther@suse.de>
23097 * dwarf2out.c (output_indirect_strings): Handle empty
23098 skeleton_debug_str_hash.
23099 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23101 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23103 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23104 (emit_store_direct): Likewise.
23105 (arc_trampoline_adjust_address): Likewise.
23106 (arc_asm_trampoline_template): New function.
23107 (arc_initialize_trampoline): Use asm_trampoline_template.
23108 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23109 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23110 * config/arc/arc.md (flush_icache): Delete pattern.
23112 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23114 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23115 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23118 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23121 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23122 by not USED_FOR_TARGET.
23123 (make_pass_resolve_sw_modes): Likewise.
23125 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23127 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23130 2018-01-08 Richard Biener <rguenther@suse.de>
23132 PR middle-end/83580
23133 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23135 2018-01-08 Richard Biener <rguenther@suse.de>
23137 PR middle-end/83517
23138 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23140 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23142 PR middle-end/81897
23143 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23144 basic blocks with a small number of successors.
23145 (convert_control_dep_chain_into_preds): Improve handling of
23147 (dump_predicates): Split apart into...
23148 (dump_pred_chain): ...here...
23149 (dump_pred_info): ...and here.
23150 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23151 (can_chain_union_be_invalidated_p): Improve check for invalidation
23153 (uninit_uses_cannot_happen): Avoid unnecessary if
23154 convert_control_dep_chain_into_preds yielded nothing.
23156 2018-01-06 Martin Sebor <msebor@redhat.com>
23158 PR tree-optimization/83640
23159 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23160 subtracting negative offset from size.
23161 (builtin_access::overlap): Adjust offset bounds of the access to fall
23162 within the size of the object if possible.
23164 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23166 PR rtl-optimization/83699
23167 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23168 extract_bit_field_as_subreg to cases in which the extracted
23169 value is also a vector.
23171 * lra-constraints.c (process_alt_operands): Test for the equivalence
23172 substitutions when detecting a possible reload cycle.
23174 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23177 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23178 by default if flag_selective_schedling{,2}. Formatting fixes.
23180 PR rtl-optimization/83682
23181 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23182 if it has non-VECTOR_MODE element mode.
23183 (vec_duplicate_p): Likewise.
23185 PR middle-end/83694
23186 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23187 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23189 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23192 * config/i386/i386-builtin.def
23193 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23194 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23195 Require also OPTION_MASK_ISA_AVX512F in addition to
23196 OPTION_MASK_ISA_GFNI.
23197 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23198 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23199 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23200 to OPTION_MASK_ISA_GFNI.
23201 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23202 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23203 OPTION_MASK_ISA_AVX512BW.
23204 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23205 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23206 addition to OPTION_MASK_ISA_GFNI.
23207 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23208 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23209 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23210 to OPTION_MASK_ISA_GFNI.
23211 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23212 a requirement for all ISAs rather than any of them with a few
23214 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23216 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23217 bitmasks to be enabled with 3 exceptions, instead of requiring any
23218 enabled ISA with lots of exceptions.
23219 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23220 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23221 Change avx512bw in isa attribute to avx512f.
23222 * config/i386/sgxintrin.h: Add license boilerplate.
23223 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23224 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23225 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23226 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23228 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23229 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23230 temporarily sse2 rather than sse if not enabled already.
23233 * config/i386/sse.md (VI248_VLBW): Rename to ...
23234 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23235 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23236 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23237 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23238 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23239 mode iterator instead of VI248_VLBW.
23241 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23243 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23244 (record_modified): Skip clobbers; add debug output.
23245 (param_change_prob): Use sreal frequencies.
23247 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23249 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23250 punt for user-aligned variables.
23252 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23254 * tree-chrec.c (chrec_contains_symbols): Return true for
23257 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23260 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23261 of (x|y) == x for BICS pattern.
23263 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23265 PR tree-optimization/83605
23266 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23267 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23270 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23272 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23273 * config/epiphany/rtems.h: New file.
23275 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23276 Uros Bizjak <ubizjak@gmail.com>
23279 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23280 QIreg_operand instead of register_operand predicate.
23281 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23282 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23283 comments instead of -fmitigate[-_]rop.
23285 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23288 * cgraphunit.c (symbol_table::compile): Switch to text_section
23289 before calling assembly_start debug hook.
23290 * run-rtl-passes.c (run_rtl_passes): Likewise.
23293 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23295 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23296 range_int_cst_p rather than !symbolic_range_p before calling
23297 extract_range_from_multiplicative_op_1.
23299 2018-01-04 Jeff Law <law@redhat.com>
23301 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23302 redundant test in assertion.
23304 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23306 * doc/rtl.texi: Document machine_mode wrapper classes.
23308 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23310 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23311 using tree_to_uhwi.
23313 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23315 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23316 the VEC_PERM_EXPR fold to fail.
23318 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23321 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23322 to switched_sections.
23324 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23327 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23328 test for d.testing.
23330 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23333 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23334 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23336 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23339 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23340 is BLKmode and bitpos not zero or mode change is needed.
23342 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23345 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23348 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23351 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23352 instead of MULT rtx. Update all corresponding splitters.
23353 (*saddl_se): Ditto.
23354 (*ssub<modesuffix>): Ditto.
23355 (*ssubl_se): Ditto.
23356 (*cmp_sadd_di): Update split patterns.
23357 (*cmp_sadd_si): Ditto.
23358 (*cmp_sadd_sidi): Ditto.
23359 (*cmp_ssub_di): Ditto.
23360 (*cmp_ssub_si): Ditto.
23361 (*cmp_ssub_sidi): Ditto.
23362 * config/alpha/predicates.md (const23_operand): New predicate.
23363 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23364 Look for ASHIFT, not MULT inner operand.
23365 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23367 2018-01-04 Martin Liska <mliska@suse.cz>
23369 PR gcov-profile/83669
23370 * gcov.c (output_intermediate_file): Add version to intermediate
23372 * doc/gcov.texi: Document new field 'version' in intermediate
23373 file format. Fix location of '-k' option of gcov command.
23375 2018-01-04 Martin Liska <mliska@suse.cz>
23378 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23380 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23382 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23384 2018-01-03 Martin Sebor <msebor@redhat.com>
23386 PR tree-optimization/83655
23387 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23388 checking calls with invalid arguments.
23390 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23392 * tree-vect-stmts.c (vect_get_store_rhs): New function.
23393 (vectorizable_mask_load_store): Delete.
23394 (vectorizable_call): Return false for masked loads and stores.
23395 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
23396 instead of gimple_assign_rhs1.
23397 (vectorizable_load): Handle IFN_MASK_LOAD.
23398 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23400 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23402 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23404 (vectorizable_mask_load_store): ...here.
23405 (vectorizable_load): ...and here.
23407 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23409 * tree-vect-stmts.c (vect_build_all_ones_mask)
23410 (vect_build_zero_merge_argument): New functions, split out from...
23411 (vectorizable_load): ...here.
23413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23415 * tree-vect-stmts.c (vect_check_store_rhs): New function,
23417 (vectorizable_mask_load_store): ...here.
23418 (vectorizable_store): ...and here.
23420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23422 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23424 (vectorizable_mask_load_store): ...here.
23426 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23428 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23429 (vect_model_store_cost): Take a vec_load_store_type instead of a
23431 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23432 (vect_model_store_cost): Take a vec_load_store_type instead of a
23434 (vectorizable_mask_load_store): Update accordingly.
23435 (vectorizable_store): Likewise.
23436 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23438 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23440 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23441 IFN_MASK_LOAD calls here rather than...
23442 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23444 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23445 Alan Hayward <alan.hayward@arm.com>
23446 David Sherwood <david.sherwood@arm.com>
23448 * expmed.c (extract_bit_field_1): For vector extracts,
23449 fall back to extract_bit_field_as_subreg if vec_extract
23452 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23453 Alan Hayward <alan.hayward@arm.com>
23454 David Sherwood <david.sherwood@arm.com>
23456 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23457 they are variable or constant sized.
23458 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23459 slots for constant-sized data.
23461 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23462 Alan Hayward <alan.hayward@arm.com>
23463 David Sherwood <david.sherwood@arm.com>
23465 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23466 handling COND_EXPRs with boolean comparisons, try to find a better
23467 basis for the mask type than the boolean itself.
23469 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23471 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23472 is calculated and how it can be overridden.
23473 * genmodes.c (max_bitsize_mode_any_mode): New variable.
23474 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23476 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23479 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23480 Alan Hayward <alan.hayward@arm.com>
23481 David Sherwood <david.sherwood@arm.com>
23483 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23484 Remove the mode argument.
23485 (aarch64_simd_valid_immediate): Remove the mode and inverse
23487 * config/aarch64/iterators.md (bitsize): New iterator.
23488 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23489 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23490 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23491 aarch64_simd_valid_immediate.
23492 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23493 (aarch64_reg_or_bic_imm): Likewise.
23494 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23495 with an insn_type enum and msl with a modifier_type enum.
23496 Replace element_width with a scalar_mode. Change the shift
23497 to unsigned int. Add constructors for scalar_float_mode and
23498 scalar_int_mode elements.
23499 (aarch64_vect_float_const_representable_p): Delete.
23500 (aarch64_can_const_movi_rtx_p)
23501 (aarch64_simd_scalar_immediate_valid_for_move)
23502 (aarch64_simd_make_constant): Update call to
23503 aarch64_simd_valid_immediate.
23504 (aarch64_advsimd_valid_immediate_hs): New function.
23505 (aarch64_advsimd_valid_immediate): Likewise.
23506 (aarch64_simd_valid_immediate): Remove mode and inverse
23507 arguments. Rewrite to use the above. Use const_vec_duplicate_p
23508 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23509 and aarch64_float_const_representable_p on the result.
23510 (aarch64_output_simd_mov_immediate): Remove mode argument.
23511 Update call to aarch64_simd_valid_immediate and use of
23512 simd_immediate_info.
23513 (aarch64_output_scalar_simd_mov_immediate): Update call
23516 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23517 Alan Hayward <alan.hayward@arm.com>
23518 David Sherwood <david.sherwood@arm.com>
23520 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23521 (mode_nunits): Likewise CONST_MODE_NUNITS.
23522 * machmode.def (ADJUST_NUNITS): Document.
23523 * genmodes.c (mode_data::need_nunits_adj): New field.
23524 (blank_mode): Update accordingly.
23525 (adj_nunits): New variable.
23526 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23528 (emit_mode_size_inline): Set need_bytesize_adj for all modes
23529 listed in adj_nunits.
23530 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23531 listed in adj_nunits. Don't emit case statements for such modes.
23532 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23533 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
23534 nothing if adj_nunits is nonnull.
23535 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23536 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23537 (emit_mode_fbit): Update use of print_maybe_const_decl.
23538 (emit_move_size): Likewise. Treat the array as non-const
23540 (emit_mode_adjustments): Handle adj_nunits.
23542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23544 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23545 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23546 (VECTOR_MODES): Use it.
23547 (make_vector_modes): Take the prefix as an argument.
23549 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23550 Alan Hayward <alan.hayward@arm.com>
23551 David Sherwood <david.sherwood@arm.com>
23553 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23554 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23555 for MODE_VECTOR_BOOL.
23556 * machmode.def (VECTOR_BOOL_MODE): Document.
23557 * genmodes.c (VECTOR_BOOL_MODE): New macro.
23558 (make_vector_bool_mode): New function.
23559 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23561 * lto-streamer-in.c (lto_input_mode_table): Likewise.
23562 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23564 * stor-layout.c (int_mode_for_mode): Likewise.
23565 * tree.c (build_vector_type_for_mode): Likewise.
23566 * varasm.c (output_constant_pool_2): Likewise.
23567 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23568 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
23569 for MODE_VECTOR_BOOL.
23570 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23571 of mode class checks.
23572 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23573 instead of a list of mode class checks.
23574 (expand_vector_scalar_condition): Likewise.
23575 (type_for_widest_vector_mode): Handle BImode as an inner mode.
23577 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23578 Alan Hayward <alan.hayward@arm.com>
23579 David Sherwood <david.sherwood@arm.com>
23581 * machmode.h (mode_size): Change from unsigned short to
23583 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23584 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23585 or if measurement_type is not polynomial.
23586 (fixed_size_mode::includes_p): Check for constant-sized modes.
23587 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23588 return a poly_uint16 rather than an unsigned short.
23589 (emit_mode_size): Change the type of mode_size from unsigned short
23590 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
23591 (emit_mode_adjustments): Cope with polynomial vector sizes.
23592 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23594 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23596 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23597 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23598 * caller-save.c (setup_save_areas): Likewise.
23599 (replace_reg_with_saved_mem): Likewise.
23600 * calls.c (emit_library_call_value_1): Likewise.
23601 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23602 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23603 (gen_lowpart_for_combine): Likewise.
23604 * convert.c (convert_to_integer_1): Likewise.
23605 * cse.c (equiv_constant, cse_insn): Likewise.
23606 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23607 (cselib_subst_to_values): Likewise.
23608 * dce.c (word_dce_process_block): Likewise.
23609 * df-problems.c (df_word_lr_mark_ref): Likewise.
23610 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23611 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23612 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23613 (rtl_for_decl_location): Likewise.
23614 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23615 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23616 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23617 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23618 (expand_expr_real_1): Likewise.
23619 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23620 (pad_below): Likewise.
23621 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23622 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23623 * ira.c (get_subreg_tracking_sizes): Likewise.
23624 * ira-build.c (ira_create_allocno_objects): Likewise.
23625 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23626 (ira_sort_regnos_for_alter_reg): Likewise.
23627 * ira-costs.c (record_operand_costs): Likewise.
23628 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23629 (resolve_simple_move): Likewise.
23630 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23631 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23632 (lra_constraints): Likewise.
23633 (CONST_POOL_OK_P): Reject variable-sized modes.
23634 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23635 (add_pseudo_to_slot, lra_spill): Likewise.
23636 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23637 * optabs-query.c (get_best_extraction_insn): Likewise.
23638 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23639 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23640 (expand_mult_highpart, valid_multiword_target_p): Likewise.
23641 * recog.c (offsettable_address_addr_space_p): Likewise.
23642 * regcprop.c (maybe_mode_change): Likewise.
23643 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23644 * regrename.c (build_def_use): Likewise.
23645 * regstat.c (dump_reg_info): Likewise.
23646 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23647 (find_reloads, find_reloads_subreg_address): Likewise.
23648 * reload1.c (eliminate_regs_1): Likewise.
23649 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23650 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23651 (simplify_binary_operation_1, simplify_subreg): Likewise.
23652 * targhooks.c (default_function_arg_padding): Likewise.
23653 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23654 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23655 (verify_gimple_assign_ternary): Likewise.
23656 * tree-inline.c (estimate_move_cost): Likewise.
23657 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23658 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23659 (get_address_cost_ainc): Likewise.
23660 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23661 (vect_supportable_dr_alignment): Likewise.
23662 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23663 (vectorizable_reduction): Likewise.
23664 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23665 (vectorizable_operation, vectorizable_load): Likewise.
23666 * tree.c (build_same_sized_truth_vector_type): Likewise.
23667 * valtrack.c (cleanup_auto_inc_dec): Likewise.
23668 * var-tracking.c (emit_note_insn_var_location): Likewise.
23669 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23670 (ADDR_VEC_ALIGN): Likewise.
23672 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23673 Alan Hayward <alan.hayward@arm.com>
23674 David Sherwood <david.sherwood@arm.com>
23676 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23678 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23679 or if measurement_type is polynomial.
23680 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23681 * combine.c (make_extraction): Likewise.
23682 * dse.c (find_shift_sequence): Likewise.
23683 * dwarf2out.c (mem_loc_descriptor): Likewise.
23684 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23685 (extract_bit_field, extract_low_bits): Likewise.
23686 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23687 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23688 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23689 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23690 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23691 * reload.c (find_reloads): Likewise.
23692 * reload1.c (alter_reg): Likewise.
23693 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23694 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23695 * tree-if-conv.c (predicate_mem_writes): Likewise.
23696 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23697 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23698 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23699 * valtrack.c (dead_debug_insert_temp): Likewise.
23700 * varasm.c (mergeable_constant_section): Likewise.
23701 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23703 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23704 Alan Hayward <alan.hayward@arm.com>
23705 David Sherwood <david.sherwood@arm.com>
23707 * expr.c (expand_assignment): Cope with polynomial mode sizes
23708 when assigning to a CONCAT.
23710 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23711 Alan Hayward <alan.hayward@arm.com>
23712 David Sherwood <david.sherwood@arm.com>
23714 * machmode.h (mode_precision): Change from unsigned short to
23716 (mode_to_precision): Return a poly_uint16 rather than an unsigned
23718 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23719 or if measurement_type is not polynomial.
23720 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
23721 in which the mode is already known to be a scalar_int_mode.
23722 * genmodes.c (emit_mode_precision): Change the type of mode_precision
23723 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
23725 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23726 for GET_MODE_PRECISION.
23727 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23728 for GET_MODE_PRECISION.
23729 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23731 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23732 (expand_field_assignment, make_extraction): Likewise.
23733 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23734 (get_last_value): Likewise.
23735 * convert.c (convert_to_integer_1): Likewise.
23736 * cse.c (cse_insn): Likewise.
23737 * expr.c (expand_expr_real_1): Likewise.
23738 * lra-constraints.c (simplify_operand_subreg): Likewise.
23739 * optabs-query.c (can_atomic_load_p): Likewise.
23740 * optabs.c (expand_atomic_load): Likewise.
23741 (expand_atomic_store): Likewise.
23742 * ree.c (combine_reaching_defs): Likewise.
23743 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23744 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23745 * tree.h (type_has_mode_precision_p): Likewise.
23746 * ubsan.c (instrument_si_overflow): Likewise.
23748 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23749 Alan Hayward <alan.hayward@arm.com>
23750 David Sherwood <david.sherwood@arm.com>
23752 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23753 polynomial numbers of units.
23754 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23755 (valid_vector_subparts_p): New function.
23756 (build_vector_type): Remove temporary shim and take the number
23757 of units as a poly_uint64 rather than an int.
23758 (build_opaque_vector_type): Take the number of units as a
23759 poly_uint64 rather than an int.
23760 * tree.c (build_vector_from_ctor): Handle polynomial
23761 TYPE_VECTOR_SUBPARTS.
23762 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23763 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23764 (build_vector_from_val): If the number of units is variable,
23765 use build_vec_duplicate_cst for constant operands and
23766 VEC_DUPLICATE_EXPR otherwise.
23767 (make_vector_type): Remove temporary is_constant ().
23768 (build_vector_type, build_opaque_vector_type): Take the number of
23769 units as a poly_uint64 rather than an int.
23770 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23772 * cfgexpand.c (expand_debug_expr): Likewise.
23773 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23774 (store_constructor, expand_expr_real_1): Likewise.
23775 (const_scalar_mask_from_tree): Likewise.
23776 * fold-const-call.c (fold_const_reduction): Likewise.
23777 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23778 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23779 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23780 (fold_relational_const): Likewise.
23781 (native_interpret_vector): Likewise. Change the size from an
23782 int to an unsigned int.
23783 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23784 TYPE_VECTOR_SUBPARTS.
23785 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23786 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23787 duplicating a non-constant operand into a variable-length vector.
23788 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23789 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23790 * ipa-icf.c (sem_variable::equals): Likewise.
23791 * match.pd: Likewise.
23792 * omp-simd-clone.c (simd_clone_subparts): Likewise.
23793 * print-tree.c (print_node): Likewise.
23794 * stor-layout.c (layout_type): Likewise.
23795 * targhooks.c (default_builtin_vectorization_cost): Likewise.
23796 * tree-cfg.c (verify_gimple_comparison): Likewise.
23797 (verify_gimple_assign_binary): Likewise.
23798 (verify_gimple_assign_ternary): Likewise.
23799 (verify_gimple_assign_single): Likewise.
23800 * tree-pretty-print.c (dump_generic_node): Likewise.
23801 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23802 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23803 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23804 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23805 (vect_shift_permute_load_chain): Likewise.
23806 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23807 (expand_vector_condition, optimize_vector_constructor): Likewise.
23808 (lower_vec_perm, get_compute_type): Likewise.
23809 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23810 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23811 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23812 (vect_recog_mask_conversion_pattern): Likewise.
23813 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23814 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23815 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23816 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23817 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23818 (vectorizable_shift, vectorizable_operation, vectorizable_store)
23819 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
23820 (supportable_widening_operation): Likewise.
23821 (supportable_narrowing_operation): Likewise.
23822 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
23824 * varasm.c (output_constant): Likewise.
23826 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23827 Alan Hayward <alan.hayward@arm.com>
23828 David Sherwood <david.sherwood@arm.com>
23830 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
23831 so that both the length == 3 and length != 3 cases set up their
23832 own permute vectors. Add comments explaining why we know the
23833 number of elements is constant.
23834 (vect_permute_load_chain): Likewise.
23836 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23837 Alan Hayward <alan.hayward@arm.com>
23838 David Sherwood <david.sherwood@arm.com>
23840 * machmode.h (mode_nunits): Change from unsigned char to
23842 (ONLY_FIXED_SIZE_MODES): New macro.
23843 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
23844 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
23845 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23847 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23848 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23849 or if measurement_type is not polynomial.
23850 * genmodes.c (ZERO_COEFFS): New macro.
23851 (emit_mode_nunits_inline): Make mode_nunits_inline return a
23853 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23854 Use ZERO_COEFFS when emitting initializers.
23855 * data-streamer.h (bp_pack_poly_value): New function.
23856 (bp_unpack_poly_value): Likewise.
23857 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23858 for GET_MODE_NUNITS.
23859 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23860 for GET_MODE_NUNITS.
23861 * tree.c (make_vector_type): Remove temporary shim and make
23862 the real function take the number of units as a poly_uint64
23863 rather than an int.
23864 (build_vector_type_for_mode): Handle polynomial nunits.
23865 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23866 * emit-rtl.c (const_vec_series_p_1): Likewise.
23867 (gen_rtx_CONST_VECTOR): Likewise.
23868 * fold-const.c (test_vec_duplicate_folding): Likewise.
23869 * genrecog.c (validate_pattern): Likewise.
23870 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23871 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23872 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23873 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23874 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23875 * rtlanal.c (subreg_get_info): Likewise.
23876 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23877 (vect_grouped_load_supported): Likewise.
23878 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23879 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23880 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23881 (simplify_const_unary_operation, simplify_binary_operation_1)
23882 (simplify_const_binary_operation, simplify_ternary_operation)
23883 (test_vector_ops_duplicate, test_vector_ops): Likewise.
23884 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23885 instead of CONST_VECTOR_NUNITS.
23886 * varasm.c (output_constant_pool_2): Likewise.
23887 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23888 explicit-encoded elements in the XVEC for variable-length vectors.
23890 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23892 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23894 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23895 Alan Hayward <alan.hayward@arm.com>
23896 David Sherwood <david.sherwood@arm.com>
23898 * coretypes.h (fixed_size_mode): Declare.
23899 (fixed_size_mode_pod): New typedef.
23900 * builtins.h (target_builtins::x_apply_args_mode)
23901 (target_builtins::x_apply_result_mode): Change type to
23902 fixed_size_mode_pod.
23903 * builtins.c (apply_args_size, apply_result_size, result_vector)
23904 (expand_builtin_apply_args_1, expand_builtin_apply)
23905 (expand_builtin_return): Update accordingly.
23907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23909 * cse.c (hash_rtx_cb): Hash only the encoded elements.
23910 * cselib.c (cselib_hash_rtx): Likewise.
23911 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
23912 CONST_VECTOR encoding.
23914 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23915 Jeff Law <law@redhat.com>
23918 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
23919 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
23920 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
23921 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
23924 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
23925 explicitly probe *sp in a noreturn function if there were any callee
23926 register saves or frame pointer is needed.
23928 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23931 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
23932 BLKmode for ternary, binary or unary expressions.
23935 * var-tracking.c (delete_vta_debug_insn): New inline function.
23936 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
23937 insns from get_insns () to NULL instead of each bb separately.
23938 Use delete_vta_debug_insn. No longer static.
23939 (vt_debug_insns_local, variable_tracking_main_1): Adjust
23940 delete_vta_debug_insns callers.
23941 * rtl.h (delete_vta_debug_insns): Declare.
23942 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
23943 instead of variable_tracking_main.
23945 2018-01-03 Martin Sebor <msebor@redhat.com>
23947 PR tree-optimization/83603
23948 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
23949 arguments past the endof the argument list in functions declared
23950 without a prototype.
23951 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
23952 Avoid checking when arguments are null.
23954 2018-01-03 Martin Sebor <msebor@redhat.com>
23957 * doc/extend.texi (attribute const): Fix a typo.
23958 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
23959 issuing -Wsuggest-attribute for void functions.
23961 2018-01-03 Martin Sebor <msebor@redhat.com>
23963 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
23964 offset_int::from instead of wide_int::to_shwi.
23965 (maybe_diag_overlap): Remove assertion.
23966 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
23967 * gimple-ssa-sprintf.c (format_directive): Same.
23968 (parse_directive): Same.
23969 (sprintf_dom_walker::compute_format_length): Same.
23970 (try_substitute_return_value): Same.
23972 2018-01-03 Jeff Law <law@redhat.com>
23974 PR middle-end/83654
23975 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
23976 non-constant residual for zero at runtime and avoid probing in
23977 that case. Reorganize code for trailing problem to mirror handling
23980 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23982 PR tree-optimization/83501
23983 * tree-ssa-strlen.c (get_string_cst): New.
23984 (handle_char_store): Call get_string_cst.
23986 2018-01-03 Martin Liska <mliska@suse.cz>
23988 PR tree-optimization/83593
23989 * tree-ssa-strlen.c: Include tree-cfg.h.
23990 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
23991 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
23992 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
23994 (strlen_dom_walker::before_dom_children): Call
23995 gimple_purge_dead_eh_edges. Dump tranformation with details
23997 (strlen_dom_walker::before_dom_children): Update call by adding
23998 new argument cleanup_eh.
23999 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24001 2018-01-03 Martin Liska <mliska@suse.cz>
24004 * cif-code.def (VARIADIC_THUNK): New enum value.
24005 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24008 2018-01-03 Jan Beulich <jbeulich@suse.com>
24010 * sse.md (mov<mode>_internal): Tighten condition for when to use
24011 vmovdqu<ssescalarsize> for TI and OI modes.
24013 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24015 Update copyright years.
24017 2018-01-03 Martin Liska <mliska@suse.cz>
24020 * ipa-visibility.c (function_and_variable_visibility): Skip
24021 functions with noipa attribure.
24023 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24025 * gcc.c (process_command): Update copyright notice dates.
24026 * gcov-dump.c (print_version): Ditto.
24027 * gcov.c (print_version): Ditto.
24028 * gcov-tool.c (print_version): Ditto.
24029 * gengtype.c (create_file): Ditto.
24030 * doc/cpp.texi: Bump @copying's copyright year.
24031 * doc/cppinternals.texi: Ditto.
24032 * doc/gcc.texi: Ditto.
24033 * doc/gccint.texi: Ditto.
24034 * doc/gcov.texi: Ditto.
24035 * doc/install.texi: Ditto.
24036 * doc/invoke.texi: Ditto.
24038 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24040 * vector-builder.h (vector_builder::m_full_nelts): Change from
24041 unsigned int to poly_uint64.
24042 (vector_builder::full_nelts): Update prototype accordingly.
24043 (vector_builder::new_vector): Likewise.
24044 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24045 (vector_builder::operator ==): Likewise.
24046 (vector_builder::finalize): Likewise.
24047 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24048 Take the number of elements as a poly_uint64 rather than an
24050 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24051 from unsigned int to poly_uint64.
24052 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24053 (vec_perm_indices::new_vector): Likewise.
24054 (vec_perm_indices::length): Likewise.
24055 (vec_perm_indices::nelts_per_input): Likewise.
24056 (vec_perm_indices::input_nelts): Likewise.
24057 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24058 number of elements per input as a poly_uint64 rather than an
24059 unsigned int. Use the original encoding for variable-length
24060 vectors, rather than clamping each individual element.
24061 For the second and subsequent elements in each pattern,
24062 clamp the step and base before clamping their sum.
24063 (vec_perm_indices::series_p): Handle polynomial element counts.
24064 (vec_perm_indices::all_in_range_p): Likewise.
24065 (vec_perm_indices_to_tree): Likewise.
24066 (vec_perm_indices_to_rtx): Likewise.
24067 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24068 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24069 (tree_vector_builder::new_binary_operation): Handle polynomial
24070 element counts. Return false if we need to know the number
24071 of elements at compile time.
24072 * fold-const.c (fold_vec_perm): Punt if the number of elements
24073 isn't known at compile time.
24075 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24077 * vec-perm-indices.h (vec_perm_builder): Change element type
24078 from HOST_WIDE_INT to poly_int64.
24079 (vec_perm_indices::element_type): Update accordingly.
24080 (vec_perm_indices::clamp): Handle polynomial element_types.
24081 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24082 (vec_perm_indices::all_in_range_p): Likewise.
24083 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24085 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24086 polynomial vec_perm_indices element types.
24087 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24088 * fold-const.c (fold_vec_perm): Likewise.
24089 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24090 * tree-vect-generic.c (lower_vec_perm): Likewise.
24091 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24092 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24093 element type to HOST_WIDE_INT.
24095 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24096 Alan Hayward <alan.hayward@arm.com>
24097 David Sherwood <david.sherwood@arm.com>
24099 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24100 rather than an int. Use plus_constant.
24101 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24102 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24104 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24105 Alan Hayward <alan.hayward@arm.com>
24106 David Sherwood <david.sherwood@arm.com>
24108 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24109 a HOST_WIDE_INT to a poly_int64.
24111 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24112 Alan Hayward <alan.hayward@arm.com>
24113 David Sherwood <david.sherwood@arm.com>
24115 * calls.c (load_register_parameters): Cope with polynomial
24116 mode sizes. Require a constant size for BLKmode parameters
24117 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24118 forces a parameter to be padded at the lsb end in order to
24119 fill a complete number of words, require the parameter size
24120 to be ordered wrt UNITS_PER_WORD.
24122 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24123 Alan Hayward <alan.hayward@arm.com>
24124 David Sherwood <david.sherwood@arm.com>
24126 * reload1.c (spill_stack_slot_width): Change element type
24127 from unsigned int to poly_uint64_pod.
24128 (alter_reg): Treat mode sizes as polynomial.
24130 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24131 Alan Hayward <alan.hayward@arm.com>
24132 David Sherwood <david.sherwood@arm.com>
24134 * reload.c (complex_word_subreg_p): New function.
24135 (reload_inner_reg_of_subreg, push_reload): Use it.
24137 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24138 Alan Hayward <alan.hayward@arm.com>
24139 David Sherwood <david.sherwood@arm.com>
24141 * lra-constraints.c (process_alt_operands): Reject matched
24142 operands whose sizes aren't ordered.
24143 (match_reload): Refer to this check here.
24145 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24146 Alan Hayward <alan.hayward@arm.com>
24147 David Sherwood <david.sherwood@arm.com>
24149 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24150 that the mode size is in the set {1, 2, 4, 8, 16}.
24152 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24153 Alan Hayward <alan.hayward@arm.com>
24154 David Sherwood <david.sherwood@arm.com>
24156 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24157 Use plus_constant instead of gen_rtx_PLUS.
24159 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24160 Alan Hayward <alan.hayward@arm.com>
24161 David Sherwood <david.sherwood@arm.com>
24163 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24164 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24165 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24166 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24167 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24168 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24169 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24170 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24171 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24172 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24174 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24175 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24176 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24177 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24178 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24179 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24180 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24181 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24182 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24183 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24185 * expr.c (emit_move_resolve_push): Treat the input and result
24186 of PUSH_ROUNDING as a poly_int64.
24187 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24188 (emit_push_insn): Likewise.
24189 * lra-eliminations.c (mark_not_eliminable): Likewise.
24190 * recog.c (push_operand): Likewise.
24191 * reload1.c (elimination_effects): Likewise.
24192 * rtlanal.c (nonzero_bits1): Likewise.
24193 * calls.c (store_one_arg): Likewise. Require the padding to be
24194 known at compile time.
24196 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24197 Alan Hayward <alan.hayward@arm.com>
24198 David Sherwood <david.sherwood@arm.com>
24200 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24201 Use plus_constant instead of gen_rtx_PLUS.
24203 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24204 Alan Hayward <alan.hayward@arm.com>
24205 David Sherwood <david.sherwood@arm.com>
24207 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24208 rather than an int.
24210 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24211 Alan Hayward <alan.hayward@arm.com>
24212 David Sherwood <david.sherwood@arm.com>
24214 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24215 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24216 via stack temporaries. Treat the mode size as polynomial too.
24218 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24219 Alan Hayward <alan.hayward@arm.com>
24220 David Sherwood <david.sherwood@arm.com>
24222 * expr.c (expand_expr_real_2): When handling conversions involving
24223 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24224 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24225 as a poly_uint64 too.
24227 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24228 Alan Hayward <alan.hayward@arm.com>
24229 David Sherwood <david.sherwood@arm.com>
24231 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24233 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24234 Alan Hayward <alan.hayward@arm.com>
24235 David Sherwood <david.sherwood@arm.com>
24237 * combine.c (can_change_dest_mode): Handle polynomial
24238 REGMODE_NATURAL_SIZE.
24239 * expmed.c (store_bit_field_1): Likewise.
24240 * expr.c (store_constructor): Likewise.
24241 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24242 and polynomial REGMODE_NATURAL_SIZE.
24243 (gen_lowpart_common): Likewise.
24244 * reginfo.c (record_subregs_of_mode): Likewise.
24245 * rtlanal.c (read_modify_subreg_p): Likewise.
24247 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24248 Alan Hayward <alan.hayward@arm.com>
24249 David Sherwood <david.sherwood@arm.com>
24251 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24252 numbers of elements.
24254 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24255 Alan Hayward <alan.hayward@arm.com>
24256 David Sherwood <david.sherwood@arm.com>
24258 * match.pd: Cope with polynomial numbers of vector elements.
24260 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24261 Alan Hayward <alan.hayward@arm.com>
24262 David Sherwood <david.sherwood@arm.com>
24264 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24265 in a POINTER_PLUS_EXPR.
24267 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24268 Alan Hayward <alan.hayward@arm.com>
24269 David Sherwood <david.sherwood@arm.com>
24271 * omp-simd-clone.c (simd_clone_subparts): New function.
24272 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24273 (ipa_simd_modify_function_body): Likewise.
24275 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24276 Alan Hayward <alan.hayward@arm.com>
24277 David Sherwood <david.sherwood@arm.com>
24279 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24280 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24281 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24282 (expand_vector_condition, vector_element): Likewise.
24283 (subparts_gt): New function.
24284 (get_compute_type): Use subparts_gt.
24285 (count_type_subparts): Delete.
24286 (expand_vector_operations_1): Use subparts_gt instead of
24287 count_type_subparts.
24289 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24290 Alan Hayward <alan.hayward@arm.com>
24291 David Sherwood <david.sherwood@arm.com>
24293 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24294 (vect_compile_time_alias): ...this new function. Do the calculation
24295 on poly_ints rather than trees.
24296 (vect_prune_runtime_alias_test_list): Update call accordingly.
24298 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24299 Alan Hayward <alan.hayward@arm.com>
24300 David Sherwood <david.sherwood@arm.com>
24302 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24304 (vect_schedule_slp_instance): Likewise.
24306 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24307 Alan Hayward <alan.hayward@arm.com>
24308 David Sherwood <david.sherwood@arm.com>
24310 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24311 constant and extern definitions for variable-length vectors.
24312 (vect_get_constant_vectors): Note that the number of units
24313 is known to be constant.
24315 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24316 Alan Hayward <alan.hayward@arm.com>
24317 David Sherwood <david.sherwood@arm.com>
24319 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24320 of units as polynomial. Choose between WIDE and NARROW based
24323 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24324 Alan Hayward <alan.hayward@arm.com>
24325 David Sherwood <david.sherwood@arm.com>
24327 * tree-vect-stmts.c (simd_clone_subparts): New function.
24328 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24330 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24331 Alan Hayward <alan.hayward@arm.com>
24332 David Sherwood <david.sherwood@arm.com>
24334 * tree-vect-stmts.c (vectorizable_call): Treat the number of
24335 vectors as polynomial. Use build_index_vector for
24336 IFN_GOMP_SIMD_LANE.
24338 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24339 Alan Hayward <alan.hayward@arm.com>
24340 David Sherwood <david.sherwood@arm.com>
24342 * tree-vect-stmts.c (get_load_store_type): Treat the number of
24343 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24344 for variable-length vectors.
24345 (vectorizable_mask_load_store): Treat the number of units as
24346 polynomial, asserting that it is constant if the condition has
24347 already been enforced.
24348 (vectorizable_store, vectorizable_load): Likewise.
24350 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24351 Alan Hayward <alan.hayward@arm.com>
24352 David Sherwood <david.sherwood@arm.com>
24354 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24355 of units as polynomial. Punt if we can't tell at compile time
24356 which vector contains the final result.
24358 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24359 Alan Hayward <alan.hayward@arm.com>
24360 David Sherwood <david.sherwood@arm.com>
24362 * tree-vect-loop.c (vectorizable_induction): Treat the number
24363 of units as polynomial. Punt on SLP inductions. Use an integer
24364 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24365 cast of such a series for variable-length floating-point
24368 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24369 Alan Hayward <alan.hayward@arm.com>
24370 David Sherwood <david.sherwood@arm.com>
24372 * tree.h (build_index_vector): Declare.
24373 * tree.c (build_index_vector): New function.
24374 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24375 of units as polynomial, forcibly converting it to a constant if
24376 vectorizable_reduction has already enforced the condition.
24377 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
24378 to create a {1,2,3,...} vector.
24379 (vectorizable_reduction): Treat the number of units as polynomial.
24380 Choose vectype_in based on the largest scalar element size rather
24381 than the smallest number of units. Enforce the restrictions
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-data-refs.c (vector_alignment_reachable_p): Treat the
24389 number of units as polynomial.
24391 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24392 Alan Hayward <alan.hayward@arm.com>
24393 David Sherwood <david.sherwood@arm.com>
24395 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24396 * target.def (autovectorize_vector_sizes): Return the vector sizes
24397 by pointer, using vector_sizes rather than a bitmask.
24398 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24399 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24400 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24402 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24403 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24404 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24405 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24406 * omp-general.c (omp_max_vf): Likewise.
24407 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24408 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24409 * tree-vect-loop.c (vect_analyze_loop): Likewise.
24410 * tree-vect-slp.c (vect_slp_bb): Likewise.
24411 * doc/tm.texi: Regenerate.
24412 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24414 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24415 the vector size as a poly_uint64 rather than an unsigned int.
24416 (current_vector_size): Change from an unsigned int to a poly_uint64.
24417 (get_vectype_for_scalar_type): Update accordingly.
24418 * tree.h (build_truth_vector_type): Take the size and number of
24419 units as a poly_uint64 rather than an unsigned int.
24420 (build_vector_type): Add a temporary overload that takes
24421 the number of units as a poly_uint64 rather than an unsigned int.
24422 * tree.c (make_vector_type): Likewise.
24423 (build_truth_vector_type): Take the number of units as a poly_uint64
24424 rather than an unsigned int.
24426 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24427 Alan Hayward <alan.hayward@arm.com>
24428 David Sherwood <david.sherwood@arm.com>
24430 * target.def (get_mask_mode): Take the number of units and length
24431 as poly_uint64s rather than unsigned ints.
24432 * targhooks.h (default_get_mask_mode): Update accordingly.
24433 * targhooks.c (default_get_mask_mode): Likewise.
24434 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24435 * doc/tm.texi: Regenerate.
24437 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24438 Alan Hayward <alan.hayward@arm.com>
24439 David Sherwood <david.sherwood@arm.com>
24441 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24442 * omp-general.c (omp_max_vf): Likewise.
24443 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24444 (expand_omp_simd): Handle polynomial safelen.
24445 * omp-low.c (omplow_simd_context): Add a default constructor.
24446 (omplow_simd_context::max_vf): Change from int to poly_uint64.
24447 (lower_rec_simd_input_clauses): Update accordingly.
24448 (lower_rec_input_clauses): Likewise.
24450 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24451 Alan Hayward <alan.hayward@arm.com>
24452 David Sherwood <david.sherwood@arm.com>
24454 * tree-vectorizer.h (vect_nunits_for_cost): New function.
24455 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24456 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24457 (vect_analyze_slp_cost): Likewise.
24458 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24459 (vect_model_load_cost): Likewise.
24461 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24462 Alan Hayward <alan.hayward@arm.com>
24463 David Sherwood <david.sherwood@arm.com>
24465 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24466 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24467 from an unsigned int * to a poly_uint64_pod *.
24468 (calculate_unrolling_factor): New function.
24469 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
24471 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24472 Alan Hayward <alan.hayward@arm.com>
24473 David Sherwood <david.sherwood@arm.com>
24475 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24476 from an unsigned int to a poly_uint64.
24477 (_loop_vec_info::slp_unrolling_factor): Likewise.
24478 (_loop_vec_info::vectorization_factor): Change from an int
24480 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24481 (vect_get_num_vectors): New function.
24482 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24483 (vect_get_num_copies): Use vect_get_num_vectors.
24484 (vect_analyze_data_ref_dependences): Change max_vf from an int *
24485 to an unsigned int *.
24486 (vect_analyze_data_refs): Change min_vf from an int * to a
24488 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24489 than an unsigned HOST_WIDE_INT.
24490 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24491 (vect_analyze_data_ref_dependence): Change max_vf from an int *
24492 to an unsigned int *.
24493 (vect_analyze_data_ref_dependences): Likewise.
24494 (vect_compute_data_ref_alignment): Handle polynomial vf.
24495 (vect_enhance_data_refs_alignment): Likewise.
24496 (vect_prune_runtime_alias_test_list): Likewise.
24497 (vect_shift_permute_load_chain): Likewise.
24498 (vect_supportable_dr_alignment): Likewise.
24499 (dependence_distance_ge_vf): Take the vectorization factor as a
24500 poly_uint64 rather than an unsigned HOST_WIDE_INT.
24501 (vect_analyze_data_refs): Change min_vf from an int * to a
24503 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24504 vfm1 as a poly_uint64 rather than an int. Make the same change
24505 for the returned bound_scalar.
24506 (vect_gen_vector_loop_niters): Handle polynomial vf.
24507 (vect_do_peeling): Likewise. Update call to
24508 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24509 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24511 * tree-vect-loop.c (vect_determine_vectorization_factor)
24512 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24513 (vect_get_known_peeling_cost): Likewise.
24514 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24515 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24516 (vect_transform_loop): Likewise. Use the lowest possible VF when
24517 updating the upper bounds of the loop.
24518 (vect_min_worthwhile_factor): Make static. Return an unsigned int
24519 rather than an int.
24520 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24521 polynomial unroll factors.
24522 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24523 (vect_make_slp_decision): Likewise.
24524 (vect_supported_load_permutation_p): Likewise, and polynomial
24526 (vect_analyze_slp_cost): Handle polynomial vf.
24527 (vect_slp_analyze_node_operations): Likewise.
24528 (vect_slp_analyze_bb_1): Likewise.
24529 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24530 than an unsigned HOST_WIDE_INT.
24531 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24532 (vectorizable_load): Handle polynomial vf.
24533 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24535 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24537 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24538 Alan Hayward <alan.hayward@arm.com>
24539 David Sherwood <david.sherwood@arm.com>
24541 * match.pd: Handle bit operations involving three constants
24542 and try to fold one pair.
24544 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24546 * tree-vect-loop-manip.c: Include gimple-fold.h.
24547 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24548 niters_maybe_zero parameters. Handle other cases besides a step of 1.
24549 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24550 Add a path that uses a step of VF instead of 1, but disable it
24552 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24553 and niters_no_overflow parameters. Update calls to
24554 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24555 Create a new SSA name if the latter choses to use a ste other
24556 than zero, and return it via niters_vector_mult_vf_var.
24557 * tree-vect-loop.c (vect_transform_loop): Update calls to
24558 vect_do_peeling, vect_gen_vector_loop_niters and
24559 slpeel_make_loop_iterate_ntimes.
24560 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24561 (vect_gen_vector_loop_niters): Update declarations after above changes.
24563 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
24565 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24566 128-bit round to integer instructions.
24567 (ceil<mode>2): Likewise.
24568 (btrunc<mode>2): Likewise.
24569 (round<mode>2): Likewise.
24571 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24573 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24574 unaligned VSX load/store on P8/P9.
24575 (expand_block_clear): Allow the use of unaligned VSX
24576 load/store on P8/P9.
24578 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24580 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24582 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24583 swap associated with both a load and a store.
24585 2018-01-02 Andrew Waterman <andrew@sifive.com>
24587 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24588 * config/riscv/riscv.md (clear_cache): Use it.
24590 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
24592 * web.c: Remove out-of-date comment.
24594 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24596 * expr.c (fixup_args_size_notes): Check that any existing
24597 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24598 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24599 (emit_single_push_insn): ...here.
24601 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24603 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24604 (const_vector_encoded_nelts): New function.
24605 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24606 (const_vector_int_elt, const_vector_elt): Declare.
24607 * emit-rtl.c (const_vector_int_elt_1): New function.
24608 (const_vector_elt): Likewise.
24609 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24610 of CONST_VECTOR_ELT.
24612 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24614 * expr.c: Include rtx-vector-builder.h.
24615 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24616 directly on the tree encoding.
24617 (const_vector_from_tree): Likewise.
24618 * optabs.c: Include rtx-vector-builder.h.
24619 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24620 sequence of "u" values.
24621 * vec-perm-indices.c: Include rtx-vector-builder.h.
24622 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24623 directly on the vec_perm_indices encoding.
24625 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24627 * doc/rtl.texi (const_vector): Describe new encoding scheme.
24628 * Makefile.in (OBJS): Add rtx-vector-builder.o.
24629 * rtx-vector-builder.h: New file.
24630 * rtx-vector-builder.c: Likewise.
24631 * rtl.h (rtx_def::u2): Add a const_vector field.
24632 (CONST_VECTOR_NPATTERNS): New macro.
24633 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24634 (CONST_VECTOR_DUPLICATE_P): Likewise.
24635 (CONST_VECTOR_STEPPED_P): Likewise.
24636 (CONST_VECTOR_ENCODED_ELT): Likewise.
24637 (const_vec_duplicate_p): Check for a duplicated vector encoding.
24638 (unwrap_const_vec_duplicate): Likewise.
24639 (const_vec_series_p): Check for a non-duplicated vector encoding.
24640 Say that the function only returns true for integer vectors.
24641 * emit-rtl.c: Include rtx-vector-builder.h.
24642 (gen_const_vec_duplicate_1): Delete.
24643 (gen_const_vector): Call gen_const_vec_duplicate instead of
24644 gen_const_vec_duplicate_1.
24645 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24646 (gen_const_vec_duplicate): Use rtx_vector_builder.
24647 (gen_const_vec_series): Likewise.
24648 (gen_rtx_CONST_VECTOR): Likewise.
24649 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24650 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24651 Build a new vector rather than modifying a CONST_VECTOR in-place.
24652 (handle_special_swappables): Update call accordingly.
24653 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24654 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24655 Build a new vector rather than modifying a CONST_VECTOR in-place.
24656 (handle_special_swappables): Update call accordingly.
24658 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24660 * simplify-rtx.c (simplify_const_binary_operation): Use
24661 CONST_VECTOR_ELT instead of XVECEXP.
24663 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24665 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24666 the selector elements to be different from the data elements
24667 if the selector is a VECTOR_CST.
24668 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24669 ssizetype for the selector.
24671 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24673 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24674 before testing each element individually.
24675 * tree-vect-generic.c (lower_vec_perm): Likewise.
24677 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24679 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24680 * selftest-run-tests.c (selftest::run_tests): Call it.
24681 * vector-builder.h (vector_builder::operator ==): New function.
24682 (vector_builder::operator !=): Likewise.
24683 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24684 (vec_perm_indices::all_from_input_p): New function.
24685 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24686 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24687 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24688 instead of reading the VECTOR_CST directly. Detect whether both
24689 vector inputs are the same before constructing the vec_perm_indices,
24690 and update the number of inputs argument accordingly. Use the
24691 utility functions added above. Only construct sel2 if we need to.
24693 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24695 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24696 the broadcast of the low byte.
24697 (expand_mult_highpart): Use an explicit encoding for the permutes.
24698 * optabs-query.c (can_mult_highpart_p): Likewise.
24699 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24700 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24701 (vectorizable_bswap): Likewise.
24702 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24703 explicit encoding for the power-of-2 permutes.
24704 (vect_permute_store_chain): Likewise.
24705 (vect_grouped_load_supported): Likewise.
24706 (vect_permute_load_chain): Likewise.
24708 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24710 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24711 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24712 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24713 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24714 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24715 (vect_gen_perm_mask_any): Likewise.
24717 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24719 * int-vector-builder.h: New file.
24720 * vec-perm-indices.h: Include int-vector-builder.h.
24721 (vec_perm_indices): Redefine as an int_vector_builder.
24722 (auto_vec_perm_indices): Delete.
24723 (vec_perm_builder): Redefine as a stand-alone class.
24724 (vec_perm_indices::vec_perm_indices): New function.
24725 (vec_perm_indices::clamp): Likewise.
24726 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24727 (vec_perm_indices::new_vector): New function.
24728 (vec_perm_indices::new_expanded_vector): Update for new
24729 vec_perm_indices class.
24730 (vec_perm_indices::rotate_inputs): New function.
24731 (vec_perm_indices::all_in_range_p): Operate directly on the
24732 encoded form, without computing elided elements.
24733 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24734 encoding. Update for new vec_perm_indices class.
24735 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24736 the given vec_perm_builder.
24737 (expand_vec_perm_var): Update vec_perm_builder constructor.
24738 (expand_mult_highpart): Use vec_perm_builder instead of
24739 auto_vec_perm_indices.
24740 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24741 vec_perm_indices instead of auto_vec_perm_indices. Use a single
24742 or double series encoding as appropriate.
24743 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24744 vec_perm_indices instead of auto_vec_perm_indices.
24745 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24746 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24747 (vect_permute_store_chain): Likewise.
24748 (vect_grouped_load_supported): Likewise.
24749 (vect_permute_load_chain): Likewise.
24750 (vect_shift_permute_load_chain): Likewise.
24751 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24752 (vect_transform_slp_perm_load): Likewise.
24753 (vect_schedule_slp_instance): Likewise.
24754 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24755 (vectorizable_mask_load_store): Likewise.
24756 (vectorizable_bswap): Likewise.
24757 (vectorizable_store): Likewise.
24758 (vectorizable_load): Likewise.
24759 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24760 vec_perm_indices instead of auto_vec_perm_indices. Use
24761 tree_to_vec_perm_builder to read the vector from a tree.
24762 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24763 vec_perm_builder instead of a vec_perm_indices.
24764 (have_whole_vector_shift): Use vec_perm_builder and
24765 vec_perm_indices instead of auto_vec_perm_indices. Leave the
24766 truncation to calc_vec_perm_mask_for_shift.
24767 (vect_create_epilog_for_reduction): Likewise.
24768 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24769 from auto_vec_perm_indices to vec_perm_indices.
24770 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24771 instead of changing individual elements.
24772 (aarch64_vectorize_vec_perm_const): Use new_vector to install
24773 the vector in d.perm.
24774 * config/arm/arm.c (expand_vec_perm_d::perm): Change
24775 from auto_vec_perm_indices to vec_perm_indices.
24776 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24777 instead of changing individual elements.
24778 (arm_vectorize_vec_perm_const): Use new_vector to install
24779 the vector in d.perm.
24780 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24781 Update vec_perm_builder constructor.
24782 (rs6000_expand_interleave): Likewise.
24783 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24784 (rs6000_expand_interleave): Likewise.
24786 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24788 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24789 to qimode could truncate the indices.
24790 * optabs.c (expand_vec_perm_var): Likewise.
24792 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24794 * Makefile.in (OBJS): Add vec-perm-indices.o.
24795 * vec-perm-indices.h: New file.
24796 * vec-perm-indices.c: Likewise.
24797 * target.h (vec_perm_indices): Replace with a forward class
24799 (auto_vec_perm_indices): Move to vec-perm-indices.h.
24800 * optabs.h: Include vec-perm-indices.h.
24801 (expand_vec_perm): Delete.
24802 (selector_fits_mode_p, expand_vec_perm_var): Declare.
24803 (expand_vec_perm_const): Declare.
24804 * target.def (vec_perm_const_ok): Replace with...
24805 (vec_perm_const): ...this new hook.
24806 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24807 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24808 * doc/tm.texi: Regenerate.
24809 * optabs.def (vec_perm_const): Delete.
24810 * doc/md.texi (vec_perm_const): Likewise.
24811 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24812 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24813 expand_vec_perm for constant permutation vectors. Assert that
24814 the mode of variable permutation vectors is the integer equivalent
24815 of the mode that is being permuted.
24816 * optabs-query.h (selector_fits_mode_p): Declare.
24817 * optabs-query.c: Include vec-perm-indices.h.
24818 (selector_fits_mode_p): New function.
24819 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
24820 is defined, instead of checking whether the vec_perm_const_optab
24821 exists. Use targetm.vectorize.vec_perm_const instead of
24822 targetm.vectorize.vec_perm_const_ok. Check whether the indices
24823 fit in the vector mode before using a variable permute.
24824 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
24825 vec_perm_indices instead of an rtx.
24826 (expand_vec_perm): Replace with...
24827 (expand_vec_perm_const): ...this new function. Take the selector
24828 as a vec_perm_indices rather than an rtx. Also take the mode of
24829 the selector. Update call to shift_amt_for_vec_perm_mask.
24830 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
24831 Use vec_perm_indices::new_expanded_vector to expand the original
24832 selector into bytes. Check whether the indices fit in the vector
24833 mode before using a variable permute.
24834 (expand_vec_perm_var): Make global.
24835 (expand_mult_highpart): Use expand_vec_perm_const.
24836 * fold-const.c: Includes vec-perm-indices.h.
24837 * tree-ssa-forwprop.c: Likewise.
24838 * tree-vect-data-refs.c: Likewise.
24839 * tree-vect-generic.c: Likewise.
24840 * tree-vect-loop.c: Likewise.
24841 * tree-vect-slp.c: Likewise.
24842 * tree-vect-stmts.c: Likewise.
24843 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
24845 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
24846 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24847 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24848 (aarch64_vectorize_vec_perm_const): ...this new function.
24849 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24850 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24851 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24852 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24853 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24854 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24855 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24857 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
24858 check for NEON modes.
24859 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24860 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24861 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24862 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24864 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
24865 the old VEC_PERM_CONST conditions.
24866 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24867 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24868 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24869 (ia64_vectorize_vec_perm_const_ok): Merge into...
24870 (ia64_vectorize_vec_perm_const): ...this new function.
24871 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24872 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24873 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24874 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24875 * config/mips/mips.c (mips_expand_vec_perm_const)
24876 (mips_vectorize_vec_perm_const_ok): Merge into...
24877 (mips_vectorize_vec_perm_const): ...this new function.
24878 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24879 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24880 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24881 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24882 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24883 (rs6000_expand_vec_perm_const): Delete.
24884 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24886 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24887 (altivec_expand_vec_perm_const_le): Take each operand individually.
24888 Operate on constant selectors rather than rtxes.
24889 (altivec_expand_vec_perm_const): Likewise. Update call to
24890 altivec_expand_vec_perm_const_le.
24891 (rs6000_expand_vec_perm_const): Delete.
24892 (rs6000_vectorize_vec_perm_const_ok): Delete.
24893 (rs6000_vectorize_vec_perm_const): New function.
24894 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24895 an element count and rtx array.
24896 (rs6000_expand_extract_even): Update call accordingly.
24897 (rs6000_expand_interleave): Likewise.
24898 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24899 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24900 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24901 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24902 (rs6000_expand_vec_perm_const): Delete.
24903 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24904 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24905 (altivec_expand_vec_perm_const_le): Take each operand individually.
24906 Operate on constant selectors rather than rtxes.
24907 (altivec_expand_vec_perm_const): Likewise. Update call to
24908 altivec_expand_vec_perm_const_le.
24909 (rs6000_expand_vec_perm_const): Delete.
24910 (rs6000_vectorize_vec_perm_const_ok): Delete.
24911 (rs6000_vectorize_vec_perm_const): New function. Remove stray
24912 reference to the SPE evmerge intructions.
24913 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24914 an element count and rtx array.
24915 (rs6000_expand_extract_even): Update call accordingly.
24916 (rs6000_expand_interleave): Likewise.
24917 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
24918 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
24920 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24922 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24924 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
24925 vector mode and that that mode matches the mode of the data
24927 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
24928 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
24929 directly using expand_vec_perm_1 when forcing selectors into
24931 (expand_vec_perm_var): New function, split out from expand_vec_perm.
24933 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24935 * optabs-query.h (can_vec_perm_p): Delete.
24936 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
24937 * optabs-query.c (can_vec_perm_p): Split into...
24938 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
24939 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
24940 particular selector is valid.
24941 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24942 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24943 (vect_grouped_load_supported): Likewise.
24944 (vect_shift_permute_load_chain): Likewise.
24945 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24946 (vect_transform_slp_perm_load): Likewise.
24947 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24948 (vectorizable_bswap): Likewise.
24949 (vect_gen_perm_mask_checked): Likewise.
24950 * fold-const.c (fold_ternary_loc): Likewise. Don't take
24951 implementations of variable permutation vectors into account
24952 when deciding which selector to use.
24953 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
24954 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
24955 with a false third argument.
24956 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
24957 to test whether the constant selector is valid and can_vec_perm_var_p
24958 to test whether a variable selector is valid.
24960 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24962 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
24963 * optabs-query.c (can_vec_perm_p): Likewise.
24964 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
24965 instead of vec_perm_indices.
24966 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
24967 (vect_gen_perm_mask_checked): Likewise,
24968 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
24969 (vect_gen_perm_mask_checked): Likewise,
24971 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
24973 * optabs-query.h (qimode_for_vec_perm): Declare.
24974 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
24975 (qimode_for_vec_perm): ...this new function.
24976 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
24978 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24980 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
24981 does not have a conditional at the top.
24983 2018-01-02 Richard Biener <rguenther@suse.de>
24985 * ipa-inline.c (big_speedup_p): Fix expression.
24987 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24990 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
24993 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24997 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24998 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24999 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25000 cond_taken_branch_cost 3->4.
25002 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25004 PR tree-optimization/83581
25005 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25006 TODO_cleanup_cfg if any changes have been made.
25008 PR middle-end/83608
25009 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25010 convert_modes if target mode has the right side, but different mode
25013 PR middle-end/83609
25014 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25015 last argument when extracting from CONCAT. If either from_real or
25016 from_imag is NULL, use expansion through memory. If result is not
25017 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25018 the parts directly to inner mode, if even that fails, use expansion
25021 PR middle-end/83623
25022 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25023 check for bswap in mode rather than HImode and use that in expand_unop
25026 Copyright (C) 2018 Free Software Foundation, Inc.
25028 Copying and distribution of this file, with or without modification,
25029 are permitted in any medium without royalty provided the copyright
25030 notice and this notice are preserved.