Typo fix
[official-gcc.git] / gcc / ChangeLog
blobe4aa6849f5dfd1aa26a51a7e84ab2b24801e75be
1 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3         * genemit.c (print_overload_test): Fix typo.
5 2018-08-02  Richard Biener  <rguenther@suse.de>
7         PR c++/86763
8         * class.c (layout_class_type): Copy TYPE_TYPELESS_STORAGE
9         to the CLASSTYPE_AS_BASE.
11 2018-08-02  Richard Biener  <rguenther@suse.de>
13         PR tree-optimization/86816
14         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
15         which checks for value availability before querying it.
16         (gvn_uses_equal): Use it.
17         (same_succ_hash): Likewise.
18         (gimple_equal_p): Likewise.
20 2018-08-02  Nick Clifton  <nickc@redhat.com>
22         PR target/86797
23         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
24         Define to speculation_safe_value_not_needed.
26         PR target/86791
27         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
28         Define to speculation_safe_value_not_needed.
30         PR target/86789
31         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
32         Define to speculation_safe_value_not_needed.
34         PR target/86787
35         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
36         Define to speculation_safe_value_not_needed.
38         PR target/86782
39         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
40         speculation_safe_value_not_needed.
42         PR target/86781
43         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
44         to speculation_safe_value_not_needed.
46 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
48         * doc/md.texi: Expand the documentation of instruction names
49         to mention port-local uses.  Document '@' in pattern names.
50         * read-md.h (overloaded_instance, overloaded_name): New structs.
51         (mapping): Declare.
52         (md_reader::handle_overloaded_name): New member function.
53         (md_reader::get_overloads): Likewise.
54         (md_reader::m_first_overload): New member variable.
55         (md_reader::m_next_overload_ptr): Likewise.
56         (md_reader::m_overloads_htab): Likewise.
57         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
58         m_next_overload_ptr and m_overloads_htab.
59         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
60         (get_mode_token, get_code_token, get_int_token): New functions.
61         (map_attr_string): Add an optional argument that passes back
62         the associated iterator.
63         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
64         (md_reader::handle_overloaded_name, add_overload_instance): New
65         functions.
66         (apply_iterators): Handle '@' names.  Report an error if '@'
67         is used without iterators.
68         (initialize_iterators): Initialize the new iterator_group fields.
69         * genopinit.c (handle_overloaded_code_for)
70         (handle_overloaded_gen): New functions.
71         (main): Use them to print declarations of maybe_code_for_* and
72         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
73         * genemit.c (print_overload_arguments, print_overload_test)
74         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
75         (main): Use it to print definitions of maybe_code_for_* and
76         maybe_gen_* functions.
77         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
78         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
79         instead of explicit mode checks.
80         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
81         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
82         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
83         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
84         (aarch64_expand_compare_and_swap): Likewise
85         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
86         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
87         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
88         (aarch64_constant_pool_reload_icode): Delete.
89         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
90         instead of aarch64_constant_pool_reload_icode.  Use
91         code_for_aarch64_reload_mov instead of explicit mode checks.
92         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
93         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
94         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
95         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
96         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
97         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
98         (aarch64_atomic_load_op_code): Delete.
99         (aarch64_emit_atomic_load_op): Likewise.
100         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
101         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
102         instead of aarch64_emit_atomic_load_op.
103         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
104         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
105         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
106         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
107         character before the pattern name.
108         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
109         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
110         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
111         (aarch64_frecps<mode>): Likewise.
112         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
113         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
114         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
115         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
116         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
118 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
120         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
121         Allow HFmode constants if TARGET_FP_F16INST.
123 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
125         PR target/86014
126         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
127         No longer check last store for clobber of address register.
129 2018-08-02  Martin Liska  <mliska@suse.cz>
131         PR gcov-profile/86817
132         * gcov.c (process_all_functions): New function.
133         (main): Call it.
134         (process_file): Move functions processing to
135         process_all_functions.
137 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
139         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
140         "const" to the "gimple *" and "rtx_insn *" parameters.
141         * dumpfile.h (dump_user_location_t::dump_user_location_t):
142         Likewise.
143         (dump_location_t::dump_location_t): Likewise.
145 2018-08-01  Martin Sebor  <msebor@redhat.com>
147         PR tree-optimization/86650
148         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
149         rather than a "gcall *".  Directly pass the data of interest
150         to percent_K_format, rather than building a temporary CALL_EXPR
151         to hold it.
152         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
153         (gimple_fold_builtin_strncat): Adjust.
154         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
155         gcall* argument with gimple*.
156         * gimple-ssa-warn-restrict.c (check_call): Same.
157         (wrestrict_dom_walker::before_dom_children): Same.
158         (builtin_access::builtin_access): Same.
159         (check_bounds_or_overlap): Same
160         (maybe_diag_overlap): Same.
161         (maybe_diag_offset_bounds): Same.
162         * tree-diagnostic.c (default_tree_printer): Move usage of
163         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
164         to this callsite.
165         * tree-pretty-print.c (percent_K_format): Add argument.
166         * tree-pretty-print.h: Add argument.
167         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
168         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
169         (maybe_diag_stxncpy_trunc): Same.
170         (handle_builtin_stxncpy): Same.
171         (handle_builtin_strcat): Same.
173 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
175         * match.pd: Optimise pointer range checks.
177 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
179         PR tree-optimization/86758
180         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
181         to remove pattern statements.
183 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
185         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
186         result of dfs_enumerate_from when constructing stmt_vec_infos,
187         instead of additionally calling get_loop_body.
189 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
191         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
192         parameter.
193         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
194         When creating an iv, assert that the step is not known to be zero.
195         (vect_setup_realignment): Update call accordingly.
196         * tree-vect-stmts.c (vectorizable_store): Likewise.
197         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
199 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
201         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
202         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
203         (vectorizable_reduction): Likewise.
204         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
205         (vect_detect_hybrid_slp_stmts): Likewise.
206         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
208 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
210         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
211         (wide_int_set_zero_nonzero_bits): ...this.
212         (zero_nonzero_bits_from_vr): Rename to...
213         (vrp_set_zero_nonzero_bits): ...this.
214         (extract_range_from_multiplicative_op_1): Abstract wide int
215         code...
216         (wide_int_range_multiplicative_op): ...here.
217         (extract_range_from_binary_expr_1): Extract wide int binary
218         operations into their own functions.
219         (wide_int_range_lshift): New.
220         (wide_int_range_can_optimize_bit_op): New.
221         (wide_int_range_shift_undefined_p): New.
222         (wide_int_range_bit_xor): New.
223         (wide_int_range_bit_ior): New.
224         (wide_int_range_bit_and): New.
225         (wide_int_range_trunc_mod): New.
226         (extract_range_into_wide_ints): New.
227         (vrp_shift_undefined_p): New.
228         (extract_range_from_multiplicative_op): New.
229         (vrp_can_optimize_bit_op): New.
230         * tree-vrp.h (value_range::dump): New.
231         (wide_int_range_multiplicative_op): New.
232         (wide_int_range_lshift):New.
233         (wide_int_range_shift_undefined_p): New.
234         (wide_int_range_bit_xor): New.
235         (wide_int_range_bit_ior): New.
236         (wide_int_range_bit_and): New.
237         (wide_int_range_trunc_mod): New.
238         (zero_nonzero_bits_from_bounds): Rename to...
239         (wide_int_set_zero_nonzero_bits): ...this.
240         (zero_nonzero_bits_from_vr): Rename to...
241         (vrp_set_zero_nonzero_bits): ...this.
242         (range_easy_mask_min_max): Rename to...
243         (wide_int_range_can_optimize_bit_op): this.
244         * vr-values.c (simplify_bit_ops_using_ranges): Rename
245         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
247 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
249         * tree-vectorizer.h (vect_orig_stmt): New function.
250         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
251         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
252         (vect_create_epilog_for_reduction): Likewise.
253         (vectorizable_live_operation): Likewise.
254         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
255         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
256         * tree-vect-stmts.c (vectorizable_call): Likewise.
257         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
259 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
261         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
262         argument.
263         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
264         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
265         (vect_transform_loop): Likewise.
266         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
268 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
270         * tree-vectorizer.h (vect_schedule_slp): Return void.
271         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
272         (vect_schedule_slp): Likewise.
274 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
276         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
277         argument.
278         (vect_transform_loop): Update calls accordingly.  Schedule SLP
279         instances before the main loop, if any exist.
281 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
283         PR tree-optimization/86749
284         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
285         If the lhs is used in a COND_EXPR, check that it is being used
286         as the "then" or "else" value.
288 2018-08-01  Tom de Vries  <tdevries@suse.de>
290         PR target/86800
291         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
292         speculation_safe_value_not_needed.
294 2018-08-01  Richard Biener  <rguenther@suse.de>
296         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
297         as base and offset.
299 2018-08-01  Martin Liska  <mliska@suse.cz>
301         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
302         format how successful transformation is dumped.
303         (gimple_mod_pow2_value_transform): Likewise.
304         (gimple_mod_subtract_transform): Likewise.
305         (gimple_stringops_transform): Likewise.
307 2018-08-01  Martin Liska  <mliska@suse.cz>
309         PR value-prof/35543
310         * value-prof.c (interesting_stringop_to_profile_p):
311         Simplify the code and add BUILT_IN_MEMMOVE.
312         (gimple_stringops_transform): Likewise.
314 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
316         * config/aarch64/aarch64-simd.md
317         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
318         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
319         use GPI iterator instead of SI mode.
321 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
323         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
324         rs6000_speculation_barrier.
325         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
326         new barrier pattern name.
328 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
330         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
331         (speculation_barrier): New insn.
333 2018-08-01  Richard Biener  <rguenther@suse.de>
335         PR bootstrap/86724
336         * graphite.h: Include isl/id.h and isl/space.h to allow build
337         with ISL 0.20.
339 2018-08-01 Jan Willem Jagersma  <jwjagersma@gmail.com>
341         PR target/86651
342         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
343         mode for COFF targets.
344         * defaults.h (TARGET_COFF): Define.
345         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
346         TARGET_COFF): Define.
347         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
348         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
349         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
351 2018-07-31  Alexandre Oliva <oliva@adacore.com>
353         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
354         * gimple-streamer-out.c (output_bb): Save it.
355         * lto-streamer-in.c (input_struct_function_base): Restore
356         instance discriminator if available.  Create map on demand.
357         * lto-streamer-out.c (output_struct_function_base): Save it if
358         available.
359         * final.c (decl_to_instance_map): Document LTO strategy.
361 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
362             Olivier Hainque  <hainque@adacore.com>
364         * debug.h (decl_to_instance_map_t): New type.
365         (decl_to_instance_map): Declare.
366         (maybe_create_decl_to_instance_map): New inline function.
367         * final.c (bb_discriminator, last_bb_discriminator): New statics,
368         to track basic block discriminators.
369         (final_start_function_1): Initialize them.
370         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
371         bb_discriminator.
372         (decl_to_instance_map): New variable.
373         (map_decl_to_instance, maybe_set_discriminator): New functions.
374         (notice_source_line): Set discriminator.
376 2018-07-31  Ian Lance Taylor  <iant@golang.org>
378         * targhooks.c (default_have_speculation_safe_value): Add
379         ATTRIBUTE_UNUSED.
381 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
383         * dump-context.h: Include "pretty-print.h".
384         (dump_context::refresh_dumps_are_enabled): New decl.
385         (dump_context::emit_item): New decl.
386         (class dump_context): Add fields "m_test_pp" and
387         "m_test_pp_flags".
388         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
389         (temp_dump_context::get_dumped_text): New decl.
390         (class temp_dump_context): Add field "m_pp".
391         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
392         (dump_context::refresh_dumps_are_enabled): ...and add a test for
393         m_test_pp.
394         (set_dump_file): Update for above change.
395         (set_alt_dump_file): Likewise.
396         (dump_loc): New overload, taking a pretty_printer *.
397         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
398         to any test pretty-printer.
399         (make_item_for_dump_gimple_stmt): New function, adapted from
400         optinfo::add_gimple_stmt.
401         (dump_context::dump_gimple_stmt): Call it, and use the result,
402         eliminating the direct usage of dump_file and alt_dump_file in
403         favor of indirectly using them via emit_item.
404         (make_item_for_dump_gimple_expr): New function, adapted from
405         optinfo::add_gimple_expr.
406         (dump_context::dump_gimple_expr): Call it, and use the result,
407         eliminating the direct usage of dump_file and alt_dump_file in
408         favor of indirectly using them via emit_item.
409         (make_item_for_dump_generic_expr): New function, adapted from
410         optinfo::add_tree.
411         (dump_context::dump_generic_expr): Call it, and use the result,
412         eliminating the direct usage of dump_file and alt_dump_file in
413         favor of indirectly using them via emit_item.
414         (make_item_for_dump_printf_va): New function, adapted from
415         optinfo::add_printf_va.
416         (make_item_for_dump_printf): New function.
417         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
418         and use the result, eliminating the direct usage of dump_file and
419         alt_dump_file in favor of indirectly using them via emit_item.
420         (make_item_for_dump_dec): New function.
421         (dump_context::dump_dec): Call it, and use the result,
422         eliminating the direct usage of dump_file and alt_dump_file in
423         favor of indirectly using them via emit_item.
424         (make_item_for_dump_symtab_node): New function, adapted from
425         optinfo::add_symtab_node.
426         (dump_context::dump_symtab_node): Call it, and use the result,
427         eliminating the direct usage of dump_file and alt_dump_file in
428         favor of indirectly using them via emit_item.
429         (dump_context::begin_scope): Reimplement, avoiding direct usage
430         of dump_file and alt_dump_file in favor of indirectly using them
431         via emit_item.
432         (dump_context::emit_item): New member function.
433         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
434         Set up test pretty-printer on the underlying context.  Call
435         refresh_dumps_are_enabled.
436         (temp_dump_context::~temp_dump_context): Call
437         refresh_dumps_are_enabled.
438         (temp_dump_context::get_dumped_text): New member function.
439         (selftest::verify_dumped_text): New function.
440         (ASSERT_DUMPED_TEXT_EQ): New macro.
441         (selftest::test_capture_of_dump_calls): Run all tests twice, with
442         and then without optinfo enabled.  Add uses of
443         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
444         * dumpfile.h: Update comment for the dump_* API.
445         * optinfo-emit-json.cc
446         (selftest::test_building_json_from_dump_calls): Update for new
447         param for temp_dump_context ctor.
448         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
449         and "m_owned" field.
450         (optinfo_item::~optinfo_item): Likewise.
451         (optinfo::add_item): New member function.
452         (optinfo::emit): Update comment.
453         (optinfo::add_string): Delete.
454         (optinfo::add_printf): Delete.
455         (optinfo::add_printf_va): Delete.
456         (optinfo::add_gimple_stmt): Delete.
457         (optinfo::add_gimple_expr): Delete.
458         (optinfo::add_tree): Delete.
459         (optinfo::add_symtab_node): Delete.
460         (optinfo::add_dec): Delete.
461         * optinfo.h (class dump_context): New forward decl.
462         (optinfo::add_item): New decl.
463         (optinfo::add_string): Delete.
464         (optinfo::add_printf): Delete.
465         (optinfo::add_printf_va): Delete.
466         (optinfo::add_gimple_stmt): Delete.
467         (optinfo::add_gimple_expr): Delete.
468         (optinfo::add_tree): Delete.
469         (optinfo::add_symtab_node): Delete.
470         (optinfo::add_dec): Delete.
471         (optinfo::add_poly_int): Delete.
472         (optinfo_item::optinfo_item): Remove "owned" param.
473         (class optinfo_item): Remove field "m_owned".
475 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
477         PR middle-end/86705
478         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
479         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
480         requested variable alignment.
481         (expand_one_ssa_partition): Likewise.
482         (expand_one_var): Likewise.
484 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
486         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
487         to speculation_safe_value_not_needed.
489 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
491         * targhooks.h (speculation_safe_value_not_needed): New prototype.
492         * targhooks.c (speculation_safe_value_not_needed): New function.
493         * target.def (have_speculation_safe_value): Update documentation.
494         * doc/tm.texi: Regenerated.
496 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
498         * config/aarch64/iterators.md (ALLI_TI): New iterator.
499         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
500         expand.
501         (despeculate_copy<ALLI:mode>_insn): New insn.
502         (despeculate_copyti_insn): New insn.
503         (despeculate_simple<ALLI:mode>): New insn
504         (despeculate_simpleti): New insn.
505         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
506         function.
507         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
508         aarch64_speculation_safe_value.
509         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
511 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
513         * config/aarch64/aarch64-speculation.cc: New file.
514         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
515         before pass_reorder_blocks.
516         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
517         prototype.
518         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
519         X14 and X15 when tracking speculation.
520         * config/aarch64/aarch64.md (register name constants): Add
521         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
522         (unspec): Add UNSPEC_SPECULATION_TRACKER.
523         (speculation_barrier): New insn attribute.
524         (cmp<mode>): Allow SP in comparisons.
525         (speculation_tracker): New insn.
526         (speculation_barrier): Add speculation_barrier attribute.
527         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
528         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
529         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
531 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
533         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
534         aarch64_track_speculation is true.
535         (tb<optab><mode>1): Likewise.
536         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
537         generate CB[N]Z when tracking speculation.
538         (aarch64_split_compare_and_swap): Likewise.
539         (aarch64_split_atomic_op): Likewise.
541 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
543         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
545 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
547         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
548         (speculation_barrier): New insn.
550 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
552         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
553         * config/arm/arm.md (speculation_barrier): New expand.
554         (speculation_barrier_insn): New pattern.
556 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
558         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
559         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
560         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
561         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
562         list.
563         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
564         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
565         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
566         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
567         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
568         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
569         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
570         * builtins.c (expand_speculation_safe_value): New function.
571         (expand_builtin): Call it.
572         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
573         * doc/extend.texi: Document __builtin_speculation_safe_value.
574         * doc/md.texi: Document "speculation_barrier" pattern.
575         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
576         TARGET_HAVE_SPECULATION_SAFE_VALUE.
577         * doc/tm.texi: Regenerated.
578         * target.def (have_speculation_safe_value, speculation_safe_value): New
579         hooks.
580         * targhooks.c (default_have_speculation_safe_value): New function.
581         (default_speculation_safe_value): New function.
582         * targhooks.h (default_have_speculation_safe_value): Add prototype.
583         (default_speculation_safe_value): Add prototype.
585 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
587         * dump-context.h (dump_context::dump_loc): New decl.
588         * dumpfile.c (dump_context::dump_loc): New member function.
589         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
590         and dump_gimple_stmt.
591         (dump_context::dump_gimple_expr_loc): Likewise, using
592         dump_gimple_expr.
593         (dump_context::dump_generic_expr_loc): Likewise, using
594         dump_generic_expr.
595         (dump_context::dump_printf_loc_va): Likewise, using
596         dump_printf_va.
597         (dump_context::begin_scope): Explicitly using the global function
598         "dump_loc", rather than the member function.
600 2018-07-31  Martin Sebor  <msebor@redhat.com>
602         PR tree-optimization/86741
603         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
605 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
607         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
608         depend on whether prefetch instructions will be emitted or not.
609         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
610         will be emitted or not.
611         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
612         (TARGET_SETMEM_PFD): New macros.
614 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
616         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
617         (NULL_STMT_VEC_INFO): Delete.
618         (stmt_vec_info::operator*): Likewise.
619         (stmt_vec_info::operator gimple *): Likewise.
620         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
621         of NULL_STMT_VEC_INFO.
622         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
623         (vect_reassociating_reduction_p): Likewise.
624         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
625         (vectorizable_store): Likewise.
626         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
627         (vec_info::free_stmt_vec_infos): Likewise.
629 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
631         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
632         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
634 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
636         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
637         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
638         (vec_info::free_stmt_vec_info): New private member functions.
639         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
640         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
641         * tree-parloops.c (gather_scalar_reductions): Remove calls to
642         set_stmt_vec_info_vec and free_stmt_vec_infos.
643         * tree-vect-loop.c (_loop_vec_info): Remove call to
644         set_stmt_vec_info_vec.
645         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
646         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
647         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
648         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
649         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
650         assignments in {vec_info::,}new_stmt_vec_info that are redundant
651         with the clearing in the xcalloc.
652         (stmt_vec_info_vec): Delete.
653         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
654         (vectorize_loops): Likewise.
655         (vec_info::~vec_info): Remove argument from call to
656         free_stmt_vec_infos.
657         (vec_info::add_stmt): Remove vinfo argument from call to
658         new_stmt_vec_info.
660 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
662         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
663         rather than a gimple stmt.
664         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
665         information for pattern statements when passed the original
666         statement; instead wait to be passed the pattern statement itself.
667         Don't call set_vinfo_for_stmt here.
668         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
669         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
670         stmt_vec_infos here.
671         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
672         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
673         stmt_vec_infos entry.
675 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
677         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
678         * tree-vectorizer.c (vec_info::replace_stmt): New function.
679         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
680         * tree-vect-stmts.c (vectorizable_call): Likewise.
681         (vectorizable_simd_clone_call): Likewise.
683 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
685         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
686         * tree-vectorizer.c (vec_info::remove_stmt): New function.
687         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
688         * tree-vect-loop.c (vect_transform_loop): Likewise.
689         * tree-vect-slp.c (vect_schedule_slp): Likewise.
690         * tree-vect-stmts.c (vect_remove_stores): Likewise.
692 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
694         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
695         (vect_dr_stmt): Delete.
696         * tree-vectorizer.c (vec_info::lookup_dr): New function.
697         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
698         of DR_VECT_AUX.
699         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
700         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
701         (vect_verify_datarefs_alignment, vect_peeling_supportable)
702         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
703         (vect_analyze_data_refs): Likewise.
704         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
705         argument.
706         (vect_find_same_alignment_drs): Likewise.
707         (vect_slp_analyze_node_dependences): Update calls accordingly.
708         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
709         instead of DR_VECT_AUX.
710         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
711         of a vector data references.  Use vec_info::lookup_dr instead of
712         DR_VECT_AUX.
713         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
714         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
715         instead of DR_VECT_AUX.
717 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
719         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
720         dr_vec_info.
721         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
722         accordingly.
723         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
724         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
725         (vect_gen_prolog_loop_niters): Likewise.
727 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
729         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
730         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
731         (vect_known_alignment_in_bytes, vect_dr_behavior)
732         (vect_get_scalar_dr_size): Take references as dr_vec_infos
733         instead of data_references.  Update calls to other routines for
734         which the same change has been made.
735         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
736         dr_vec_infos instead of stmt_vec_infos.
737         (vect_analyze_data_ref_dependence): Update call accordingly.
738         (vect_slp_analyze_data_ref_dependence)
739         (vect_record_base_alignments): Use DR_VECT_AUX.
740         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
741         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
742         (vector_alignment_reachable_p, vect_get_data_access_cost)
743         (vect_peeling_supportable, vect_analyze_group_access_1)
744         (vect_analyze_group_access, vect_analyze_data_ref_access)
745         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
746         (vect_compile_time_alias, vect_small_gap_p)
747         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
748         (vect_supportable_dr_alignment): Take references as dr_vec_infos
749         instead of data_references.  Update calls to other routines for
750         which the same change has been made.
751         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
752         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
753         (vect_slp_analyze_and_verify_node_alignment)
754         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
755         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
756         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
757         above changes.
758         (_vect_peel_info::dr): Replace with...
759         (_vect_peel_info::dr_info): ...this new field.
760         (vect_peeling_hash_get_most_frequent)
761         (vect_peeling_hash_choose_best_peeling): Update accordingly.
762         (vect_peeling_hash_get_lowest_cost):
763         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
764         routines for which the same change has been made.
765         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
766         data_reference.
767         * tree-vect-loop-manip.c (get_misalign_in_elems)
768         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
769         above changes.
770         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
771         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
772         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
773         (get_group_load_store_type, get_negative_load_store_type)
774         (vect_get_data_ptr_increment, vectorizable_store)
775         (vectorizable_load): Likewise.
776         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
777         Update calls to other routines for which the same change has been made.
779 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
781         * tree-vectorizer.h (vec_info::move_dr): New member function.
782         (dataref_aux): Rename to...
783         (dr_vec_info): ...this and add "dr" and "stmt" fields.
784         (_stmt_vec_info::dr_aux): Update accordingly.
785         (_stmt_vec_info::data_ref_info): Delete.
786         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
787         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
788         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
789         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
790         of data_ref.
791         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
792         (STMT_VINFO_DR_INFO): New macro.
793         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
794         (set_dr_misalignment): Update after rename of dataref_aux.
795         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
796         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
797         initialization of STMT_VINFO_DATA_REF.
798         * tree-vectorizer.c (vec_info::move_dr): New function.
799         * tree-vect-patterns.c (vect_recog_bool_pattern)
800         (vect_recog_mask_conversion_pattern)
801         (vect_recog_gather_scatter_pattern): Use it.
802         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
803         the "dr" and "stmt" fields of dr_vec_info instead of
804         STMT_VINFO_DATA_REF.
806 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
808         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
809         (is_pattern_stmt_p): Use it.
810         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
811         on pattern statements.
813 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
815         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
816         original stmt as a stmt_vec_info rather than a gimple stmt.
817         (vect_pattern_recog_1): Take the statement directly as a
818         stmt_vec_info, rather than via a gimple_stmt_iterator.
819         Update call to vect_mark_pattern_stmts.
820         (vect_pattern_recog): Update calls accordingly.
822 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
824         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
825         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
826         a vect_def_type for the first argument.
827         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
828         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
829         operand if it isn't defined by a vectorized statement.
830         (vect_build_gather_load_calls): Remove the mask_dt argument and
831         update calls to vect_get_vec_def_for_stmt_copy.
832         (vectorizable_bswap): Likewise the dt argument.
833         (vectorizable_call): Update calls to vectorizable_bswap and
834         vect_get_vec_def_for_stmt_copy.
835         (vectorizable_simd_clone_call, vectorizable_assignment)
836         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
837         (vectorizable_comparison): Update calls to
838         vect_get_vec_def_for_stmt_copy.
839         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
840         vect_is_simple_use.
841         (vect_get_loop_based_defs): Remove dt argument and update call
842         to vect_get_vec_def_for_stmt_copy.
843         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
844         and vect_get_vec_def_for_stmt_copy.
845         (vectorizable_load): Update calls to vect_build_gather_load_calls
846         and vect_get_vec_def_for_stmt_copy.
847         * tree-vect-loop.c (vect_create_epilog_for_reduction)
848         (vectorizable_reduction, vectorizable_live_operation): Update calls
849         to vect_get_vec_def_for_stmt_copy.
851 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
853         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
854         and gimple stmt arguments with a stmt_vec_info.
855         (vect_record_base_alignments): Update calls accordingly.
856         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
857         and gimple stmt arguments with a stmt_vec_info.
858         (vect_build_slp_tree_1): Remove vinfo argument and update call
859         to vect_record_max_nunits.
860         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
861         and vect_record_max_nunits.
863 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
865         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
866         file and take a stmt_vec_info instead of a gimple stmt.
867         (supportable_widening_operation, vect_finish_replace_stmt)
868         (vect_finish_stmt_generation, vect_get_store_rhs)
869         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
870         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
871         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
872         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
873         (vect_create_data_ref_ptr, bump_vector_ptr)
874         (vect_permute_store_chain, vect_setup_realignment)
875         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
876         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
877         (vectorizable_reduction, vectorizable_induction)
878         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
879         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
880         than gimple stmts as arguments.
881         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
882         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
883         (can_group_stmts_p, vect_check_gather_scatter)
884         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
885         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
886         (vect_permute_load_chain, vect_shift_permute_load_chain)
887         (vect_transform_grouped_load)
888         (vect_record_grouped_load_vectors): Likewise.
889         * tree-vect-loop.c (vect_fixup_reduc_chain)
890         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
891         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
892         (vectorizable_reduction, vectorizable_induction)
893         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
894         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
895         (vect_get_load_store_mask): Likewise.
896         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
897         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
898         * tree-vect-stmts.c (vect_mark_relevant)
899         (is_simple_and_all_uses_invariant)
900         (exist_non_indexing_operands_for_use_p, process_use)
901         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
902         (vect_get_vec_def_for_operand, vect_get_vec_defs)
903         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
904         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
905         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
906         (get_negative_load_store_type, get_load_store_type)
907         (vect_check_load_store_mask, vect_check_store_rhs)
908         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
909         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
910         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
911         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
912         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
913         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
914         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
915         (supportable_widening_operation): Likewise.
917 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
919         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
920         a stmt_vec_info instead of a gcall.
921         (vect_check_gather_scatter): Update call accordingly.
922         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
923         of a gphi.
924         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
925         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
926         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
927         instead of a gimple stmt.
928         (vect_transform_loop): Update calls accordingly.
929         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
930         stmt_vec_infos instead of gimple stmts.
931         (vect_analyze_slp_instance): Update use accordingly.
932         * tree-vect-stmts.c (read_vector_array, write_vector_array)
933         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
934         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
935         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
936         (vect_gen_widened_results_half, vect_get_loop_based_defs)
937         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
938         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
939         down to subroutines.
941 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
943         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
944         of the worklist from a vector of gimple stmts to a vector of
945         stmt_vec_infos.
946         * tree-vect-stmts.c (vect_mark_relevant, process_use)
947         (vect_mark_stmts_to_be_vectorized): Likewise
949 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
951         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
952         statement before passing it to vect_analyze_stmt.
953         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
954         the chain of phi vector definitions.  Track the exit phi via its
955         stmt_vec_info.
956         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
957         STMT_VINFO_REDUC_DEF.
958         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
959         stmt_vec_infos to handle the statement chains.
960         (vect_get_slp_defs): Record the first statement in the node
961         using a stmt_vec_info.
962         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
963         statements here and pass their stmt_vec_info down to subroutines.
964         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
965         down to vect_finish_stmt_generation.
966         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
967         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
968         stmt_vec_infos to subroutines.
969         (vect_remove_stores): Use stmt_vec_infos to handle the statement
970         chains.
972 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
974         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
975         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
976         (vect_permute_store_chain, vect_setup_realignment)
977         (vect_permute_load_chain, vect_shift_permute_load_chain)
978         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
979         stmts internally, and when passing values to other vectorizer routines.
980         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
981         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
982         (vect_analyze_loop_operations, get_initial_def_for_reduction)
983         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
984         (vectorizable_reduction, vectorizable_induction)
985         (vectorizable_live_operation, vect_transform_loop_stmt)
986         (vect_transform_loop): Likewise.
987         * tree-vect-patterns.c (vect_reassociating_reduction_p)
988         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
989         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
990         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
991         (vect_slp_analyze_node_operations_1): Likewise.
992         * tree-vect-stmts.c (vect_mark_relevant, process_use)
993         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
994         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
995         (vect_finish_stmt_generation_1, get_group_load_store_type)
996         (get_load_store_type, vect_build_gather_load_calls)
997         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
998         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
999         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1000         (vectorizable_store, vectorizable_load, vectorizable_condition)
1001         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1002         (supportable_widening_operation): Likewise.
1003         (vect_get_vector_types_for_stmt): Likewise.
1004         * tree-vectorizer.h (vect_dr_behavior): Likewise.
1006 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1008         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1009         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1010         (vect_permute_store_chain, vect_permute_load_chain)
1011         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1012         repeated stmt_vec_info lookups.
1013         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1014         (vect_update_ivs_after_vectorizer): Likewise.
1015         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1016         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1017         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1018         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1019         (vect_bb_slp_scalar_cost): Likewise.
1020         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1022 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1024         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1025         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1026         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1027         to get gassigns and gcalls, rather than operating on generc gimple
1028         stmts.
1029         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1030         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1031         (vectorizable_load, vect_analyze_stmt): Likewise.
1032         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1034 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1036         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1037         return stmt_vec_infos rather than gimple stmts.  Do not accept
1038         null arguments.
1039         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1040         of a gimple stmt.
1041         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1042         Update use of get_later_stmt.
1043         (vect_get_constant_vectors): Update call accordingly.
1044         (vect_schedule_slp_instance): Likewise
1045         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
1046         (vect_slp_analyze_instance_dependence): Likewise.
1047         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
1049 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1051         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
1052         (stmt_info_for_cost::stmt_info): ...this new field.
1053         (add_stmt_costs): Update accordingly.
1054         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1055         (vect_get_known_peeling_cost): Likewise.
1056         (vect_estimate_min_profitable_iters): Likewise.
1057         * tree-vect-stmts.c (record_stmt_cost): Likewise.
1059 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1061         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
1062         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1063         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1064         accordingly.
1065         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
1067 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1069         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
1070         a gimple stmt to a stmt_vec_info.
1071         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1073 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1075         * tree-vectorizer.h (vec_info::grouped_stores): Change from
1076         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1077         (_loop_vec_info::reduction_chains): Likewise.
1078         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1079         accordingly.
1080         * tree-vect-slp.c (vect_analyze_slp): Likewise.
1082 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1084         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
1085         a gimple stmt to a stmt_vec_info.
1086         (_stmt_vec_info::next_element): Likewise.
1087         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
1088         (vect_slp_analyze_and_verify_node_alignment)
1089         (vect_analyze_group_access_1, vect_analyze_group_access)
1090         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
1091         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
1092         (vect_supportable_dr_alignment): Update accordingly.
1093         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
1094         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
1095         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
1096         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1097         * tree-vect-slp.c (vect_build_slp_tree_1)
1098         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
1099         (vect_split_slp_store_group, vect_analyze_slp_instance)
1100         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
1101         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
1102         (get_group_load_store_type, get_load_store_type)
1103         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
1104         (vect_transform_stmt, vect_remove_stores): Likewise.
1106 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1108         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
1109         than a gimple stmt.
1110         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1111         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
1112         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
1113         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
1114         (vector_alignment_reachable_p, vect_get_data_access_cost)
1115         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
1116         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
1117         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1118         (vect_analyze_group_access_1, vect_analyze_group_access)
1119         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
1120         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
1121         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
1122         result of vect_dr_stmt and use the stmt_vec_info instead of
1123         the associated gimple stmt.
1124         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1125         (vect_gen_prolog_loop_niters): Likewise.
1126         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1128 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1130         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
1131         to a vec<stmt_vec_info>.
1132         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
1133         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
1134         vec<stmt_vec_info>.
1135         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
1136         to a vec<stmt_vec_info>.
1137         (bst_traits::value_type, bst_traits::value_type): Likewise.
1138         (bst_traits::hash): Update accordingly.
1139         (vect_get_and_check_slp_defs): Change the stmts parameter from
1140         a vec<gimple *> to a vec<stmt_vec_info>.
1141         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
1142         (vect_build_slp_tree): Likewise.
1143         (vect_build_slp_tree_2): Likewise.  Update uses of
1144         SLP_TREE_SCALAR_STMTS.
1145         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
1146         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
1147         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
1148         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
1149         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
1150         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
1151         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
1152         (vect_get_constant_vectors, vect_get_slp_defs)
1153         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
1154         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
1155         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
1156         instead of gimple stmts.
1157         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
1158         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
1159         (vect_slp_analyze_instance_dependence): Update uses of
1160         SLP_TREE_SCALAR_STMTS.
1161         (vect_slp_analyze_and_verify_node_alignment): Likewise.
1162         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
1163         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
1164         (get_initial_defs_for_reduction): Likewise.
1165         (vect_create_epilog_for_reduction): Likewise.
1166         (vectorize_fold_left_reduction): Likewise.
1167         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
1168         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
1169         (can_vectorize_live_stmts): Likewise.
1171 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1173         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
1174         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1175         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
1176         than gimple stmts.
1177         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
1178         of a gimple stmt.
1179         (gather_scalar_reductions): Update after above interface changes.
1180         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
1181         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
1182         than gimple stmts.
1183         (vect_force_simple_reduction): Likewise.
1184         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
1185         LOOP_VINFO_REDUCTIONS.
1186         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1188 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1190         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
1191         a gimple stmt to a stmt_vec_info.
1192         * tree-vect-loop.c (vect_active_double_reduction_p)
1193         (vect_force_simple_reduction, vectorizable_reduction): Update
1194         accordingly.
1196 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1198         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
1199         vec<gimple *> to a vec<stmt_vec_info>.
1200         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
1201         the reduction_phis argument from a vec<gimple *> to a
1202         vec<stmt_vec_info>.
1203         (vectorizable_reduction): Likewise the phis local variable that
1204         is passed to vect_create_epilog_for_reduction.  Update for new type
1205         of SLP_TREE_VEC_STMTS.
1206         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
1207         (vectorizable_live_operation): Likewise.
1208         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
1209         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
1211 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1213         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
1214         a gimple stmt to a stmt_vec_info.
1215         (vectorizable_condition, vectorizable_live_operation)
1216         (vectorizable_reduction, vectorizable_induction): Pass back the
1217         vectorized statement as a stmt_vec_info.
1218         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
1219         use of STMT_VINFO_VEC_STMT.
1220         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
1221         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
1222         as stmt_vec_infos rather than gimple stmts.
1223         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
1224         to a stmt_vec_info.
1225         (vectorizable_live_operation): Likewise.
1226         (vectorizable_reduction, vectorizable_induction): Likewise,
1227         updating use of STMT_VINFO_VEC_STMT.
1228         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
1229         of STMT_VINFO_VEC_STMT.
1230         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
1231         (vectorizable_simd_clone_call, vectorizable_conversion)
1232         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1233         (vectorizable_store, vectorizable_load, vectorizable_condition)
1234         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
1235         from a gimple stmt to a stmt_vec_info.
1236         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
1237         pointer to a stmt_vec_info to the vectorizable_* routines.
1239 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1241         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
1242         a gimple stmt to a stmt_vec_info.
1243         (is_pattern_stmt_p): Update accordingly.
1244         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
1245         (vect_record_grouped_load_vectors): Likewise.
1246         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1247         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
1248         (vect_model_reduction_cost): Likewise.
1249         (vect_create_epilog_for_reduction): Likewise.
1250         (vectorizable_reduction, vectorizable_induction): Likewise.
1251         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1252         Return the stmt_vec_info for the pattern statement.
1253         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
1254         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
1255         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1256         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
1257         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1258         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
1259         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
1260         (free_stmt_vec_info, vect_is_simple_use): Likewise.
1262 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1264         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
1265         (vect_finish_stmt_generation): Likewise.
1266         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1267         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
1268         (vect_build_gather_load_calls): Use the return value of the above
1269         functions instead of a separate call to vinfo_for_stmt.  Use narrow
1270         scopes for the input gimple stmt and wider scopes for the associated
1271         stmt_vec_info.  Use vec_info::lookup_def when setting these
1272         stmt_vec_infos from an SSA_NAME definition.
1273         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1274         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1275         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1276         (vectorizable_store, vectorizable_load, vectorizable_condition)
1277         (vectorizable_comparison): Likewise.
1278         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
1279         (vectorizable_reduction): Likewise.
1281 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1283         * tree-vectorizer.h (vect_is_simple_use): Add an optional
1284         stmt_vec_info * parameter before the optional gimple **.
1285         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1286         (process_use, vect_get_vec_def_for_operand_1): Update callers.
1287         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
1288         * tree-vect-loop.c (vectorizable_reduction): Likewise.
1289         (vectorizable_live_operation): Likewise.
1290         * tree-vect-patterns.c (type_conversion_p): Likewise.
1291         (vect_look_through_possible_promotion): Likewise.
1292         (vect_recog_rotate_pattern): Likewise.
1293         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1295 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1297         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
1298         a typedef to a wrapper class.
1299         (NULL_STMT_VEC_INFO): New macro.
1300         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
1301         (stmt_vec_info::operator*): New function.
1302         (stmt_vec_info::operator gimple *): Likewise.
1303         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
1304         (add_stmt_costs): Likewise.
1305         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
1306         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1307         (vect_get_known_peeling_cost): Likewise.
1308         (vect_estimate_min_profitable_iters): Likewise.
1309         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1310         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
1311         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1312         (vectorizable_store, free_stmt_vec_infos): Likewise.
1313         (new_stmt_vec_info): Change return type of xcalloc to
1314         _stmt_vec_info *.
1316 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1318         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
1319         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
1320         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
1321         a single_imm_use-based sequence.
1322         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
1324 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1326         * tree-vectorizer.h (vec_info::lookup_def): Declare.
1327         * tree-vectorizer.c (vec_info::lookup_def): New function.
1328         * tree-vect-patterns.c (vect_get_internal_def): Use it.
1329         (vect_widened_op_tree): Likewise.
1330         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1331         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
1332         (vectorizable_reduction): Likewise.
1333         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
1334         of a gimple *.
1335         (vect_is_slp_reduction): Update calls accordingly.  Use
1336         vec_info::lookup_def.
1337         (vect_is_simple_reduction): Likewise
1338         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
1340 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1342         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
1343         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
1344         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
1345         of vinfo_for_stmt.
1346         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
1347         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
1348         (vect_update_vf_for_slp, vect_analyze_loop_operations)
1349         (vect_is_slp_reduction, vectorizable_induction)
1350         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
1351         * tree-vect-patterns.c (vect_init_pattern_stmt):
1352         (vect_determine_min_output_precision_1, vect_determine_precisions)
1353         (vect_pattern_recog): Likewise.
1354         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
1355         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
1356         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
1357         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1358         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
1359         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
1360         info field from a loop to a loop_vec_info.
1362 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1364         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
1365         (vec_info::add_stmt): Declare.
1366         * tree-vectorizer.c (vec_info::add_stmt): New function.
1367         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
1368         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
1369         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1370         (vectorizable_induction): Likewise.
1371         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
1372         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1373         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
1374         (vectorizable_load): Likewise.
1375         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1376         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
1377         (vect_recog_gather_scatter_pattern): Likewise.
1378         (append_pattern_def_seq): Likewise.  Remove a check that is
1379         performed by add_stmt itself.
1381 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1383         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1384         which make_ssa_name was called with new_stmt before new_stmt
1385         had been created.
1387 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1389         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1390         split out from...
1391         (vect_is_slp_reduction): ...here...
1392         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
1393         that are already known to be false.
1395 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1397         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1398         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
1399         STMT_VINFO_NUM_SLP_USES when it's true.
1400         (vect_free_slp_instance): Add a final_p parameter and pass it to
1401         vect_free_slp_tree.
1402         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1403         (vect_analyze_slp_instance): Likewise.
1404         (vect_slp_analyze_operations): Likewise.
1405         (vect_slp_analyze_bb_1): Likewise.
1406         * tree-vectorizer.c (vec_info): Likewise.
1407         * tree-vect-loop.c (vect_transform_loop): Likewise.
1409 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1411         * tree-vect-loop.c (vectorizable_reduction): Assert that the
1412         function is not called for second and subsequent members of
1413         a reduction group.
1415 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1417         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1418         cases for nested loops from here to ...
1419         (vect_create_epilog_for_reduction): ...here.  Only call
1420         vect_is_simple_use for inner-loop reductions.
1422 2018-07-31  Martin Liska  <mliska@suse.cz>
1424         PR gcov-profile/85338
1425         PR gcov-profile/85350
1426         PR gcov-profile/85372
1427         * profile.c (struct location_triplet): New.
1428         (struct location_triplet_hash): Likewise.
1429         (output_location): Do not output a BB that
1430         is already recorded for a line.
1431         (branch_prob): Use streamed_locations.
1433 2018-07-31  Martin Liska  <mliska@suse.cz>
1435         PR gcov-profile/85370
1436         * coverage.c (coverage_begin_function): Do not mark target
1437         clones as artificial functions.
1439 2018-07-31  Martin Liska  <mliska@suse.cz>
1441         PR gcov-profile/83813
1442         PR gcov-profile/84758
1443         PR gcov-profile/85217
1444         PR gcov-profile/85332
1445         * profile.c (branch_prob): Do not record GOTO expressions
1446         for GIMPLE statements which locations are already streamed.
1448 2018-07-31  Olivier Hainque  <hainque@adacore.com>
1450         * gcc.c (handle_spec_function): Accept a soft_matched_part
1451         argument, as do_spec_1.  Pass it down to ...
1452         (eval_spec_function): Accept a soft_matched_part argument,
1453         and pass it down to ...
1454         (do_spec_2): Accept a soft_matched_part argument, and pass
1455         it down to do_spec_1.
1456         (do_spec_1): Pass soft_matched_part to handle_spec_function.
1457         (handle_braces): Update call to handle_spec_function.
1458         (driver::set_up_specs): Update calls to do_spec_2.
1459         (compare_debug_dump_opt_spec_function): Likewise.
1460         (compare_debug_self_opt_spec_function): Likewise.
1462 2018-07-31  Olivier Hainque  <hainque@adacore.com>
1464         * common.opt (nolibc): New option.
1465         * doc/invoke.texi (Link Options): Document it.
1466         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
1467         * config/alpha/linux.h: Likewise.
1468         * config/arc/elf.h: Likewise.
1469         * config/arm/uclinux-elf.h: Likewise.
1470         * config/arm/unknown-elf.h: Likewise.
1471         * config/avr/avrlibc.h: Likewise.
1472         * config/bfin/bfin.h: Likewise.
1473         * config/bfin/linux.h: Likewise.
1474         * config/bfin/uclinux.h: Likewise.
1475         * config/darwin.h: Likewise.
1476         * config/darwin10.h: Likewise.
1477         * config/darwin12.h: Likewise.
1478         * config/gnu-user.h: Likewise.
1479         * config/lm32/uclinux-elf.h: Likewise.
1480         * config/pa/pa-hpux11.h: Likewise.
1481         * config/pa/pa64-hpux.h: Likewise.
1482         * config/sparc/sparc.h: Likewise.
1484 2018-07-31  Olivier Hainque  <hainque@adacore.com>
1486         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
1487         undefined variables.
1489 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
1491         PR target/86640
1492         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
1493         instead of GEN_INT.
1495 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1497         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1498         terminated string literal.
1500 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
1502         PR rtl-optimization/85160
1503         * combine.c (is_just_move): New function.
1504         (try_combine): Allow combining two instructions into two if neither of
1505         the original instructions was a move.
1507 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
1509         PR target/86673
1510         * doc/extend.texi (Global Register Variables): Discourage use of type
1511         qualifiers.
1512         (Local Register Variables): Likewise.
1514 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
1516         PR tree-optimization/86506
1517         * hwint.h (ceil_log2): Resync with hwint.c implementation.
1519 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
1521         PR target/86547
1522         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
1523         hard_regno, make sure no insn between `from` and `to` clobbers it.
1525 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
1526             Tom de Vries  <tdevries@suse.de>
1528         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
1529         (PTX_DEFAULT_RUNTIME_DIM): ... this.
1530         (nvptx_goacc_validate_dims): Set default worker and gang dims to
1531         PTX_DEFAULT_RUNTIME_DIM.
1532         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
1534 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
1536         * config/pa/pa.c (pa_output_addr_vec): Align address table.
1537         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
1538         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1540 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
1542         * config/rs6000/constraints.md (wG constraint): Delete, no longer
1543         used.
1544         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
1545         predicate to reflect toc fusion has been deleted.
1546         (toc_fusion_mem_raw): Delete, no longer used.
1547         (toc_fusion_mem_wrapped): Likewise.
1548         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
1549         fusion mask bit.
1550         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
1551         Delete, no longer used.
1552         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
1553         meant to be used for toc fusion.
1554         (rs6000_debug_print_mode): Delete toc fusion debugging.
1555         (rs6000_debug_reg_global): Likewise.
1556         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1557         fusion and secondary reload support that were never used.
1558         (rs6000_option_override_internal): Delete TOC fusion, that was only
1559         partially defined, and it did not work unless you also used the
1560         -mcmodel= switch.
1561         (rs6000_legitimate_address_p): Delete TOC fusion support.
1562         (rs6000_opt_masks): Likewise.
1563         (fusion_wrap_memory_address): Delete function, no longer used.
1564         (fusion_split_address); Delete TOC fusion support.
1565         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1566         longer used with toc fusion being deleted.
1567         (TARGET_TOC_FUSION_FP): Likewise.
1568         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
1569         UNSPEC.
1570         (toc fusion spliter): Delete TOC fusion support.
1571         (toc_fusionload_<mode>): Likewise.
1572         (toc_fusionload_di): Likewise.
1573         (fusion_gpr_load_<mode>): Delete generator function, this insn no
1574         longer needs to be named.  Rename predicate to delete TOC fusion.
1575         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1576         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1577         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1578         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1579         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
1581 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1583         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
1584         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
1585         __int128 in built-in function prototypes.
1586         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
1587         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
1589 2018-07-27  Martin Sebor  <msebor@redhat.com>
1591         PR tree-optimization/86696
1592         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
1593         types, including enums.
1594         (handle_char_store): Be prepared for the above function to fail.
1596 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
1598         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
1599         when optimization level is lower than 2 or optimize for size.
1601 2018-07-26  Martin Sebor  <msebor@redhat.com>
1603         PR tree-optimization/86043
1604         PR tree-optimization/86042
1605         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
1606         (get_string_cst_length): Rename...
1607         (get_min_string_length): ...to this.  Add argument.
1608         (handle_char_store): Extend to handle multi-character stores by
1609         MEM_REF.
1610         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
1611         * tree.h (initializer_zerop): Add argument.
1613 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
1615         PR middle-end/86660
1616         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
1617         declare target to variables if they have always,{to,from,tofrom} map
1618         kinds.
1620 2018-07-26  Martin Liska  <mliska@suse.cz>
1622         PR lto/86548
1623         * lto-wrapper.c: Add linker_output as prefix
1624         for ltrans_output_file.
1626 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
1628         PR rtl-optimization/85805
1629         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1630         value for hard registers if that was written in the same mode.
1632 2018-07-26  Martin Liska  <mliska@suse.cz>
1634         PR gcov-profile/86536
1635         * gcov.c (format_gcov): Use printf format %.*f directly
1636         and do not handle special values.
1638 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
1640         * common/config/arc/arc-common.c (arc_option_optimization_table):
1641         Update default optimizations for size.
1643 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
1645         * config/arc/arc.md (movsf_insn): Add short instruction selection.
1646         * config/arc/constraints.md (CfZ): New constraint.
1647         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1648         (subsf3_fpu): Likewise.
1649         (cmpsf_fpu): Likewise.
1650         (cmpsf_fpu_uneq): Likewise.
1652 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
1654         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1655         accesses as well.
1656         (arc_is_uncached_mem_p): uncached applies to both the variable and
1657         the pointer.
1659 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
1661         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1662         register names.
1664 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
1666         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1667         field "m_scopes" from vec to auto_vec.
1669 2018-07-25  Martin Liska  <mliska@suse.cz>
1671         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1672         return type.
1674 2018-07-25  Richard Biener  <rguenther@suse.de>
1676         PR debug/86654
1677         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1678         special wrt context_die late.
1679         (gen_subprogram_die): Re-use DIEs in local scope.
1681 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
1683         PR tree-optimization/86644
1684         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
1686 2018-07-25  Martin Liska  <mliska@suse.cz>
1688         PR middle-end/86645
1689         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1690         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1692 2018-07-25  Martin Liska  <mliska@suse.cz>
1694         PR sanitizer/79635
1695         * params.def: Explain ASan abbreviation and provide
1696         a documentation link.
1698 2018-07-24  Martin Sebor  <msebor@redhat.com>
1700         PR tree-optimization/86622
1701         PR tree-optimization/86532
1702         * builtins.h (string_length): Declare.
1703         * builtins.c (c_strlen): Correct handling of non-constant offsets.      
1704         (check_access): Be prepared for non-constant length ranges.
1705         (string_length): Make extern.
1706         * expr.c (string_constant): Only handle the minor non-constant
1707         array index.  Use string_constant to compute the length of
1708         a generic string constant.
1710 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
1712         PR tree-optimization/86618
1713         * tree-vect-stmts.c (vectorizable_call): Don't take the address
1714         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1716 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
1718         PR tree-optimization/86636
1719         * json.cc (json::object::set): Fix comment.  Add assertions.
1720         (json::array::append): Move here from json.h.  Add comment and an
1721         assertion.
1722         (json::string::string): Likewise.
1723         * json.h (json::array::append): Move to json.cc.
1724         (json::string::string): Likewise.
1725         * optinfo-emit-json.cc
1726         (optrecord_json_writer::impl_location_to_json): Assert that we
1727         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1728         wrapper around it.  Expand the location once, rather than three
1729         times.
1730         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1731         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1732         wrappers.
1733         (optrecord_json_writer::optinfo_to_json): Likewise, in four
1734         places.  Fix some overlong lines.
1736 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
1738         * config/aarch64/aarch64-simd.md
1739         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1740         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1741         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1742         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1743         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1744         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1745         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1746         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1747         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1749 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
1751         PR middle-end/86627
1752         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1753         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
1754         and abs_d == d, do the power of two handling if profitable.
1756 2018-07-24  Richard Biener  <rguenther@suse.de>
1758         * match.pd: Add BIT_FIELD_REF canonicalizations.
1760 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1762         PR c/86617
1763         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1765 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1767         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1768         terminated STRING_CST object.
1770 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1772         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1774 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
1776         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1777         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1778         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1779         the elements into a register.
1780         (rs6000_split_v4si_init_di_reg): Delete.
1781         (rs6000_split_v4si_init): Delete.
1782         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1783         (vsx_init_v4si): Rewrite as a define_expand.
1785 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
1787         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1788         zero_extend argument from memory): New.
1790 2018-07-22  Martin Sebor  <msebor@redhat.com>
1792         PR bootstrap/86621
1793         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1794         diagnosing calls with unknown arguments unless -Walloca-larger-than
1795         is restricted to less than PTRDIFF_MAX bytes.
1797 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
1799         * doc/gcov.texi (Invoking Gcov): Editorial changes.
1801 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
1803         * pretty-print.c (text_info::set_location): Remove redundant
1804         "line_table" parameter from call to rich_location::set_range.
1806 2018-07-20  Martin Sebor  <msebor@redhat.com>
1808         PR middle-end/82063
1809         * builtins.c (expand_builtin_alloca): Adjust.
1810         * calls.c (alloc_max_size): Simplify.
1811         * cgraphunit.c (cgraph_node::expand): Adjust.
1812         * common.opt (larger_than_size, warn_frame_larger_than): Remove
1813         variables.
1814         (frame_larger_than_size): Same.
1815         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1816         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1817         Initialize.
1818         * doc/invoke.texi (GCC Command Options): Document option arguments.
1819         Explain byte-size arguments and suffixes.
1820         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1821         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1822         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1823         * doc/options.texi (UInteger): Expand.
1824         (Host_Wide_Int, ByteSize): Document new properties.
1825         * final.c (final_start_function_1): Include sizes in an error message.
1826         * function.c (frame_offset_overflow): Same.
1827         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1828         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1829         Diagnose unbounded alloca calls only for limits of less than
1830         PTRDIFF_MAX.
1831         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
1832         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
1833         for alloca(0).
1834         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
1835         only for limits of less than PTRDIFF_MAX.
1836         * langhooks-def.h (lhd_handle_option): Change function argument
1837         to HOST_WIDE_INT.
1838         * langhooks.c (lhd_handle_option): Same.
1839         * langhooks.h (handle_option): Same.
1840         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1841         ByteSize flags.
1842         (var_type, var_type_struct): Same.
1843         (var_set): Handle ByteSize flag.
1844         * optc-gen.awk: Add comments to output to ease debugging.  Make
1845         use of HOST_WIDE_INT where appropriate.
1846         * opts-gen-save.awk:  Use %lx to format unsigned long.
1847         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1848         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1849         arguments.  Parse bytes-size suffixes.
1850         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1851         (enum_value_to_arg): Same.
1852         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
1853         (handle_option): Adjust.
1854         (generate_option): Change function argument to HOST_WIDE_INT.
1855         (cmdline_handle_error): Adjust.
1856         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1857         (set_option): Change function argument to HOST_WIDE_INT.
1858         (option_enabled): Handle cl_host_wide_int.
1859         (get_option_state): Handle CLVC_SIZE.
1860         (control_warning_option): Same.
1861         * opts.c (common_handle_option): Change function argument to
1862         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
1863         OPT_Wvla_larger_than_.
1864         * opts.h (enum cl_var_type): Add an enumerator.
1865         * stor-layout.c (layout_decl): Print a more meaningful warning.
1866         * toplev.c (output_stack_usage): Adjust.
1868 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
1870         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1871         call to inline_expand_builtin_string_cmp.
1872         (expand_builtin_strcmp): Likewise.
1873         (expand_builtin_strncmp): Likewise.
1874         (inline_string_cmp): Delete the last parameter, change char_type_node
1875         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1876         two operands.
1877         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1878         the inlining expansion on target where the type of the call has same or 
1879         narrower precision than unsigned char.
1881 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
1883         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1884         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1885         * common.opt (fsave-optimization-record): New option.
1886         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1887         * doc/invoke.texi (-fsave-optimization-record): New option.
1888         * dumpfile.c: Include "optinfo-emit-json.h".
1889         (struct kv_pair): Move to coretypes.h.
1890         (optgroup_options): Make non-static.
1891         (dump_context::end_scope): Call
1892         optimization_records_maybe_pop_dump_scope.
1893         * dumpfile.h (optgroup_options): New decl.
1894         * json.cc: New file.
1895         * json.h: New file.
1896         * optinfo-emit-json.cc: New file.
1897         * optinfo-emit-json.h: New file.
1898         * optinfo.cc: Include "optinfo-emit-json.h".
1899         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1900         (optinfo_enabled_p): Check optimization_records_enabled_p.
1901         (optinfo_wants_inlining_info_p): Likewise.
1902         * optinfo.h: Update comment.
1903         * profile-count.c (profile_quality_as_string): New function.
1904         * profile-count.h (profile_quality_as_string): New decl.
1905         (profile_count::quality): New accessor.
1906         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1907         and optinfo_emit_json_cc_tests.
1908         * selftest.h (selftest::json_cc_tests): New decl.
1909         (selftest::optinfo_emit_json_cc_tests): New decl.
1910         * toplev.c: Include "optinfo-emit-json.h".
1911         (compile_file): Call optimization_records_finish.
1912         (do_compile): Call optimization_records_start.
1913         * tree-ssa-live.c: Include optinfo.h.
1914         (remove_unused_scope_block_p): Retain inlining information if
1915         optinfo_wants_inlining_info_p returns true.
1917 2018-07-20  Richard Biener  <rguenther@suse.de>
1919         PR debug/86585
1920         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1921         to cover -flto-partition=none.
1923 2018-07-20  Martin Liska  <mliska@suse.cz>
1925         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1926         (get_decl_source_range): Remove unused function.
1928 2018-07-20  Richard Biener  <rguenther@suse.de>
1930         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1931         (struct vn_phi_s): Likewise.
1932         (struct vn_reference_s): Likewise.
1933         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1934         for searching the slot of an entry known to be in the hash itself.
1935         (vn_phi_hasher::equal): Likewise.
1936         (vn_reference_hasher::equal): Likewise.
1937         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1938         globals.
1939         (optimistic_info, current_info): Remove, keeping only valid_info.
1940         (vn_reference_lookup_1): Remove fallback lookup.
1941         (vn_reference_lookup_2): Likewise.
1942         (vn_nary_op_lookup_1): Likewise.
1943         (vn_phi_lookup): Likewise.
1944         (vn_nary_build_or_lookup_1): Make sure to not chain the built
1945         hash element.
1946         (vn_reference_insert): Adjust, chain the inserted hash element
1947         at last_inserted_ref.
1948         (vn_reference_insert_pieces): Likewise.
1949         (visit_reference_op_call): Likewise.
1950         (vn_nary_op_insert_into): Chain the inserted hash element at
1951         last_inserted_nary.
1952         (vn_nary_op_insert_pieces): Adjust.
1953         (vn_nary_op_insert): Likewise.
1954         (vn_nary_op_insert_stmt): Likewise.
1955         (vn_phi_insert): Adjust, chain the inserted hash element at
1956         last_inserted_phi.
1957         (process_scc): Remove clearing and copying the optimistic
1958         table.  Instead remove elements inserted during an optimistic
1959         iteration from the single table we maintain.
1960         (init_scc_vn): Adjust.
1961         (free_scc_vn): Likewise.
1962         (sccvn_dom_walker::record_cond): Likewise.
1963         (sccvn_dom_walker::after_dom_children): Likewise.
1965 2018-07-19  Martin Sebor  <msebor@redhat.com>
1967         PR tree-optimization/84047
1968         PR tree-optimization/83776
1969         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1970         (check_array_bounds): Call it.
1972 2018-07-19  Martin Sebor  <msebor@redhat.com>
1974         * align.h (align_flags): Use member initialization.
1976 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
1978         * Makefile.in (OBJS): Add optinfo.o.
1979         * coretypes.h (class symtab_node): New forward decl.
1980         (struct cgraph_node): New forward decl.
1981         (class varpool_node): New forward decl.
1982         * dump-context.h: New file.
1983         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
1984         "tree-pass.h".
1985         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
1986         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
1987         (set_alt_dump_file): Likewise.
1988         (dump_context::~dump_context): New dtor.
1989         (dump_gimple_stmt): Move implementation to...
1990         (dump_context::dump_gimple_stmt): ...this new member function.
1991         Add the stmt to any pending optinfo, creating one if need be.
1992         (dump_gimple_stmt_loc): Move implementation to...
1993         (dump_context::dump_gimple_stmt_loc): ...this new member function.
1994         Start a new optinfo and add the stmt to it.
1995         (dump_gimple_expr): Move implementation to...
1996         (dump_context::dump_gimple_expr): ...this new member function.
1997         Add the stmt to any pending optinfo, creating one if need be.
1998         (dump_gimple_expr_loc): Move implementation to...
1999         (dump_context::dump_gimple_expr_loc): ...this new member function.
2000         Start a new optinfo and add the stmt to it.
2001         (dump_generic_expr): Move implementation to...
2002         (dump_context::dump_generic_expr): ...this new member function.
2003         Add the tree to any pending optinfo, creating one if need be.
2004         (dump_generic_expr_loc): Move implementation to...
2005         (dump_context::dump_generic_expr_loc): ...this new member
2006         function.  Add the tree to any pending optinfo, creating one if
2007         need be.
2008         (dump_printf): Move implementation to...
2009         (dump_context::dump_printf_va): ...this new member function.  Add
2010         the text to any pending optinfo, creating one if need be.
2011         (dump_printf_loc): Move implementation to...
2012         (dump_context::dump_printf_loc_va): ...this new member function.
2013         Start a new optinfo and add the stmt to it.
2014         (dump_dec): Move implementation to...
2015         (dump_context::dump_dec): ...this new member function.  Add the
2016         value to any pending optinfo, creating one if need be.
2017         (dump_context::dump_symtab_node): New member function.
2018         (dump_context::get_scope_depth): New member function.
2019         (dump_context::begin_scope): New member function.
2020         (dump_context::end_scope): New member function.
2021         (dump_context::ensure_pending_optinfo): New member function.
2022         (dump_context::begin_next_optinfo): New member function.
2023         (dump_context::end_any_optinfo): New member function.
2024         (dump_context::s_current): New global.
2025         (dump_context::s_default): New global.
2026         (dump_scope_depth): Delete global.
2027         (dumpfile_ensure_any_optinfo_are_flushed): New function.
2028         (dump_symtab_node): New function.
2029         (get_dump_scope_depth): Reimplement in terms of dump_context.
2030         (dump_begin_scope): Likewise.
2031         (dump_end_scope): Likewise.
2032         (selftest::temp_dump_context::temp_dump_context): New ctor.
2033         (selftest::temp_dump_context::~temp_dump_context): New dtor.
2034         (selftest::verify_item): New function.
2035         (ASSERT_IS_TEXT): New macro.
2036         (ASSERT_IS_TREE): New macro.
2037         (ASSERT_IS_GIMPLE): New macro.
2038         (selftest::test_capture_of_dump_calls): New test.
2039         (selftest::dumpfile_c_tests): Call it.
2040         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2041         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2042         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2043         descriptive comment.
2044         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
2045         (dump_node, dump_bb): Move these unrelated decls.
2046         (class dump_manager): Add leading comment.
2047         * optinfo.cc: New file.
2048         * optinfo.h: New file.
2050 2018-07-19  Michael Collison  <michael.collison@arm.com>
2051             Richard Henderson <rth@redhat.com>
2053         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
2054         (subti): Handle op1 zero.
2055         (subvti4, usub4ti4): New.
2056         (*sub<GPI>3_compare1_imm): New.
2057         (sub<GPI>3_carryinCV): New.
2058         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
2059         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2061 2018-07-19  Michael Collison  <michael.collison@arm.com>
2062             Richard Henderson <rth@redhat.com>
2064         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
2065         (addti3): Create simpler code if low part is already known to be 0.
2066         (addvti4, uaddvti4): New.
2067         (*add<GPI>3_compareC_cconly_imm): New.
2068         (*add<GPI>3_compareC_cconly): New.
2069         (*add<GPI>3_compareC_imm): New.
2070         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
2071         handle constants within this pattern..
2072         (*add<GPI>3_compareV_cconly_imm): New.
2073         (*add<GPI>3_compareV_cconly): New.
2074         (*add<GPI>3_compareV_imm): New.
2075         (add<GPI>3_compareV): New.
2076         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
2077         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
2078         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2079         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2080         with 'comparison' operator.
2081         (*add<GPI>3_compareV_cconly_imm): Ditto.
2082         (*add<GPI>3_compareV_cconly): Ditto.
2083         (*add<GPI>3_compareV_imm): Ditto.
2084         (add<GPI>3_compareV): Ditto.
2085         (add<mode>3_carryinC): Ditto.
2086         (*add<mode>3_carryinC_zero): Ditto.
2087         (*add<mode>3_carryinC): Ditto.
2088         (add<mode>3_carryinV): Ditto.
2089         (*add<mode>3_carryinV_zero): Ditto.
2090         (*add<mode>3_carryinV): Ditto.
2092 2018-07-19  Michael Collison  <michael.collison@arm.com>
2093             Richard Henderson <rth@redhat.com>
2095         * config/aarch64/aarch64-modes.def (CC_V): New.
2096         * config/aarch64/aarch64-protos.h
2097         (aarch64_addti_scratch_regs): Declare
2098         (aarch64_subvti_scratch_regs): Declare.
2099         (aarch64_expand_subvti): Declare.
2100         (aarch64_gen_unlikely_cbranch): Declare
2101         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
2102         for signed overflow using CC_Vmode.
2103         (aarch64_get_condition_code_1): Handle CC_Vmode.
2104         (aarch64_gen_unlikely_cbranch): New function.
2105         (aarch64_addti_scratch_regs): New function.
2106         (aarch64_subvti_scratch_regs): New function.
2107         (aarch64_expand_subvti): New function.
2109 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2111         * config/aarch64/aarch64-option-extensions.def: New entry for profile
2112         extension.
2113         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
2114         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
2115         extension.
2117 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2119         PR target/83009
2120         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2121         address check not strict.
2123 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2125         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
2126         Umq with Umn.
2127         (store_pair_lanes<mode>): Likewise.
2128         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
2129         enum value 'ADDR_QUERY_LDP_STP_N'.
2130         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
2131         (aarch64_print_address_internal): Add declaration.
2132         (aarch64_print_ldpstp_address): Remove.
2133         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
2134         (aarch64_print_operand): Change printing of 'y'.
2135         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
2136         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
2137         'true' rather than '1'.
2138         * config/aarch64/constraints.md (Uml): Likewise.
2139         (Uml): Rename to Umn.
2140         (Umq): Remove.
2142 2018-07-19  Richard Biener  <rguenther@suse.de>
2144         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
2145         a trailing array.
2146         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
2147         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
2148         (vn_reference_hasher): Likewise.
2149         (struct vn_tables_s): Remove obstack and alloc-pool members.
2150         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
2151         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
2152         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
2153         (vn_reference_insert_pieces): Likewise.
2154         (alloc_vn_nary_op_noinit): Adjust.
2155         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
2156         (vn_phi_eq): Adjust.
2157         (shared_lookup_phiargs): Remove.
2158         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
2159         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
2160         (visit_reference_op_call): Likewise.
2161         (copy_nary, copy_phi, copy_reference): Remove.
2162         (process_scc): Rewind the obstack when iterating.  Do not
2163         copy the elements to valid_info but just move them from one
2164         hashtable to the other.
2165         (allocate_vn_table): Adjust.
2166         (free_vn_table): Likewise.
2167         (init_scc_vn): Likewise.
2168         (free_scc_vn): Likewise.
2170 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
2172         PR target/86560
2173         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
2174         indirect_return as function type attribute.
2175         (ix86_attribute_table): Change indirect_return to function
2176         type attribute.
2177         * doc/extend.texi: Update indirect_return attribute.
2179 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
2181         * wide-int.h (widest2_int): New.
2182         * gimple-fold.c (arith_overflowed_p): Use it.
2183         * tree.h (widest2_int_cst): New.
2184         * tree-vrp.c (wide_int_binop_overflow): Rename from
2185         vrp_int_const_binop.
2186         Rewrite to work on trees.
2187         (extract_range_from_multiplicative_op_1): Abstract code to...
2188         (wide_int_range_min_max): ...here.
2189         (wide_int_range_cross_product): ...and here.
2190         (extract_range_from_binary_expr_1): Abstract overflow code to...
2191         (wide_int_range_mult_wrapping): ...here.
2192         * tree-vrp.h (wide_int_range_cross_product): New.
2193         (wide_int_range_mult_wrapping): New.
2195 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
2196             Julia Koval  <julia.koval@intel.com>
2198         * config/i386/x86-tune-costs.h (skylake_memcpy,
2199         skylake_memset): Replace rep_prefix with unrolling for size 512.
2201 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
2203         PR middle-end/86544
2204         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
2205         in last stmt.
2207 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2209         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
2210         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
2211         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
2212         previously known as "PowerPC AltiVec Built-in Functions".  Move
2213         some material to new subsubsections "PowerPC AltiVec Built-in
2214         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
2215         ISA 2.07".
2216         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
2217         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
2218         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
2219         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
2221 2018-07-18  Richard Biener  <rguenther@suse.de>
2223         PR tree-optimization/86557
2224         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
2225         EXACT_DIV_EXPR.
2227 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
2229         * config/s390/s390.c (s390_function_profiler): Generate CFI.
2231 2018-07-17  Jeff Law  <law@redhat.com>
2233         * config/arm/arm.c (get_label_padding): Update for recent
2234         changes to label_to_alignment.
2236         PR tree-optimization/86010
2237         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
2239         * config/mips/mips.c (vr4130_align_insns): Update for recent
2240         changes to label_to_alignment.
2242         * config/frv/frv.c (frv_label_align): Update for recent changes
2243         to label_to_alignment.
2245         * config/nios2/nios2.c (nios2_label_align): Update for recent
2246         changes which dropped ALIGN_LABELS_LOG.
2248 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
2250         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
2251         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
2253 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
2255         * config/arc/arc.c (arc_label_align): Use align_labels instead of
2256         deprecated align_labels_log.
2258 2018-07-17  Richard Biener  <rguenther@suse.de>
2260         PR lto/86456
2261         * dwarf2out.c (init_sections_and_labels): Always generate
2262         a debug_line_str_section for early LTO debug.
2263         (dwarf2out_finish): Reset debug_line_str_hash output early.
2264         Bump counter for extra dwarf5 .debug_loc labels to not conflict
2265         with fat LTO part.
2266         (dwarf2out_early_finish): Output debug_line_str.
2268 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
2270         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
2271         index register on z196 or later.
2273 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
2275         * config/s390/s390.c (s390_default_align): Set default function
2276         alignment to 16.
2277         (s390_override_options_after_change): Call s390_default align.
2278         (s390_option_override_internal): Call s390_default_align.
2279         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2281 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
2283         PR middle-end/86542
2284         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
2285         to _looptemp_ clauses, other than the first two.
2287 2018-07-17  Martin Liska  <mliska@suse.cz>
2289         * opts.c: Do not enable OPT_falign_* for -Os.
2291 2018-07-17  Martin Liska  <mliska@suse.cz>
2293         * align.h (MAX_CODE_ALIGN): New.
2294         (MAX_CODE_ALIGN_VALUE): New.
2295         * common/config/i386/i386-common.c (ix86_handle_option):
2296         (MAX_CODE_ALIGN): Moved to align.h.
2297         * final.c (MAX_CODE_ALIGN): Likewise.
2298         * opts.c (parse_and_check_align_values):
2299         (MAX_CODE_ALIGN): Likewise.
2300         (MAX_CODE_ALIGN_VALUE): Likewise.
2302 2018-07-17  Martin Liska  <mliska@suse.cz>
2304         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
2305         in order to fulfil coding style.
2306         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
2307         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2308         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2309         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
2310         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
2311         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
2312         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
2313         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
2314         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2316 2018-07-17  Martin Liska  <mliska@suse.cz>
2318         * align.h: New file.
2319         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
2320         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
2321         align_flags of label_to_alignment.
2322         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
2323         class.
2324         * config/m68k/m68k.c: Do not use removed align_labels_value and
2325         align_loops_value.
2326         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
2327         (LOOP_ALIGN): Likewise.
2328         (LABEL_ALIGN): Likewise.
2329         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2330         Remove not used macro.
2331         (rs6000_loop_align): Change return type to align_flags.
2332         (rs6000_loop_align_max_skip): Remove.
2333         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
2334         Change return type to align_flags.
2335         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2336         Remove not used macro.
2337         (rs6000_loop_align):  Change return type to align_flags.
2338         (rs6000_loop_align_max_skip): Remove.
2339         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
2340         * config/rx/rx-protos.h (rx_align_for_label): Make it
2341         static function.
2342         * config/rx/rx.c (rx_align_for_label): Change return type
2343         to align_flags.
2344         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
2345         macro definitions.
2346         into align_flags class.
2347         (LABEL_ALIGN): Likewise.
2348         (LOOP_ALIGN): Likewise.
2349         * config/s390/s390.c (s390_label_align): Use align_flags
2350         class member.
2351         (s390_asm_output_function_label): Likewise.
2352         * config/sh/sh.c (sh_override_options_after_change):
2353         Use align_flags class directly without macros.
2354         (find_barrier): Likewise.
2355         (barrier_align): Likewise.
2356         (sh_loop_align): Likewise.
2357         * config/spu/spu.c (spu_option_override):
2358         Use align_flags_tuple::get_value instead of removed macros.
2359         (spu_sched_init): Likewise.
2360         * config/spu/spu.h (GTY): Likewise.
2361         * config/visium/visium.c (visium_option_override):
2362         Set "8" as default secondary alignment.
2363         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
2364         in order to guarantee secondary alignment of 8.
2365         * coretypes.h: Include align.h header file.
2366         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
2367         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
2368         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
2369         * doc/tm.texi.in: Likewise.
2370         * final.c (struct label_alignment): Remove not used structure.
2371         (LABEL_ALIGN): Change type to align_flags.
2372         (LOOP_ALIGN): Likewise.
2373         (JUMP_ALIGN): Likewise.
2374         (default_loop_align_max_skip): Remove.
2375         (default_label_align_max_skip): Likewise.
2376         (default_jump_align_max_skip): Likewise.
2377         (default_label_align_after_barrier_max_skip):
2378         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
2379         (LABEL_TO_MAX_SKIP): Remove.
2380         (label_to_alignment): Return align_flags type instead of integer.
2381         (label_to_max_skip): Remove.
2382         (align_fuzz): Use align_flags type.
2383         (compute_alignments): Use align_flags type and use align_flags::max
2384         to combine multiple alignments.
2385         (grow_label_align): Grow vec instead of C array.
2386         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2387         (shorten_branches):  Use align_flags type and use align_flags::max
2388         to combine multiple alignments.
2389         (final_scan_insn_1): Remove usage of secondary alignment that comes
2390         from label alignment, but instead use proper secondary alignment
2391         which is computed in grow_label_align.
2392         * flags.h (struct align_flags_tuple): Move to align.h.
2393         (struct align_flags): Likewise.
2394         (state_align_loops): Rename to align_loops.
2395         (state_align_jumps): Rename to align_jumps.
2396         (state_align_labels): Rename to align_labels.
2397         (state_align_functions): Rename to align_functions.
2398         (align_loops_log): Remove.
2399         (align_jumps_log): Remove.
2400         (align_labels_log): Remove.
2401         (align_functions_log): Remove.
2402         (align_loops_max_skip): Remove.
2403         (align_jumps_max_skip): Remove.
2404         (align_labels_max_skip): Remove.
2405         (align_functions_max_skip): Remove.
2406         (align_loops_value): Remove.
2407         (align_jumps_value): Remove.
2408         (align_labels_value): Remove.
2409         (align_functions_value): Remove.
2410         * output.h (label_to_alignment): Change return type to align_flags.
2411         (label_to_max_skip): Remove.
2412         * target.def: Remove loop_align_max_skip, label_align_max_skip,
2413         jump_align_max_skip macros.
2414         * targhooks.h (default_loop_align_max_skip): Remove.
2415         (default_label_align_max_skip): Likewise.
2416         (default_jump_align_max_skip): Likewise.
2417         (default_label_align_after_barrier_max_skip): Remove.
2418         * toplev.c (read_log_maxskip): Use ::normalize function.
2419         (parse_N_M): Remove not used argument and also call ::normalize.
2420         (parse_alignment_opts): Do not pass unused arguments.
2421         * varasm.c (assemble_start_function): Use directly align_functions
2422         instead of removed macros.
2423         * system.h: Do not poison removed macros.
2425 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
2427         PR middle-end/86539
2428         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2429         and cond temporaries don't have reference type if iterator has
2430         pointer type.  For init use &for_pre_body instead of pre_p if
2431         for_pre_body is non-empty.
2433 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
2435         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
2436         double-double modes to SFmode directly directly.
2437         (trunc<mode>sf2_fprs): Delete.
2439 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
2441         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
2442         for conversions between IFmode and the decimal floating point modes.
2443         (init_float128_ieee): Use the correct names for conversions between
2444         KFmode and the decimal floating point modes.
2446 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
2448         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
2449         for the conversions between TDmode and IFmode.
2450         (init_float128_ieee): Use more correct names for the conversions
2451         between TDmode and KFmode.
2453 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
2455         PR tree-optimization/86526
2456         * builtins.c (expand_builtin_memcmp): Formatting fixes.
2457         (inline_expand_builtin_string_cmp): Likewise.
2458         (inline_string_cmp): Likewise.  Use c_readstr instead of
2459         builtin_memcpy_read_str.  Add unit_mode temporary.
2461 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2463         PR middle-end/86528
2464         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
2465         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2467 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2469         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
2470         Alphabetize prototypes of built-in functions, separating out
2471         built-in functions that are listed in this section but should be
2472         described elsewhere.
2474 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
2476         PR target/86511
2477         * expmed.c (emit_store_flag): Do not emit setcc followed by a
2478         conditional move when trapping comparison was split to a
2479         non-trapping one (and vice versa).
2481 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
2483         * config/s390/s390.c (s390_function_profiler): Generate nops
2484         instead of profiler call sequences.
2485         * config/s390/s390.opt: Add the new option.
2487 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
2489         * config/s390/s390.c (s390_function_profiler): Generate
2490         __mcount_loc section.
2491         * config/s390/s390.opt: Add the new option.
2493 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
2495         * common.opt: Add the new warning.
2496         * config/s390/s390.c (s390_function_profiler): Emit "brasl
2497         %r0,__fentry__" when -mfentry is specified.
2498         (s390_option_override_internal): Disallow -mfentry for 31-bit
2499         CPUs.
2500         * config/s390/s390.opt: Add the new option.
2502 2018-07-16  Richard Biener  <rguenther@suse.de>
2504         PR lto/86523
2505         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
2506         for function-local FUNCTION_DECL and RESULT_DECL immediately.
2508 2018-07-16  Martin Liska  <mliska@suse.cz>
2510         PR ipa/86529
2511         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
2512         to ::get_create.
2514 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
2516         * config/arc/arcHS.md: Update ARCHS scheduling rules.
2518 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
2520         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
2521         for ARCHS4x.
2522         * config/arc/arc-cpus.def (hs4x): New cpu.
2523         (hs4xd): Likewise.
2524         * config/arc/arc-tables.opt: Regenerate.
2525         * config/arc/arc.c (arc_sched_issue_rate): New function.
2526         (TARGET_SCHED_ISSUE_RATE): Define.
2527         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
2528         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
2529         fpu_cvt.
2530         (attr tune): Add ARCHS4x tune values.
2531         (attr tune_dspmpy): Define.
2532         (*tst): Correct instruction type.
2533         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
2534         * config/arc/arcHS4x.md: New file.
2535         * config/arc/fpu.md: Update instruction type attributes.
2536         * config/arc/t-multilib: Regenerate.
2538 2018-07-16  Tom de Vries  <tdevries@suse.de>
2540         PR debug/86455
2541         * var-tracking.c (vt_initialize): Fix pre_dec handling.
2543 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
2545         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
2546         early clobber.
2548 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
2550         PR tree-optimization/86514
2551         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
2552         conversion to a boolean type from a type with greater precision.
2554 2018-07-16  Tom de Vries  <tdevries@suse.de>
2556         * var-tracking.c (vt_initialize): Print adjusted insn slim if
2557         dump_flags request TDF_SLIM.
2559 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
2561         * fold-const.c (int_const_binop_1): Abstract...
2562         (wide_int_binop): ...wide int code here.
2563         (poly_int_binop): ...poly int code here.
2564         Abstract the rest of int_const_binop_1 into int_const_binop.
2565         * fold-const.h (wide_int_binop): New.
2566         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2567         Remove useless PLUS/MINUS_EXPR case.
2568         (zero_nonzero_bits_from_vr): Move wide int code...
2569         (zero_nonzero_bits_from_bounds): ...here.
2570         (extract_range_from_binary_expr_1): Move mask optimization code...
2571         (range_easy_mask_min_max): ...here.
2572         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
2573         (range_easy_mask_min_max): New.
2575 2018-07-15  Jeff Law  <law@redhat.com>
2577         PR target/85993
2578         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
2579         block.
2581 2018-07-14  Jim Wilson  <jimw@sifive.com>
2583         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2585 2018-07-14  Paul Koning  <ni1d@arrl.net>
2587         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2589 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
2591         * lto-streamer-out.c (copy_function_or_variable): Dump info about
2592         copying section.
2594 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
2595             Steve Munroe  <munroesj52@gmail.com>
2597         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
2598         (_mm_andnot_si128): Likewise.
2599         (_mm_or_si128): Likewise.
2600         (_mm_xor_si128): Likewise.
2602 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
2604         PR middle-end/78809
2605         * builtins.c (expand_builtin_memcmp): Inline the calls first
2606         when result_eq is false.
2607         (expand_builtin_strcmp): Inline the calls first.
2608         (expand_builtin_strncmp): Likewise.
2609         (inline_string_cmp): New routine. Expand a string compare
2610         call by using a sequence of char comparison.
2611         (inline_expand_builtin_string_cmp): New routine. Inline expansion
2612         a call to str(n)cmp/memcmp.
2613         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
2614         New option.
2615         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2617 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
2619         * config/arm/driver-arm.c: Include arm-native.h.
2620         (host_detect_local_cpu): Use auto-generated data tables.
2621         (vendors, arm_cpu_table): Delete.  Move part information to ...
2622         * config/arm/arm-cpus.in: ... here.
2623         * config/arm/parsecpu.awk (gen_native): New function.
2624         (vendor, part): New CPU fields.
2625         (END): Add support for building the native CPU detection tables.
2626         * config/arm/t-arm (arm-native.h): Add build rule.
2627         (driver-arm.o): Add dependency on arm-native.h.
2629 2018-07-13  Richard Biener  <rguenther@suse.de>
2631         PR middle-end/85974
2632         * match.pd (addr1 - addr2): Allow either of the operand to
2633         have a conversion.
2635 2018-07-13  Tom de Vries  <tdevries@suse.de>
2637         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2638         in remap_ssa_name.
2640 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
2642         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2643         arrays instead of numbered variables.
2645 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
2647         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2648         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2650 2018-07-13  Richard Biener  <rguenther@suse.de>
2652         PR debug/86452
2653         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2654         instead of get_context_die.
2656 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
2657             Richard Biener  <rguenther@suse.de>
2659         PR middle-end/86489
2660         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2661         that the loop latch destination where phi is defined.
2663 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
2665         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2666         (riscv_expand_epilogue): Add assertion to check interrupt mode.
2667         (riscv_set_current_function): Extract getting interrupt type to new
2668         function.
2669         (riscv_get_interrupt_type): New function.
2670         (riscv_merge_decl_attributes): New function, checking interrupt type is
2671         same.
2672         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2674 2018-07-12  Paul Koning  <ni1d@arrl.net>
2676         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2677         directive.
2679 2018-07-12  Paul Koning  <ni1d@arrl.net>
2681         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2682         zero reference, add doloop_end instead.
2683         * doc/md.texi (decrement_and_branch_until_zero): Remove.
2684         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
2685         detail for doloop_end.
2687 2018-07-12  Martin Sebor  <msebor@redhat.com>
2689         PR c/86453
2690         * attribs.c (decl_attributes): Reject conflicting attributes before
2691         calling attribute handlers.
2693 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
2695         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2696          parameter.
2697         (gcc::dump_manager::get_dump_file_name): likewise.
2698         (dump_begin): Likewise.
2699         * dumpfile.h (dump_begin): Update prototype.
2700         (gcc::dump_manager::get_dump_file_name,
2701         gcc::dump_manager::get_dump_file_name): Update prototype.
2703 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2705         * internal-fn.h (vectorizable_internal_fn_p): New function.
2706         * tree-vect-slp.c (compatible_calls_p): Likewise.
2707         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
2708         to internal functions.
2709         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2711 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2713         * fold-const.h (inverse_conditions_p): Declare.
2714         * fold-const.c (inverse_conditions_p): New function.
2715         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
2716         that test the inverse condition of a conditional internal function.
2717         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2718         * internal-fn.c (internal_fn_mask_index): Handle conditional
2719         internal functions.
2720         (vectorized_internal_fn_supported_p): New function.
2721         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2722         (any_pred_load_store): Replace with...
2723         (need_to_predicate): ...this new variable.
2724         (redundant_ssa_names): New variable.
2725         (ifcvt_can_use_mask_load_store): Move initial checks to...
2726         (ifcvt_can_predicate): ...this new function.  Handle tree codes
2727         for which a conditional internal function exists.
2728         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2729         instead of ifcvt_can_use_mask_load_store.  Update after variable
2730         name change.
2731         (predicate_load_or_store): New function, split out from
2732         predicate_mem_writes.
2733         (check_redundant_cond_expr): New function.
2734         (value_available_p): Likewise.
2735         (predicate_rhs_code): Likewise.
2736         (predicate_mem_writes): Rename to...
2737         (predicate_statements): ...this.  Use predicate_load_or_store
2738         and predicate_rhs_code.
2739         (combine_blocks, tree_if_conversion): Update after above name changes.
2740         (ifcvt_local_dce): Handle redundant_ssa_names.
2741         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2742         general conditional functions.
2743         * tree-vect-stmts.c (vectorizable_call): Likewise.
2745 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2746             Alan Hayward  <alan.hayward@arm.com>
2747             David Sherwood  <david.sherwood@arm.com>
2749         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2750         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2751         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2752         plus and minus and convert them into IFN_COND_FMA-based sequences.
2753         (convert_mult_to_fma): Handle conditional plus and minus.
2755 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2757         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2758         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2759         (cond_fnms_optab): New optabs.
2760         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2761         internal functions.
2762         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2763         * internal-fn.h (get_conditional_internal_fn): Declare.
2764         (get_unconditional_internal_fn): Likewise.
2765         * internal-fn.c (cond_ternary_direct): New macro.
2766         (expand_cond_ternary_optab_fn): Likewise.
2767         (direct_cond_ternary_optab_supported_p): Likewise.
2768         (FOR_EACH_COND_FN_PAIR): Likewise.
2769         (get_conditional_internal_fn): New function.
2770         (get_unconditional_internal_fn): Likewise.
2771         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2772         (gimple_match_op::gimple_match_op): Add a new overload for 5
2773         operands.
2774         (gimple_match_op::set_op): Likewise.
2775         (gimple_resimplify5): Declare.
2776         * genmatch.c (decision_tree::gen): Generate simplifications for
2777         5 operands.
2778         * gimple-match-head.c (gimple_simplify): Define an overload for
2779         5 operands.  Handle calls with 5 arguments in the top-level overload.
2780         (convert_conditional_op): Handle conversions from unconditional
2781         internal functions to conditional ones.
2782         (gimple_resimplify5): New function.
2783         (build_call_internal): Pass a fifth operand.
2784         (maybe_push_res_to_seq): Likewise.
2785         (try_conditional_simplification): Try converting conditional
2786         internal functions to unconditional internal functions.
2787         Handle 3-operand unconditional forms.
2788         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2789         Define ternary equivalents of the current rules for binary conditional
2790         internal functions.
2791         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2792         ternary operations.
2793         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2794         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2795         (optab): Handle them.
2796         (SVE_COND_FP_TERNARY): New int iterator.
2797         (sve_fmla_op, sve_fmad_op): New int attributes.
2798         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2799         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2800         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2802 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2804         * target.def (preferred_else_value): New target hook.
2805         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2806         * doc/tm.texi: Regenerate.
2807         * targhooks.h (default_preferred_else_value): Declare.
2808         * targhooks.c (default_preferred_else_value): New function.
2809         * internal-fn.h (conditional_internal_fn_code): Declare.
2810         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2811         (get_conditional_internal_fn): Use it.
2812         (conditional_internal_fn_code): New function.
2813         * gimple-match.h (gimple_match_cond): New struct.
2814         (gimple_match_op): Add a cond member function.
2815         (gimple_match_op::gimple_match_op): Update all forms to take a
2816         gimple_match_cond.
2817         * genmatch.c (expr::gen_transform): Use the same condition as res_op
2818         for the suboperation, but don't specify a particular else_value.
2819         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2820         (visit_nary_op, visit_reference_op_load): Pass
2821         gimple_match_cond::UNCOND to the gimple_match_op constructor.
2822         * gimple-match-head.c: Include tree-eh.h
2823         (convert_conditional_op): New function.
2824         (maybe_resimplify_conditional_op): Likewise.
2825         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2826         (gimple_resimplify2): Likewise.
2827         (gimple_resimplify3): Likewise.
2828         (gimple_resimplify4): Likewise.
2829         (maybe_push_res_to_seq): Return null for conditional operations.
2830         (try_conditional_simplification): New function.
2831         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
2832         constructor.
2833         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2834         IFN_COND_* call.
2835         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2836         function.
2837         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2839 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
2841         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2842         DECL_FCONTEXT
2843         (hash_tree): Do not hash DECL_FCONTEXT
2844         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2845         Do not stream DECL_FCONTEXT.
2846         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2847         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2849 2018-07-12  Richard Biener  <rguenther@suse.de>
2851         PR debug/86462
2852         * dwarf2out.c (gen_block_die): Only output blocks when they have
2853         at least one !DECL_IGNORED_P variable.
2855 2018-07-12  Richard Biener  <rguenther@suse.de>
2857         PR target/84829
2858         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2859         Remove -mieee-fp handling.
2861 2018-07-12  Richard Biener  <rguenther@suse.de>
2863         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2864         left-over from last patch.
2866 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
2868         PR tree-optimization/86492
2869         * gimple-ssa-store-merging.c
2870         (imm_store_chain_info::coalesce_immediate_stores): Call
2871         check_no_overlap even for the merge_overlapping case.  Formatting fix.
2873 2018-07-12  Richard Biener  <rguenther@suse.de>
2875         PR middle-end/86479
2876         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2877         move possibly trapping operations into the conditional.
2879 2018-07-12  Richard Biener  <rguenther@suse.de>
2881         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2882         (vn_lookup_simplify_result): Remove recursion limit applied
2883         here.
2884         (vn_nary_build_or_lookup_1): Adjust.
2885         (try_to_simplify): Likewise.
2886         * gimple-match-head.c (gimple_resimplify1): Instead apply one
2887         here.
2888         (gimple_resimplify2): Likewise.
2889         (gimple_resimplify3): Likewise.
2890         (gimple_resimplify4): Likewise.
2892 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
2894         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2895         Use __mmask64 type instead of __mmask8 for __M argument.
2896         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2897         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2898         __U argument.
2899         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2900         __mmask16 for __M argument.
2901         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2902         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2903         to __mmask16 instead of __mmask8.
2904         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2905         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2906         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2907         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2908         instead of __mmask16 for __U argument.
2909         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2910         __mmask16 instead of __mmask8 for __U argument.
2911         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2912         __U argument.
2913         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2914         __mmask16.
2915         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2916         argument.
2917         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2918         __U argument.
2919         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2920         __mmask16.
2921         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2922         of __mmask16.
2923         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2924         __U argument.
2925         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2926         __U argument.
2927         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2928         __U argument.
2929         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2930         __U argument.
2931         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2932         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2933         return type as well as __M argument type and all casts from __mmask8
2934         to __mmask32.
2935         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2936         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2937         return type as well as __M argument type and all casts from __mmask8
2938         to __mmask16.
2939         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2940         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2941         return type as well as __M argument type and all casts from __mmask8
2942         to __mmask32.
2943         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2944         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2945         return type as well as __M argument type and all casts from __mmask8
2946         to __mmask16.
2947         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2948         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2949         __mmask16.
2951 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
2953         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2954         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2955         for __U argument.
2957 2018-07-11  Paul Koning  <ni1d@arrl.net>
2959         * doc/md.texi (define_subst): Document how multiple occurrences of
2960         the same argument in the replacement pattern are handled.
2962 2018-07-11  Paul Koning  <ni1d@arrl.net>
2964         * doc/extend.texi (Common Variable Attributes): Move "mode" into
2965         alphabetical order.
2966         (Common Type Attributes): Add "mode" attribute.
2968 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
2970         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2971         stream DECL_ORIGINAL_TYPE.
2972         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2973         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2974         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2975         Do not walk original type.
2976         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
2977         external decls.
2978         (write_ts_decl_non_common_tree_pointers): Do not stream
2979         DECL_ORIGINAL_TYPE
2980         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
2981         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2983 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
2985         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
2986         thread twice from the same starting edge.
2988 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
2990         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
2991         * gimple.c (gimple_call_nonnull_result_p): ...here...
2992         (gimple_call_nonnull_arg): ...and here.
2993         * gimple.h (gimple_call_nonnull_result_p): New.
2994         (gimple_call_nonnull_arg): New.
2996 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
2998         * config/arm/arm-cpus.in: Move information from fpu field of each
2999         cpu definition to the isa field.
3000         * config/arm/parsecpu.awk (fpu): Delete match rule.
3001         (gen_comm_data): Don't add bits from the CPU's FPU entry.
3003 2018-07-11  Richard Biener  <rguenther@suse.de>
3005         PR debug/86457
3006         * dwarf2out.c (init_sections_and_labels): Use
3007         output_asm_line_debug_info consistently.
3008         (dwarf2out_early_finish): Likewise.
3009         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3010         type units.
3012 2018-07-11  Richard Biener  <rguenther@suse.de>
3014         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3015         Rework father_bb setting in a way to avoid propagating constants
3016         multiple times on a loop body.
3018 2018-07-10  Mark Wielaard  <mark@klomp.org>
3020         PR debug/86459
3021         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3023 2018-07-10  Richard Biener  <rguenther@suse.de>
3025         * hash-map.h (hash_map::iterator::operator*): Return
3026         references to key and value.
3028 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
3030         PR c++/86443
3031         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3032         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3033         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3034         (gimplify_omp_for): For composite loops, move outer
3035         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3036         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
3037         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
3038         TREE_LIST for both the original class iterator and the "last" helper
3039         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
3040         loop, remember has_decl_expr from outer composite loops for the
3041         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
3043 2018-07-09  Martin Sebor  <msebor@redhat.com>
3045         PR middle-end/77357
3046         PR middle-end/86428
3047         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
3048         accessing implicitly initialized array elements.
3049         * expr.c (string_constant): Handle string initializers of
3050         character arrays within aggregates.
3051         * gimple-fold.c (fold_array_ctor_reference): Add argument.
3052         Store element offset.  As a special case, handle zero size.
3053         (fold_nonarray_ctor_reference): Same.
3054         (fold_ctor_reference): Add argument.  Store subobject offset.
3055         * gimple-fold.h (fold_ctor_reference): Add argument.
3057 2018-07-09  Paul Koning  <ni1d@arrl.net>
3059         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
3060         (pdp11_insn_cost): New function.
3061         (pdp11_md_asm_adjust): New function.
3062         (TARGET_INVALID_WITHIN_DOLOOP): Define.
3063         (pdp11_rtx_costs): Update to match machine better.
3064         (output_addr_const_pdp11): Correct format mismatch warnings.
3065         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
3066         * config/pdp11/pdp11.md: General change to add base_cost and/or
3067         length attributes for use by new pdp11_insn_cost function.
3068         (MIN_BRANCH): Correct definition.
3069         (MIN_SOB): Ditto.
3070         (doloop_end): Use standard pattern name for looping pattern.
3071         (doloop_end_nocc): New.
3072         (movsf): Add another constraint alternative.
3073         (zero_extendqihi2): Add constraint alternatives for not in place
3074         extend.
3075         (zero_extendhisi2): Remove.
3076         (shift patterns): Add CC handling variants.
3077         (bswaphi2): New.
3078         (bswapsi2): New.
3079         (rothi3): New.
3080         (define_peephole2): New peephole to recognize mov that sets CC for
3081         subsequent test.
3083 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3085         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
3086         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
3087         wi::add.
3089 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
3091         PR c/86420
3092         * real.c (real_nextafter): Return true if result is denormal.
3094 2018-07-09  Martin Liska  <mliska@suse.cz>
3096         * common.opt: Add back wrongly removed attribute.
3098 2018-07-09  Richard Biener  <rguenther@suse.de>
3100         PR debug/86413
3101         * dwarf2out.c (gen_block_die): For an early generated DIE
3102         always output high/low PC attributes.
3104 2018-07-09  Tom de Vries  <tdevries@suse.de>
3106         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
3107         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
3108         onto VAR_DECL with abstract origin.
3110 2018-07-07  Jim Wilson  <jimw@sifive.com>
3112         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
3114 2018-07-07  Tom de Vries  <tdevries@suse.de>
3116         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
3118 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
3120         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
3121         overflow_type.
3122         (combine_bound): Use wide-int overflow calculation instead of
3123         rolling our own.
3124         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
3125         overflow_type.
3126         * fold-const.c (int_const_binop_2): Same.
3127         (extract_muldiv_1): Same.
3128         (fold_div_compare): Same.
3129         (fold_abs_const): Same.
3130         * match.pd: Same.
3131         * poly-int.h (add): Same.
3132         (sub): Same.
3133         (neg): Same.
3134         (mul): Same.
3135         * predict.c (predict_iv_comparison): Same.
3136         * profile-count.c (slow_safe_scale_64bit): Same.
3137         * simplify-rtx.c (simplify_const_binary_operation): Same.
3138         * tree-chrec.c (tree_fold_binomial): Same.
3139         * tree-data-ref.c (split_constant_offset_1): Same.
3140         * tree-if-conv.c (idx_within_array_bound): Same.
3141         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
3142         * tree-ssa-phiopt.c (minmax_replacement): Same.
3143         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
3144         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
3145         * vr-values.c (vr_values::adjust_range_with_scev): Same.
3146         * wide-int.cc (wi::add_large): Same.
3147         (wi::mul_internal): Same.
3148         (wi::sub_large): Same.
3149         (wi::divmod_internal): Same.
3150         * wide-int.h: Change overflow type to overflow_type for neg, add,
3151         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
3152         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
3153         mul_internal, divmod_internal.
3154         (overflow_type): New enum.
3155         (accumulate_overflow): New.
3157 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
3159         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
3160         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
3162 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
3164         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
3165         argument is checked for zero before entering loop, avoid checking again.
3167 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
3169         * gimplify.h (generic_expr_could_trap_p): Set as global function.
3170         * gimplify.h (generic_expr_could_trap_p): Likwise.
3171         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
3173 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
3175         PR tree-optimization/86401
3176         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
3177         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
3178         (fold_bit_and_mask): ... here.  New helper function for match.pd.
3179         * fold-const.h (fold_bit_and_mask): Declare.
3180         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
3182 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
3184         PR target/86324
3185         * target.def (translate_mode_attribute): New hook.
3186         * targhooks.h (default_translate_mode_attribute): Declare.
3187         * targhooks.c (default_translate_mode_attribute): New function.
3188         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
3189         * doc/tm.texi: Regenerate.
3190         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
3191         (rs6000_translate_mode_attribute): New function.
3193 2018-07-06  Paul Koning  <ni1d@arrl.net>
3195         * doc/md.texi (define_split): Document DONE and FAIL.
3196         (define_peephole2): Ditto.
3198 2018-07-05  Jeff Law  <law@redhat.com>
3200         PR tree-optimization/86010
3201         * tree-ssa-dse.c (compute_trims): More aggressively trim at
3202         both the head and tail of mem* and str* calls.
3204 2018-07-05  Jim Wilson  <jimw@sifive.com>
3206         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
3208 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
3210         * config/aarch64/aarch64-simd.md: correct flags text for
3211         MIN_EXPR replacement.
3213 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
3215         * configure: Regenerated.
3217 2018-07-05  Carl Love  <cel@us.ibm.com>
3219         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3220         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3221         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3222         VSX_BUILTIN_DOUBLEL_V4SF.
3224 2018-07-05  Martin Sebor  <msebor@redhat.com>
3226         PR c++/86400
3227         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3228         than its domain to compute its the upper bound of a char array.
3230 2018-07-05  Nathan Sidwell  <nathan@acm.org>
3232         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
3233         * doc/cpp.texi: Update comment.
3234         * doc/tm.texi: Rebuilt.
3235         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
3236         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
3237         * doc/extend.texi (Backwards Compatibility): Clarify it is system
3238         headers affected by extern "C".
3239         * system.h: Poison NO_IMPLICIT_EXTERN_C.
3240         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
3241         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
3242         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
3243         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
3244         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
3245         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
3246         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
3247         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
3248         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
3249         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
3250         config/sparc/sp64-elf.h, config/spu/spu.h,
3251         config/stormy16/stormy16.h, config/v850/v850.h,
3252         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
3253         define NO_IMPLICIT_EXTERN_C.
3254         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
3256 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3258         PR target/84711
3259         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
3260         instead of GET_MODE_SIZE when comparing Units.
3262 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3264         PR target/84711
3265         * rtlanal.c (set_noop_p): Constrain on mode change,
3266         include hard-reg-set.h
3268 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3270         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
3272 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
3274         Revert
3275         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
3277         PR sanitizer/84250
3278         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3279         libasan.
3280         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3282 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
3284         PR sanitizer/84250
3285         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3286         libasan.
3287         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3289 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
3291         PR middle-end/86380
3292         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
3294 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
3296         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
3297         neg_*_op* variables.
3299 2018-07-04  Martin Liska  <mliska@suse.cz>
3301         * tree-switch-conversion.c: Define
3302         max_ratio_for_speed and max_ratio_for_size constants.
3304 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
3305             Martin Liska  <mliska@suse.cz>
3307         PR middle-end/66240
3308         PR target/45996
3309         PR c/84100
3310         * common.opt: Rename align options with 'str_' prefix.
3311         * common/config/i386/i386-common.c (set_malign_value): New
3312         function.
3313         (ix86_handle_option): Use it to set -falign-* options/
3314         * config/aarch64/aarch64-protos.h (struct tune_params): Change
3315         type from int to string.
3316         * config/aarch64/aarch64.c: Update default values from int
3317         to string.
3318         * config/alpha/alpha.c (alpha_override_options_after_change):
3319         Likewise.
3320         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
3321         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3322         max skip conditionally.
3323         * config/i386/freebsd.h (SUBALIGN_LOG): New.
3324         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3325         max skip conditionally.
3326         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3327         max skip conditionally.
3328         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
3329         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3330         max skip conditionally.
3331         * config/i386/i386.c (struct ptt): Change type from int to
3332         string.
3333         (ix86_default_align): Set default values.
3334         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
3335         max skip conditionally.
3336         * config/i386/iamcu.h (SUBALIGN_LOG): New.
3337         (ASM_OUTPUT_MAX_SKIP_ALIGN):
3338         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
3339         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3340         max skip conditionally.
3341         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
3342         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
3343         * config/i386/x86-64.h (SUBALIGN_LOG): New.
3344         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3345         max skip conditionally.
3346         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3347         * config/ia64/ia64.c (ia64_option_override): Set default values
3348         for alignment options.
3349         * config/m68k/m68k.c: Handle new str_align_* options.
3350         * config/mips/mips.c (mips_set_compression_mode): Change
3351         type of constants.
3352         (mips_option_override): Set default values for options.
3353         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3354         Likewise.
3355         * config/rs6000/rs6000.c (rs6000_option_override_internal):
3356         Likewise.
3357         * config/rx/rx.c (rx_option_override): Likewise.
3358         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
3359         (LABEL_ALIGN): Use align_labels_log.
3360         (LOOP_ALIGN): Use align_loops_align.
3361         * config/s390/s390.c (s390_asm_output_function_label): Use new
3362         macros.
3363         * config/sh/sh.c (sh_override_options_after_change):
3364         Change type of constants.
3365         * config/spu/spu.c (spu_sched_init): Likewise.
3366         * config/sparc/sparc.c (sparc_option_override): Set default
3367         values for options.
3368         * config/visium/visium.c (visium_option_override): Likewise.
3369         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
3370         emit p2align format with last argument if it's not needed.
3371         * doc/invoke.texi: Document extended format of -falign-*.
3372         * final.c: Use align_labels alignment.
3373         * flags.h (struct target_flag_state): Change type to use
3374         align_flags.
3375         (struct align_flags_tuple): New.
3376         (struct align_flags): Likewise.
3377         (align_loops_log): Redefine macro to use new types.
3378         (align_loops_max_skip): Redefine macro to use new types.
3379         (align_jumps_log): Redefine macro to use new types.
3380         (align_jumps_max_skip): Redefine macro to use new types.
3381         (align_labels_log): Redefine macro to use new types.
3382         (align_labels_max_skip): Redefine macro to use new types.
3383         (align_functions_log): Redefine macro to use new types.
3384         (align_loops): Redefine macro to use new types.
3385         (align_jumps): Redefine macro to use new types.
3386         (align_labels): Redefine macro to use new types.
3387         (align_functions): Redefine macro to use new types.
3388         (align_functions_max_skip): Redefine macro to use new types.
3389         (align_loops_value): New macro.
3390         (align_jumps_value): New macro.
3391         (align_labels_value): New macro.
3392         (align_functions_value): New macro.
3393         * function.c (invoke_set_current_function_hook): Propagate
3394         alignment values from flags to global variables default in
3395         topleev.h.
3396         * ipa-icf.c (sem_function::equals_wpa): Use
3397         cl_optimization_option_eq instead of memcmp.
3398         * lto-streamer.h (cl_optimization_stream_out): Support streaming
3399         of string types.
3400         (cl_optimization_stream_in): Likewise.
3401         * optc-save-gen.awk: Support strings in cl_optimization.
3402         * opth-gen.awk: Likewise.
3403         * opts.c (finish_options): Remove error checking of invalid
3404         value ranges.
3405         (MAX_CODE_ALIGN): Remove.
3406         (MAX_CODE_ALIGN_VALUE): Likewise.
3407         (parse_and_check_align_values): New function.
3408         (check_alignment_argument): Likewise.
3409         (common_handle_option): Use check_alignment_argument.
3410         * opts.h (parse_and_check_align_values): Declare.
3411         * toplev.c (init_alignments): Remove.
3412         (read_log_maxskip): New.
3413         (parse_N_M): Likewise.
3414         (parse_alignment_opts): Likewise.
3415         (backend_init_target): Remove usage of init_alignments.
3416         * toplev.h (parse_alignment_opts): Declare.
3417         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3418         argument.
3419         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3420         * tree.c (cl_option_hasher::equal): New.
3421         * varasm.c: Use new global macros.
3423 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
3425         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3426         Use a simpler align directive also if MAXSKIP = ALIGN-1.
3427         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3428         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3429         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3430         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3431         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3432         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
3433         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
3434         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3435         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3436         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3437         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3439 2018-07-04  Martin Liska  <mliska@suse.cz>
3440             Jonathan Wakely  <jwakely@redhat.com>
3442         * coverage.c: Use correct type.
3443         * doc/invoke.texi: Language correction.
3445 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
3447         PR target/85620
3448         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
3449         ENDBRANCH for non-tail call which may return via indirect branch.
3450         * doc/extend.texi: Document indirect_return attribute.
3452 2018-07-03  Martin Sebor  <msebor@redhat.com>
3454         PR tree-optimization/86274
3455         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3456         precondition.
3457         (format_floating): Correct handling of infinities and NaNs.
3459 2018-07-03  Martin Sebor  <msebor@redhat.com>
3461         * print-tree.c (print_real_cst): New function.
3462         (print_node_brief): Call it.
3463         (print_node): Ditto.
3465 2018-07-03  Jeff Law  <law@redhat.com>
3467         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
3468         into a single pattern.
3470         * config/h8300/h8300.md (ors code_iterator): New.
3471         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
3472         a single pattern and single splitter.
3473         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
3474         (iorqi3_1, xorqi3_1): Likewise.
3475         (iorqi3, xorqi3 expanders): Similarly.
3477         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
3478         (movmd_internal) into a single pattern using the P mode iterator.
3479         (movmd splitters): Similarly.
3480         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
3481         (movsd splitters): Similarly.
3483         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
3484         ADDB, ADDW and ADDL into a single ADD attribute which selects the
3485         right table based on the size of the operand.
3486         * config/h8300/h8300.md (length_table): Corresponding changes. All
3487         references to "addb", "addw" and "addl" changed to "add".
3488         (btst patterns): Merge two variants into a single pattern.
3489         (tstqi, tsthi): Likewise.
3490         (addhi3_incdec, addsi3_incdec): Likewise.
3491         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
3492         (mulhi3, mulsi3): Likewise.
3493         (udivhi3, udivsi3): Likewise.
3494         (divhi3, divsi3): Likewise.
3495         (andorqi3, andorhi3, andorsi3): Likewise.
3497 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
3499         PR target/85694
3500         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
3501         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
3503 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3505         PR tree-optimization/85694
3506         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
3507         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
3508         UNSPEC_URHADD.
3509         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
3510         (<u>avg<mode>3_ceil): New patterns.
3512 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
3514         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
3515         scan-tree-dump directive.
3516         * gcc.dg/vect/slp-perm-2.c: Likewise.
3517         * gcc.dg/vect/slp-perm-3.c: Likewise.
3518         * gcc.dg/vect/slp-perm-5.c: Likewise.
3519         * gcc.dg/vect/slp-perm-6.c: Likewise.
3520         * gcc.dg/vect/slp-perm-7.c: Likewise.
3521         * gcc.dg/vect/slp-perm-8.c: Likewise.
3523 2018-07-03  Marek Polacek  <polacek@redhat.com>
3525         PR middle-end/86202
3526         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3528 2018-07-03  Richard Biener  <rguenther@suse.de>
3530         PR ipa/86389
3531         * tree-ssa-structalias.c (find_func_clobbers): Properly
3532         handle indirect calls.
3534 2018-07-03  Jeff Law  <law@redhat.com>
3536         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
3537         (shifts): New code iterator.
3538         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
3539         expander.  Fix HImode handling on H8/SX.
3540         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
3541         (subqi3, subhi3, subsi3 expanders): Likewise.
3542         (andqi3, andhi3, andsi3 expanders): Likewise.
3543         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
3544         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
3545         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
3546         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
3547         (zero_extendqihi2, zero_extendqisi2): Likewise.
3548         (extendqihi2, extendqisi2): Likewise.
3549         (rotlqi3, rotlhi3, rotlsi3): Likewise.
3550         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
3551         (rotlqi3_1, rotlhi3_1): Likewise.
3552         (logicalhi3_sn, logicalsi3_sn): Likewise.
3553         (logicalhi3, logicalsi3): Likewise.
3555 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3557         * tree-vect-patterns.c (vect_recog_rotate_pattern)
3558         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3559         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3560         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3561         type to append_pattern_def_seq instead of creating a stmt_vec_info
3562         directly.
3563         (build_mask_conversion): Likewise.  Remove vinfo argument.
3564         (vect_add_conversion_to_patterm): Likewise, renaming to...
3565         (vect_add_conversion_to_pattern): ...this.
3566         (vect_recog_mask_conversion_pattern): Update call to
3567         build_mask_conversion.  Pass the vector type to
3568         append_pattern_def_seq here too.
3569         (vect_recog_gather_scatter_pattern): Update call to
3570         vect_add_conversion_to_pattern.
3572 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3574         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
3575         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3576         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
3577         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
3578         STMT_VINFO_PATTERN_DEF_SEQ to null here.
3579         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
3580         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
3581         append_pattern_def_seq instead of new_pattern_def_seq.
3582         (vect_recog_divmod_pattern): Do both of the above.
3583         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
3584         is null.
3586 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3588         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
3589         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
3590         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
3591         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
3592         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
3593         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3594         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
3595         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3596         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3597         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
3598         parameter with a single stmt_vec_info.
3599         (vect_recog_func_ptr): Likewise.
3600         (vect_recog_gather_scatter_pattern): Likewise, folding in...
3601         (vect_try_gather_scatter_pattern): ...this.
3602         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
3603         the stmt_vec_info of the statement to be matched.  Don't clear
3604         STMT_VINFO_RELATED_STMT.
3605         (vect_pattern_recog): Update call accordingly.
3607 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3609         PR tree-optimization/85694
3610         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
3611         (uavgM3_ceil): Document new optabs.
3612         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
3613         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
3614         functions.
3615         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
3616         (savg_ceil_optab): New optabs.
3617         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
3618         (vect_vect_recog_func_ptrs): Add it.
3619         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
3620         constant directly from the associated lhs.
3622 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3624         * tree-vect-patterns.c (vect_split_statement): New function.
3625         (vect_convert_input): Use it to try to split an existing cast.
3627 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3629         * poly-int.h (print_hex): New function.
3630         * dumpfile.h (dump_dec, dump_hex): Declare.
3631         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3632         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3633         min_input_precision, operation_precision and operation_sign.
3634         * tree-vect-patterns.c (vect_get_range_info): New function.
3635         (vect_same_loop_or_bb_p, vect_single_imm_use)
3636         (vect_operation_fits_smaller_type): Delete.
3637         (vect_look_through_possible_promotion): Add an optional
3638         single_use_p parameter.
3639         (vect_recog_over_widening_pattern): Rewrite to use new
3640         stmt_vec_info infomration.  Handle one operation at a time.
3641         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3642         (vect_truncatable_operation_p, vect_set_operation_type)
3643         (vect_set_min_input_precision): New functions.
3644         (vect_determine_min_output_precision_1): Likewise.
3645         (vect_determine_min_output_precision): Likewise.
3646         (vect_determine_precisions_from_range): Likewise.
3647         (vect_determine_precisions_from_users): Likewise.
3648         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3649         (vect_vect_recog_func_ptrs): Put over_widening first.
3650         Add cast_forwprop.
3651         (vect_pattern_recog): Call vect_determine_precisions.
3653 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3655         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3656         statements that have been replaced by further pattern statements.
3657         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3659 2018-07-03  Richard Biener  <rguenther@suse.de>
3661         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3662         always set *dt.  Dump vectype in vectype overload.
3663         * dumpfile.h (dump_gimple_expr): New function.
3664         (dump_gimple_expr_loc): Likewise.
3665         * dumpfile.c (dump_gimple_expr): New function.
3666         (dump_gimple_expr_loc): Likewise.
3668 2018-07-02  Jeff Law  <law@redhat.com>
3670         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3671         the H8/300, H8/300H and H8/S variants into a single pattern.
3672         (movhi_h8300, movqi_h8300hs): Similarly.
3673         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3674         (QHI mode iterator): New.
3676         * config/h8300/h8300.md: Remove trailing whitespace.
3678 2018-07-02  Jim Wilson  <jimw@sifive.com>
3680         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3681         instead of emit_insn for interrupt returns.
3682         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3683         (riscv_sret, riscv_uret): Likewise.
3685 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
3687         * pretty-print.c (selftest::test_pp_format): Move save and restore
3688         of quotes to class auto_fix_quotes, and add an instance.
3689         * selftest.c: Include "intl.h".
3690         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3691         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3692         * selftest.h (selftest::auto_fix_quotes): New class.
3694 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
3696         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3697         (aarch64_sve_prepare_conditional_op): Remove.
3698         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3699         Allow aarch64_simd_reg_or_zero as select operand; remove
3700         the aarch64_sve_prepare_conditional_op call.
3701         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3702         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3703         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3704         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3705         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3706         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3707         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3708         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3709         and a splitters to match all of the *_any patterns.
3710         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3712         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3713         (SVE_COND_FP_BINARY_REV): Remove.
3714         (sve_int_op_rev, sve_fp_op_rev): New.
3715         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3716         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3717         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3718         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3719         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3720         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3721         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3722         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3723         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3725         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3726         Remove match_dup 1 from the inner unspec.
3727         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3729         * config/aarch64/aarch64.md (movprfx): New attr.
3730         (length): Default movprfx to 8.
3731         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3732         (*madd<SVE_I>, *msub<SVE_I): Likewise.
3733         (*<su>mul<SVE_I>3_highpart): Likewise.
3734         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3735         (*v<ASHIFT><SVE_I>3): Likewise.
3736         (*<su><MAXMIN><SVE_I>3): Likewise.
3737         (*<su><MAXMIN><SVE_F>3): Likewise.
3738         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3739         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3740         (*div<SVE_F>4): Likewise.
3742 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
3744         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3745         in dump string.
3747 2018-07-02  Richard Biener  <rguenther@suse.de>
3749         PR tree-optimization/86363
3750         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3751         memset argument refers to a non-variable address.
3753 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
3755         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3756         {PLUS,MINUS}_EXPR code to...
3757         (adjust_symbolic_bound): ...here,
3758         (combine_bound): ...here,
3759         (set_value_range_with_overflow): ...and here.
3761 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
3763         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3764         code...
3765         (extract_range_from_abs_expr): ...here.
3767 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
3769         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3770         -fno-omit-frame-pointer when not optimizing.
3772 2018-07-02  Martin Liska  <mliska@suse.cz>
3774         PR ipa/86279
3775         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3776         (propagate_nothrow): Likewise.
3778 2018-07-02  Martin Liska  <mliska@suse.cz>
3780         PR ipa/86323
3781         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3783 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
3785         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3786         function in r262149, changing "loc" param from source_location to
3787         const dump_location_t &.
3788         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3789         declaration, as above.
3791 2018-07-01  Paul Koning  <ni1d@arrl.net>
3793         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3794         -munit-asm, -mgnu-asm, -mdec-asm.
3795         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3796         (pdp11_output_labelref): New.
3797         (pdp11_output_def): New.
3798         (pdp11_output_addr_vec_elt): New.
3799         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
3800         %# and %@ format codes.
3801         (pdp11_option_override): New.
3802         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3803         (pdp11_output_ident): New.
3804         (pdp11_asm_named_section): New.
3805         (pdp11_asm_init_sections): New.
3806         (pdp11_file_start): New.
3807         (pdp11_file_end): New.
3808         (output_ascii): Use .ascii/.asciz for -mdec-asm.
3809         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
3810         %o, like %c but octal.
3811         (pdp11_option_override): New.
3812         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3813         -mdec-asm.
3814         (DATA_SECTION_ASM_OP): Ditto.
3815         (READONLY_DATA_SECTION_ASM_OP): New.
3816         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3817         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3818         (ASM_OUTPUT_LABELREF): Ditto.
3819         (ASM_OUTPUT_DEF): Ditto.
3820         (ASM_OUTPUT_EXTERNAL): New.
3821         (ASM_OUTPUT_SOURCE_FILENAME): New.
3822         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3823         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3824         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
3825         %# and %@ format codes.
3826         * config/pdp11/pdp11.opt (mgnu-asm): New.
3827         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3828         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3829         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3831 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
3833         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3834         dereferencing path[] beyond its length.
3835         (debug_path): New.
3836         (debug_all_paths): New.
3837         (rewire_first_differing_edge): New.
3838         (adjust_paths_after_duplication): New.
3839         (duplicate_thread_path): Call adjust_paths_after_duplication.
3840         Add new argument.
3841         (thread_through_all_blocks): Add new argument to
3842         duplicate_thread_path.
3844 2018-06-30  Jim Wilson  <jimw@sifive.com>
3846         * config/riscv/predicates.md (p2m1_shift_operand): New.
3847         (high_mask_shift_operand): New.
3848         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3849         pattern using p2m1_shift_operand.
3850         (lshsi3_zero_extend_3+2): New combiner pattern using
3851         high_mask_shift_operand.
3853 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3855         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3856         split out from...
3857         (vect_recog_rotate_pattern): ...here.
3858         (vect_convert_input): Try to insert casts of invariants in the
3859         preheader.
3860         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3861         preheader to be empty.
3863 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3865         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3866         vector type.  If given, install it in the new statement's
3867         STMT_VINFO_VECTYPE.
3868         (vect_element_precision): New function.
3869         (vect_unpromoted_value): New struct.
3870         (vect_unpromoted_value::vect_unpromoted_value): New function.
3871         (vect_unpromoted_value::set_op): Likewise.
3872         (vect_look_through_possible_promotion): Likewise.
3873         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3874         (vect_widened_op_tree, vect_convert_input): Likewise.
3875         (vect_convert_inputs, vect_convert_output): Likewise.
3876         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3877         to handle the optional cast of the multiplication result and
3878         vect_widened_op_tree to detect the widened multiplication itself.
3879         Do not require the input and output of promotion casts to have
3880         the same sign, but base the signedness of the operation on the
3881         input rather than the result.  If the pattern includes two
3882         promotions, check that those promotions have the same sign.
3883         Do not restrict the MULT_EXPR handling to a double-width result;
3884         handle quadruple-width results and wider.  Use vect_convert_inputs
3885         to convert the inputs to the common type.
3886         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
3887         to handle the optional cast of the ABS result.  Also allow a sign
3888         change or a sign extension between the ABS and MINUS.
3889         Use vect_widened_op_tree to detect the widened subtraction and use
3890         vect_convert_inputs to convert the inputs to the common type.
3891         (vect_handle_widen_op_by_const): Delete.
3892         (vect_recog_widen_op_pattern): New function.
3893         (vect_recog_widen_mult_pattern): Use it.
3894         (vect_recog_widen_shift_pattern): Likewise.
3895         (vect_recog_widen_sum_pattern): Use
3896         vect_look_through_possible_promotion to handle the promoted
3897         PLUS_EXPR operand.
3899 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3901         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3902         the containing gimple_seq *.
3903         * gimple-iterator.h (gsi_for_stmt): Declare it.
3904         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3905         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3906         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3907         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3908         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3909         checks.
3910         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3911         split out from...
3912         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
3913         statement being replaced is part of an existing pattern
3914         definition sequence, inserting the new pattern statements before
3915         the original one.
3916         (vect_pattern_recog_1): Don't return a bool.  If the statement
3917         is already part of a pattern, instead apply pattern matching
3918         to the pattern definition statements.  Don't clear the
3919         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3920         (vect_pattern_recog): Don't break after the first match;
3921         continue processing the pattern definition statements instead.
3922         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3924 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3926         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3927         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3928         (vect_recog_widen_sum_pattern): Use it.
3930 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3932         * tree-vect-loop.c (vectorizable_reduction): Assert that the
3933         phi is not a pattern statement and has not been replaced by
3934         a pattern statement.
3935         * tree-vect-patterns.c (type_conversion_p): Don't check
3936         STMT_VINFO_IN_PATTERN_P.
3937         (vect_recog_vector_vector_shift_pattern): Likewise.
3938         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3939         the pattern statement rather than the original statement; check
3940         directly for a WIDEN_MULT_EXPR here.
3941         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3942         vect_is_simple_use to return the pattern statement rather
3943         than the original statement; use is_pattern_stmt_p to check
3944         for such a pattern statement.
3945         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3946         to return the pattern statement rather than the original statement;
3947         don't do the same transformation here.
3948         (vect_is_simple_use): If the defining statement has been replaced
3949         by a pattern statement, return the pattern statement instead.
3950         Remove the corresponding (local) transformation from the vectype
3951         overload.
3953 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3955         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3956         end and default to null.
3957         * tree-vect-loop.c (vect_create_epilog_for_reduction)
3958         (vectorizable_reduction): Update calls accordingly, dropping the
3959         gimple ** argument if the passed-back statement isn't needed.
3960         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3961         (vect_recog_rotate_pattern): Likewise.
3962         (vect_recog_mask_conversion_pattern): Likewise.
3963         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3964         (vect_mask_constant_operand_p): Likewise.
3965         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3966         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3967         (get_group_load_store_type, get_load_store_type): Likewise.
3968         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3969         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3970         (vectorizable_conversion, vectorizable_assignment): Likewise.
3971         (vectorizable_shift, vectorizable_operation): Likewise.
3972         (vectorizable_store, vect_is_simple_cond): Likewise.
3973         (vectorizable_condition, vectorizable_comparison): Likewise.
3974         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3975         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
3976         and move it to the end.  Cope with null def_stmt_outs.
3978 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3980         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
3982 2018-06-29  Jeff Law  <law@redhat.com>
3984         * config/v850/v850.c (v850_legitimate_address_p): Handle large
3985         displacements for TARGET_V850E2V3 and newer.
3986         (TARGET_LRA_P): Remove.  Defaults to LRA now.
3987         * config/v850/v850.md (sign23byte_load): Remove.
3988         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
3989         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
3991 2018-06-29  Martin Liska  <mliska@suse.cz>
3993         PR lto/85759
3994         * coverage.c (coverage_init): Mangle full path name.
3995         * doc/invoke.texi: Document the change.
3996         * gcov-io.c (mangle_path): New.
3997         * gcov-io.h (mangle_path): Likewise.
3998         * gcov.c (mangle_name): Use mangle_path for path mangling.
4000 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4002         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4003         if starting source register is not even.
4005 2018-06-29  Martin Liska  <mliska@suse.cz>
4007         PR tree-optimization/86263
4008         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4009         Make edge redirection.
4011 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
4013         * dumpfile.c (dump_loc): Add indentation based on scope depth.
4014         (dump_scope_depth): New variable.
4015         (get_dump_scope_depth): New function.
4016         (dump_begin_scope): New function.
4017         (dump_end_scope): New function.
4018         * dumpfile.h (get_dump_scope_depth): New declaration.
4019         (dump_begin_scope): New declaration.
4020         (dump_end_scope): New declaration.
4021         (class auto_dump_scope): New class.
4022         (AUTO_DUMP_SCOPE): New macro.
4023         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4024         AUTO_DUMP_SCOPE.
4026 2018-06-29  Richard Biener  <rguenther@suse.de>
4028         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4029         compute_all_dependences succeeds.
4030         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4031         exceed --param loop-max-datarefs-for-datadeps.
4033 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
4035         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4037 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
4039         PR target/86348
4040         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4041         alternative 0 in preferred_for_speed attribute.
4043 2018-06-28  Paul Koning  <ni1d@arrl.net>
4045         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
4046         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
4047         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
4048         * config/pdp11/pdp11.md: Correct "length" attribute calculation
4049         for shift insn patterns.
4051 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
4053         * cgraph.c (cgraph_node::get_body): Replace assignments to
4054         "dump_file" with calls to set_dump_file.
4055         * dumpfile.c (alt_dump_file): Make static, and group with...
4056         (alt_flags): ...this definition.
4057         (dumps_are_enabled): New variable.
4058         (refresh_dumps_are_enabled): New function.
4059         (set_dump_file): New function.
4060         (set_alt_dump_file): New function.
4061         (gcc::dump_manager::dump_start): Replace assignments to
4062         "dump_file" and "alt_dump_file" with calls to set_dump_file and
4063         set_alt_dump_file.
4064         (gcc::dump_manager::dump_finish): Likewise.
4065         * dumpfile.h (alt_dump_file): Delete decl.
4066         (dumps_are_enabled): New variable decl.
4067         (set_dump_file): New function decl.
4068         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
4069         global.
4070         * tree-nested.c (lower_nested_functions): Replace assignments to
4071         "dump_file" with calls to set_dump_file.
4073 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
4075         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4076         goto_locus of each outgoing edge of each basic block.
4078 2018-06-28  Richard Biener  <rguenther@suse.de>
4080         * dwarf2out.c (decl_scope_table): Remove.
4081         (push_decl_scope): Likewise.
4082         (pop_decl_scope): Likewise.
4083         (gen_type_die_for_member): Do not call push/pop_decl_scope.
4084         (gen_struct_or_union_type_die): Likewise.
4085         (gen_tagged_type_die): Likewise.
4086         (dwarf2out_init): Do not initialize decl_scope_table.
4087         (dwarf2out_c_finalize): Do not free it.
4089 2018-06-28  Richard Biener  <rguenther@suse.de>
4091         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
4092         deciding whether to not re-use a DIE.
4094 2018-06-28  Richard Biener  <rguenther@suse.de>
4096         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
4097         DW_AT_abstract_origin attribute.
4099 2018-06-28  Martin Liska  <mliska@suse.cz>
4101         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4102         Use newly introduced constants.
4103         * tree-switch-conversion.h (struct jump_table_cluster):
4104         Define max_ratio_for_size and max_ratio_for_speed.
4106 2018-06-28  Martin Liska  <mliska@suse.cz>
4108         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4109         Add new checking assert to catch invalid state.
4110         (jump_table_cluster::can_be_handled): Handle single case
4111         clusters.
4112         (jump_table_cluster::is_beneficial): Bail out for such case.
4113         (bit_test_cluster::find_bit_tests):
4114         Add new checking assert to catch invalid state.
4115         (bit_test_cluster::can_be_handled): Handle single case
4116         clusters.
4117         (bit_test_cluster::is_beneficial): Bail out for such case.
4118         (switch_decision_tree::analyze_switch_statement):
4119         Fix comment.
4121 2018-06-28  Martin Liska  <mliska@suse.cz>
4123         * common.opt: Introduce -completion option.
4124         * gcc.c (driver_handle_option): Handle it.
4125         (driver::main): Print completions if completion
4126         is set.
4127         * opt-suggestions.c (option_proposer::get_completions):
4128         New function.
4129         (option_proposer::suggest_completion): Likewise.
4130         (option_proposer::find_param_completions): Likewise.
4131         (verify_autocompletions): Likewise.
4132         (test_completion_valid_options): Likewise.
4133         (test_completion_valid_params): Likewise.
4134         (in_completion_p): Likewise.
4135         (empty_completion_p): Likewise.
4136         (test_completion_partial_match): Likewise.
4137         (test_completion_garbage): Likewise.
4138         (opt_proposer_c_tests): Likewise.
4139         * opt-suggestions.h: Declare new functions.
4140         * opts.c (common_handle_option): Handle OPT__completion_.
4141         * selftest-run-tests.c (selftest::run_tests): Add
4142         opt_proposer_c_tests.
4143         * selftest.c (assert_str_startswith): New.
4144         * selftest.h (assert_str_startswith): Likewise.
4145         (opt_proposer_c_tests): New.
4146         (ASSERT_STR_STARTSWITH): Likewise.
4148 2018-06-28  Martin Liska  <mliska@suse.cz>
4150         * Makefile.in: Add opt-suggestions.o.
4151         * gcc-main.c: Include opt-suggestions.h.
4152         * gcc.c (driver::driver): Likewise.
4153         (driver::~driver): Remove m_option_suggestions.
4154         (driver::build_option_suggestions): Moved to option_proposer.
4155         (driver::suggest_option): Likewise.
4156         (driver::handle_unrecognized_options): Use option_proposer.
4157         * gcc.h (class driver): Add new memver m_option_proposer.
4158         * opt-suggestions.c: New file.
4159         * opt-suggestions.h: New file.
4161 2018-06-28  Martin Liska  <mliska@suse.cz>
4163         * vec.h (class auto_string_vec): New (moved from auto_argvec).
4164         (auto_string_vec::~auto_string_vec): Likewise.
4166 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
4168         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
4169         prevent_decl_creation_for_types fields up and add reset_location field.
4170         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
4171         statement if id->reset_location is true.
4172         (copy_edges_for_bb): Do not set goto_locus on the new edges if
4173         id->reset_location is true.
4174         (copy_phis_for_bb): Force input_location on the arguments if
4175         id->reset_location is true.
4176         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
4177         is set on the function to be inlined.
4179 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
4181         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
4183 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
4185         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
4186         registers for Pmode.
4187         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
4188         hard registers for the clobbered pseudo.
4190 2018-06-27  Paul Koning  <ni1d@arrl.net>
4192         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4193         mutually exclusive options.
4194         * config/pdp11/constraints.md (h): New constraint.
4195         (O): Update definition to match shift code generation.
4196         (D): New constraint.
4197         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
4198         (CCFP): Remove.
4199         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
4200         function.
4201         (output_jump): Change arguments.
4202         (pdp11_fixed_cc_regs): New function.
4203         (pdp11_cc_mode): Ditto.
4204         (pdp11_expand_shift): Ditto.
4205         (pdp11_assemble_shift): Ditto.
4206         (pdp11_small_shift): Ditto.
4207         (pdp11_branch_cost): Remove.
4208         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
4209         from output.
4210         (pdp11_register_move_cost): Update for CC registers.
4211         (pdp11_rtx_costs): Add case for LSHIFTRT.
4212         (pdp11_output_jump): Add CCNZ mode conditional branches.
4213         (notice_update_cc_on_set): Remove.
4214         (pdp11_cc_mode): New function.
4215         (simple_memory_operand): Correct pre/post decrement case.
4216         (no_side_effect_operand): New function.
4217         (pdp11_regno_reg_class): Add CC_REGS class.
4218         (pdp11_fixed_cc_regs): New function.
4219         (pdp11_small_shift): New function.
4220         (pdp11_expand_shift): New function to expand shift insns.
4221         (pdp11_assemble_shift): New function to output shifts.
4222         (pdp11_branch_cost): Remove.
4223         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
4224         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
4225         (WCHAR_TYPE): Ditto.
4226         (PTRDIFF_TYPE): Ditto.
4227         (ADJUST_INSN_LENGTH): New macro.
4228         (FIXED_REGISTERS): Add CC registers.
4229         (CALL_USED_REGISTERS): Ditto.
4230         (reg_class): Ditto.
4231         (REG_CLASS_NAMES): Ditto.
4232         (REG_CLASS_CONTENTS): Ditto.
4233         (SELECT_CC_MODE): Use new function.
4234         (TARGET_FLAGS_REGNUM): New macro.
4235         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
4236         (cc0_reg_rtx): Remove.
4237         (CC_STATUS_MDEP): Remove.
4238         (CC_STATUS_MDEFP_INIT): Remove.
4239         (CC_IN_FPU): Remove.
4240         (NOTICE_UPDATE_CC): Remove.
4241         (REGISTER_NAMES): Add CC registers.
4242         (BRANCH_COST): Change to constant 1.
4243         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
4244         handling.
4245         * config/pdp11/pdp11.opt (mbcopy): Remove.
4246         (mbcopy-builtin): Remove.
4247         (mbranch-cheap): Remove.
4248         (mbranch-expensive): Remove.
4249         * config/pdp11/predicates.md (expand_shift_operand): Update to
4250         match shift code generation.
4251         (ccnz_operator): New predicate.
4252         * doc/invoke.texi (PDP-11 Options): Remove deleted options
4253         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
4254         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
4255         exclusive options.
4256         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
4257         description of O constraint.
4259 2018-06-27  Jeff Law  <law@redhat.com>
4260             Austin Law  <austinklaw@gmail.com>
4262         * config/v850/v850.md (addsi3_set_flags): New pattern.
4263         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
4264         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
4265         (zero_extendhisi2_v850_set_flags): Likewise.
4266         (zero_extendqisi2_v850_set_flags): Likewise.
4267         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
4268         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
4269         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
4271         * config/v850/v850-protos.h (notice_update_cc): Remove.
4272         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
4273         (v850_print_operand): Handle 'D' and "d".
4274         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
4275         Add handling of arithmetic/logical operations compared against zero.
4276         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
4277         Do not look at v850_compare_op, instead get mode from last argument.
4278         (v850_gen_compare): Remove
4279         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
4280         after reload for prologue insns.
4281         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
4282         patterns.
4283         (construct_save_jarl): Likewise.
4284         (TARGET_FLAGS_REGNUM): Define.
4285         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
4286         (NOTICE_UPDATE_CC): Remove.
4287         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
4288         than cc0.  Conditionalize on reload_completed.
4289         (cmpsi_insn, setfcc_insn): Likewise.
4290         (tst1 splitter): Turn into define_and_split which sets the flags
4291         after reload.
4292         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
4293         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
4294         (cstoresf4, cstoredf4): Clobber the flags.
4295         (cmpsi, cmpsf, cmpdf): Remove expanders.
4296         (setf_insn): Remove pattern.
4297         (addsi3): Turn into define_and_split which clobbers the flags after
4298         reload and a suitable pattern (addsi3_clobber_flags) for use after
4299         reload.
4300         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
4301         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
4302         (ashrsi3, ashrsi3_v850e2): Likewise.
4303         (bins): Clobber the flags.
4304         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
4305         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
4306         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
4307         (call_value_internal_short, call_value_internal_long): Likewise.
4308         (callt_save_interrupt, callt_return_interrupt): Likewise.
4309         (save_interrupt, return_interrupt): Likewise.
4310         (callt_save_all_interrupt, save_all_interrupt): Likewise.
4311         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
4312         (restore_all_interrupt, _restore_all_interrupt): Likewise.
4313         (All FP comparisons): Only allow after reload has completed.
4314         (trfsr): Likewise.
4315         (divh, divhu): Tweak output template.
4316         (branch_z_normal, branch_z_invert): Remove
4317         (branch_nz_normal, branch_nz_invert): Likewise.
4318         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
4320         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
4321         * config/v850/v850.c (notice_update_cc): Remove.
4322         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
4323         (CC_NO_CARRY): Likewise.
4324         (NOTICE_UPDATE_CC): Define to nothing.
4325         * config/v850/v850.md: Remove block comment on cc0 handling
4326         Remove "cc" attribute from all patterns.  Remove cc_status handling
4327         from all patterns.  Minor formatting fixes.
4329 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4331         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
4332         (cortex-a76.cortex-a55): Likewise.
4333         * config/aarch64/aarch64-tune.md: Regenerate.
4334         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
4335         cortex-a76.cortex-a55.
4337 2018-06-27  Jeff Law  <law@redhat.com>
4339         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
4340         (MULTILIB_DIRNAMES): Similarly.
4342 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
4344         * gimple.h (gimple_return_retbnd): Delete.
4345         (gimple_return_set_retbnd): Likewise.
4346         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
4347         gimple_return_set_retbnd.
4348         * gimple-pretty-print.c (dump_gimple_return): Remove call to
4349         gimple_return_retbnd and adjust.
4350         * tree-inline.h (struct copy_body_data): Remove retbnd field.
4351         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
4352         Explicitly return NULL in a couple more cases.  Move assertion
4353         on debug statements and remove unreachable code.
4354         (reset_debug_binding): Do not test id->retbnd.
4355         (expand_call_inline): Do not set it.
4357 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4359         * configure.ac: Add --disable-gcov option.
4360         * configure: Regenerate.
4361         * Makefile.in: Honour @enable_gcov@.
4362         * doc/install.texi: Document --disable-gcov.
4364 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4366         * config/arm/arm-cpus.in (cortex-a76): New entry.
4367         (cortex-a76.cortex-a55): Likewise.
4368         * config/arm/arm-tables.opt: Regenerate.
4369         * config/arm/arm-tune.md: Likewise.
4370         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
4371         * doc/invoke.texi (ARM Options): Document cortex-a76 and
4372         cortex-a76.cortex-a55.
4374 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
4376         PR target/85769
4377         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
4379 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
4381         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4382         comment.
4383         (EPILOGUE_USES): Likewise.
4385 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
4387         * tree-inline.c (remap_location): New function extracted from...
4388         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
4389         (copy_phis_for_bb): ...here.  Call remap_location.
4390         (copy_cfg_body): Adjust call to copy_edges_for_bb.
4392 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
4394         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4395         unaligned vsx for 16B memset.
4397 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
4399         PR target/86285
4400         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4401         ieee128_float_type_node to long_double_type_node unless
4402         TARGET_LONG_DOUBLE_128 is set.
4404 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
4406         * cfgloop.c (get_loop_location): Convert return type from
4407         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4408         by implicit construction from rtx_insn *, and using
4409         dump_user_location_t::from_function_decl for the fallback case.
4410         * cfgloop.h (get_loop_location): Convert return type from
4411         location_t to dump_user_location_t.
4412         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4413         dump_printf_loc to pass in a dump_location_t rather than a
4414         location_t, via the gimple stmt.
4415         * coverage.c (get_coverage_counts): Update calls to
4416         dump_printf_loc to pass in dump_location_t rather than a
4417         location_t.
4418         * doc/optinfo.texi (Dump types): Convert example of
4419         dump_printf_loc from taking "locus" to taking "insn".  Update
4420         description of the "_loc" calls to cover dump_location_t.
4421         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4422         "selftest.h".
4423         (dump_user_location_t::dump_user_location_t): New constructors,
4424         from gimple *stmt and rtx_insn *.
4425         (dump_user_location_t::from_function_decl): New function.
4426         (dump_loc): Make static.
4427         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4428         const dump_location_t &.
4429         (dump_generic_expr_loc): Delete.
4430         (dump_printf_loc): Convert param "loc" from location_t to
4431         const dump_location_t &.
4432         (selftest::test_impl_location): New function.
4433         (selftest::dumpfile_c_tests): New function.
4434         * dumpfile.h: Include "profile-count.h".
4435         (class dump_user_location_t): New class.
4436         (struct dump_impl_location_t): New struct.
4437         (class dump_location_t): New class.
4438         (dump_printf_loc): Convert 2nd param from source_location to
4439         const dump_location_t &.
4440         (dump_generic_expr_loc): Delete.
4441         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
4442         const dump_location_t &.
4443         * gimple-fold.c (fold_gimple_assign): Update call to
4444         dump_printf_loc to pass in a dump_location_t rather than a
4445         location_t, via the gimple stmt.
4446         (gimple_fold_call): Likewise.
4447         * gimple-loop-interchange.cc
4448         (loop_cand::analyze_iloop_reduction_var): Update for change to
4449         check_reduction_path.
4450         (tree_loop_interchange::interchange): Update for change to
4451         find_loop_location.
4452         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
4453         change in return-type of find_loop_location.
4454         (graphite_regenerate_ast_isl): Likewise.
4455         * graphite-optimize-isl.c (optimize_isl): Likewise.
4456         * graphite.c (graphite_transform_loops): Likewise.
4457         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
4458         pass in a dump_location_t rather than a location_t, via the
4459         gimple stmt.
4460         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4461         * ipa.c (walk_polymorphic_call_targets): Likewise.
4462         * loop-unroll.c (report_unroll): Convert "locus" param from
4463         location_t to dump_location_t.
4464         (decide_unrolling): Update for change to get_loop_location's
4465         return type.
4466         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
4467         location_t to dump_user_location_t.
4468         (grid_find_single_omp_among_assignments_1): Updates calls to
4469         dump_printf_loc to pass in a dump_location_t rather than a
4470         location_t, via the gimple stmt.
4471         (grid_parallel_clauses_gridifiable): Convert "tloc" from
4472         location_t to dump_location_t.  Updates calls to dump_printf_loc
4473         to pass in a dump_location_t rather than a location_t, via the
4474         gimple stmt.
4475         (grid_inner_loop_gridifiable_p): Likewise.
4476         (grid_dist_follows_simple_pattern): Likewise.
4477         (grid_gfor_follows_tiling_pattern): Likewise.
4478         (grid_target_follows_gridifiable_pattern): Likewise.
4479         (grid_attempt_target_gridification): Convert initialization
4480         of local "grid" from memset to zero-initialization; FIXME: does
4481         this require C++11?  Update call to dump_printf_loc to pass in a
4482         optinfo_location rather than a location_t, via the gimple stmt.
4483         * profile.c (read_profile_edge_counts): Updates call to
4484         dump_printf_loc to pass in a dump_location_t rather than a
4485         location_t
4486         (compute_branch_probabilities): Likewise.
4487         * selftest-run-tests.c (selftest::run_tests): Call
4488         dumpfile_c_tests.
4489         * selftest.h (dumpfile_c_tests): New decl.
4490         * tree-loop-distribution.c (pass_loop_distribution::execute):
4491         Update for change in return type of find_loop_location.
4492         * tree-parloops.c (parallelize_loops): Likewise.
4493         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
4494         "locus" from location_t to dump_user_location_t.
4495         (canonicalize_loop_induction_variables): Likewise.
4496         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
4497         for change in return type of find_loop_location.
4498         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
4499         to dump_printf_loc to pass in a dump_location_t rather than a
4500         location_t, via the stmt.
4501         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
4502         Likewise.
4503         * tree-vect-loop-manip.c (find_loop_location): Convert return
4504         type from source_location to dump_user_location_t.
4505         (vect_do_peeling): Update for above change.
4506         (vect_loop_versioning): Update for change in type of
4507         vect_location.
4508         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
4509         from location_t to dump_user_location_t.
4510         (vect_estimate_min_profitable_iters): Update for change in type
4511         of vect_location.
4512         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
4513         location_t to dump_location_t.
4514         (vect_slp_bb): Update for change in type of vect_location.
4515         * tree-vectorizer.c (vect_location): Convert from source_location
4516         to dump_user_location_t.
4517         (try_vectorize_loop_1): Update for change in vect_location's type.
4518         (vectorize_loops): Likewise.
4519         (increase_alignment): Likewise.
4520         * tree-vectorizer.h (vect_location): Convert from source_location
4521         to dump_user_location_t.
4522         (find_loop_location): Convert return type from source_location to
4523         dump_user_location_t.
4524         (check_reduction_path): Convert 1st param from location_t to
4525         dump_user_location_t.
4526         * value-prof.c (check_counter): Update call to dump_printf_loc to
4527         pass in a dump_user_location_t rather than a location_t; update
4528         call to error_at for change in type of "locus".
4529         (check_ic_target): Update call to dump_printf_loc to
4530         pass in a dump_user_location_t rather than a location_t, via the
4531         call_stmt.
4533 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
4535         * config/s390/s390.h (enum processor_flags): Do not use
4536         default tune parameter when -march was specified.
4538 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
4540         PR target/86314
4541         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
4542         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
4543         operands.
4545 2018-06-26  Richard Biener  <rguenther@suse.de>
4547         PR tree-optimization/86287
4548         PR bootstrap/86316
4549         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
4550         (vect_analyze_loop): Initialize n_stmts.
4552 2018-06-26  Richard Biener  <rguenther@suse.de>
4554         PR middle-end/86271
4555         * fold-const.c (fold_convertible_p): Pointer extension
4556         isn't valid.
4558 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
4560         PR debug/86064
4561         * dwarf2out.c (loc_list_has_views): Adjust comments.
4562         (dw_loc_list): Split single cross-partition range with
4563         nonzero locview.
4565 2018-06-25  Jeff Law  <law@redhat.com>
4567         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4568         on -mbig-switch by default.
4570         * config/v850/predicates.md (const_float_1_operand): Fix match_code
4571         test.
4572         (const_float_0_operand): Remove unused predicate.
4573         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
4574         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
4575         (recipsf2): New expander.  Original pattern now called
4576         (recipsf2_insn).
4577         (recipdf2, recipdf2_insn): Similarly.
4578         (rsqrtsf2, rsqrtsf2_insn): Similarly
4579         (rsqrtdf2, rsqrtdf2_insn): Similarly
4581 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
4583         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
4584         Simplify logic for FreeBSD (twice).
4586 2018-06-25  Martin Sebor  <msebor@redhat.com>
4588         PR tree-optimization/86204
4589         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
4590         a strnlen result if it's less than the length of the string.
4592 2018-06-25  Martin Sebor  <msebor@redhat.com>
4594         PR tree-optimization/85700
4595         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
4596         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
4597         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
4599 2018-06-25  Martin Sebor  <msebor@redhat.com>
4601         * doc/extend.texi (Zero-length arrays): Update and clarify.
4603 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
4605         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
4606         added IEEE/IBM long double multilib support on PowerPC little
4607         endian Linux systems.
4608         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
4609         (MULTILIB_DEFAULTS): Likewise.
4610         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4611         Likewise.
4612         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
4613         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
4614         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
4616 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
4618         PR middle-end/86311
4619         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
4620         (REORDER_45): Likewise.
4622 2018-06-25  Jeff Law  <law@redhat.com>
4624         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
4625         dividend to 32 bits.  Adjust length.
4626         (udivmodhi4): Cleanup output template.  Fix length.
4628 2018-06-25  Carl Love  <cel@us.ibm.com>
4630         * config/rs6000/vsx.md: Change word selector to prefered location.
4632 2018-06-25  Richard Biener  <rguenther@suse.de>
4634         PR tree-optimization/86304
4635         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4636         epilogue-if-converted loops as well.
4638 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
4640         * lto-section-out.c (lto_begin_section): Do not print section
4641         name for noaddr and unnumbered dumps.
4643 2018-06-25  Richard Biener  <rguenther@suse.de>
4645         * tree-vectorizer.h (struct vec_info_shared): New structure
4646         with parts split out from struct vec_info and loop_nest from
4647         struct _loop_vec_info.
4648         (struct vec_info): Adjust accordingly.
4649         (struct _loop_vec_info): Likewise.
4650         (LOOP_VINFO_LOOP_NEST): Adjust.
4651         (LOOP_VINFO_DATAREFS): Likewise.
4652         (LOOP_VINFO_DDRS): Likewise.
4653         (struct _bb_vec_info): Likewise.
4654         (BB_VINFO_DATAREFS): Likewise.
4655         (BB_VINFO_DDRS): Likewise.
4656         (struct _stmt_vec_info): Add dr_aux member.
4657         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4658         (DR_MISALIGNMENT_UNINITIALIZED): New.
4659         (set_dr_misalignment): Adjust.
4660         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4661         (vect_analyze_loop): Adjust prototype.
4662         (vect_analyze_loop_form): Likewise.
4663         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4664         Compute dependences lazily.
4665         (vect_record_base_alignments): Use shared datarefs/ddrs.
4666         (vect_verify_datarefs_alignment): Likewise.
4667         (vect_analyze_data_refs_alignment): Likewise.
4668         (vect_analyze_data_ref_accesses): Likewise.
4669         (vect_analyze_data_refs): Likewise.
4670         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4671         constructor parameter for shared part.
4672         (vect_analyze_loop_form): Pass in shared part and adjust.
4673         (vect_analyze_loop_2): Pass in storage for the number of
4674         stmts.  Move loop nest finding to the caller.  Compute
4675         datarefs lazily.
4676         (vect_analyze_loop): Pass in shared part.
4677         (vect_transform_loop): Verify shared datarefs are unchanged.
4678         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4679         constructor parameter for shared part.
4680         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4681         (vect_slp_bb): Verify shared datarefs are unchanged before
4682         transform.
4683         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4684         change.
4685         (new_stmt_vec_info): Initialize DR_AUX misalignment to
4686         DR_MISALIGNMENT_UNINITIALIZED.
4687         * tree-vectorizer.c (vec_info::vec_info): Add constructor
4688         parameter for shared part.
4689         (vec_info::~vec_info): Adjust.
4690         (vec_info_shared::vec_info_shared): New.
4691         (vec_info_shared::~vec_info_shared): Likewise.
4692         (vec_info_shared::save_datarefs): Likewise.
4693         (vec_info_shared::check_datarefs): Likewise.
4694         (try_vectorize_loop_1): Construct shared part live for analyses
4695         of a single loop for multiple vector sizes.
4696         * tree-parloops.c (gather_scalar_reductions): Adjust.
4698 2018-06-25  Richard Biener  <rguenther@suse.de>
4700         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4701         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4702         (vect_analyze_data_refs): Remove similar code from here and
4703         simplify accordingly.
4705 2018-06-25  Richard Biener  <rguenther@suse.de>
4707         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4708         for reverse storage order accesses rather than asserting
4709         they cannot happen here.
4711 2018-06-25  Tom de Vries  <tdevries@suse.de>
4713         PR debug/86257
4714         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4715         Use data16 instead of .byte for insn prefix.
4717 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
4719         PR C++/86082
4720         * parser.c (make_char_string_pack): Pass this literal chars
4721         through cpp_interpret_string.
4722         (cp_parser_userdef_numeric_literal): Check the result of
4723         make_char_string_pack.
4725 2018-06-24  Maya Rashish  <coypu@sdf.org>
4727         * ginclude/stddef.h: Simplify conditions around avoiding
4728         re-definition of __size_t.
4730 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
4732         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4733         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4735 2018-06-22  Maya Rashish  <coypu@sdf.org>
4737         * doc/invoke.texi (mno-fancy-math-387): Update for changes
4738         made to OpenBSD and NetBSD through the years.
4740 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4742         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4743         behavior of vec_pack (vector double, vector double) to match
4744         behavior of vec_float2 (vector double, vector double).
4746 2018-06-22  Olivier Hainque  <hainque@adacore.com>
4748         * gimplify.c (gimplify_function_tree): Prevent creation
4749         of a trampoline for the address of the current function
4750         passed to entry/exit instrumentation hooks.
4752 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
4754         PR target/86222
4755         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4756         correctly.
4758 2018-06-22  Martin Liska  <mliska@suse.cz>
4760         PR tree-optimization/86263
4761         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4762         Bail out if is_enabled is false.
4763         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4764         New declaration.
4765         (jump_table_cluster::is_enabled): New function.
4767 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
4769         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4770         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4771         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4772         (lto_input_ts_binfo_tree_pointers): Likewise.
4773         * tree-streamer-out.c (streamer_write_tree_bitfields,
4774         write_ts_binfo_tree_pointers): Likewise.
4775         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4777 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
4779         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4781 2018-06-22  Martin Liska  <mliska@suse.cz>
4783         * symbol-summary.h (get): Make it pure and inline move
4784         functionality from ::get function.
4785         (get): Remove and inline into ::get and ::get_create.
4786         (get_create): Move code from ::get function.
4788 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4790         PR target/85994
4791         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4792         -x assembler-with-cpp.
4794 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4796         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4797         _FILE_OFFSET_BITS=64 for C++.
4799 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
4801         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4802         conversion insn that shows up when pr85657-3.c is compiled using
4803         IEEE 128-bit long double.
4804         (neg<mode>2_internal): Use the correct mode to check whether the
4805         mode is IBM extended.
4806         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4807         multiply and divide external functions from being created more
4808         than once.
4810 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
4812         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4813         functions.
4814         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
4815         the edge can be forwarded.
4816         (cfg_layout_merge_blocks): Likewise.
4818 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
4820         * except.c (finish_eh_generation): Commit edge insertions only after
4821         the EH edges have been redirected from post-landing to landing pads.
4823 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
4825         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4826         create_tmp_var_for to create the FRAME decl.
4827         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4829 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
4831         * tree-inline.c (copy_edges_for_bb): Minor tweak.
4832         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4833         debug statement when resetting its value.
4834         (expand_call_inline): Copy the locus of the call onto the assignment
4835         of the return value, if any.  Use local variable in more cases.
4837 2018-06-21  Martin Liska  <mliska@suse.cz>
4839         * ipa-pure-const.c (propagate_nothrow): Use
4840         funct_state_summaries->get.
4841         (dump_malloc_lattice): Likewise.
4842         (propagate_malloc): Likewise.
4844 2018-06-21  Richard Biener  <rguenther@suse.de>
4846         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4847         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4848         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4849         comment.
4850         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4851         BLOCK_ABSTRACT_ORIGIN unconditionally.
4853 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
4855         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4856         deleting it.
4857         * ipa-reference.c (ipa_reference_c_finalize): Delete
4858         ipa_ref_opt_sum_summaries and set it to NULL.
4860 2018-06-21  Tom de Vries  <tdevries@suse.de>
4862         PR tree-optimization/85859
4863         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4864         test with comment from bb_no_side_effects_p.
4866 2018-06-21  Richard Biener  <rguenther@suse.de>
4868         PR tree-optimization/86232
4869         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4870         max for constant niter.
4872 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4874         * config/aarch64/aarch64-simd.md
4875         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4877 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4879         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4880         Make opernads of the unspec commutative.
4882 2018-06-21  Richard Biener  <rguenther@suse.de>
4884         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4885         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4886         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4887         (vect_analyze_data_ref_dependence): Re-order checks to deal with
4888         NULL DR_STEP.
4889         (vect_record_base_alignments): Do not record base alignment
4890         for gathers or scatters.
4891         (vect_compute_data_ref_alignment): Drop return value that is always
4892         true.  Bail out early for gathers or scatters.
4893         (vect_enhance_data_refs_alignment): Bail out early for gathers
4894         or scatters.
4895         (vect_find_same_alignment_drs): Likewise.
4896         (vect_analyze_data_refs_alignment): Remove dead code.
4897         (vect_slp_analyze_and_verify_node_alignment): Likewise.
4898         (vect_analyze_data_refs): For possible gathers or scatters do
4899         not create an alternate DR, just check their possible validity
4900         and mark them.  Adjust DECL_NONALIASED handling to not rely
4901         on DR_BASE_ADDRESS.
4902         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4903         update inits of gathers or scatters.
4904         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4905         Also copy gather/scatter flag to pattern vinfo.
4907 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4909         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4910         behavior of vec_packsu (vector unsigned long long, vector unsigned
4911         long long) to match behavior of vec_packs with same signature.
4913 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
4914             Thomas Schwinge <thomas@codesourcery.com>
4915             Cesar Philippidis  <cesar@codesourcery.com>
4917         * gimplify.c (gimplify_scan_omp_clauses): Add support for
4918         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4919         (gimplify_adjust_omp_clauses): Likewise.
4920         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4921         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4922         (gimplify_omp_target_update): Update handling of acc update and
4923         enter/exit data.
4924         * omp-low.c (install_var_field): Remove unused parameter
4925         base_pointers_restrict.
4926         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4927         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4928         FINALIZE}
4929         (omp_target_base_pointers_restrict_p): Delete.
4930         (scan_omp_target): Update call to scan_sharing_clauses.
4931         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4932         FINALIZE}.
4933         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4934         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4935         (convert_local_omp_clauses): Likewise.
4936         * tree-pretty-print.c (dump_omp_clause): Likewise.
4937         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
4938         FINALIZE}.
4939         (omp_clause_code_name): Likewise.
4941 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
4943         PR debug/86194
4944         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4945         be narrowed.
4947         PR tree-optimization/86231
4948         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
4949         anti-range don't overwrite *vr0min before using it to compute *vr0max.
4951 2018-06-20  Tom de Vries  <tdevries@suse.de>
4953         PR tree-optimization/86097
4954         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4955         iv type if signedness of iv type is not the same as that of *nit.
4957 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
4959         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
4960         EDGE_EH edges, verify they are all EDGE_EH.
4962 2018-06-20  Maya Rashish  <coypu@sdf.org>
4964         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4966 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4968         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4969         * config/aarch64/aarch64.c (xgene1_tunings): Add
4970         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4971         (aarch64_mode_valid_for_sched_fusion_p):
4972         Allow 16-byte modes.
4973         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4974         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4975         128-bit modes.
4976         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
4977         New pattern.
4978         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
4979         * config/aarch64/iterators.md (VQ2): New mode iterator.
4981 2018-06-20  Martin Liska  <mliska@suse.cz>
4983         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4984         Change default ratio from 10 to 8.
4986 2018-06-20  Martin Liska  <mliska@suse.cz>
4988         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4989         New.
4990         (bit_test_cluster::find_bit_tests): Likewise.
4991         (switch_decision_tree::analyze_switch_statement): Find clusters.
4992         * tree-switch-conversion.h (struct jump_table_cluster): Document
4993         hierarchy.
4995 2018-06-20  Martin Liska  <mliska@suse.cz>
4997         * tree-switch-conversion.c (switch_conversion::collect):
4998         Record m_uniq property.
4999         (switch_conversion::expand): Bail out for special conditions.
5000         (group_cluster::~group_cluster): New.
5001         (group_cluster::group_cluster): Likewise.
5002         (group_cluster::dump): Likewise.
5003         (jump_table_cluster::emit): New.
5004         (switch_decision_tree::fix_phi_operands_for_edges): New.
5005         (struct case_node): Remove struct.
5006         (jump_table_cluster::can_be_handled): New.
5007         (case_values_threshold): Moved to header.
5008         (reset_out_edges_aux): Likewise.
5009         (jump_table_cluster::is_beneficial): New.
5010         (bit_test_cluster::can_be_handled): Likewise.
5011         (add_case_node): Remove.
5012         (bit_test_cluster::is_beneficial): New.
5013         (case_bit_test::cmp): New.
5014         (bit_test_cluster::emit): New.
5015         (expand_switch_as_decision_tree_p): Remove.
5016         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5017         (fix_phi_operands_for_edge): Likewise.
5018         (switch_decision_tree::analyze_switch_statement): New.
5019         (compute_cases_per_edge): Move ...
5020         (switch_decision_tree::compute_cases_per_edge): ... here.
5021         (try_switch_expansion): Likewise.
5022         (switch_decision_tree::try_switch_expansion): Likewise.
5023         (record_phi_operand_mapping): Likewise.
5024         (switch_decision_tree::record_phi_operand_mapping): Likewise.
5025         (emit_case_decision_tree): Likewise.
5026         (switch_decision_tree::emit): Likewise.
5027         (balance_case_nodes): Likewise.
5028         (switch_decision_tree::balance_case_nodes): Likewise.
5029         (dump_case_nodes): Likewise.
5030         (switch_decision_tree::dump_case_nodes): Likewise.
5031         (emit_jump): Likewise.
5032         (switch_decision_tree::emit_jump): Likewise.
5033         (emit_cmp_and_jump_insns): Likewise.
5034         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5035         (emit_case_nodes): Likewise.
5036         (switch_decision_tree::emit_case_nodes): Likewise.
5037         (conditional_probability): Remove.
5038         * tree-switch-conversion.h (enum cluster_type): New.
5039         (PRINT_CASE): New.
5040         (struct cluster): Likewise.
5041         (cluster::cluster): Likewise.
5042         (struct simple_cluster): Likewise.
5043         (simple_cluster::simple_cluster): Likewise.
5044         (struct group_cluster): Likewise.
5045         (struct jump_table_cluster): Likewise.
5046         (struct bit_test_cluster): Likewise.
5047         (struct min_cluster_item): Likewise.
5048         (struct case_tree_node): Likewise.
5049         (case_tree_node::case_tree_node): Likewise.
5050         (jump_table_cluster::case_values_threshold): Likewise.
5051         (struct case_bit_test): Likewise.
5052         (struct switch_decision_tree): Likewise.
5053         (struct switch_conversion): Likewise.
5054         (switch_decision_tree::reset_out_edges_aux): Likewise.
5056 2018-06-20  Martin Liska  <mliska@suse.cz>
5058         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
5059         (hoist_edge_and_branch_if_true): Likewise.
5060         (expand_switch_using_bit_tests_p): Likewise.
5061         (struct case_bit_test): Likewise.
5062         (case_bit_test_cmp): Likewise.
5063         (emit_case_bit_tests): Likewise.
5064         (switch_conversion::switch_conversion): New class.
5065         (struct switch_conv_info): Remove old struct.
5066         (collect_switch_conv_info): More to ...
5067         (switch_conversion::collect): ... this.
5068         (check_range): Likewise.
5069         (switch_conversion::check_range): Likewise.
5070         (check_all_empty_except_final): Likewise.
5071         (switch_conversion::check_all_empty_except_final): Likewise.
5072         (check_final_bb): Likewise.
5073         (switch_conversion::check_final_bb): Likewise.
5074         (create_temp_arrays): Likewise.
5075         (switch_conversion::create_temp_arrays): Likewise.
5076         (free_temp_arrays): Likewise.
5077         (gather_default_values): Likewise.
5078         (switch_conversion::gather_default_values): Likewise.
5079         (build_constructors): Likewise.
5080         (switch_conversion::build_constructors): Likewise.
5081         (constructor_contains_same_values_p): Likewise.
5082         (switch_conversion::contains_same_values_p): Likewise.
5083         (array_value_type): Likewise.
5084         (switch_conversion::array_value_type): Likewise.
5085         (build_one_array): Likewise.
5086         (switch_conversion::build_one_array): Likewise.
5087         (build_arrays): Likewise.
5088         (switch_conversion::build_arrays): Likewise.
5089         (gen_def_assigns): Likewise.
5090         (switch_conversion::gen_def_assigns): Likewise.
5091         (prune_bbs): Likewise.
5092         (switch_conversion::prune_bbs): Likewise.
5093         (fix_phi_nodes): Likewise.
5094         (switch_conversion::fix_phi_nodes): Likewise.
5095         (gen_inbound_check): Likewise.
5096         (switch_conversion::gen_inbound_check): Likewise.
5097         (process_switch): Use the newly created class.
5098         (switch_conversion::expand): New.
5099         (switch_conversion::~switch_conversion): New.
5100         * tree-switch-conversion.h: New file.
5102 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5104         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
5105         tree-vect-patterns.c.
5106         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
5107         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
5108         (vect_recog_sad_pattern): Likewise.
5109         (vect_recog_widen_sum_pattern): Likewise.
5110         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
5111         (vect_recog_widen_shift_pattern): Remove the type_in argument.
5112         (vect_recog_rotate_pattern): Likewise.
5113         (vect_recog_mult_pattern): Likewise.
5114         (vect_recog_vector_vector_shift_pattern): Likewise.
5115         (vect_recog_divmod_pattern): Likewise.
5116         (vect_recog_mixed_size_cond_pattern): Likewise.
5117         (vect_recog_bool_pattern): Likewise.
5118         (vect_recog_mask_conversion_pattern): Likewise.
5119         (vect_try_gather_scatter_pattern): Likewise.
5120         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
5121         (vect_recog_over_widening_pattern): Likewise.
5122         (vect_recog_gather_scatter_pattern): Likewise.
5123         (vect_recog_func_ptr): Move from tree-vectorizer.h
5124         (vect_vect_recog_func_ptrs): Move further down the file.
5125         (vect_recog_func): Likewise.  Remove the third argument.
5126         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
5127         (vect_pattern_recog_1): Expect the pattern function to do any
5128         necessary target tests.  Also expect it to provide a vector type.
5129         Remove the type_in handling.
5131 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5133         * tree-vect-patterns.c (vect_pattern_detected): New function.
5134         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
5135         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
5136         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
5137         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
5138         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5139         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5140         (vect_recog_mask_conversion_pattern)
5141         (vect_try_gather_scatter_pattern): Likewise.
5143 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5145         * tree-vect-patterns.c (vect_get_internal_def): New function.
5146         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5147         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
5148         (search_type_for_mask_1): Use it.
5150 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5152         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5153         redundant WIDEN_SUM_EXPR handling.
5154         (vect_recog_sad_pattern): Likewise.
5156 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5158         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5159         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
5160         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
5161         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
5162         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
5164 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5166         * tree-vect-stmts.c (vectorizable_call): Make sure that we
5167         use the stmt_vec_info of the original bb statement for the
5168         new zero assignment, even if the call is part of a pattern.
5170 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5172         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
5173         that the sequence is attached to the original statement rather
5174         than the pattern statement.
5175         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
5176         PATTERN_DEF_SEQ from the original statement rather than
5177         the main pattern statement.
5178         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
5179         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
5180         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
5182 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
5184         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
5185         definition statements before the early exit for statements that aren't
5186         live or relevant.
5187         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
5188         split out from...
5189         (vect_transform_loop): ...here.  Process pattern definition
5190         statements without first checking whether the main pattern
5191         statement is live or relevant.
5193 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
5195         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
5196         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
5198 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
5200         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
5201         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
5202         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
5203         (expand_block_compare): Change select_block_compare_mode call.
5204         (expand_strncmp_align_check): Use new functions, fix comment.
5205         (emit_final_str_compare_gpr): New function.
5206         (expand_strn_compare): Refactor and clean up code.
5207         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
5209 2018-06-19  Tony Reix  <tony.reix@atos.com>
5210             Damien Bergamini  <damien.bergamini@atos.com>
5211             David Edelsohn  <dje.gcc@gmail.com>
5213         * collect2.c (static_obj): New variable.
5214         (static_libs): New variable.
5215         (is_in_list): Uncomment declaration.
5216         (main): Track AIX libraries linked statically.
5217         (is_in_list): Uncomment definition.
5218         (scan_prog_file): Don't add AIX shared libraries initializer
5219         to constructor list if linking statically.
5221 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
5223         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
5224         constant.
5225         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
5227 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
5229         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
5230         blocks.
5232 2018-06-19  Martin Liska  <mliska@suse.cz>
5234         * config/i386/i386.c (ix86_can_inline_p): Do not use
5235         ipa_fn_summaries::get_create.
5236         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
5237         get.
5238         (devirtualization_time_bonus): Likewise.
5239         (ipcp_propagate_stage): Likewise.
5240         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5241         (edge_set_predicate): Likewise.
5242         (evaluate_conditions_for_known_args): Likewise.
5243         (evaluate_properties_for_edge): Likewise.
5244         (ipa_call_summary::reset): Tranform to ...
5245         (ipa_call_summary::~ipa_call_summary): ... this.
5246         (ipa_fn_summary::reset): Transform to ...
5247         (ipa_fn_summary::~ipa_fn_summary): ... this.
5248         (ipa_fn_summary_t::remove): Rename to ...
5249         (ipa_fn_summary_t::remove_callees): ... this.
5250         (ipa_fn_summary_t::duplicate): Use placement new
5251         instead of memory copy.
5252         (ipa_call_summary_t::duplicate): Likewise.
5253         (ipa_call_summary_t::remove): Remove.
5254         (dump_ipa_call_summary): Change get_create to get.
5255         (ipa_dump_fn_summary): Dump only when summary exists.
5256         (analyze_function_body): Use symbol_summary::get instead
5257         of get_create.
5258         (compute_fn_summary): Likewise.
5259         (estimate_edge_devirt_benefit): Likewise.
5260         (estimate_edge_size_and_time): Likewise.
5261         (inline_update_callee_summaries): Likewise.
5262         (remap_edge_change_prob): Likewise.
5263         (remap_edge_summaries): Likewise.
5264         (ipa_merge_fn_summary_after_inlining): Likewise.
5265         (write_ipa_call_summary): Likewise.
5266         (ipa_fn_summary_write): Likewise.
5267         (ipa_free_fn_summary): Likewise.
5268         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
5269         (struct ipa_call_summary): Likewise.
5270         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
5271         of get_create.
5272         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
5273         (estimate_size_after_inlining): Likewise.
5274         (estimate_growth): Likewise.
5275         (growth_likely_positive): Likewise.
5276         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5277         (inline_call): Likewise.
5278         * ipa-inline.c (caller_growth_limits): Likewise.
5279         (can_inline_edge_p): Likewise.
5280         (can_inline_edge_by_limits_p): Likewise.
5281         (compute_uninlined_call_time): Likewise.
5282         (compute_inlined_call_time): Likewise.
5283         (want_inline_small_function_p): Likewise.
5284         (edge_badness): Likewise.
5285         (update_caller_keys): Likewise.
5286         (update_callee_keys): Likewise.
5287         (inline_small_functions): Likewise.
5288         (inline_to_all_callers_1): Likewise.
5289         (dump_overall_stats): Likewise.
5290         (early_inline_small_functions): Likewise.
5291         (early_inliner): Likewise.
5292         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5293         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5294         * ipa-pure-const.c (malloc_candidate_p): Likewise.
5295         * ipa-split.c (execute_split_functions): Likewise.
5296         * symbol-summary.h: Likewise.
5297         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5299 2018-06-19  Richard Biener  <rguenther@suse.de>
5301         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
5302         (vectorize_loops): ... here.  Fix dbgcnt handling.
5303         (try_vectorize_loop): Wrap try_vectorize_loop_1.
5305 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
5307         PR target/86197
5308         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
5309         ieee128 argument takes up only one (vector) register, not two (floating
5310         point) registers.
5312 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
5314         * gimplify.c (gimplify_init_constructor): Really never clear for an
5315         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
5317 2018-06-19  Richard Biener  <rguenther@suse.de>
5319         PR tree-optimization/86179
5320         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
5321         after failed recognition.
5323 2018-06-18  Martin Sebor  <msebor@redhat.com>
5325         PR middle-end/85602
5326         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
5327         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
5328         Handle integer subtraction.
5329         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
5330         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
5332 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
5334         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
5335         param from rtx to rtx_insn *.
5336         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
5337         param.
5338         (frv_ifcvt_modify_insn): Likwise.
5339         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
5340         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
5341         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
5342         as_a <rtx_insn *> cast to local "unprotected_region" once
5343         it's been established that it's not NULL or pc_rtx.
5344         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
5345         param "sethi" from rtx to rtx_insn *.
5346         (nds32_group_float_insns): Likewise for param "insn".
5347         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
5348         param.
5349         (vax_output_int_subtract): Likewise.
5350         * config/vax/vax.c (vax_output_int_add): Likewise for param
5351         "insn".
5352         (vax_output_int_subtract): Likewise.
5353         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
5354         (emit_pattern_after): Likewise for param "after".
5355         (emit_insn_after): Likewise.
5356         (emit_jump_insn_after): Likewise.
5357         (emit_call_insn_after): Likewise.
5358         (emit_debug_insn_after): Likewise.
5359         (emit_pattern_before): Likewise for param "before".
5360         (emit_insn_before): Likewise.
5361         (emit_jump_insn_before): Likewise.
5362         * final.c (get_insn_template): Likewise for param "insn", removing
5363         a cast.
5364         * output.h (get_insn_template): Likewise for 2nd param.
5365         * rtl.h (emit_insn_before): Likewise.
5366         (emit_jump_insn_before): Likewise.
5367         (emit_debug_insn_before_noloc): Likewise.
5368         (emit_insn_after): Likewise.
5369         (emit_jump_insn_after): Likewise.
5370         (emit_call_insn_after): Likewise.
5371         (emit_debug_insn_after): Likewise.
5372         (set_insn_deleted): Likewise for param.
5374 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
5376         PR target/85358
5377         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
5378         floating point modes, so that IFmode is numerically greater than
5379         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5380         to declare the ordering.  This prevents IFmode from being
5381         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5382         machine.  Include rs6000-modes.h to share the fractional values
5383         between genmodes* and the rest of the compiler.
5384         (IFmode): Likewise.
5385         (KFmode): Likewise.
5386         (TFmode): Likewise.
5387         * config/rs6000/rs6000-modes.h: New file.
5388         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5389         meaning of rs6000_long_double_size so that 126..128 selects an
5390         appropriate 128-bit floating point type.
5391         (rs6000_option_override_internal): Likewise.
5392         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5393         (TARGET_LONG_DOUBLE_128): Change the meaning of
5394         rs6000_long_double_size so that 126..128 selects an appropriate
5395         128-bit floating point type.
5396         (LONG_DOUBLE_TYPE_SIZE): Update comment.
5397         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5398         source and destination to match the standard usage.
5399         (truncifkf2): Likewise.
5400         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5401         ISA 2.07 to use an explicit clobber, instead of passing in a
5402         temporary.
5403         (copysign<mode>3_soft): Likewise.
5405 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
5407         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5408         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5409         (vect_slp_analyze_instance_dependence): Likewise.
5410         (vect_enhance_data_refs_alignment): Likewise.
5411         (vect_analyze_data_refs_alignment): Likewise.
5412         (vect_slp_analyze_and_verify_instance_alignment
5413         (vect_analyze_data_ref_accesses): Likewise.
5414         (vect_prune_runtime_alias_test_list): Likewise.
5415         (vect_analyze_data_refs): Likewise.
5416         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5417         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5418         (vect_analyze_scalar_cycles_1): Likewise.
5419         (vect_get_loop_niters): Likewise.
5420         (vect_analyze_loop_form_1): Likewise.
5421         (vect_update_vf_for_slp): Likewise.
5422         (vect_analyze_loop_operations): Likewise.
5423         (vect_analyze_loop): Likewise.
5424         (vectorizable_induction): Likewise.
5425         (vect_transform_loop): Likewise.
5426         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5427         * tree-vect-slp.c (vect_analyze_slp): Likewise.
5428         (vect_make_slp_decision): Likewise.
5429         (vect_detect_hybrid_slp): Likewise.
5430         (vect_slp_analyze_operations): Likewise.
5431         (vect_slp_bb): Likewise.
5432         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
5433         (vectorizable_bswap): Likewise.
5434         (vectorizable_call): Likewise.
5435         (vectorizable_simd_clone_call): Likewise.
5436         (vectorizable_conversion): Likewise.
5437         (vectorizable_assignment): Likewise.
5438         (vectorizable_shift): Likewise.
5439         (vectorizable_operation): Likewise.
5440         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
5442 2018-06-18  Martin Sebor  <msebor@redhat.com>
5444         PR tree-optimization/81384
5445         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
5446         * builtins.c (expand_builtin_strnlen): New function.
5447         (expand_builtin): Call it.
5448         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
5449         * builtins.def (BUILT_IN_STRNLEN): New.
5450         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
5451         Warn for bounds in excess of maximum object size.
5452         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
5453         single-value ranges.  Handle strnlen.
5454         (handle_builtin_strlen): Handle strnlen.
5455         (strlen_check_and_optimize_stmt): Same.
5456         * doc/extend.texi (Other Builtins): Document strnlen.
5458 2018-06-18  Maya Rashish  <coypu@sdf.org>
5460         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
5461         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
5462         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
5464         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
5465         here to ...
5466         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
5468 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5470         * tree.c (escaped_string::escape): Replace cast to char * by
5471         const_cast<char *> (unescaped).
5473 2018-06-18  Nick Clifton  <nickc@redhat.com>
5475         PR 84195
5476         * tree.c (escaped_string): New class.  Converts an unescaped
5477         string into its escaped equivalent.
5478         (warn_deprecated_use): Use the new class to convert the
5479         deprecation message, if present.
5480         (test_escaped_strings): New self test.
5481         (test_c_tests): Add test_escaped_strings.
5482         * doc/extend.texi (deprecated): Add a note that the
5483         deprecation message is affected by the -fmessage-length
5484         option, and that control characters will be escaped.
5485         (#pragma GCC error): Document this pragma.
5486         (#pragma GCC warning): Likewise.
5487         * doc/invoke.texi (-fmessage-length): Document this option's
5488         effect on the #warning and #error preprocessor directives and
5489         the deprecated attribute.
5491 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
5493         * tree.c (decl_value_expr_lookup): Revert latest change.
5494         (decl_value_expr_insert): Likewise.
5496 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
5498         * gimplify.c (nonlocal_vlas): Delete.
5499         (nonlocal_vla_vars): Likewise.
5500         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
5501         referenced VLAs.
5502         (gimplify_body): Do not create and destroy nonlocal_vlas.
5503         * tree-nested.c: Include diagnostic.h.
5504         (use_pointer_in_frame): Tweak.
5505         (lookup_field_for_decl): Add assertion and declare the transformation.
5506         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
5507         internal error when the reference is in a wrong context.  Do not
5508         create a debug decl by default.
5509         (note_nonlocal_block_vlas): Delete.
5510         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
5511         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
5512         create a debug decl by default.
5513         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
5514         call is in a wrong context.
5515         (fixup_vla_decls): New function.
5516         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
5517         debug variables were created.
5518         * tree.c (decl_value_expr_lookup): Add checking assertion.
5519         (decl_value_expr_insert): Likewise.
5521 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
5523         PR middle-end/82479
5524         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
5525         * tree-scalar-evolution.c (interpret_expr): Likewise.
5526         (expression_expensive_p): Likewise.
5527         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
5528         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
5529         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
5530         (ssa_defined_by_minus_one_stmt_p): New.
5532 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
5534         PR middle-end/64946
5535         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
5536         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
5537         * dojump.c (do_jump): Likewise.
5538         * expr.c (expand_expr_real_2): Check operand type's sign.
5539         * fold-const.c (const_unop): Handle ABSU_EXPR.
5540         (fold_abs_const): Likewise.
5541         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
5542         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
5543         (strip_sign_op_1): Likesise.
5544         * match.pd: Add new pattern to generate ABSU_EXPR.
5545         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
5546         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5547         * tree-eh.c (operation_could_trap_helper_p): Likewise.
5548         * tree-inline.c (estimate_operator_cost): Likewise.
5549         * tree-pretty-print.c (dump_generic_node): Likewise.
5550         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
5551         * tree.def (ABSU_EXPR): New.
5553 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
5555         PR middle-end/86095
5556         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5557         documented as preserved for backward compatibility only.
5558         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5560         PR rtl-optimization/86108
5561         * bb-reorder.c (create_forwarder_block): Renamed to ...
5562         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
5563         jump from new landing pad to the second part.
5564         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5565         Adjust callers.
5567 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
5569         PR middle-end/85878
5570         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
5571         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
5572         Only call store_expr for halves if the mode is the same.
5574         PR middle-end/86123
5575         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
5576         Fix up comment formatting.
5578 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5580         * typed-splay-tree.h (typed_splay_tree::remove): New function.
5581         (typed_splay_tree::closure,
5582         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
5583         (typed_splay_tree::typed_splay_tree,
5584         typed_splay_tree::operator =): Declared private.
5585         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
5586         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
5587         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
5588         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
5589         typed_splay_tree::splay_tree_splay,
5590         typed_splay_tree::splay_tree_foreach_helper,
5591         typed_splay_tree::splay_tree_insert,
5592         typed_splay_tree::splay_tree_remove,
5593         typed_splay_tree::splay_tree_lookup,
5594         typed_splay_tree::splay_tree_predecessor,
5595         typed_splay_tree::splay_tree_successor,
5596         typed_splay_tree::splay_tree_min,
5597         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
5598         (typed_splay_tree::root, typed_splay_tree::comp,
5599         typed_splay_tree::delete_key,
5600         typed_splay_tree::delete_value): New data members.
5601         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
5602         typed_splay_tree::remove.
5604 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
5606         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
5607         -mginv and -mno-ginv to the assembler.
5608         * config/mips/mips.opt (-mcrc): New option.
5609         (-mginv): Likewise.
5610         * doc/invoke.text (-mcrc): Document.
5611         (-mginv): Likewise.
5613 2018-06-15  Nick Clifton  <nickc@redhat.com>
5615         PR 84195
5616         * tree.c (escaped_string): New class.  Converts an unescaped
5617         string into its escaped equivalent.
5618         (warn_deprecated_use): Use the new class to convert the
5619         deprecation message, if present.
5620         (test_escaped_strings): New self test.
5621         (test_c_tests): Add test_escaped_strings.
5622         * doc/extend.texi (deprecated): Add a note that the
5623         deprecation message is affected by the -fmessage-length
5624         option, and that control characters will be escaped.
5625         (#pragma GCC error): Document this pragma.
5626         (#pragma GCC warning): Likewise.
5627         * doc/invoke.texi (-fmessage-length): Document this option's
5628         effect on the #warning and #error preprocessor directives and
5629         the deprecated attribute.
5631 2018-06-15  Richard Biener  <rguenther@suse.de>
5633         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5634         here, also noting vector size used.
5635         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
5636         size used in MSG_OPTIMIZED_LOCATIONS dump.
5637         (pass_slp_vectorize::execute): Adjust.
5639 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
5641         PR target/85968
5642         * config/arc/arc.c (arc_return_address_register): Fix
5643         if-condition.
5645 2018-06-15  Richard Biener  <rguenther@suse.de>
5647         PR middle-end/86159
5648         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5649         leave useless conversion stripping to force_gimple_operand_gsi.
5650         (gimplify_build2): Likewise.
5651         (gimplify_build1): Likewise.
5653 2018-06-15  Richard Biener  <rguenther@suse.de>
5655         PR middle-end/86076
5656         * tree-cfg.c (move_stmt_op): unshare invariant addresses
5657         before adjusting their block.
5659 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5661         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5662         multilibs for *-*-rtems*.
5663         * config/riscv/t-rtems: New file.
5665 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
5667         PR middle-end/86122
5668         * match.pd ((A +- CST1) +- CST2): Punt if last resort
5669         unsigned_type_for returns NULL.
5671         PR target/85945
5672         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5673         subregs of multi-word pseudos unless the float mode has word size.
5675 2018-06-14  Richard Biener  <rguenther@suse.de>
5677         PR middle-end/86139
5678         * tree-vect-generic.c (build_word_mode_vector_type): Remove
5679         duplicate and harmful type_hash_canon.
5680         * tree.c (type_hash_canon): Assert we didn't find ourselves.
5682 2018-06-14  Richard Biener  <rguenther@suse.de>
5684         PR ipa/86124
5685         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5686         NULL cgraph_node.
5688 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5690         * config/rtems.h (STDINT_LONG32): Define.
5692 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
5693             Prachi Godbole  <prachi.godbole@imgtec.com>
5695         * config/mips/mips-cpus.def: Define P6600.
5696         * config/mips/mips-tables.opt: Regenerate.
5697         * config/mips/mips.c (mips_ucbranch_type): New enum.
5698         (mips_rtx_cost_data): Add support for P6600.
5699         (mips_issue_rate): Likewise.
5700         (mips_multipass_dfa_lookahead): Likewise.
5701         (mips_avoid_hazard): Likewise.
5702         (mips_reorg_process_insns): Likewise.
5703         (mips_classify_branch_p6600): New function.
5704         * config/mips/mips.h (TUNE_P6600): New define.
5705         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5706         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5707         * config/mips/mips.md: Include p6600.md.
5708         (processor): Add p6600.
5709         * config/mips/p6600.md: New file.
5710         * doc/invoke.texi: Add p6600 to supported architectures.
5712 2018-06-13  Martin Sebor  <msebor@redhat.com>
5714         PR tree-optimization/86114
5715         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5716         of integer types.
5717         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5719 2018-06-13  Richard Biener  <rguenther@suse.de>
5721         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5722         Properly set vector type of the intermediate stmt.
5723         * tree-vect-stmts.c (vectorizable_operation): The destination
5724         var always has vectype_out type.
5726 2018-06-13  Jeff Law  <law@redhat.com>
5728         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5729         integer 0 for argument to print_rtl_with_bb.
5730         (rl78_reorg): Likewise.
5732 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
5734         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5735         from rtx to rtx_insn *.
5736         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5737         "label".
5738         (add_sched_insns_for_speculation): Likewise for local "target",
5739         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5740         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5741         from rtx_insn ** to rtx_code_label **.
5742         (reorg_emit_nops): Likewise.
5743         (c6x_reorg): Likewise for local "call_labels".
5744         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5745         rtx to rtx_insn *.
5746         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5747         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5748         the loops over LABEL_REFS.
5749         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5750         braf_label.
5751         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5752         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5753         (split_branches): Strengthen local "olabel" from rtx to
5754         rtx_insn *, adding a safe_as_a cast.
5755         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5756         to "rtx_insn *".
5757         (add_insn_after): Likewise for first two params.
5758         (add_insn_before): Likewise.
5759         (remove_insn): Likewise for param.
5760         (emit_pattern_before_noloc): Likewise for second and third params.
5761         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5762         (emit_call_insn_before_noloc): Likewise.
5763         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5764         to "rtx_insn *".
5765         (emit_barrier_before): Likewise.
5766         (emit_label_before): Strengthen "label" param from "rtx" to
5767         "rtx_code_label *".  Strengthen "before" param from "rtx" to
5768         "rtx_insn *".
5769         (emit_insn_after_1): Strengthen "after" param from "rtx" to
5770         "rtx_insn *".
5771         (emit_pattern_after_noloc): Likewise.
5772         (emit_insn_after_noloc): Likewise.
5773         (emit_jump_insn_after_noloc): Likewise.
5774         (emit_call_insn_after_noloc): Likewise.
5775         (emit_debug_insn_after_noloc): Likewise.
5776         (emit_barrier_after): Likewise.
5777         (emit_label_after): Likewise for both params.
5778         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
5779         "loc" param from "int" to "location_t".
5780         (emit_insn_after_setloc): Likewise.
5781         (emit_jump_insn_after_setloc): Likewise.
5782         (emit_call_insn_after_setloc): Likewise.
5783         (emit_debug_insn_after_setloc): Likewise.
5784         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
5785         "loc" param from "int" to "location_t".
5786         (emit_pattern_before): Convert NULL_RTX to NULL.
5787         (emit_insn_before_setloc): Convert "loc" param from "int" to
5788         "location_t".
5789         (emit_jump_insn_before_setloc): Likewise.
5790         (emit_call_insn_before_setloc): Likewise.
5791         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5792         rtx_insn *.  Convert "loc" param from "int" to "location_t".
5793         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5794         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5795         Convert 3rd param from "int" to "location_t".
5796         (emit_barrier_before, emit_barrier_after, next_real_insn):
5797         Strengthen param from rtx to rtx_insn *.
5798         (emit_label_before): Strengthen 1st param from "rtx" to
5799         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
5800         "rtx_insn *".
5801         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5802         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5803         Strengthen 2nd param from "rtx" to "rtx_insn *".
5804         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5805         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5806         Likewise. Convert 3rd param from "int" to "location_t".
5807         (emit_label_after): Strengthen 1st param from "rtx" to
5808         "rtx_code_label *".
5809         (next_real_insn, remove_insn): Strengthen param from "rtx" to
5810         "rtx_insn *".
5811         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5812         from "rtx" to "rtx_insn *".
5814 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
5816         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5817         bodies streamed in with -Q.
5818         * dumpfile.c (dump_files): Add lto-stream-out dump file.
5819         * dumpfile.h (tree_dump_index): Add lto_stream_out.
5820         * gimple-streamer-out.c: Include gimple-pretty-print.h
5821         (output_bb): Dump stmts streamed.
5822         * lto-section-out.c: Include print-tree.h
5823         (lto_begin_section): Dump sections created.
5824         (lto_output_decl_index): Dump decl encoded.
5825         * lto-streamer-out.c: Include print-tree.h
5826         (create_output_block): Dump output block created.
5827         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5828         (output_function): Dump function output.
5829         (output_constructor): Dump constructor streamed.
5830         (write_global_stream): Output indexes encoded.
5831         (produce_asm_for_decls): Dump streams encoded.
5832         * lto-streamer.c (streamer_dump_file): New global var.
5833         * lto-streamer.h (streamer_dump_file): Declare.
5834         * passes.c (ipa_write_summaries): Initialize streamer dump.
5835         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5836         in.
5838 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
5840         PR target/86048
5841         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5842         offsets for register save directives.  Emit a second batch of save
5843         directives, if need be, when the function accesses prior frames.
5845 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5847         * config/arc/fpu.md (fmasf4): Force operand to register.
5848         (fnmasf4): Likewise.
5850 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5852         * config/arc/arc-protos.h (arc_pad_return): Remove.
5853         * config/arc/arc.c (machine_function): Remove force_short_suffix
5854         and size_reason.
5855         (arc_print_operand): Adjust printing of '&'.
5856         (arc_verify_short): Remove conditional printing of short suffix.
5857         (arc_final_prescan_insn): Remove reference to size_reason.
5858         (pad_return): New function.
5859         (arc_reorg): Call pad_return.
5860         (arc_pad_return): Remove.
5861         (arc_init_machine_status): Remove reference to force_short_suffix.
5862         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5863         (attr length): When attribute iscompact is true force to 2
5864         regardless; in the case of maybe check if we want to force the
5865         instruction to have 4 bytes length.
5866         (nopv): Change it to generate 4 byte long nop as well.
5867         (blockage): New pattern.
5868         (simple_return): Remove call to arc_pad_return.
5869         (p_return_i): Likewise.
5871 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5873         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5875 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5877         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5878         ARC cores.
5880 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5882         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5883         for ARC700 and ARCv2.
5885 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
5887         PR target/86076
5888         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5889         operands[2] instead of operands[1].
5892 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
5894         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5895         case, check whether the outer register overlaps an unallocatable
5896         register, not just whether it fits the required class.
5898 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
5900         * poly-int.h (can_div_trunc_p): Add new overload in which all values
5901         are poly_ints.
5902         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5903         (memrefs_conflict_p): Likewise.
5904         (init_alias_analysis): Likewise.
5905         * cfgexpand.c (expand_debug_expr): Likewise.
5906         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5907         * cse.c (fold_rtx): Likewise.
5908         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5909         * expr.c (emit_block_move_hints): Likewise.
5910         (clear_storage_hints, push_block, emit_push_insn): Likewise.
5911         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5912         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5913         (emit_group_store): Likewise.
5914         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
5915         to read the PRE/POST_MODIFY increment.
5916         * calls.c (store_one_arg): Use strip_offset.
5917         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5918         poly_int_rtx_p.
5919         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5920         by a VEC_SELECT.
5921         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5922         (simplify_binary_operation_1): Extend CONST_INT handling to
5923         poly_int_rtx_p.
5924         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5925         than a HOST_WIDE_INT.
5926         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5927         poly_int64.
5928         (adjust_mems, add_stores): Update accodingly.
5929         (vt_canonicalize_addr): Track polynomial offsets.
5930         (emit_note_insn_var_location): Likewise.
5931         (vt_add_function_parameter): Likewise.
5932         (vt_initialize): Likewise.
5934 2018-06-12  Jeff Law  <law@redhat.com>
5936         * config.gcc (alpha*-*-freebsd*): Remove.
5937         * config/alpha/freebsd.h: Remove.
5939 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
5941         PR other/69968
5942         * spellcheck-tree.c (levenshtein_distance): Rename to...
5943         (get_edit_distance): ...this, and update for underlying renaming.
5944         * spellcheck-tree.h (levenshtein_distance): Rename to...
5945         (get_edit_distance): ...this.
5946         * spellcheck.c (levenshtein_distance): Rename to...
5947         (get_edit_distance): ...this.  Convert from Levenshtein distance
5948         to Damerau-Levenshtein distance by supporting transpositions of
5949         adjacent characters.  Rename "v1" to "v_next" and "v0" to
5950         "v_one_ago".
5951         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5952         (selftest::test_edit_distance_unit_test_oneway): ...this, and
5953         update for underlying renaming.
5954         (selftest::levenshtein_distance_unit_test): Rename to...
5955         (selftest::test_get_edit_distance_unit): ...this, and update for
5956         underlying renaming.
5957         (selftest::test_find_closest_string): Add example from PR 69968
5958         where transposition helps
5959         (selftest::test_metric_conditions): Update for renaming.
5960         (selftest::test_metric_conditions): Likewise.
5961         (selftest::spellcheck_c_tests): Likewise.
5962         * spellcheck.h (levenshtein_distance): Rename both overloads to...
5963         (get_edit_distance): ...this.
5964         (best_match::consider): Update for renaming.
5966 2018-06-12  Martin Sebor  <msebor@redhat.com>
5968         PR tree-optimization/85259
5969         * builtins.c (compute_objsize): Handle constant offsets.
5970         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5971         true iff a warning has been issued.
5972         * gimple.h (gimple_nonartificial_location): New function.
5973         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5974         gimple_nonartificial_location and handle -Wno-system-headers.
5975         (handle_builtin_stxncpy): Same.
5977 2018-06-12  Martin Sebor  <msebor@redhat.com>
5979         PR c/85931
5980         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
5982 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
5984         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
5985         BUILTIN_VEC_XST entries for pointer to double and long long.
5987 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
5989         PR target/85990
5990         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5991         Update comments.
5992         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5993         Likewise.
5995 2018-06-12  Martin Liska  <mliska@suse.cz>
5997         * doc/options.texi: Document IntegerRange.
5999 2018-06-12  Martin Liska  <mliska@suse.cz>
6001         * config/i386/i386.opt: Make MPX-related options as Deprecated.
6002         * opt-functions.awk: Handle Deprecated flag.
6003         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6004         and report error.
6005         (read_cmdline_option): Report warning for a deprecated option.
6006         * opts.h (struct cl_option): Add new field cl_deprecated.
6007         (CL_ERR_DEPRECATED): New.
6009 2018-06-12  Martin Liska  <mliska@suse.cz>
6011         * doc/options.texi: Document Deprecated option flag.
6013 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6015         * config/arc/arc-arch.h (arc_extras): New enum.
6016         (arc_cpu_t):Add field extra.
6017         (arc_cpu_types): Consider the extras.
6018         * config/arc/arc-cpus.def: Add extras info.
6019         * config/arc/arc-opts.h (processor_type): Consider extra field.
6020         * config/arc/arc.c (arc_override_options): Handle extra field.
6022 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6024         * config/arc/arc-arch.h: Update ARC_OPTX macro.
6025         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6026         field.
6027         * config/arc/arc.c (arc_init): Update pic warning.
6028         (irq_range): Update irq range parsing warnings.
6029         (arc_override_options): Update various warning messages.
6030         (arc_handle_aux_attribute): Likewise.
6032 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
6034         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6036 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6038         * doc/sourcebuild.texi: Document usage of line number 0 in verify
6039         compiler messages directives.
6041 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
6043         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
6044         * config/mips/mips-tables.opt: Regenerate.
6045         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
6046         mips64r6.
6047         * doc/invoke.texi: Document -march=i6500.
6049 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
6051         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
6052         (i6400_gpmul): Add cpu_unit.
6053         (i6400_gpdiv): Likewise.
6054         (i6400_msa_add_d): Update reservations.
6055         (i6400_msa_int_add) Likewise.
6056         (i6400_msa_short_logic3) Likewise.
6057         (i6400_msa_short_logic2) Likewise.
6058         (i6400_msa_short_logic) Likewise.
6059         (i6400_msa_move) Likewise.
6060         (i6400_msa_cmp) Likewise.
6061         (i6400_msa_short_float2) Likewise.
6062         (i6400_msa_div_d) Likewise.
6063         (i6400_msa_long_logic1) Likewise.
6064         (i6400_msa_long_logic2) Likewise.
6065         (i6400_msa_mult) Likewise.
6066         (i6400_msa_long_float2) Likewise.
6067         (i6400_msa_long_float4) Likewise.
6068         (i6400_msa_long_float5) Likewise.
6069         (i6400_msa_long_float8) Likewise.
6070         (i6400_fpu_fadd): Include frint type.
6071         (i6400_fpu_store): New define_insn_reservation.
6072         (i6400_fpu_load): Likewise.
6073         (i6400_fpu_move): Likewise.
6074         (i6400_fpu_fcmp): Likewise.
6075         (i6400_fpu_fmadd): Likewise.
6076         (i6400_int_mult): Include imul3nc type and update reservation.
6077         (i6400_int_div): Include idiv3 type and update reservation.
6078         (i6400_int_load): Update to check type not move_type.
6079         (i6400_int_store): Likewise.
6080         (i6400_int_prefetch): Set zero latency.
6082 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
6084         * gcc.c: Document new %@{...} sequence.
6085         (LINK_COMMAND_SPEC): Use it for the -L switches.
6086         (cpp_unique_options): Use it for the -I switches.
6087         (at_file_argbuf): New global variable.
6088         (in_at_file): Likewise.
6089         (alloc_args): Create at_file_argbuf.
6090         (clear_args): Truncate at_file_argbuf.
6091         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
6092         (open_at_file): New function.
6093         (close_at_file): Likewise.
6094         (create_at_file): Delete.
6095         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
6096         <'o'>: Likewise.
6097         <'@'>: New case.
6098         (validate_switches_from_spec): Deal with %@{...} sequence.
6099         (validate_switches): Likewise.
6100         (driver::finalize): Call clear_args.
6102 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
6104         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
6106 2018-06-11  Martin Sebor  <msebor@redhat.com>
6108         * doc/invoke.texi (-Wall): List -Wc++17-compat.
6109         (Wno-class-memaccess): Add @opindex.
6110         (Wno-templates, Wno-multiple-inheritance): Same.
6111         (Wno-virtual-inheritance, Wno-namespaces): Same.
6112         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
6113         (Wno-format-overflow, Wno-format-truncation): Same.
6114         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
6115         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
6116         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
6117         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
6118         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
6119         (Wno-misspelled-isr): Same.
6121 2018-06-11  Martin Sebor  <msebor@redhat.com>
6123         * PR tree-optimization/86083
6124         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
6126 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
6128         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
6130 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
6132         PR target/85755
6133         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
6134         on the correct operand.
6135         (*movdi_internal64): Ditto.
6137 2018-06-11  Martin Liska  <mliska@suse.cz>
6139         PR tree-optimization/86089
6140         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
6142 2018-06-11  Julia Koval  <julia.koval@intel.com>
6144         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
6145         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
6146         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
6148 2018-06-11  Olivier Hainque  <hainque@adacore.com>
6150         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
6151         for Ada with strict dwarf2.
6153 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
6155         PR target/85755
6156         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
6157         addresses.
6159 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
6161         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
6163 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
6165         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
6166         TARGET_ELF.
6168 2018-06-08  Martin Liska  <mliska@suse.cz>
6170         * tree-cfg.h (debug_function): Fix argument type to match
6171         implementation.
6173 2018-06-08  Martin Liska  <mliska@suse.cz>
6175         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
6176         Remove usage of MPX-related (and removed) fields.
6177         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
6179 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
6181         * cfg.c (debug): Use TDF_NONE rather than 0.
6182         * cfghooks.c (debug): Likewise.
6183         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
6184         (struct dump_option_value_info): Convert to...
6185         (struct kv_pair): ...this template type.
6186         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
6187         rather than 0.
6188         (optinfo_verbosity_options): Likewise.
6189         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
6190         OPTGROUP_NONE.
6191         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
6192         than int for "optgroup_flags" param.
6193         (dump_generic_expr_loc): Use dump_flags_t rather than int for
6194         "dump_kind" param.
6195         (dump_dec): Likewise.
6196         (dump_finish): Use TDF_NONE rather than 0.
6197         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
6198         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
6199         than 0.  Update for change to option_ptr.
6200         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
6201         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
6202         0.  Update for changes to optinfo_verbosity_options and
6203         optgroup_options.
6204         (opt_info_switch_p): Convert optgroup_flags from int to
6205         optgroup_flags_t.
6206         (dump_basic_block): Use dump_flags_t rather than int
6207         for "dump_kind" param.
6208         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
6209         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
6210         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
6211         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
6212         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
6213         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
6214         TDF_NONE): Convert from macros to...
6215         (enum dump_flag): ...this new enum.
6216         (dump_flags_t): Update to use enum.
6217         (operator|, operator&, operator~, operator|=, operator&=):
6218         Implement for dump_flags_t.
6219         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
6220         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
6221         Convert from macros to...
6222         (enum optgroup_flag): ...this new enum.
6223         (optgroup_flags_t): New typedef.
6224         (operator|, operator|=): Implement for optgroup_flags_t.
6225         (struct dump_file_info): Convert field "alt_flags" to
6226         dump_flags_t.  Convert field "optgroup_flags" to
6227         optgroup_flags_t.
6228         (dump_basic_block): Use dump_flags_t rather than int for param.
6229         (dump_generic_expr_loc): Likewise.
6230         (dump_dec): Likewise.
6231         (dump_register): Convert param "optgroup_flags" to
6232         optgroup_flags_t.
6233         (opt_info_enable_passes): Likewise.
6234         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
6235         than 0.
6236         * gimple-pretty-print.c (debug): Likewise.
6237         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
6238         (merged_store_group::apply_stores): Likewise.
6239         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
6240         * gimple.c (verify_gimple_pp): Likewise.
6241         * graphite-poly.c (print_pbb_body): Likewise.
6242         * passes.c (pass_manager::register_one_dump_file): Convert
6243         local "optgroup_flags" to optgroup_flags_t.
6244         * print-tree.c (print_node): Use TDF_NONE rather than 0.
6245         (debug): Likewise.
6246         (debug_body): Likewise.
6247         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
6248         to optgroup_flags_t.
6249         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
6250         than 0.
6251         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
6252         (convert_mult_to_fma): Likewise.
6253         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
6254         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
6255         * tree-vect-data-refs.c (dump_lower_bound): Convert param
6256         "dump_kind" to dump_flags_t.
6258 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
6260         * config/rs6000/rs6000.c (min, max): Delete.
6262 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
6264         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
6265         -mabi=spe and -mabi=no-spe.
6267 2018-06-08  Martin Liska  <mliska@suse.cz>
6269         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
6270         where we expect an existing summary.
6272 2018-06-08  Martin Liska  <mliska@suse.cz>
6274         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
6275         * ipa-inline.h (estimate_edge_growth): Likewise.
6277 2018-06-08  Martin Liska  <mliska@suse.cz>
6279         * cgraph.c (function_version_hasher::hash): Use
6280         cgraph_node::get_uid ().
6281         (function_version_hasher::equal):
6282         * cgraph.h (cgraph_node::get_uid): New method.
6283         * ipa-inline.c (update_caller_keys): Use
6284         cgraph_node::get_uid ().
6285         (update_callee_keys): Likewise.
6286         * ipa-utils.c (searchc): Likewise.
6287         (ipa_reduced_postorder): Likewise.
6288         * lto-cgraph.c (input_node): Likewise.
6289         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
6290         * symbol-summary.h (symtab_insertion): Likewise.
6291         (symtab_removal): Likewise.
6292         (symtab_duplication): Likewise.
6293         * tree-pretty-print.c (dump_function_header): Likewise.
6294         * tree-sra.c (convert_callers_for_node): Likewise.
6296 2018-06-08  Martin Liska  <mliska@suse.cz>
6298         * cgraph.c (symbol_table::create_edge): Always assign a new
6299         unique number.
6300         (symbol_table::free_edge): Do not recycle numbers.
6301         * cgraph.h (cgraph_edge::get): New method.
6302         * symbol-summary.h (symtab_removal): Use it.
6303         (symtab_duplication): Likewise.
6304         (call_summary::hashable_uid): Remove.
6306 2018-06-08  Martin Liska  <mliska@suse.cz>
6308         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
6309         (initialize_growth_caches): Remove.
6310         (free_growth_caches): Likewise.
6311         (do_estimate_edge_time): Use edge_growth_cache.
6312         (do_estimate_edge_size): Likewise.
6313         (do_estimate_edge_hints): Likewise.
6314         * ipa-inline.c (reset_edge_caches): Likewise.
6315         (recursive_inlining): Likewise.
6316         (inline_small_functions): Likewise.
6317         * ipa-inline.h (initialize_growth_caches): Remove.
6318         (estimate_edge_size): Likewise.
6319         (estimate_edge_time): Likewise.
6320         (estimate_edge_hints): Likewise.
6321         (reset_edge_growth_cache): Likewise.
6322         * symbol-summary.h (call_summary::remove): New method.
6324 2018-06-08  Martin Liska  <mliska@suse.cz>
6326         * ipa-cp.c (class edge_clone_summary): New summary.
6327         (grow_edge_clone_vectors): Remove.
6328         (ipcp_edge_duplication_hook): Remove.
6329         (class edge_clone_summary_t): New call_summary class.
6330         (ipcp_edge_removal_hook): Remove.
6331         (edge_clone_summary_t::duplicate): New function.
6332         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
6333         (create_specialized_node): Likewise.
6334         (ipcp_driver): Initialize edge_clone_summaries and do not
6335         register hooks.
6337 2018-06-08  Martin Liska  <mliska@suse.cz>
6339         * symbol-summary.h (get): New function.
6340         (call_summary::m_initialize_when_cloning): New class member.
6342 2018-06-08  Martin Liska  <mliska@suse.cz>
6344         * cgraph.c (cgraph_node::remove): Do not recycle uid.
6345         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
6346         (symbol_table::allocate_cgraph_symbol): Do not set uid.
6347         * passes.c (uid_hash_t): Record removed_nodes by their uids.
6348         (remove_cgraph_node_from_order): Use the removed_nodes set.
6349         (do_per_function_toporder): Likwise.
6350         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
6351         instead of summary_uid.
6352         (symtab_removal): Likewise.
6353         (symtab_duplication): Likewise.
6355 2018-06-08  Martin Liska  <mliska@suse.cz>
6357         * ipa-cp.c (ipcp_store_bits_results): Use
6358         ipcp_transformation_sum.
6359         (ipcp_store_vr_results): Likewise.
6360         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
6361         to ...
6362         (ipcp_transformation_initialize): ... this.
6363         (ipa_set_node_agg_value_chain):
6364         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
6365         (write_ipcp_transformation_info): Likewise.
6366         (read_ipcp_transformation_info): Likewise.
6367         (ipcp_update_bits): Likewise.
6368         (ipcp_update_vr): Likewise.
6369         (ipcp_transform_function): Likewise.
6370         * ipa-prop.h: Rename ipcp_transformation_summary to
6371         ipcp_transformation.
6372         (class ipcp_transformation_t): New function summary.
6373         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
6374         (ipa_get_agg_replacements_for_node): Likewise.
6376 2018-06-08  Martin Liska  <mliska@suse.cz>
6378         * ipa-pure-const.c (struct funct_state_d): Do it class instead
6379         of struct.
6380         (class funct_state_summary_t): New function_summary class.
6381         (has_function_state): Remove.
6382         (get_function_state): Likewise.
6383         (set_function_state): Likewise.
6384         (add_new_function): Likewise.
6385         (funct_state_summary_t::insert): New function.
6386         (duplicate_node_data): Remove.
6387         (remove_node_data): Remove.
6388         (funct_state_summary_t::duplicate): New function.
6389         (register_hooks): Create new funct_state_summaries.
6390         (pure_const_generate_summary): Use it.
6391         (pure_const_write_summary): Likewise.
6392         (pure_const_read_summary): Likewise.
6393         (propagate_pure_const): Likewise.
6394         (propagate_nothrow): Likewise.
6395         (dump_malloc_lattice): Likewise.
6396         (propagate_malloc): Likewise.
6397         (execute): Do not register hooks, just remove summary
6398         instead.
6399         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6400         constructor.
6402 2018-06-08  Martin Liska  <mliska@suse.cz>
6404         * ipa-reference.c (remove_node_data): Remove.
6405         (duplicate_node_data): Likewise.
6406         (class ipa_ref_var_info_summary_t): New class.
6407         (class ipa_ref_opt_summary_t): Likewise.
6408         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6409         (get_reference_optimization_summary): Use
6410         ipa_ref_opt_sum_summaries.
6411         (set_reference_vars_info): Remove.
6412         (set_reference_optimization_summary): Likewise.
6413         (ipa_init): Create summaries.
6414         (init_function_info): Use function summary.
6415         (ipa_ref_opt_summary_t::duplicate): New function.
6416         (ipa_ref_opt_summary_t::remove): New function.
6417         (get_read_write_all_from_node): Fix GNU coding style.
6418         (propagate): Use function summary.
6419         (write_node_summary_p): Fix GNU coding style.
6420         (stream_out_bitmap): Likewise.
6421         (ipa_reference_read_optimization_summary): Use function summary.
6422         (ipa_reference_c_finalize): Do not release hooks.
6424 2018-06-08  Martin Liska  <mliska@suse.cz>
6426         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6427         (analyze_function_body): Extract multiple calls of get_create.
6428         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6429         * ipa-inline.c (recursive_inlining): Use ::get method.
6430         * ipa-inline.h (estimate_edge_growth): Likewise.
6432 2018-06-08  Martin Liska  <mliska@suse.cz>
6434         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
6435         HSA_INVALID.
6436         (hsa_function_summary::hsa_function_summary): Use the new enum
6437         value.
6438         (hsa_gpu_implementation_p): Use hsa_summaries::get.
6439         * hsa-gen.c (hsa_get_host_function): Likewise.
6440         (get_brig_function_name): Likewise.
6441         * ipa-hsa.c (process_hsa_functions): Likewise.
6442         (ipa_hsa_write_summary): Likewise.
6443         * symbol-summary.h (symtab_duplication): Use ::get function/
6444         (get): New function.
6446 2018-06-08  Martin Liska  <mliska@suse.cz>
6448         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
6449         of get.
6450         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
6451         (hsa_register_kernel): Likewise.
6452         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
6453         * hsa-gen.c (hsa_get_host_function): Likewise.
6454         (get_brig_function_name): Likewise.
6455         (generate_hsa): Likewise.
6456         (pass_gen_hsail::execute): Likewise.
6457         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
6458         (devirtualization_time_bonus): Likewise.
6459         (ipcp_propagate_stage): Likewise.
6460         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6461         (edge_set_predicate): Likewise.
6462         (evaluate_conditions_for_known_args): Likewise.
6463         (evaluate_properties_for_edge): Likewise.
6464         (ipa_fn_summary::reset): Likewise.
6465         (ipa_fn_summary_t::duplicate): Likewise.
6466         (dump_ipa_call_summary): Likewise.
6467         (ipa_dump_fn_summary): Likewise.
6468         (analyze_function_body): Likewise.
6469         (compute_fn_summary): Likewise.
6470         (estimate_edge_devirt_benefit): Likewise.
6471         (estimate_edge_size_and_time): Likewise.
6472         (estimate_calls_size_and_time): Likewise.
6473         (estimate_node_size_and_time): Likewise.
6474         (inline_update_callee_summaries): Likewise.
6475         (remap_edge_change_prob): Likewise.
6476         (remap_edge_summaries): Likewise.
6477         (ipa_merge_fn_summary_after_inlining): Likewise.
6478         (ipa_update_overall_fn_summary): Likewise.
6479         (read_ipa_call_summary): Likewise.
6480         (inline_read_section): Likewise.
6481         (write_ipa_call_summary): Likewise.
6482         (ipa_fn_summary_write): Likewise.
6483         (ipa_free_fn_summary): Likewise.
6484         * ipa-hsa.c (process_hsa_functions): Likewise.
6485         (ipa_hsa_write_summary): Likewise.
6486         (ipa_hsa_read_section): Likewise.
6487         * ipa-icf.c (sem_function::merge): Likewise.
6488         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6489         (do_estimate_edge_time): Likewise.
6490         (estimate_size_after_inlining): Likewise.
6491         (estimate_growth): Likewise.
6492         (growth_likely_positive): Likewise.
6493         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6494         (inline_call): Likewise.
6495         * ipa-inline.c (caller_growth_limits): Likewise.
6496         (can_inline_edge_p): Likewise.
6497         (can_inline_edge_by_limits_p): Likewise.
6498         (compute_uninlined_call_time): Likewise.
6499         (compute_inlined_call_time): Likewise.
6500         (want_inline_small_function_p): Likewise.
6501         (edge_badness): Likewise.
6502         (update_caller_keys): Likewise.
6503         (update_callee_keys): Likewise.
6504         (recursive_inlining): Likewise.
6505         (inline_small_functions): Likewise.
6506         (inline_to_all_callers_1): Likewise.
6507         (dump_overall_stats): Likewise.
6508         (early_inline_small_functions): Likewise.
6509         (early_inliner): Likewise.
6510         * ipa-inline.h (estimate_edge_growth): Likewise.
6511         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6512         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6513         * ipa-prop.h (IPA_NODE_REF): Likewise.
6514         (IPA_EDGE_REF): Likewise.
6515         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6516         (propagate_malloc): Likewise.
6517         * ipa-split.c (execute_split_functions): Likewise.
6518         * symbol-summary.h: Rename get to get_create.
6519         (get): Likewise.
6520         (get_create): Likewise.
6521         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6523 2018-06-08  Martin Liska  <mliska@suse.cz>
6525         * symbol-summary.h (release): Move definition out of class
6526         declaration.
6527         (symtab_removal): Likewise.
6528         (symtab_duplication): Likewise.
6530 2018-06-08  Martin Liska  <mliska@suse.cz>
6532         * symbol-summary.h (function_summary): Move constructor
6533         implementation out of class declaration.
6534         (release): Likewise.
6535         (symtab_insertion): Likewise.
6536         (symtab_removal): Likewise.
6537         (symtab_duplication): Likewise.
6538         (get): Likewise.
6540 2018-06-08  Martin Liska  <mliska@suse.cz>
6542         * Makefile.in: Remove support for MPX (macros, related functions,
6543         fields in cgraph_node, ...).
6544         * builtin-types.def (BT_BND): Likewise.
6545         (BT_FN_BND_CONST_PTR): Likewise.
6546         (BT_FN_CONST_PTR_BND): Likewise.
6547         (BT_FN_VOID_PTR_BND): Likewise.
6548         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
6549         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
6550         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
6551         (expand_builtin_mempcpy_with_bounds): Likewise.
6552         (expand_builtin_memset_with_bounds): Likewise.
6553         (expand_builtin_memset_args): Likewise.
6554         (std_expand_builtin_va_start): Likewise.
6555         (expand_builtin): Likewise.
6556         (expand_builtin_with_bounds): Likewise.
6557         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6558         (DEF_LIB_BUILTIN_CHKP): Likewise.
6559         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6560         (DEF_CHKP_BUILTIN): Likewise.
6561         (BUILT_IN_MEMCPY): Likewise.
6562         (BUILT_IN_MEMMOVE): Likewise.
6563         (BUILT_IN_MEMPCPY): Likewise.
6564         (BUILT_IN_MEMSET): Likewise.
6565         (BUILT_IN_STPCPY): Likewise.
6566         (BUILT_IN_STRCAT): Likewise.
6567         (BUILT_IN_STRCHR): Likewise.
6568         (BUILT_IN_STRCPY): Likewise.
6569         (BUILT_IN_STRLEN): Likewise.
6570         (BUILT_IN_MEMCPY_CHK): Likewise.
6571         (BUILT_IN_MEMMOVE_CHK): Likewise.
6572         (BUILT_IN_MEMPCPY_CHK): Likewise.
6573         (BUILT_IN_MEMSET_CHK): Likewise.
6574         (BUILT_IN_STPCPY_CHK): Likewise.
6575         (BUILT_IN_STRCAT_CHK): Likewise.
6576         (BUILT_IN_STRCPY_CHK): Likewise.
6577         * calls.c (store_bounds): Likewise.
6578         (emit_call_1): Likewise.
6579         (special_function_p): Likewise.
6580         (maybe_warn_nonstring_arg): Likewise.
6581         (initialize_argument_information): Likewise.
6582         (finalize_must_preallocate): Likewise.
6583         (compute_argument_addresses): Likewise.
6584         (expand_call): Likewise.
6585         * cfgexpand.c (expand_call_stmt): Likewise.
6586         (expand_return): Likewise.
6587         (expand_gimple_stmt_1): Likewise.
6588         (pass_expand::execute): Likewise.
6589         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
6590         (cgraph_node::remove): Likewise.
6591         (cgraph_node::dump): Likewise.
6592         (cgraph_node::verify_node): Likewise.
6593         * cgraph.h (chkp_function_instrumented_p): Likewise.
6594         (symtab_node::get_alias_target): Likewise.
6595         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
6596         (cgraph_local_p): Likewise.
6597         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
6598         (cgraph_edge::rebuild_references): Likewise.
6599         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
6600         (walk_polymorphic_call_targets): Likewise.
6601         (cgraph_node::expand_thunk): Likewise.
6602         (symbol_table::output_weakrefs): Likewise.
6603         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
6604         (ix86_handle_option): Likewise.
6605         * config/i386/constraints.md: Likewise.
6606         * config/i386/i386-builtin-types.def (BND): Likewise.
6607         (VOID): Likewise.
6608         (PVOID): Likewise.
6609         (ULONG): Likewise.
6610         * config/i386/i386-builtin.def (BDESC_END): Likewise.
6611         (BDESC_FIRST): Likewise.
6612         (BDESC): Likewise.
6613         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
6614         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
6615         * config/i386/i386.c (enum reg_class): Likewise.
6616         (ix86_target_string): Likewise.
6617         (ix86_option_override_internal): Likewise.
6618         (ix86_conditional_register_usage): Likewise.
6619         (ix86_valid_target_attribute_inner_p): Likewise.
6620         (ix86_set_indirect_branch_type): Likewise.
6621         (ix86_set_current_function): Likewise.
6622         (ix86_function_arg_regno_p): Likewise.
6623         (init_cumulative_args): Likewise.
6624         (ix86_function_arg_advance): Likewise.
6625         (ix86_function_arg): Likewise.
6626         (ix86_pass_by_reference): Likewise.
6627         (ix86_function_value_regno_p): Likewise.
6628         (ix86_function_value_1): Likewise.
6629         (ix86_function_value_bounds): Likewise.
6630         (ix86_return_in_memory): Likewise.
6631         (ix86_setup_incoming_vararg_bounds): Likewise.
6632         (ix86_va_start): Likewise.
6633         (indirect_thunk_need_prefix): Likewise.
6634         (print_reg): Likewise.
6635         (ix86_print_operand): Likewise.
6636         (ix86_expand_call): Likewise.
6637         (ix86_output_function_return): Likewise.
6638         (reg_encoded_number): Likewise.
6639         (BDESC_VERIFYS): Likewise.
6640         (ix86_init_mpx_builtins): Likewise.
6641         (ix86_init_builtins): Likewise.
6642         (ix86_emit_cmove): Likewise.
6643         (ix86_emit_move_max): Likewise.
6644         (ix86_expand_builtin): Likewise.
6645         (ix86_builtin_mpx_function): Likewise.
6646         (ix86_get_arg_address_for_bt): Likewise.
6647         (ix86_load_bounds): Likewise.
6648         (ix86_store_bounds): Likewise.
6649         (ix86_load_returned_bounds): Likewise.
6650         (ix86_store_returned_bounds): Likewise.
6651         (ix86_class_likely_spilled_p): Likewise.
6652         (ix86_hard_regno_mode_ok): Likewise.
6653         (x86_order_regs_for_local_alloc): Likewise.
6654         (ix86_mitigate_rop): Likewise.
6655         (ix86_bnd_prefixed_insn_p): Likewise.
6656         (ix86_mpx_bound_mode): Likewise.
6657         (ix86_make_bounds_constant): Likewise.
6658         (ix86_initialize_bounds): Likewise.
6659         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6660         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6661         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6662         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6663         (TARGET_CHKP_BOUND_MODE): Likewise.
6664         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6665         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6666         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6667         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6668         * config/i386/i386.h (TARGET_MPX): Likewise.
6669         (TARGET_MPX_P): Likewise.
6670         (VALID_BND_REG_MODE): Likewise.
6671         (FIRST_BND_REG): Likewise.
6672         (LAST_BND_REG): Likewise.
6673         (enum reg_class): Likewise.
6674         (BND_REG_P): Likewise.
6675         (BND_REGNO_P): Likewise.
6676         (BNDmode): Likewise.
6677         (ADJUST_INSN_LENGTH): Likewise.
6678         * config/i386/i386.md: Likewise.
6679         * config/i386/i386.opt: Likewise.
6680         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6681         (defined): Likewise.
6682         (LINK_MPX): Likewise.
6683         (MPX_SPEC): Likewise.
6684         (LIBMPX_SPEC): Likewise.
6685         (LIBMPXWRAPPERS_SPEC): Likewise.
6686         (CHKP_SPEC): Likewise.
6687         * config/i386/predicates.md: Likewise.
6688         * dbxout.c (dbxout_type): Likewise.
6689         * doc/extend.texi: Likewise.
6690         * doc/invoke.texi: Likewise.
6691         * doc/md.texi: Likewise.
6692         * doc/tm.texi: Likewise.
6693         * doc/tm.texi.in: Likewise.
6694         * dwarf2out.c (is_base_type): Likewise.
6695         (gen_formal_types_die): Likewise.
6696         (gen_subprogram_die): Likewise.
6697         (gen_type_die_with_usage): Likewise.
6698         (gen_decl_die): Likewise.
6699         (dwarf2out_late_global_decl): Likewise.
6700         * expr.c (expand_assignment): Likewise.
6701         (emit_storent_insn): Likewise.
6702         (store_expr_with_bounds): Likewise.
6703         (store_expr): Likewise.
6704         (expand_expr_real_1): Likewise.
6705         * expr.h (store_expr_with_bounds): Likewise.
6706         * function.c (use_register_for_decl): Likewise.
6707         (struct bounds_parm_data): Likewise.
6708         (assign_parms_augmented_arg_list): Likewise.
6709         (assign_parm_find_entry_rtl): Likewise.
6710         (assign_parm_is_stack_parm): Likewise.
6711         (assign_parm_load_bounds): Likewise.
6712         (assign_bounds): Likewise.
6713         (assign_parms): Likewise.
6714         (expand_function_start): Likewise.
6715         * gcc.c (CHKP_SPEC): Likewise.
6716         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6717         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6718         (wrestrict_dom_walker::check_call): Likewise.
6719         * gimple.c (gimple_build_call_from_tree): Likewise.
6720         * gimple.h (enum gf_mask): Likewise.
6721         (gimple_call_with_bounds_p): Likewise.
6722         (gimple_call_set_with_bounds): Likewise.
6723         * gimplify.c (gimplify_init_constructor): Likewise.
6724         * ipa-cp.c (initialize_node_lattices): Likewise.
6725         (propagate_constants_across_call): Likewise.
6726         (find_more_scalar_values_for_callers_subset): Likewise.
6727         * ipa-hsa.c (process_hsa_functions): Likewise.
6728         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6729         * ipa-icf.c (sem_function::merge): Likewise.
6730         * ipa-inline.c (early_inliner): Likewise.
6731         * ipa-pure-const.c (warn_function_noreturn): Likewise.
6732         (warn_function_cold): Likewise.
6733         (propagate_pure_const): Likewise.
6734         * ipa-ref.h (enum GTY): Likewise.
6735         * ipa-split.c (find_retbnd): Likewise.
6736         (consider_split): Likewise.
6737         (split_function): Likewise.
6738         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6739         * ipa.c (walk_polymorphic_call_targets): Likewise.
6740         (symbol_table::remove_unreachable_nodes): Likewise.
6741         (process_references): Likewise.
6742         (cgraph_build_static_cdtor_1): Likewise.
6743         * lto-cgraph.c (lto_output_node): Likewise.
6744         (output_refs): Likewise.
6745         (compute_ltrans_boundary): Likewise.
6746         (input_overwrite_node): Likewise.
6747         (input_node): Likewise.
6748         (input_cgraph_1): Likewise.
6749         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6750         * passes.c (pass_manager::execute_early_local_passes): Likewise.
6751         (class pass_chkp_instrumentation_passes): Likewise.
6752         (make_pass_chkp_instrumentation_passes): Likewise.
6753         * passes.def: Likewise.
6754         * rtl.h (struct GTY): Likewise.
6755         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6756         * stor-layout.c (layout_type): Likewise.
6757         * symtab.c: Likewise.
6758         * target.def: Likewise.
6759         * targhooks.c (default_chkp_bound_type): Likewise.
6760         (default_chkp_bound_mode): Likewise.
6761         (default_builtin_chkp_function): Likewise.
6762         (default_chkp_function_value_bounds): Likewise.
6763         (default_chkp_make_bounds_constant): Likewise.
6764         (default_chkp_initialize_bounds): Likewise.
6765         * targhooks.h (default_chkp_bound_type): Likewise.
6766         (default_chkp_bound_mode): Likewise.
6767         (default_builtin_chkp_function): Likewise.
6768         (default_chkp_function_value_bounds): Likewise.
6769         (default_chkp_make_bounds_constant): Likewise.
6770         (default_chkp_initialize_bounds): Likewise.
6771         * toplev.c (compile_file): Likewise.
6772         (process_options): Likewise.
6773         * tree-core.h (DEF_BUILTIN): Likewise.
6774         (DEF_BUILTIN_CHKP): Likewise.
6775         * tree-inline.c (declare_return_variable): Likewise.
6776         (remap_gimple_stmt): Likewise.
6777         (copy_bb): Likewise.
6778         (initialize_inlined_parameters): Likewise.
6779         (expand_call_inline): Likewise.
6780         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6781         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6782         (make_pass_ipa_chkp_produce_thunks): Likewise.
6783         (make_pass_chkp): Likewise.
6784         (make_pass_chkp_opt): Likewise.
6785         (make_pass_chkp_instrumentation_passes): Likewise.
6786         * tree-pretty-print.c (dump_generic_node): Likewise.
6787         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6788         * tree-ssa-dce.c (propagate_necessity): Likewise.
6789         (eliminate_unnecessary_stmts): Likewise.
6790         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6791         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6792         * tree-ssa-sccvn.h: Likewise.
6793         * tree-ssa-strlen.c (get_string_length): Likewise.
6794         (valid_builtin_call): Likewise.
6795         (adjust_last_stmt): Likewise.
6796         (handle_builtin_strchr): Likewise.
6797         (handle_builtin_strcpy): Likewise.
6798         (handle_builtin_stxncpy): Likewise.
6799         (handle_builtin_memcpy): Likewise.
6800         (handle_builtin_strcat): Likewise.
6801         (strlen_check_and_optimize_stmt): Likewise.
6802         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6803         * tree-streamer-in.c: Likewise.
6804         * tree-streamer.c (record_common_node): Likewise.
6805         * tree.c (tree_code_size): Likewise.
6806         (wide_int_to_tree_1): Likewise.
6807         (type_contains_placeholder_1): Likewise.
6808         (build_common_tree_nodes): Likewise.
6809         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6810         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6811         (POINTER_BOUNDS_P): Likewise.
6812         (BOUNDED_TYPE_P): Likewise.
6813         (BOUNDED_P): Likewise.
6814         (CALL_WITH_BOUNDS_P): Likewise.
6815         (pointer_bounds_type_node): Likewise.
6816         * value-prof.c (gimple_ic): Likewise.
6817         * var-tracking.c (vt_add_function_parameters): Likewise.
6818         * varasm.c (make_decl_rtl): Likewise.
6819         (assemble_start_function): Likewise.
6820         (output_constant): Likewise.
6821         (maybe_assemble_visibility): Likewise.
6822         * varpool.c (ctor_for_folding): Likewise.
6823         * chkp-builtins.def: Remove.
6824         * ipa-chkp.c: Remove.
6825         * ipa-chkp.h: Remove.
6826         * rtl-chkp.c: Remove.
6827         * rtl-chkp.h: Remove.
6828         * tree-chkp-opt.c: Remove.
6829         * tree-chkp.c: Remove.
6830         * tree-chkp.h: Remove.
6832 2018-06-07  Carl Love  <cel@us.ibm.com>
6834         * config/rs6000/vsx.md (vextract_fp_from_shorth,
6835         vextract_fp_from_shortl): Add BE support.
6837 2018-06-07  Paul Koning  <ni1d@arrl.net>
6839         * compare-elim.c (try_merge_compare): Don't merge compare if
6840         address contains a side effect.
6841         (try_eliminate_compare): Likewise.
6843 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
6845         * config.gcc: Support "tremont".
6846         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6847         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6848         PROCESSOR_TREMONT.
6849         * config/i386/i386.c (m_TREMONT): Define.
6850         (processor_target_table): Add "tremont".
6851         (PTA_TREMONT): Define.
6852         (ix86_lea_outperforms): Add TARGET_TREMONT.
6853         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6854         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6855         and M_INTEL_GOLDMONT_PLUS.
6856         (fold_builtin_cpu): Add "tremont".
6857         (ix86_add_stmt_cost): Add TARGET_TREMONT.
6858         (ix86_option_override_internal): Add "tremont".
6859         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6860         (processor_type): Add PROCESSOR_TREMONT.
6861         * config/i386/x86-tune.def: Add m_TREMONT.
6862         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6864 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6866         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6867         symbol defined for msp430i* devices to be lower case.
6869 2018-06-07  Richard Biener  <rguenther@suse.de>
6871         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6872         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
6873         Properly wrap signed arithmetic if overflow wraps.
6875 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
6877         PR tree-optimization/69615
6878         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6879         of a cast from a same precision integral SSA_NAME in a bb dominated
6880         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
6881         cast to utype if rhs2 has already a compatible type.
6883 2018-06-07  Richard Biener  <rguenther@suse.de>
6885         PR tree-optimization/85935
6886         * graphite-scop-detection.c (find_params_in_bb): Analyze
6887         condition operands with respect to the correct loop.  Assert
6888         the analysis doesn't fail.
6890 2018-06-04  Carl Love  <cel@us.ibm.com>
6892         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6893         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
6894         as it is slightly cheaper.
6895         (first_match_or_eos_index_<mode>):
6896         Calculate index using natural element order.
6897         (first_match_index_<mode>):
6898         Calculate index using natural element order.
6899         (first_match_or_eos_index_<mode>):
6900         Calculate index using natural order.
6901         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6902         for BE and LE modes.
6903         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6904         P9V_BUILTIN_VCLZLSBB_V16QI.
6905         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6906         specific.
6908 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6910         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6911         indentation and line wrap for many prototypes.  Add missing
6912         @smallexample directives around block of prototypes for vec_xl and
6913         vec_xst.
6915 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
6917         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6918         track if we pass or return IEEE 128-bit floating point.
6919         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6920         C++ mangling that is compatible with GCC 8.1.
6921         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6922         (init_cumulative_args): Note if we pass or return IEEE 128-bit
6923         floating point types.
6924         (rs6000_function_arg_advance_1): Likewise.
6925         (rs6000_mangle_type): Optionally generate mangled names that match
6926         what GCC 8.1 generated for IEEE 128-bit floating point types.
6927         (rs6000_globalize_decl_name): If we have an external function that
6928         passes or returns IEEE 128-bit types, generate a weak reference
6929         from the mangled name used in GCC 8.1 to the current mangled
6930         name.
6931         (rs6000_init_builtins): Make __ibm128 use the long double type if
6932         long double is IBM extended double.  Make __float128 use the long
6933         double type if long double is IEEE 128-bit.
6935         PR target/85657
6936         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6937         macro for __ibm128 built-in functions.
6938         (PACK_IF): Add __ibm128 pack/unpack functions.
6939         (UNPACK_IF): Likewise.
6940         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6941         enable long double built-in functions if long double is IEEE
6942         128-bit floating point.
6943         (rs6000_invalid_builtin): Update long double built-in function
6944         error message.
6945         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6946         functions, adjust the built-in function to use the long double
6947         built-in function if __ibm128 and long double are the same type.
6948         * doc/extend.texi (PowerPC builtins): Update documention for
6949         __builtin_{,un}pack_longdouble.  Add documentation for
6950         __builtin_{,un}pack_ibm128.
6952 2018-06-06  Jim Wilson  <jimw@sifive.com>
6954         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6955         (struct machine_function): New field interrupt_mode.
6956         (riscv_handle_type_attribute): New function.  Add forward declaration.
6957         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6958         (riscv_expand_epilogue): Check interrupt_mode field.
6959         (riscv_set_current_function): Check interrupt attribute args and
6960         set interrupt_mode field.
6961         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6962         (riscv_sret, riscv_uret): New.
6963         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6964         new arguments to interrupt attribute.
6966 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
6968         PR target/63177
6969         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6970         Don't handle -mcpu=power8 if -mpower9-vector is also used.
6972 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6974         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6975         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
6976         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6977         several redundant entries.
6979 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
6981         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
6982         type from "rtx" to "rtx_insn *".
6983         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
6984         for local "call_insn", removing cast.
6985         (ix86_expand_call): Likewise, introducing a "call_insn" local.
6987 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
6989         PR tree-optimization/86066
6990         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
6991         for BIT_INSERT_EXPR stores.
6993 2018-06-06  Richard Biener  <rguenther@suse.de>
6995         PR tree-optimization/86062
6996         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6997         component refs ontop
6998         of to be offsetted base.
7000 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7002         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7003         to be static and remove check on interrupt attribute name.
7005 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7007         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7008         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7010 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
7012         PR target/79924
7013         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7014         second argument.
7015         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7016         Remove second argument, change how error is called.
7017         (aarch64_layout_arg): Remove second argument from
7018         aarch64_err_no_fpadvsimd call.
7019         (aarch64_init_cumulative_args): Ditto.
7020         (aarch64_gimplify_va_arg_expr): Ditto.
7021         * config/aarch64/aarch64.md (mov<mode>): Ditto.
7023 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
7025         * config/i386/i386.md (simple_return_indirect_internal): New expander.
7026         (*simple_return_indirect_internal<mode>): Rename from
7027         simple_return_indirect_internal.  Use W mode iterator.
7028         (rstorssp): New expander.
7029         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
7030         (clrssbsy): New expander.
7031         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
7033 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7035         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7036         __typeof__.
7037         (cmse_check_pointed_object): Likewise.
7039 2018-06-05  Martin Liska  <mliska@suse.cz>
7041         PR gcov-profile/47618
7042         * doc/invoke.texi: Document how -fprofile-dir format
7043         is extended.
7045 2018-06-05  Richard Biener  <rguenther@suse.de>
7047         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
7048         removal pretend DOM info isn't available so we do not update
7049         it and only remove edges, not dominated blocks.  Actually free
7050         DOM info in case we removed something.  Remove unreachable blocks.
7051         (mfb_keep_latches): Work with either DOM info or marked backedges.
7052         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
7053         first.  Mark backedges if DOM info isn't available.
7054         (Re-)compute DOM info after cleanup_control_flow_pre.
7056 2018-06-05  Richard Biener  <rguenther@suse.de>
7058         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
7059         (locus_discrim_hasher::hash): Adjust.
7060         (locus_discrim_hasher::equal): Likewise.
7061         (next_discriminator_for_locus): Work on line directly.
7062         (same_line_p): Pass in expanded locus1 as well.
7063         (assign_discriminators): Avoid redundant location expansions.
7065 2018-06-05  Richard Biener  <rguenther@suse.de>
7067         PR tree-optimization/86046
7068         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
7069         if required after clearing TREE_ADDRESSABLE.
7071 2018-06-05  Richard Biener  <rguenther@suse.de>
7073         PR tree-optimization/86047
7074         * tree-ssa-loop.c (for_each_index): Glob handling of all
7075         decls and constants and really handle all of them.
7077 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7079         PR target/81497
7080         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7081         qualifier_void_pointer and qualifier_const_void_pointer.
7082         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
7083         (arm_init_builtins): Handle the above.
7084         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
7085         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
7086         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
7087         void intrinsics.
7089 2018-06-05  Martin Liska  <mliska@suse.cz>
7091         * auto-profile.c (read_autofdo_file): Do not use
7092         gcov_ctr_summary struct.
7093         (afdo_callsite_hot_enough_for_early_inline): Likewise.
7094         * coverage.c (struct counts_entry): Likewise.
7095         (read_counts_file): Read just single summary entry.
7096         (get_coverage_counts): Use gcov_summary struct.
7097         * coverage.h (get_coverage_counts): Likewise.
7098         * gcov-dump.c (dump_working_sets): Likewise.
7099         (tag_summary): Dump just single summary.
7100         * gcov-io.c (gcov_write_summary): Write just histogram
7101         summary.
7102         (gcov_read_summary): Read just single summary.
7103         (compute_working_sets): Use gcov_summary struct.
7104         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
7105         of GCOV_COUNTERS_SUMMABLE.
7106         (GCOV_COUNTERS_SUMMABLE): Remove.
7107         (GCOV_FIRST_VALUE_COUNTER): Replace with
7108         GCOV_COUNTER_V_INTERVAL.
7109         (struct gcov_ctr_summary): Remove.
7110         (struct gcov_summary): Directly use fields of former
7111         gcov_ctr_summary.
7112         (compute_working_sets): Use gcov_summary struct.
7113         * gcov.c (read_count_file): Do not use ctrs fields.
7114         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
7115         struct.
7116         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
7117         struct.
7118         * profile.c: Likewise.
7119         * profile.h: Likewise.
7121 2018-06-05  Martin Liska  <mliska@suse.cz>
7123         PR gcov-profile/84846
7124         * gcov.c (output_lines): Print working directory only
7125         in intermediate format.
7127 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
7129         * config/s390/s390-builtin-types.def: Add void function type.
7130         * config/s390/s390-builtins.def: Use the function type for the
7131         tbeginc builtin.
7133 2018-06-04  Jim Wilson  <jimw@sifive.com>
7135         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
7136         to int.
7137         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
7138         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
7139         handle EH_RETURN_DATA_REGNO registers properly.
7140         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
7141         (riscv_expand_epilogue): Update comment.  Change argument name and
7142         type.  Update code to use new name and type.  Pass new args to
7143         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
7144         EXCEPTION_RETURN.
7145         * config/riscv/riscv.md (NORMAL_RETURN): New.
7146         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
7147         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
7148         (eh_return): Call gen_eh_return_internal and emit barrier.
7149         (eh_return_internal): Call riscv_expand_epilogue.
7151 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
7153         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
7154         bit_insertion field and declare can_be_merged_into method.
7155         (merged_store_group::can_be_merged_into): New method.
7156         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
7157         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
7158         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
7160 2018-06-04  Richard Biener  <rguenther@suse.de>
7162         PR tree-optimization/85955
7163         * builtins.c (fold_builtin_sincos): Convert pointers to
7164         destination to appropriate type before dereferencing.
7166 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
7168         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
7170 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
7172         * expr.c (expand_expr_real_1): Force the operand into memory if
7173         its TYPE_MODE is BLKmode and if there is no integer mode for
7174         the number of bits being extracted.
7176 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
7178         PR target/85832
7179         PR target/86036
7180         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7181         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
7183 2018-06-04  Richard Biener  <rguenther@suse.de>
7185         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
7186         (cleanup_tree_cfg_noloop): ... single caller.  Do
7187         start_recording_case_labels later.
7189 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
7191         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
7192         to _IMMINTRIN_H_INCLUDED.
7193         * config/i386/pconfigintrin.h: Ditto.
7194         * config/i386/waitpkgintrin.h: Ditto.
7195         * config/i386/immintrin.h: Add includes for sgxintrin.h,
7196         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
7197         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
7198         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
7199         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
7200         waitpkgintrin.h and cldemoteintrin.h.
7202 2018-06-04  Richard Biener  <rguenther@suse.de>
7204         PR tree-optimization/86038
7205         * tracer.c (find_best_successor): Check probability for
7206         being initialized, bail out if not.
7208 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
7210         PR target/86003
7211         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
7212         of bits to ignore when comparing architectures.
7214 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
7216         PR tree-optimization/69615
7217         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
7218         maximum or minimum of the type, try to merge it also as if
7219         range1 is + [-, x - 1] or + [x + 1, -].
7221         PR c++/86025
7222         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
7224 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
7226         PR tree-optimization/86034
7227         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
7228         the unsigned bitfield type in a bit insertion sequence if it does not
7229         have a larger precision than the bitfield size.
7230         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
7232 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
7234         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
7236 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
7238         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
7239         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
7240         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
7241         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
7243 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
7245         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
7246         Disable -fdelete-null-pointer-checks for ELF toolchain.
7248 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
7249             Kito Cheng  <kito.cheng@gmail.com>
7251         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
7252         (nds32le-*-*, nds32be-*-*): Integrate checking process.
7253         (nds32*-*-*): Add glibc and uclibc conditions.
7254         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
7255         (TARGET_EXCEPT_UNWIND_INFO): Define.
7256         * config/nds32/elf.h: New file.
7257         * config/nds32/linux.h: New file.
7258         * config/nds32/nds32-elf.opt: New file.
7259         * config/nds32/nds32-linux.opt: New file.
7260         * config/nds32/nds32-fp-as-gp.c
7261         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
7262         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
7263         TARGET_LINUX_ABI.
7264         (nds32_asm_file_end): Ditto.
7265         (nds32_print_operand): Ditto.
7266         (nds32_insert_attributes): Ditto.
7267         (nds32_init_libfuncs): New function.
7268         (TARGET_HAVE_TLS): Define.
7269         (TARGET_INIT_LIBFUNCS): Define.
7270         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
7271         spec content.
7272         (TARGET_ELF): Apply different mcmodel setting.
7273         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
7274         been migrated into elf.h and linux.h files.
7275         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
7276         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
7277         (mcmodel): The content has been migrated into nds32-elf.opt and
7278         nds32-linux.opt files.
7279         * config/nds32/t-elf: New file.
7280         * config/nds32/t-linux: New file.
7282 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
7283             Shiva Chen  <shiva0217@gmail.com>
7285         * config/nds32/constants.md (unspec_volatile_element): Add
7286         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
7287         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
7288         optimization.
7289         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
7290         (make_pass_nds32_fp_as_gp): Declare.
7291         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
7292         optmization pass.
7293         (nds32_asm_function_end_prologue): Remove unused asm output.
7294         (nds32_asm_function_begin_epilogue): Remove unused asm output.
7295         (nds32_asm_file_start): Output necessary fp_as_gp information.
7296         (nds32_option_override): Adjust register usage.
7297         (nds32_expand_prologue): Consider fp_as_gp situation.
7298         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
7299         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
7300         (epilogue): Ditto.
7301         (return): Ditto.
7302         (simple_return): Ditto.
7303         (omit_fp_begin): Output special directive for fp_as_gp.
7304         (omit_fp_end): Output special directive for fp_as_gp.
7305         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
7306         mforbid-fp-as-gp): New options.
7308 2018-06-01  Mark Wielaard  <mark@klomp.org>
7310         * dwarf2out.c (dwarf2out_finish): Remove generation of
7311         DW_AT_loclists_base.
7313 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
7315         * gimple-ssa-store-merging.c: Include gimple-fold.h.
7316         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
7317         (struct merged_store_group): Add bit_insertion field.
7318         (dump_char_array): Use standard hexadecimal format.
7319         (merged_store_group::merged_store_group): Set bit_insertion to false.
7320         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
7321         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
7322         also print the mask in the dump file.
7323         (pass_store_merging::gate): Minor tweak.
7324         (imm_store_chain_info::coalesce_immediate): Fix wrong association
7325         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
7326         stores with INTEGER_CST stores.
7327         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
7328         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
7329         and use it throughout.  Generate bit insertion sequences if need be.
7330         (pass_store_merging::process_store): Remove redundant condition.
7331         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
7333 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
7335         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
7336         the 128-bit floating point types.  Fix function comment.
7338 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7340         * config/aarch64/aarch64-simd.md
7341         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
7342         mnemonics.
7343         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
7344         mnemonics.
7346 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
7348         PR tree-optimization/85989
7349         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
7350         variable.
7351         (backprop::intersect_uses): Check it when deciding whether this
7352         is a backedge reference.
7353         (backprop::process_block): Add each phi to m_visited_phis
7354         after visiting it, then clear it at the end.
7356 2018-06-01  Richard Biener  <rguenther@suse.de>
7358         * tree-vectorizer.h (vect_dr_stmt): New function.
7359         (vect_get_load_cost): Adjust.
7360         (vect_get_store_cost): Likewise.
7361         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
7362         Use vect_dr_stmt instead of DR_SMTT.
7363         (vect_record_base_alignments): Likewise.
7364         (vect_calculate_target_alignment): Likewise.
7365         (vect_compute_data_ref_alignment): Likewise and make static.
7366         (vect_update_misalignment_for_peel): Likewise.
7367         (vect_verify_datarefs_alignment): Likewise.
7368         (vector_alignment_reachable_p): Likewise.
7369         (vect_get_data_access_cost): Likewise.  Pass down
7370         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
7371         (vect_get_peeling_costs_all_drs): Likewise.
7372         (vect_peeling_hash_get_lowest_cost): Likewise.
7373         (vect_enhance_data_refs_alignment): Likewise.
7374         (vect_find_same_alignment_drs): Likewise.
7375         (vect_analyze_data_refs_alignment): Likewise.
7376         (vect_analyze_group_access_1): Likewise.
7377         (vect_analyze_group_access): Likewise.
7378         (vect_analyze_data_ref_access): Likewise.
7379         (vect_analyze_data_ref_accesses): Likewise.
7380         (vect_vfa_segment_size): Likewise.
7381         (vect_small_gap_p): Likewise.
7382         (vectorizable_with_step_bound_p): Likewise.
7383         (vect_prune_runtime_alias_test_list): Likewise.
7384         (vect_analyze_data_refs): Likewise.
7385         (vect_supportable_dr_alignment): Likewise.
7386         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7387         (vect_gen_prolog_loop_niters): Likewise.
7388         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7389         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7390         modify DR_STMT.
7391         (vect_recog_mask_conversion_pattern): Likewise.
7392         (vect_try_gather_scatter_pattern): Likewise.
7393         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7394         to vect_get_store_cost.
7395         (vect_get_store_cost): Get stmt_info instead of DR.
7396         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7397         (vect_get_load_cost): Get stmt_info instead of DR.
7399 2018-06-01  Richard Biener  <rguenther@suse.de>
7401         PR middle-end/86017
7402         * gimple-fold.c (var_decl_component_p): Also allow offsetted
7403         vars wrapped in MEM_REFs.
7405 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
7407         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7408         Fix subreg tests so that we only return a choice between
7409         GENERAL_REGS and FP_REGS if the original classes included both.
7411 2018-06-01  Richard Biener  <rguenther@suse.de>
7413         PR ipa/85960
7414         * tree-ssa-structalias.c (get_function_part_constraint):
7415         Handle NULL fi->decl.
7416         (find_func_aliases_for_call): Properly handle indirect
7417         fi from direct call.
7418         (find_func_clobbers): Likewise.
7419         (ipa_pta_execute): Likewise.
7420         (create_variable_info_for): For functions that are ifunc_resolver
7421         resolve to a varinfo that contains the result of the resolver call.
7422         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7423         aliases.
7425 2018-05-31  Michael Collison  <michael.collison@arm.com>
7427         * config/aarch64/aarch64.md:
7428         (*fix_to_zero_extenddfdi2): New pattern.
7429         * gcc.target/aarch64/fix_extend1.c: New testcase.
7431 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
7433         PR middle-end/78809
7434         PR middle-end/83026
7435         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
7436         and BUILT_IN_STRNCMP_EQ.
7437         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
7438         BUILT_IN_STRNCMP_EQ.
7439         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
7440         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7441         (gimple_fold_builtin): Likewise.
7442         * tree-ssa-strlen.c (compute_string_length): New function.
7443         (determine_min_obsize): New function.
7444         (handle_builtin_string_cmp): New function to handle calls to
7445         string compare functions.
7446         (strlen_optimize_stmt): Add handling to builtin string compare
7447         calls.
7448         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
7449         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7450         * tree.c (build_common_builtin_nodes): Add new defines of
7451         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
7453 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
7455         PR target/85984
7456         * bb-reorder.c (pass_partition_blocks::gate): Return false for
7457         functions with naked attribute.
7459 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7461         * config/i386/sse.md (avx_vec_concat<mode>):
7462         Substitute concat_tg_mode mode attribute with xtg_mode.
7463         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
7464         (concat_tg_mode): Remove mode attribute.
7466 2018-05-31  Martin Sebor  <msebor@redhat.com>
7468         PR c/82063
7469         * calls.c (alloc_max_size): Correct a logic error/typo.
7470         Treat excessive arguments as infinite.  Warn for invalid arguments.
7471         * doc/invoke.texi (-Walloc-size-larger-than): Update.
7473 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
7475         PR target/85829
7476         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
7477         and movx for Haswell.
7479 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
7480             Cesar Philippidis  <cesar@codesourcery.com>
7482         PR middle-end/85879
7483         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
7484         when emitting error on private/firstprivate reductions.
7485         * omp-low.c (lower_omp_target): Avoid reference-type processing
7486         on pointers for firstprivate clause.
7488 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7490         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
7491         (st1x2): Likewise.
7492         (st1x3): Likewise.
7493         * config/aarch64/aarch64-simd.md
7494         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
7495         (aarch64_ld1_x3_<mode>): Likewise
7496         (aarch64_st1x2<VALLDIF:mode>): Likewise
7497         (aarch64_st1_x2_<mode>): Likewise
7498         (aarch64_st1x3<VALLDIF:mode>): Likewise
7499         (aarch64_st1_x3_<mode>): Likewise
7500         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
7501         (vld1_s8_x3): Likewise.
7502         (vld1_u16_x3): Likewise.
7503         (vld1_s16_x3): Likewise.
7504         (vld1_u32_x3): Likewise.
7505         (vld1_s32_x3): Likewise.
7506         (vld1_u64_x3): Likewise.
7507         (vld1_s64_x3): Likewise.
7508         (vld1_f16_x3): Likewise.
7509         (vld1_f32_x3): Likewise.
7510         (vld1_f64_x3): Likewise.
7511         (vld1_p8_x3): Likewise.
7512         (vld1_p16_x3): Likewise.
7513         (vld1_p64_x3): Likewise.
7514         (vld1q_u8_x3): Likewise.
7515         (vld1q_s8_x3): Likewise.
7516         (vld1q_u16_x3): Likewise.
7517         (vld1q_s16_x3): Likewise.
7518         (vld1q_u32_x3): Likewise.
7519         (vld1q_s32_x3): Likewise.
7520         (vld1q_u64_x3): Likewise.
7521         (vld1q_s64_x3): Likewise.
7522         (vld1q_f16_x3): Likewise.
7523         (vld1q_f32_x3): Likewise.
7524         (vld1q_f64_x3): Likewise.
7525         (vld1q_p8_x3): Likewise.
7526         (vld1q_p16_x3): Likewise.
7527         (vld1q_p64_x3): Likewise.
7528         (vst1_s64_x2): Likewise.
7529         (vst1_u64_x2): Likewise.
7530         (vst1_f64_x2): Likewise.
7531         (vst1_s8_x2): Likewise.
7532         (vst1_p8_x2): Likewise.
7533         (vst1_s16_x2): Likewise.
7534         (vst1_p16_x2): Likewise.
7535         (vst1_s32_x2): Likewise.
7536         (vst1_u8_x2): Likewise.
7537         (vst1_u16_x2): Likewise.
7538         (vst1_u32_x2): Likewise.
7539         (vst1_f16_x2): Likewise.
7540         (vst1_f32_x2): Likewise.
7541         (vst1_p64_x2): Likewise.
7542         (vst1q_s8_x2): Likewise.
7543         (vst1q_p8_x2): Likewise.
7544         (vst1q_s16_x2): Likewise.
7545         (vst1q_p16_x2): Likewise.
7546         (vst1q_s32_x2): Likewise.
7547         (vst1q_s64_x2): Likewise.
7548         (vst1q_u8_x2): Likewise.
7549         (vst1q_u16_x2): Likewise.
7550         (vst1q_u32_x2): Likewise.
7551         (vst1q_u64_x2): Likewise.
7552         (vst1q_f16_x2): Likewise.
7553         (vst1q_f32_x2): Likewise.
7554         (vst1q_f64_x2): Likewise.
7555         (vst1q_p64_x2): Likewise.
7556         (vst1_s64_x3): Likewise.
7557         (vst1_u64_x3): Likewise.
7558         (vst1_f64_x3): Likewise.
7559         (vst1_s8_x3): Likewise.
7560         (vst1_p8_x3): Likewise.
7561         (vst1_s16_x3): Likewise.
7562         (vst1_p16_x3): Likewise.
7563         (vst1_s32_x3): Likewise.
7564         (vst1_u8_x3): Likewise.
7565         (vst1_u16_x3): Likewise.
7566         (vst1_u32_x3): Likewise.
7567         (vst1_f16_x3): Likewise.
7568         (vst1_f32_x3): Likewise.
7569         (vst1_p64_x3): Likewise.
7570         (vst1q_s8_x3): Likewise.
7571         (vst1q_p8_x3): Likewise.
7572         (vst1q_s16_x3): Likewise.
7573         (vst1q_p16_x3): Likewise.
7574         (vst1q_s32_x3): Likewise.
7575         (vst1q_s64_x3): Likewise.
7576         (vst1q_u8_x3): Likewise.
7577         (vst1q_u16_x3): Likewise.
7578         (vst1q_u32_x3): Likewise.
7579         (vst1q_u64_x3): Likewise.
7580         (vst1q_f16_x3): Likewise.
7581         (vst1q_f32_x3): Likewise.
7582         (vst1q_f64_x3): Likewise.
7583         (vst1q_p64_x3): Likewise.
7585 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7587         * config/msp430/msp430.c (msp430_output_labelref): Prepend
7588         user_label_prefix to name.
7590         * tree-core.h: Update comment about the format of NAME string
7591         passed to handler in attribute_spec.
7593         * config/msp430/msp430.md: Remove erroneous subreg expression from
7594         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
7595         zero_extend{q,h}isi2.
7597 2018-05-30  Borislav Petkov  <bp@suse.de>
7599         * doc/extend.texi: Document some architecture specific
7600         constraints and sort entries.
7602 2018-05-30  Martin Sebor  <msebor@redhat.com>
7604         PR middle-end/85369
7605         * builtins.c (expand_builtin_stpcpy_1): New function.
7606         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
7607         only if the former succeeds.
7609 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7611         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
7612         in saphira.
7614 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
7616         * doc/invoke.texi (-flinker-output): Document
7618 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
7620         * passes.c (ipa_write_summaries): Only modify statements if body
7621         is in memory.
7622         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
7623         incrementally linking.
7624         (ipa_passes): Likewise.
7625         * lto-cgraph.c (lto_output_node): When incrementally linking do not
7626         pass down resolution info.
7627         * common.opt (flag_incremental_link): Update info.
7628         * gcc.c (plugin specs): Turn flinker-output=* to
7629         -plugin-opt=-linker-output-known
7630         * toplev.c (compile_file): Also cut compilation when doing incremental
7631         link.
7632         * flag-types. (enum lto_partition_model): Add
7633         LTO_LINKER_OUTPUT_NOLTOREL.
7634         (invoke.texi): Add -flinker-output docs.
7635         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7636         link same way as WPA; do not stream in dead initializers.
7638         * dwarf2out.c (dwarf2out_die_ref_for_decl,
7639         darf2out_register_external_decl): Support incremental link.
7641 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
7643         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7645 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
7647         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7648         it down to simple_object_copy_lto_debug_sections.
7649         (run_gcc): Determine incremental LTO link time and configure
7650         lto1 into non-wpa mode, disable renaming of debug sections.
7652 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7654         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7655         descriptions of various incorrectly documented functions.
7657 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7659         Revert:
7660         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7661         address check not strict.
7663 2018-05-30  Richard Biener  <rguenther@suse.de>
7665         PR tree-optimization/85964
7666         * tracer.c (better_p): Drop initialized count check, we only
7667         call the function with initialized counts now.
7668         (find_best_successor): Do find a best edge if one
7669         has uninitialized count.
7670         (find_best_predecessor): Likewise.  Do BB frequency check only
7671         if count is initialized.
7673 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
7675         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7676         (aarch64_ldrstr_offset_compare): New.
7677         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7678         load/store orderings.
7679         (aarch64_gen_adjusted_ldpstp): Likewise.
7681 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
7683         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7684         Check for subset of GENERAL_REGS and FP_REGS.
7685         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7686         r=w alternative.
7688 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
7690         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7691         and wi::to_poly_offset.  Add the current offset and then check
7692         whether the sum fits, rather than using an unchecked addition of
7693         a checked term.  Check for a shwi rather than a uhwi.
7694         * expr.c (get_bit_range): Use tree_to_poly_uint64.
7695         (store_constructor): Use poly_int_tree_p.
7696         (expand_expr_real_1): Likewise.
7697         * function.c (assign_temp): Likewise.
7698         * fold-const.c (const_binop): Use poly_int_tree_p and
7699         wi::to_poly_offset.
7700         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
7701         division.
7702         * ipa-icf-gimple.c (func_checker::compare_operand): Use
7703         to_poly_offset for MEM offsets.
7704         * ipa-icf.c (sem_variable::equals): Likewise.
7705         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7706         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7707         wi::to_poly_offset for BIT_FIELD_REF offsets.
7708         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7709         wi::to_poly_offset.
7710         * var-tracking.c (emit_note_insn_var_location): Use
7711         tree_to_poly_uint64.
7713 2018-05-29  Jim Wilson  <jimw@sifive.com>
7715         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7717 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
7719         PR target/85950
7720         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7721         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7722         sequence.
7723         (sse4_1_round<mode>2): Use nonimmediate_operand
7724         for operand 1 predicate.
7726 2018-05-29  Martin Sebor  <msebor@redhat.com>
7727             Richard Biener  <rguenther@suse.de>
7729         PR testsuite/85888
7730         * calls.c (get_size_range): Call determine_value_range instead
7731         of get_value_range..
7732         * tree-vrp.h (determine_value_range): Declared new function.
7733         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7735 2018-05-29  Richard Biener  <rguenther@suse.de>
7737         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7738         sure to use non-pattern stmts for get_earlier_stmt arguments.
7739         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7740         called on pattern stmts.
7741         (get_later_stmt): Likewise.
7743 2018-05-29  Martin Liska  <mliska@suse.cz>
7745         PR gcov-profile/85759
7746         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7747         env variables.
7749 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
7751         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7752         VEC_UNPACK_*_EXPR.
7753         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7754         VEC_PACK_*_EXPR.
7756         PR target/85918
7757         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7758         VEC_PACK_FLOAT_EXPR): New tree codes.
7759         * tree-pretty-print.c (op_code_prio): Handle
7760         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7761         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7762         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7763         * tree-inline.c (estimate_operator_cost): Likewise.
7764         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7765         * fold-const.c (const_binop): Likewise.
7766         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7767         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7768         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7769         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7770         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7771         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7772         * expr.c (expand_expr_real_2): Likewise.
7773         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7774         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7775         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7776         optabs.
7777         * optabs.c (expand_widen_pattern_expr): For
7778         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7779         sign from result type rather than operand's type.
7780         (expand_binop_directly): For vec_packu_float_optab and
7781         vec_packs_float_optab allow result type to be different from operand's
7782         type.
7783         * optabs-tree.c (optab_for_tree_code): Handle
7784         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7785         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
7786         * tree-vect-generic.c (expand_vector_operations_1):  Handle
7787         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7788         VEC_PACK_FLOAT_EXPR.
7789         * tree-vect-stmts.c (supportable_widening_operation): Handle
7790         FIX_TRUNC_EXPR.
7791         (supportable_narrowing_operation): Handle FLOAT_EXPR.
7792         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7793         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7794         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
7795         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7796         mode attributes.
7797         (vec_pack<floatprefix>_float_<mode>): New expander.
7798         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7799         attributes.
7800         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7801         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7802         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7803         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7804         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7805         Document.
7806         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7807         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7808         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7809         VEC_PACK_FLOAT_EXPR): Document.
7811 2018-05-29  Richard Biener  <rguenther@suse.de>
7813         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7814         member.
7815         (stmt_vec_info_vec): Make pointer.
7816         (init_stmt_vec_info_vec): Remove.
7817         (free_stmt_vec_info_vec): Likewise.
7818         (set_stmt_vec_info_vec): New function.
7819         (free_stmt_vec_infos): Likewise.
7820         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7821         (set_vinfo_for_stmt): Likewise.
7822         (get_earlier_stmt): Likewise.
7823         (get_later_stmt): Likewise.
7824         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7825         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7826         (vec_info::~vec_info): Free stmt_vec_infos.
7827         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7828         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7829         (pass_slp_vectorize::execute): Likewise.
7830         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7831         (free_stmt_vec_info_vec): Likewise.
7832         (set_stmt_vec_info_vec): New function.
7833         (free_stmt_vec_infos): Likewise.
7834         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7835         the global stmt_vec_info_vec.
7836         * tree-parloops.c (gather_scalar_reductions): Use
7837         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7838         vector.
7840 2018-05-29  Richard Biener  <rguenther@suse.de>
7842         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7844 2018-05-29  Martin Liska  <mliska@suse.cz>
7845             David Malcolm  <dmalcolm@redhat.com>
7847         * vec.c (test_reverse): New.
7848         (vec_c_tests): Add new test.
7849         * vec.h (vl_ptr>::reverse): New function.
7851 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
7853         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7855         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7856         and later.
7858 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7860         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7862 2018-05-28  Richard Biener  <rguenther@suse.de>
7864         PR tree-optimization/85933
7865         * tree-vect-data-refs.c (vect_record_base_alignments): Only
7866         look at stmts marked as vectorizable.
7868 2018-05-28  Richard Biener  <rguenther@suse.de>
7870         PR tree-optimization/85934
7871         * tree-vect-generic.c (expand_vector_operations_1): Hoist
7872         vector boolean check before scalar optimization.
7874 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
7876         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7877         for armv5te.
7879 2018-05-28  Mark Wielaard  <mark@klomp.org>
7881         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7882         if it is an expression containing a minus sign.
7884 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
7886         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7888 2018-05-27  Paul Koning  <ni1d@arrl.net>
7890         * config/pdp11/pdp11.md (truncsihi2): Remove.
7892 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
7893             Chung-Ju Wu  <jasonwucj@gmail.com>
7895         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7896         implementation.
7897         (unaligned_store_dw): Ditto.
7898         * config/nds32/nds32-memory-manipulation.c
7899         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7900         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7901         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7902         (emit_setmem_word_loop): Rename to ...
7903         (emit_setmem_doubleword_loop): ... this.
7904         (nds32_gen_dup_4_byte_to_word_value): New function.
7905         (nds32_gen_dup_8_byte_to_double_word_value): New function.
7906         (nds32_expand_setmem_loop): Refine implementation.
7907         (nds32_expand_setmem_loop_v3m): Ditto.
7908         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7909         pattern.
7911 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
7913         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7915 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
7917         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7918         (nds32_init_machine_status): Initialize machine->attr_naked_p and
7919         machine->attr_no_prologue_p.
7920         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7921         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7922         (nds32_expand_epilogue): Consider attr_naked_p.
7923         (nds32_expand_epilogue_v3pop): Likewise.
7924         (nds32_can_use_return_insn): Likewise.
7925         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7926         attr_no_prologue_p fields.
7927         * config/nds32/nds32.opt (mret-in-naked-func): New option.
7929 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
7931         PR target/85918
7932         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7933         attributes.
7934         * config/i386/sse.md
7935         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7936         Rename to ...
7937         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7938         ... this.
7939         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7940         Rename to ...
7941         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7942         ... this.
7943         (*<floatsuffix>floatv2div2sf2): Rename to ...
7944         (*float<floatunssuffix>v2div2sf2): ... this.
7945         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7946         (float<floatunssuffix>v2div2sf2_mask): ... this.
7947         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7948         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7949         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7950         to ...
7951         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7952         ... this.
7953         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7954         Rename to ...
7955         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7956         ... this.
7957         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7958         Rename to ...
7959         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7960         ... this.
7961         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7962         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7963         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7964         gen_ufix_truncv8dfv8si2.
7965         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7966         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7967         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7968         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7969         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7970         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7971         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7972         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7974 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
7976         PR target/85900
7977         PR target/85345
7978         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
7980 2018-05-25  Jim Wilson  <jimw@sifive.com>
7982         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
7983         * config/riscv/riscv.c (struct machine_function): Add
7984         interrupt_handler_p and attribute_checked_p fields.
7985         (riscv_attribute_table): Add interrupt.
7986         (riscv_interrupt_type_p): New.
7987         (riscv_save_reg_p): Save extra regs for interrupt handler.
7988         (riscv_use_save_libcall): Return false  for interrupt handler.
7989         (riscv_first_stack_step): Add forward declaration.
7990         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
7991         for interrupt handler with large frame.  Use it for saved reg list.
7992         (riscv_expand_prologue): Move flag_stack_usage_info support to
7993         eliminate duplication.
7994         (riscv_expand_epilogue): Generate mret for interrupt handler.
7995         (riscv_epilogue_uses): New.
7996         (riscv_can_use_return_insn): Return false for interrupt handler.
7997         (riscv_function_ok_for_sibcall): Likewise.
7998         (riscv_set_current_function): Add interrupt handler support.
7999         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8000         * config/riscv/riscv.md (UNSPECV_MRET): New.
8001         (GP_REGNUM): New.
8002         (riscv_frflags, riscv_fsflags): Use tab after opcode.
8003         (riscv_mret): New.
8004         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8006 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
8008         PR tree-optimization/85712
8009         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8010         this candidate has already been replaced in-situ by a copy.
8012 2018-05-25  Jason Merrill  <jason@redhat.com>
8014         PR c++/80485 - inline function non-zero address.
8015         * symtab.c (nonzero_address): Check DECL_COMDAT.
8017 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
8019         PR target/83628
8020         * config/alpha/alpha.md (ashlsi3): New insn pattern.
8021         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
8022         extension of SImode operation.  Use const123_operand predicate.
8023         (*saddsi_1): Remove.
8024         (*saddl_se_1): Ditto.
8025         (*ssubsi_1): Ditto.
8026         (*ssubl_se_1): Ditto.
8027         * config/alpha/predicates.md (const123_operand): New predicate.
8028         * config/alpha/constraints.md (P): Use IN_RANGE.
8030 2018-05-25  Richard Biener  <rguenther@suse.de>
8032         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8033         defaulted to true.
8034         (ref_maybe_used_by_stmt_p): Likewise.
8035         (stmt_may_clobber_ref_p): Likewise.
8036         (stmt_may_clobber_ref_p_1): Likewise.
8037         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8038         and pass it along.
8039         (ref_maybe_used_by_stmt_p): Likewise.
8040         (stmt_may_clobber_ref_p): Likewise.
8041         (stmt_may_clobber_ref_p_1): Likewise.
8042         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
8043         the alias oracle to disambiguate DRs with stmts DR analysis
8044         couldn't handle.
8045         (vect_analyze_data_refs): Do not give up on not analyzable
8046         DRs for BB vectorization.  Remove code truncating the dataref
8047         vector.
8049 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
8051         PR target/85832
8052         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8053         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
8054         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
8056 2018-05-25  Richard Biener  <rguenther@suse.de>
8058         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
8059         function, combining stmt data ref gathering and fatal analysis
8060         parts.
8061         (vect_analyze_data_refs): Remove now redudnant code and simplify.
8062         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
8063         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
8064         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
8065         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
8067 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8069         PR tree-optimization/85720
8070         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
8071         SCC if all partitions are builtins.
8072         (version_loop_by_alias_check): New parameter.  Generate cancelable
8073         runtime alias check if all partitions are builtins.
8074         (distribute_loop): Update call to above function.
8076 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8078         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8079         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8080         (parm_default_def_partition_arg): Ditto.
8081         (set_parm_default_def_partition): Ditto.
8082         (get_parm_default_def_partitions): Ditto and make it static.
8083         (get_undefined_value_partitions): Ditto and make it static.
8084         (remove_ssa_form): Refactor call to init_var_map here.
8085         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
8086         computation for loop region.
8087         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
8088         (register_default_def): Delete.
8089         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
8090         (parm_default_def_partition_arg): Ditto.
8091         (set_parm_default_def_partition): Ditto.
8092         (get_parm_default_def_partitions): Ditto and make it static.
8093         (get_undefined_value_partitions): Ditto and make it static.
8094         (coalesce_with_default, coalesce_with_default): Update comment.
8095         (create_coalesce_list_for_region): New func factored out from
8096         create_outofssa_var_map.
8097         (populate_coalesce_list_for_outofssa): New func factored out from
8098         create_outofssa_var_map and coalesce_ssa_name.
8099         (create_outofssa_var_map): Delete.
8100         (coalesce_ssa_name): Refactor to support live range computation.
8101         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
8102         (get_parm_default_def_partitions): Delete.
8103         (get_undefined_value_partitions): Ditto.
8104         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
8105         computation for loop region.
8106         (new_tree_live_info, loe_visit_block): Ditto.
8107         (live_worklist, set_var_live_on_entry): Ditto.
8108         (calculate_live_on_exit, verify_live_on_entry): Ditto.
8109         * tree-ssa-live.h (struct _var_map): New fields.
8110         (init_var_map): Change decl.
8111         (region_contains_p): New.
8113 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
8115         * tree-ssa-live.h (live_merge_and_clear): Delete.
8117 2018-05-25  Richard Biener  <rguenther@suse.de>
8119         PR c++/85912
8120         * tree-dump.c (dequeue_and_dump): Remove access to removed
8121         operand 2 of a SWITCH_EXPR.
8123 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8125         * doc/sourcebuild.texi (vect_double_cond_arith): Include
8126         multiplication and division.
8127         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
8128         (cond_udiv@var{m}, cond_umod@var{m}): Document.
8129         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
8130         (cond_udiv_optab, cond_umod_optab): New optabs.
8131         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
8132         (IFN_COND_RDIV): New internal functions.
8133         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
8134         TRUNC_MOD_EXPR and RDIV_EXPR.
8135         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
8136         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
8137         New unspecs.
8138         (SVE_INT_BINARY): Include mult.
8139         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
8140         (optab, sve_int_op): Handle mult.
8141         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
8142         UNSPEC_COND_DIV.
8143         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
8144         for SVE_INT_BINARY_SD.
8146 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8148         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
8149         (optab, sve_int_op): Handle div and udiv.
8150         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
8151         for SVE_INT_BINARY_SD.
8152         (*<optab><mode>3): New insn for the same.
8154 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8156         * tree-vect-patterns.c: Include predict.h.
8157         (vect_recog_divmod_pattern): Restrict check for division support
8158         to when optimizing for size.
8160 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8162         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
8163         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
8164         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
8165         (gimple_match_op::set_op): Likewise.
8166         (gimple_resimplify4): Declare.
8167         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
8168         (expr::gen_transform): Likewise.
8169         (decision_tree::gen): Generate a simplification routine for 4 operands.
8170         * gimple-match-head.c (gimple_simplify): Add an overload for
8171         4 operands.  In the top-level function, handle up to 4 call
8172         arguments and call gimple_resimplify4.
8173         (gimple_resimplify4): New function.
8174         (build_call_internal): Pass a fourth operand.
8175         (maybe_push_to_seq): Likewise.
8176         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
8177         Fold VEC_COND_EXPRs of an operation and a default value into
8178         an IFN_COND_* function if possible.
8179         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
8180         New unspecs.
8181         (SVE_COND_FP_BINARY): Include them.
8182         (optab, sve_fp_op): Handle them.
8183         (SVE_INT_BINARY_REV): New code iterator.
8184         (SVE_COND_FP_BINARY_REV): New int iterator.
8185         (commutative): New int attribute.
8186         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
8187         Declare.
8188         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
8189         function.
8190         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
8191         (*cond_<optab><mode>): New patterns for reversed operands.
8193 2018-05-25  Richard Biener  <rguenther@suse.de>
8195         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
8196         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
8197         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
8198         (STMT_VINFO_GROUPED_ACCESS): Adjust.
8199         * tree-vect-data-refs.c (everywhere): Adjust users.
8200         * tree-vect-loop.c (everywhere): Likewise.
8201         * tree-vect-slp.c (everywhere): Likewise.
8202         * tree-vect-stmts.c (everywhere): Likewise.
8203         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8205 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8207         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
8208         Rename to...
8209         (gcc_cv_as_section_exclude): ... this.
8210         Try Solaris as #exclude syntax.
8211         * configure: Regenerate.
8212         * config.in: Regenerate.
8213         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
8214         SECTION_EXCLUDE.
8215         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
8216         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
8218         * varasm.c (default_elf_asm_named_section): Don't check if
8219         HAVE_GAS_SECTION_EXCLUDE is defined.
8221 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8223         * doc/md.texi: Update the documentation of the cond_* optabs
8224         to mention the new final operand.  Fix GET_MODE_NUNITS call.
8225         Describe the scalar case too.
8226         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
8227         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
8228         instead of 2.
8229         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
8230         (get_conditional_internal_fn): Update comment.
8231         * tree-vect-loop.c (vectorizable_reduction): Pass the original
8232         accumulator value as a final argument to conditional functions.
8233         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
8234         a define_expand and add an "else" operand.  Assert for now that
8235         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
8236         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
8237         (*cond_<optab><mode>): New patterns.
8238         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
8239         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
8240         (UNSPEC_COND_EOR): Delete.
8241         (optab): Remove associated mappings.
8242         (SVE_INT_BINARY): New code iterator.
8243         (sve_int_op): Remove int attribute and add "minus" to the code
8244         attribute.
8245         (SVE_COND_INT_OP): Delete.
8246         (SVE_COND_FP_OP): Rename to...
8247         (SVE_COND_FP_BINARY): ...this.
8249 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
8251         * optabs.c (can_reuse_operands_p): New function.
8252         (maybe_legitimize_operands): Try to reuse the results for
8253         earlier operands.
8255 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
8257         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
8258         Add {q} suffix to insn mnemonic.
8260 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8262         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
8263         (msp430_warn_func_return): New.
8265 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
8267         * fold-const.c (tree_nonzero_bits): New function.
8268         * fold-const.h (tree_nonzero_bits): Likewise.
8269         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
8270         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
8272 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
8274         PR target/85900
8275         PR target/85345
8276         * varasm.c (assemble_alias): Check ifunc_resolver only on
8277         FUNCTION_DECL.
8279 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
8281         PR target/85903
8282         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
8283         when memory input operand is handled.
8285 2018-05-24  Luis Machado  <luis.machado@linaro.org>
8287         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
8288         global.
8289         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
8291 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
8293         * match.pd: Delay FMA folds until after vectorization.
8295 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8297         PR target/83009
8298         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8299         address check not strict.
8301 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
8303         * gimple-match.h (gimple_match_op): New class.
8304         (mprts_hook): Replace parameters with a gimple_match_op *.
8305         (maybe_build_generic_op): Likewise.
8306         (gimple_simplified_result_is_gimple_val): Replace parameters with
8307         a const gimple_match_op *.
8308         (gimple_simplify): Replace code_helper * and tree * parameters with
8309         a gimple_match_op * parameter.
8310         (gimple_resimplify1): Replace code_helper *, tree and tree *
8311         parameters with a gimple_match_op * parameter.
8312         (gimple_resimplify2): Likewise.
8313         (gimple_resimplify3): Likewise.
8314         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
8315         parameters with a gimple_match_op * parameter.
8316         * gimple-match-head.c (gimple_simplify): Change prototypes of
8317         auto-generated functions to take a gimple_match_op * instead of
8318         separate code_helper * and tree * parameters.  Make the same
8319         change in the top-level overload and update calls to the
8320         gimple_resimplify routines.  Update calls to the auto-generated
8321         functions and to maybe_push_res_to_seq in the publicly-facing
8322         operation-specific gimple_simplify overloads.
8323         (gimple_match_op::MAX_NUM_OPS): Define.
8324         (gimple_resimplify1): Replace rcode and ops with a single res_op
8325         parameter.  Update call to gimple_simplify.
8326         (gimple_resimplify2): Likewise.
8327         (gimple_resimplify3): Likewise.
8328         (mprts_hook): Replace parameters with a gimple_match_op *.
8329         (maybe_build_generic_op): Likewise.
8330         (build_call_internal): Replace type, nargs and ops with
8331         a gimple_match_op *.
8332         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
8333         with a single gimple_match_op *.  Update calls to mprts_hook,
8334         build_call_internal and gimple_simplified_result_is_gimple_val.
8335         Factor out code that is common to the tree_code and combined_fn cases.
8336         * genmatch.c (expr::gen_transform): Replace tem_code and
8337         tem_ops with a gimple_match_op called tem_op.  Update calls
8338         to the gimple_resimplify functions and maybe_push_res_to_seq.
8339         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
8340         res_ops.  Update call to the gimple_resimplify functions.
8341         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
8342         (decision_tree::gen): Make the functions take a gimple_match_op *
8343         called res_op instead of separate res_code and res_ops parameters.
8344         Update call accordingly.
8345         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
8346         and ops with a single res_op parameter.  Update calls to
8347         maybe_build_generic_op and maybe_push_res_to_seq.
8348         (fold_stmt_1): Update calls to gimple_simplify and
8349         replace_stmt_with_simplification.
8350         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
8351         and gimple_simplified_result_is_gimple_val.
8352         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
8353         gimple_simplify.
8354         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
8355         with a gimple_match_op *.
8356         (vn_nary_build_or_lookup): Likewise.  Update call to
8357         vn_nary_build_or_lookup_1.
8358         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
8359         gimple_match_op *.  Update calls to the gimple_resimplify routines
8360         and to gimple_simplified_result_is_gimple_val.
8361         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
8362         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
8363         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
8364         (visit_nary_op): Likewise.
8365         (visit_reference_op_load): Likewise.
8367 2018-05-23  Luis Machado  <luis.machado@linaro.org>
8369         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
8370         modifier for printing the step amount.
8372 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
8374         PR target/78849
8375         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
8376         types.
8378 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
8380         * doc/sourcebuild.texi (Endianness): New subsubsection.
8382 2018-05-23  Luis Machado  <luis.machado@linaro.org>
8384         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8385         <prefetch_dynamic_strides>: New const bool field.
8386         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8387         prefetch_dynamic_strides.
8388         (exynosm1_prefetch_tune): Likewise.
8389         (thunderxt88_prefetch_tune): Likewise.
8390         (thunderx_prefetch_tune): Likewise.
8391         (thunderx2t99_prefetch_tune): Likewise.
8392         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8393         false.
8394         (aarch64_override_options_internal): Update to set
8395         PARAM_PREFETCH_DYNAMIC_STRIDES.
8396         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8397         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8398         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8399         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8400         prefetch-dynamic-strides setting.
8402 2018-05-23  Luis Machado  <luis.machado@linaro.org>
8404         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8405         <minimum_stride>: New const int field.
8406         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8407         minimum_stride field defaulting to -1.
8408         (exynosm1_prefetch_tune): Likewise.
8409         (thunderxt88_prefetch_tune): Likewise.
8410         (thunderx_prefetch_tune): Likewise.
8411         (thunderx2t99_prefetch_tune): Likewise.
8412         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8413         <default_opt_level>: Set to 3.
8414         (aarch64_override_options_internal): Update to set
8415         PARAM_PREFETCH_MINIMUM_STRIDE.
8416         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8417         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8418         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8419         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8420         stride is constant and is below the minimum stride threshold.
8422 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8424         * config/arm/arm-cpus.in (mode26): Delete.
8425         (armv4): Delete mode26 reference.
8426         * config/arm/arm.c (arm_configure_build_target): Delete use of
8427         isa_bit_mode26.
8429 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
8431         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8432         New insn pattern.
8433         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
8434         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
8435         for non-SSE modes.
8436         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
8437         (floatunsdidf2): Ditto.
8439 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
8441         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
8442         (fixuns_trunc<mode>si2_avx512f): Ditto.
8443         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
8444         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
8445         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
8447 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
8449         PR rtl-optimization/79985
8450         * df-scan.c (df_insn_refs_collect): Remove special case for
8451         global registers and asm statements.
8453 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
8455         * extend.texi (Global Register Variables): Rewrite the bullet list.
8456         Note that the register is available for allocation. Note that access
8457         via inline asm must use constraints. Add note about async-signal
8458         handlers. Remove paragraph about automagic register selection.
8460 2018-05-23  Richard Biener  <rguenther@suse.de>
8462         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
8463         of fixed offset from memset VN.
8465 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
8467         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
8468         first_interp field.
8469         (alloc_cand_and_find_basis): Initialize first_interp field.
8470         (slsr_process_mul): Modify first_interp field.
8471         (slsr_process_add): Likewise.
8472         (slsr_process_cast): Modify first_interp field for each new
8473         interpretation.
8474         (slsr_process_copy): Likewise.
8475         (dump_candidate): Dump first_interp field.
8476         (replace_mult_candidate): Process all interpretations, not just
8477         subsequent ones.
8478         (replace_rhs_if_not_dup): Likewise.
8479         (replace_one_candidate): Likewise.
8481 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
8483         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
8484         Add new boolean.
8485         (aarch64_needs_frame_chain): New function.
8486         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
8488 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
8490         PR target/84882
8491         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
8492         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
8493         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
8494         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
8495         as true for strict-align.
8496         (aarch64_can_inline_p): Perform checks even when callee has no
8497         attributes to check for strict alignment.
8498         * doc/extend.texi (AArch64 Function Attributes): Document
8499         no-strict-align.
8500         * doc/invoke.texi: (AArch64 Options): Likewise.
8502 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
8504         PR tree-optimization/85853
8505         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
8506         the handling of the root of the node to...
8507         (vect_slp_analyze_node_operations_1): ...this new function,
8508         and run the whole thing with the child nodes' def types
8509         set according to their SLP node's def type.
8511 2018-05-23  Richard Biener  <rguenther@suse.de>
8513         PR middle-end/85874
8514         * tree-data-ref.c (create_runtime_alias_checks): Defer
8515         and ignore overflow warnings.
8517 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
8519         PR tree-optimization/85822
8520         * tree-vrp.c (is_masked_range_test): Fix handling of negative
8521         constants.
8523 2018-05-23  Richard Biener  <rguenther@suse.de>
8525         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8526         memset constants via native_interpret_expr.
8528 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
8530         PR target/85345
8531         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
8532         attribute.
8533         (cgraph_node::create_alias): Likewise.
8534         (cgraph_node::get_availability): Check ifunc_resolver instead
8535         of looking up ifunc attribute.
8536         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8537         * varasm.c (do_assemble_alias): Likewise.
8538         (assemble_alias): Likewise.
8539         (default_binds_local_p_3): Likewise.
8540         * cgraph.h (cgraph_node): Add ifunc_resolver.
8541         (cgraph_node::only_called_directly_or_aliased_p): Return false
8542         for IFUNC resolver.
8543         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
8544         attribute.
8545         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
8546         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
8547         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
8548         instead of looking up ifunc attribute.
8550 2018-05-22  Luis Machado  <luis.machado@linaro.org>
8552         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
8554 2018-05-22  Martin Sebor  <msebor@redhat.com>
8556         PR middle-end/85359
8557         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8558         only when expasion succeeds.
8559         (expand_builtin_strcmp): Same.
8560         (expand_builtin_strncmp): Same.
8562 2018-05-22  Martin Sebor  <msebor@redhat.com>
8564         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8566 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
8567             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8569         * config/aarch64/aarch64-ldpstp.md: Replace uses of
8570         aarch64_mem_pair_operand with memory_operand and delete operand swapping
8571         code.
8572         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8573         Add check for legitimate_address.
8574         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
8575         (aarch64_swap_ldrstr_operands): New.
8576         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
8577         Define prototype.
8579 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
8580             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8582         * config/aarch64/aarch64.md: New patterns to generate stp
8583         and ldp.
8584         (store_pair_sw, store_pair_dw): New patterns to generate stp for
8585         single words and double words.
8586         (load_pair_sw, load_pair_dw): Likewise.
8587         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
8588         Delete.
8589         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
8590         Delete.
8591         * config/aarch64/aarch64-ldpstp.md: Modify peephole
8592         for different mode ldpstp and add peephole for merged zero stores.
8593         Likewise for loads.
8594         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8595         Add size check.
8596         (aarch64_gen_store_pair): Rename calls to match new patterns.
8597         (aarch64_gen_load_pair): Rename calls to match new patterns.
8598         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
8599         (load_pair<DREG:mode><DREG2:mode>): ... This.
8600         (store_pair<mode>): Rename to...
8601         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
8602         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
8603         New mode iterators.
8604         (V_INT_EQUIV): Handle SImode.
8605         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
8606         New predicate.
8608 2018-05-22  Martin Sebor  <msebor@redhat.com>
8610         PR c/85623
8611         * calls.c (maybe_warn_nonstring_arg): Use string length to set
8612         or ajust the presumed bound on an operation to avoid unnecessary
8613         warnings.
8615 2018-05-22  Martin Sebor  <msebor@redhat.com>
8617         PR tree-optimization/85826
8618         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
8619         assuming that a DECL necesarily has a constant size.
8621 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
8623         PR middle-end/85862
8624         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
8626 2018-05-22  Richard Biener  <rguenther@suse.de>
8628         PR tree-optimization/85834
8629         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8630         non-constant and non-zero memset arguments.
8632 2018-05-22  Martin Liska  <mliska@suse.cz>
8634         PR ipa/85607
8635         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8637 2018-05-22  Richard Biener  <rguenther@suse.de>
8639         PR tree-optimization/85863
8640         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8641         comparisons when vectype is specified.
8642         (vectorizable_condition): Do not specify vectype for
8643         vect_is_simple_cond when SLP vectorizing.
8645 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
8647         PR target/85657
8648         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8649         define __ibm128 as long double.
8650         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8651         as a distinct type when IEEE 128-bit support is enabled.
8652         (init_float128_ieee): Fix up conversions between IFmode and IEEE
8653         128-bit types to use the correct functions.
8654         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8655         convert between 128-bit floating point types that have different
8656         modes but the same representation, instead of using gen_lowpart to
8657         makean alias.
8658         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8659         KFmode.
8660         (IFKF_reg): New attributes to give the register constraints for
8661         IFmode and KFmode.
8662         (extend<mode>tf2_internal): New insns to mark an explicit
8663         conversion between 128-bit floating point types that have a
8664         different mode but share the same representation.
8666 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
8668         PR tree-optimization/85814
8669         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8670         a null return from get_strinfo when unsharing the next
8671         strinfo in the chain.
8673 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8675         PR gcc/84923
8676         * varasm.c (weak_finish): Clean up weak_decls.
8678 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8680         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8681         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8682         UNSPEC_UADALP values.
8683         * config/aarch64/iterators.md (ABAL): New int iterator.
8684         (ABDL2): Likewise.
8685         (ADALP): Likewise.
8686         (sur): Add mappings for the above.
8687         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8688         New define_insn.
8689         (aarch64_<sur>abal<mode>_4): Likewise.
8690         (aarch64_<sur>adalp<mode>_3): Likewise.
8691         (<sur>sadv16qi): New define_expand.
8693 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
8695         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8696         (*movdf_internal): Ditto.
8697         (*rcpsf2_sse): Ditto.
8698         (*rsqrtsf2_sse): Ditto.
8699         (*sqrt<mode>2_sse): Ditto.
8701 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
8703         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8704         eor3q<mode>4.
8705         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8706         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8707         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8708         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8709         vbcaxq_s64): New.
8710         * config/aarch64/arm_neon.h: Likewise.
8711         * config/aarch64/iterators.md (VQ_I): New.
8713 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
8715         * config.gcc: Add arc/t-multilib-linux to tmake_file for
8716         arc*-*-linux*.
8717         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8718         MULTILIB_DIRNAMES
8720 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
8722         * config/nds32/constraints.md (S): New constraint.
8723         * config/nds32/nds32.md (call_internal): Use constraint S.
8724         (call_value_internal): Likewise.
8725         (sibcall_internal): Likewise.
8726         (sibcall_value_internal): Likewise.
8728 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
8729             Chung-Ju Wu  <jasonwucj@gmail.com>
8731         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8732         into consideration.
8734 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
8735             Chung-Ju Wu  <jasonwucj@gmail.com>
8737         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8738         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8739         (nds32_rtx_costs_impl): Simplify.
8740         (nds32_address_cost_impl): Simplify.
8741         (nds32_init_rtx_costs): New function.
8742         (nds32_rtx_costs_speed_prefer): Likewise.
8743         (nds32_rtx_costs_size_prefer): Likewise.
8744         (nds32_address_cost_speed_prefer): Likewise.
8745         (nds32_address_cost_speed_fwprop): Likewise.
8746         (nds32_address_cost_size_prefer): Likewise.
8747         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8748         * config/nds32/nds32.c (nds32_option_override): Use
8749         nds32_init_rtx_costs function.
8751 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
8753         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8754         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8755         (TARGET_PIPELINE_N8): Likewise.
8756         (TARGET_PIPELINE_N10): Likewise.
8757         (TARGET_PIPELINE_N13): Likewise.
8758         (TARGET_PIPELINE_GRAYWOLF): Likewise.
8760 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
8762         * config/nds32/nds32-fpu.md: Update copyright year.
8764 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8766         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8768 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8770         * config/nds32/nds32.c
8771         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8772         * config/nds32/nds32.opt (minline-asm-r15): New option.
8774 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8776         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8777         MASK_HW_ABS.
8778         * config/nds32/nds32.md (abssi2): New pattern.
8780 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
8782         * config/i386/i386.md (rex64namesuffix): New mode attribute.
8783         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8784         Merge insn pattern from sse_cvtsi2ss<round_name> and
8785         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8786         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8787         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8788         using SWI48 mode iterator.
8789         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8790         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8791         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8792         pattern from sse_cvttss2si<round_saeonly_name>
8793         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8794         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8795         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8796         using SWI48 mode iterator.
8797         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8798         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8799         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8800         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8801         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8802         using SWI48 mode iterator.
8803         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8804         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8805         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8806         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8807         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8808         SWI48 mode iterator.
8809         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8810         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8811         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8812         pattern from sse_cvttsd2si<round_saeonly_name>
8813         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8815 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8817         * config/nds32/nds32-md-auxiliary.c
8818         (nds32_valid_smw_lwm_base_p): Refine.
8819         (nds32_output_smw_single_word): Refine.
8820         (nds32_output_smw_double_word): New.
8821         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8823 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8825         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8826         (nds32_output_stack_pop): Refine.
8827         (nds32_expand_unaligned_load): Refine.
8828         (nds32_expand_unaligned_store): Refine.
8830 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
8831             Chung-Ju Wu  <jasonwucj@gmail.com>
8833         * config/nds32/constants.md: Add TP_REGNUM constant.
8834         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8835         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8836         UNSPEC_ADD32.
8837         * config/nds32/nds32-doubleword.md: Consider flag_pic.
8838         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8839         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8840         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8841         and PIC code generation.
8842         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8843         code generation.
8844         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8845         optimization.
8846         * config/nds32/nds32.md: Support TLS and PIC.
8847         * config/nds32/nds32.c: Support TLS and PIC.
8848         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8849         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8850         predicate.
8852 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8854         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8855         mode with E_ prefix.
8857 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
8858             Chung-Ju Wu  <jasonwucj@gmail.com>
8860         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8861         * config/nds32/nds32-md-auxiliary.c
8862         (symbolic_reference_mentioned_p): New.
8863         (nds32_legitimize_ict_address): New.
8864         (nds32_expand_ict_move): New.
8865         (nds32_indirect_call_referenced_p): New.
8866         (nds32_symbol_binds_local_p): Delete.
8867         (nds32_long_call_p): Modify.
8868         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8869         * config/nds32/nds32-protos.h
8870         (symbolic_reference_mentioned_p): Declare.
8871         (nds32_legitimize_ict_address): Declare.
8872         (nds32_expand_ict_move): Declare.
8873         (nds32_indirect_call_referenced_p): Declare.
8874         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8875         (nds32_relax_group): Use nds32_ict_const_p as condition.
8876         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8877         (nds32_asm_file_start): Output ict_model directive in asm code.
8878         (nds32_legitimate_address_p): Consider indirect call.
8879         (nds32_print_operand): Consider indirect call.
8880         (nds32_print_operand_address): Consider indirect call.
8881         (nds32_insert_attributes): Handle "indirect_call" attribute.
8882         (TARGET_LEGITIMATE_ADDRESS_P): Define.
8883         (TARGET_LEGITIMATE_CONSTANT_P): Define.
8884         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8885         (TARGET_DELEGITIMIZE_ADDRESS): Define.
8886         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8887         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8888         (TARGET_ICT_MODEL_SMALL): Define.
8889         (TARGET_ICT_MODEL_LARGE): Define.
8890         * config/nds32/nds32.md (movsi): Consider ict model.
8891         (call, call_value): Consider ict model.
8892         (sibcall, sibcall_value): Consider ict model.
8893         * config/nds32/nds32.opt (mict-model): New option.
8894         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8895         model.
8897 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
8898             Monk Chiang  <sh.chiang04@gmail.com>
8899             Jim Wilson <jimw@sifive.com>
8901         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8902         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
8903         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8904         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8905         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
8906         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8907         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8908         compute save_libcall_adjustment properly.
8909         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8910         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8911         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8912         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8913         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8914         (ABI_SPEC): Handle mabi=ilp32e.
8915         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8916         (RVE): Add RVE mask.
8917         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8918         <-march>: Add rv32e as an example.
8920 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
8922         PR c++/82899
8923         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8924         (intra_create_variable_infos): Handle C++ constructors.
8926 2018-05-18  Martin Liska  <mliska@suse.cz>
8928         * passes.def: Remove a redundant pass.
8930 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8932         PR bootstrap/85838
8933         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8935 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8937         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8938         (ARMv4): Update.
8939         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8940         (ARMv6m): Update.
8941         (armv2, armv2a, armv3, armv3m): Delete architectures.
8942         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8943         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8944         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8945         Delete cpus.
8946         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8947         (*mulsidi3adddi): Likewise.
8948         (mulsidi3): Likewise.
8949         (*mulsidi3_nov6): Likewise.
8950         (umulsidi3): Likewise.
8951         (umulsidi3_nov6): Likewise.
8952         (umaddsidi4): Likewise.
8953         (*umulsidi3adddi): Likewise.
8954         (smulsi3_highpart): Likewise.
8955         (*smulsi3_highpart_nov6): Likewise.
8956         (umulsi3_highpart): Likewise.
8957         (*umulsi3_highpart_nov6): Likewise.
8958         * config/arm/arm.h (arm_arch3m): Delete.
8959         * config/arm/arm.c (arm_arch3m): Delete.
8960         (arm_option_override_internal): Update armv3-related comment.
8961         (arm_configure_build_target): Delete use of isa_bit_mode32.
8962         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8963         (arm_rtx_costs_internal): Delete check of arm_arch3m.
8964         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8965         (mulsa3): Likewise.
8966         (mulusa3): Likewise.
8967         * config/arm/arm-protos.h (arm_arch3m): Delete.
8968         * config/arm/arm-tables.opt: Regenerate.
8969         * config/arm/arm-tune.md: Likewise.
8970         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8971         deleted architectures.
8973 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8975         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
8976         (armv5t, armv5te): New features.
8977         (ARMv5, ARMv5e): Delete fgroups.
8978         (ARMv5t, ARMv5te): Adjust for above changes.
8979         (ARMv6m): Likewise.
8980         (armv5, armv5e): Delete arches.
8981         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
8982         arm_arch5.
8983         (*call_reg_arm): Likewise.
8984         (*call_value_reg_armv5): Likewise.
8985         (*call_value_reg_arm): Likewise.
8986         (*call_symbol): Likewise.
8987         (*call_value_symbol): Likewise.
8988         (*sibcall_insn): Likewise.
8989         (*sibcall_value_insn): Likewise.
8990         (clzsi2): Likewise.
8991         (prefetch): Likewise.
8992         (define_split and define_peephole2 dependent on arm_arch5):
8993         Likewise.
8994         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
8995         arm_arch5e.
8996         (TARGET_ARM_QBIT): Likewise.
8997         (TARGET_DSP_MULTIPLY): Likewise.
8998         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
8999         (arm_arch5, arm_arch5e): Delete.
9000         (arm_arch5t, arm_arch5te): Declare.
9001         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9002         (arm_arch5t): Declare.
9003         (arm_option_reconfigure_globals): Update for the above.
9004         (arm_options_perform_arch_sanity_checks): Update comment, replace
9005         use of arm_arch5 with arm_arch5t.
9006         (use_return_insn): Likewise.
9007         (arm_emit_call_insn): Likewise.
9008         (output_return_instruction): Likewise.
9009         (arm_final_prescan_insn): Likewise.
9010         (arm_coproc_builtin_available): Likewise.
9011         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9012         arm_arch5e with arm_arch5t and arm_arch5te.
9013         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9014         (arm_arch5t, arm_arch5te): Declare.
9015         * config/arm/arm-tables.opt: Regenerate.
9016         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9017         * config/arm/t-multilib: Likewise.
9018         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9019         instead of arm_arch5.
9020         (*call_reg_thumb1): Likewise.
9021         (*call_value_reg_thumb1_v5): Likewise.
9022         (*call_value_reg_thumb1): Likewise.
9023         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9024         unreachable path.
9025         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9027 2018-05-18  Martin Liska  <mliska@suse.cz>
9029         PR gcov-profile/84846
9030         * doc/gcov.texi: Document -t option of gcov tool.
9032 2018-05-18  Martin Liska  <mliska@suse.cz>
9034         PR gcov-profile/84846
9035         * gcov.c (print_usage): Add new -t option.
9036         (process_args): Handle the option.
9037         (generate_results): Use stdout as output when requested by
9038         the option.
9040 2018-05-18  Martin Liska  <mliska@suse.cz>
9042         PR gcov-profile/84846
9043         * coverage.c (coverage_init): Write PWD to .gcno file.
9044         * doc/gcov.texi: Document how working directory is printed.
9045         * gcov-dump.c (dump_gcov_file): Print PWD.
9046         * gcov.c (output_intermediate_file): Likewise.
9047         (read_graph_file): Read PWD string.
9048         (output_lines): Print PWD.
9050 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9052         PR middle-end/85817
9053         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
9054         for retval and return false if all args to phi are zero.
9056 2018-05-18  Richard Biener  <rguenther@suse.de>
9058         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
9059         method.
9060         (evrp_dom_walker::before_dom_children): Call it.
9062 2018-05-18  Richard Biener  <rguenther@suse.de>
9064         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
9065         results when processing array refs with variable index.
9067 2018-05-18  Toon Moene  <toon@moene.org>
9069         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
9070         directly after that of -floop-interchange. Indicate that both
9071         options are enabled by default when specifying -O3.
9073 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9075         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
9076         iterator.  Delete separate integer-mode vec_set<mode> expander.
9077         (aarch64_simd_vec_setv2di): Delete.
9078         (vec_setv2di): Delete.
9079         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9080         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
9081         the "w, r" alternative.
9083 2018-05-18  Martin Liska  <mliska@suse.cz>
9085         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
9086         * tree-pass.h (make_pass_lower_switch_O0): New function.
9087         * tree-switch-conversion.c (node_has_low_bound): Remove.
9088         (node_has_high_bound): Likewise.
9089         (node_is_bounded): Likewise.
9090         (class pass_lower_switch): Make it a template type and create
9091         two instances.
9092         (pass_lower_switch::execute): Add template argument.
9093         (make_pass_lower_switch): New function.
9094         (make_pass_lower_switch_O0): New function.
9095         (do_jump_if_equal): Remove.
9096         (emit_case_nodes): Simplify to just handle all 3 cases and leave
9097         all the hard work to tree optimization passes.
9099 2018-05-18  Martin Liska  <mliska@suse.cz>
9101         * dbgcnt.c (limit_low): Renamed from limit.
9102         (limit_high): New variable.
9103         (dbg_cnt_is_enabled): Check for upper limit.
9104         (dbg_cnt): Adjust dumping.
9105         (dbg_cnt_set_limit_by_index): Add new argument for high
9106         value.
9107         (dbg_cnt_set_limit_by_name): Likewise.
9108         (dbg_cnt_process_single_pair): Parse new format.
9109         (dbg_cnt_process_opt): Use strtok.
9110         (dbg_cnt_list_all_counters): Remove 'value' and add
9111         'limit_high'.
9112         * doc/invoke.texi: Document changes.
9114 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
9116         * doc/sourcebuild.texi (scalar_all_fma): Document.
9117         * tree.def (FMA_EXPR): Delete.
9118         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
9119         * internal-fn.c (ternary_direct): New macro.
9120         (expand_ternary_optab_fn): Likewise.
9121         (direct_ternary_optab_supported_p): Likewise.
9122         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
9123         * builtins.c (fold_builtin_fma): Delete.
9124         (fold_builtin_3): Don't call it.
9125         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
9126         * expr.c (expand_expr_real_2): Likewise.
9127         * fold-const.c (operand_equal_p): Likewise.
9128         (fold_ternary_loc): Likewise.
9129         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
9130         * gimple.c (DEFTREECODE): Likewise.
9131         * gimplify.c (gimplify_expr): Likewise.
9132         * optabs-tree.c (optab_for_tree_code): Likewise.
9133         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
9134         * tree-eh.c (operation_could_trap_p): Likewise.
9135         (stmt_could_throw_1_p): Likewise.
9136         * tree-inline.c (estimate_operator_cost): Likewise.
9137         * tree-pretty-print.c (dump_generic_node): Likewise.
9138         (op_code_prio): Likewise.
9139         * tree-ssa-loop-im.c (stmt_cost): Likewise.
9140         * tree-ssa-operands.c (get_expr_operands): Likewise.
9141         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
9142         * fold-const-call.h (fold_fma): Delete.
9143         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
9144         CFN_FNMA and CFN_FNMS.
9145         (fold_fma): Delete.
9146         * genmatch.c (combined_fn): New enum.
9147         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
9148         (commutative_op): New function.
9149         (commutate): Use it.  Handle more than 2 operands.
9150         (dt_operand::gen_gimple_expr): Use commutative_op.
9151         (parser::parse_expr): Allow :c to be used with non-binary
9152         operators if the commutative operand is known.
9153         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
9154         CFN_FMS, CFN_FNMA and CFN_FNMS.
9155         (backprop::process_assign_use): Remove FMA_EXPR handling.
9156         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
9157         (gen_hsa_fma): New function.
9158         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
9159         IFN_FNMA and IFN_FNMS.
9160         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
9161         * gimple-fold.h (follow_all_ssa_edges): Declare.
9162         * gimple-fold.c (follow_all_ssa_edges): New function.
9163         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
9164         gimple_build interface and use follow_all_ssa_edges to fold the result.
9165         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
9166         instead of checking for optabs directly.
9167         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
9168         rather than FMA_EXPRs.
9169         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
9170         call to IFN_FMA instead of an FMA_EXPR.
9172 2018-05-17  Jim Wilson  <jimw@sifive.com>
9174         * expr.c (do_tablejump): When converting index to Pmode, if we have a
9175         sign extended promoted subreg, and the range does not have the sign bit
9176         set, then do a sign extend.
9178         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
9179         test, check for sign extended subreg and/or constant operands, and
9180         do a sign extend in that case.
9182 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
9184         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
9185         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
9186         Add untyped.
9187         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
9188         Change logics_shift_reg to logics_shift_imm.
9189         (thunderx2t99_fp_loadpair_basic): Delete.
9190         (thunderx2t99_fp_storepair_basic): Delete.
9191         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
9192         (thunderx2t99_asimd_polynomial): Delete.
9193         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
9194         and neon_fp_mul_d_scalar_q.
9195         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
9196         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
9197         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
9198         (thunderx2t99_asimd_lut): Add missing tbl types.
9199         (thunderx2t99_asimd_ext): Delete.
9200         (thunderx2t99_asimd_load1_1_mult): Delete.
9201         (thunderx2t99_asimd_load1_2_mult): Delete.
9202         (thunderx2t99_asimd_load1_ldp): New.
9203         (thunderx2t99_asimd_load1): New.
9204         (thunderx2t99_asimd_load2): Add missing *load2* types.
9205         (thunderx2t99_asimd_load3): New.
9206         (thunderx2t99_asimd_load4): New.
9207         (thunderx2t99_asimd_store1_1_mult): Delete.
9208         (thunderx2t99_asimd_store1_2_mult): Delete.
9209         (thunderx2t99_asimd_store2_mult): Delete.
9210         (thunderx2t99_asimd_store2_onelane): Delete.
9211         (thunderx2t99_asimd_store_stp): New.
9212         (thunderx2t99_asimd_store1): New.
9213         (thunderx2t99_asimd_store2): New.
9214         (thunderx2t99_asimd_store3): New.
9215         (thunderx2t99_asimd_store4): New.
9217 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
9219         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
9220         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
9222 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
9223             Segher Boessenkool  <segher@kernel.crashing.org>
9225         PR target/85698
9226         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
9227         operand.
9229 2018-05-17  Richard Biener  <rguenther@suse.de>
9231         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
9232         for pruning loop and prune defs feeding only already visited PHIs.
9234 2018-05-17  Richard Biener  <rguenther@suse.de>
9236         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
9238 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
9239             Richard Biener  <rguenther@suse.de>
9241         PR tree-optimization/85793
9242         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
9243         for VMAT_ELEMENTWISE.
9245 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
9247         * internal-fn.h (lookup_internal_fn): Declare
9248         * internal-fn.c (lookup_internal_fn): New function.
9249         * gimple.c (gimple_build_call_from_tree): Handle calls to
9250         internal functions.
9251         * gimple-pretty-print.c (dump_gimple_call): Print "." before
9252         internal function names.
9253         * tree-pretty-print.c (dump_generic_node): Likewise.
9254         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
9256 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
9258         * gimple-fold.h (gimple_build): Make the function forms take
9259         combined_fn rather than built_in_function.
9260         (gimple_simplify): Likewise.
9261         * gimple-match-head.c (gimple_simplify): Likewise.
9262         * gimple-fold.c (gimple_build): Likewise.
9263         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
9264         rather than gimple_build_call_internal.
9265         (get_initial_defs_for_reduction): Likewise.
9266         (vect_create_epilog_for_reduction): Likewise.
9267         (vectorizable_live_operation): Likewise.
9269 2018-05-17  Martin Liska  <mliska@suse.cz>
9271         * gimple-ssa-sprintf.c (format_directive): Do not use
9272         space in between 'G_' and '('.
9274 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
9276         PR target/85323
9277         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
9278         even if the mask is not all ones.
9280         PR target/85323
9281         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
9282         vector.
9283         (ix86_gimple_fold_builtin): Likewise.
9285         PR target/85323
9286         * config/i386/i386.c: Include tree-vector-builder.h.
9287         (ix86_vector_shift_count): New function.
9288         (ix86_fold_builtin): Fold shift builtins by scalar count.
9289         (ix86_gimple_fold_builtin): Likewise.
9291         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
9292         _mm512_setzero): New intrinsics.
9294 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
9295             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9297         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
9298         code generation for cases where splatting a value is not useful.
9299         * simplify-rtx.c (simplify_ternary_operation): Simplify
9300         vec_merge across a vec_duplicate and a paradoxical subreg forming
9301         a vector mode to a vec_concat.
9303 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
9305         * config.gcc: Support "goldmont-plus".
9306         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9307         "goldmont-plus".
9308         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9309         PROCESSOR_GOLDMONT_PLUS.
9310         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
9311         (processor_target_table): Add "goldmont-plus".
9312         (PTA_GOLDMONT_PLUS): Define.
9313         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
9314         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
9315         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
9316         (fold_builtin_cpu): Add "goldmont-plus".
9317         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
9318         (ix86_option_override_internal): Add "goldmont-plus".
9319         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
9320         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
9321         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
9322         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
9324 2018-05-17  Richard Biener  <rguenther@suse.de>
9326         PR tree-optimization/85757
9327         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
9328         remove defs that only feed that PHI from further processing.
9330 2018-05-16  Jim Wilson  <jimw@sifive.com>
9332         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
9333         asterisk to name.
9334         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
9336 2018-05-16  Mark Wielaard  <mark@klomp.org>
9338         * dwarf2out.c (count_index_strings): New function.
9339         (output_indirect_strings): Call count_index_strings and generate
9340         header for dwarf_version >= 5.
9342 2018-05-16  Mark Wielaard  <mark@klomp.org>
9344         * dwarf2out.c (dwarf_FORM): New function.
9345         (set_indirect_string): Use dwarf_FORM.
9346         (reset_indirect_string): Likewise.
9347         (size_of_die): Likewise.
9348         (value_format): Likewise.
9349         (output_die): Likewise.
9350         (add_skeleton_AT_string): Likewise.
9351         (output_macinfo_op): Likewise.
9352         (index_string): Likewise.
9353         (output_index_string_offset): Likewise.
9354         (output_index_string): Likewise.
9355         (count_index_strings): Likewise.
9357 2018-05-16  Carl Love  <cel@us.ibm.com>
9359         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9360         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
9362 2018-05-16  Martin Jambor  <mjambor@suse.cz>
9364         * ipa-prop.c (ipa_free_all_edge_args): Remove.
9365         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
9367 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
9369         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
9370         (fnma<mode>4): Likewise.
9371         (fms<mode>4): Likewise.
9372         (fnms<mode>4): Likewise.
9373         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
9374         (aarch64_fnma<mode>4): Likewise.
9375         (aarch64_fms<mode>4): Likewise.
9376         (aarch64_fnms<mode>4): Likewise.
9377         (aarch64_fnmadd<mode>4): Likewise.
9379 2018-05-16  Jason Merrill  <jason@redhat.com>
9381         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
9383 2018-05-16  Richard Biener  <rguenther@suse.de>
9385         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9386         (dump_stmt_cost): Declare.
9387         (add_stmt_cost): Dump cost we add.
9388         (add_stmt_costs): New function.
9389         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9390         No longer exported.
9391         (vect_analyze_stmt): Adjust prototype.
9392         (vectorizable_condition): Likewise.
9393         (vectorizable_live_operation): Likewise.
9394         (vectorizable_reduction): Likewise.
9395         (vectorizable_induction): Likewise.
9396         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9397         cost vector to pass to vectorizable_ and record afterwards.
9398         (vect_model_reduction_cost): Take cost vector argument and adjust.
9399         (vect_model_induction_cost): Likewise.
9400         (vectorizable_reduction): Likewise.
9401         (vectorizable_induction): Likewise.
9402         (vectorizable_live_operation): Likewise.
9403         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9404         SLP_TREE_NUMBER_OF_VEC_STMTS.
9405         (vect_analyze_slp_cost_1): Remove.
9406         (vect_analyze_slp_cost): Likewise.
9407         (vect_slp_analyze_node_operations): Take visited args and
9408         a target cost vector.  Avoid processing already visited stmt sets.
9409         (vect_slp_analyze_operations): Use a local cost vector to gather
9410         costs and register those of non-discarded instances.
9411         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9412         (vect_schedule_slp_instance): Remove copying of
9413         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
9414         zero.
9415         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9416         adding cost.  Record cost entry location.
9417         (vect_prologue_cost_for_slp_op): Function to compute cost of
9418         a constant or invariant generated for SLP vect in the prologue,
9419         split out from vect_analyze_slp_cost_1.
9420         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
9421         (vect_model_promotion_demotion_cost): Likewise.
9422         (vect_model_store_cost): Likewise, make static.
9423         (vect_model_load_cost): Likewise.
9424         (vectorizable_bswap): Add cost vector arg and adjust.
9425         (vectorizable_call): Likewise.
9426         (vectorizable_simd_clone_call): Likewise.
9427         (vectorizable_conversion): Likewise.
9428         (vectorizable_assignment): Likewise.
9429         (vectorizable_shift): Likewise.
9430         (vectorizable_operation): Likewise.
9431         (vectorizable_store): Likewise.
9432         (vectorizable_load): Likewise.
9433         (vectorizable_condition): Likewise.
9434         (vectorizable_comparison): Likewise.
9435         (can_vectorize_live_stmts): Likewise.
9436         (vect_analyze_stmt): Likewise.
9437         (vect_transform_stmt): Adjust calls to vectorizable_*.
9438         * tree-vectorizer.c: Include gimple-pretty-print.h.
9439         (dump_stmt_cost): New function.
9441 2018-05-16  Richard Biener  <rguenther@suse.de>
9443         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
9444         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
9445         * tree-ssa-dse.c: Include tree-ssa-loop.h.
9446         (check_name): New callback.
9447         (dse_classify_store): Track cycles via a visited bitmap of PHI
9448         defs and simplify handling of in-loop and across loop dead stores
9449         and properly fail for loop-variant refs.  Handle byte-tracking with
9450         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
9451         limiting the walk.
9453 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
9455         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
9456         (vect_get_mask_type_for_stmt): Likewise.
9457         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
9458         split out from...
9459         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
9460         to determine the statement's vector type and the vector type that
9461         should be used for calculating nunits.  Deal with cases in which
9462         the type has to be deferred.
9463         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
9464         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
9465         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
9466         (vect_determine_vf_for_stmt): New functions, split out from...
9467         (vect_determine_vectorization_factor): ...here.
9468         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
9469         (vect_get_mask_type_for_stmt): New functions, split out from
9470         vect_determine_vectorization_factor.
9472 2018-05-16  Richard Biener  <rguenther@suse.de>
9474         * tree-cfg.c (verify_gimple_assign_ternary): Properly
9475         verify the [VEC_]COND_EXPR embedded comparison.
9477 2018-05-15  Martin Sebor  <msebor@redhat.com>
9479         PR tree-optimization/85753
9480         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
9481         RECORD_TYPE in addition to ARRAY_TYPE.
9483 2018-05-15  Martin Sebor  <msebor@redhat.com>
9485         PR middle-end/85643
9486         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
9488 2018-05-15  Richard Biener  <rguenther@suse.de>
9490         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
9491         add by_clobber_p one.  Change algorithm to collect all defs
9492         representing uses we need to walk and try reducing them to
9493         a single one before failing.
9494         (dse_dom_walker::dse_optimize_stmt): Adjust.
9496 2018-05-13  Mark Wielaard  <mark@klomp.org>
9498         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
9499         (size_of_loc_descr): Likewise.
9500         (output_loc_operands): Likewise.
9501         (output_loc_operands_raw): Likewise.
9502         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
9503         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
9504         (hash_loc_operands): Likewise.
9505         (compare_loc_operands): Likewise.
9507 2018-05-14  Mark Wielaard  <mark@klomp.org>
9509         * dwarf2out.c (count_index_addrs): New function.
9510         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
9512 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9514         PR tree-optimization/83648
9515         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
9516         return value as malloc candidate.
9518 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9520         PR ipa/85734
9521         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
9522         param as true in call to suggest_attribute.
9524 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
9526         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
9527         -mreadonly-in-sdata.
9529 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9531         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
9532         New pattern.
9533         (aarch64_crypto_aesd_fused): Likewise.
9535 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
9537         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
9538         (movsi_aarch64): Likewise.
9539         (load_pairsi): Likewise.
9540         (load_pairdi): Likewise.
9541         (store_pairsi): Likewise.
9542         (store_pairdi): Likewise.
9543         (load_pairsf): Likewise.
9544         (load_pairdf): Likewise.
9545         (store_pairsf): Likewise.
9546         (store_pairdf): Likewise.
9547         (zero_extend): Likewise.
9548         (trunc): Swap alternatives.
9549         (fcvt_target): Add '?' to prefer w over r.
9551 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
9553         PR target/85756
9554         * config/i386/i386.md: Disallow non-commutative arithmetics in
9555         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9556         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
9557         in the peephole2 before it.
9559 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
9561         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9562         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9563         (ix86_handle_option): Handle -mcldemote.
9564         * config.gcc: New header.
9565         * config/i386/cldemoteintrin.h: New file.
9566         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9567         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9568         -mcldemote.
9569         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9570         OPTION_MASK_ISA_CLDEMOTE.
9571         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
9572         (ix86_valid_target_attribute_inner_p): Ditto.
9573         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
9574         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
9575         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
9576         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
9577         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
9578         (cldemote): New.
9579         * config/i386/i386.opt: Add -mcldemote.
9580         * config/i386/x86intrin.h: New header.
9581         * doc/invoke.texi: Add -mcldemote.
9583 2018-05-14  Richard Biener  <rguenther@suse.de>
9585         * doc/match-and-simplify.texi: Adjust :s documentation.
9587 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
9589         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
9590         intended memcpy size.
9591         (REORDER_45): Likewise.
9593 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
9595         * sort.cc: New file.
9596         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
9597         * vec.c (qsort_chk): Use gcc_qsort.
9598         * Makefile.in (OBJS-libcommon): Add sort.o.
9599         (build/sort.o): New target.  Use it...
9600         (BUILD_RTL): ... here, and...
9601         (build/gencfn-macros): ... here, and...
9602         (build/genmatch): ... here.
9604 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
9605             Chung-Ju Wu  <jasonwucj@gmail.com>
9607         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
9608         * config/nds32/nds32-graywolf.md: New file.
9609         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
9610         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
9611         pipeline.
9612         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
9613         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
9614         * config/nds32/nds32.md (pipeline_model): Add graywolf.
9615         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
9616         * config/nds32/pipelines.md: Include n15 settings.
9618 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
9619             Chung-Ju Wu  <jasonwucj@gmail.com>
9621         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
9622         * config/nds32/nds32-n13.md: New file.
9623         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
9624         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
9625         pipeline.
9626         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
9627         * config/nds32/nds32.md (pipeline_model): Add n13.
9628         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9629         * config/nds32/pipelines.md: Include n13 settings.
9631 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
9632             Chung-Ju Wu  <jasonwucj@gmail.com>
9634         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9635         * config/nds32/nds32-n10.md: New file.
9636         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9637         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9638         pipeline.
9639         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9640         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9641         * config/nds32/nds32.md (pipeline_model): Add n10.
9642         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9643         * config/nds32/pipelines.md: Include n10 settings.
9645 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
9646             Kito Cheng  <kito.cheng@gmail.com>
9647             Chung-Ju Wu  <jasonwucj@gmail.com>
9649         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9650         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9651         Add enum values for DSP extension instructions.
9652         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9653         New constraints.
9654         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9655         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9656         New code iterators.
9657         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9658         * config/nds32/nds32-dspext.md: New file for DSP implementation.
9659         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9660         * config/nds32/nds32-intrinsic.md: Likewise.
9661         * config/nds32/nds32_intrinsic.h: Likewise.
9662         * config/nds32/nds32-md-auxiliary.c: Likewise.
9663         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9664         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9665         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9666         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9667         * config/nds32/nds32-protos.h: New declarations for DSP extension.
9668         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9669         TYPE_DMAC in switch statement.
9670         * config/nds32/nds32.c: New checking and implementation for DSP
9671         extension instructions.
9672         * config/nds32/nds32.h: Likewise.
9673         * config/nds32/nds32.md: Likewise.
9674         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9675         * config/nds32/predicates.md: Implement new predicates for DSP
9676         extension.
9678 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
9680         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9681         Reformat alternatives and attributes so it is easier to identify
9682         which constraints/attributes go with which instruction.
9683         (mov<mode>_hardfloat32, FMOVE64): Likewise.
9684         (mov<mode>_softfloat32, FMOVE64): Likewise.
9685         (mov<mode>_hardfloat64, FMOVE64): Likewise.
9686         (mov<mode>_softfloat64, FMOVE64): Likewise.
9688 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9690         * doc/extend.texi (PowerPC Built-in Functions): Rename this
9691         subsection.
9692         (Basic PowerPC Built-in Functions): The new name of the
9693         subsection previously known as "PowerPC Built-in Functions".
9694         (Basic PowerPC Built-in Functions Available on all Configurations):
9695         New subsubsection.
9696         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9697         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9698         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9699         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9701 2018-05-11  Martin Jambor  <mjambor@suse.cz>
9703         PR ipa/85655
9704         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9705         single const.
9707 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
9709         PR target/85733
9710         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9712 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
9714         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9715         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9716         (ix86_handle_option): Handle -mwaitpkg.
9717         * config.gcc: New header.
9718         * config/i386/cpuid.h (bit_WAITPKG): New bit.
9719         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9720         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9721         function type.
9722         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9723         OPTION_MASK_ISA_WAITPKG.
9724         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9725         (ix86_option_override_internal): Add PTA_WAITPKG.
9726         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9727         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9728         IX86_BUILTIN_TPAUSE.
9729         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9730         __builtin_ia32_umwait and __builtin_ia32_tpause.
9731         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9732         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9733         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9734         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9735         UNSPECV_TPAUSE): New.
9736         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9737         * config/i386/i386.opt: Add -mwaitpkg.
9738         * config/i386/waitpkgintrin.h: New file.
9739         * config/i386/x86intrin.h: New header.
9740         * doc/invoke.texi: Add -mwaitpkg.
9742 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
9744         PR target/85606
9745         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9746         equivalent.
9747         (cortex-m0): Use armv6s-m isa.
9748         (cortex-m0plus): Likewise.
9749         (cortex-m1): Likewise.
9750         (cortex-m0.small-multiply): Likewise.
9751         (cortex-m0plus.small-multiply): Likewise.
9752         (cortex-m1.small-multiply): Likewise.
9754 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
9755             Jakub Jelinek  <jakub@redhat.com>
9757         PR tree-optimization/85692
9758         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9759         source permute as well.
9761 2018-05-11  Martin Liska  <mliska@suse.cz>
9763         PR sanitizer/85556
9764         * doc/extend.texi: Document LLVM style format for no_sanitize
9765         attribute.
9767 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
9769         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9770         mode_supports_vsx_dform_quad to mode_supports_dq_form.
9771         (mode_supports_vsx_dform_quad): Likewise.
9772         (mode_supports_vmx_dform): Move these functions to be next to the
9773         other mode_supports functions.
9774         (mode_supports_dq_form): Likewise.
9775         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9776         mode_supports_dq_form.
9777         (reg_offset_addressing_ok_p): Likewise.
9778         (offsettable_ok_by_alignment): Likewise.
9779         (rs6000_legitimate_offset_address_p): Likewise.
9780         (legitimate_lo_sum_address_p): Likewise.
9781         (rs6000_legitimize_address): Likewise.
9782         (rs6000_legitimize_reload_address): Likewise.
9783         (rs6000_secondary_reload_inner): Likewise.
9784         (rs6000_preferred_reload_class): Likewise.
9785         (rs6000_output_move_128bit): Likewise.
9787 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
9789         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9790         Generate SImode target register for null target.
9791         <case IX86_BUILTIN_XGETBV>: Ditto.
9792         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9793         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9795 2018-05-10  Carl Love  <cel@us.ibm.com>
9797         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9798         dcbtt and dcbtstt if operands[2] is 0.
9800 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
9802         PR target/85693
9803         * config/i386/sse.md (usadv64qi): New expander.
9805 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
9807         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9808         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9809         -maltivec=be support.
9810         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9811         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9812         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9813         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9814         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9815         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9816         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9817         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9818         altivec_vsumsws): Adjust.
9819         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9820         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9821         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9822         support.
9823         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9824         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9825         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9826         (altivec_lve<VI_char>x): Delete expand.
9827         (*altivec_lve<VI_char>x_internal): Rename to...
9828         (altivec_lve<VI_char>x): ... this.
9829         (altivec_lvxl_<mode>): Delete expand.
9830         (*altivec_lvxl_<mode>_internal): Rename to ...
9831         (altivec_lvxl_<mode>): ... this.
9832         (altivec_stvxl_<mode>): Delete expand.
9833         (*altivec_stvxl_<mode>_internal): Rename to ...
9834         (altivec_stvxl_<mode>): ... this.
9835         (altivec_stve<VI_char>x): Delete expand.
9836         (*altivec_stve<VI_char>x_internal): Rename to ...
9837         (altivec_stve<VI_char>x): ... this.
9838         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9839         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9840         reduc_plus_scal_<mode>): Adjust.
9841         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9842         comment.
9843         (rs6000_cpu_cpp_builtins): Adjust.
9844         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9845         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9846         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9847         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9848         -maltivec=be support.
9849         (rs6000_split_vec_extract_var): Adjust.
9850         (rs6000_split_v4si_init): Adjust.
9851         (swap_selector_for_mode): Delete.
9852         (altivec_expand_lvx_be, altivec_expand_stvx_be,
9853         altivec_expand_stvex_be): Delete.
9854         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9855         -maltivec=be support.
9856         (rs6000_gimple_fold_builtin): Ditto.
9857         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9858         Adjust.
9859         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9860         (TARGET_DIRECT_MOVE_64BIT): Adjust.
9861         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9862         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9863         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9864         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9865         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9866         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9867         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9868         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9869         anonymous split): Adjust.
9870         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9871         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9873 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
9875         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9876         when --with-gxx-include-dir is also specified.
9877         * configure: Regenerate.
9879 2018-05-09  Jim Wilson  <jimw@sifive.com>
9881         PR target/84797
9882         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9883         * config/riscv/t-withmultilib: New.
9884         * config/riscv/withmultilib.h: New.
9885         * doc/install.texi: Document RISC-V --with-multilib-list support.
9887 2018-05-09  Richard Biener  <rguenther@suse.de>
9889         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9890         vector.
9891         (vect_bb_vectorization_profitable_p): Adjust.  Compute
9892         actual scalar cost using the cost vector and the add_stmt_cost
9893         machinery.
9895 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9897         PR rtl-optimization/85645
9898         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9899         in the REG_CFA_REGISTER note for LR, don't leave it empty.
9901 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9903         PR rtl-optimization/85645
9904         * shrink-wrap.c (spread_components): Return a boolean saying if
9905         anything was changed.
9906         (try_shrink_wrapping_separate): Iterate spread_components until
9907         nothing changes anymore.
9909 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9911         PR rtl-optimization/85645
9912         * regrename.c (build_def_use): Also kill the chains that include the
9913         destination of a REG_CFA_REGISTER note.
9915 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9917         PR rtl-optimization/85645
9918         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9919         insn that has a REG_CFA_REGISTER note.
9921 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
9923         * cfgexpand.c (expand_clobber): New function.
9924         (expand_gimple_stmt_1): Use it.
9925         * tree-vect-stmts.c (vect_clobber_variable): New function,
9926         split out from...
9927         (vectorizable_simd_clone_call): ...here.
9928         (vectorizable_store): Emit a clobber either side of an
9929         IFN_STORE_LANES sequence.
9930         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9932 2018-05-09  Tom de Vries  <tom@codesourcery.com>
9934         PR target/85626
9935         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9936         (define_insn "trap_if_false"): Add exit after trap.
9938 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
9940         PR rtl-optimization/85638
9941         * bb-reorder.c: Include common/common-target.h.
9942         (create_forwarder_block): New function extracted from...
9943         (fix_up_crossing_landing_pad): ...here.  Rename into...
9944         (dw2_fix_up_crossing_landing_pad): ...this.
9945         (sjlj_fix_up_crossing_landing_pad): New function.
9946         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9947         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9948         from both partitions and exit the loop after one iteration.
9950 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9952         Revert:
9953         * doc/extend.texi (PowerPC Built-in Functions): Rename this
9954         subsection.
9955         (Basic PowerPC Built-in Functions): The new name of the
9956         subsection previously known as "PowerPC Built-in Functions".
9957         (Basic PowerPC Built-in Functions Available on all Configurations):
9958         New subsubsection.
9959         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9960         subsubsection.
9961         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9962         subsubsection.
9963         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9964         subsubsection.
9965         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9966         subsubsection.
9968 2018-05-08  Jim Wilson  <jimw@sifive.com>
9970         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9971         (LD_EMUL_SUFFIX): New.
9972         (LINK_SPEC): Use it.
9974 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9976         * doc/extend.texi (PowerPC Built-in Functions): Rename this
9977         subsection.
9978         (Basic PowerPC Built-in Functions): The new name of the
9979         subsection previously known as "PowerPC Built-in Functions".
9980         (Basic PowerPC Built-in Functions Available on all Configurations):
9981         New subsubsection.
9982         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9983         subsubsection.
9984         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9985         subsubsection.
9986         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9987         subsubsection.
9988         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9989         subsubsection.
9991 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
9993         PR target/85683
9994         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
9995         after cmpelim optimization.
9997 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
9999         * config.gcc: Support "goldmont".
10000         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10001         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10002         PROCESSOR_GOLDMONT.
10003         * config/i386/i386.c (m_GOLDMONT): Define.
10004         (processor_target_table): Add "goldmont".
10005         (PTA_GOLDMONT): Define.
10006         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10007         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10008         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10009         (fold_builtin_cpu): Add "goldmont".
10010         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10011         (ix86_option_override_internal): Add "goldmont".
10012         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10013         (processor_type): Add PROCESSOR_GOLDMONT.
10014         * config/i386/i386.md: Add CPU "glm".
10015         * config/i386/glm.md: New file.
10016         * config/i386/x86-tune.def: Add m_GOLDMONT.
10017         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10019 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
10021         PR target/85572
10022         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10023         E_V4DImode.
10024         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10025         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
10026         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
10028         PR target/85317
10029         * config/i386/i386.c (ix86_fold_builtin): Handle
10030         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10032         PR target/85480
10033         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10034         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10036 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
10038         PR target/85658
10039         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10040         (check_arch): Likewise.
10041         (check_fpu): Return the result rather than printing it.
10042         (end arch): Fix operator precedence.
10043         (end cpu): Likewise.
10044         (END): Print the result from check_fpu.
10046 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
10047             Alan Hayward  <alan.hayward@arm.com>
10048             David Sherwood  <david.sherwood@arm.com>
10050         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
10051         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
10052         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
10053         (*fcmuo<mode>_and): New patterns.
10055 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
10057         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
10058         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
10059         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
10060         (cmp_op, sve_imm_con): New code attributes.
10061         (SVE_COND_INT_CMP, imm_con): Delete.
10062         (cmp_op): Remove above unspecs from int attribute.
10063         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
10064         to...
10065         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
10066         comparison-specific unspecs.
10067         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
10068         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
10069         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
10070         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
10071         (*vec_fcm<cmp_op><mode>): Rename to...
10072         (*fcm<cmp_op><mode>): ...this and adjust likewise.
10073         (*vec_fcmuo<mode>): Rename to...
10074         (*fcmuo<mode>): ...this and adjust likewise.
10075         (*pred_fcm<cmp_op><mode>): New pattern.
10076         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
10077         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10078         functions.
10079         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10080         and UNORDERED.
10081         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
10082         (aarch64_emit_sve_predicated_cond): New function.
10083         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
10084         (aarch64_emit_unspec_cond_or): Replace with...
10085         (aarch64_emit_sve_or_conds): ...this new function.  Use
10086         aarch64_emit_sve_ptrue_op for the individual comparisons and
10087         aarch64_emit_binop to OR them together.
10088         (aarch64_emit_inverted_unspec_cond): Replace with...
10089         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
10090         aarch64_emit_sve_ptrue_op for the comparison and
10091         aarch64_emit_unop to invert the result.
10092         (aarch64_expand_sve_vec_cmp_float): Update after the above
10093         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
10095 2018-05-07  Nathan Sidwell  <nathan@acm.org>
10097         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
10098         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
10099         (Backwards Compatibility): Likewise.
10101 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10103         PR bootstrap/85681
10104         Revert:
10105         2018-05-07  Luis Machado  <luis.machado@linaro.org>
10107         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10108         <prefetch_dynamic_strides>: New const bool field.
10109         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10110         prefetch_dynamic_strides.
10111         (exynosm1_prefetch_tune): Likewise.
10112         (thunderxt88_prefetch_tune): Likewise.
10113         (thunderx_prefetch_tune): Likewise.
10114         (thunderx2t99_prefetch_tune): Likewise.
10115         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10116         to false.
10117         (aarch64_override_options_internal): Update to set
10118         PARAM_PREFETCH_DYNAMIC_STRIDES.
10119         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10120         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10121         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10122         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10123         prefetch-dynamic-strides setting.
10125         2018-05-07  Luis Machado  <luis.machado@linaro.org>
10127         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10128         <minimum_stride>: New const int field.
10129         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10130         minimum_stride field.
10131         (exynosm1_prefetch_tune): Likewise.
10132         (thunderxt88_prefetch_tune): Likewise.
10133         (thunderx_prefetch_tune): Likewise.
10134         (thunderx2t99_prefetch_tune): Likewise.
10135         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10136         (aarch64_override_options_internal): Update to set
10137         PARAM_PREFETCH_MINIMUM_STRIDE.
10138         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10139         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10140         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10141         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10142         stride is constant and is below the minimum stride threshold.
10144 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10146         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
10147         to 512.
10149 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10151         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10152         <prefetch_dynamic_strides>: New const bool field.
10153         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10154         prefetch_dynamic_strides.
10155         (exynosm1_prefetch_tune): Likewise.
10156         (thunderxt88_prefetch_tune): Likewise.
10157         (thunderx_prefetch_tune): Likewise.
10158         (thunderx2t99_prefetch_tune): Likewise.
10159         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10160         to false.
10161         (aarch64_override_options_internal): Update to set
10162         PARAM_PREFETCH_DYNAMIC_STRIDES.
10163         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10164         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10165         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10166         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10167         prefetch-dynamic-strides setting.
10169 2018-05-07  Luis Machado  <luis.machado@linaro.org>
10171         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10172         <minimum_stride>: New const int field.
10173         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10174         minimum_stride field.
10175         (exynosm1_prefetch_tune): Likewise.
10176         (thunderxt88_prefetch_tune): Likewise.
10177         (thunderx_prefetch_tune): Likewise.
10178         (thunderx2t99_prefetch_tune): Likewise.
10179         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10180         (aarch64_override_options_internal): Update to set
10181         PARAM_PREFETCH_MINIMUM_STRIDE.
10182         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10183         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10184         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10185         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10186         stride is constant and is below the minimum stride threshold.
10188 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
10190         PR c++/85659
10191         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
10192         the type is addressable.  Don't force op into register if it has
10193         BLKmode.
10195 2018-05-05  Roland McGrath  <mcgrathr@google.com>
10197         PR other/77609
10198         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
10199         any section for which we don't know a specific type it should have,
10200         regardless of name.  Previously this was done only for the exact
10201         names ".init_array", ".fini_array", and ".preinit_array".
10202         (default_elf_asm_named_section): Add comment about
10203         relationship with default_section_type_flags and SECTION_NOTYPE.
10204         (get_section): Don't consider it a type conflict if one side has
10205         SECTION_NOTYPE and the other doesn't, as long as neither has the
10206         SECTION_BSS et al used in the default_section_type_flags logic.
10208 2018-05-05  Tom de Vries  <tom@codesourcery.com>
10210         PR target/85653
10211         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
10212         (workaround_barsyncs): New function.
10213         (nvptx_reorg): Use workaround_barsyncs.
10214         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10215         (define_expand "nvptx_membar_cta"): New define_expand.
10216         (define_insn "*nvptx_membar_cta"): New insn.
10218 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
10220         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
10221         To improve optimization opportunities.
10222         * builtin-types.def: The new needed builtin types for the above.
10224 2018-05-04  Richard Biener  <rguenther@suse.de>
10226         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
10227         * gimple-ssa-store-merging.c
10228         (imm_store_chain_info::output_merged_store): Remove redundant create,
10229         release split_store vector contents on failure.
10230         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
10231         scalar stmt vector on cache hit.
10233 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
10235         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
10236         Xilinx FP support.
10237         * config.gcc (powerpc-xilinx-eabi*): Remove.
10238         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
10239         support.
10240         (fusion_addis_mem_combo_load): Ditto.
10241         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
10242         FP support.
10243         (rs6000_cpu_cpp_builtins): Ditto.
10244         * config/rs6000/rs6000-linux.c
10245         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
10246         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
10247         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
10248         support.
10249         (rs6000_setup_reg_addr_masks): Ditto.
10250         (rs6000_init_hard_regno_mode_ok): Ditto.
10251         (rs6000_option_override_internal): Ditto.
10252         (legitimate_lo_sum_address_p): Ditto.
10253         (rs6000_legitimize_address): Ditto.
10254         (rs6000_legitimize_reload_address): Ditto.
10255         (rs6000_legitimate_address_p): Ditto.
10256         (abi_v4_pass_in_fpr): Ditto.
10257         (setup_incoming_varargs): Ditto.
10258         (rs6000_gimplify_va_arg): Ditto.
10259         (rs6000_split_multireg_move): Ditto.
10260         (rs6000_savres_strategy): Ditto.
10261         (rs6000_emit_prologue_components): Ditto.
10262         (rs6000_emit_epilogue_components): Ditto.
10263         (rs6000_emit_prologue): Ditto.
10264         (rs6000_emit_epilogue): Ditto.
10265         (rs6000_elf_file_end): Ditto.
10266         (rs6000_function_value): Ditto.
10267         (rs6000_libcall_value): Ditto.
10268         * config/rs6000/rs6000.h: Ditto.
10269         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
10270         (TARGET_MINMAX): ... this.  New.
10271         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
10272         * config/rs6000/rs6000.md: Remove Xilinx FP support.
10273         (*movsi_internal1_single): Delete.
10274         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
10275         mfpu=, mxilinx-fpu): Delete.
10276         * config/rs6000/singlefp.h: Delete.
10277         * config/rs6000/sysv4.h: Remove Xilinx FP support.
10278         * config/rs6000/t-rs6000: Ditto.
10279         * config/rs6000/t-xilinx: Delete.
10280         * config/rs6000/titan.md: Adjust for fp_type removal.
10281         * config/rs6000/vsx.md: Remove Xilinx FP support.
10282         (VStype_simple): Delete.
10283         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
10284         * config/rs6000/xfpu.h: Delete.
10285         * config/rs6000/xfpu.md: Delete.
10286         * config/rs6000/xilinx.h: Delete.
10287         * config/rs6000/xilinx.opt: Delete.
10288         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
10289         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
10291 2018-05-04  Tom de Vries  <tom@codesourcery.com>
10293         PR libgomp/85639
10294         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
10295         if ignore == 0.
10297 2018-05-04  Richard Biener  <rguenther@suse.de>
10299         PR middle-end/85627
10300         * tree-complex.c (update_complex_assignment): We are always in SSA form.
10301         (expand_complex_div_wide): Likewise.
10302         (expand_complex_operations_1): Likewise.
10303         (expand_complex_libcall): Preserve EH info of the original stmt.
10304         (tree_lower_complex): Handle removed blocks.
10305         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
10306         on complex multiplication and division libcall builtins.
10308 2018-05-04  Richard Biener  <rguenther@suse.de>
10310         PR middle-end/85574
10311         * fold-const.c (negate_expr_p): Restrict negation of operand
10312         zero of a division to when we know that can happen without
10313         overflow.
10314         (fold_negate_expr_1): Likewise.
10316 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
10318         PR libstdc++/85466
10319         * real.h (real_nextafter): Declare.
10320         * real.c (real_nextafter): New function.
10321         * fold-const-call.c (fold_const_nextafter): New function.
10322         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
10323         CASE_CFN_NEXTTOWARD.
10324         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
10325         even when arg1_mode is different from arg0_mode.
10327 2018-05-03  Nathan Sidwell  <nathan@acm.org>
10329         * doc/extend.texi (Deprecated Features): Remove
10330         -ffriend-injection.
10331         (Backwards Compatibility): Likewise.
10332         * doc/invoke.texi (C++ Language Options): Likewise.
10333         (C++ Dialect Options): Likewise.
10335 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
10337         PR target/85530
10338         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
10339         _mm512_mask_mullox_epi64): New intrinsics.
10341 2018-05-03  Tom de Vries  <tom@codesourcery.com>
10343         PR testsuite/85106
10344         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10345         dump files): Add offload-tree.
10347 2018-05-03  Richard Biener  <rguenther@suse.de>
10349         PR tree-optimization/85615
10350         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
10351         to loops not nested in BBs loop father to avoid creating multi-entry
10352         loops.
10354 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10356         PR tree-optimization/70291
10357         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
10358         arguments.  Change return type to tree.  Emit libcall as a new
10359         statement rather than replacing existing one when inplace_p is true.
10360         (expand_complex_multiplication_components): New function.
10361         (expand_complex_multiplication): Expand floating-point complex
10362         multiplication using the above.
10363         (expand_complex_division): Rename inner_type parameter to type.
10364         Update expand_complex_libcall call-site.
10365         (expand_complex_operations_1): Update expand_complex_multiplication
10366         and expand_complex_division call-sites.
10368 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
10370         PR target/85582
10371         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10372         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10373         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
10374         the highest significant bit of the shift count mask is clear.  In
10375         check whether and[sq]i3 is needed verify that all significant bits
10376         of the shift count other than the highest are set.
10378 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10380         PR libgomp/82428
10381         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10382         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10383         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10384         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10385         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10386         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10387         __builtin_goacc_parlevel_size.
10389 2018-05-02  Richard Biener  <rguenther@suse.de>
10391         PR tree-optimization/85597
10392         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10393         do not use split vect_get_vec_defs call but call vect_get_slp_defs
10394         directly.
10396 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10398         PR testsuite/85106
10399         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10400         dump files): Add ltrans-tree.
10402 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10404         PR testsuite/85106
10405         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10406         dump files): Add wpa-ipa.
10408 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
10410         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
10411         powerpc*-*-linux*paired* target.
10412         * config/rs6000/750cl.h: Delete.
10413         * config/rs6000/paired.h: Delete.
10414         * config/rs6000/paired.md: Delete.
10415         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10416         float support.
10417         * config/rs6000/rs6000-builtin.def: Remove paired float support.
10418         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10419         comment.  Remove paired float support.
10420         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10421         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10422         VECTOR_PAIRED.
10423         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10424         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10425         declarations.
10426         * config/rs6000/rs6000.c: Remove paired float support.
10427         (paired_expand_vector_init, paired_expand_vector_move,
10428         paired_emit_vector_compare, paired_emit_vector_cond_expr,
10429         (paired_expand_lv_builtin, paired_expand_stv_builtin,
10430         paired_expand_builtin, paired_expand_predicate_builtin,
10431         paired_init_builtins): Delete.
10432         * config/rs6000/rs6000.h: Remove paired float support.
10433         * config/rs6000/rs6000.md: Remove paired float support.
10434         (move_from_CR_ov_bit): Delete.
10435         * config/rs6000/rs6000.opt (mpaired): Delete.
10436         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
10437         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
10439 2018-05-02  Richard Biener  <rguenther@suse.de>
10441         PR middle-end/85567
10442         * gimplify.c (gimplify_save_expr): When in SSA form allow
10443         SAVE_EXPRs to compute to SSA vars.
10445 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
10447         PR target/85582
10448         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10449         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10450         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
10451         clobber operands[2], instead use a new pseudo.  Formatting fixes.
10453 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
10455         PR tree-optimization/85586
10456         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
10457         exit early for statements in the same group if the accesses are
10458         not strided.
10460 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10462         PR lto/85451
10463         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
10464         error message.
10466 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
10468         PR tree-optimization/85143
10469         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
10471 2018-05-01  Tom de Vries  <tom@codesourcery.com>
10473         PR lto/85451
10474         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
10475         not found" error message.
10477 2018-05-01  Tom de Vries  <tom@codesourcery.com>
10479         PR other/83786
10480         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
10481         * vec.c (test_ordered_remove_if): New function.
10482         (vec_c_tests): Call test_ordered_remove_if.
10483         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
10484         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
10485         * tree-vect-patterns.c (vect_pattern_recog_1): Use
10486         VEC_ORDERED_REMOVE_IF.
10488 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10490         PR tree-optimization/82665
10491         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
10492         pointer subtraction where arguments come from a memchr call.
10494 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
10496         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
10497         --push-state --as-needed and --pop-state instead of --as-needed and
10498         --no-as-needed if ld supports it.
10499         * configure: Regenerated.
10501         PR web/85578
10502         * doc/install.texi2html: Replace _002d with - and _002a with * in
10503         generated html files using sed.
10505 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10507         PR c++/85523
10508         * gcc-rich-location.c (blank_line_before_p): New function.
10509         (use_new_line): New function.
10510         (gcc_rich_location::add_fixit_insert_formatted): New function.
10511         * gcc-rich-location.h
10512         (gcc_rich_location::add_fixit_insert_formatted): New function.
10514 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10516         * selftest.c (assert_streq): Rename "expected" and "actual" to
10517         "val1" and "val2".  Extend NULL-handling to cover both inputs
10518         symmetrically, while still requiring both to be non-NULL for a pass.
10519         * selftest.h (assert_streq): Rename "expected" and "actual" to
10520         "val1" and "val2".
10521         (ASSERT_EQ): Likewise.
10522         (ASSERT_EQ_AT): Likewise.
10523         (ASSERT_KNOWN_EQ): Likewise.
10524         (ASSERT_KNOWN_EQ_AT): Likewise.
10525         (ASSERT_NE): Likewise.
10526         (ASSERT_MAYBE_NE): Likewise.
10527         (ASSERT_MAYBE_NE_AT): Likewise.
10528         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
10529         the assertion to pass.
10530         (ASSERT_STREQ_AT): Likewise.
10532 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
10534         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
10535         interaction with -pie.
10537 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10539         * selftest.h: Fix alphabetization of per-source-file selftest
10540         declarations.
10542 2018-04-30  Jason Merrill  <jason@redhat.com>
10544         PR c++/61982 - dead stores to destroyed objects.
10545         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
10546         of clobber.
10548 2018-04-30  Jason Merrill  <jason@redhat.com>
10550         * tree.c (build_clobber): New.
10551         * tree.h: Declare it.
10552         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
10554 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10556         * diagnostic-show-locus.c (layout::layout): Update for
10557         location_get_source_line returning a char_span.
10558         (struct char_span): Move to input.h.
10559         (struct correction): Update for fields in char_span becoming
10560         private.
10561         (struct source_line): Update for location_get_source_line
10562         returning a char_span.
10563         (layout::print_line): Likewise.
10564         * edit-context.c (edited_file::print_content): Likewise.
10565         (edited_file::print_diff_hunk): Likewise.
10566         (edited_file::print_run_of_changed_lines): Likewise.
10567         (edited_file::get_num_lines): Likewise.
10568         (edited_line::edited_line): Likewise.
10569         * final.c (asm_show_source): Likewise.
10570         * input.c (location_get_source_line): Convert return type
10571         from const char * to char_span, losing the final "line_len"
10572         param.
10573         (dump_location_info): Update for the above.
10574         (get_substring_ranges_for_loc): Likewise.  Use a char_span
10575         when handling the literal within the line.
10576         (test_reading_source_line): Update for location_get_source_line
10577         returning a char_span.
10578         * input.h (class char_span): Move here from
10579         diagnostic-show-locus.c, converting from a struct to a class.
10580         Make data members private.
10581         (char_span::operator bool): New.
10582         (char_span::length): New.
10583         (char_span::get_buffer): New.
10584         (char_span::operator[]): New.
10585         (char_span::subspan): Make const.
10586         (char_span::xstrdup): New.
10587         (location_get_source_line): Convert return type from const char *
10588         to char_span, losing the final "line_size" param.
10590 2018-04-30  Jan Hubicka  <jh@suse.cz>
10592         * lto-wrapper.c (ltrans_priorities): New static var.
10593         (cmp_priority): New.
10594         (run_gcc): Read priorities and if doing parallel build order
10595         the Makefile by them.
10597 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10599         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
10601 2018-04-30  Richard Biener  <rguenther@suse.de>
10603         * tree-cfg.c (verify_address): Remove base argument, add
10604         flag whether to check TREE_ADDRESSABLE and do that.
10605         (verify_expr): Remove.
10606         (verify_types_in_gimple_reference): Add pieces from verify_expr.
10607         (verify_gimple_assign_single): Likewise.
10608         (verify_gimple_switch): Likewise.
10609         (verify_expr_location_1): Dereference tp once.  Add (disabled)
10610         piece from verify_expr.
10611         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
10613 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
10615         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
10617 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
10619         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
10620         (small_data_pattern): Likewise.
10621         (arc_rewrite_small_data): Likewise.
10622         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
10623         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
10624         (get_symbol_alignment): New function.
10625         (legitimate_small_data_address_p): Likewise.
10626         (legitimate_scaled_address): Update, call
10627         legitimate_small_data_address_p.
10628         (output_sdata): New static variable.
10629         (arc_print_operand): Update how we handle small data operands.
10630         (arc_print_operand_address): Likewise.
10631         (arc_legitimate_address_p): Update, use
10632         legitimate_small_data_address_p.
10633         (arc_rewrite_small_data_p): Remove.
10634         (arc_rewrite_small_data_1): Likewise.
10635         (arc_rewrite_small_data): Likewise.
10636         (small_data_pattern): Likewise.
10637         (compact_sda_memory_operand): Update to use
10638         legitimate_small_data_address_p and get_symbol_alignment.
10639         (prepare_move_operands): Don't rewite sdata pattern.
10640         (prepare_extend_operands): Remove.
10641         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10642         pattern.
10643         (zero_extendqisi2): Likewise.
10644         (zero_extendhisi2): Likewise.
10645         (extendqihi2): Likewise.
10646         (extendqisi2): Likewise.
10647         (extendhisi2): Likewise.
10648         (addsi3): Likewise.
10649         (subsi3): Likewise.
10650         (andsi3): Likewise.
10651         * config/arc/constraints.md (Usd): Change it to memory constraint.
10653 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
10655         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10656         as source of std instructions.
10657         * config/arc/arc.md (movsi_insn): Update pattern predicate to
10658         allow 6-bit constants as source for store instructions.
10659         (movdi_insn): Update instruction pattern to allow 6-bit constants
10660         as source for store instructions.
10662 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
10664         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10666 2018-04-30  Nathan Sidwell  <nathan@acm.org>
10667             Sandra Loosemore <sandra@codesourcery.com>
10669         * dumpfile.c (dump_open): Allow '-' for stdout.
10670         * doc/invoke.texi (Developer Options): Document dump filename
10671         determination early.  Document stdin/stdout selection.
10673 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
10675         Microblaze Target: PIC data text relative
10677         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10678         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10679         Add declaration.
10680         * config/microblaze/microblaze.h (microblaze_constant_address_p):
10681         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10682         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10683         New addressing mode for data-text relative position indepenedent code.
10684         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10685         'ADDRESS_SYMBOLIC_TXT_REL'.
10686         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10687         (microblaze_legitimate_pic_operand): Exclude function calls from
10688         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10689         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10690         addresses cases.
10691         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10692         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10693         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10694         for 'address + offset'.
10695         (microblaze_expand_prologue): Add new function prologue call for
10696         'r20' assignation.
10697         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10698         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10699         table in case of TARGET_PIC_DATA_TEXT_REL.
10700         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10701         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10702         Add new macros 'UNSPEC_TEXT',
10703         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10704         + exclude function calls from 'UNSPEC_PLT' in case of data text
10705         relative mode.
10706         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10707         new target hook for generating address diff vector tables in case of
10708         flag_pic.
10709         * doc/tm.texi : Regenerate.
10710         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10711         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10712         of addr diff vector generation.
10713         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10714         target hook definition.
10715         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10716         Add default function for generate_pic_addr_diff_vec -> flag_pic.
10717         * doc/invoke.texi (Add new pic option): Add new microblaze pic
10718         option for data text relative.
10720 2018-04-30  Richard Biener  <rguenther@suse.de>
10722         * tree-chrec.h (evolution_function_is_constant_p): Remove
10723         redundant check.
10724         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10726 2018-04-30  Richard Biener  <rguenther@suse.de>
10728         PR bootstrap/85571
10729         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10731 2018-04-30  Richard Biener  <rguenther@suse.de>
10733         PR tree-optimization/28364
10734         PR tree-optimization/85275
10735         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10736         copying first exit test.
10738 2018-04-28  Mark Wielaard  <mark@klomp.org>
10740         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10741         dwarf_version >= 5.
10742         (dwarf_AT): Handle DW_AT_addr_base.
10743         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10745 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
10747         PR target/84431
10748         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10749         (*ashl<dwi>3_doubleword_mask_1): Ditto.
10750         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10751         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10753 2018-04-28  Richard Biener  <rguenther@suse.de>
10755         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10756         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10757         to reflect use.  Only add interesting stmts.
10759 2018-04-27  Martin Jambor  <mjambor@suse.cz>
10761         PR ipa/85549
10762         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10763         the jump function allows for passing through aggregate values.
10765 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
10767         * input.h (in_system_header_at): Convert from macro to inline
10768         function.
10769         (from_macro_expansion_at): Likewise.
10770         (from_macro_definition_at): Likewise.
10772 2018-04-27  Jeff Law  <law@redhat.com>
10774         * config.gcc: Mark tile* targets as deprecated/obsolete.
10776 2018-04-27  Richard Biener  <rguenther@suse.de>
10778         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10779         fix for ILP32.
10781 2018-04-27  Richard Biener  <rguenther@suse.de>
10783         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10785 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
10787         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10788         with Yd constraint. Set "preferred_for_speed" attribute from
10789         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10790         with Yd constraint.
10791         (*movdi_internal): Ditto.
10792         (movti_interunit splitters): Remove
10793         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10794         (movdi_interunit splitters): Ditto.
10795         * config/i386/constraints.md (Ye): Remove.
10796         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10798 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10800         PR target/85512
10801         * config/aarch64/constraints.md (Usg): Limit to 31.
10802         (Usj): Limit to 63.
10804 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
10806         PR tree-optimization/85529
10807         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10808         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10809         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10810         zero extension or masking of the MSB bit.
10811         (optimize_range_tests): Add FIRST_BB argument, pass it through
10812         to optimize_range_tests_var_bound.
10813         (maybe_optimize_range_tests, reassociate_bb): Adjust
10814         optimize_range_tests callers.
10816 2018-04-26  Richard Biener  <rguenther@suse.de>
10817             Jakub Jelinek  <jakub@redhat.com>
10819         * cgraph.h (symbol_table): Just declare debug method here.
10820         * symtab.c (symbol_table::debug): Define.
10822 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
10824         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10826 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
10828         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10829         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10830         (*movdi_internal): Substitute Yi and Yj constraint with x
10831         and Ym and Yn constraint with y constraint.  Update "isa"
10832         attribute and set "preferred_for_speed" attribute from
10833         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10834         (*movsi_internal): Ditto.
10835         (*movdf_internal): Ditto.
10836         (*movsf_internal): Ditto.
10837         (*zero_extendsidi2): Ditto.
10838         * config/i386/sse.md (vec_set<mode>_0): Ditto.
10839         (sse2_loadld): Ditto.
10840         (*vec_extract<ssevecmodelower>_0): Ditto.
10841         (*vec_extractv4si_0_zext_sse4): Ditto.
10842         (vec_concatv2di): Ditto.
10843         (*vec_dup<mode>): Ditto.
10844         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10845         * config/i386/constraints.md (Yi): Remove.
10846         (Yj): Remove.
10847         (Ym): Remove.
10848         (Yn): Remove.
10850 2018-04-26  Nathan Sidwell  <nathan@acm.org>
10852         * dumpfile.c (dump_open): New.
10853         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10854         (dump_finish): Detect stdio/stderr by value not name.
10856 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
10858         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10860 2018-04-26  Tom de Vries  <tom@codesourcery.com>
10862         PR target/84952
10863         * config/nvptx/nvptx.c (verify_neutering_jumps)
10864         (verify_neutering_labels): New function
10865         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10867 2018-04-26  Tom de Vries  <tom@codesourcery.com>
10869         PR target/84025
10870         * config/nvptx/nvptx.c (needs_neutering_p): New function.
10871         (nvptx_single): Use needs_neutering_p to skip over insns that do not
10872         need neutering.
10874 2018-04-26  Richard Biener <rguenther@suse.de>
10875             Tom de Vries  <tom@codesourcery.com>
10877         PR lto/85422
10878         * lto-streamer-out.c (output_function): Fixup loops if required to match
10879         discovery done in the reader.
10881 2018-04-26  Richard Biener  <rguenther@suse.de>
10883         PR tree-optimization/85116
10884         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10885         have a loop exit from the single latch predecessor.  Remove
10886         case of header with just condition.
10887         (ch_base::copy_headers): Exclude infinite loops from any
10888         processing.
10889         (pass_ch::execute): Record exits.
10891 2018-04-26  Richard Biener  <rguenther@suse.de>
10893         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10894         prologue cost vector and pass it to vect_get_load_cost.
10895         (vect_get_peeling_costs_all_drs): Likewise.
10896         (vect_peeling_hash_get_lowest_cost): Likewise.
10897         (vect_enhance_data_refs_alignment): Likewise.
10899 2018-04-26  Richard Biener  <rguenther@suse.de>
10901         PR middle-end/85450
10902         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10903         checking of integer<->pointer conversions.
10904         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10905         sign-/zero-extending pointer types.
10906         (expand_omp_for_static_chunk): Likewise.
10908 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
10909             Jean Lee  <xiaoyur347@gmail.com>
10911         * config/mips/mips.c (mips_asan_shadow_offset): New function.
10912         (TARGET_ASAN_SHADOW_OFFSET): Define.
10913         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10914         true for -fsanitize=address.
10916 2018-04-25  Mark Wielaard  <mark@klomp.org>
10918         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10919         shorter ones.
10921 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
10923         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10924         than "alu", remove explicit "memory" and "imm_disp" attributes.
10925         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10927         PR middle-end/85414
10928         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10929         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10930         gen_lowpart_no_emit.
10932 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
10934         PR target/85473
10935         * config/i386/i386.c (ix86_expand_builtin): Change memory
10936         operand to XI, extend p0 to Pmode.
10937         * config/i386/i386.md: Change unspec volatile and operand
10938         1 mode to XI, change operand 0 mode to P.
10940 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10942         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10943         GET_MODE_MASK before any checking.
10944         (nds32_can_use_bset_p): Likewise.
10945         (nds32_can_use_btgl_p): Likewise.
10947 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10949         * config/nds32/nds32-doubleword.md: New define_split pattern for
10950         illegal register number.
10952 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10954         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10956 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10958         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10960 2018-04-25  Richard Biener  <rguenther@suse.de>
10962         * lto-streamer.h (LTO_major_version): Bump to 8.
10964 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
10966         * BASE-VER: Set to 9.0.0.
10968 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
10970         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10971         in __abskf2 and __powikf2.
10973 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10975         PR target/85512
10976         * config/aarch64/constraints.md (Usg, Usj): New constraints.
10977         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
10978         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
10979         Use the above on operand 2.  Reindent.
10980         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
10982 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
10984         PR target/85485
10985         * common/config/i386/i386-common.c (ix86_handle_option): Don't
10986         handle OPT_mcet.
10987         * config/i386/i386.opt (mcet): Removed.
10988         * doc/install.texi: Remove -mcet documentation.
10989         * doc/invoke.texi: Likewise.
10991 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
10993         PR target/85485
10994         * doc/install.texi: Remove -mcet from bootstrap-cet.
10996 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
10998         PR target/85511
10999         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11000         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11001         if TARGET_64BIT.
11003         PR target/85503
11004         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11005         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11006         containing a CONST_VECTOR.
11008 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
11010         * doc/install.texi: Update newlib dependency for nvptx.
11012 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11014         PR target/85508
11015         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11016         instead of INTVAL when shifting x left.
11018 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
11020         PR tree-optimization/85478
11021         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11022         vect_grouped_store_supported for single element vectors.
11024 2018-04-24  Richard Biener  <rguenther@suse.de>
11026         PR target/85491
11027         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11028         load cost increase to the case of non-constant step.
11030 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
11032         PR target/84828
11033         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11034         destination if any_malformed_asm.
11036 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
11038         PR middle-end/85496
11039         * expr.c (store_field): In the bitfield case, if the value comes from
11040         a function call and is returned in registers by means of a PARALLEL,
11041         do not change the mode of the temporary unless BLKmode and VOIDmode.
11043 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
11045         PR rtl-optimization/85423
11046         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
11047         dependencies to debug insns when the previous insn is non-debug.
11049 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
11051         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
11052         enums into a single definition.
11053         (fls): Fix predicates and printing.
11054         (seti): Likewise.
11056 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
11058         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
11059         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
11060         and short u6 immediate.
11061         (check_if_valid_sleep_operand): Remove.
11062         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
11064 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11066         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
11067         flag_always_save_lp condition.
11068         * config/nds32/nds32.opt (malways-save-lp): New option.
11070 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11072         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
11073         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
11074         * config/nds32/nds32.h
11075         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
11076         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
11078 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11080         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11081         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
11083 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
11084             Chung-Ju Wu  <jasonwucj@gmail.com>
11086         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
11087         Declare.
11088         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
11089         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
11091 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11093         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
11095 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11097         * config/nds32/nds32-protos.h (nds32_data_alignment,
11098         nds32_local_alignment): Declare.
11099         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
11100         nds32_local_alignment): New functions.
11101         (TARGET_CONSTANT_ALIGNMENT): Define.
11102         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
11104 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11106         * config/nds32/nds32.c
11107         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
11108         (TARGET_MODES_TIEABLE_P): Likewise.
11110 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
11112         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
11113         level Ofast and Og.
11115 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
11116             Chung-Ju Wu  <jasonwucj@gmail.com>
11118         * config/nds32/constants.md (unspec_volatile_element): Add enum values
11119         for unaligned access.
11120         * config/nds32/nds32-intrinsic.c: Implementation of expanding
11121         unaligned access.
11122         * config/nds32/nds32-intrinsic.md: Likewise.
11123         * config/nds32/nds32_intrinsic.h: Likewise.
11124         * config/nds32/nds32.h (nds32_builtins): Likewise.
11125         * config/nds32/nds32.opt (munaligned-access): New option.
11126         * config/nds32/nds32.c (nds32_asm_file_start): Display
11127         flag_unaligned_access status.
11129 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
11131         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
11132         -mno-relax is present.
11133         * config/riscv/linux.h (LINK_SPEC): Ditto.
11135 2018-04-20  Martin Sebor  <msebor@redhat.com>
11137         PR c/85365
11138         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
11139         for null pointers.
11140         (gimple_fold_builtin_stxcpy_chk): Same.
11141         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
11143 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
11145         PR target/85456
11146         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
11147         __powikf2 when long double is IEEE 128-bit.
11149 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
11151         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
11152         step to make sure stack always aligned.
11154 2018-04-20  Carl Love  <cel@us.ibm.com>
11156         PR target/83402
11157         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
11158         size check for arg0.
11160 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
11161             Tom de Vries  <tom@codesourcery.com>
11163         PR target/85445
11164         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
11165         Emit insns for calls too.
11166         (nvptx_find_par): Always look for worker-level predecessor insn.
11167         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
11168         calls.
11169         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
11170         (nvptx_process_pars): Propagate frames for calls.
11172 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
11174         PR target/85469
11175         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
11176         Removed.
11177         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
11178         (ix86_handle_option): Don't handle OPT_mibt.
11179         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
11180         __SHSTK__.
11181         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
11182         has_ibt and ibt.
11183         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
11184         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
11185         (ix86_target_macros): Define __CET__ with flag_cf_protection
11186         for -fcf-protection.
11187         * config/i386/i386.c (isa2_opts): Remove -mibt.
11188         * config/i386/i386.h (TARGET_IBT): Removed.
11189         (TARGET_IBT_P): Likewise.
11190         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
11191         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
11192         * config/i386/i386.opt (mcet): Update help message.
11193         (mshstk): Likewise.
11194         (mibt): Removed.
11195         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
11196         -mcet as an alias for -mshstk.
11198 2018-04-20  Richard Biener <rguenther@suse.de>
11200         PR middle-end/85475
11201         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
11202         complexity by forcing a single use of the multiply operand.
11204 2018-04-20  Martin Jambor  <mjambor@suse.cz>
11206         ipa/85449
11207         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
11208         recursion dependency to only apply to non-clones.
11210 2018-04-20  Martin Jambor  <mjambor@suse.cz>
11212         ipa/85447
11213         * ipa-cp.c (create_specialized_node): Check that clones of
11214         self-recursive edges exist during IPA-CP.
11216 2018-04-19  Toon Moene  <toon@moene.org>
11218         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
11219         by -O3.
11221 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
11223         PR tree-optimization/85467
11224         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
11225         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
11226         VECTOR_CST element to type.
11228 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
11230         PR target/85397
11231         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
11232         * config/i386/i386.md (builtin_setjmp_setup): Removed.
11233         (builtin_longjmp): Likewise.
11234         (save_stack_nonlocal): New pattern.
11235         (restore_stack_nonlocal): Likewise.
11237 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
11239         PR target/85404
11240         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11241         Replace ASM_OUTPUT_LABEL with fprintf.
11243 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
11245         PR target/85417
11246         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11247         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
11248         * config/i386/i386-c.c (ix86_target_macros_internal): Also
11249         define __IBT__ and __SHSTK__ for -fcf-protection.
11250         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
11251         TARGET_IBT.
11252         (ix86_trampoline_init): Likewise.
11253         (x86_output_mi_thunk): Likewise.
11254         (ix86_notrack_prefixed_insn_p): Likewise.
11255         (ix86_option_override_internal): Don't disallow -fcf-protection.
11256         * config/i386/i386.md (rdssp<mode>): Also enable for
11257         -fcf-protection.
11258         (incssp<mode>): Likewise.
11259         (nop_endbr): Likewise.
11260         * config/i386/i386.opt (mcet): Change help message to built-in
11261         functions only.
11262         (mibt): Likewise.
11263         (mshstk): Likewise.
11264         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
11265         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
11266         enable CET built-in functions.
11268 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
11270         * common/config/i386/i386-common.c
11271         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
11272         OPTION_MASK_ISA_MOVDIRI_UNSET,
11273         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
11274         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
11275         * config.gcc (movdirintrin.h): New header.
11276         * config/i386/cpuid.h (bit_MOVDIRI,
11277         bit_MOVDIR64B): New bits.
11278         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
11279         and -mmvodir64b.
11280         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
11281         (VOID, PVOID, PCVOID)): New function types.
11282         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
11283         __builtin_ia32_directstoreu_u64,
11284         __builtin_ia32_movdir64b): New builtins.
11285         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
11286         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
11287         and -mmovdiri.
11288         (ix86_valid_target_attribute_inner_p): Ditto.
11289         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
11290         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
11291         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
11292         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
11293         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
11294         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
11295         (movdiri<mode>, movdir64b_<mode>): New.
11296         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
11297         * config/i386/immintrin.h: Include movdirintrin.h.
11298         * config/i386/movdirintrin.h: New file.
11299         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
11301 2018-04-19  Richard Biener  <rguenther@suse.de>
11303         PR middle-end/85455
11304         * cfg.c (clear_bb_flags): When loop state says we have
11305         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
11307 2018-04-19  Richard Biener  <rguenther@suse.de>
11309         PR tree-optimization/84737
11310         * tree-vect-data-refs.c (vect_copy_ref_info): New function
11311         copying restrict info.
11312         (vect_setup_realignment): Use it.
11313         * tree-vectorizer.h (vect_copy_ref_info): Declare.
11314         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
11315         the first DR to all generated stores.
11316         (vectorizable_load): Likewise for loads.
11318 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
11320         PR tree-optimization/85446
11321         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
11322         the integral and pointer types to have the same precision.
11324         * doc/install.texi: Document --disable-cet being the default and
11325         --enable-cet=auto.
11327 2018-04-18  Martin Liska  <mliska@suse.cz>
11329         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
11330         style.
11332 2018-04-18  Martin Liska  <mliska@suse.cz>
11334         Revert
11335         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
11337         PR ipa/83983
11338         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11339         arguments if they are comparable.
11341 2018-04-18  Martin Liska  <mliska@suse.cz>
11343         Revert
11344         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
11346         PR lto/84805
11347         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11348         incomplete types.
11350 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
11352         PR target/85388
11353         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
11354         ENDBR after calling __morestack.
11356 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
11358         PR jit/85384
11359         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
11360         by using gcc_base_ver to generate a gcc_driver_version, and use
11361         it when generating GCC_DRIVER_NAME.
11362         * configure: Regenerate.
11364 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
11366         PR target/81084
11367         * config.gcc: Obsolete powerpc*-*-*spe*.
11369 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11371         PR debug/84637
11372         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
11373         (stabstr_D): Change type of unum from unsigned int to
11374         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
11375         type.
11377 2018-04-17  Jim Wilson  <jimw@sifive.com>
11379         PR 84856
11380         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11381         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11382         Set arg_pointer_offset after using pretend_args_size.
11384 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11386         PR rtl-optimization/85431
11387         * dse.c (record_store): Ignore zero width stores.
11389         PR sanitizer/85230
11390         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
11391         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11392         __builtin_stack_restore rather than after it.
11393         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11394         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11395         argument instead of virtual_dynamic_stack_rtx.
11397 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11399         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11400         New prototype.
11401         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11402         Add note to error message to explain internal mapping of overloaded
11403         built-in function name to non-overloaded built-in function name.
11404         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11405         function.
11407 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
11409         PR target/85424
11410         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11411         where the inputs overlap with the output.
11413 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11415         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11416         (=v, v) alternative and explicit "memory" attribute.
11417         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
11418         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11419         attributes.
11420         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11421         "sselog1" type instead of "sselog".
11422         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11423         "sselog".  Remove explicit "memory" attribute.
11424         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11425         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11426         attributes.
11427         (vec_extract_hi_v32hi): Merge all alternatives into one, use
11428         "sselog1" type instead of "sselog".  Remove explicit "memory"
11429         attribute.
11430         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11431         use "sselog1" type instead of "sselog".  Remove explicit "memory"
11432         attribute.
11433         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
11434         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11435         attributes.
11436         (vec_extract_hi_v64qi): Merge all alternatives into one, use
11437         "sselog1" type instead of "sselog".  Remove explicit "memory"
11438         attribute.
11439         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
11440         use "sselog1" type instead of "sselog".  Remove explicit "memory"
11441         attribute.
11443         PR target/85430
11444         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
11446         PR middle-end/85414
11447         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
11448         on a SUBREG.
11450 2018-04-17  Martin Jambor  <mjambor@suse.cz>
11452         PR ipa/85421
11453         * ipa-cp.c (create_specialized_node): Call
11454         expand_all_artificial_thunks if necessary.
11456 2018-04-17  Martin Liska  <mliska@suse.cz>
11458         PR lto/85405
11459         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
11460         in message, remote space in between '_G' and '('.
11462 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11464         PR target/85281
11465         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
11466         avx512f_vmcmp<mode>3<round_saeonly_name>,
11467         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
11468         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
11469         avx512f_rndscale<mode><round_saeonly_name>,
11470         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
11471         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
11472         Use %<iptr>2 instead of %2 for -masm=intel.
11473         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
11474         avx512f_vcvttss2usi<round_saeonly_name>,
11475         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
11476         -masm=intel.
11477         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
11478         avx512f_vcvttsd2usi<round_saeonly_name>,
11479         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
11480         Use %q1 instead of %1 for -masm=intel.
11481         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
11482         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
11483         of %3 for -masm=intel.
11484         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
11485         -masm=intel.
11486         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
11487         -masm=intel.
11488         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
11489         -masm=intel.
11490         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
11491         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
11492         %g1.
11493         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
11494         -masm=intel.
11495         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
11496         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
11497         %g1 and one with %0 and %1.
11498         (avx512er_vmrcp28<mode><round_saeonly_name>,
11499         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
11500         %1 for -masm=intel.
11501         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
11502         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
11503         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
11504         of %0 and %{%4%} for -masm=intel.
11505         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
11506         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
11507         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
11508         order of %0 and %{%5%}%{z%} for -masm=intel.
11510 2018-04-17  Jan Hubicka  <jh@suse.cz>
11512         PR lto/85405
11513         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
11515 2018-04-17  Martin Liska  <mliska@suse.cz>
11517         PR ipa/85329
11518         * multiple_target.c (create_dispatcher_calls): Set apostrophes
11519         for target_clone error message.  Make default implementation
11520         clone to be a local declaration.
11521         (separate_attrs): Add new argument and check for an empty
11522         string.
11523         (expand_target_clones): Handle it.
11524         (ipa_target_clone): Make redirection just for target_clones
11525         functions.
11527 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
11528             Tom de Vries  <tom@codesourcery.com>
11530         PR middle-end/84955
11531         * omp-expand.c (expand_oacc_for): Add dummy false branch for
11532         tiled basic blocks without omp continue statements.
11534 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
11536         PR target/83660
11537         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
11538         vec_extract expression as having side effects to make sure it gets
11539         a cleanup point.
11541 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
11543         PR target/85403
11544         * config/i386/i386.c (get_builtin_code_for_version): Check
11545         error_mark_node.
11547 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
11549         PR target/84331
11550         * config.gcc: Support "skylake".
11551         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11552         PROCESSOR_SKYLAKE.
11553         * config/i386/i386.c (m_SKYLAKE): Define.
11554         (processor_target_table): Add "skylake".
11555         (ix86_option_override_internal): Add "skylake".
11556         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11557         PROCESSOR_CANNONLAKE.
11558         (get_builtin_code_for_version): Fix priority for
11559         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11560         PROCESSOR_SKYLAKE-AVX512.
11561         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11562         (processor_type): Add PROCESSOR_SKYLAKE.
11564 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
11565             Jason Merrill  <jason@redhat.com>
11567         PR c++/85112
11568         * convert.c (convert_to_integer_1): Use direct recursion for
11569         enumeral types and types with a precision less than the number
11570         of bits in their mode.
11572 2018-04-16  Julia Koval  <julia.koval@intel.com>
11574         PR target/84413
11575         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
11576         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
11578 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
11580         PR target/85293
11581         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
11582         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
11583         and -mno-direct-move.
11585 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
11587         PR target/83402
11588         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
11589         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
11590         Ensure negative shifts result in {0}.
11592 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
11594         PR rtl-optimization/79916
11595         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
11596         regs (if any) to define how to gnerate SD moves when LRA is in
11597         progress.
11599 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
11601         PR rtl-optimization/85393
11602         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
11603         * except.c (expand_dw2_landing_pad_for_region): Make static.
11604         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
11605         a label and unconditional jump to old_bb, rather than
11606         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
11607         basic block.
11609         PR rtl-optimization/85376
11610         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
11611         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
11612         instead of a specific value.
11614 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
11615             Bin Cheng  <bin.cheng@arm.com>
11617         PR tree-optimization/82965
11618         PR tree-optimization/83991
11619         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
11620         by_profile_only parameter.
11621         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
11622         information if the loop was predicted to iterate too many times.
11623         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
11625 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
11627         PR lto/71991
11628         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11629         always inline.
11631 2018-04-13  Martin Liska  <mliska@suse.cz>
11632             Jakub Jelinek  <jakub@redhat.com>
11634         PR middle-end/81657
11635         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11636         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11637         * builtins.c (expand_builtin_memory_copy_args): Use
11638         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11639         handle dest_addr == pc_rtx.
11641 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
11643         PR target/85291
11644         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11645         asked to not generate direct moves.
11646         (fix_trunc<mode>si2_stfiwx): Similar.
11647         (fix_trunc<mode>si2_internal): Similar.
11649 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
11651         PR debug/83157
11652         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11653         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11654         lookup if dest in some wider mode is known to be const0_rtx and
11655         if so, record permanent equivalence for it to be ZERO_EXTEND of
11656         the narrower mode destination.
11658 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
11660         * lto-streamer-out.c (output_function): Revert 259346.
11661         * omp-expand.c (expand_oacc_for): Likewise.
11663 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
11665         PR rtl-optimization/85354
11666         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11667         * sel-sched.c (sel_global_init): ... here.
11669 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
11671         PR target/85238
11672         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11673         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11674         mode for PE-COFF targets.
11675         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11676         (i386_pe_asm_lto_end): Likewise.
11677         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11678         (TARGET_ASM_LTO_END): Likewise.
11679         * config/i386/winnt.c (saved_debug_info_level): New static variable.
11680         (i386_pe_asm_lto_start): New function.
11681         (i386_pe_asm_lto_end): Likewise.
11683 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
11684             Richard Biener  <rguenther@suse.de>
11686         PR middle-end/84955
11687         * lto-streamer-out.c (output_function): Fix CFG loop state before
11688         streaming out.
11689         * omp-expand.c (expand_oacc_for): Handle calls to internal
11690         functions like regular functions.
11692 2018-04-12  Richard Biener  <rguenther@suse.de>
11694         PR lto/85371
11695         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11696         for the early LTO debug to properly generate references to it
11697         during DIE emission.  Do not re-use that for the skeleton for
11698         split-dwarf.
11699         (dwarf2out_early_finish): Likewise.
11701 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
11703         PR target/85328
11704         * config/i386/sse.md
11705         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11706         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11707         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11708         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11709         and output is a reg, avoid creating invalid lowpart subreg, but
11710         instead split into a 512-bit move.  Don't split if not AVX512VL,
11711         input is xmm16+ reg and output is a mem.
11712         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11713         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11714         xmm16+ reg and output is a mem.
11716 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11718         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11719         also for flag_dwarf2_cfi_asm.
11721 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
11723         PR rtl-optimization/85342
11724         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11725         a bool scalar var inside of the loop instead.  Don't try to update
11726         recog_data.operand after failed apply_change_group.
11728 2018-04-12  Tom de Vries  <tom@codesourcery.com>
11730         PR target/85296
11731         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11732         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
11733         array with flexible array member as array without given dimension.
11734         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11735         argument for undefined param to true.
11737 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
11739         PR target/85321
11740         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11741         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11742         from PowerPC section.
11743         * config/rs6000/sysv4.opt (mcall-): Improve help text.
11744         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11745         help text that is too long.
11746         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11747         help text that is too long.
11748         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11749         help text that is too long.
11751 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
11753         * config/alpha/alpha.md (stack_probe_internal): Rename
11754         from "probe_stack".  Update all callers.
11756 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
11758         PR rtl-optimization/84566
11759         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11760         sched_macro_fuse_insns.
11762 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
11764         PR target/84301
11765         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11766         (compute_block_dependences): ... from here.
11768 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
11770         PR tree-optimization/85331
11771         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11772         from int to HOST_WIDE_INT.
11774 2018-04-11  Martin Jambor  <mjambor@suse.cz>
11776         PR ipa/84149
11777         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11778         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11779         not the same as the source val.
11780         (cgraph_edge_brings_value_p): New parameter.
11781         (gather_edges_for_value): Pass destination value to
11782         cgraph_edge_brings_value_p.
11783         (perhaps_add_new_callers): Likewise.
11784         (get_info_about_necessary_edges): Likewise and exclude values brought
11785         only by self-recursive edges.
11786         (create_specialized_node): Redirect only clones of self-calling edges.
11787         (+self_recursive_pass_through_p): New function.
11788         (find_more_scalar_values_for_callers_subset): Use it.
11789         (find_aggregate_values_for_callers_subset): Likewise.
11790         (known_aggs_to_agg_replacement_list): Removed.
11791         (decide_whether_version_node): Re-calculate known constants for all
11792         remaining context clones.
11794 2018-04-11  Richard Biener  <rguenther@suse.de>
11796         PR lto/85339
11797         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11798         from early DWARF output.
11799         (dwarf2out_early_finish): Output line info unconditionally into
11800         early DWARF and add reference to it.
11802 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
11804         PR target/85281
11805         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11806         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11807         other than V2DFmode using iptr mode attribute.
11808         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11810 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
11812         PR rtl-optimization/84659
11813         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11815 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
11817         PR debug/85302
11818         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11819         SIZEP is NULL.
11820         (output_loc_list): Pass address of a dummy size variable even in the
11821         locview handling loop.
11822         (index_location_lists): Add comment on why skip_loc_list_entry can't
11823         call size_of_locs.
11825 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11827         PR target/85261
11828         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11829         into register.
11831 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
11833         PR target/85321
11834         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11835         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11836         and -mstring-compare-inline-limit.
11838 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
11840         PR target/85287
11841         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11842         for stack clash protection in a register whenever we need it to be in
11843         a register.
11845 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
11847         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11848         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11850 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
11852         PR target/85321
11853         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11854         the help text.
11855         (mlong-double-): Ditto.
11856         * config/rs6000/sysv4.opt (msdata=): Ditto.
11857         (mtls-size=): Ditto.
11859 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11861         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11862         erroneous entries for
11863         "vector int vec_ldl (int, long int *)", and
11864         "vector unsigned int vec_ldl (int, unsigned long int *)".
11865         Add comments and entries for
11866         "vector bool char vec_ldl (int, bool char *)",
11867         "vector bool short vec_ldl (int, bool short *)",
11868         "vector bool int vec_ldl (int, bool int *)",
11869         "vector bool long long vec_ldl (int, bool long long *)",
11870         "vector pixel vec_ldl (int, pixel *)",
11871         "vector long long vec_ldl (int, long long *)",
11872         "vector unsigned long long vec_ldl (int, unsigned long long *)".
11873         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11874         type tree bool_long_long_type_node and correct definition of
11875         bool_V2DI_type_node to make reference to this new type tree.
11876         (rs6000_mangle_type): Replace erroneous reference to
11877         bool_long_type_node with bool_long_long_type_node.
11878         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11879         comments to emphasize sign distinctions for char and int types and
11880         replace RS6000_BTI_bool_long constant with
11881         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
11882         use of RS6000_BTI_pixel.
11883         (bool_long_type_node): Remove this macro definition.
11884         (bool_long_long_type_node): New macro definition
11886 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
11888         PR rtl-optimization/85300
11889         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11890         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11891         simplify_unary_operation fails.
11893 2018-04-10  Martin Liska  <mliska@suse.cz>
11895         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11896         cgraph_edge and ipa_ref.
11898 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
11900         PR target/85177
11901         PR target/85255
11902         * config/i386/sse.md
11903         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11904         computation of the VEC_MERGE selector from mask.
11905         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11906         Fix decoding of the VEC_MERGE selector into mask.
11908 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
11910         PR tree-optimization/85286
11911         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11913 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
11915         * final.c (final_1): Set insn_last_address as well as
11916         insn_current_address.
11918 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11920         PR target/85173
11921         * explow.c (emit_stack_probe): Call validize_mem on memory location
11922         before passing it to gen_probe_stack.  Create address operand and
11923         legitimize it for the probe_stack_address case.
11925 2018-04-09  Jan Hubicka  <jh@suse.cz>
11927         PR lto/85078
11928         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11929         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11930         * tree.c (free_lang_data_in_type): Fix handling of binfos;
11931         walk basetypes.
11932         (free_lang_data): Rebuild type inheritance graph.
11934 2018-04-09  Martin Sebor  <msebor@redhat.com>
11936         * invoke.texi (-finline-small-functions): Mention other optimization
11937         options.
11938         (-findirect-inlining, -fpartial-inlining): Same.
11939         (-finline-functions-called-once): Same.
11940         (-freorder-blocks-and-partition): Same.
11942 2018-04-09  Jan Hubicka  <jh@suse.cz>
11944         PR rtl/84058
11945         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11946         jumps; choose last target that matches the criteria (i.e.
11947         no partition changes for non-crossing jumps).
11948         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11949         support for redirecting crossing jumps to non-crossing.
11951 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
11953         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11954         also for naked functions.
11956 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
11958         * config/arc/arc.md (add_shift): New pattern.
11959         (add_shift2): Likewise.
11960         (sub_shift): Likewise.
11961         (sub_shift_cmp0_noout): Likewise.
11962         (compare_si_ashiftsi): Likewise.
11963         (xbfu_cmp0_noout): New combine pattern.
11964         (xbfu_cmp0"): Likewise.
11965         (movsi_set_cc_insn): Place the predicable variant first.
11966         (commutative_binary_cmp0_noout): Remove clobber.
11967         (commutative_binary_cmp0): New pattern.
11968         (noncommutative_binary_cmp0): Likewise.
11969         (noncommutative_binary_cmp0_noout): Likewise.
11970         (noncommutative_binary_comparison_result_used): Removed.
11971         (rsub_cmp0): New pattern.
11972         (rsub_cmp0_noout): Likewise.
11973         (extzvsi): Changed, keep only meaningful variants.
11974         (SQH, SEZ): New iterators.
11975         (SQH_postfix): New mode attribute.
11976         (SEZ_prefix): New code attribute.
11977         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
11978         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
11979         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
11980         of numerical value.
11981         (noncommutative_operator): Check the availability of barrel
11982         shifter option.
11984 2018-04-09  Richard Biener  <rguenther@suse.de>
11986         PR tree-optimization/85284
11987         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
11988         Only use the niter constraining form of simple_iv when the exit
11989         is always executed.
11991 2018-04-09  Tom de Vries  <tom@codesourcery.com>
11993         PR target/84041
11994         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11995         (define_expand "*memory_barrier"): New define_expand.
11996         (define_insn "memory_barrier"): New insn.
11998 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12000         PR rtl-optimization/80463
12001         PR rtl-optimization/83972
12002         PR rtl-optimization/83480
12004         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12005         correct producer for the insn.
12006         (tidy_control_flow): Fixup seqnos in case of debug insns.
12008 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12010         PR rtl-optimization/83913
12012         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12013         different sched-times when merging exprs.
12015 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12017         PR rtl-optimization/83962
12019         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12020         tidy_fallthru_edge and tidy_control_flow.
12022 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
12024         PR rtl-optimization/83530
12026         * sel-sched.c (force_next_insn): New global variable.
12027         (remove_insn_for_debug): When force_next_insn is true, also leave only
12028         next insn in the ready list.
12029         (sel_sched_region): When the region wasn't scheduled, make another pass
12030         over it with force_next_insn set to 1.
12032 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
12034         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12035         into tm_file.
12036         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12037         for interrupt control.
12038         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12039         functions for interrupt control.
12040         * config/nds32/nds32-intrinsic.md: Likewise.
12041         * config/nds32/nds32_intrinsic.h: Likewise.
12042         * config/nds32/nds32.h (nds32_builtins): Likewise.
12044 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
12046         * config/nds32/nds32.c (nds32_init_machine_status,
12047         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
12048         strict_aligned_p field.
12049         (nds32_expand_to_rtl_hook): New function.
12050         (TARGET_EXPAND_TO_RTL_HOOK): Define.
12051         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
12053 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12054             Chung-Ju Wu  <jasonwucj@gmail.com>
12056         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
12057         * config/nds32/nds32-n7.md: New file.
12058         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
12059         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
12060         pipeline.
12061         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
12062         * config/nds32/nds32.md (pipeline_model): Add n7.
12063         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
12064         * config/nds32/pipelines.md: Include n7 settings.
12066 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12067             Chung-Ju Wu  <jasonwucj@gmail.com>
12069         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
12070         * config/nds32/nds32-e8.md: New file.
12071         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
12072         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
12073         pipeline.
12074         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
12075         * config/nds32/nds32.md (pipeline_model): Add e8.
12076         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
12077         * config/nds32/pipelines.md: Include e8 settings.
12079 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12080             Chung-Ju Wu  <jasonwucj@gmail.com>
12082         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
12083         * config/nds32/nds32-n8.md: New file.
12084         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
12085         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
12086         pipeline.
12087         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
12088         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
12089         * config/nds32/nds32.md (pipeline_model): Add n8.
12090         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
12091         * config/nds32/pipelines.md: Include n8 settings.
12093 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
12094             Chung-Ju Wu  <jasonwucj@gmail.com>
12096         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
12097         * config/nds32/nds32-n9-2r1w.md: New file.
12098         * config/nds32/nds32-n9-3r2w.md: New file.
12099         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
12100         nds32_register_ports): New or modify for cpu n9.
12101         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
12102         pipeline.
12103         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
12104         * config/nds32/nds32-utils.c: New file.
12105         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
12106         TARGET_MUL_SLOW): Define.
12107         * config/nds32/nds32.md (pipeline_model): New attribute.
12108         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
12109         New options that support cpu n9.
12110         * config/nds32/pipelines.md: Include n9 settings.
12111         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
12113 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
12115         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
12116         information if necessary.
12117         (output_cond_branch_compare_zero): Likewise.
12118         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
12119         (nds32_target_alignment): Refine for alignment.
12120         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
12121         (FUNCTION_BOUNDARY): Modify.
12122         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
12123         align case.
12124         * config/nds32/nds32.opt (malways-align, malign-functions): New.
12126 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
12128         * config/nds32/constants.md (unspec_volatile_element): Add values for
12129         TLB operation and data prefetch.
12130         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12131         functions for TLB operation and data prefetch.
12132         * config/nds32/nds32-intrinsic.md: Likewise.
12133         * config/nds32/nds32_intrinsic.h: Likewise.
12134         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
12135         (nds32_print_operand): Likewise.
12136         * config/nds32/nds32.h (nds32_builtins): Likewise.
12138 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
12139         Andrew Pinski <pinsika@gcc.gnu.org>
12141         PR middle-end/82976
12142         * match.pd: Use constant_boolean_node of correct type instead of
12143         boolean_true_node or boolean_false_node for simplifying
12144         pointer comparisons to zero.
12146 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
12148         PR tree-optimization/80021
12149         * tree.c (verify_type_variant): Make error call in verify_variant_match
12150         translatable and remove final full stop.
12152 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12154         * config/nds32/constants.md (unspec_volatile_element): Add
12155         UNSPEC_VOLATILE_EH_RETURN.
12156         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
12157         nds32_output_stack_pop): Support dwarf exception handling process.
12158         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
12159         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
12160         exception handling process.
12161         (nds32_compute_stack_frame): Likewise.
12162         (nds32_return_addr_rtx): Likewise.
12163         (nds32_initial_elimination_offset): Likewise.
12164         (nds32_expand_prologue): Likewise.
12165         (nds32_expand_epilogue): Likewise.
12166         (nds32_dynamic_chain_address): New function.
12167         * config/nds32/nds32.h (machine_function): Add fields for dwarf
12168         exception handling.
12169         (DYNAMIC_CHAIN_ADDRESS): Define.
12170         (EH_RETURN_DATA_REGNO): Define.
12171         (EH_RETURN_STACKADJ_RTX): Define.
12172         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
12173         patterns for dwarf exception handling.
12175 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12177         * config/nds32/nds32.h: Clean up obsolete macros.
12179 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12181         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12182         Add enum values for particular instructions.
12183         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12184         particular intrinsic functions.
12185         * config/nds32/nds32-intrinsic.md: Likewise.
12186         * config/nds32/nds32_intrinsic.h: Likewise.
12187         * config/nds32/nds32.h (nds32_builtins): Likewise.
12188         * config/nds32/nds32.md (type): Add pbsad and pbsada.
12189         (btst, ave): New patterns for particular instructions.
12191 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12193         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12194         Add enum values for atomic load/store and memory sync.
12195         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
12196         and memory sync.
12197         * config/nds32/nds32-intrinsic.md: Likewise.
12198         * config/nds32/nds32_intrinsic.h: Likewise.
12199         * config/nds32/nds32.h (nds32_builtins): Likewise.
12201 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
12203         PR tree-optimization/85257
12204         * fold-const.c (native_encode_vector): If not all elts could fit
12205         and off is -1, return 0 rather than offset.
12206         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
12207         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
12208         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
12209         adjust buffer in native_interpret_expr call.
12211 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12213         * config/nds32/constants.md (unspec_volatile_element): Add cache
12214         control enum values.
12215         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
12216         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
12217         * config/nds32/nds32.c (nds32_cctl_names): New.
12218         (nds32_print_operand): Handle cache control register names.
12219         * config/nds32/nds32.h (nds32_builtins): New enum values.
12220         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
12221         macros.
12222         * config/nds32/nds32.md (type): Add mmu.
12223         * config/nds32/pipelines.md (simple_insn): Add mmu.
12225 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12227         * config/nds32/nds32.md (type): Remove call.
12228         * config/nds32/pipelines.md (simple_insn): Likewise.
12230 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12232         * config/nds32/constants.md (unspec_volatile_element): Add
12233         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
12234         UNSPEC_VOLATILE_FMFCFG.
12235         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
12236         description for fmfcfg and fmfcsr.
12237         (bdesc_1arg): Add fmtcsr.
12238         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
12239         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
12240         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
12241         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
12242         unspec_fmfcfg): New patterns.
12243         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
12244         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
12245         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
12246         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
12247         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
12248         __nds32__fmfcfg): Define.
12250 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
12252         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
12253         intrinsic register names.
12254         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
12255         intrinsic register enum values and macros.
12257 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12259         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
12260         for load/store addressing form.
12261         (nds32_print_operand_address): Likewise.
12263 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
12265         PR target/85196
12266         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
12267         based on LABEL_REF.  Remove useless assertion.
12268         (pic_address_needs_scratch): Fix formatting.
12269         (sparc_legitimize_pic_address): Minor tweaks.
12270         (sparc_delegitimize_address): Adjust assertion accordingly.
12271         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
12272         into symbolic_operand.
12273         (movsi_high_pic_label_ref): Likewise.
12274         (movsi_lo_sum_pic_label_ref): Likewise.
12275         (movdi_pic_label_ref): Likewise.
12276         (movdi_high_pic_label_ref): Likewise.
12277         (movdi_lo_sum_pic_label_ref): Likewise.
12279 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
12281         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
12282         custom LIB_SPEC setup.
12284 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
12285             Kito Cheng  <kito.cheng@gmail.com>
12287         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
12288         * config/riscv/freebsd.h: New.
12290 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
12292         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
12293         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
12294         file.
12296 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
12297             Kito Cheng  <kito.cheng@gmail.com>
12299         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
12300         nds32_output_call, nds32_symbol_binds_local_p): New functions.
12301         * config/nds32/nds32-protos.h (nds32_output_call,
12302         nds32_output_return): Declare.
12303         * config/nds32/nds32.md: Refine all the call and return patterns.
12305 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
12307         PR debug/85252
12308         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
12309         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
12311         PR rtl-optimization/84872
12312         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
12313         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
12314         EDGE_CROSSING edge.
12316 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
12318         * expr.c (copy_blkmode_to_reg): Revert 254862.
12319         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
12321 2018-04-06  Richard Biener  <rguenther@suse.de>
12323         PR middle-end/85244
12324         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
12325         after seeing a component reference with an adjacent field.  Treat
12326         refs to arrays at struct end of external decls similar to
12327         refs to unconstrained commons.
12329 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
12331         PR sanitizer/85213
12332         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
12333         look through SAVE_EXPRs with non-side-effects argument.  Adjust
12334         recursive calls.
12335         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
12336         save_p here.
12338 2018-04-06  Richard Biener  <rguenther@suse.de>
12340         PR middle-end/85180
12341         * alias.c (find_base_term): New wrapper around find_base_term
12342         unwinding CSELIB_VAL_PTR changes.
12343         (find_base_term): Do not restore CSELIB_VAL_PTR during the
12344         recursion.
12346 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12348         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
12349         instructions.
12350         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
12351         constant definitions.
12352         ("nop"): lr 0,0 -> nopr r0
12353         ("nop_lr0", "nop_lr1"): New insn definitions.
12355 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
12357         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
12358         NDS32_V3PUSH_AVAILABLE_P macro.
12360 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
12361             Chung-Ju Wu  <jasonwucj@gmail.com>
12363         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
12364         (nds32*-*-*): Add float and fpu_config into supported_defaults.
12365         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
12366         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
12367         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
12368         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
12369         * config/nds32/constraints.md: New constraints and checking for hard
12370         float configuration.
12371         * config/nds32/iterators.md: New mode iterator and attribute for hard
12372         float configuration.
12373         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
12374         patterns.
12375         * config/nds32/nds32-fpu.md: New file.
12376         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
12377         deal with hard float code generation.
12378         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
12379         ARCH_V3S.
12380         (abi_type, float_reg_number): New enum type.
12381         * config/nds32/nds32-predicates.c: New predicates for hard float.
12382         * config/nds32/nds32-protos.h: Declare functions for hard float.
12383         * config/nds32/nds32.c: Implementation for hard float configuration.
12384         * config/nds32/nds32.h: Definitions for hard float configuration.
12385         * config/nds32/nds32.md: Include hard float machine description and
12386         modify patterns for hard float configuration.
12387         * config/nds32/nds32.opt: New options for hard float configuration.
12388         * config/nds32/predicates.md: New predicates for hard float
12389         configuration.
12391 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
12393         * common/config/nds32/nds32-common.c
12394         (nds32_option_optimization_table): Enable -mreleax-hint by default.
12396 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
12398         PR middle-end/85195
12399         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12400         CONSTRUCTOR_ELT (ctor, ...)->value.
12402 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
12404         PR target/85193
12405         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12407 2018-04-05  Tom de Vries  <tom@codesourcery.com>
12409         PR target/85204
12410         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12411         cond jump.
12413 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
12414             Kito Cheng  <kito.cheng@gmail.com>
12416         * config/nds32/constraints.md (U33): Fine-tune checking condition.
12417         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12418         * config/nds32/nds32.h (nds32_16bit_address_type): Add
12419         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12421 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
12422             Kito Cheng  <kito.cheng@gmail.com>
12424         * config/nds32/constraints.md (Ufe): New memory constraint.
12425         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12426         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12427         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12428         operands.
12429         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12430         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12432 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12434         * config/nds32/nds32.md: Use optimize_size in the condition for
12435         alu-shift instructions.
12437 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12439         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
12441 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12443         * config/nds32/nds32.md (negsi2): Refine pattern.
12445 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
12446             Chung-Ju Wu  <jasonwucj@gmail.com>
12448         * config/nds32/iterators.md (shift_rotate): New code iterator.
12449         (shift): New code attribute.
12450         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
12451         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
12452         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
12453         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
12454         bit-wise operations.
12455         (andsi3, *andsi3): Ditto.
12456         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
12457         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
12458         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
12459         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
12460         nds32_ior_operand, nds32_xor_operand): New predicates.
12462 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12464         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
12465         (addsi3, subsi3): ... this.
12467 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12469         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
12471 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12473         * config/nds32/nds32.md: Adjust indention.
12475 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
12477         * config/nds32/nds32.md (feature): New attribute.
12479 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12481         * config/nds32/nds32.md (subtype): New attribute.
12483 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12485         PR target/85203
12486         * config/arm/arm-builtins.c (arm_expand_builtin): Change
12487         expansion to perform a bitwise AND of the argument followed by a
12488         boolean negation of the result.
12490 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
12492         PR rtl-optimization/84878
12493         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
12494         the basic block.  Assert the use reference is not artificial and that
12495         it has an associated insn.
12497 2018-04-04  Michael Matz  <matz@suse.de>
12499         * builtins.c (compute_objsize): Pass correct operand
12500         to array_at_struct_end_p.
12502 2018-04-04  Richard Biener  <rguenther@suse.de>
12504         PR lto/85176
12505         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
12506         from contexts for DINFO_LEVEL_TERSE and below.
12508 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
12510         * config/nds32/nds32-doubleword.md (move_<mode>): Require
12511         resiter_operand condition.
12512         * config/nds32/nds32.md (*move<mode>): Ditto.
12514 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
12515             Monk Chiang  <sh.chiang04@gmail.com>
12517         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
12519 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
12521         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
12523 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
12524             Kito Cheng  <kito.cheng@gmail.com>
12526         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
12527         nds32_cond_code_str, output_cond_branch,
12528         output_cond_branch_compare_zero, nds32_expand_cbranch,
12529         nds32_expand_cstore, nds32_expand_movcc,
12530         nds32_output_cbranchsi4_equality_zero,
12531         nds32_output_cbranchsi4_equality_reg,
12532         nds32_output_cbranchsi4_equality_reg_or_const_int,
12533         nds32_output_cbranchsi4_greater_less_zero: New functions.
12534         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
12535         nds32_expand_cstore, nds32_expand_movcc,
12536         nds32_output_cbranchsi4_equality_zero,
12537         nds32_output_cbranchsi4_equality_reg,
12538         nds32_output_cbranchsi4_equality_reg_or_const_int,
12539         nds32_output_cbranchsi4_greater_less_zero): Declare.
12540         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
12541         nds32_rimm11s_operand): New predicates.
12542         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
12543         * config/nds32/nds32.md: Rewrite all the branch and conditional move
12544         patterns.
12546 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
12548         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
12549         * config/nds32/nds32.md: Ditto.
12550         * config/nds32/pipelines.md: Ditto.
12552 2018-04-04  Richard Biener  <rguenther@suse.de>
12554         PR tree-optimization/85168
12555         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12556         propagating abnormals.
12558 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
12560         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12562 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
12563             Kito Cheng  <kito.cheng@gmail.com>
12565         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12566         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12567         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12568         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
12569         * config/nds32/nds32.md (sibcall_internal): New.
12570         (sibcall_register): Remove.
12571         (sibcall_immediate): Remove.
12572         (sibcall_value_internal): New.
12573         (sibcall_value_register): Remove.
12574         (sibcall_value_immediate): Remove.
12575         * config/nds32/predicates.md (nds32_general_register_operand): New.
12576         (nds32_call_address_operand): New.
12578 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
12580         PR rtl-optimization/85167
12581         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
12582         bb_defs if *split_p, instead preinitialize it to NULL.
12584         PR tree-optimization/85156
12585         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
12586         evaluating the argument multiple times.
12588 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
12590         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
12591         than vector.
12592         (_mm_cvtpd_ps): Likewise.
12593         (_mm_cvttpd_epi32): Likewise.
12594         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
12595         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
12596         vector, pixel, and bool following altivec.h include.
12598 2018-04-03  Martin Sebor  <msebor@redhat.com>
12600         * doc/extend.texi (Common Function Attributes): Clarify.
12601         (const attribute): Likewise.
12602         (pure attribute): Likewise.
12604 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
12606         PR target/85169
12607         * config/i386/i386.c (ix86_expand_vector_set): Use
12608         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
12610 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
12612         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
12613         instructions when changing rounding bits to preserve precision bits
12614         in the x87 control word.
12616 2018-04-03  Martin Liska  <mliska@suse.cz>
12618         PR tree-optimization/82491
12619         * rtl.h (strip_offset_and_add): Replace += suboffset with
12620         poly_uint64 () + suboffset.
12622 2018-03-29  Martin Liska  <mliska@suse.cz>
12623             Martin Jambor  <mjambor@suse.cz>
12625         PR ipa/84947
12626         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
12627         param_type is not an integral or pointer type.
12629 2018-04-03  Richard Biener  <rguenther@suse.de>
12631         * sese.h (recompute_all_dominators): Remove.
12633 2018-04-02  Martin Sebor  <msebor@redhat.com>
12635         * doc/invoke.texi (-Wrestrict): Fix typos.
12637 2018-04-02  Jim Wilson  <jimw@sifive.com>
12639         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12640         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12641         (<optab>di3, <optab>si3_extend): Likewise.
12642         (<optab>si3_mask, <optab>si3_mask_1): New.
12643         (<optab>di3_mask, <optab>di3_mask_1): New.
12644         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12645         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12646         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12648 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
12650         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12651         example.
12653 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
12655         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12656         (nds32_canonicalize_comparison): New function.
12658 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
12659             Kito Cheng  <kito.cheng@gmail.com>
12660             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
12662         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12663         * config/nds32/constants.md (unspec_volatile_element): Add
12664         UNSPEC_VOLATILE_RELAX_GROUP.
12665         * config/nds32/nds32-relax-opt.c: New file.
12666         * config/nds32/nds32-predicates.c
12667         (nds32_symbol_load_store_p): New function.
12668         * config/nds32/nds32-protos.h
12669         (nds32_symbol_load_store_p): Declare function.
12670         (make_pass_nds32_relax_opt): Declare new rtl pass function.
12671         * config/nds32/nds32.c
12672         (nds32_register_pass): New function to register pass.
12673         (nds32_register_passes): New function to register passes.
12674         * config/nds32/nds32.md (relax_group): New pattern.
12675         * config/nds32/nds32.opt (mrelax-hint): New option.
12676         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12678 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
12680         * config/nds32/t-nds32: Modify files dependency.
12682 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
12684         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12685         (PROFILE_HOOK): Define its implementation.
12687 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
12689         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12690         type and 32-bit size.
12692 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
12694         PR middle-end/85090
12695         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12696         (V_128_256): New mode iterator.
12697         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12698         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12699         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12700         of V.
12701         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12702         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12704 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
12706         PR target/83315
12707         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12708         NaN inputs correctly.
12710 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
12712         PR target/80546
12713         * config/rs6000/vsx.md (??r): New mode attribute.
12714         (*vsx_mov<mode>_64bit): Use it.
12715         (*vsx_mov<mode>_32bit): Likewise.
12717 2018-03-30  Martin Sebor  <msebor@redhat.com>
12719         PR tree-optimization/84818
12720         * builtins.c (check_access): Use warning_n.
12722 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12724         PR target/83822
12725         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12726         condition.
12727         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12728         condition.
12730 2018-03-30  Julia Koval  <julia.koval@intel.com>
12732         PR target/84413
12733         * x86-tune.def (movx, partial_reg_dependency): Enable for
12734         m_SKYLAKE_AVX512.
12736 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
12738         PR inline-asm/84985
12739         * lra-constraints.c (process_alt_operands): Move setting
12740         this_alternative_matches below.
12742 2018-03-29  Martin Liska  <mliska@suse.cz>
12744         PR lto/84995.
12745         * doc/invoke.texi: Document how LTO works with debug info.
12746         Describe auto-load support of binutils.  Mention 'x86-64'
12747         as valid option value of -march option.
12749 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
12751         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12753         PR c/85094
12754         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12755         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12756         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12757         checking.
12759 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
12761         PR target/84912
12762         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12763         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12764         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12765         for RS6000_BTM_POWERPC64.
12766         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12767         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12768         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12769         definition.
12770         (DIVDE): Use it.
12771         (DIVDEU): Likewise.
12773 2018-03-28 Carl Love  <cel@us.ibm.com>
12775         Revert
12776         2017-09-27  Carl Love  <cel@us.ibm.com>
12778         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12779         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12780         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12781         fctiw instruction.
12783 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12785         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12786         instead of __vector bool.
12787         (_mm_max_pu8): Likewise.
12788         (_mm_min_pi16): Likewise.
12790 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
12792         PR target/84912
12793         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12794         (DIVWEUO): Likewise.
12795         (DIVDEO): Likewise.
12796         (DIVDEUO): Likewise.
12797         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12798         DIVWEUO and DIVDEUO.
12799         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12800         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12801         (div_extend): Likewise.
12802         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12803         builtin function.
12804         (__builtin_divweuo): Likewise.
12805         (__builtin_divdeo): Likewise.
12806         (__builtin_divdeuo): Likewise.
12808 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
12810         PR target/85095
12811         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12812         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12814         PR tree-optimization/82004
12815         * gimple-match-head.c (optimize_pow_to_exp): New function.
12816         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12817         Don't fold to exp if optimize_pow_to_exp is false.
12819 2018-03-28  Martin Liska  <mliska@suse.cz>
12821         PR other/84819
12822         * calls.c (initialize_argument_information): Fix trailing space.
12823         * common.opt: Fix typo and provide better explanation for
12824         -fsanitize-coverage option.
12825         * config/i386/i386.opt: Fix typo.
12827 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
12828             Martin Liska  <mliska@suse.cz>
12830         PR sanitizer/85081
12831         * gimplify.c (asan_poison_variable): Don't do the check for
12832         gimplify_omp_ctxp here.
12833         (gimplify_decl_expr): Do it here.
12834         (gimplify_target_expr): Likewise.
12836 2018-03-28  Martin Liska  <mliska@suse.cz>
12838         PR target/84988
12839         * config/i386/i386.c (ix86_function_arg_advance): Do not call
12840         chkp_type_bounds_count if MPX is not enabled.
12842 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
12844         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12846 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
12848         PR target/84914
12849         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12850         function to create the function decl for complex long double
12851         multiply and divide for -mabi=ieeelongdouble.
12852         (init_float128_ieee): Call it.
12854 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
12856         PR target/85044
12857         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12858         -fcf-protection=branch -mibt.
12859         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12861 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12863         PR target/81863
12864         * config/arm/arm.c (arm_valid_symbolic_address): Handle
12865         arm_word_relocations.
12867 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
12869         PR target/85056
12870         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12871         extern array declarations.
12873 2018-03-27  Richard Biener  <rguenther@suse.de>
12875         PR middle-end/84067
12876         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12877         explicit single_use checks.
12879 2018-03-27  Richard Biener  <rguenther@suse.de>
12881         PR tree-optimization/85082
12882         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12883         Valueize the VUSE.
12885 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12887         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12888         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12889         Turn on fasynchronous-unwind-tables and funwind-tables.
12891 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
12893         PR target/85073
12894         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12895         (*bmi_blsr_<mode>_ccz): Ditto.
12897 2018-03-26  Tom de Vries  <tom@codesourcery.com>
12899         PR tree-optimization/85063
12900         * omp-general.c (offloading_function_p): New function.  Factor out
12901         of ...
12902         * omp-offload.c (pass_omp_target_link::gate): ... here.
12903         * omp-general.h (offloading_function_p): Declare.
12904         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12905         with attribute omp declare target for offloading functions.
12907 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
12909         PR tree-optimization/84005
12910         * tree-data-ref.h (get_base_for_alignment): Declare.
12911         * tree-data-ref.c (get_base_for_alignment_1): New function.
12912         (get_base_for_alignment): Likewise.
12913         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12914         get_base_for_alignment to find a suitable base object, instead
12915         of always using drb->base_address.
12917 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
12919         PR inline-asm/85022
12920         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12921         known size by default.
12923 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
12925         PR inline-asm/85030
12926         * lra-constraints.c (process_alt_operands): Don't match BLKmode
12927         and non BLKmode operands.
12929 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12931         PR target/85026
12932         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12933         Clean up attributes.
12935 2018-03-23  Richard Biener  <rguenther@suse.de>
12937         PR debug/85020
12938         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12939         we are going to emit early debug for LTO.
12941 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
12943         PR inline-asm/85034
12944         * function.c (match_asm_constraints_1): Don't optimize if input
12945         doesn't satisfy general_operand predicate for output's mode.
12947         PR inline-asm/85022
12948         * alias.c (write_dependence_p): Don't require for x_canonicalized
12949         non-VOIDmode if x has VOIDmode.
12951         PR sanitizer/85029
12952         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12953         just don't try to optimize it rather than assert it never happens.
12955 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12957         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12958         macro expansions for definition of ST_INTERNAL_<mode> and
12959         LD_INTERNAL_<mode> builtins.
12960         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12961         Remove prototype.
12962         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12963         function.
12964         (altivec_expand_st_builtin): Likewise.
12965         (altivec_expand_builtin): Remove calls to deleted functions.
12966         (rs6000_address_for_altivec): Delete this function.
12967         * config/rs6000/vector.md: Remove expands for
12968         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12970 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
12972         PR target/84826
12973         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12974         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12975         re-computing once computed.
12976         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
12977         (arm_init_machine_status): Initialize
12978         machine->static_chain_stack_bytes.
12980 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12982         PR target/84760
12983         * doc/extend.texi: Add four new prototypes for vec_ld.
12984         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
12985         definitions for more logical presentation.
12986         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
12987         entries for V1TI variants of __builtin_altivec_ld builtin.
12988         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
12989         handling of V1TI variant of LVX icode pattern.
12990         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
12991         (rs6000_gimple_fold_builtin): Likewise.
12992         (altivec_init_builtins): Add code to define
12993         __builtin_altivec_lvx_v1ti function.
12995 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
12997         PR inline-asm/84941
12998         * function.c (match_asm_constraints_1): Don't do the optimization
12999         if input isn't a REG, SUBREG, MEM or constant.
13001 2018-03-22  Tom de Vries  <tom@codesourcery.com>
13003         PR tree-optimization/84956
13004         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13005         bb_has_abnormal_pred.
13007 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
13009         PR sanitizer/85018
13010         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13011         DECL_INITIAL (decl) to decl at the end.
13012         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13013         adjust the comment.
13015 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
13017         * doc/extend.texi (__builtin_tgmath): Document when complex
13018         integer types are treated as _Complex _Float64.
13020 2018-03-21  Tom de Vries  <tom@codesourcery.com>
13022         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13024 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13026         PR tree-optimization/84960
13027         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13028         if it is ENTRY block, move them into single succ of ENTRY in that case.
13030 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
13032         PR tree-optimization/84811
13033         * poly-int.h (poly_span_traits): Remove the T3 parameter and
13034         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13035         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13036         (known_subrange_p): Update accordingly.  Cast each value involved
13037         in the size comparison, rather than casting the result of the
13038         subtraction.
13040 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13042         PR tree-optimization/84982
13043         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
13044         by flipping the least significant bit rather than all bits from
13045         bitpos to bitpos + bitsize - 1.
13047 2018-03-21  Nathan Sidwell  <nathan@acm.org>
13049         * doc/extend.texi (Deprecated Features): Remove mention of
13050         long-deleted deprecations.
13052 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13054         PR jit/84288
13055         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
13056         * configure: Regenerate.
13058 2018-03-21  Tom de Vries  <tom@codesourcery.com>
13060         PR tree-optimization/83126
13061         * tree-parloops.c (num_phis): New function.
13062         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
13064 2018-03-21  Nathan Sidwell  <nathan@acm.org>
13066         * doc/extend.texi (Deprecated Features): Update deprecated flags,
13067         mention anon-struct/union members and trailing attributes.
13069 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
13071         PR tree-optimization/84969
13072         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
13073         builtin memset partitions if they set different rhs values.
13075 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
13077         PR rtl-optimization/84989
13078         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13079         VEC_DUPLICATE with scalar result mode.
13081 2018-03-21  Martin Liska  <mliska@suse.cz>
13083         PR ipa/84963
13084         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
13085         not intended return statement.
13087 2018-03-21  Martin Liska  <mliska@suse.cz>
13089         PR target/84988
13090         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
13091         (chkp_find_bound_slots_1): Limit number of iterations.
13093 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
13095         PR target/84838
13096         * Minor grammar fixes for x86 options.
13098 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13100         PR debug/84875
13101         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
13102         holding REG_CFA_RESTORE notes, instead turn them into a USE.
13104 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
13106         PR target/83789
13107         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
13108         (altivec_lvx_<mode>_1op): Likewise.
13109         (altivec_stvx_<mode>_2op): Likewise.
13110         (altivec_stvx_<mode>_1op): Likewise.
13111         (altivec_lvx_<VM2:mode>): New define_expand.
13112         (altivec_stvx_<VM2:mode>): Likewise.
13113         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
13114         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13115         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
13116         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13117         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
13118         (rs6000_gen_lvx): Likewise.
13119         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
13120         (altivec_expand_stv_builtin): Likewise.
13121         (altivec_expand_builtin): Likewise.
13122         * config/rs6000/vector.md: Likewise.
13124 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13126         PR target/82518
13127         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
13128         BYTES_BIG_ENDIAN.
13130 2018-03-20  Richard Biener  <rguenther@suse.de>
13132         PR target/84986
13133         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
13134         sign-conversions as zero, fall back to standard scalar_stmt
13135         cost for the rest.
13137 2018-03-20  Martin Liska  <mliska@suse.cz>
13139         PR ipa/84825
13140         * predict.c (rebuild_frequencies): Handle case when we have
13141         PROFILE_ABSENT, but flag_guess_branch_prob is false.
13143 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13145         PR target/84990
13146         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
13147         flag_section_anchors.
13148         * varasm.c (use_blocks_for_decl_p): Remove hack for
13149         dw2_force_const_mem.
13151         PR target/84845
13152         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
13153         to ...
13154         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
13155         be created, use lowpart_subreg of operands[0] rather than operands[0]
13156         itself.
13157         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
13158         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
13159         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
13160         and n constraint instead of aarch64_shift_imm_di and Usd.
13161         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
13162         (*aarch64_<optab>_reg_minus<mode>3): ... this.
13164 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
13166         PR target/82989
13167         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
13168         to favor GPR over NEON registers.
13169         (<shift>di3_neon): Likewise.
13171 2018-03-20  Tom de Vries  <tom@codesourcery.com>
13173         PR target/84952
13174         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
13175         (nvptx_process_pars): Emit bar.sync asap and alap.
13177 2018-03-20  Tom de Vries  <tom@codesourcery.com>
13179         PR target/84954
13180         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
13181         seen_label if seen_label is already set.
13183 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
13185         PR target/84945
13186         * config/i386/i386.c (fold_builtin_cpu): For features above 31
13187         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
13188         Use 1U instead of 1.  Formatting fixes.
13190         PR c/84953
13191         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
13192         instead of TREE_TYPE (s1) for the return value.
13194 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
13196         PR tree-optimization/84946
13197         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
13198         bitsize + bitsize in poly_uint64 rather than poly_int64.
13200         PR sanitizer/78651
13201         * dwarf2asm.c: Include fold-const.c.
13202         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
13203         of decl rather than decl itself.
13205         PR rtl-optimization/84643
13206         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
13208 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
13210         PR sanitizer/78651
13211         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
13212         calling assemble_variable.
13214 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
13216         PR target/81647
13217         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
13218         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
13220 2018-03-19  Jim Wilson  <jimw@sifive.com>
13222         PR bootstrap/84856
13223         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
13224         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
13225         (riscv_first_stack_step): Likewise.
13226         (riscv_option_override): Use STACK_BOUNDARY instead of
13227         MIN_STACK_BOUNDARY.
13228         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
13229         MIN_STACK_BOUNDARY.
13230         (BIGGEST_ALIGNMENT): Set to 128.
13231         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
13232         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
13233         STACK_BOUNDARY.
13235 2018-03-19  Richard Biener  <rguenther@suse.de>
13237         PR tree-optimization/84933
13238         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
13239         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
13241 2018-03-19  Richard Biener  <rguenther@suse.de>
13243         PR tree-optimization/84859
13244         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
13245         (cond_if_else_store_replacement): Perform sinking operation on
13246         single-store BBs regardless of MAX_STORES_TO_SINK setting.
13247         Generalize what a BB with a single eligible store is.
13249 2018-03-19  Richard Biener  <rguenther@suse.de>
13251         PR tree-optimization/84929
13252         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
13253         chrec_is_positive against non-chrec arg.
13255 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
13257         PR target/84711
13258         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
13260 2018-03-18  Martin Liska  <mliska@suse.cz>
13262         PR rtl-optimization/84635
13263         * regrename.c (build_def_use): Use matches_mode only when
13264         matches >= 0.
13266 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
13268         PR tree-optimization/84913
13269         * tree-vect-loop.c (vectorizable_reduction): Don't try to
13270         vectorize chains of COND_EXPRs.
13272 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13274         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
13276 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13278         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
13280 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13282         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
13284 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
13285             Kito Cheng  <kito.cheng@gmail.com>
13287         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
13288         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
13289         (nds32_adjust_reg_alloc_order): New function.
13290         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
13292 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
13294         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
13295         nds32_print_operand, nds32_print_operand_address): Use
13296         HOST_WIDE_INT_PRINT_DEC instead.
13298 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
13300         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
13302 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
13304         PR target/84902
13305         * config/i386/i386.c (initial_ix86_tune_features,
13306         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
13307         unsigned long long.
13308         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
13309         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
13310         rather than 1u << ix86_tune.  Formatting fix.
13311         (ix86_option_override_internal): Change ix86_arch_mask from
13312         unsigned int to unsigned HOST_WIDE_INT, initialize to
13313         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
13314         (ix86_function_specific_restore): Likewise.
13316 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
13318         PR target/84899
13319         * postreload.c (reload_combine_recognize_pattern): Perform
13320         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
13321         truncate_int_for_mode the result for the destination's mode.
13323         PR c/84909
13324         * hsa-gen.c (mem_type_for_type): Fix comment typo.
13325         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
13326         Likewise.
13327         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13328         Likewise.
13330 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
13332         PR target/84876
13333         * lra-assigns.c (lra_split_hard_reg_for): Don't use
13334         regno_allocno_class_array and sorted_pseudos.
13335         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
13336         insns where regno is used.
13338 2018-03-16  Martin Liska  <mliska@suse.cz>
13340         PR ipa/84833
13341         * multiple_target.c (create_dispatcher_calls): Redirect
13342         reference in the symbol table.
13344 2018-03-16  Martin Liska  <mliska@suse.cz>
13346         PR ipa/84722
13347         * multiple_target.c (create_dispatcher_calls): Redirect also
13348         an alias.
13350 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
13352         PR c++/79937
13353         PR c++/82410
13354         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
13355         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
13356         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
13358 2018-03-16  Julia Koval  <julia.koval@intel.com>
13360         * doc/invoke.texi (Skylake Server): Add CLWB.
13361         Cannonlake): Remove CLWB.
13363 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
13365         PR tree-optimization/84841
13366         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
13367         1 << 3.
13368         (FLOAT_ONE_CONST_TYPE): Define.
13369         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
13370         (sort_by_operand_rank): Put entries with higher constant_type last
13371         rather than first to match comments.
13373 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
13375         * config/nios2/nios2.md (movsi_internal): Fix thinko in
13376         split predicate.
13378 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
13380         PR c++/79085
13381         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13382         check and use address of target always.
13384 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
13386         PR target/84574
13387         * config/i386/i386.c (indirect_thunk_needed): Update comments.
13388         (indirect_thunk_bnd_needed): Likewise.
13389         (indirect_thunks_used): Likewise.
13390         (indirect_thunks_bnd_used): Likewise.
13391         (indirect_return_needed): New.
13392         (indirect_return_bnd_needed): Likewise.
13393         (output_indirect_thunk_function): Add a bool argument for
13394         function return.
13395         (output_indirect_thunk_function): Don't generate alias for
13396         function return thunk.
13397         (ix86_code_end): Call output_indirect_thunk_function to generate
13398         function return thunks.
13399         (ix86_output_function_return): Set indirect_return_bnd_needed
13400         and indirect_return_needed instead of indirect_thunk_bnd_needed
13401         and indirect_thunk_needed.
13403 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
13405         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13406         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13407         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13409 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
13410             Paul Hua <paul.hua.gm@gmail.com>
13412         PR c/84852
13413         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13415 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
13417         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13418         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13419         resp. SFmode cases.
13421 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
13423         PR target/84711
13424         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13425         instead of GET_MODE_SIZE when comparing Units.
13427 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
13429         PR target/68256
13430         * varasm.c (hash_section): Return an unchangeble hash value
13431         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13432         Return !aarch64_can_use_per_function_literal_pools_p ().
13434 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
13436         PR target/84860
13437         * optabs.c (emit_conditional_move): Pass address of cmode's copy
13438         rather than address of cmode as last argument to prepare_cmp_insn.
13440 2018-03-15  Julia Koval  <julia.koval@intel.com>
13442         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
13443         F_AVX512VNNI, F_AVX512BITALG): New.
13445 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
13447         PR target/83451
13448         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
13449         insn for floating-point loads and stores.
13451 2018-03-14  Carl Love  <cel@us.ibm.com>
13453         * config/rs6000/rs6000-c.c: Add macro definitions for
13454         ALTIVEC_BUILTIN_VEC_PERMXOR.
13455         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
13456         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
13457         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
13458         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
13459         UNSPEC_VPERMXOR.
13460         * config/doc/extend.texi: Add prototypes for vec_permxor.
13462 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
13464         PR c/84852
13465         * diagnostic-show-locus.c (class layout_point): Convert m_line
13466         from int to linenum_type.
13467         (line_span::comparator): Use linenum "compare" function when
13468         comparing line numbers.
13469         (test_line_span): New function.
13470         (layout_range::contains_point): Convert param "row" from int to
13471         linenum_type.
13472         (layout_range::intersects_line_p): Likewise.
13473         (layout::will_show_line_p): Likewise.
13474         (layout::print_source_line): Likewise.
13475         (layout::should_print_annotation_line_p): Likewise.
13476         (layout::print_annotation_line): Likewise.
13477         (layout::print_leading_fixits): Likewise.
13478         (layout::annotation_line_showed_range_p): Likewise.
13479         (struct line_corrections): Likewise for field m_row.
13480         (line_corrections::line_corrections): Likewise for param "row".
13481         (layout::print_trailing_fixits): Likewise.
13482         (layout::get_state_at_point): Likewise.
13483         (layout::get_x_bound_for_row): Likewise.
13484         (layout::print_line): Likewise.
13485         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
13486         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
13487         * input.c (selftest::test_linenum_comparisons): New function.
13488         (selftest::input_c_tests): Call it.
13489         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
13490         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
13491         * selftest.h (ASSERT_GT): New macro.
13492         (ASSERT_GT_AT): New macro.
13493         (ASSERT_LT): New macro.
13494         (ASSERT_LT_AT): New macro.
13496 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
13498         PR rtl-optimization/84780
13499         * combine.c (distribute_links): Don't make a link based on pc_rtx.
13501 2018-03-14  Martin Liska  <mliska@suse.cz>
13503         * tree.c (record_node_allocation_statistics): Use
13504         get_stats_node_kind.
13505         (get_stats_node_kind): New function extracted from
13506         record_node_allocation_statistics.
13507         (free_node): Use get_stats_node_kind.
13509 2018-03-14  Richard Biener  <rguenther@suse.de>
13511         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
13512         that the value-set of ANTIC_IN doesn't grow.
13514         Revert
13515         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13516         member.
13517         (BB_VISITED_WITH_VISITED_SUCCS): New define.
13518         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13520 2018-03-14  Julia Koval  <julia.koval@intel.com>
13522         * config.gcc (icelake-client, icelake-server): New.
13523         (icelake): Remove.
13524         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
13525         (initial_ix86_arch_features): Ditto.
13526         (PTA_SKYLAKE): Add SGX.
13527         (PTA_ICELAKE): Remove.
13528         (PTA_ICELAKE_CLIENT): New.
13529         (PTA_ICELAKE_SERVER): New.
13530         (ix86_option_override_internal): Split up icelake on icelake client and
13531         icelake server.
13532         (get_builtin_code_for_version): Ditto.
13533         (fold_builtin_cpu): Ditto.
13534         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
13535         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
13536         * config/i386/i386.h (processor_type): Ditto.
13537         * doc/invoke.texi: Ditto.
13539 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
13541         PR sanitizer/83392
13542         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
13543         INTEGER_CST offset, add it together with bitpos / 8 and
13544         sign extend based on POINTER_SIZE.
13546         PR target/84844
13547         Revert
13548         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
13550         PR target/78090
13551         * config/i386/constraints.md (Yc): New register constraint.
13552         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
13553         Use Yc constraint for alternative 2 of operand 0.  Remove
13554         preferred_for_speed attribute.
13556 2018-03-14  Richard Biener  <rguenther@suse.de>
13558         PR tree-optimization/84830
13559         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13560         with the old one to avoid oscillations.
13562 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
13564         PR target/83712
13565         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13566         pseudos.
13567         (assign_by_spills): Return a flag of reload assignment failure.
13568         Do not process the reload assignment failures.  Do not spill other
13569         reload pseudos if they has the same reg class.  Update n if
13570         necessary.
13571         (lra_assign): Add a return arg.  Set up from the result of
13572         assign_by_spills call.
13573         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13574         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
13575         usage_insns if it is not NULL.
13576         (spill_hard_reg_in_range): New function.
13577         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13578         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13579         function prototypes.
13580         (lra_assign): Change prototype.
13581         * lra.c (lra): Add code to deal with fails by splitting hard reg
13582         live ranges.
13584 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
13586         * config/riscv/riscv.opt (mrelax): New option.
13587         * config/riscv/riscv.c (riscv_file_start): Emit ".option
13588         "norelax" when riscv_mrelax is disabled.
13589         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
13591 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13593         PR target/84743
13594         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
13595         reassociation for int modes.
13597 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
13599         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
13600         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
13601         for big-endian.
13602         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
13603         * config/aarch64/aarch64-sve.md
13604         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
13605         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
13606         (*extend<mode><Vwide>2): Rename to...
13607         (aarch64_sve_extend<mode><Vwide>2): ...this.
13608         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
13609         renaming the old pattern to...
13610         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
13611         unsigned packs.
13612         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
13613         define_expand, renaming the old pattern to...
13614         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
13615         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
13616         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
13617         account when deciding which SVE instruction the optab should use.
13618         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
13620 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
13622         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
13623         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
13624         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
13625         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
13626         (tlsdesc_small_<mode>): Turn a define_expand and use
13627         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
13628         (tlsdesc_small_advsimd_<mode>): ...this.
13629         (tlsdesc_small_sve_<mode>): New pattern.
13631 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
13633         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13634         (UNSPEC_UMUL_HIGHPART): New constants.
13635         (MUL_HIGHPART): New int iteraor.
13636         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13637         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13638         define_expand.
13639         (*<su>mul<mode>3_highpart): New define_insn.
13641 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
13643         PR lto/84805
13644         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13645         incomplete types.
13647 2018-03-13  Martin Liska  <mliska@suse.cz>
13649         PR ipa/84658.
13650         * (sem_item_optimizer::sem_item_optimizer): Initialize new
13651         vector.
13652         (sem_item_optimizer::~sem_item_optimizer): Release it.
13653         (sem_item_optimizer::merge_classes): Register variable aliases.
13654         (sem_item_optimizer::fixup_pt_set): New function.
13655         (sem_item_optimizer::fixup_points_to_sets): Likewise.
13656         * ipa-icf.h: Declare new variables and functions.
13658 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
13660         PR middle-end/84834
13661         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13662         integer_pow2p@2 and test integer_pow2p in condition.
13663         (A < 0 ? C : 0): Similarly for @1.
13665         PR middle-end/84831
13666         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13667         characters starting at p contain '\0' character, don't look beyond
13668         that.
13670         PR target/84827
13671         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13672         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13674         PR target/84828
13675         * reg-stack.c (change_stack): Change update_end var from int to
13676         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13677         also call set_block_for_insn on the newly added insns and rescan.
13679         PR target/84786
13680         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13681         on the last operand.
13683         PR c++/84704
13684         * tree.c (stabilize_reference_1): Return save_expr (e) for
13685         STATEMENT_LIST even if it doesn't have side-effects.
13687 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
13689         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13691 2018-03-12  Renlin Li  <renlin.li@arm.com>
13693         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13694         aarch64_output_scalar_simd_mov_immediate.
13696 2018-03-12  Martin Sebor  <msebor@redhat.com>
13698         PR tree-optimization/83456
13699         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13700         for perfectly overlapping calls to memcpy.
13701         (gimple_fold_builtin_memory_chk): Same.
13702         (gimple_fold_builtin_strcpy): Handle no-warning.
13703         (gimple_fold_builtin_stxcpy_chk): Same.
13704         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13706 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
13708         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13709         parameter.  Use it for SFmode.
13710         (rs6000_function_arg_advance_1): Adjust.
13711         (rs6000_function_arg): Adjust.
13712         (rs6000_gimplify_va_arg): Pass false for that new parameter.
13714 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
13716         PR rtl-optimization/84169
13717         PR rtl-optimization/84780
13718         * combine.c (can_combine_p): Check for a 2-insn combination whether
13719         the destination register is used between the two insns, too.
13721 2018-03-12  Richard Biener  <rguenther@suse.de>
13723         PR tree-optimization/84803
13724         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13725         for refs DR analysis didn't process.
13727 2018-03-12  Richard Biener  <rguenther@suse.de>
13729         PR tree-optimization/84777
13730         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13731         force-vectorize loops ignore whether we are optimizing for size.
13733 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
13735         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13736         (TARGET_MD_ASM_ADJUST): Define.
13738 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
13739             Kito Cheng  <kito.cheng@gmail.com>
13740             Chung-Ju Wu  <jasonwucj@gmail.com>
13742         * config/nds32/nds32.c (nds32_compute_stack_frame,
13743         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13744         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13745         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13746         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13747         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13748         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13749         * config/nds32/nds32.md (prologue, epilogue): Use macro
13750         NDS32_V3PUSH_AVAILABLE_P to do checking.
13752 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
13754         PR debug/58150
13755         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13756         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13757         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
13758         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
13759         addition of most attributes on !orig_type_die or the attribute not
13760         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13762 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
13763             Chung-Ju Wu  <jasonwucj@gmail.com>
13765         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13766         __NDS32_VH__ macro.
13767         * config/nds32/nds32.opt (mvh): New option.
13769 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
13770             Chung-Ju Wu  <jasonwucj@gmail.com>
13772         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13773         function.
13774         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13775         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13776         definition.
13778 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
13779             Chung-Ju Wu  <jasonwucj@gmail.com>
13781         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13782         function.
13783         * config/nds32/nds32-multiple.md (strlensi): New pattern.
13784         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13786 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
13787             Kito Cheng  <kito.cheng@gmail.com>
13788             Chung-Ju Wu  <jasonwucj@gmail.com>
13790         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13791         UNSPEC_FFMISM and UNSPEC_FLMISM.
13792         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13793         for ffb, ffmism and flmism.
13794         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13795         (unspec_ffmism): Ditto.
13796         (unspec_flmism): Ditto.
13797         (nds32_expand_builtin_impl): Check if string extension is available.
13798         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13799         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13801 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
13803         Reverting patch:
13804         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
13806         PR target/83712
13807         * lra-assigns.c (assign_by_spills): Return a flag of reload
13808         assignment failure.  Do not process the reload assignment
13809         failures.  Do not spill other reload pseudos if they has the same
13810         reg class.
13811         (lra_assign): Add a return arg.  Set up from the result of
13812         assign_by_spills call.
13813         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13814         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
13815         usage_insns if it is not NULL.
13816         (spill_hard_reg_in_range): New function.
13817         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13818         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13819         function prototypes.
13820         (lra_assign): Change prototype.
13821         * lra.c (lra): Add code to deal with fails by splitting hard reg
13822         live ranges.
13824 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
13826         PR target/84807
13827         * config/i386/i386.opt: Replace Enforcment with Enforcement.
13829 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
13831         PR debug/84620
13832         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13833         (dw_val_node): Add val_symbolic_view.
13834         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13835         (symview_upper_bound): New.
13836         (new_line_info_table): Initialize symviews_since_reset.
13837         (dwarf2out_source_line): Count symviews_since_reset and set
13838         symview_upper_bound.
13839         (dw_val_equal_p): Handle symview.
13840         (add_AT_symview): New.
13841         (print_dw_val): Handle symview.
13842         (attr_checksum, attr_checksum_ordered): Likewise.
13843         (same_dw_val_p, size_of_die): Likewise.
13844         (value_format, output_die): Likewise.
13845         (add_high_low_attributes): Use add_AT_symview for entry_view.
13846         (dwarf2out_finish): Reset symview_upper_bound, clear
13847         zero_view_p.
13849 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
13851         PR target/83969
13852         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13853         Add strict argument and use it.
13854         (rs6000_split_multireg_move): Update for new strict argument.
13855         (mem_operand_gpr): Disallow all non-offsettable addresses.
13856         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13858 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
13860         PR target/84772
13861         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13862         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13863         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13865         PR c++/84767
13866         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13867         decl, use remap_type if we want to use the type.
13869 2018-03-09  Martin Sebor  <msebor@redhat.com>
13871         PR tree-optimization/84526
13872         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13873         Remove dead code.
13874         (builtin_access::generic_overlap): Be prepared to handle non-array
13875         base objects.
13877 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
13879         PR rtl-optimization/84682
13880         * lra-constraints.c (process_address_1): Check is_address flag
13881         for address constraints.
13882         (process_alt_operands): Likewise.
13883         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13884         preprocess_constraints.
13885         * recog.h (preprocess_constraints): Add oploc parameter.
13886         Adjust callers.
13887         * recog.c (preprocess_constraints): Test address_operand for
13888         CT_ADDRESS constraints.
13890 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
13892         PR target/83712
13893         * lra-assigns.c (assign_by_spills): Return a flag of reload
13894         assignment failure.  Do not process the reload assignment
13895         failures.  Do not spill other reload pseudos if they has the same
13896         reg class.
13897         (lra_assign): Add a return arg.  Set up from the result of
13898         assign_by_spills call.
13899         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13900         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
13901         usage_insns if it is not NULL.
13902         (spill_hard_reg_in_range): New function.
13903         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13904         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13905         function prototypes.
13906         (lra_assign): Change prototype.
13907         * lra.c (lra): Add code to deal with fails by splitting hard reg
13908         live ranges.
13910 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13912         PR target/83193
13913         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13914         Accept complain bool parameter.  Only emit errors if it is true.
13915         (arm_parse_cpu_option_name): Likewise.
13916         (arm_target_thumb_only): Adjust callers of the above.
13917         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13918         prototype to take a default true bool parameter.
13919         (arm_parse_arch_option_name): Likewise.
13921 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
13922             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
13924         PR jit/64089
13925         PR jit/84288
13926         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13927         * configure: Regenerate.
13928         * configure.ac ("linker --version-script option"): New.
13929         ("linker soname option"): New.
13931 2018-03-09  Richard Biener  <rguenther@suse.de>
13933         PR tree-optimization/84775
13934         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13935         immediate uses of predicate stmts and mark them modified.
13937         Revert
13938         PR tree-optimization/84178
13939         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13940         to caller.
13941         (version_loop_for_if_conversion): Delay update_ssa call.
13942         (tree_if_conversion): Delay update_ssa until after predicate
13943         insertion.
13945 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
13947         PR target/84763
13948         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13949         when the function accesses prior frames.
13951 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
13953         PR debug/84456
13954         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13955         gen_llsym, otherwise call maybe_gen_llsym.
13957         PR inline-asm/84742
13958         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13959         has ',' character inside of it.
13961 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13963         PR target/84748
13964         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13965         as clobbering CC_REGNUM.
13967 2018-03-08  Richard Biener  <rguenther@suse.de>
13969         PR middle-end/84552
13970         * tree-scalar-evolution.c: Include tree-into-ssa.h.
13971         (follow_copies_to_constant): Do not follow SSA names registered
13972         for update.
13974 2018-03-08  Richard Biener  <rguenther@suse.de>
13976         PR tree-optimization/84178
13977         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13978         to caller.
13979         (version_loop_for_if_conversion): Delay update_ssa call.
13980         (tree_if_conversion): Delay update_ssa until after predicate
13981         insertion.
13983 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
13985         PR tree-optimization/84178
13986         * tree-if-conv.c (release_bb_predicate): Remove the
13987         the assertion that the stmts have NULL use_ops.
13988         Discard the statements, asserting that they haven't
13989         yet been added to a BB.
13991 2018-03-08  Richard Biener  <rguenther@suse.de>
13993         PR tree-optimization/84746
13994         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
13995         (phi_translate): Pass in destination ANTIC_OUT set.
13996         (phi_translate_1): Likewise.  For a simplified result lookup
13997         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
13998         (phi_translate_set): Adjust.
13999         (do_pre_regular_insertion): Likewise.
14000         (do_pre_partial_partial_insertion): Likewise.
14002 2018-03-08  Martin Liska  <mliska@suse.cz>
14004         PR gcov-profile/84735
14005         * doc/gcov.texi: Document usage of profile files.
14006         * gcov-io.h: Document changes in the format.
14008 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
14010         PR debug/84404
14011         PR debug/84408
14012         * dwarf2out.c (struct dw_line_info_table): Update comments for
14013         view == -1.
14014         (FORCE_RESET_NEXT_VIEW): New.
14015         (FORCE_RESETTING_VIEW_P): New.
14016         (RESETTING_VIEW_P): Check for -1 too.
14017         (ZERO_VIEW_P): Likewise.
14018         (new_line_info_table): Force-reset next view.
14019         (dwarf2out_begin_function): Likewise.
14020         (dwarf2out_source_line): Simplify zero_view_p initialization.
14021         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14022         view directly.  Omit view when omitting .loc at line 0.
14024 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14026         PR tree-optimization/84740
14027         * tree-switch-conversion.c (process_switch): Call build_constructors
14028         only if info.phi_count is non-zero.
14030         PR tree-optimization/84739
14031         * tree-tailcall.c (find_tail_calls): Check call arguments against
14032         DECL_ARGUMENTS (current_function_decl) rather than
14033         DECL_ARGUMENTS (func) when checking for tail recursion.
14035 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
14037         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14038         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14039         Volker Reichelt's entry and add entries for people that perform
14040         GCC fuzzy testing and report numerous bugs.
14042 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
14044         PR target/82411
14045         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
14046         readonly data in sdata, if that is disabled.
14047         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
14048         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
14049         -mreadonly-in-sdata option.
14051 2018-03-07  Martin Sebor  <msebor@redhat.com>
14053         PR tree-optimization/84468
14054         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
14055         basic block when looking for nul assignment.
14057 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
14059         PR target/84277
14060         * except.h (output_function_exception_table): Adjust prototype.
14061         * except.c (output_function_exception_table): Remove FNNAME parameter
14062         and add SECTION parameter.  Ouput one part of the table at a time.
14063         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
14064         the first part of the exception table and emit unwind directives.
14065         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
14066         (i386_pe_seh_cold_init): Likewise.
14067         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
14068         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
14069         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
14070         (ix86_output_call_insn): Emit a nop in one more case for SEH.
14071         * config/i386/winnt.c: Include except.h.
14072         (struct seh_frame_state): Add reg_offset, after_prologue and
14073         in_cold_section fields.
14074         (i386_pe_seh_end_prologue): Set seh->after_prologue.
14075         (i386_pe_seh_cold_init): New function.
14076         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
14077         to seh->in_cold_section.
14078         (seh_emit_push): Record the offset of the push.
14079         (seh_emit_save): Record the offet of the save.
14080         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14081         Test seh->after_prologue to disregard the epilogue.
14082         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
14083         (i386_pe_end_cold_function): New function.
14085 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
14087         PR fortran/84565
14088         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
14089         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
14091         PR c++/84704
14092         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
14093         on tmp_var.
14094         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
14095         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
14097         PR middle-end/84723
14098         * multiple_target.c: Include tree-inline.h and intl.h.
14099         (expand_target_clones): Diagnose and fail if node->definition and
14100         !tree_versionable_function_p (node->decl).
14102 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
14104         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
14105         sprint_ul.
14106         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
14107         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14108         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
14110 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
14112         PR target/84710
14113         * combine.c (try_combine): Use reg_or_subregno instead of handling
14114         just paradoxical SUBREGs and REGs.
14116 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
14118         * config/arc/arc.c (arc_finalize_pic): Remove function.
14119         (arc_must_save_register): We use single base PIC register, remove
14120         checks to save/restore the PIC register.
14121         (arc_expand_prologue): Likewise.
14122         * config/arc/arc-protos.h (arc_set_default_type_attributes):
14123         Remove.
14124         (arc_verify_short): Likewise.
14125         (arc_attr_type): Likewise.
14126         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
14127         (walk_stores): Likewise.
14128         (arc_address_cost): Make it static.
14129         (arc_verify_short): Likewise.
14130         (branch_dest): Likewise.
14131         (arc_attr_type): Likewise.
14132         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
14133         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
14134         (arc_final_prescan_insn): Remove inserting the nops due to
14135         hardware hazards.  It is done in reorg step.
14136         (insn_length_variant_t): Remove.
14137         (insn_length_parameters_t): Likewise.
14138         (arc_insn_length_parameters): Likewise.
14139         (arc_get_insn_variants): Likewise.
14140         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
14142 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
14144         PR inline-asm/84683
14145         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
14146         assertion failure.
14148         PR tree-optimization/84687
14149         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
14150         on new_node->decl.
14151         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
14153 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14155         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
14156         Rename to ppc_speculation_barrier.
14157         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
14158         __builtin_ppc_speculation_barrier.
14160 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
14162         PR target/84700
14163         * combine.c (combine_simplify_rtx): Don't try to simplify if
14164         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
14165         are equal to x.
14167 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
14169         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
14170         to 32 bytes when compiling for POWER9.
14172 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
14174         PR target/84564
14175         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
14176         regparm >= 3 with no arg reg available also for calls with
14177         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
14179         PR target/84524
14180         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
14181         orig,vex.
14182         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
14184 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
14186         PR target/84264
14187         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
14189 2018-03-05  Richard Biener  <rguenther@suse.de>
14191         PR tree-optimization/84486
14192         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
14193         When inserting a __builtin_assume_aligned call set the LHS
14194         SSA name alignment info accordingly.
14196 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
14198         PR tree-optimization/84114
14199         * config/aarch64/aarch64.c (aarch64_reassociation_width)
14200         Avoid reassociation of FLOAT_MODE addition.
14202 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
14204         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
14205         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
14206         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
14207         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
14208         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
14209         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
14210         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
14211         and -mwbnoinvd.
14212         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
14213         __builtin_ia32_wbinvd): New builtins.
14214         (SPECIAL_ARGS2): New.
14215         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
14216         (SPECIAL_ARGS2): New.
14217         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
14218         (ix86_valid_target_attribute_inner_p): Ditto.
14219         (ix86_init_mmx_sse_builtins): Add special_args2.
14220         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
14221         TARGET_WBNOINVD_P): New.
14222         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
14223         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
14224         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
14225         * config/i386/immintrin.h (_wbinvd): New intrinsic.
14226         * config/i386/pconfigintrin.h: New file.
14227         * config/i386/wbnoinvdintrin.h: Ditto.
14228         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
14229         wbnoinvdintrin.h.
14230         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
14232 2018-03-05  Richard Biener  <rguenther@suse.de>
14234         PR tree-optimization/84670
14235         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14236         member.
14237         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14238         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14239         (compute_antic_aux): Only assert the number of values in ANTIC_IN
14240         doesn't grow if all successors (recursively) were visited at least
14241         once.
14243 2018-03-05  Richard Biener  <rguenther@suse.de>
14245         PR tree-optimization/84650
14246         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
14247         if executed in the loop pipeline.
14249 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
14251         * doc/configfiles.texi (Configuration Files): Move info about
14252         conditionalizing $target-protos.h to...
14253         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
14254         differs from $target-protos.h.
14256 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
14257             Chung-Ju Wu  <jasonwucj@gmail.com>
14259         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
14260         * config/nds32/nds32-multiple.md (setmemsi): Define.
14261         * config/nds32/nds32-memory-manipulation.c
14262         (nds32_gen_dup_4_byte_to_word_value): New.
14263         (emit_setmem_word_loop): New.
14264         (emit_setmem_byte_loop): New.
14265         (nds32_expand_setmem_loop): New.
14266         (nds32_expand_setmem_loop_v3m): New.
14267         (nds32_expand_setmem_unroll): New.
14268         (nds32_expand_setmem): New.
14270 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
14271             Chung-Ju Wu  <jasonwucj@gmail.com>
14273         * config/nds32/nds32-memory-manipulation.c
14274         (nds32_emit_load_store): New.
14275         (nds32_emit_post_inc_load_store): New.
14276         (nds32_emit_mem_move): New.
14277         (nds32_emit_mem_move_block): New.
14278         (nds32_expand_movmemsi_loop_unknown_size): New.
14279         (nds32_expand_movmemsi_loop_known_size): New.
14280         (nds32_expand_movmemsi_loop): New.
14281         (nds32_expand_movmemsi_unroll): New.
14282         (nds32_expand_movmemqi): Rename ...
14283         (nds32_expand_movmemsi): ... to this.
14284         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
14285         (movmemsi): ... to this.
14286         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
14287         (nds32_expand_movmemsi): ... to this.
14289 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
14290             Monk Chiang  <sh.chiang04@gmail.com>
14291             Chung-Ju Wu  <jasonwucj@gmail.com>
14293         * config/nds32/nds32-protos.h
14294         (nds32_expand_load_multiple): New arguments.
14295         (nds32_expand_store_multiple): Ditto.
14296         (nds32_valid_multiple_load_store): Rename ...
14297         (nds32_valid_multiple_load_store_p): ... to this.
14298         * config/nds32/nds32-memory-manipulation.c
14299         (nds32_expand_load_multiple): Refine implementation.
14300         (nds32_expand_store_multiple): Ditto.
14301         * config/nds32/nds32-multiple.md
14302         (load_multiple): Update nds32_expand_load_multiple interface.
14303         (store_multiple): Update nds32_expand_store_multiple interface.
14304         * config/nds32/nds32-predicates.c
14305         (nds32_valid_multiple_load_store): Rename ...
14306         (nds32_valid_multiple_load_store_p): ... to this and refine
14307         implementation.
14308         * config/nds32/predicates.md
14309         (nds32_load_multiple_and_update_address_operation): New predicate.
14310         (nds32_store_multiple_and_update_address_operation): New predicate.
14312 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
14313             Chung-Ju Wu  <jasonwucj@gmail.com>
14315         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
14316         (combo): New attribute.
14317         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
14319 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
14321         * config/nds32/nds32.opt: Change -mcmodel= default value.
14323 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
14324             Monk Chiang  <sh.chiang04@gmail.com>
14325             Chung-Ju Wu  <jasonwucj@gmail.com>
14327         * config/nds32/constants.md (unspec_element): New enum.
14328         * config/nds32/constraints.md (Umw): New constraint.
14329         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
14330         * config/nds32/nds32-intrinsic.md: Likewise.
14331         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
14332         (nds32_valid_smw_lwm_base_p): New.
14333         (nds32_output_smw_single_word): New.
14334         (nds32_output_lmw_single_word): New.
14335         (nds32_expand_unaligned_load): New.
14336         (nds32_expand_unaligned_store): New.
14337         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
14338         (nds32_output_smw_single_word): Declare.
14339         (nds32_output_lmw_single_word): Declare.
14340         (nds32_expand_unaligned_load): Declare.
14341         (nds32_expand_unaligned_store): Declare.
14342         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
14343         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
14344         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
14345         NDS32_BUILTIN_UASTORE_DW.
14346         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
14347         predicate.
14349 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
14350             Kito Cheng  <kito.cheng@gmail.com>
14351             Chung-Ju Wu  <jasonwucj@gmail.com>
14353         * config/nds32/nds32-intrinsic.c
14354         (nds32_expand_builtin_null_ftype_reg): Delete.
14355         (nds32_expand_builtin_reg_ftype_imm): Ditto.
14356         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
14357         (nds32_read_argument): New.
14358         (nds32_legitimize_target): Ditto.
14359         (nds32_legitimize_argument): Ditto.
14360         (nds32_check_constant_argument): Ditto.
14361         (nds32_expand_unop_builtin): Ditto.
14362         (nds32_expand_unopimm_builtin): Ditto.
14363         (nds32_expand_binop_builtin): Ditto.
14364         (nds32_builtin_decl_impl): Ditto.
14365         (builtin_description): Ditto.
14366         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
14367         (nds32_init_builtins_impl): Ditto.
14368         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
14369         (nds32_builtin_decl): New.
14370         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
14371         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
14373 2018-03-02  Jeff Law  <law@redhat.com>
14375         * reorg.c (stop_search_p): Handle DEBUG_INSN.
14376         (redundant_insn, fill_simple_delay_slots): Likewise.
14377         (fill_slots_from_thread): Likewise.
14378         * resource.c (mark_referenced_resources): Likewise.
14379         (mark_set_resources, find_dead_or_set_registers): Likewise.
14381 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14383         * substring-locations.h (format_warning_va): Formatting fix for
14384         ATTRIBUTE_GCC_DIAG.
14385         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14386         argument.
14387         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14388         * substring-locations.c: Include intl.h.
14389         (format_warning_va): Turned into small wrapper around
14390         format_warning_n_va, renamed to ...
14391         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14392         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14393         use ngettext.
14394         (format_warning_at_substring_n): New function.
14395         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14396         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
14397         format_warning_at_substring with just a shorter name instead of
14398         const function pointer.
14399         (fmtwarn_n): New function.
14400         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14401         appropriate, get rid of all the fmtstr temporaries, move conditionals
14402         with G_() wrapped string literals directly into fmtwarn arguments,
14403         cast dir.len to (int), formatting fixes.
14405 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
14407         * doc/invoke.texi: Remove "Cilk Plus" references.
14409 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14410             Richard Biener  <rguenther@suse.de>
14412         PR ipa/84628
14413         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14414         for error or warning attributes if CALL_FROM_THUNK_P is set.
14415         Formatting fixes.
14417 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14419         PR target/56540
14420         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14421         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14423         PR target/56540
14424         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14425         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14427         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14428         instead of -1U in last predictors element's probability member.
14430 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
14432         PR ipa/83983
14433         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14434         arguments if they are comparable.
14436 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
14438         PR tree-optimization/84634
14439         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
14440         masks and masked_loop_p with a single loop_masks, making sure it's
14441         null for bb vectorization.
14443 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
14445         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14446         (vect_analyze_data_ref_access): Use loop->safe_len rather than
14447         loop->force_vectorize to check whether there is no alias.
14449 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14451         PR target/84614
14452         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
14453         prototypes.
14454         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
14455         comments.
14456         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
14457         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
14458         instead of a loop around prev_real_insn.
14459         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
14460         prev_real_insn.
14462         PR inline-asm/84625
14463         * config/i386/i386.c (ix86_print_operand): Use conditional
14464         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
14465         zero vector.
14467 2018-03-02  Richard Biener  <rguenther@suse.de>
14469         PR tree-optimization/84427
14470         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
14471         (bitmap_set_subtract_values): Rewrite to handle multiple
14472         exprs per value.
14473         (clean): Likewise.
14474         (prune_clobbered_mems): Likewise.
14475         (phi_translate): Take edge instead of pred/phiblock.
14476         (phi_translate_1): Likewise.
14477         (phi_translate_set): Likewise.  Insert all translated
14478         exprs for a value into the set, keeping possibly multiple
14479         expressions per value.
14480         (compute_antic_aux): Adjust for phi_translate changes.
14481         When intersecting union the expressions and prune those
14482         not in the final value set, keeping possibly multiple
14483         expressions per value.  Do not use value-insertion
14484         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
14485         all expressions.  Add verification that the value-sets
14486         only shrink during iteration.
14487         (compute_partial_antic_aux): Adjust for the phi_translate changes.
14488         (do_pre_regular_insertion): Likewise.
14489         (do_pre_partial_partial_insertion): Likewise.
14491 2018-03-02  Richard Biener  <rguenther@suse.de>
14493         PR target/82005
14494         * config/darwin.c (saved_debug_info_level): New static global.
14495         (darwin_asm_lto_start): Disable debug info generation for LTO out.
14496         (darwin_asm_lto_end): Restore debug info generation settings.
14498 2018-03-01  Martin Liska  <mliska@suse.cz>
14500         PR sanitizer/82484
14501         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
14502         volatile arguments.
14504 2018-03-01  Richard Biener  <rguenther@suse.de>
14506         PR debug/84645
14507         * dwarf2out.c (gen_variable_die): Properly handle late VLA
14508         type annotation with LTO when debug was disabled at compile-time.
14510 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
14512         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
14513         XINT with INTVAL.
14514         (mips_final_postscan_insn): Likewise.
14516 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
14518         PR rtl-optimization/84528
14519         * alias.c (init_alias_target): Add commentary.
14520         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
14521         a unique base value if the frame pointer is not eliminated
14522         to the stack pointer.
14524 2018-03-01  Tom de Vries  <tom@codesourcery.com>
14526         PR rtl-optimization/83327
14527         * lra-int.h (hard_regs_spilled_into): Declare.
14528         * lra.c (hard_regs_spilled_into): Define.
14529         (init_reg_info): Init hard_regs_spilled_into.
14530         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
14531         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
14532         (process_bb_lives): Handle hard_regs_spilled_into.
14533         (lra_create_live_ranges_1): Before doing liveness propagation, clear
14534         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
14536 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
14538         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
14539         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
14540         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
14541         * config/rs6000/aix72.h: New file.
14543 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
14545         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
14546         instead of warning_at with conditional singular and plural messages
14547         where possible.
14549         PR target/52991
14550         * stor-layout.c (update_alignment_for_field): For
14551         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
14552         && !DECL_PACKED (field), do the alignment update, just use
14553         only desired_align instead of MAX (type_align, desired_align)
14554         as the alignment.
14555         (place_field): Don't do known_align < desired_align handling
14556         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14557         is non-NULL, instead do it after rli->prev_field handling and
14558         only if not within a bitfield word.  For DECL_PACKED (field)
14559         use type_align of BITS_PER_UNIT.
14561 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
14563         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14564         superfluous parentheses and trailing spaces.
14566 2018-02-28  Richard Biener  <rguenther@suse.de>
14568         PR tree-optimization/84584
14569         * graphite-scop-detection.c (scop_detection::add_scop): Discard
14570         SCoPs with fake exit edge.
14572 2018-02-28  Martin Liska  <mliska@suse.cz>
14574         PR testsuite/84597
14575         * timevar.c (timer::print): Fix format to properly print 100%
14576         values.
14578 2018-02-28  Richard Biener  <rguenther@suse.de>
14580         PR middle-end/84607
14581         * genmatch.c (capture_info::walk_match): Do not mark
14582         captured expressions without operands as expr_p given
14583         they act more like predicates and should be subject to
14584         "lost tail" side-effect preserving.
14586 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
14588         PR rtl-optimization/81611
14589         * auto-inc-dec.c (attempt_change): Move dead note from
14590         mem_insn if it's the next use of regno
14591         (find_address): Take address use of reg holding
14592         non-incremented value.  Add parm to limit search to the named
14593         reg only.
14594         (merge_in_block): Attempt to use a mem insn that is the next
14595         use of the original regno.
14597 2018-02-27  Martin Sebor  <msebor@redhat.com>
14599         PR c++/83871
14600         * doc/invoke.texi (-Wmissing-attributes): New option.
14601         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
14603 2018-02-27  Martin Sebor  <msebor@redhat.com>
14605         PR translation/84207
14606         * diagnostic-core.h (warning_n, error_n, inform_n): Change
14607         n argument to unsigned HOST_WIDE_INT.
14608         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
14609         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
14610         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
14611         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
14613 2018-02-27  Richard Biener  <rguenther@suse.de>
14615         PR tree-optimization/84512
14616         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
14617         Do not use the estimate returned from record_stmt_cost for
14618         the scalar iteration cost but sum properly using add_stmt_cost.
14620 2018-02-27  Richard Biener  <rguenther@suse.de>
14622         PR tree-optimization/84466
14623         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14624         Adjust last change to less strictly validate use operands.
14626 2018-02-27  Martin Liska  <mliska@suse.cz>
14628         PR gcov-profile/84548
14629         * gcov.c (process_file): Allow partial overlap and consider it
14630         also as group functions.
14631         (output_lines): Properly calculate range of lines for a group.
14633 2018-02-27  Martin Liska  <mliska@suse.cz>
14635         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14636         'ggc' suffixes.  Change first column width.
14637         (timer::print): Fix formatting of the column.
14639 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
14641         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14642         preserve inline entry blocks for the sake of debug inline
14643         entry point markers alone.
14644         (remove_unused_locals): Suggest in comments a better place to
14645         force the preservation of inline entry blocks that are
14646         otherwise unused, but do not preserve them.
14648 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
14650         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14652 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
14654         PR target/84039
14655         * config/i386/constraints.md (Bs): Replace
14656         ix86_indirect_branch_register with
14657         TARGET_INDIRECT_BRANCH_REGISTER.
14658         (Bw): Likewise.
14659         * config/i386/i386.md (indirect_jump): Likewise.
14660         (tablejump): Likewise.
14661         (*sibcall_memory): Likewise.
14662         (*sibcall_value_memory): Likewise.
14663         Peepholes of indirect call and jump via memory: Likewise.
14664         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14665         (*sibcall_value_GOT_32): Likewise.
14666         * config/i386/predicates.md (indirect_branch_operand): Likewise.
14667         (GOT_memory_operand): Likewise.
14668         (call_insn_operand): Likewise.
14669         (sibcall_insn_operand): Likewise.
14670         (GOT32_symbol_operand): Likewise.
14671         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14673 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
14675         PR rtl-optimization/83496
14676         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14677         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
14678         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14679         redundant insn, if any.
14680         (relax_delay_slots): Likewise.
14681         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14683 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
14685         PR tree-optimization/83965
14686         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14687         that grouped statements are part of a reduction chain.  Return
14688         true if the statement is not marked as a reduction itself but
14689         is part of a group.
14690         (vect_recog_dot_prod_pattern): Don't check whether the statement
14691         is part of a group here.
14692         (vect_recog_sad_pattern): Likewise.
14693         (vect_recog_widen_sum_pattern): Likewise.
14695 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
14697         PR debug/84545
14698         * final.c (rest_of_clean_state): Also look for calls inside sequences.
14700 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
14702         PR target/84530
14703         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14704         the bool argument.
14705         (ix86_output_indirect_function_return): New prototype.
14706         (ix86_split_simple_return_pop_internal): Likewise.
14707         * config/i386/i386.c (indirect_return_via_cx): New.
14708         (indirect_return_via_cx_bnd): Likewise.
14709         (indirect_thunk_name): Handle return va CX_REG.
14710         (output_indirect_thunk_function): Create alias for
14711         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14712         (ix86_output_indirect_jmp): Remove the bool argument.
14713         (ix86_output_indirect_function_return): New function.
14714         (ix86_split_simple_return_pop_internal): Likewise.
14715         * config/i386/i386.md (*indirect_jump): Don't pass false
14716         to ix86_output_indirect_jmp.
14717         (*tablejump_1): Likewise.
14718         (simple_return_pop_internal): Change it to define_insn_and_split.
14719         Call ix86_split_simple_return_pop_internal to split it for
14720         -mfunction-return=.
14721         (simple_return_indirect_internal): Call
14722         ix86_output_indirect_function_return instead of
14723         ix86_output_indirect_jmp.
14725 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
14727         PR bootstrap/84405
14728         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14729         memset and value initialization afterwards.
14731 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
14733         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14735 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14737         PR target/84521
14738         * common/config/aarch64/aarch64-common.c
14739         (aarch_option_optimization_table[]): Switch
14740         off fomit-frame-pointer
14742 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
14743             Chung-Ju Wu  <jasonwucj@gmail.com>
14745         * config/nds32/nds32-multiple.md (load_multiple): Disallow
14746         volatile memory.
14747         (store_multiple): Ditto.
14749 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
14751         * config.gcc: Add --with-cpu support for nds32 target.
14752         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14753         * config/nds32/nds32.opt: Add -mcpu= option.
14755 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
14757         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14758         isel=yes): Warn for these deprecated options.
14760 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
14762         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14763         ISA_2_5_MASKS_EMBEDDED.
14765 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
14767         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14768         p->max as pointers rather than using iterative_hash_expr.
14770 2018-02-23  Carl Love  <cel@us.ibm.com>
14772         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14773         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14774         BU_P8V_OVERLOAD_2.
14775         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14776         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14777         P8V_BUILTIN_VEC_VUNSIGNED2.
14779 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
14781         PR target/81572
14782         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14783         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14784         LRA_UNKNOWN_ALT.
14785         * lra-constraints.c (curr_insn_transform): Set up
14786         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
14787         LRA_UNKNOWN_ALT.
14788         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14789         * lra-eliminations.c (spill_pseudos): Ditto.
14790         (process_insn_for_elimination): Ditto.
14791         * lra-lives.c (reg_early_clobber_p): Use the new macros.
14792         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14793         LRA_NON_CLOBBERED_ALT.
14795 2018-02-22  Martin Sebor  <msebor@redhat.com>
14797         PR tree-optimization/84480
14798         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14799         to maybe_diag_stxncpy_trunc.  Call it.
14800         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14801         from gimple_fold_builtin_strcpy.  Print inlining stack.
14802         (handle_builtin_stxncpy): Print inlining stack.
14803         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14805 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
14807         PR target/84176
14808         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14809         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14810         and -fcheck-pointer-bounds are used together.
14811         (indirect_thunk_prefix): New enum.
14812         (indirect_thunk_need_prefix): New function.
14813         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
14814         "_nt" instead of "_bnd" for NOTRACK prefix.
14815         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14816         (output_indirect_thunk_function): Likewise.
14817         (): Likewise.
14818         (ix86_code_end): Update output_indirect_thunk_function calls.
14819         (ix86_output_indirect_branch_via_reg): Replace
14820         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14821         (ix86_output_indirect_branch_via_push): Likewise.
14822         (ix86_output_function_return): Likewise.
14823         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14824         incompatible with -fcf-protection=branch and
14825         -fcheck-pointer-bounds.
14827 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
14829         PR target/83335
14830         * config/aarch64/aarch64.c (aarch64_print_address_internal):
14831         Change gcc_assert call to output_operand_lossage.
14833 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
14835         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14837 2018-02-22  DJ Delorie  <dj@redhat.com>
14838             Sebastian Perta  <sebastian.perta@renesas.com>
14839             Oleg Endo  <olegendo@gcc.gnu.org>
14841         * config/rx/rx.c (rx_rtx_costs): New function.
14842         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14844 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14846         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14848 2018-02-22  Martin Liska  <mliska@suse.cz>
14850         PR driver/83193
14851         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14852         Add "native" as a possible value.
14854 2018-02-22  Martin Liska  <mliska@suse.cz>
14856         PR driver/83193
14857         * config/i386/i386.c (ix86_option_override_internal):
14858         Add "native" as a possible value for -march and -mtune.
14860 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
14862         PR target/84502
14863         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14864         to all type variants.
14866         PR tree-optimization/84503
14867         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14868         width as info->bitpos + info->bitsize - start.
14869         (merged_store_group::merge_overlapping): Simplify width computation.
14870         (check_no_overlap): New function.
14871         (imm_store_chain_info::try_coalesce_bswap): Compute expected
14872         start + width and last_order of the group, fail if check_no_overlap
14873         fails.
14874         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14875         to group if check_no_overlap fails.
14877 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
14879         * config/rs6000/altivec.md: Delete contraint arguments to
14880         define_expand, define_split, and define_peephole2, and in
14881         define_insn_and_split if always unused.
14882         * config/rs6000/darwin.md: Ditto.
14883         * config/rs6000/dfp.md: Ditto.
14884         * config/rs6000/rs6000.md: Ditto.
14885         * config/rs6000/sync.md: Ditto.
14886         * config/rs6000/vector.md: Ditto.
14887         * config/rs6000/vsx.md: Ditto.
14889 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
14891         * config/rs6000/altivec.md: Write output control strings as braced
14892         blocks instead of double-quoted strings.
14893         * config/rs6000/darwin.md: Ditto.
14894         * config/rs6000/rs6000.md: Ditto.
14895         * config/rs6000/vector.md: Ditto.
14896         * config/rs6000/vsx.md: Ditto.
14898 2018-02-21  Jason Merrill  <jason@redhat.com>
14900         PR c++/84314 - ICE with templates and fastcall attribute.
14901         * attribs.c (build_type_attribute_qual_variant): Remove assert.
14903 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
14905         * ipa-cp.c (determine_versionability): Fix comment typos.
14907 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
14909         PR c/84229
14910         * ipa-cp.c (determine_versionability): Do not version functions caling
14911         va_arg_pack.
14913 2018-02-21  Martin Liska  <mliska@suse.cz>
14915         PR driver/83193
14916         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14917         Add "native" as a possible value.
14918         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
14919         the macro when native cpu detection is available.
14921 2018-02-21  Martin Liska  <mliska@suse.cz>
14923         PR driver/83193
14924         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14925         Add "native" as a possible value.
14926         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14927         when native cpu detection is available.
14929 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
14930             Martin Sebor  <msebor@redhat.com>
14932         PR tree-optimization/84478
14933         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14934         false.
14935         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14936         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14937         support which is conservatively correct, for 2 only stay conservative
14938         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
14939         argument to the 2 argument get_range_strlen, adjust 6 arg
14940         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14941         false.
14942         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14943         (gimple_fold_builtin_strlen): Pass true as last argument to
14944         get_range_strlen.
14946 2018-02-20  Martin Sebor  <msebor@redhat.com>
14948         PR middle-end/84095
14949         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14950         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
14951         (builtin_memref::builtin_memref): Factor out parts into
14952         set_base_and_offset and call it.
14954 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
14956         PR middle-end/84406
14957         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14958         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14959         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
14960         search at the associated MODE_INT.
14962 2018-02-20  Jeff Law  <law@redhat.com>
14964         PR middle-end/82123
14965         PR tree-optimization/81592
14966         PR middle-end/79257
14967         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14968         for range data rather than using global data.
14969         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14970         range data rather than using global data.
14971         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14972         pass it to children as needed.
14973         (struct directive::fmtresult): Similarly.
14974         (struct directive::set_width): Similarly.
14975         (struct directive::set_precision): Similarly.
14976         (format_integer, format_directive, parse_directive): Similarly.
14977         (format_none): Accept unnamed vr_values parameter.
14978         (format_percent, format_floating, format_character): Similarly.
14979         (format_string, format_plain): Similarly.
14980         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
14981         the EVRP range analyzer for range data rather than using global data.
14982         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
14983         gimple-ssa-evrp-analyze.h
14984         (class sprintf_dom_walker): Add after_dom_children member function.
14985         Add evrp_range_analyzer member.
14986         (sprintf_dom_walker::before_dom_children): Call into the EVRP
14987         range analyzer as needed.
14988         (sprintf_dom_walker::after_dom_children): New member function.
14989         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
14990         if not optimizing.
14991         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
14992         (evrp_range_analyzer::pop_to_marker): Likewise.
14994 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
14996         PR tree-optimization/84419
14997         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
14998         with the required type if its current type is compatible but
14999         different.
15001 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
15003         PR middle-end/82004
15004         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15005         after vectorization.
15007 2018-02-20  Martin Liska  <mliska@suse.cz>
15009         PR driver/83193
15010         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15011         possible values if we don't have a hint.
15013 2018-02-20  Martin Liska  <mliska@suse.cz>
15015         PR c/84310
15016         PR target/79747
15017         * final.c (shorten_branches): Build align_tab array with one
15018         more element.
15019         * opts.c (finish_options): Add alignment option limit check.
15020         (MAX_CODE_ALIGN): Likewise.
15021         (MAX_CODE_ALIGN_VALUE): Likewise.
15022         * doc/invoke.texi: Document maximum allowed option value for
15023         all -falign-* options.
15025 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
15027         PR target/84146
15028         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15029         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15030         * var-tracking.c (emit_note_insn_var_location): Remove all references
15031         to NOTE_INSN_CALL_ARG_LOCATION.
15032         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15033         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15034         Use copy_rtx_if_shared.
15035         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15036         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15037         (dwarf2out_var_location): Remove handling of
15038         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15039         on call_insn.
15040         * final.c (final_scan_insn): Remove all references to
15041         NOTE_INSN_CALL_ARG_LOCATION.
15042         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
15043         before dumping final insns.
15044         * except.c (emit_note_eh_region_end): Remove all references to
15045         NOTE_INSN_CALL_ARG_LOCATION.
15046         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
15047         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
15048         * config/arc/arc.c (hwloop_optimize): Likewise.
15049         * config/arm/arm.c (create_fix_barrier): Likewise.
15050         * config/s390/s390.c (s390_chunkify_start): Likewise.
15051         * config/sh/sh.c (find_barrier): Likewise.
15052         * config/i386/i386.c (rest_of_insert_endbranch,
15053         ix86_seh_fixup_eh_fallthru): Likewise.
15054         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
15055         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
15056         * config/frv/frv.c (frv_function_prologue): Likewise.
15057         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
15058         reg note.
15059         (note_outside_basic_block_p): Remove all references to
15060         NOTE_INSN_CALL_ARG_LOCATION.
15061         * gengtype.c (adjust_field_rtx_def): Likewise.
15062         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
15063         Likewise.
15064         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
15065         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
15067         PR c++/84444
15068         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
15069         is ADDR_EXPR.
15071         PR tree-optimization/84452
15072         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
15073         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
15074         is NULL.
15076 2018-02-19  Martin Liska  <mliska@suse.cz>
15078         PR sanitizer/82183
15079         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15081 2018-02-19  Martin Liska  <mliska@suse.cz>
15082             Richard Sandiford  <richard.sandiford@linaro.org>
15084         PR tree-optimization/82491
15085         * gimple-fold.c (get_base_constructor): Make earlier bail out
15086         to prevent ubsan.
15088 2018-02-19  Carl Love  <cel@us.ibm.com>
15090         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
15091         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
15092         BU_P8V_OVERLOAD_1.
15093         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
15094         P8V_BUILTIN_VEC_NEG.
15096 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
15098         * config/rl78/rl78.md (movdf): New define expand.
15100 2018-02-19  Martin Liska  <mliska@suse.cz>
15102         PR other/80589
15103         * doc/invoke.texi: Fix typo.
15104         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
15106 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
15108         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
15109         handle rs6000_single_float and rs6000_double_float specially for
15110         e500 family CPUs.
15112 2018-02-16  Jeff Law  <law@redhat.com>
15114         * config/rx/rx.c (add_pop_cfi_notes): New function.;
15115         (pop_regs): Use it.
15117 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
15119         PR ipa/84425
15120         * ipa-inline.c (inline_small_functions): Fix a typo.
15122 2018-02-16  Nathan Sidwell  <nathan@acm.org>
15124         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
15126 2018-02-16  Carl Love  <cel@us.ibm.com>
15128         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
15129         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
15130         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
15131         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
15132         expansion to P8V_BUILTIN_VEC_FLOAT2.
15134 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
15136         PR rtl-optimization/70023
15137         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
15138         src_regno into account.
15140 2018-02-16  Carl Love  <cel@us.ibm.com>
15142         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
15143         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
15144         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
15145         * config/rs6000/rs6000.c: Remove case statements for
15146         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
15147         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
15148         and P9V_BUILTIN_VEC_VINSERT4B.
15149         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
15150         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
15151         * config/rs6000/vsx.md:
15152         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
15153         vec_insert4b.
15155 2018-02-16  Carl Love  <cel@us.ibm.com>
15157         * config/rs6000/altivec.h: Add builtin names vec_extract4b
15158         vec_insert4b.
15159         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
15160         definitions.
15161         * config/rs6000/rs6000-c.c: Add the definitions for
15162         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
15163         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
15164         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
15165         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
15166         definition for insert4b and define insn *insert3b_internal.
15167         * doc/extend.texi: Add documentation for vec_extract4b.
15169 2018-02-16  Nathan Sidwell  <nathan@acm.org>
15171         * doc/extend.texi (Backwards Compatibility): Mention friend
15172         injection.  Note for-scope is deprecated.
15173         * doc/invoke.texi (-ffriend-injection): Deprecate.
15175 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
15177         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
15178         that moved to I2, also allow destinations that are a paradoxical
15179         subreg (instead of a normal reg).
15181 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
15183         PR target/83831
15184         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
15185         to QImode.
15187 2018-02-16  Richard Biener  <rguenther@suse.de>
15189         PR tree-optimization/84037
15190         PR tree-optimization/84016
15191         PR target/82862
15192         * config/i386/i386.c (ix86_builtin_vectorization_cost):
15193         Adjust vec_construct for the fact we need additional higher latency
15194         128bit inserts for AVX256 and AVX512 vector builds.
15195         (ix86_add_stmt_cost): Scale vector construction cost for
15196         elementwise loads.
15198 2018-02-16  Richard Biener  <rguenther@suse.de>
15200         PR tree-optimization/84417
15201         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
15202         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
15203         (non_rewritable_lvalue_p): Likewise, use poly-ints.
15205 2018-02-16  Martin Liska  <mliska@suse.cz>
15207         PR sanitizer/84307
15208         * internal-fn.def (ASAN_CHECK): Set proper flags.
15209         (ASAN_MARK): Likewise.
15211 2018-02-16  Julia Koval  <julia.koval@intel.com>
15213         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
15214         from PTA_CANNONLAKE.
15216 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
15218         PR target/84272
15219         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
15220         Use ++iter rather than iter++ for std::list iterators.
15221         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
15222         defer deleting them until all nodes in the forest are processed.  Do
15223         free even leaf nodes.  Change to_process into auto_vec.
15225         PR bootstrap/84405
15226         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
15227         * vec.h (vec_default_construct): Use memset instead of placement new
15228         if BROKEN_VALUE_INITIALIZATION is defined.
15229         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
15230         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
15231         is defined.
15233         PR rtl-optimization/83723
15234         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
15235         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
15236         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
15237         recursive calls.
15238         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
15239         callers.
15240         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
15242 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
15244         PR rtl-optimization/81443
15245         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
15246         from inner REGs to paradoxical SUBREGs.
15248 2018-02-16  Richard Biener  <rguenther@suse.de>
15250         PR tree-optimization/84399
15251         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15252         For operands we can analyze at their definition make sure we can
15253         analyze them at each use as well.
15255 2018-02-16  Richard Biener  <rguenther@suse.de>
15257         PR tree-optimization/84190
15258         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
15259         volatile accesses if the decl isn't volatile.
15261 2018-02-15  Jason Merrill  <jason@redhat.com>
15263         PR c++/84314 - ICE with templates and fastcall attribute.
15264         * attribs.c (build_type_attribute_qual_variant): Don't clobber
15265         TYPE_CANONICAL on an existing type.
15267 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
15269         PR tree-optimization/84383
15270         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
15271         dstoff nor call operand_equal_p if dstbase is NULL.
15273         PR tree-optimization/84334
15274         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
15275         also a CONSTANT_CLASS_P, punt.
15277 2018-02-14  Jim Wilson  <jimw@sifive.com>
15279         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
15280         first SMALL_OPERAND check.  New local min_second_step.  Move assert
15281         to where locals are set.  Add TARGET_RVC support.
15282         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
15284 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
15286         * doc/invoke.texi: Correct -Wformat-overflow code sample.
15288 2018-02-14  Martin Sebor  <msebor@redhat.com>
15290         PR tree-optimization/83698
15291         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
15292         arrays constrain the offset range to their bounds.
15293         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
15294         (builtin_access::overlap): Avoid setting the size of overlap if it's
15295         already been set.
15296         (maybe_diag_overlap): Also consider arrays when deciding what values
15297         of offsets to include in diagnostics.
15299 2018-02-14  Martin Sebor  <msebor@redhat.com>
15301         PR c/84108
15302         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
15303         that correspond to the kind of a declaration.
15305 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
15307         PR target/83984
15308         * config/pa/pa.md: Load address of PIC label using the linkage table
15309         if the label is nonlocal.
15311 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15313         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
15314         warning message if user requests -maltivec=be.
15315         * doc/invoke.texi: Document deprecation of -maltivec=be.
15317 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
15319         PR target/84220
15320         * config/rs6000/rs6000-c.c: Update definitions for
15321         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
15322         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
15324 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
15326         PR target/84239
15327         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
15328         add _get_ssp intrinsics. Remove argument from
15329         __builtin_ia32_rdssp[d|q].
15330         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
15331         * config/i386/i386-builtin.def: Remove argument from
15332         __builtin_ia32_rdssp[d|q].
15333         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
15334         ix86_expand_special_args_builtin for _rdssp[d|q].
15335         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
15336         Clear register before usage.
15337         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
15338         Add documentation for new _get_ssp and _inc_ssp intrinsics.
15340 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
15342         PR tree-optimization/84357
15343         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
15344         operand 1 of an ARRAY_REF too.
15346 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
15348         PR target/83831
15349         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
15350         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15351         declarations.
15352         (set_of_reg): New struct.
15353         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
15354         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
15355         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15356         functions.
15357         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
15358         Split into bitclr, bitset, bitinvert patterns if appropriate.
15359         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
15360         use rx_fuse_in_memory_bitop.
15361         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
15362         to named insn, correct maximum insn length.
15364 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
15366         PR target/79242
15367         * machmode.def: Define a complex mode for PARTIAL_INT.
15368         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
15369         MODE_PARTIAL_INT.
15370         * doc/rtl.texi: Document CSPImode.
15371         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
15372         handling.
15373         (msp430_hard_regno_nregs_with_padding): Likewise.
15375 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
15377         PR target/84279
15378         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
15380 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
15382         PR rtl-optimization/84169
15383         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
15384         we generated a parallel as new i3 and we split that to new i2 and i3
15385         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
15386         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
15387         those to i2, not i1.  Partially rewrite this scan code.
15389 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
15391         PR c/82210
15392         * stor-layout.c (place_field): For variable length fields, adjust
15393         offset_align afterwards not just based on the field's alignment,
15394         but also on the size.
15396         PR middle-end/84309
15397         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15398         of exps and logs in the use_exp2 case.
15400 2018-02-13  Jeff Law  <law@redhat.com>
15402         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15403         entry for "vector".
15405         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15406         ARGS as unused.
15408 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
15410         PR debug/84342
15411         PR debug/84319
15412         * common.opt (gas-loc-support, gas-locview-support): New.
15413         (ginline-points, ginternal-reset-location-views): New.
15414         * doc/invoke.texi: Document them.  Use @itemx where intended.
15415         (gvariable-location-views): Adjust.
15416         * target.def (reset_location_view): New.
15417         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15418         (TARGET_RESET_LOCATION_VIEW): New.
15419         * doc/tm.texi: Rebuilt.
15420         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15421         (dwarf2out_default_as_locview_support): New.
15422         (output_asm_line_debug_info): Use option variables.
15423         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15424         (output_loc_list): Likewise.
15425         (add_high_low_attributes): Check option variables.
15426         Don't output entry view attribute in strict mode.
15427         (gen_inlined_subroutine_die): Check option variables.
15428         (dwarf2out_inline_entry): Likewise.
15429         (init_sections_and_labels): Likewise.
15430         (dwarf2out_early_finish): Likewise.
15431         (maybe_reset_location_view): New, from...
15432         (dwarf2out_var_location): ... here.  Call it.
15433         * debug.h (dwarf2out_default_as_loc_support): Declare.
15434         (dwarf2out_default_as_locview_support): Declare.
15435         * hooks.c (hook_int_rtx_insn_0): New.
15436         * hooks.h (hook_int_rtx_insn_0): Declare.
15437         * toplev.c (process_options): Take -gas-loc-support and
15438         -gas-locview-support from dwarf2out.  Enable
15439         -gvariable-location-views by default only with locview
15440         assembler support.  Enable -ginternal-reset-location-views by
15441         default only if the target defines the corresponding hook.
15442         Enable -ginline-points by default if location views are
15443         enabled; force it disabled if statement frontiers are
15444         disabled.
15445         * tree-inline.c (expand_call_inline): Check option variables.
15446         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
15448 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
15450         PR tree-optimization/84321
15451         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
15452         handling.  Also check whether the anti-range contains any values
15453         that satisfy the mask; switch to a VR_RANGE if not.
15455 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
15457         PR sanitizer/84340
15458         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
15460 2018-02-13  Martin Jambor  <mjambor@suse.cz>
15462         PR c++/83990
15463         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
15464         of call statements, also set location of a load to a temporary.
15466 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
15468         * config/rl78/rl78.c (add_vector_labels): New function.
15469         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
15470         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
15471         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
15472         which checks that no arguments are passed.
15473         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
15474         * doc/extend.texi: Documentation for the new attribute.
15476 2018-02-13  Andreas Schwab  <schwab@suse.de>
15478         * config/riscv/linux.h (CPP_SPEC): Define.
15480 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
15482         PR target/84335
15483         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
15484         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
15485         OPTION_MASK_ISA_AES as first argument to def_builtin_const
15486         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
15487         instead of OPTION_MASK_ISA_PCLMUL as first argument to
15488         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
15489         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
15490         temporarily for AES and PCLMUL builtins.
15492         PR tree-optimization/84339
15493         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
15494         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
15495         Formatting fixes.
15497         PR middle-end/84309
15498         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
15499         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
15500         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
15501         inline function.
15502         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
15503         inline function.
15504         * omp-simd-clone.h: New file.
15505         * omp-simd-clone.c: Include omp-simd-clone.h.
15506         (expand_simd_clones): No longer static.
15507         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
15508         cgraph.h and omp-simd-clone.h.
15509         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
15510         (vect_recog_widen_shift_pattern): Formatting fix.
15511         (vect_pattern_recog_1): Don't check optab for calls.
15513         PR target/84336
15514         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
15515         operands[2] into a REG before using gen_lowpart on it.
15517 2018-02-12  Jeff Law  <law@redhat.com>
15519         PR target/83760
15520         * config/sh/sh.c (find_barrier): Consider a sibling call
15521         a barrier as well.
15523         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
15524         successfully back substituting a reg.
15526 2018-02-12  Richard Biener  <rguenther@suse.de>
15528         PR tree-optimization/84037
15529         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
15530         parameter, move visited init to caller.
15531         (vect_slp_analyze_operations): Separate cost from validity
15532         check, initialize visited once for all instances.
15533         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
15534         for all instances.
15535         * tree-vect-stmts.c (vect_model_simple_cost): Make early
15536         out an assert.
15537         (vect_model_promotion_demotion_cost): Likewise.
15538         (vectorizable_bswap): Guard cost modeling with !slp_node
15539         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
15540         SLP stmts.
15541         (vectorizable_call): Likewise.
15542         (vectorizable_conversion): Likewise.
15543         (vectorizable_assignment): Likewise.
15544         (vectorizable_shift): Likewise.
15545         (vectorizable_operation): Likewise.
15546         (vectorizable_store): Likewise.
15547         (vectorizable_load): Likewise.
15548         (vectorizable_condition): Likewise.
15549         (vectorizable_comparison): Likewise.
15551 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
15553         PR sanitizer/84307
15554         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15555         (ASAN_MARK): Fix fnspec to account for return value, change pointer
15556         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15558 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
15560         PR middle-end/83665
15561         * params.def (inline-min-speedup): Increase from 8 to 15.
15562         (max-inline-insns-auto): Decrease from 40 to 30.
15563         * ipa-split.c (consider_split): Add some buffer for function to
15564         be considered inlining candidate.
15565         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15566         default values.
15568 2018-02-12  Richard Biener  <rguenther@suse.de>
15570         PR tree-optimization/84037
15571         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
15572         matched stmts if we cannot swap the non-matched ones.
15574 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
15576         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
15577         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
15578         _mm_maskz_scalef_round_ss): New intrinsics.
15579         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
15580         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
15581         __builtin_ia32_scalefss_round): Remove.
15582         (__builtin_ia32_scalefsd_mask_round,
15583         __builtin_ia32_scalefss_mask_round): New intrinsics.
15584         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
15585         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
15586         ((match_operand:VF_128 2 "<round_nimm_predicate>"
15587         "<round_constraint>")): Changed to ...
15588         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
15589         "<round_scalar_constraint>")): ... this.
15590         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
15591         %0, %1, %2<round_op3>}"): Changed to ...
15592         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
15593         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
15594         %2<round_scalar_mask_op3>}"): ... this.
15595         * config/i386/subst.md (round_scalar_nimm_predicate): New.
15597 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
15599         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
15600         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
15601         (_mm_maskz_sqrt_round_ss): New intrinsics.
15602         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
15603         (__builtin_ia32_sqrtsd_mask_round)
15604         (__builtin_ia32_sqrtss_mask_round): New builtins.
15605         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
15606         (__builtin_ia32_sqrtss_round): Remove.
15607         (__builtin_ia32_sqrtsd_mask_round)
15608         (__builtin_ia32_sqrtss_mask_round): New builtins.
15609         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
15610         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
15611         ((match_operand:VF_128 1 "vector_operand"
15612         "xBm,<round_constraint>")): Changed to ...
15613         ((match_operand:VF_128 1 "vector_operand"
15614         "xBm,<round_scalar_constraint>")): ... this.
15615         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
15616         %0, %2, %<iptr>1<round_op3>}): Changed to ...
15617         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
15618         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
15619         %<iptr>1<round_scalar_mask_op3>}): ... this.
15620         ((set_attr "prefix" "<round_prefix>")): Changed to ...
15621         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
15623 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
15625         PR target/84266
15626         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
15627         Cast vec_cmpeq result to correct type.
15628         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15629         Cast vec_cmpgt result to correct type.
15631 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
15633         * final.c (final_scan_insn_1): Renamed from...
15634         (final_scan_insn): ... this.  New wrapper, to recover
15635         seen from the outermost call in recursive ones.
15636         * config/sparc/sparc.c (output_return): Drop seen from call.
15637         (output_sibcall): Likewise.
15638         * config/visium/visium.c (output_branch): Likewise.
15640 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
15642         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15643         function label.
15645 2018-02-10  Alan Modra  <amodra@gmail.com>
15647         PR target/84300
15648         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15649         Specify LR as an input.
15651 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
15653         PR sanitizer/83987
15654         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15655         remove_member_access_dummy_vars): New functions.
15656         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15657         lower_omp_1, execute_lower_omp): Use them.
15659         PR rtl-optimization/84308
15660         * shrink-wrap.c (spread_components): Release todo vector.
15662 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
15664         PR rtl-optimization/57193
15665         * ira-color.c (struct allocno_color_data): Add member
15666         conflict_allocno_hard_prefs.
15667         (update_conflict_allocno_hard_prefs): New.
15668         (bucket_allocno_compare_func): Add a preference based on
15669         conflict_allocno_hard_prefs.
15670         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15671         (color_allocnos): Remove a dead code.  Initiate
15672         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
15674 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
15676         PR target/84226
15677         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15678         constraint from =wa to wa.  Avoid a subreg on the output operand,
15679         instead use a pseudo and subreg it in a move.
15680         (p9_xxbrd_<mode>): Changed to ...
15681         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15682         (p9_xxbrd_v2df): New expander.
15683         (p9_xxbrw_<mode>): Changed to ...
15684         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15685         (p9_xxbrw_v4sf): New expander.
15687 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
15689         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15691 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
15693         PR target/83926
15694         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15695         multiply in 32-bit mode.
15696         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15697         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15698         mode.
15700 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
15702         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15703         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15704         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15705         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15707 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
15709         PR lto/84213
15710         * dwarf2out.c (is_trivial_indirect_ref): New function.
15711         (dwarf2out_late_global_decl): Do not generate a location
15712         attribute for variables that have a non-trivial DECL_VALUE_EXPR
15713         and that are not defined in the current unit.
15715 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
15717         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15718         instead of a libcall for UNORDERED.
15720 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
15722         PR target/82641
15723         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15724         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15726 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15728         PR target/PR84295
15729         * config/s390/s390.c (s390_set_current_function): Invoke
15730         s390_indirect_branch_settings also if fndecl didn't change.
15732 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
15734         * config/rs6000/rs6000.md (blockage): Set length to zero.
15736 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
15738         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15740 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
15742         PR sanitizer/84285
15743         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15744         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15745         -static-lib*san.
15747         PR debug/84252
15748         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15749         PARALLEL incoming that failed vt_get_decl_and_offset check.
15751         PR middle-end/84237
15752         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15753         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15754         TREE_READONLY bit.
15755         (get_variable_section): For decls in named .bss* sections pass true as
15756         second argument to bss_initializer_p.
15758 2018-02-09  Marek Polacek  <polacek@redhat.com>
15759             Jakub Jelinek  <jakub@redhat.com>
15761         PR c++/83659
15762         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15763         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
15764         Sync some changes from cxx_fold_indirect_ref.
15766 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
15768         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15769         markers.
15770         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15771         (BLOCK_INLINE_ENTRY_LABEL): New.
15772         (dwarf2out_var_location): Disregard inline entry markers.
15773         (inline_entry_data): New struct.
15774         (inline_entry_data_hasher): New hashtable type.
15775         (inline_entry_data_hasher::hash): New.
15776         (inline_entry_data_hasher::equal): New.
15777         (inline_entry_data_table): New variable.
15778         (add_high_low_attributes): Add DW_AT_entry_pc and
15779         DW_AT_GNU_entry_view attributes if a pending entry is found
15780         in inline_entry_data_table.  Add old entry_pc attribute only
15781         if debug nonbinding markers are disabled.
15782         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15783         markers are enabled.
15784         (block_within_block_p, dwarf2out_inline_entry): New.
15785         (dwarf2out_finish): Check that no entries remained in
15786         inline_entry_data_table.
15787         * final.c (reemit_insn_block_notes): Handle inline entry notes.
15788         (final_scan_insn, notice_source_line): Likewise.
15789         (rest_of_clean_state): Skip inline entry markers.
15790         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15791         markers.
15792         * gimple.c (gimple_build_debug_inline_entry): New.
15793         * gimple.h (enum gimple_debug_subcode): Add
15794         GIMPLE_DEBUG_INLINE_ENTRY.
15795         (gimple_build_debug_inline_entry): Declare.
15796         (gimple_debug_inline_entry_p): New.
15797         (gimple_debug_nonbind_marker_p): Adjust.
15798         * insn-notes.def (INLINE_ENTRY): New.
15799         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15800         inline entry marker notes.
15801         (print_insn): Likewise.
15802         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15803         (INSN_DEBUG_MARKER_KIND): Likewise.
15804         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15805         * tree-inline.c (expand_call_inline): Build and insert
15806         debug_inline_entry stmt.
15807         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15808         inline entry blocks early, if nonbind markers are enabled.
15809         (dump_scope_block): Dump fragment info.
15810         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15811         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15812         (gimple_build_debug_inline_entry): New.
15813         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15814         Enable/disable inline entry points too.
15815         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15816         (DEBUG_INSN): Describe inline entry markers.
15818         * common.opt (gvariable-location-views): New.
15819         (gvariable-location-views=incompat5): New.
15820         * config.in: Rebuilt.
15821         * configure: Rebuilt.
15822         * configure.ac: Test assembler for view support.
15823         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15824         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15825         * dwarf2out.c (var_loc_view): New typedef.
15826         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15827         (dwarf2out_locviews_in_attribute): New.
15828         (dwarf2out_locviews_in_loclist): New.
15829         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15830         (enum dw_line_info_opcode): Add LI_adv_address.
15831         (struct dw_line_info_table): Add view.
15832         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15833         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15834         (zero_view_p): New variable.
15835         (ZERO_VIEW_P): New macro.
15836         (output_asm_line_debug_info): New.
15837         (struct var_loc_node): Add view.
15838         (add_AT_view_list, AT_loc_list): New.
15839         (add_var_loc_to_decl): Add view param.  Test it against last.
15840         (new_loc_list): Add view params.  Record them.
15841         (AT_loc_list_ptr): Handle loc and view lists.
15842         (view_list_to_loc_list_val_node): New.
15843         (print_dw_val): Handle dw_val_class_view_list.
15844         (size_of_die): Likewise.
15845         (value_format): Likewise.
15846         (loc_list_has_views): New.
15847         (gen_llsym): Set vl_symbol too.
15848         (maybe_gen_llsym, skip_loc_list_entry): New.
15849         (dwarf2out_maybe_output_loclist_view_pair): New.
15850         (output_loc_list): Output view list or entries too.
15851         (output_view_list_offset): New.
15852         (output_die): Handle dw_val_class_view_list.
15853         (output_dwarf_version): New.
15854         (output_compilation_unit_header): Use it.
15855         (output_skeleton_debug_sections): Likewise.
15856         (output_rnglists, output_line_info): Likewise.
15857         (output_pubnames, output_aranges): Update version comments.
15858         (output_one_line_info_table): Output view numbers in asm comments.
15859         (dw_loc_list): Determine current endview, pass it to new_loc_list.
15860         Call maybe_gen_llsym.
15861         (loc_list_from_tree_1): Adjust.
15862         (add_AT_location_description): Create view list attribute if
15863         needed, check it's absent otherwise.
15864         (convert_cfa_to_fb_loc_list): Adjust.
15865         (maybe_emit_file): Call output_asm_line_debug_info for test.
15866         (dwarf2out_var_location): Reset views as needed.  Precompute
15867         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
15868         attribute.  Set view.
15869         (new_line_info_table): Reset next view.
15870         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15871         (dwarf2out_source_line): Likewise.  Output view resets and labels to
15872         the assembler, or select appropriate line info opcodes.
15873         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15874         (optimize_string_length): Catch it.  Adjust.
15875         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
15876         dw_val_class_view_list, and remove it if no longer needed.
15877         (hash_loc_list): Hash view numbers.
15878         (loc_list_hasher::equal): Compare them.
15879         (optimize_location_lists): Check whether a view list symbol is
15880         needed, and whether the locview attribute is present, and
15881         whether they match.  Remove the locview attribute if no longer
15882         needed.
15883         (index_location_lists): Call skip_loc_list_entry for test.
15884         (dwarf2out_finish): Call output_asm_line_debug_info for test.
15885         Use output_dwarf_version.
15886         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15887         (struct dw_val_node): Add val_view_list.
15888         * final.c (SEEN_NEXT_VIEW): New.
15889         (set_next_view_needed): New.
15890         (clear_next_view_needed): New.
15891         (maybe_output_next_view): New.
15892         (final_start_function): Rename to...
15893         (final_start_function_1): ... this.  Take pointer to FIRST,
15894         add SEEN parameter.  Emit param bindings in the initial view.
15895         (final_start_function): Reintroduce SEEN-less interface.
15896         (final): Rename to...
15897         (final_1): ... this.  Take SEEN parameter.  Output final pending
15898         next view at the end.
15899         (final): Reintroduce seen-less interface.
15900         (final_scan_insn): Output pending next view before switching
15901         sections or ending a block.  Mark the next view as needed when
15902         outputting variable locations.  Notify debug backend of section
15903         changes, and of location view changes.
15904         (rest_of_handle_final): Adjust.
15905         * toplev.c (process_options): Autodetect value for debug variable
15906         location views option.  Warn on incompat5 without -gdwarf-5.
15907         * doc/invoke.texi (gvariable-location-views): New.
15908         (gvariable-location-views=incompat5): New.
15909         (gno-variable-location-views): New.
15911 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
15913         PR tree-optimization/84136
15914         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15915         that the result of find_edge is non-NULL.
15917 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
15919         PR target/83008
15920         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15921         storing integer register in SImode.  Fix cost of 256 and 512
15922         byte aligned SSE register store.
15924 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
15926         * config/i386/i386.c (ix86_multiplication_cost): Fix
15927         multiplication cost for TARGET_AVX512DQ.
15929 2018-02-08  Marek Polacek  <polacek@redhat.com>
15931         PR tree-optimization/84238
15932         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15933         get_range_strlen.
15935 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
15937         PR tree-optimization/84265
15938         * tree-vect-stmts.c (vectorizable_store): Don't treat
15939         VMAT_CONTIGUOUS accesses as grouped.
15940         (vectorizable_load): Likewise.
15942 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
15944         PR tree-optimization/81635
15945         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15946         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15947         (test_round_for_mask): New functions.
15948         (wide_int_cc_tests): Call test_round_for_mask.
15949         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15950         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15951         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15952         range returned by get_range_info.
15954 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
15956         PR ipa/81360
15957         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15958         * symtab.c: Include builtins.h
15959         (symtab_node::output_to_lto_symbol_table_p): Move here
15960         from lto-streamer-out.c:output_symbol_p.
15961         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15962         (output_symbol_p): Move all logic to symtab.c
15963         (produce_symtab): Update.
15965 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15967         * config/s390/s390-opts.h (enum indirect_branch): Define.
15968         * config/s390/s390-protos.h (s390_return_addr_from_memory)
15969         (s390_indirect_branch_via_thunk)
15970         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15971         (enum s390_indirect_branch_type): Define.
15972         * config/s390/s390.c (struct s390_frame_layout, struct
15973         machine_function): Remove.
15974         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15975         (indirect_branch_table_label_no, indirect_branch_table_name):
15976         Define variables.
15977         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
15978         (enum s390_indirect_branch_option): Define.
15979         (s390_return_addr_from_memory): New function.
15980         (s390_handle_string_attribute): New function.
15981         (s390_attribute_table): Add new attribute handler.
15982         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
15983         (s390_indirect_branch_via_thunk): New function.
15984         (s390_indirect_branch_via_inline_thunk): New function.
15985         (s390_function_ok_for_sibcall): When jumping via thunk disallow
15986         sibling call optimization for non z10 compiles.
15987         (s390_emit_call): Force indirect branch target to be a single
15988         register.  Add r1 clobber for non-z10 compiles.
15989         (s390_emit_epilogue): Emit return jump via return_use expander.
15990         (s390_reorg): Handle JUMP_INSNs as execute targets.
15991         (s390_option_override_internal): Perform validity checks for the
15992         new command line options.
15993         (s390_indirect_branch_attrvalue): New function.
15994         (s390_indirect_branch_settings): New function.
15995         (s390_set_current_function): Invoke s390_indirect_branch_settings.
15996         (s390_output_indirect_thunk_function):  New function.
15997         (s390_code_end): Implement target hook.
15998         (s390_case_values_threshold): Implement target hook.
15999         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16000         macros.
16001         * config/s390/s390.h (struct s390_frame_layout)
16002         (struct machine_function): Move here from s390.c.
16003         (TARGET_INDIRECT_BRANCH_NOBP_RET)
16004         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16005         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16006         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16007         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16008         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16009         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16010         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16011         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16012         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16013         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16014         (mnemonic attribute): Add values which aren't recognized
16015         automatically.
16016         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16017         pattern for branch conversion.  Fix mnemonic attribute.
16018         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16019         indirect branch via thunk if requested.
16020         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16021         ("*indirect_jump"): Disable for branch conversion using out of
16022         line thunks.
16023         ("indirect_jump_via_thunk<mode>_z10")
16024         ("indirect_jump_via_thunk<mode>")
16025         ("indirect_jump_via_inlinethunk<mode>_z10")
16026         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16027         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16028         ("casesi_jump_via_inlinethunk<mode>_z10")
16029         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16030         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16031         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16032         ("*indirect2_jump"): Disable for branch conversion.
16033         ("casesi_jump"): Turn into expander and expand patterns for branch
16034         conversion.
16035         ("return_use"): New expander.
16036         ("*return"): Emit return via thunk and rename it to ...
16037         ("*return<mode>"): ... this one.
16038         * config/s390/s390.opt: Add new options and and enum for the
16039         option values.
16041 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16043         * lra-constraints.c (match_reload): Unconditionally use
16044         gen_lowpart_SUBREG, rather than selecting between that
16045         and equivalent gen_rtx_SUBREG code.
16047 2018-02-08  Richard Biener  <rguenther@suse.de>
16049         PR tree-optimization/84233
16050         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
16051         changed flag instead of boguously re-using phi_inserted.
16053 2018-02-08  Martin Jambor  <mjambor@suse.cz>
16055         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
16056         static local variables.
16058 2018-02-08  Richard Biener  <rguenther@suse.de>
16060         PR tree-optimization/84278
16061         * tree-vect-stmts.c (vectorizable_store): When looking for
16062         smaller vector types to perform grouped strided loads/stores
16063         make sure the mode is supported by the target.
16064         (vectorizable_load): Likewise.
16066 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
16068         * config/aarch64/aarch64.c (aarch64_components_for_bb):
16069         Increase LDP/STP opportunities by adding adjacent callee-saves.
16071 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
16073         PR rtl-optimization/84068
16074         PR rtl-optimization/83459
16075         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
16077 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
16079         PR tree-optimization/84224
16080         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16081         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
16082         non-zero arguments.
16084 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
16086         PR target/84113
16087         * config/rs6000/altivec.md (*restore_world): Remove LR use.
16088         * config/rs6000/predicates.md (restore_world_operation): Adjust op
16089         count, remove one USE.
16091 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
16093         * doc/install.texi (Configuration): Document the
16094         --with-long-double-format={ibm,ieee} PowerPC configuration
16095         options.
16097         PR target/84154
16098         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
16099         Convert from define_expand to be define_insn_and_split.  Rework
16100         float/double/_Float128 conversions to QI/HI/SImode to work with
16101         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
16102         conversions to QI/HImode types did a store and then a load to
16103         truncate the value.  For conversions to VSX registers, don't split
16104         the insn, instead emit the code directly.  Use the code iterator
16105         any_fix to combine signed and unsigned conversions.
16106         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
16107         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
16108         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16109         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
16110         (fix_<mode>di2_hw): Likewise.
16111         (fixuns_<mode>di2_hw): Likewise.
16112         (fix_<mode>si2_hw): Likewise.
16113         (fixuns_<mode>si2_hw): Likewise.
16114         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
16115         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16116         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
16117         fix<uns>_trunc<SFDF:mode>si2_p8.
16118         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
16119         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
16120         (fix<uns>_<mode>_mem): Likewise.
16121         (fctiw<u>z_<mode>_mem): Likewise.
16122         (fix<uns>_<mode>_mem): Likewise.
16123         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
16124         the register allocator from doing a direct move to the GPRs to do
16125         a store, and instead use the ISA 3.0 store byte/half-word from
16126         vector register instruction.  For IEEE 128-bit floating point,
16127         also optimize stores of 32-bit ints.
16128         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
16130 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
16132         * genextract.c (push_pathstr_operand): New function to support
16133         [a-zA-Z].
16134         (walk_rtx): Call push_pathstr_operand.
16135         (print_path): Support [a-zA-Z].
16137 2018-02-07  Richard Biener  <rguenther@suse.de>
16139         PR tree-optimization/84037
16140         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
16141         (cse_and_gimplify_to_preheader): Declare.
16142         (vect_get_place_in_interleaving_chain): Likewise.
16143         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16144         ivexpr_map.
16145         (_loop_vec_info::~_loop_vec_info): Delete it.
16146         (cse_and_gimplify_to_preheader): New function.
16147         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
16148         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
16149         (vectorizable_load): Likewise.  For grouped stores always base
16150         the IV on the first element.
16151         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
16152         condition before gimplifying.
16154 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
16156         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
16157         *DIV_EXPR and *MOD_EXPR.
16159 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
16161         PR target/84248
16162         * config/i386/i386.c (ix86_option_override_internal): Mask out
16163         the CF_SET bit when checking -fcf-protection.
16165 2018-02-07  Tom de Vries  <tom@codesourcery.com>
16167         PR libgomp/84217
16168         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
16169         enough.
16171 2018-02-07  Richard Biener  <rguenther@suse.de>
16173         PR tree-optimization/84204
16174         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
16175         this place.
16177         PR tree-optimization/84205
16178         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
16179         special-case isl_ast_op_zdiv_r.
16181         PR tree-optimization/84223
16182         * graphite-scop-detection.c (gather_bbs::before_dom_children):
16183         Only add conditions from within the region.
16184         (gather_bbs::after_dom_children): Adjust.
16186 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
16188         PR target/84209
16189         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
16190         * config/avr/avr.md: Only post-reload split REG-REG moves if
16191         either register is GENERAL_REG_P.
16193 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
16195         PR tree-optimization/84235
16196         * tree-ssa-scopedtables.c
16197         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
16198         if the subtraction is performed in floating point type where NaNs are
16199         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
16200         build 1.  Formatting fix.
16202 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
16204         PR target/84146
16205         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
16206         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
16207         and skip it regardless of bb boundaries.  Use CALL_P macro,
16208         don't test INSN_P (insn) together with CALL_P or JUMP_P check
16209         unnecessarily, formatting fix.
16211 2018-02-06  Michael Collison  <michael.collison@arm.com>
16213         * config/arm/thumb2.md:
16214         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
16215         (*thumb_mov_notscc): Ditto.
16217 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
16219         PR target/84154
16220         * config/rs6000/rs6000.md (su code attribute): Use "u" for
16221         unsigned_fix, not "s".
16223 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16225         * configure.ac (gcc_fn_eh_frame_ro): New function.
16226         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
16227         correct .eh_frame permissions.
16228         * configure: Regenerate.
16230 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
16232         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
16233         irrelevant options.
16235 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16237         * config/rs6000/rs6000.c (rs6000_option_override_internal):
16238         Display warning message for -mno-speculate-indirect-jumps.
16240 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
16242         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
16243         Undocumented.
16244         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
16246 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
16248         PR tree-optimization/84225
16249         * tree-eh.c (find_trapping_overflow): Only call
16250         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
16252 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16254         PR target/84145
16255         * config/i386/i386.c: Reimplement the check of possible options
16256         -mibt/-mshstk conbination. Change error messages.
16257         * doc/invoke.texi: Fix a typo: remove extra '='.
16259 2018-02-06  Marek Polacek  <polacek@redhat.com>
16261         PR tree-optimization/84228
16262         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
16264 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
16266         PR target/82641
16267         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
16268         emitted arch directives.
16269         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
16270         __ARM_FEATURE_COPROC before changing architectures.
16272 2018-02-06  Richard Biener  <rguenther@suse.de>
16274         * config/i386/i386.c (print_reg): Fix typo.
16275         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
16277 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
16279         * configure: Regenerate.
16281 2018-02-05  Martin Sebor  <msebor@redhat.com>
16283         PR tree-optimization/83369
16284         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
16285         inlining context.
16287 2018-02-05  Martin Liska  <mliska@suse.cz>
16289         * doc/invoke.texi: Cherry-pick upstream r323995.
16291 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
16293         * ira.c (ira_init_register_move_cost): Adjust comment.
16295 2018-02-05  Martin Liska  <mliska@suse.cz>
16297         PR gcov-profile/84137
16298         * doc/gcov.texi: Fix typo in documentation.
16300 2018-02-05  Martin Liska  <mliska@suse.cz>
16302         PR gcov-profile/83879
16303         * doc/gcov.texi: Document necessity of --dynamic-list-data when
16304         using dlopen functionality.
16306 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
16308         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
16309         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
16310         _mm_maskz_range_ss, _mm_mask_range_round_ss,
16311         _mm_maskz_range_round_ss): New intrinsics.
16312         (__builtin_ia32_rangesd128_round)
16313         (__builtin_ia32_rangess128_round): Remove.
16314         (__builtin_ia32_rangesd128_mask_round,
16315         __builtin_ia32_rangess128_mask_round): New builtins.
16316         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
16317         __builtin_ia32_rangess128_round): Remove.
16318         (__builtin_ia32_rangesd128_mask_round,
16319         __builtin_ia32_rangess128_mask_round): New builtins.
16320         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
16321         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
16322         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
16323         "<round_saeonly_constraint>")): Changed to ...
16324         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
16325         "<round_saeonly_scalar_constraint>")): ... this.
16326         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
16327         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
16328         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
16329         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
16330         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
16332 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
16334         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
16335         options.
16336         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
16337         Remove all values except native, 8540 and 8548.
16339 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
16341         * config/i386/i386.c (ix86_output_function_return): Pass
16342         INVALID_REGNUM, instead of -1, as invalid register number to
16343         indirect_thunk_name and output_indirect_thunk.
16345 2018-02-02  Julia Koval  <julia.koval@intel.com>
16347         * config.gcc: Add -march=icelake.
16348         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
16349         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
16350         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
16351         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
16352         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
16353         (processor_target_table): Add icelake.
16354         (ix86_option_override_internal): Handle new PTAs.
16355         (get_builtin_code_for_version): Handle icelake.
16356         (M_INTEL_COREI7_ICELAKE): New.
16357         (fold_builtin_cpu): Handle icelake.
16358         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
16359         * doc/invoke.texi: Add -march=icelake.
16361 2018-02-02  Julia Koval  <julia.koval@intel.com>
16363         * config/i386/i386.c (ix86_option_override_internal): Change flags type
16364         to wide_int_bitmask.
16365         * wide-int-bitmask.h: New.
16367 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16369         PR target/84066
16370         * config/i386/i386.md: Replace Pmode with word_mode in
16371         builtin_setjmp_setup and builtin_longjmp to support x32.
16373 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
16375         PR target/56010
16376         PR target/83743
16377         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
16378         #include "opts.h".
16379         (rs6000_supported_cpu_names): New static variable.
16380         (linux_cpu_translation_table): Likewise.
16381         (elf_platform) <cpu>: Define new static variable and use it.
16382         Translate kernel AT_PLATFORM name to canonical name if needed.
16383         Error if platform name is unknown.
16385 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
16387         PR target/84089
16388         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16390 2018-02-01  Jeff Law  <law@redhat.com>
16392         PR target/84128
16393         * config/i386/i386.c (release_scratch_register_on_entry): Add new
16394         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
16395         the scratch if RELEASE_VIA_POP is false.
16396         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16397         If we have to save a temporary register, decrement SIZE appropriately.
16398         Pass new arguments to release_scratch_register_on_entry.
16399         (ix86_adjust_stack_and_probe): Likewise.
16400         (ix86_emit_probe_stack_range): Pass new arguments to
16401         release_scratch_register_on_entry.
16403 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
16405         PR rtl-optimization/84157
16406         * combine.c (change_zero_ext): Use REG_P predicate in
16407         front of HARD_REGISTER_P predicate.
16409 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
16411         * config/avr/avr.c (avr_option_override): Move disabling of
16412         -fdelete-null-pointer-checks to...
16413         * common/config/avr/avr-common.c (avr_option_optimization_table):
16414         ...here.
16416 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16418         PR tree-optimization/81635
16419         * tree-data-ref.c (split_constant_offset_1): For types that
16420         wrap on overflow, try to use range info to prove that wrapping
16421         cannot occur.
16423 2018-02-01  Renlin Li  <renlin.li@arm.com>
16425         PR target/83370
16426         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16427         TAILCALL_ADDR_REGS.
16428         (aarch64_register_move_cost): Likewise.
16429         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16430         TAILCALL_ADDR_REGS.
16431         (REG_CLASS_NAMES): Likewise.
16432         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
16433         TAILCALL_ADDR_REGS. Remove IP registers.
16434         * config/aarch64/aarch64.md (Ucs): Update register constraint.
16436 2018-02-01  Richard Biener  <rguenther@suse.de>
16438         * domwalk.h (dom_walker::dom_walker): Add additional constructor
16439         for specifying RPO order and allow NULL for that.
16440         * domwalk.c (dom_walker::dom_walker): Likewise.
16441         (dom_walker::walk): Handle NULL RPO order.
16442         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
16443         in RPO order.
16444         (rewrite_update_dom_walker): Likewise.
16445         (mark_def_dom_walker): Likewise.
16447 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16449         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
16450         (aarch64_maybe_expand_sve_subreg_move): Declare.
16451         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
16452         * config/aarch64/predicates.md (aarch64_any_register_operand): New
16453         predicate.
16454         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
16455         that are semantically a reverse operation.
16456         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
16457         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
16458         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
16459         functions.
16460         (aarch64_can_change_mode_class): For big-endian, forbid changes
16461         between two SVE modes if they have different element sizes.
16463 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16465         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
16466         the TImode handling for big-endian targets.
16468 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16470         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
16471         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
16472         not just bytes.
16473         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
16474         Remove BSWAP handing for big-endian targets and use the form of
16475         LD1RQ appropariate for the mode.
16477 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16479         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
16480         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
16481         duplicated element.
16483 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16485         PR tearget/83845
16486         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
16487         check for operands that need to go through aarch64_sve_reload_be.
16489 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
16491         PR tree-optimization/81661
16492         PR tree-optimization/84117
16493         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
16494         * tree-eh.c: Include gimplify.h.
16495         (find_trapping_overflow, replace_trapping_overflow,
16496         rewrite_to_non_trapping_overflow): New functions.
16497         * tree-vect-loop.c: Include tree-eh.h.
16498         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
16499         * tree-data-ref.c: Include tree-eh.h.
16500         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
16502 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
16504         PR rtl-optimization/84123
16505         * combine.c (change_zero_ext): Check if hard register satisfies
16506         can_change_dest_mode before calling gen_lowpart_SUBREG.
16508 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
16510         PR target/82444
16511         * ira.c (ira_init_register_move_cost): Remove assert.
16513 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
16515         PR rtl-optimization/84071
16516         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
16517         * doc/tm.texi: Regenerate.
16519 2018-01-31  Richard Biener  <rguenther@suse.de>
16521         PR tree-optimization/84132
16522         * tree-data-ref.c (analyze_miv_subscript): Properly
16523         check whether evolution_function_is_affine_multivariate_p
16524         before calling gcd_of_steps_may_divide_p.
16526 2018-01-31  Julia Koval  <julia.koval@intel.com>
16528         PR target/83618
16529         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
16530         * config/i386/i386.md (rdpid_rex64) New.
16531         (rdpid): Make 32bit only.
16533 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
16535         PR lto/84105
16536         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
16537         an IDENTIFIER_NODE for FUNCTION_TYPE's.
16539 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
16541         Revert
16542         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
16544         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16546 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
16548         PR rtl-optimization/84071
16549         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
16550         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
16552 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
16554         * config/arc/arc.c (arc_handle_aux_attribute): New function.
16555         (arc_attribute_table): Add 'aux' attribute.
16556         (arc_in_small_data_p): Consider aux like variables.
16557         (arc_is_aux_reg_p): New function.
16558         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16559         (arc_get_aux_arg): New function.
16560         (prepare_move_operands): Handle aux-register access.
16561         (arc_handle_aux_attribute): New function.
16562         * doc/extend.texi (ARC Variable attributes): Add subsection.
16564 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
16566         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16567         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16568         (arc_attribute_table): Add 'uncached' attribute.
16569         (arc_print_operand): Print '.di' flag for uncached memory
16570         accesses.
16571         (arc_in_small_data_p): Do not consider for small data the uncached
16572         types.
16573         (arc_is_uncached_mem_p): New function.
16574         * config/arc/predicates.md (compact_store_memory_operand): Check
16575         for uncached memory accesses.
16576         (nonvol_nonimm_operand): Likewise.
16577         * doc/extend.texi (ARC Type Attribute): New subsection.
16579 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
16581         PR c/84100
16582         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
16583         falign-loops=): Add Optimization flag.
16585 2018-01-30  Jeff Law  <law@redhat.com>
16587         PR target/84064
16588         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
16589         INT_REGISTERS_SAVED.  Check it prior to calling
16590         get_scratch_register_on_entry.
16591         (ix86_adjust_stack_and_probe): Similarly.
16592         (ix86_emit_probe_stack_range): Similarly.
16593         (ix86_expand_prologue): Corresponding changes.
16595 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16597         PR target/40411
16598         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
16599         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
16601 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
16603         PR target/84112
16604         * lra-constraints.c (curr_insn_transform): Process AND in the
16605         address.
16607 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
16609         PR rtl-optimization/83986
16610         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
16611         dependence against last_pending_memory_flush in addition to
16612         pending_jump_insns.
16614 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
16616         PR tree-optimization/81611
16617         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
16618         copies.
16620 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16622         PR target/83758
16623         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
16624         a reg rtx.
16626 2018-01-30  Richard Biener  <rguenther@suse.de>
16627             Jakub Jelinek  <jakub@redhat.com>
16629         PR tree-optimization/84111
16630         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16631         inner loops added during recursion, as they don't have up-to-date
16632         SSA form.
16634 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
16636         PR ipa/81360
16637         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16638         (can_inline_edge_by_limits_p): ... here.
16639         (can_early_inline_edge_p, check_callers,
16640         update_caller_keys, update_callee_keys, recursive_inlining,
16641         add_new_edges_to_heap, speculation_useful_p,
16642         inline_small_functions,
16643         inline_small_functions, flatten_function,
16644         inline_to_all_callers_1): Update.
16646 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
16648         * profile-count.c (profile_count::combine_with_ipa_count): Handle
16649         zeros correctly.
16651 2018-01-30  Richard Biener  <rguenther@suse.de>
16653         PR tree-optimization/83008
16654         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16655         invariant and constant vector uses in stmts when they need
16656         more than one stmt.
16658 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16660         PR bootstrap/84017
16661         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16662         * configure: Regenerate.
16664 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
16666         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16667         pattern.
16668         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16669         Use gen_rtx_REG rather than gen_lowpart.
16671 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
16673         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16674         rather than 0 when creating partial subregs.
16676 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
16678         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16679         of usage.
16681 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
16683         PR target/81550
16684         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16685         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16686         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16687         flags.  This restores the settings used before the 2017-07-24.
16688         Turning off pre increment/decrement/modify allows IVOPTS to
16689         optimize DF/SF loops where the index is an int.
16691 2018-01-29  Richard Biener  <rguenther@suse.de>
16692             Kelvin Nilsen  <kelvin@gcc.gnu.org>
16694         PR bootstrap/80867
16695         * tree-vect-stmts.c (vectorizable_call): Don't call
16696         targetm.vectorize_builtin_md_vectorized_function if callee is
16697         NULL.
16699 2018-01-22  Carl Love  <cel@us.ibm.com>
16701         * doc/extend.tex: Fix typo in second arg in
16702         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16704 2018-01-29  Richard Biener  <rguenther@suse.de>
16706         PR tree-optimization/84086
16707         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16708         (flush_ssaname_freelist): When SSA names were released reset
16709         the SCEV hash table.
16711 2018-01-29  Richard Biener  <rguenther@suse.de>
16713         PR tree-optimization/84057
16714         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16715         removed paths when removing edges.
16717 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
16719         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16720         -mfunction-return=@var{choice}.
16722 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
16724         PR diagnostic/84034
16725         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16726         Handle CR like TAB.
16727         (layout::print_source_line): Likewise.
16728         (test_get_line_width_without_trailing_whitespace): Add test cases.
16730 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
16732         PR middle-end/84040
16733         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16734         debug insns.
16736 2018-01-26  Jim Wilson  <jimw@sifive.com>
16738         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16740         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16741         specified.
16743 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16745         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16746         and CMP + SUB-immediate -> SUBS.
16748 2018-01-26  Martin Sebor  <msebor@redhat.com>
16750         PR tree-optimization/83896
16751         * tree-ssa-strlen.c (get_string_len): Rename...
16752         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
16753         Avoid assuming length is constant.
16754         (handle_char_store): Use HOST_WIDE_INT for string length.
16756 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
16758         PR target/81763
16759         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16760         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16762 2018-01-26  Richard Biener  <rguenther@suse.de>
16764         PR rtl-optimization/84003
16765         * dse.c (record_store): Only record redundant stores when
16766         the earlier store aliases at least all accesses the later one does.
16768 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
16770         PR rtl-optimization/83985
16771         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16772         REG_CFA_RESTORE insns.
16773         (delete_unmarked_insns): Don't ignore separate shrink wrapping
16774         REG_CFA_RESTORE insns here.
16776         PR c/83989
16777         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16778         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16780 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16782         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16783         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16784         (arc_init): Likewise.
16785         (arc_override_options): Likewise.
16786         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16787         value.
16788         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16789         support.
16790         * config/arc/arc.h (TARGET_DBNZ): Define.
16791         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16792         properly set the tune attribute.
16793         (dbnz): Use TARGET_DBNZ guard.
16794         * config/arc/arc.opt (mtune): Add core3 option.
16796 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16798         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16799         recognize new pic like addresses.
16800         (arc_delegitimize_address): Clean up.
16802 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16804         * config/arc/arc-arches.def: Option mrf16 valid for all
16805         architectures.
16806         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16807         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16808         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16809         * config/arc/arc-tables.opt: Regenerate.
16810         * config/arc/arc.c (arc_conditional_register_usage): Handle
16811         reduced register file case.
16812         (arc_file_start): Set must have build attributes.
16813         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16814         mrf16 option value.
16815         * config/arc/arc.opt (mrf16): Add new option.
16816         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16817         * config/arc/genmultilib.awk: Handle new mrf16 option.
16818         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16819         * config/arc/t-multilib: Regenerate.
16820         * doc/invoke.texi (ARC Options): Document mrf16 option.
16822 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16824         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16825         * config/arc/arc.c (arc_handle_secure_attribute): New function.
16826         (arc_attribute_table): Add 'secure_call' attribute.
16827         (arc_print_operand): Print secure call operand.
16828         (arc_function_ok_for_sibcall): Don't optimize tail calls when
16829         secure.
16830         (arc_is_secure_call_p): New function.  * config/arc/arc.md
16831         (call_i): Add support for sjli instruction.
16832         (call_value_i): Likewise.
16833         * config/arc/constraints.md (Csc): New constraint.
16835 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16836             John Eric Martin  <John.Martin@emmicro-us.com>
16838         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16839         * config/arc/arc.c (_arc_jli_section): New struct.
16840         (arc_jli_section): New type.
16841         (rc_jli_sections): New static variable.
16842         (arc_handle_jli_attribute): New function.
16843         (arc_attribute_table): Add jli_always and jli_fixed attribute.
16844         (arc_file_end): New function.
16845         (TARGET_ASM_FILE_END): Define.
16846         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16847         (arc_add_jli_section): New function.
16848         (jli_call_scan): Likewise.
16849         (arc_reorg): Call jli_call_scan.
16850         (arc_output_addsi): Remove 'S' from printing asm operand.
16851         (arc_is_jli_call_p): New function.
16852         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16853         operand.
16854         (movhi_insn): Likewise.
16855         (movsi_insn): Likewise.
16856         (movsi_set_cc_insn): Likewise.
16857         (loadqi_update): Likewise.
16858         (load_zeroextendqisi_update): Likewise.
16859         (load_signextendqisi_update): Likewise.
16860         (loadhi_update): Likewise.
16861         (load_zeroextendhisi_update): Likewise.
16862         (load_signextendhisi_update): Likewise.
16863         (loadsi_update): Likewise.
16864         (loadsf_update): Likewise.
16865         (movsicc_insn): Likewise.
16866         (bset_insn): Likewise.
16867         (bxor_insn): Likewise.
16868         (bclr_insn): Likewise.
16869         (bmsk_insn): Likewise.
16870         (bicsi3_insn): Likewise.
16871         (cmpsi_cc_c_insn): Likewise.
16872         (movsi_ne): Likewise.
16873         (movsi_cond_exec): Likewise.
16874         (clrsbsi2): Likewise.
16875         (norm_f): Likewise.
16876         (normw): Likewise.
16877         (swap): Likewise.
16878         (divaw): Likewise.
16879         (flag): Likewise.
16880         (sr): Likewise.
16881         (kflag): Likewise.
16882         (ffs): Likewise.
16883         (ffs_f): Likewise.
16884         (fls): Likewise.
16885         (call_i): Remove 'S' asm letter, add jli instruction.
16886         (call_value_i): Likewise.
16887         * config/arc/arc.op (mjli-always): New option.
16888         * config/arc/constraints.md (Cji): New constraint.
16889         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16890         operand.
16891         (subsf3_fpx): Likewise.
16892         (mulsf3_fpx): Likewise.
16893         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16894         asm operand.
16895         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16896         function attrbutes.
16897         * doc/invoke.texi (ARC): Document mjli-always option.
16899 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
16901         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16902         avoid addition with 0 and use incw and decw where possible.
16904 2018-01-26  Richard Biener  <rguenther@suse.de>
16906         PR tree-optimization/81082
16907         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16908         association if it requires casting to unsigned.
16909         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16910         from fold_plusminus_mult_expr to catch important cases late when
16911         range info is available.
16913 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16915         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16916         * configure.ac (hidden_linkonce): New test.
16917         * configure: Regenerate.
16918         * config.in: Regenerate.
16920 2018-01-26  Julia Koval  <julia.koval@intel.com>
16922         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16923         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16924         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16925         _mm_mask_bitshuffle_epi64_mask): Fix type.
16926         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16927         USI_FTYPE_V4DI_V4DI_USI): Remove.
16928         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16929         __builtin_ia32_vpshufbitqmb256_mask,
16930         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16931         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16932         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16934 2018-01-26  Alan Modra  <amodra@gmail.com>
16936         PR target/84033
16937         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16938         UNSPEC_VBPERMQ.  Sort other unspecs.
16940 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
16942         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16944 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
16946         PR middle-end/83055
16947         * predict.c (drop_profile): Do not push/pop cfun; update also
16948         node->count.
16949         (handle_missing_profiles): Fix logic looking for zero profiles.
16951 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
16953         PR middle-end/83977
16954         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16955         on functions with #pragma omp declare simd or functions with simd
16956         attribute.
16957         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16958         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16959         Remove trailing \n from warning_at calls.
16961 2018-01-25  Tom de Vries  <tom@codesourcery.com>
16963         PR target/84028
16964         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16965         for neutered workers.
16967 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
16969         PR target/68467
16970         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16971         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16973 2018-01-24  Jeff Law  <law@redhat.com>
16975         PR target/83994
16976         * i386.c (get_probe_interval): Move to earlier point.
16977         (ix86_compute_frame_layout): If -fstack-clash-protection and
16978         the frame is larger than the probe interval, then use pushes
16979         to save registers rather than reg->mem moves.
16980         (ix86_expand_prologue): Remove conditional for int_registers_saved
16981         assertion.
16983 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
16985         PR target/84014
16986         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
16987         min/max for never referenced object.
16989 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
16991         PR middle-end/83977
16992         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
16993         here.
16994         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
16995         attributes from DECL_ATTRIBUTES (decl) without affecting
16996         DECL_ATTRIBUTES (current_function_decl).
16997         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
16998         functions with non-NULL DECL_ABSTRACT_ORIGIN.
17000 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
17002         PR tree-optimization/83979
17003         * fold-const.c (fold_comparison): Use constant_boolean_node
17004         instead of boolean_{true,false}_node.
17006 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
17008         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17009         with zero counts.
17011 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17013         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17014         Simplify the clause that sets the length attribute.
17015         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17016         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17017         clause that sets the length attribute.
17018         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17020 2018-01-24  Tom de Vries  <tom@codesourcery.com>
17022         PR target/83589
17023         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17024         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17025         Add strict parameter.
17026         (prevent_branch_around_nothing): Insert dummy insn between branch to
17027         label and label with no ptx insn inbetween.
17028         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17030 2018-01-24  Tom de Vries  <tom@codesourcery.com>
17032         PR target/81352
17033         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17034         for neutered threads in warp.
17035         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17037 2018-01-24  Richard Biener  <rguenther@suse.de>
17039         PR tree-optimization/83176
17040         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17041         operands.
17043 2018-01-24  Richard Biener  <rguenther@suse.de>
17045         PR tree-optimization/82819
17046         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
17047         code generating pluses that are no-ops in the target precision.
17049 2018-01-24  Richard Biener  <rguenther@suse.de>
17051         PR middle-end/84000
17052         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
17054 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17056         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
17057         to merge probabilities.
17058         * predict.c (probably_never_executed): Also mark as cold functions
17059         with global 0 profile and guessed local profile.
17060         * profile-count.c (profile_probability::combine_with_count): New
17061         member function.
17062         * profile-count.h (profile_probability::operator*,
17063         profile_probability::operator*=, profile_probability::operator/,
17064         profile_probability::operator/=): Reduce precision to adjusted
17065         and set value to guessed on contradictory divisions.
17066         (profile_probability::combine_with_freq): Remove.
17067         (profile_probability::combine_wiht_count): Declare.
17068         (profile_count::force_nonzero):: Set to adjusted.
17069         (profile_count::probability_in):: Set quality to adjusted.
17070         * tree-ssa-tail-merge.c (replace_block_by): Use
17071         combine_with_count.
17073 2018-01-23  Andrew Waterman  <andrew@sifive.com>
17074             Jim Wilson  <jimw@sifive.com>
17076         * config/riscv/riscv.c (riscv_stack_boundary): New.
17077         (riscv_option_override): Set riscv_stack_boundary.  Handle
17078         riscv_preferred_stack_boundary_arg.
17079         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17080         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17081         (STACK_BOUNDARY): Set to riscv_stack_boundary.
17082         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
17083         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
17084         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
17086 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
17088         PR target/83905
17089         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
17090         of struct ix86_frame.
17091         (ix86_expand_epilogue): Likewise.  Add a local variable for
17092         the reg_save_offset field in struct ix86_frame.
17094 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
17096         PR tree-optimization/82604
17097         * tree-loop-distribution.c (enum partition_kind): New enum item
17098         PKIND_PARTIAL_MEMSET.
17099         (partition_builtin_p): Support above new enum item.
17100         (generate_code_for_partition): Ditto.
17101         (compute_access_range): Differentiate cases that equality can be
17102         proven at all loops, the innermost loops or no loops.
17103         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
17104         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
17105         (finalize_partitions, distribute_loop): Don't fuse partition of
17106         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
17107         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
17108         parloop is enabled.
17110 2018-01-23  Martin Liska  <mliska@suse.cz>
17112         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
17113         order to ignore the predictor.
17114         (PRED_POLYMORPHIC_CALL): Likewise.
17115         (PRED_RECURSIVE_CALL): Likewise.
17117 2018-01-23  Martin Liska  <mliska@suse.cz>
17119         * tree-profile.c (tree_profiling): Print function header to
17120         aware reader which function we are working on.
17121         * value-prof.c (gimple_find_values_to_profile): Do not print
17122         not interesting value histograms.
17124 2018-01-23  Martin Liska  <mliska@suse.cz>
17126         * profile-count.h (enum profile_quality): Add
17127         profile_uninitialized as the first value. Do not number values
17128         as they are zero based.
17129         (profile_count::verify): Update sanity check.
17130         (profile_probability::verify): Likewise.
17132 2018-01-23  Nathan Sidwell  <nathan@acm.org>
17134         * doc/invoke.texi (ffor-scope): Deprecate.
17136 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17138         PR tree-optimization/83510
17139         * domwalk.c (set_all_edges_as_executable): New function.
17140         (dom_walker::dom_walker): Convert bool param
17141         "skip_unreachable_blocks" to enum reachability.  Move setup of
17142         edge flags to set_all_edges_as_executable and only do it when
17143         reachability is REACHABLE_BLOCKS.
17144         * domwalk.h (enum dom_walker::reachability): New enum.
17145         (dom_walker::dom_walker): Convert bool param
17146         "skip_unreachable_blocks" to enum reachability.
17147         (set_all_edges_as_executable): New decl.
17148         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
17149         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
17150         "reachability".
17151         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
17152         but converting true to REACHABLE_BLOCKS.
17153         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
17154         * tree-vrp.c
17155         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
17156         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
17157         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
17158         REACHABLE_BLOCKS.
17159         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
17160         if check_all_array_refs will be called.
17162 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17164         * tree.c (selftest::test_location_wrappers): Add more test
17165         coverage.
17167 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
17169         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
17170         (selftest::test_bit_in_range): Likewise.
17172 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
17174         PR testsuite/83888
17175         * doc/sourcebuild.texi (vect_float): Say that the selector
17176         only describes the situation when -funsafe-math-optimizations is on.
17177         (vect_float_strict): Document.
17179 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
17181         PR tree-optimization/83965
17182         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17183         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
17184         instead of checking only for a reduction.
17185         (vect_recog_widen_sum_pattern): Likewise.
17187 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17189         * predict.c (probably_never_executed): Only use precise profile info.
17190         (compute_function_frequency): Skip after inlining hack since we now
17191         have quality checking.
17193 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
17195         * profile-count.h (profile_probability::very_unlikely,
17196         profile_probability::unlikely, profile_probability::even): Set
17197         precision to guessed.
17199 2018-01-23  Richard Biener  <rguenther@suse.de>
17201         PR tree-optimization/83963
17202         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
17203         Properly terminate dominator walk when crossing the exit edge not
17204         when visiting its source block.
17206 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
17208         PR c++/83918
17209         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
17210         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
17212 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
17214         PR tree-optimization/83957
17215         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
17216         semicolon after for body surrounded by braces.
17218         PR tree-optimization/83081
17219         * profile-count.h (profile_probability::split): New method.
17220         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
17221         Use profile_probability::split.
17222         (do_compare_rtx_and_jump): Fix adjustment of probabilities
17223         when splitting a single conditional jump into 2.
17225 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
17227         PR tree-optimization/69452
17228         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
17229         decl.
17231 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17233         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
17234         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
17235         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
17237 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17239         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
17240         declaration.
17241         * config/rl78/rl78.md (movdi): New define_expand.
17242         * config/rl78/rl78.c (rl78_split_movdi): New function.
17244 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
17246         PR target/83862
17247         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
17248         no longer used.
17249         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
17250         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
17251         128-bit to produce an UNSPEC move to get the double word with the
17252         signbit and then a shift directly to do signbit.
17253         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
17254         implementation with a new version that just does either a direct
17255         move or a regular move.  Move memory interface to separate insns.
17256         Move insns so they are next to the expander.
17257         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
17258         with signbit move.  Split big and little endian case.
17259         (signbit<mode>2_dm_mem_le): Likewise.
17260         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
17261         (signbit<mode>2_dm2): Likewise.
17263 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17265         * config/rl78/rl78.md (anddi3): New define_expand.
17267 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17269         * config/rl78/rl78.md (umindi3): New define_expand.
17271 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17273         * config/rl78/rl78.md (smindi3): New define_expand.
17275 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17277         * config/rl78/rl78.md (smaxdi3): New define_expand.
17279 2018-01-22  Carl Love  <cel@us.ibm.com>
17281         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
17282         LVX_V1TI): Add macro expansion.
17283         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
17284         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
17285         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
17286         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
17287         Change check to determine if the instruction is a byte reversing
17288         entry.  Fix typo in comment.
17289         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
17290         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
17291         Add def_builtin calls for new builtins.
17292         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
17293         Add define_insn expansion.
17295 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17297         * config/rl78/rl78.md (umaxdi3): New define_expand.
17299 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17301         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
17302         for non-QImode registers.
17304 2018-01-22  Richard Biener  <rguenther@suse.de>
17306         PR tree-optimization/83963
17307         * graphite-scop-detection.c (scop_detection::get_sese): Delay
17308         including the loop exit block.
17309         (scop_detection::merge_sese): Likewise.
17310         (scop_detection::add_scop): Do it here instead.
17312 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17314         * doc/sourcebuild.texi (arm_softfloat): Document.
17316 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
17318         PR gcc/77734
17319         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
17320         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
17321         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
17323 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17324             David Edelsohn  <dje.gcc@gmail.com>
17326         PR target/83946
17327         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17328         Change "crset eq" to "crset 2".
17329         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17330         (*call_indirect_aix<mode>_nospec): Likewise.
17331         (*call_value_indirect_aix<mode>_nospec): Likewise.
17332         (*call_indirect_elfv2<mode>_nospec): Likewise.
17333         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
17334         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
17335         change assembly output from . to $.
17336         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17337         (indirect_jump<mode>_nospec): Change assembly output from . to $.
17338         (*tablejump<mode>_internal1_nospec): Likewise.
17340 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
17342         PR target/80870
17343         * config/sh/sh_optimize_sett_clrt.cc:
17344         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
17346 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
17348         PR tree-optimization/83940
17349         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
17350         offset_dt to vect_constant_def rather than vect_unknown_def_type.
17351         (vect_check_load_store_mask): Add a mask_dt_out parameter and
17352         use it to pass back the definition type.
17353         (vect_check_store_rhs): Likewise rhs_dt_out.
17354         (vect_build_gather_load_calls): Add a mask_dt argument and use
17355         it instead of a call to vect_is_simple_use.
17356         (vectorizable_store): Update calls to vect_check_load_store_mask
17357         and vect_check_store_rhs.  Use the dt returned by the latter instead
17358         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
17359         instead of calls to vect_is_simple_use.  Pass the scalar rather
17360         than the vector operand to vect_is_simple_use when handling
17361         second and subsequent copies of an rhs value.
17362         (vectorizable_load): Update calls to vect_check_load_store_mask
17363         and vect_build_gather_load_calls.  Use the cached mask_dt and
17364         gs_info.offset_dt instead of calls to vect_is_simple_use.
17366 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
17368         PR middle-end/83945
17369         * tree-emutls.c: Include gimplify.h.
17370         (lower_emutls_2): New function.
17371         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
17372         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
17373         it before further processing.
17375         PR target/83930
17376         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
17377         UINTVAL (trueop1) instead of INTVAL (op1).
17379 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
17381         PR debug/81570
17382         PR debug/83728
17383         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17384         INCOMING_FRAME_SP_OFFSET if not defined.
17385         (scan_trace): Add ENTRY argument.  If true and
17386         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17387         emit a note to adjust the CFA offset.
17388         (create_cfi_notes): Adjust scan_trace callers.
17389         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17390         INCOMING_FRAME_SP_OFFSET in the CIE.
17391         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17392         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17393         Likewise.
17394         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17395         * doc/tm.texi: Regenerated.
17397 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17399         PR rtl-optimization/83147
17400         * lra-constraints.c (remove_inheritance_pseudos): Use
17401         lra_substitute_pseudo_within_insn.
17403 2018-01-19  Tom de Vries  <tom@codesourcery.com>
17404             Cesar Philippidis  <cesar@codesourcery.com>
17406         PR target/83920
17407         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17409 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
17411         PR target/83790
17412         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17413         spaces for function labels.
17415 2018-01-19  Martin Liska  <mliska@suse.cz>
17417         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17418         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17419         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17420         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17421         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17422         (PRED_CONST_RETURN): Change from 69 to 65.
17423         (PRED_NULL_RETURN): Change from 91 to 71.
17424         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17425         (PRED_LOOP_GUARD): Change from 66 to 73.
17427 2018-01-19  Martin Liska  <mliska@suse.cz>
17429         * predict.c (predict_insn_def): Add new assert.
17430         (struct branch_predictor): Change type to signed integer.
17431         (test_prediction_value_range): Amend test to cover
17432         PROB_UNINITIALIZED.
17433         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
17434         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
17435         (PRED_LOOP_ITERATIONS_MAX): Likewise.
17436         (PRED_LOOP_IV_COMPARE): Likewise.
17437         * predict.h (PROB_UNINITIALIZED): Define new constant.
17439 2018-01-19  Martin Liska  <mliska@suse.cz>
17441         * predict.c (dump_prediction): Add new format for
17442         analyze_brprob.py script which is enabled with -details
17443         suboption.
17444         * profile-count.h (precise_p): New function.
17446 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
17448         PR tree-optimization/83922
17449         * tree-vect-loop.c (vect_verify_full_masking): Return false if
17450         there are no statements that need masking.
17451         (vect_active_double_reduction_p): New function.
17452         (vect_analyze_loop_operations): Use it when handling phis that
17453         are not in the loop header.
17455 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
17457         PR tree-optimization/83914
17458         * tree-vect-loop.c (vectorizable_induction): Don't convert
17459         init_expr or apply the peeling adjustment for inductions
17460         that are nested within the vectorized loop.
17462 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17464         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
17465         instead of NEG.
17467 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
17469         PR sanitizer/81715
17470         PR testsuite/83882
17471         * function.h (gimplify_parameters): Add gimple_seq * argument.
17472         * function.c: Include gimple.h and options.h.
17473         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
17474         for the added local temporaries if needed.
17475         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
17476         if there are any parameter cleanups, wrap whole body into a
17477         try/finally with the cleanups.
17479 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
17481         PR target/82964
17482         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17483         Use GET_MODE_CLASS for scalar floating point.
17485 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
17487         PR ipa/82256
17488         patch by PaX Team
17489         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
17490         Fix call of call_cgraph_insertion_hooks.
17492 2018-01-18  Martin Sebor  <msebor@redhat.com>
17494         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
17496 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
17498         PR ipa/83619
17499         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
17500         frequencies.
17502 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
17504         PR other/70268
17505         * common.opt: (-ffile-prefix-map): New option.
17506         * opts.c (common_handle_option): Defer it.
17507         * opts-global.c (handle_common_deferred_options): Handle it.
17508         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
17509         * file-prefix-map.h: New file.
17510         (remap_debug_filename, add_debug_prefix_map): ...here.
17511         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
17512         * final.c (debug_prefix_map, add_debug_prefix_map
17513         remap_debug_filename): Move to...
17514         * file-prefix-map.c: New file.
17515         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
17516         generalize, get rid of alloca(), use strrchr() instead of strchr().
17517         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
17518         Implement in terms of add_prefix_map().
17519         (remap_macro_filename, remap_debug_filename): Implement in term of
17520         remap_filename().
17521         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
17522         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
17523         * dbxout.c: Include file-prefix-map.h.
17524         * varasm.c: Likewise.
17525         * vmsdbgout.c: Likewise.
17526         * xcoffout.c: Likewise.
17527         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
17528         * doc/cppopts.texi (-fmacro-prefix-map): Document.
17529         * doc/invoke.texi (-ffile-prefix-map): Document.
17530         (-fdebug-prefix-map): Update description.
17532 2018-01-18  Martin Liska  <mliska@suse.cz>
17534         * config/i386/i386.c (indirect_thunk_name): Document that also
17535         lfence is emitted.
17536         (output_indirect_thunk): Document why both instructions
17537         (pause and lfence) are generated.
17539 2018-01-18  Richard Biener  <rguenther@suse.de>
17541         PR tree-optimization/83887
17542         * graphite-scop-detection.c
17543         (scop_detection::get_nearest_dom_with_single_entry): Remove.
17544         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
17545         (scop_detection::merge_sese): Re-implement with a flood-fill
17546         algorithm that properly finds a SESE region if it exists.
17548 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
17550         PR c/61240
17551         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
17552         pointer_diff optimizations use view_convert instead of convert.
17554 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17556         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17557         Generate different code for -mno-speculate-indirect-jumps.
17558         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17559         (*call_indirect_aix<mode>): Disable for
17560         -mno-speculate-indirect-jumps.
17561         (*call_indirect_aix<mode>_nospec): New define_insn.
17562         (*call_value_indirect_aix<mode>): Disable for
17563         -mno-speculate-indirect-jumps.
17564         (*call_value_indirect_aix<mode>_nospec): New define_insn.
17565         (*sibcall_nonlocal_sysv<mode>): Generate different code for
17566         -mno-speculate-indirect-jumps.
17567         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17569 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
17571         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
17572         long double type, set the flags for noting the default long double
17573         type, even if we don't pass or return a long double type.
17575 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
17577         PR ipa/83051
17578         * ipa-inline.c (flatten_function): Do not overwrite final inlining
17579         failure.
17581 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
17583         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
17584         support for merge[hl].
17585         (fold_mergehl_helper): New helper function.
17586         (tree-vector-builder.h): New #include for tree_vector_builder usage.
17587         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
17588         (altivec_vmrglw_direct): Add xxmrglw insn.
17590 2018-01-17  Andrew Waterman  <andrew@sifive.com>
17592         * config/riscv/riscv.c (riscv_conditional_register_usage): If
17593         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
17595 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
17597         PR lto/83121
17598         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
17599         call the lto_location_cache before reading the
17600         DECL_SOURCE_LOCATION of the types.
17602 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
17603             Richard Sandiford  <richard.sandiford@linaro.org>
17605         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
17606         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
17607         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
17608         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
17609         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
17610         Add declaration.
17611         * config/aarch64/constraints.md (aarch64_movti_operand):
17612         Limit immediates.
17613         * config/aarch64/predicates.md (Uti): Add new constraint.
17615 2018-01-17 Carl Love  <cel@us.ibm.com>
17617         * config/rs6000/vsx.md (define_expand xl_len_r,
17618         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
17619         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
17620         lxvll.
17621         (define_expand, define_insn): Move the shift left from  the
17622         define_insn to the define_expand for lxvl and stxvl instructions.
17623         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
17624         and XL_LEN_R definitions to PURE.
17626 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
17628         * config/i386/i386.c (indirect_thunk_name): Declare regno
17629         as unsigned int.  Compare regno with INVALID_REGNUM.
17630         (output_indirect_thunk): Ditto.
17631         (output_indirect_thunk_function): Ditto.
17632         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
17633         in the call to output_indirect_thunk_function.
17635 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
17637         PR middle-end/83884
17638         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17639         rather than the size of inner_type to determine the stack slot size
17640         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17642 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
17644         PR target/83546
17645         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17646         to PTA_SILVERMONT.
17648 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
17650         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17651         endian Linux systems to optionally enable multilibs for selecting
17652         the long double type if the user configured an explicit type.
17653         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17654         have no long double multilibs if not defined.
17655         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17656         warn if the user used -mabi={ieee,ibm}longdouble and we built
17657         multilibs for long double.
17658         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17659         appropriate multilib option.
17660         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17661         multilib options.
17662         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17663         for building long double multilibs.
17664         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17666 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
17668         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17669         copies.
17671         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17672         64 bits.
17673         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17674         128 bits.
17676         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17677         variables.
17679         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17680         return value.
17682 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
17684         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17685         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17687 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17689         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17690         different rtl trees depending on TARGET_64BIT.
17691         (rs6000_gen_lvx): Likewise.
17693 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
17695         * config/visium/visium.md (nop): Tweak comment.
17696         (hazard_nop): Likewise.
17698 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17700         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17701         -mspeculate-indirect-jumps.
17702         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17703         for -mno-speculate-indirect-jumps.
17704         (*call_indirect_elfv2<mode>_nospec): New define_insn.
17705         (*call_value_indirect_elfv2<mode>): Disable for
17706         -mno-speculate-indirect-jumps.
17707         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17708         (indirect_jump): Emit different RTL for
17709         -mno-speculate-indirect-jumps.
17710         (*indirect_jump<mode>): Disable for
17711         -mno-speculate-indirect-jumps.
17712         (*indirect_jump<mode>_nospec): New define_insn.
17713         (tablejump): Emit different RTL for
17714         -mno-speculate-indirect-jumps.
17715         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17716         (tablejumpsi_nospec): New define_expand.
17717         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17718         (tablejumpdi_nospec): New define_expand.
17719         (*tablejump<mode>_internal1): Disable for
17720         -mno-speculate-indirect-jumps.
17721         (*tablejump<mode>_internal1_nospec): New define_insn.
17722         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17723         option.
17725 2018-01-16  Artyom Skrobov tyomitch@gmail.com
17727         * caller-save.c (insert_save): Drop unnecessary parameter.  All
17728         callers updated.
17730 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
17731             Richard Biener  <rguenth@suse.de>
17733         PR libgomp/83590
17734         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17735         return early, inline manually is_gimple_sizepos.  Make sure if we
17736         call gimplify_expr we don't end up with a gimple constant.
17737         * tree.c (variably_modified_type_p): Don't return true for
17738         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
17739         * gimplify.h (is_gimple_sizepos): Remove.
17741 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
17743         PR tree-optimization/83857
17744         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17745         vectorizable_live_operation for pure SLP statements.
17746         (vectorizable_live_operation): Handle PHIs.
17748 2018-01-16  Richard Biener  <rguenther@suse.de>
17750         PR tree-optimization/83867
17751         * tree-vect-stmts.c (vect_transform_stmt): Precompute
17752         nested_in_vect_loop_p since the scalar stmt may get invalidated.
17754 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
17756         PR c/83844
17757         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17758         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17759         If off is not INTEGER_CST, issue a may not be aligned warning
17760         rather than isn't aligned.  Use isn%'t rather than isn't.
17761         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17762         into MULT_EXPR.
17763         <case MULT_EXPR>: Improve the case when bottom and one of the
17764         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17765         operand, in that case check if the other operand is multiple of
17766         bottom divided by the INTEGER_CST operand.
17768 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
17770         PR target/83858
17771         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17772         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17773         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17774         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17775         * config/pa/pa.c (pa_function_arg_advance): Likewise.
17776         (pa_function_arg, pa_arg_partial_bytes): Likewise.
17777         (pa_function_arg_size): New function.
17779 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
17781         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17782         in a separate statement.
17784 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
17786         PR tree-optimization/83847
17787         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17788         group gathers and scatters.
17790 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
17792         PR rtl-optimization/86620
17793         * params.def (max-sched-ready-insns): Bump minimum value to 1.
17795         PR rtl-optimization/83213
17796         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17797         to last if both are JUMP_INSNs.
17799         PR tree-optimization/83843
17800         * gimple-ssa-store-merging.c
17801         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17802         store_immediate_info for bswap/nop orig_stores.
17804 2018-01-15  Andrew Waterman  <andrew@sifive.com>
17806         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17807         !TARGET_MUL.
17808         <UDIV>: Increase cost if !TARGET_DIV.
17810 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
17812         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17813         (define_attr "cr_logical_3op"): New.
17814         (cceq_ior_compare): Adjust.
17815         (cceq_ior_compare_complement): Adjust.
17816         (*cceq_rev_compare): Adjust.
17817         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17818         (is_cracked_insn): Adjust.
17819         (insn_must_be_first_in_group): Adjust.
17820         * config/rs6000/40x.md: Adjust.
17821         * config/rs6000/440.md: Adjust.
17822         * config/rs6000/476.md: Adjust.
17823         * config/rs6000/601.md: Adjust.
17824         * config/rs6000/603.md: Adjust.
17825         * config/rs6000/6xx.md: Adjust.
17826         * config/rs6000/7450.md: Adjust.
17827         * config/rs6000/7xx.md: Adjust.
17828         * config/rs6000/8540.md: Adjust.
17829         * config/rs6000/cell.md: Adjust.
17830         * config/rs6000/e300c2c3.md: Adjust.
17831         * config/rs6000/e500mc.md: Adjust.
17832         * config/rs6000/e500mc64.md: Adjust.
17833         * config/rs6000/e5500.md: Adjust.
17834         * config/rs6000/e6500.md: Adjust.
17835         * config/rs6000/mpc.md: Adjust.
17836         * config/rs6000/power4.md: Adjust.
17837         * config/rs6000/power5.md: Adjust.
17838         * config/rs6000/power6.md: Adjust.
17839         * config/rs6000/power7.md: Adjust.
17840         * config/rs6000/power8.md: Adjust.
17841         * config/rs6000/power9.md: Adjust.
17842         * config/rs6000/rs64.md: Adjust.
17843         * config/rs6000/titan.md: Adjust.
17845 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17847         * config/i386/predicates.md (indirect_branch_operand): Rewrite
17848         ix86_indirect_branch_register logic.
17850 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17852         * config/i386/constraints.md (Bs): Update
17853         ix86_indirect_branch_register check.  Don't check
17854         ix86_indirect_branch_register with GOT_memory_operand.
17855         (Bw): Likewise.
17856         * config/i386/predicates.md (GOT_memory_operand): Don't check
17857         ix86_indirect_branch_register here.
17858         (GOT32_symbol_operand): Likewise.
17860 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17862         * config/i386/predicates.md (constant_call_address_operand):
17863         Rewrite ix86_indirect_branch_register logic.
17864         (sibcall_insn_operand): Likewise.
17866 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17868         * config/i386/constraints.md (Bs): Replace
17869         ix86_indirect_branch_thunk_register with
17870         ix86_indirect_branch_register.
17871         (Bw): Likewise.
17872         * config/i386/i386.md (indirect_jump): Likewise.
17873         (tablejump): Likewise.
17874         (*sibcall_memory): Likewise.
17875         (*sibcall_value_memory): Likewise.
17876         Peepholes of indirect call and jump via memory: Likewise.
17877         * config/i386/i386.opt: Likewise.
17878         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17879         (GOT_memory_operand): Likewise.
17880         (call_insn_operand): Likewise.
17881         (sibcall_insn_operand): Likewise.
17882         (GOT32_symbol_operand): Likewise.
17884 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
17886         PR middle-end/83837
17887         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17888         type rather than type addr's type points to.
17889         (expand_omp_atomic_mutex): Likewise.
17890         (expand_omp_atomic): Likewise.
17892 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17894         PR target/83839
17895         * config/i386/i386.c (output_indirect_thunk_function): Use
17896         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17897         for  __x86_return_thunk.
17899 2018-01-15  Richard Biener  <rguenther@suse.de>
17901         PR middle-end/83850
17902         * expmed.c (extract_bit_field_1): Fix typo.
17904 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17906         PR target/83687
17907         * config/arm/iterators.md (VF): New mode iterator.
17908         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17909         Remove integer-related logic from pattern.
17910         (neon_vabd<mode>_3): Likewise.
17912 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
17914         PR middle-end/82694
17915         * common.opt (fstrict-overflow): No longer an alias.
17916         (fwrapv-pointer): New option.
17917         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17918         also for pointer types based on flag_wrapv_pointer.
17919         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17920         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17921         opts->x_flag_wrapv got set.
17922         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17923         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17924         POINTER_TYPE_OVERFLOW_UNDEFINED.
17925         * match.pd: Likewise in address comparison pattern.
17926         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17928 2018-01-15  Richard Biener  <rguenther@suse.de>
17930         PR lto/83804
17931         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17932         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
17933         Reset type names to their identifier if their TYPE_DECL doesn't
17934         have linkage (and thus is used for ODR and devirt).
17935         (save_debug_info_for_decl): Remove.
17936         (save_debug_info_for_type): Likewise.
17937         (add_tree_to_fld_list): Adjust.
17938         * tree-pretty-print.c (dump_generic_node): Make dumping of
17939         type names more robust.
17941 2018-01-15  Richard Biener  <rguenther@suse.de>
17943         * BASE-VER: Bump to 8.0.1.
17945 2018-01-14  Martin Sebor  <msebor@redhat.com>
17947         PR other/83508
17948         * builtins.c (check_access): Avoid warning when the no-warning bit
17949         is set.
17951 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
17953         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17954         * ira-color (allocno_hard_regs_compare): Likewise.
17956 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
17958         PR target/83013
17959         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17960         Use .pushsection/.popsection.
17962 2018-01-14  Martin Sebor  <msebor@redhat.com>
17964         PR c++/81327
17965         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17967 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
17969         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17970         entry from extra_headers.
17971         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17972         extra_headers, make the list bitwise identical to the i?86-*-* one.
17974 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17976         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
17977         -mcmodel=large with -mindirect-branch=thunk,
17978         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
17979         -mfunction-return=thunk-extern.
17980         * doc/invoke.texi: Document -mcmodel=large is incompatible with
17981         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
17982         -mfunction-return=thunk and -mfunction-return=thunk-extern.
17984 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17986         * config/i386/i386.c (print_reg): Print the name of the full
17987         integer register without '%'.
17988         (ix86_print_operand): Handle 'V'.
17989         * doc/extend.texi: Document 'V' modifier.
17991 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17993         * config/i386/constraints.md (Bs): Disallow memory operand for
17994         -mindirect-branch-register.
17995         (Bw): Likewise.
17996         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17997         (GOT_memory_operand): Likewise.
17998         (call_insn_operand): Likewise.
17999         (sibcall_insn_operand): Likewise.
18000         (GOT32_symbol_operand): Likewise.
18001         * config/i386/i386.md (indirect_jump): Call convert_memory_address
18002         for -mindirect-branch-register.
18003         (tablejump): Likewise.
18004         (*sibcall_memory): Likewise.
18005         (*sibcall_value_memory): Likewise.
18006         Disallow peepholes of indirect call and jump via memory for
18007         -mindirect-branch-register.
18008         (*call_pop): Replace m with Bw.
18009         (*call_value_pop): Likewise.
18010         (*sibcall_pop_memory): Replace m with Bs.
18011         * config/i386/i386.opt (mindirect-branch-register): New option.
18012         * doc/invoke.texi: Document -mindirect-branch-register option.
18014 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18016         * config/i386/i386-protos.h (ix86_output_function_return): New.
18017         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18018         set function_return_type.
18019         (indirect_thunk_name): Add ret_p to indicate thunk for function
18020         return.
18021         (output_indirect_thunk_function): Pass false to
18022         indirect_thunk_name.
18023         (ix86_output_indirect_branch_via_reg): Likewise.
18024         (ix86_output_indirect_branch_via_push): Likewise.
18025         (output_indirect_thunk_function): Create alias for function
18026         return thunk if regno < 0.
18027         (ix86_output_function_return): New function.
18028         (ix86_handle_fndecl_attribute): Handle function_return.
18029         (ix86_attribute_table): Add function_return.
18030         * config/i386/i386.h (machine_function): Add
18031         function_return_type.
18032         * config/i386/i386.md (simple_return_internal): Use
18033         ix86_output_function_return.
18034         (simple_return_internal_long): Likewise.
18035         * config/i386/i386.opt (mfunction-return=): New option.
18036         (indirect_branch): Mention -mfunction-return=.
18037         * doc/extend.texi: Document function_return function attribute.
18038         * doc/invoke.texi: Document -mfunction-return= option.
18040 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18042         * config/i386/i386-opts.h (indirect_branch): New.
18043         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
18044         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
18045         with local indirect jump when converting indirect call and jump.
18046         (ix86_set_indirect_branch_type): New.
18047         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
18048         (indirectlabelno): New.
18049         (indirect_thunk_needed): Likewise.
18050         (indirect_thunk_bnd_needed): Likewise.
18051         (indirect_thunks_used): Likewise.
18052         (indirect_thunks_bnd_used): Likewise.
18053         (INDIRECT_LABEL): Likewise.
18054         (indirect_thunk_name): Likewise.
18055         (output_indirect_thunk): Likewise.
18056         (output_indirect_thunk_function): Likewise.
18057         (ix86_output_indirect_branch_via_reg): Likewise.
18058         (ix86_output_indirect_branch_via_push): Likewise.
18059         (ix86_output_indirect_branch): Likewise.
18060         (ix86_output_indirect_jmp): Likewise.
18061         (ix86_code_end): Call output_indirect_thunk_function if needed.
18062         (ix86_output_call_insn): Call ix86_output_indirect_branch if
18063         needed.
18064         (ix86_handle_fndecl_attribute): Handle indirect_branch.
18065         (ix86_attribute_table): Add indirect_branch.
18066         * config/i386/i386.h (machine_function): Add indirect_branch_type
18067         and has_local_indirect_jump.
18068         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
18069         to true.
18070         (tablejump): Likewise.
18071         (*indirect_jump): Use ix86_output_indirect_jmp.
18072         (*tablejump_1): Likewise.
18073         (simple_return_indirect_internal): Likewise.
18074         * config/i386/i386.opt (mindirect-branch=): New option.
18075         (indirect_branch): New.
18076         (keep): Likewise.
18077         (thunk): Likewise.
18078         (thunk-inline): Likewise.
18079         (thunk-extern): Likewise.
18080         * doc/extend.texi: Document indirect_branch function attribute.
18081         * doc/invoke.texi: Document -mindirect-branch= option.
18083 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
18085         PR ipa/83051
18086         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
18088 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
18090         * ipa-inline.c (want_inline_small_function_p): Return false if
18091         inlining has already failed with CIF_FINAL_ERROR.
18092         (update_caller_keys): Call want_inline_small_function_p before
18093         can_inline_edge_p.
18094         (update_callee_keys): Likewise.
18096 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18098         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
18099         New function.
18100         (rs6000_quadword_masked_address_p): Likewise.
18101         (quad_aligned_load_p): Likewise.
18102         (quad_aligned_store_p): Likewise.
18103         (const_load_sequence_p): Add comment to describe the outer-most loop.
18104         (mimic_memory_attributes_and_flags): New function.
18105         (rs6000_gen_stvx): Likewise.
18106         (replace_swapped_aligned_store): Likewise.
18107         (rs6000_gen_lvx): Likewise.
18108         (replace_swapped_aligned_load): Likewise.
18109         (replace_swapped_load_constant): Capitalize argument name in
18110         comment describing this function.
18111         (rs6000_analyze_swaps): Add a third pass to search for vector loads
18112         and stores that access quad-word aligned addresses and replace
18113         with stvx or lvx instructions when appropriate.
18114         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
18115         New function prototype.
18116         (rs6000_quadword_masked_address_p): Likewise.
18117         (rs6000_gen_lvx): Likewise.
18118         (rs6000_gen_stvx): Likewise.
18119         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
18120         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
18121         when memory address is aligned.
18122         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
18123         this split to select lvx instruction when memory address is aligned.
18124         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
18125         instruction when memory address is aligned.
18126         (*vsx_le_perm_load_v16qi): Likewise.
18127         (four unnamed splitters): Modify to select the stvx instruction
18128         when memory is aligned.
18130 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
18132         * predict.c (determine_unlikely_bbs): Handle correctly BBs
18133         which appears in the queue multiple times.
18135 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18136             Alan Hayward  <alan.hayward@arm.com>
18137             David Sherwood  <david.sherwood@arm.com>
18139         * tree-vectorizer.h (vec_lower_bound): New structure.
18140         (_loop_vec_info): Add check_nonzero and lower_bounds.
18141         (LOOP_VINFO_CHECK_NONZERO): New macro.
18142         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
18143         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
18144         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
18145         fields.  Make seg_len the distance travelled, not including the
18146         access size.
18147         (dr_direction_indicator): Declare.
18148         (dr_zero_step_indicator): Likewise.
18149         (dr_known_forward_stride_p): Likewise.
18150         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
18151         tree-ssanames.h.
18152         (runtime_alias_check_p): Allow runtime alias checks with
18153         variable strides.
18154         (operator ==): Compare access_size and align.
18155         (prune_runtime_alias_test_list): Rework for new distinction between
18156         the access_size and seg_len.
18157         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
18158         segment lengths.
18159         (get_segment_min_max): New function.
18160         (create_intersect_range_checks): Use it.
18161         (dr_step_indicator): New function.
18162         (dr_direction_indicator): Likewise.
18163         (dr_zero_step_indicator): Likewise.
18164         (dr_known_forward_stride_p): Likewise.
18165         * tree-loop-distribution.c (data_ref_segment_size): Return
18166         DR_STEP * (niters - 1).
18167         (compute_alias_check_pairs): Update call to the dr_with_seg_len
18168         constructor.
18169         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
18170         (vect_preserves_scalar_order_p): New function, split out from...
18171         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
18172         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
18173         (vect_vfa_access_size): New function.
18174         (vect_vfa_align): Likewise.
18175         (vect_compile_time_alias): Take access_size_a and access_b arguments.
18176         (dump_lower_bound): New function.
18177         (vect_check_lower_bound): Likewise.
18178         (vect_small_gap_p): Likewise.
18179         (vectorizable_with_step_bound_p): Likewise.
18180         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
18181         depencies if the vectorization factor is 1.  Convert the checks
18182         for nonzero steps into checks on the bounds of DR_STEP.  Try using
18183         a bunds check for variable steps if the minimum required step is
18184         relatively small. Update calls to the dr_with_seg_len
18185         constructor and to vect_compile_time_alias.
18186         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
18187         function.
18188         (vect_loop_versioning): Call it.
18189         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
18190         when retrying.
18191         (vect_estimate_min_profitable_iters): Account for any bounds checks.
18193 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18194             Alan Hayward  <alan.hayward@arm.com>
18195             David Sherwood  <david.sherwood@arm.com>
18197         * doc/sourcebuild.texi (vect_scatter_store): Document.
18198         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
18199         optabs.
18200         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
18201         Document.
18202         * genopinit.c (main): Add supports_vec_scatter_store and
18203         supports_vec_scatter_store_cached to target_optabs.
18204         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
18205         IFN_MASK_SCATTER_STORE.
18206         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
18207         functions.
18208         * internal-fn.h (internal_store_fn_p): Declare.
18209         (internal_fn_stored_value_index): Likewise.
18210         * internal-fn.c (scatter_store_direct): New macro.
18211         (expand_scatter_store_optab_fn): New function.
18212         (direct_scatter_store_optab_supported_p): New macro.
18213         (internal_store_fn_p): New function.
18214         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
18215         IFN_MASK_SCATTER_STORE.
18216         (internal_fn_mask_index): Likewise.
18217         (internal_fn_stored_value_index): New function.
18218         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
18219         for scatter stores.
18220         * optabs-query.h (supports_vec_scatter_store_p): Declare.
18221         * optabs-query.c (supports_vec_scatter_store_p): New function.
18222         * tree-vectorizer.h (vect_get_store_rhs): Declare.
18223         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
18224         true for scatter stores.
18225         (vect_gather_scatter_fn_p): Handle scatter stores too.
18226         (vect_check_gather_scatter): Consider using scatter stores if
18227         supports_vec_scatter_store_p.
18228         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
18229         scatter stores too.
18230         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18231         internal_fn_stored_value_index.
18232         (check_load_store_masking): Handle scatter stores too.
18233         (vect_get_store_rhs): Make public.
18234         (vectorizable_call): Use internal_store_fn_p.
18235         (vectorizable_store): Handle scatter store internal functions.
18236         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
18237         when deciding whether the end of the group has been reached.
18238         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
18239         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
18240         (mask_scatter_store<mode>): New insns.
18242 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18243             Alan Hayward  <alan.hayward@arm.com>
18244             David Sherwood  <david.sherwood@arm.com>
18246         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
18247         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
18248         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
18249         function.
18250         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
18251         Use vect_truncate_gather_scatter_offset if we can't treat the
18252         operation as a normal gather load or scatter store.
18253         (get_group_load_store_type): Take the gather_scatter_info
18254         as argument.  Try using a gather load or scatter store for
18255         single-element groups.
18256         (get_load_store_type): Update calls to get_group_load_store_type
18257         and vect_use_strided_gather_scatters_p.
18259 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18260             Alan Hayward  <alan.hayward@arm.com>
18261             David Sherwood  <david.sherwood@arm.com>
18263         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
18264         optional tree argument.
18265         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
18266         null target hooks.
18267         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
18268         but continue to use the current value as a fallback.
18269         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
18270         to compare the updates.
18271         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
18272         (get_load_store_type): Use it when handling a strided access.
18273         (vect_get_strided_load_store_ops): New function.
18274         (vect_get_data_ptr_increment): Likewise.
18275         (vectorizable_load): Handle strided gather loads.  Always pass
18276         a step to vect_create_data_ref_ptr and bump_vector_ptr.
18278 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18279             Alan Hayward  <alan.hayward@arm.com>
18280             David Sherwood  <david.sherwood@arm.com>
18282         * doc/md.texi (gather_load@var{m}): Document.
18283         (mask_gather_load@var{m}): Likewise.
18284         * genopinit.c (main): Add supports_vec_gather_load and
18285         supports_vec_gather_load_cached to target_optabs.
18286         * optabs-tree.c (init_tree_optimization_optabs): Use
18287         ggc_cleared_alloc to allocate target_optabs.
18288         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
18289         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
18290         functions.
18291         * internal-fn.h (internal_load_fn_p): Declare.
18292         (internal_gather_scatter_fn_p): Likewise.
18293         (internal_fn_mask_index): Likewise.
18294         (internal_gather_scatter_fn_supported_p): Likewise.
18295         * internal-fn.c (gather_load_direct): New macro.
18296         (expand_gather_load_optab_fn): New function.
18297         (direct_gather_load_optab_supported_p): New macro.
18298         (direct_internal_fn_optab): New function.
18299         (internal_load_fn_p): Likewise.
18300         (internal_gather_scatter_fn_p): Likewise.
18301         (internal_fn_mask_index): Likewise.
18302         (internal_gather_scatter_fn_supported_p): Likewise.
18303         * optabs-query.c (supports_at_least_one_mode_p): New function.
18304         (supports_vec_gather_load_p): Likewise.
18305         * optabs-query.h (supports_vec_gather_load_p): Declare.
18306         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
18307         and memory_type field.
18308         (NUM_PATTERNS): Bump to 15.
18309         * tree-vect-data-refs.c: Include internal-fn.h.
18310         (vect_gather_scatter_fn_p): New function.
18311         (vect_describe_gather_scatter_call): Likewise.
18312         (vect_check_gather_scatter): Try using internal functions for
18313         gather loads.  Recognize existing calls to a gather load function.
18314         (vect_analyze_data_refs): Consider using gather loads if
18315         supports_vec_gather_load_p.
18316         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
18317         (vect_get_gather_scatter_offset_type): Likewise.
18318         (vect_convert_mask_for_vectype): Likewise.
18319         (vect_add_conversion_to_patterm): Likewise.
18320         (vect_try_gather_scatter_pattern): Likewise.
18321         (vect_recog_gather_scatter_pattern): New pattern recognizer.
18322         (vect_vect_recog_func_ptrs): Add it.
18323         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18324         internal_fn_mask_index and internal_gather_scatter_fn_p.
18325         (check_load_store_masking): Take the gather_scatter_info as an
18326         argument and handle gather loads.
18327         (vect_get_gather_scatter_ops): New function.
18328         (vectorizable_call): Check internal_load_fn_p.
18329         (vectorizable_load): Likewise.  Handle gather load internal
18330         functions.
18331         (vectorizable_store): Update call to check_load_store_masking.
18332         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
18333         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
18334         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
18335         (aarch64_gather_scale_operand_d): New predicates.
18336         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
18337         (mask_gather_load<mode>): New insns.
18339 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18340             Alan Hayward  <alan.hayward@arm.com>
18341             David Sherwood  <david.sherwood@arm.com>
18343         * optabs.def (fold_left_plus_optab): New optab.
18344         * doc/md.texi (fold_left_plus_@var{m}): Document.
18345         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
18346         * internal-fn.c (fold_left_direct): Define.
18347         (expand_fold_left_optab_fn): Likewise.
18348         (direct_fold_left_optab_supported_p): Likewise.
18349         * fold-const-call.c (fold_const_fold_left): New function.
18350         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
18351         * tree-parloops.c (valid_reduction_p): New function.
18352         (gather_scalar_reductions): Use it.
18353         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
18354         (vect_finish_replace_stmt): Declare.
18355         * tree-vect-loop.c (fold_left_reduction_fn): New function.
18356         (needs_fold_left_reduction_p): New function, split out from...
18357         (vect_is_simple_reduction): ...here.  Accept reductions that
18358         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
18359         (vect_force_simple_reduction): Also store the reduction type in
18360         the assignment's STMT_VINFO_REDUC_TYPE.
18361         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
18362         (merge_with_identity): New function.
18363         (vect_expand_fold_left): Likewise.
18364         (vectorize_fold_left_reduction): Likewise.
18365         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
18366         scalar phi in place for it.  Check for target support and reject
18367         cases that would reassociate the operation.  Defer the transform
18368         phase to vectorize_fold_left_reduction.
18369         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
18370         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
18371         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
18373 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18375         * tree-if-conv.c (predicate_mem_writes): Remove redundant
18376         call to ifc_temp_var.
18378 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18379             Alan Hayward  <alan.hayward@arm.com>
18380             David Sherwood  <david.sherwood@arm.com>
18382         * target.def (legitimize_address_displacement): Take the original
18383         offset as a poly_int.
18384         * targhooks.h (default_legitimize_address_displacement): Update
18385         accordingly.
18386         * targhooks.c (default_legitimize_address_displacement): Likewise.
18387         * doc/tm.texi: Regenerate.
18388         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18389         as an argument, moving assert of ad->disp == ad->disp_term to...
18390         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
18391         Try calling targetm.legitimize_address_displacement before expanding
18392         the address rather than afterwards, and adjust for the new interface.
18393         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18394         Match the new hook interface.  Handle SVE addresses.
18395         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18396         new hook interface.
18398 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18400         * Makefile.in (OBJS): Add early-remat.o.
18401         * target.def (select_early_remat_modes): New hook.
18402         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18403         * doc/tm.texi: Regenerate.
18404         * targhooks.h (default_select_early_remat_modes): Declare.
18405         * targhooks.c (default_select_early_remat_modes): New function.
18406         * timevar.def (TV_EARLY_REMAT): New timevar.
18407         * passes.def (pass_early_remat): New pass.
18408         * tree-pass.h (make_pass_early_remat): Declare.
18409         * early-remat.c: New file.
18410         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18411         function.
18412         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18414 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18415             Alan Hayward  <alan.hayward@arm.com>
18416             David Sherwood  <david.sherwood@arm.com>
18418         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18419         vfm1 with a bound_epilog parameter.
18420         (vect_do_peeling): Update calls accordingly, and move the prologue
18421         call earlier in the function.  Treat the base bound_epilog as 0 for
18422         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
18423         this base when peeling for gaps.
18424         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18425         with fully-masked loops.
18426         (vect_estimate_min_profitable_iters): Handle the single peeled
18427         iteration in that case.
18429 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18430             Alan Hayward  <alan.hayward@arm.com>
18431             David Sherwood  <david.sherwood@arm.com>
18433         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
18434         single-element interleaving even if the size is not a power of 2.
18435         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
18436         accesses for single-element interleaving if the group size is
18437         not a power of 2.
18439 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18440             Alan Hayward  <alan.hayward@arm.com>
18441             David Sherwood  <david.sherwood@arm.com>
18443         * doc/md.texi (fold_extract_last_@var{m}): Document.
18444         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
18445         * optabs.def (fold_extract_last_optab): New optab.
18446         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
18447         * internal-fn.c (fold_extract_direct): New macro.
18448         (expand_fold_extract_optab_fn): Likewise.
18449         (direct_fold_extract_optab_supported_p): Likewise.
18450         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
18451         * tree-vect-loop.c (vect_model_reduction_cost): Handle
18452         EXTRACT_LAST_REDUCTION.
18453         (get_initial_def_for_reduction): Do not create an initial vector
18454         for EXTRACT_LAST_REDUCTION reductions.
18455         (vectorizable_reduction): Leave the scalar phi in place for
18456         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
18457         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
18458         epilogue code for EXTRACT_LAST_REDUCTION and defer the
18459         transform phase to vectorizable_condition.
18460         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
18461         split out from...
18462         (vect_finish_stmt_generation): ...here.
18463         (vect_finish_replace_stmt): New function.
18464         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
18465         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
18466         pattern.
18467         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
18469 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18470             Alan Hayward  <alan.hayward@arm.com>
18471             David Sherwood  <david.sherwood@arm.com>
18473         * doc/md.texi (extract_last_@var{m}): Document.
18474         * optabs.def (extract_last_optab): New optab.
18475         * internal-fn.def (EXTRACT_LAST): New internal function.
18476         * internal-fn.c (cond_unary_direct): New macro.
18477         (expand_cond_unary_optab_fn): Likewise.
18478         (direct_cond_unary_optab_supported_p): Likewise.
18479         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
18480         loops using EXTRACT_LAST.
18481         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
18482         (extract_last_<mode>): ...this optab.
18483         (vec_extract<mode><Vel>): Update accordingly.
18485 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18486             Alan Hayward  <alan.hayward@arm.com>
18487             David Sherwood  <david.sherwood@arm.com>
18489         * target.def (empty_mask_is_expensive): New hook.
18490         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
18491         * doc/tm.texi: Regenerate.
18492         * targhooks.h (default_empty_mask_is_expensive): Declare.
18493         * targhooks.c (default_empty_mask_is_expensive): New function.
18494         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
18495         if the target says that empty masks are expensive.
18496         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
18497         New function.
18498         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
18500 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18501             Alan Hayward  <alan.hayward@arm.com>
18502             David Sherwood  <david.sherwood@arm.com>
18504         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
18505         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
18506         (vect_use_loop_mask_for_alignment_p): New function.
18507         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
18508         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
18509         niters_skip argument.  Make sure that the first niters_skip elements
18510         of the first iteration are inactive.
18511         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
18512         Update call to vect_set_loop_masks_directly.
18513         (get_misalign_in_elems): New function, split out from...
18514         (vect_gen_prolog_loop_niters): ...here.
18515         (vect_update_init_of_dr): Take a code argument that specifies whether
18516         the adjustment should be added or subtracted.
18517         (vect_update_init_of_drs): Likewise.
18518         (vect_prepare_for_masked_peels): New function.
18519         (vect_do_peeling): Skip prologue peeling if we're using a mask
18520         instead.  Update call to vect_update_inits_of_drs.
18521         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18522         mask_skip_niters.
18523         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
18524         alignment.  Do not include the number of peeled iterations in
18525         the minimum threshold in that case.
18526         (vectorizable_induction): Adjust the start value down by
18527         LOOP_VINFO_MASK_SKIP_NITERS iterations.
18528         (vect_transform_loop): Call vect_prepare_for_masked_peels.
18529         Take the number of skipped iterations into account when calculating
18530         the loop bounds.
18531         * tree-vect-stmts.c (vect_gen_while_not): New function.
18533 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18534             Alan Hayward  <alan.hayward@arm.com>
18535             David Sherwood  <david.sherwood@arm.com>
18537         * doc/sourcebuild.texi (vect_fully_masked): Document.
18538         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
18539         default value to 0.
18540         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
18541         split out from...
18542         (vect_analyze_loop_2): ...here. Don't check the vectorization
18543         factor against the number of loop iterations if the loop is
18544         fully-masked.
18546 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18547             Alan Hayward  <alan.hayward@arm.com>
18548             David Sherwood  <david.sherwood@arm.com>
18550         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
18551         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
18552         (dump_groups): Update accordingly.
18553         (iv_use::mem_type): New member variable.
18554         (address_p): New function.
18555         (record_use): Add a mem_type argument and initialize the new
18556         mem_type field.
18557         (record_group_use): Add a mem_type argument.  Use address_p.
18558         Remove obsolete null checks of base_object.  Update call to record_use.
18559         (find_interesting_uses_op): Update call to record_group_use.
18560         (find_interesting_uses_cond): Likewise.
18561         (find_interesting_uses_address): Likewise.
18562         (get_mem_type_for_internal_fn): New function.
18563         (find_address_like_use): Likewise.
18564         (find_interesting_uses_stmt): Try find_address_like_use before
18565         calling find_interesting_uses_op.
18566         (addr_offset_valid_p): Use the iv mem_type field as the type
18567         of the addressed memory.
18568         (add_autoinc_candidates): Likewise.
18569         (get_address_cost): Likewise.
18570         (split_small_address_groups_p): Use address_p.
18571         (split_address_groups): Likewise.
18572         (add_iv_candidate_for_use): Likewise.
18573         (autoinc_possible_for_pair): Likewise.
18574         (rewrite_groups): Likewise.
18575         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
18576         (determine_group_iv_cost): Update after split of USE_ADDRESS.
18577         (get_alias_ptr_type_for_ptr_address): New function.
18578         (rewrite_use_address): Rewrite address uses in calls that were
18579         identified by find_address_like_use.
18581 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18582             Alan Hayward  <alan.hayward@arm.com>
18583             David Sherwood  <david.sherwood@arm.com>
18585         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
18586         TARGET_MEM_REFs.
18587         * gimple-expr.h (is_gimple_addressable: Likewise.
18588         * gimple-expr.c (is_gimple_address): Likewise.
18589         * internal-fn.c (expand_call_mem_ref): New function.
18590         (expand_mask_load_optab_fn): Use it.
18591         (expand_mask_store_optab_fn): Likewise.
18593 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18594             Alan Hayward  <alan.hayward@arm.com>
18595             David Sherwood  <david.sherwood@arm.com>
18597         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
18598         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
18599         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
18600         (cond_umax@var{mode}): Document.
18601         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
18602         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
18603         (cond_umin_optab, cond_umax_optab): New optabs.
18604         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
18605         (COND_IOR, COND_XOR): New internal functions.
18606         * internal-fn.h (get_conditional_internal_fn): Declare.
18607         * internal-fn.c (cond_binary_direct): New macro.
18608         (expand_cond_binary_optab_fn): Likewise.
18609         (direct_cond_binary_optab_supported_p): Likewise.
18610         (get_conditional_internal_fn): New function.
18611         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
18612         Cope with reduction statements that are vectorized as calls rather
18613         than assignments.
18614         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
18615         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
18616         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
18617         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18618         (UNSPEC_COND_EOR): New unspecs.
18619         (optab): Add mappings for them.
18620         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
18621         (sve_int_op, sve_fp_op): New int attributes.
18623 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18624             Alan Hayward  <alan.hayward@arm.com>
18625             David Sherwood  <david.sherwood@arm.com>
18627         * optabs.def (while_ult_optab): New optab.
18628         * doc/md.texi (while_ult@var{m}@var{n}): Document.
18629         * internal-fn.def (WHILE_ULT): New internal function.
18630         * internal-fn.h (direct_internal_fn_supported_p): New override
18631         that takes two types as argument.
18632         * internal-fn.c (while_direct): New macro.
18633         (expand_while_optab_fn): New function.
18634         (convert_optab_supported_p): Likewise.
18635         (direct_while_optab_supported_p): New macro.
18636         * wide-int.h (wi::udiv_ceil): New function.
18637         * tree-vectorizer.h (rgroup_masks): New structure.
18638         (vec_loop_masks): New typedef.
18639         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18640         and fully_masked_p.
18641         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18642         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18643         (vect_max_vf): New function.
18644         (slpeel_make_loop_iterate_ntimes): Delete.
18645         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18646         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18647         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18648         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18649         internal-fn.h, stor-layout.h and optabs-query.h.
18650         (vect_set_loop_mask): New function.
18651         (add_preheader_seq): Likewise.
18652         (add_header_seq): Likewise.
18653         (interleave_supported_p): Likewise.
18654         (vect_maybe_permute_loop_masks): Likewise.
18655         (vect_set_loop_masks_directly): Likewise.
18656         (vect_set_loop_condition_masked): Likewise.
18657         (vect_set_loop_condition_unmasked): New function, split out from
18658         slpeel_make_loop_iterate_ntimes.
18659         (slpeel_make_loop_iterate_ntimes): Rename to..
18660         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
18661         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18662         (vect_do_peeling): Update call accordingly.
18663         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18664         loops.
18665         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18666         mask_compare_type, can_fully_mask_p and fully_masked_p.
18667         (release_vec_loop_masks): New function.
18668         (_loop_vec_info): Use it to free the loop masks.
18669         (can_produce_all_loop_masks_p): New function.
18670         (vect_get_max_nscalars_per_iter): Likewise.
18671         (vect_verify_full_masking): Likewise.
18672         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18673         retries, and free the mask rgroups before retrying.  Check loop-wide
18674         reasons for disallowing fully-masked loops.  Make the final decision
18675         about whether use a fully-masked loop or not.
18676         (vect_estimate_min_profitable_iters): Do not assume that peeling
18677         for the number of iterations will be needed for fully-masked loops.
18678         (vectorizable_reduction): Disable fully-masked loops.
18679         (vectorizable_live_operation): Likewise.
18680         (vect_halve_mask_nunits): New function.
18681         (vect_double_mask_nunits): Likewise.
18682         (vect_record_loop_mask): Likewise.
18683         (vect_get_loop_mask): Likewise.
18684         (vect_transform_loop): Handle the case in which the final loop
18685         iteration might handle a partial vector.  Call vect_set_loop_condition
18686         instead of slpeel_make_loop_iterate_ntimes.
18687         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18688         (check_load_store_masking): New function.
18689         (prepare_load_store_mask): Likewise.
18690         (vectorizable_store): Handle fully-masked loops.
18691         (vectorizable_load): Likewise.
18692         (supportable_widening_operation): Use vect_halve_mask_nunits for
18693         booleans.
18694         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18695         (vect_gen_while): New function.
18696         * config/aarch64/aarch64.md (umax<mode>3): New expander.
18697         (aarch64_uqdec<mode>): New insn.
18699 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18700             Alan Hayward  <alan.hayward@arm.com>
18701             David Sherwood  <david.sherwood@arm.com>
18703         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18704         (reduc_xor_scal_optab): New optabs.
18705         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18706         (reduc_xor_scal_@var{m}): Document.
18707         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18708         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18709         internal functions.
18710         * fold-const-call.c (fold_const_call): Handle them.
18711         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18712         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18713         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18714         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18715         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18716         (UNSPEC_XORV): New unspecs.
18717         (optab): Add entries for them.
18718         (BITWISEV): New int iterator.
18719         (bit_reduc_op): New int attributes.
18721 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18722             Alan Hayward  <alan.hayward@arm.com>
18723             David Sherwood  <david.sherwood@arm.com>
18725         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18726         * internal-fn.def (VEC_SHL_INSERT): New internal function.
18727         * optabs.def (vec_shl_insert_optab): New optab.
18728         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18729         (duplicate_and_interleave): Likewise.
18730         * tree-vect-loop.c: Include internal-fn.h.
18731         (neutral_op_for_slp_reduction): New function, split out from
18732         get_initial_defs_for_reduction.
18733         (get_initial_def_for_reduction): Handle option 2 for variable-length
18734         vectors by loading the neutral value into a vector and then shifting
18735         the initial value into element 0.
18736         (get_initial_defs_for_reduction): Replace the code argument with
18737         the neutral value calculated by neutral_op_for_slp_reduction.
18738         Use gimple_build_vector for constant-length vectors.
18739         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18740         but the first group_size elements have a neutral value.
18741         Use duplicate_and_interleave otherwise.
18742         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18743         Update call to get_initial_defs_for_reduction.  Handle SLP
18744         reductions for variable-length vectors by creating one vector
18745         result for each scalar result, with the elements associated
18746         with other scalar results stubbed out with the neutral value.
18747         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18748         Require IFN_VEC_SHL_INSERT for double reductions on
18749         variable-length vectors, or SLP reductions that have
18750         a neutral value.  Require can_duplicate_and_interleave_p
18751         support for variable-length unchained SLP reductions if there
18752         is no neutral value, such as for MIN/MAX reductions.  Also require
18753         the number of vector elements to be a multiple of the number of
18754         SLP statements when doing variable-length unchained SLP reductions.
18755         Update call to vect_create_epilog_for_reduction.
18756         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18757         and remove initial values.
18758         (duplicate_and_interleave): Make public.
18759         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18760         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18762 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18763             Alan Hayward  <alan.hayward@arm.com>
18764             David Sherwood  <david.sherwood@arm.com>
18766         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18767         (can_duplicate_and_interleave_p): New function.
18768         (vect_get_and_check_slp_defs): Take the vector of statements
18769         rather than just the current one.  Remove excess parentheses.
18770         Restriction rejectinon of vect_constant_def and vect_external_def
18771         for variable-length vectors to boolean types, or types for which
18772         can_duplicate_and_interleave_p is false.
18773         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18774         (duplicate_and_interleave): New function.
18775         (vect_get_constant_vectors): Use gimple_build_vector for
18776         constant-length vectors and suitable variable-length constant
18777         vectors.  Use duplicate_and_interleave for other variable-length
18778         vectors.  Don't defer the update when inserting new statements.
18780 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18781             Alan Hayward  <alan.hayward@arm.com>
18782             David Sherwood  <david.sherwood@arm.com>
18784         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18785         min_profitable_iters doesn't go negative.
18787 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18788             Alan Hayward  <alan.hayward@arm.com>
18789             David Sherwood  <david.sherwood@arm.com>
18791         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18792         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18793         * optabs.def (vec_mask_load_lanes_optab): New optab.
18794         (vec_mask_store_lanes_optab): Likewise.
18795         * internal-fn.def (MASK_LOAD_LANES): New internal function.
18796         (MASK_STORE_LANES): Likewise.
18797         * internal-fn.c (mask_load_lanes_direct): New macro.
18798         (mask_store_lanes_direct): Likewise.
18799         (expand_mask_load_optab_fn): Handle masked operations.
18800         (expand_mask_load_lanes_optab_fn): New macro.
18801         (expand_mask_store_optab_fn): Handle masked operations.
18802         (expand_mask_store_lanes_optab_fn): New macro.
18803         (direct_mask_load_lanes_optab_supported_p): Likewise.
18804         (direct_mask_store_lanes_optab_supported_p): Likewise.
18805         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18806         parameter.
18807         (vect_load_lanes_supported): Likewise.
18808         * tree-vect-data-refs.c (strip_conversion): New function.
18809         (can_group_stmts_p): Likewise.
18810         (vect_analyze_data_ref_accesses): Use it instead of checking
18811         for a pair of assignments.
18812         (vect_store_lanes_supported): Take a masked_p parameter.
18813         (vect_load_lanes_supported): Likewise.
18814         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18815         vect_store_lanes_supported and vect_load_lanes_supported.
18816         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18817         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18818         parameter.  Don't allow gaps for masked accesses.
18819         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
18820         and vect_load_lanes_supported.
18821         (get_load_store_type): Take a masked_p parameter and update
18822         call to get_group_load_store_type.
18823         (vectorizable_store): Update call to get_load_store_type.
18824         Handle IFN_MASK_STORE_LANES.
18825         (vectorizable_load): Update call to get_load_store_type.
18826         Handle IFN_MASK_LOAD_LANES.
18828 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18829             Alan Hayward  <alan.hayward@arm.com>
18830             David Sherwood  <david.sherwood@arm.com>
18832         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18833         modes for SVE.
18834         * config/aarch64/aarch64-protos.h
18835         (aarch64_sve_struct_memory_operand_p): Declare.
18836         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18837         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18838         (VPRED, vpred): Handle SVE structure modes.
18839         * config/aarch64/constraints.md (Utx): New constraint.
18840         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18841         (aarch64_sve_struct_nonimmediate_operand): New predicates.
18842         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18843         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18844         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18845         structure modes.  Split into pieces after RA.
18846         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18847         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18848         New patterns.
18849         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18850         SVE structure modes.
18851         (aarch64_classify_address): Likewise.
18852         (sizetochar): Move earlier in file.
18853         (aarch64_print_operand): Handle SVE register lists.
18854         (aarch64_array_mode): New function.
18855         (aarch64_sve_struct_memory_operand_p): Likewise.
18856         (TARGET_ARRAY_MODE): Redefine.
18858 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18859             Alan Hayward  <alan.hayward@arm.com>
18860             David Sherwood  <david.sherwood@arm.com>
18862         * target.def (array_mode): New target hook.
18863         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18864         * doc/tm.texi: Regenerate.
18865         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18866         * hooks.c (hook_optmode_mode_uhwi_none): New function.
18867         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18868         targetm.array_mode.
18869         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
18870         type sizes.
18872 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18873             Alan Hayward  <alan.hayward@arm.com>
18874             David Sherwood  <david.sherwood@arm.com>
18876         * fold-const.c (fold_binary_loc): Check the argument types
18877         rather than the result type when testing for a vector operation.
18879 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18881         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18882         * doc/tm.texi: Regenerate.
18884 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18885             Alan Hayward  <alan.hayward@arm.com>
18886             David Sherwood  <david.sherwood@arm.com>
18888         * doc/invoke.texi (-msve-vector-bits=): Document new option.
18889         (sve): Document new AArch64 extension.
18890         * doc/md.texi (w): Extend the description of the AArch64
18891         constraint to include SVE vectors.
18892         (Upl, Upa): Document new AArch64 predicate constraints.
18893         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18894         enum.
18895         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18896         (msve-vector-bits=): New option.
18897         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18898         SVE when these are disabled.
18899         (sve): New extension.
18900         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18901         modes.  Adjust their number of units based on aarch64_sve_vg.
18902         (MAX_BITSIZE_MODE_ANY_MODE): Define.
18903         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18904         aarch64_addr_query_type.
18905         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18906         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18907         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18908         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18909         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18910         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18911         (aarch64_simd_imm_zero_p): Delete.
18912         (aarch64_check_zero_based_sve_index_immediate): Declare.
18913         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18914         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18915         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18916         (aarch64_sve_float_mul_immediate_p): Likewise.
18917         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18918         rather than an rtx.
18919         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18920         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18921         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18922         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18923         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18924         (aarch64_regmode_natural_size): Likewise.
18925         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18926         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18927         left one place.
18928         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18929         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18930         for VG and the SVE predicate registers.
18931         (V_ALIASES): Add a "z"-prefixed alias.
18932         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18933         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18934         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18935         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18936         (REG_CLASS_NAMES): Add entries for them.
18937         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
18938         and the predicate registers.
18939         (aarch64_sve_vg): Declare.
18940         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18941         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18942         (REGMODE_NATURAL_SIZE): Define.
18943         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18944         SVE macros.
18945         * config/aarch64/aarch64.c: Include cfgrtl.h.
18946         (simd_immediate_info): Add a constructor for series vectors,
18947         and an associated step field.
18948         (aarch64_sve_vg): New variable.
18949         (aarch64_dbx_register_number): Handle VG and the predicate registers.
18950         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18951         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18952         (VEC_ANY_DATA, VEC_STRUCT): New constants.
18953         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18954         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18955         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18956         (aarch64_get_mask_mode): New functions.
18957         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18958         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18959         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
18960         predicate modes and predicate registers.  Explicitly restrict
18961         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
18962         to store a vector mode if it is recognized by
18963         aarch64_classify_vector_mode.
18964         (aarch64_regmode_natural_size): New function.
18965         (aarch64_hard_regno_caller_save_mode): Return the original mode
18966         for predicates.
18967         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18968         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18969         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18970         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18971         functions.
18972         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
18973         does not overlap dest if the function is frame-related.  Handle
18974         SVE constants.
18975         (aarch64_split_add_offset): New function.
18976         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
18977         them aarch64_add_offset.
18978         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
18979         and update call to aarch64_sub_sp.
18980         (aarch64_add_cfa_expression): New function.
18981         (aarch64_expand_prologue): Pass extra temporary registers to the
18982         functions above.  Handle the case in which we need to emit new
18983         DW_CFA_expressions for registers that were originally saved
18984         relative to the stack pointer, but now have to be expressed
18985         relative to the frame pointer.
18986         (aarch64_output_mi_thunk): Pass extra temporary registers to the
18987         functions above.
18988         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
18989         IP0 and IP1 values for SVE frames.
18990         (aarch64_expand_vec_series): New function.
18991         (aarch64_expand_sve_widened_duplicate): Likewise.
18992         (aarch64_expand_sve_const_vector): Likewise.
18993         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
18994         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
18995         into the register, rather than emitting a SET directly.
18996         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
18997         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
18998         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
18999         (offset_9bit_signed_scaled_p): New functions.
19000         (aarch64_replicate_bitmask_imm): New function.
19001         (aarch64_bitmask_imm): Use it.
19002         (aarch64_cannot_force_const_mem): Reject expressions involving
19003         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
19004         (aarch64_classify_index): Handle SVE indices, by requiring
19005         a plain register index with a scale that matches the element size.
19006         (aarch64_classify_address): Handle SVE addresses.  Assert that
19007         the mode of the address is VOIDmode or an integer mode.
19008         Update call to aarch64_classify_symbol.
19009         (aarch64_classify_symbolic_expression): Update call to
19010         aarch64_classify_symbol.
19011         (aarch64_const_vec_all_in_range_p): New function.
19012         (aarch64_print_vector_float_operand): Likewise.
19013         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
19014         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
19015         and the FP immediates 1.0 and 0.5.
19016         (aarch64_print_address_internal): Handle SVE addresses.
19017         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19018         (aarch64_regno_regclass): Handle predicate registers.
19019         (aarch64_secondary_reload): Handle big-endian reloads of SVE
19020         data modes.
19021         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19022         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19023         (aarch64_convert_sve_vector_bits): New function.
19024         (aarch64_override_options): Use it to handle -msve-vector-bits=.
19025         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19026         rather than an rtx.
19027         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19028         Handle SVE vector and predicate modes.  Accept VL-based constants
19029         that need only one temporary register, and VL offsets that require
19030         no temporary registers.
19031         (aarch64_conditional_register_usage): Mark the predicate registers
19032         as fixed if SVE isn't available.
19033         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19034         Return true for SVE vector and predicate modes.
19035         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19036         rather than an unsigned int.  Handle SVE modes.
19037         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
19038         SVE modes.
19039         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19040         if SVE is enabled.
19041         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19042         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19043         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19044         (aarch64_sve_float_mul_immediate_p): New functions.
19045         (aarch64_sve_valid_immediate): New function.
19046         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
19047         Explicitly reject structure modes.  Check for INDEX constants.
19048         Handle PTRUE and PFALSE constants.
19049         (aarch64_check_zero_based_sve_index_immediate): New function.
19050         (aarch64_simd_imm_zero_p): Delete.
19051         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
19052         vector modes.  Accept constants in the range of CNT[BHWD].
19053         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
19054         ask for an Advanced SIMD mode.
19055         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
19056         (aarch64_simd_vector_alignment): Handle SVE predicates.
19057         (aarch64_vectorize_preferred_vector_alignment): New function.
19058         (aarch64_simd_vector_alignment_reachable): Use it instead of
19059         the vector size.
19060         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
19061         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
19062         functions.
19063         (MAX_VECT_LEN): Delete.
19064         (expand_vec_perm_d): Add a vec_flags field.
19065         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
19066         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
19067         (aarch64_evpc_ext): Don't apply a big-endian lane correction
19068         for SVE modes.
19069         (aarch64_evpc_rev): Rename to...
19070         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
19071         (aarch64_evpc_rev_global): New function.
19072         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
19073         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
19074         MAX_VECT_LEN.
19075         (aarch64_evpc_sve_tbl): New function.
19076         (aarch64_expand_vec_perm_const_1): Update after rename of
19077         aarch64_evpc_rev.  Handle SVE permutes too, trying
19078         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19079         than aarch64_evpc_tbl.
19080         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19081         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
19082         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
19083         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
19084         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
19085         (aarch64_expand_sve_vcond): New functions.
19086         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
19087         of aarch64_vector_mode_p.
19088         (aarch64_dwarf_poly_indeterminate_value): New function.
19089         (aarch64_compute_pressure_classes): Likewise.
19090         (aarch64_can_change_mode_class): Likewise.
19091         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
19092         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
19093         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
19094         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
19095         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
19096         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
19097         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
19098         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
19099         constraints.
19100         (Dn, Dl, Dr): Accept const as well as const_vector.
19101         (Dz): Likewise.  Compare against CONST0_RTX.
19102         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
19103         of "vector" where appropriate.
19104         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
19105         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
19106         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
19107         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
19108         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
19109         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
19110         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
19111         (v_int_equiv): Extend to SVE modes.
19112         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
19113         mode attributes.
19114         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
19115         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
19116         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
19117         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
19118         (SVE_COND_FP_CMP): New int iterators.
19119         (perm_hilo): Handle the new unpack unspecs.
19120         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
19121         attributes.
19122         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
19123         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
19124         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
19125         (aarch64_equality_operator, aarch64_constant_vector_operand)
19126         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
19127         (aarch64_sve_nonimmediate_operand): Likewise.
19128         (aarch64_sve_general_operand): Likewise.
19129         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
19130         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
19131         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
19132         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
19133         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
19134         (aarch64_sve_float_arith_immediate): Likewise.
19135         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
19136         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
19137         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
19138         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
19139         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
19140         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
19141         (aarch64_sve_float_arith_operand): Likewise.
19142         (aarch64_sve_float_arith_with_sub_operand): Likewise.
19143         (aarch64_sve_float_mul_operand): Likewise.
19144         (aarch64_sve_vec_perm_operand): Likewise.
19145         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
19146         (aarch64_mov_operand): Accept const_poly_int and const_vector.
19147         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
19148         as well as const_vector.
19149         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
19150         in file.  Use CONST0_RTX and CONSTM1_RTX.
19151         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
19152         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
19153         Use aarch64_simd_imm_zero.
19154         * config/aarch64/aarch64-sve.md: New file.
19155         * config/aarch64/aarch64.md: Include it.
19156         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
19157         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
19158         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
19159         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
19160         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
19161         (sve): New attribute.
19162         (enabled): Disable instructions with the sve attribute unless
19163         TARGET_SVE.
19164         (movqi, movhi): Pass CONST_POLY_INT operaneds through
19165         aarch64_expand_mov_immediate.
19166         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
19167         CNT[BHSD] immediates.
19168         (movti): Split CONST_POLY_INT moves into two halves.
19169         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
19170         Split additions that need a temporary here if the destination
19171         is the stack pointer.
19172         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
19173         (*add<mode>3_poly_1): New instruction.
19174         (set_clobber_cc): New expander.
19176 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19178         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
19179         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
19180         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
19181         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
19182         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
19183         Change innermode from fixed_mode_size to machine_mode.
19184         (simplify_subreg): Update call accordingly.  Handle a constant-sized
19185         subreg of a variable-length CONST_VECTOR.
19187 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19188             Alan Hayward  <alan.hayward@arm.com>
19189             David Sherwood  <david.sherwood@arm.com>
19191         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
19192         (add_offset_to_base): New function, split out from...
19193         (create_mem_ref): ...here.  When handling a scale other than 1,
19194         check first whether the address is valid without the offset.
19195         Add it into the base if so, leaving the index and scale as-is.
19197 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
19199         PR c++/83778
19200         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
19201         fold_for_warn before checking if arg2 is INTEGER_CST.
19203 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
19205         * config/rs6000/predicates.md (load_multiple_operation): Delete.
19206         (store_multiple_operation): Delete.
19207         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
19208         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
19209         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
19210         guarded by TARGET_STRING.
19211         (rs6000_output_load_multiple): Delete.
19212         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
19213         OPTION_MASK_STRING / TARGET_STRING handling.
19214         (print_operand) <'N', 'O'>: Add comment that these are unused now.
19215         (const rs6000_opt_masks) <"string">: Change mask to 0.
19216         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
19217         (MASK_STRING): Delete.
19218         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
19219         parts.  Simplify.
19220         (load_multiple): Delete.
19221         (*ldmsi8): Delete.
19222         (*ldmsi7): Delete.
19223         (*ldmsi6): Delete.
19224         (*ldmsi5): Delete.
19225         (*ldmsi4): Delete.
19226         (*ldmsi3): Delete.
19227         (store_multiple): Delete.
19228         (*stmsi8): Delete.
19229         (*stmsi7): Delete.
19230         (*stmsi6): Delete.
19231         (*stmsi5): Delete.
19232         (*stmsi4): Delete.
19233         (*stmsi3): Delete.
19234         (movmemsi_8reg): Delete.
19235         (corresponding unnamed define_insn): Delete.
19236         (movmemsi_6reg): Delete.
19237         (corresponding unnamed define_insn): Delete.
19238         (movmemsi_4reg): Delete.
19239         (corresponding unnamed define_insn): Delete.
19240         (movmemsi_2reg): Delete.
19241         (corresponding unnamed define_insn): Delete.
19242         (movmemsi_1reg): Delete.
19243         (corresponding unnamed define_insn): Delete.
19244         * config/rs6000/rs6000.opt (mno-string): New.
19245         (mstring): Replace by deprecation warning stub.
19246         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
19248 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
19250         * regrename.c (regrename_do_replace): If replacing the same
19251         reg multiple times, try to reuse last created gen_raw_REG.
19253         PR debug/81155
19254         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
19255         main to workaround a bug in GDB.
19257 2018-01-12  Tom de Vries  <tom@codesourcery.com>
19259         PR target/83737
19260         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
19262 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
19264         PR rtl-optimization/80481
19265         * ira-color.c (get_cap_member): New function.
19266         (allocnos_conflict_by_live_ranges_p): Use it.
19267         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
19268         (setup_slot_coalesced_allocno_live_ranges): Ditto.
19270 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
19272         PR target/83628
19273         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
19274         (*saddl_se_1): Ditto.
19275         (*ssubsi_1): Ditto.
19276         (*ssubl_se_1): Ditto.
19278 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
19280         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
19281         rather than wi::to_widest for DR_INITs.
19282         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
19283         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
19284         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
19285         INTEGER_CSTs.
19286         (vect_analyze_group_access_1): Note that here.
19288 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
19290         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
19291         polynomial type sizes.
19293 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
19295         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
19296         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
19297         (gimple_add_tmp_var): Likewise.
19299 2018-01-12  Martin Liska  <mliska@suse.cz>
19301         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
19302         (gimple_alloc_sizes): Likewise.
19303         (dump_gimple_statistics): Use PRIu64 in printf format.
19304         * gimple.h: Change uint64_t to int.
19306 2018-01-12  Martin Liska  <mliska@suse.cz>
19308         * tree-core.h: Use uint64_t instead of int.
19309         * tree.c (tree_node_counts): Likewise.
19310         (tree_node_sizes): Likewise.
19311         (dump_tree_statistics): Use PRIu64 in printf format.
19313 2018-01-12  Martin Liska  <mliska@suse.cz>
19315         * Makefile.in: As qsort_chk is implemented in vec.c, add
19316         vec.o to linkage of gencfn-macros.
19317         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
19318         passing the info to record_node_allocation_statistics.
19319         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
19320         and pass the info.
19321         * ggc-common.c (struct ggc_usage): Add operator== and use
19322         it in operator< and compare function.
19323         * mem-stats.h (struct mem_usage): Likewise.
19324         * vec.c (struct vec_usage): Remove operator< and compare
19325         function. Can be simply inherited.
19327 2018-01-12  Martin Jambor  <mjambor@suse.cz>
19329         PR target/81616
19330         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
19331         * tree-ssa-math-opts.c: Include domwalk.h.
19332         (convert_mult_to_fma_1): New function.
19333         (fma_transformation_info): New type.
19334         (fma_deferring_state): Likewise.
19335         (cancel_fma_deferring): New function.
19336         (result_of_phi): Likewise.
19337         (last_fma_candidate_feeds_initial_phi): Likewise.
19338         (convert_mult_to_fma): Added deferring logic, split actual
19339         transformation to convert_mult_to_fma_1.
19340         (math_opts_dom_walker): New type.
19341         (math_opts_dom_walker::after_dom_children): New method, body moved
19342         here from pass_optimize_widening_mul::execute, added deferring logic
19343         bits.
19344         (pass_optimize_widening_mul::execute): Moved most of code to
19345         math_opts_dom_walker::after_dom_children.
19346         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
19347         * config/i386/i386.c (ix86_option_override_internal): Added
19348         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
19350 2018-01-12  Richard Biener  <rguenther@suse.de>
19352         PR debug/83157
19353         * dwarf2out.c (gen_variable_die): Do not reset old_die for
19354         inline instance vars.
19356 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
19358         PR target/81819
19359         * config/rx/rx.c (rx_is_restricted_memory_address):
19360         Handle SUBREG case.
19362 2018-01-12  Richard Biener  <rguenther@suse.de>
19364         PR tree-optimization/80846
19365         * target.def (split_reduction): New target hook.
19366         * targhooks.c (default_split_reduction): New function.
19367         * targhooks.h (default_split_reduction): Declare.
19368         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
19369         target requests first reduce vectors by combining low and high
19370         parts.
19371         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
19372         (get_vectype_for_scalar_type_and_size): Export.
19373         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
19374         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
19375         * doc/tm.texi: Regenerate.
19376         * config/i386/i386.c (ix86_split_reduction): Implement
19377         TARGET_VECTORIZE_SPLIT_REDUCTION.
19379 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19381         PR target/83368
19382         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19383         in PIC mode except for TARGET_VXWORKS_RTP.
19384         * config/sparc/sparc.c: Include cfgrtl.h.
19385         (TARGET_INIT_PIC_REG): Define.
19386         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19387         (sparc_pic_register_p): New predicate.
19388         (sparc_legitimate_address_p): Use it.
19389         (sparc_legitimize_pic_address): Likewise.
19390         (sparc_delegitimize_address): Likewise.
19391         (sparc_mode_dependent_address_p): Likewise.
19392         (gen_load_pcrel_sym): Remove 4th parameter.
19393         (load_got_register): Adjust call to above.  Remove obsolete stuff.
19394         (sparc_expand_prologue): Do not call load_got_register here.
19395         (sparc_flat_expand_prologue): Likewise.
19396         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19397         (sparc_use_pseudo_pic_reg): New function.
19398         (sparc_init_pic_reg): Likewise.
19399         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19400         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19402 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
19404         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19405         Add item for branch_cost.
19407 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19409         PR rtl-optimization/83565
19410         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19411         not extend the result to a larger mode for rotate operations.
19412         (num_sign_bit_copies1): Likewise.
19414 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19416         PR target/40411
19417         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19418         -symbolic.
19419         Use values-Xc.o for -pedantic.
19420         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19422 2018-01-12  Martin Liska  <mliska@suse.cz>
19424         PR ipa/83054
19425         * ipa-devirt.c (final_warning_record::grow_type_warnings):
19426         New function.
19427         (possible_polymorphic_call_targets): Use it.
19428         (ipa_devirt): Likewise.
19430 2018-01-12  Martin Liska  <mliska@suse.cz>
19432         * profile-count.h (enum profile_quality): Use 0 as invalid
19433         enum value of profile_quality.
19435 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
19437         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
19438         -mext-string options.
19440 2018-01-12  Richard Biener  <rguenther@suse.de>
19442         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
19443         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
19444         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19445         Likewise.
19446         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19448 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
19450         * configure.ac (--with-long-double-format): Add support for the
19451         configuration option to change the default long double format on
19452         PowerPC systems.
19453         * config.gcc (powerpc*-linux*-*): Likewise.
19454         * configure: Regenerate.
19455         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
19456         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
19457         used without modification.
19459 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19461         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
19462         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
19463         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
19464         MISC_BUILTIN_SPEC_BARRIER.
19465         (rs6000_init_builtins): Likewise.
19466         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
19467         enum value.
19468         (speculation_barrier): New define_insn.
19469         * doc/extend.texi: Document __builtin_speculation_barrier.
19471 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
19473         PR target/83203
19474         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
19475         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
19476         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
19477         iterators.
19478         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
19479         integral modes instead of "ss" and "sd".
19480         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
19481         vectors with 32-bit and 64-bit elements.
19482         (vecdupssescalarmodesuffix): New mode attribute.
19483         (vec_dup<mode>): Use it.
19485 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
19487         PR target/83330
19488         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
19489         frame if argument is passed on stack.
19491 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
19493         PR target/82682
19494         * ree.c (combine_reaching_defs): Optimize also
19495         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
19496         reg2=any_extend(exp); reg1=reg2;, formatting fix.
19498 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
19500         PR middle-end/83189
19501         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
19503 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
19505         PR middle-end/83718
19506         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
19507         after they are computed.
19509 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
19511         PR tree-optimization/83695
19512         * gimple-loop-linterchange.cc
19513         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
19514         reset cached scev information after interchange.
19515         (pass_linterchange::execute): Remove call to scev_reset_htab.
19517 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19519         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
19520         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
19521         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
19522         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
19523         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
19524         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
19525         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
19526         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
19527         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
19528         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
19529         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
19530         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
19531         (V_lane_reg): Likewise.
19532         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
19533         New define_expand.
19534         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
19535         (vfmal_lane_low<mode>_intrinsic,
19536         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
19537         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
19538         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
19539         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
19540         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
19541         vfmsl_lane_high<mode>_intrinsic): New define_insns.
19543 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19545         * config/arm/arm-cpus.in (fp16fml): New feature.
19546         (ALL_SIMD): Add fp16fml.
19547         (armv8.2-a): Add fp16fml as an option.
19548         (armv8.3-a): Likewise.
19549         (armv8.4-a): Add fp16fml as part of fp16.
19550         * config/arm/arm.h (TARGET_FP16FML): Define.
19551         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
19552         when appropriate.
19553         * config/arm/arm-modes.def (V2HF): Define.
19554         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19555         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19556         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19557         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19558         vfmsl_low, vfmsl_high): New set of builtins.
19559         * config/arm/iterators.md (PLUSMINUS): New code iterator.
19560         (vfml_op): New code attribute.
19561         (VFMLHALVES): New int iterator.
19562         (VFML, VFMLSEL): New mode attributes.
19563         (V_reg): Define mapping for V2HF.
19564         (V_hi, V_lo): New mode attributes.
19565         (VF_constraint): Likewise.
19566         (vfml_half, vfml_half_selector): New int attributes.
19567         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19568         define_expand.
19569         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
19570         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
19571         New define_insn.
19572         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
19573         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
19574         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
19575         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
19576         documentation.
19577         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
19578         Document new effective target and option set.
19580 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19582         * config/arm/arm-cpus.in (armv8_4): New feature.
19583         (ARMv8_4a): New fgroup.
19584         (armv8.4-a): New arch.
19585         * config/arm/arm-tables.opt: Regenerate.
19586         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
19587         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
19588         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
19589         Add matching rules for -march=armv8.4-a and extensions.
19590         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
19592 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
19594         PR target/81821
19595         * config/rx/rx.md (BW): New mode attribute.
19596         (sync_lock_test_and_setsi): Add mode suffix to insn output.
19598 2018-01-11  Richard Biener  <rguenther@suse.de>
19600         PR tree-optimization/83435
19601         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
19602         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
19603         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
19605 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19606             Alan Hayward  <alan.hayward@arm.com>
19607             David Sherwood  <david.sherwood@arm.com>
19609         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
19610         field.
19611         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
19612         (aarch64_print_address_internal): Use it to check for a zero offset.
19614 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19615             Alan Hayward  <alan.hayward@arm.com>
19616             David Sherwood  <david.sherwood@arm.com>
19618         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
19619         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
19620         Return a poly_int64 rather than a HOST_WIDE_INT.
19621         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
19622         rather than a HOST_WIDE_INT.
19623         * config/aarch64/aarch64.h (aarch64_frame): Protect with
19624         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
19625         hard_fp_offset, frame_size, initial_adjust, callee_offset and
19626         final_offset from HOST_WIDE_INT to poly_int64.
19627         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19628         to_constant when getting the number of units in an Advanced SIMD
19629         mode.
19630         (aarch64_builtin_vectorized_function): Check for a constant number
19631         of units.
19632         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19633         GET_MODE_SIZE.
19634         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19635         attribute instead of GET_MODE_NUNITS.
19636         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19637         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19638         GET_MODE_SIZE for fixed-size registers.
19639         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19640         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19641         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19642         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19643         (aarch64_print_operand, aarch64_print_address_internal)
19644         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19645         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19646         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19647         Handle polynomial GET_MODE_SIZE.
19648         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
19649         wider than SImode without modification.
19650         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19651         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19652         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19653         passing and returning SVE modes.
19654         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19655         rather than GEN_INT.
19656         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19657         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19658         (aarch64_allocate_and_probe_stack_space): Likewise.
19659         (aarch64_layout_frame): Cope with polynomial offsets.
19660         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19661         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
19662         polynomial offsets.
19663         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19664         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19665         poly_int64 rather than a HOST_WIDE_INT.
19666         (aarch64_get_separate_components, aarch64_process_components)
19667         (aarch64_expand_prologue, aarch64_expand_epilogue)
19668         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19669         (aarch64_anchor_offset): New function, split out from...
19670         (aarch64_legitimize_address): ...here.
19671         (aarch64_builtin_vectorization_cost): Handle polynomial
19672         TYPE_VECTOR_SUBPARTS.
19673         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19674         GET_MODE_NUNITS.
19675         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19676         number of elements from the PARALLEL rather than the mode.
19677         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19678         rather than GET_MODE_BITSIZE.
19679         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19680         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19681         (aarch64_expand_vec_perm_const_1): Handle polynomial
19682         d->perm.length () and d->perm elements.
19683         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
19684         Apply to_constant to d->perm elements.
19685         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19686         polynomial CONST_VECTOR_NUNITS.
19687         (aarch64_move_pointer): Take amount as a poly_int64 rather
19688         than an int.
19689         (aarch64_progress_pointer): Avoid temporary variable.
19690         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19691         the mode attribute instead of GET_MODE.
19693 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19694             Alan Hayward  <alan.hayward@arm.com>
19695             David Sherwood  <david.sherwood@arm.com>
19697         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19698         x exists before using it.
19699         (aarch64_add_constant_internal): Rename to...
19700         (aarch64_add_offset_1): ...this.  Replace regnum with separate
19701         src and dest rtxes.  Handle the case in which they're different,
19702         including when the offset is zero.  Replace scratchreg with an rtx.
19703         Use 2 additions if there is no spare register into which we can
19704         move a 16-bit constant.
19705         (aarch64_add_constant): Delete.
19706         (aarch64_add_offset): Replace reg with separate src and dest
19707         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
19708         Use aarch64_add_offset_1.
19709         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19710         an rtx rather than an int.  Take the delta as a poly_int64
19711         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
19712         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19713         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19714         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19715         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19716         and aarch64_add_sp.
19717         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19718         aarch64_add_constant.
19720 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19722         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19723         Use scalar_float_mode.
19725 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19727         * config/aarch64/aarch64-simd.md
19728         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19729         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19730         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19731         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19732         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19733         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19734         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19735         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19736         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19737         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19739 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19741         PR target/83514
19742         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19743         targ_options->x_arm_arch_string is non NULL.
19745 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
19747         * config/aarch64/aarch64.h
19748         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
19750 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
19752         PR target/82096
19753         * expmed.c (emit_store_flag_force): Swap if const op0
19754         and change VOIDmode to mode of op0.
19756 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19758         PR rtl-optimization/83761
19759         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19760         than bytes to mode_for_size.
19762 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
19764         PR middle-end/83189
19765         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19766         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19767         profile.
19769 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
19771         PR middle-end/83575
19772         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19773         when in layout mode.
19774         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19775         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19776         partition fixup.
19778 2018-01-10  Michael Collison  <michael.collison@arm.com>
19780         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19781         * config/aarch64/aarch64-option-extension.def: Add
19782         AARCH64_OPT_EXTENSION of 'fp16fml'.
19783         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19784         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19785         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19786         * config/aarch64/constraints.md (Ui7): New constraint.
19787         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19788         (VFMLA_SEL_W): Ditto.
19789         (f16quad): Ditto.
19790         (f16mac1): Ditto.
19791         (VFMLA16_LOW): New int iterator.
19792         (VFMLA16_HIGH): Ditto.
19793         (UNSPEC_FMLAL): New unspec.
19794         (UNSPEC_FMLSL): Ditto.
19795         (UNSPEC_FMLAL2): Ditto.
19796         (UNSPEC_FMLSL2): Ditto.
19797         (f16mac): New code attribute.
19798         * config/aarch64/aarch64-simd-builtins.def
19799         (aarch64_fmlal_lowv2sf): Ditto.
19800         (aarch64_fmlsl_lowv2sf): Ditto.
19801         (aarch64_fmlalq_lowv4sf): Ditto.
19802         (aarch64_fmlslq_lowv4sf): Ditto.
19803         (aarch64_fmlal_highv2sf): Ditto.
19804         (aarch64_fmlsl_highv2sf): Ditto.
19805         (aarch64_fmlalq_highv4sf): Ditto.
19806         (aarch64_fmlslq_highv4sf): Ditto.
19807         (aarch64_fmlal_lane_lowv2sf): Ditto.
19808         (aarch64_fmlsl_lane_lowv2sf): Ditto.
19809         (aarch64_fmlal_laneq_lowv2sf): Ditto.
19810         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19811         (aarch64_fmlalq_lane_lowv4sf): Ditto.
19812         (aarch64_fmlsl_lane_lowv4sf): Ditto.
19813         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19814         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19815         (aarch64_fmlal_lane_highv2sf): Ditto.
19816         (aarch64_fmlsl_lane_highv2sf): Ditto.
19817         (aarch64_fmlal_laneq_highv2sf): Ditto.
19818         (aarch64_fmlsl_laneq_highv2sf): Ditto.
19819         (aarch64_fmlalq_lane_highv4sf): Ditto.
19820         (aarch64_fmlsl_lane_highv4sf): Ditto.
19821         (aarch64_fmlalq_laneq_highv4sf): Ditto.
19822         (aarch64_fmlsl_laneq_highv4sf): Ditto.
19823         * config/aarch64/aarch64-simd.md:
19824         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19825         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19826         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19827         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19828         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19829         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19830         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19831         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19832         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19833         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19834         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19835         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19836         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19837         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19838         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19839         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19840         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19841         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19842         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19843         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19844         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19845         (vfmlsl_low_u32): Ditto.
19846         (vfmlalq_low_u32): Ditto.
19847         (vfmlslq_low_u32): Ditto.
19848         (vfmlal_high_u32): Ditto.
19849         (vfmlsl_high_u32): Ditto.
19850         (vfmlalq_high_u32): Ditto.
19851         (vfmlslq_high_u32): Ditto.
19852         (vfmlal_lane_low_u32): Ditto.
19853         (vfmlsl_lane_low_u32): Ditto.
19854         (vfmlal_laneq_low_u32): Ditto.
19855         (vfmlsl_laneq_low_u32): Ditto.
19856         (vfmlalq_lane_low_u32): Ditto.
19857         (vfmlslq_lane_low_u32): Ditto.
19858         (vfmlalq_laneq_low_u32): Ditto.
19859         (vfmlslq_laneq_low_u32): Ditto.
19860         (vfmlal_lane_high_u32): Ditto.
19861         (vfmlsl_lane_high_u32): Ditto.
19862         (vfmlal_laneq_high_u32): Ditto.
19863         (vfmlsl_laneq_high_u32): Ditto.
19864         (vfmlalq_lane_high_u32): Ditto.
19865         (vfmlslq_lane_high_u32): Ditto.
19866         (vfmlalq_laneq_high_u32): Ditto.
19867         (vfmlslq_laneq_high_u32): Ditto.
19868         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19869         (AARCH64_FL_FOR_ARCH8_4): New.
19870         (AARCH64_ISA_F16FML): New ISA flag.
19871         (TARGET_F16FML): New feature flag for fp16fml.
19872         (doc/invoke.texi): Document new fp16fml option.
19874 2018-01-10  Michael Collison  <michael.collison@arm.com>
19876         * config/aarch64/aarch64-builtins.c:
19877         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19878         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19879         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19880         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19881         (AARCH64_ISA_SHA3): New ISA flag.
19882         (TARGET_SHA3): New feature flag for sha3.
19883         * config/aarch64/iterators.md (sha512_op): New int attribute.
19884         (CRYPTO_SHA512): New int iterator.
19885         (UNSPEC_SHA512H): New unspec.
19886         (UNSPEC_SHA512H2): Ditto.
19887         (UNSPEC_SHA512SU0): Ditto.
19888         (UNSPEC_SHA512SU1): Ditto.
19889         * config/aarch64/aarch64-simd-builtins.def
19890         (aarch64_crypto_sha512hqv2di): New builtin.
19891         (aarch64_crypto_sha512h2qv2di): Ditto.
19892         (aarch64_crypto_sha512su0qv2di): Ditto.
19893         (aarch64_crypto_sha512su1qv2di): Ditto.
19894         (aarch64_eor3qv8hi): Ditto.
19895         (aarch64_rax1qv2di): Ditto.
19896         (aarch64_xarqv2di): Ditto.
19897         (aarch64_bcaxqv8hi): Ditto.
19898         * config/aarch64/aarch64-simd.md:
19899         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19900         (aarch64_crypto_sha512su0qv2di): Ditto.
19901         (aarch64_crypto_sha512su1qv2di): Ditto.
19902         (aarch64_eor3qv8hi): Ditto.
19903         (aarch64_rax1qv2di): Ditto.
19904         (aarch64_xarqv2di): Ditto.
19905         (aarch64_bcaxqv8hi): Ditto.
19906         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19907         (vsha512h2q_u64): Ditto.
19908         (vsha512su0q_u64): Ditto.
19909         (vsha512su1q_u64): Ditto.
19910         (veor3q_u16): Ditto.
19911         (vrax1q_u64): Ditto.
19912         (vxarq_u64): Ditto.
19913         (vbcaxq_u16): Ditto.
19914         * config/arm/types.md (crypto_sha512): New type attribute.
19915         (crypto_sha3): Ditto.
19916         (doc/invoke.texi): Document new sha3 option.
19918 2018-01-10  Michael Collison  <michael.collison@arm.com>
19920         * config/aarch64/aarch64-builtins.c:
19921         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19922         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19923         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19924         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19925         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19926         (AARCH64_ISA_SM4): New ISA flag.
19927         (TARGET_SM4): New feature flag for sm4.
19928         * config/aarch64/aarch64-simd-builtins.def
19929         (aarch64_sm3ss1qv4si): Ditto.
19930         (aarch64_sm3tt1aq4si): Ditto.
19931         (aarch64_sm3tt1bq4si): Ditto.
19932         (aarch64_sm3tt2aq4si): Ditto.
19933         (aarch64_sm3tt2bq4si): Ditto.
19934         (aarch64_sm3partw1qv4si): Ditto.
19935         (aarch64_sm3partw2qv4si): Ditto.
19936         (aarch64_sm4eqv4si): Ditto.
19937         (aarch64_sm4ekeyqv4si): Ditto.
19938         * config/aarch64/aarch64-simd.md:
19939         (aarch64_sm3ss1qv4si): Ditto.
19940         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19941         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19942         (aarch64_sm4eqv4si): Ditto.
19943         (aarch64_sm4ekeyqv4si): Ditto.
19944         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19945         (sm3part_op): Ditto.
19946         (CRYPTO_SM3TT): Ditto.
19947         (CRYPTO_SM3PART): Ditto.
19948         (UNSPEC_SM3SS1): New unspec.
19949         (UNSPEC_SM3TT1A): Ditto.
19950         (UNSPEC_SM3TT1B): Ditto.
19951         (UNSPEC_SM3TT2A): Ditto.
19952         (UNSPEC_SM3TT2B): Ditto.
19953         (UNSPEC_SM3PARTW1): Ditto.
19954         (UNSPEC_SM3PARTW2): Ditto.
19955         (UNSPEC_SM4E): Ditto.
19956         (UNSPEC_SM4EKEY): Ditto.
19957         * config/aarch64/constraints.md (Ui2): New constraint.
19958         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19959         * config/arm/types.md (crypto_sm3): New type attribute.
19960         (crypto_sm4): Ditto.
19961         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19962         (vsm3tt1aq_u32): Ditto.
19963         (vsm3tt1bq_u32): Ditto.
19964         (vsm3tt2aq_u32): Ditto.
19965         (vsm3tt2bq_u32): Ditto.
19966         (vsm3partw1q_u32): Ditto.
19967         (vsm3partw2q_u32): Ditto.
19968         (vsm4eq_u32): Ditto.
19969         (vsm4ekeyq_u32): Ditto.
19970         (doc/invoke.texi): Document new sm4 option.
19972 2018-01-10  Michael Collison  <michael.collison@arm.com>
19974         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19975         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
19976         (AARCH64_FL_FOR_ARCH8_4): New.
19977         (AARCH64_FL_V8_4): New flag.
19978         (doc/invoke.texi): Document new armv8.4-a option.
19980 2018-01-10  Michael Collison  <michael.collison@arm.com>
19982         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19983         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
19984         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
19985         * config/aarch64/aarch64-option-extension.def: Add
19986         AARCH64_OPT_EXTENSION of 'sha2'.
19987         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
19988         (crypto): Disable sha2 and aes if crypto disabled.
19989         (crypto): Enable aes and sha2 if enabled.
19990         (simd): Disable sha2 and aes if simd disabled.
19991         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
19992         New flags.
19993         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
19994         (TARGET_SHA2): New feature flag for sha2.
19995         (TARGET_AES): New feature flag for aes.
19996         * config/aarch64/aarch64-simd.md:
19997         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
19998         conditional on TARGET_AES.
19999         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20000         (aarch64_crypto_sha1hsi): Make pattern conditional
20001         on TARGET_SHA2.
20002         (aarch64_crypto_sha1hv4si): Ditto.
20003         (aarch64_be_crypto_sha1hv4si): Ditto.
20004         (aarch64_crypto_sha1su1v4si): Ditto.
20005         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20006         (aarch64_crypto_sha1su0v4si): Ditto.
20007         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20008         (aarch64_crypto_sha256su0v4si): Ditto.
20009         (aarch64_crypto_sha256su1v4si): Ditto.
20010         (doc/invoke.texi): Document new aes and sha2 options.
20012 2018-01-10  Martin Sebor  <msebor@redhat.com>
20014         PR tree-optimization/83781
20015         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20016         as string arrays.
20018 2018-01-11  Martin Sebor  <msebor@gmail.com>
20019             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20021         PR tree-optimization/83501
20022         PR tree-optimization/81703
20024         * tree-ssa-strlen.c (get_string_cst): Rename...
20025         (get_string_len): ...to this.  Handle global constants.
20026         (handle_char_store): Adjust.
20028 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
20029             Jim Wilson  <jimw@sifive.com>
20031         * config/riscv/riscv-protos.h (riscv_output_return): New.
20032         * config/riscv/riscv.c (struct machine_function): New naked_p field.
20033         (riscv_attribute_table, riscv_output_return),
20034         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20035         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20036         (riscv_compute_frame_info): Only compute frame->mask if not a naked
20037         function.
20038         (riscv_expand_prologue): Add early return for naked function.
20039         (riscv_expand_epilogue): Likewise.
20040         (riscv_function_ok_for_sibcall): Return false for naked function.
20041         (riscv_set_current_function): New.
20042         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
20043         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
20044         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
20045         * doc/extend.texi (RISC-V Function Attributes): New.
20047 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
20049         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
20050         check for 128-bit long double before checking TCmode.
20051         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
20052         128-bit long doubles before checking TFmode or TCmode.
20053         (FLOAT128_IBM_P): Likewise.
20055 2018-01-10  Martin Sebor  <msebor@redhat.com>
20057         PR tree-optimization/83671
20058         * builtins.c (c_strlen): Unconditionally return zero for the empty
20059         string.
20060         Use -Warray-bounds for warnings.
20061         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
20062         for non-constant array indices with COMPONENT_REF, arrays of
20063         arrays, and pointers to arrays.
20064         (gimple_fold_builtin_strlen): Determine and set length range for
20065         non-constant character arrays.
20067 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
20069         PR middle-end/81897
20070         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
20071         empty blocks.
20073 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
20075         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
20077 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
20079         PR target/83399
20080         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20081         VECTOR_MEM_ALTIVEC_OR_VSX_P.
20082         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
20083         indexed_or_indirect_operand predicate.
20084         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
20085         (*vsx_le_perm_load_v8hi): Likewise.
20086         (*vsx_le_perm_load_v16qi): Likewise.
20087         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
20088         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
20089         (*vsx_le_perm_store_v8hi): Likewise.
20090         (*vsx_le_perm_store_v16qi): Likewise.
20091         (eight unnamed splitters): Likewise.
20093 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
20095         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
20096         * config/rs6000/emmintrin.h: Likewise.
20097         * config/rs6000/mmintrin.h: Likewise.
20098         * config/rs6000/xmmintrin.h: Likewise.
20100 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
20102         PR c++/43486
20103         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
20104         "public_flag".
20105         * tree.c (tree_nop_conversion): Return true for location wrapper
20106         nodes.
20107         (maybe_wrap_with_location): New function.
20108         (selftest::check_strip_nops): New function.
20109         (selftest::test_location_wrappers): New function.
20110         (selftest::tree_c_tests): Call it.
20111         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
20112         (maybe_wrap_with_location): New decl.
20113         (EXPR_LOCATION_WRAPPER_P): New macro.
20114         (location_wrapper_p): New inline function.
20115         (tree_strip_any_location_wrapper): New inline function.
20117 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
20119         PR target/83735
20120         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
20121         stack_realign_offset for the largest alignment of stack slot
20122         actually used.
20123         (ix86_find_max_used_stack_alignment): New function.
20124         (ix86_finalize_stack_frame_flags): Use it.  Set
20125         max_used_stack_alignment if we don't realign stack.
20126         * config/i386/i386.h (machine_function): Add
20127         max_used_stack_alignment.
20129 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
20131         * config/arm/arm.opt (-mbranch-cost): New option.
20132         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
20133         account.
20135 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
20137         PR target/83629
20138         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
20139         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
20141 2018-01-10  Richard Biener  <rguenther@suse.de>
20143         PR debug/83765
20144         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
20145         early out so it also covers the case where we have a non-NULL
20146         origin.
20148 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
20150         PR tree-optimization/83753
20151         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
20152         for non-strided grouped accesses if the number of elements is 1.
20154 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20156         PR target/81616
20157         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
20158         * i386.h (TARGET_USE_GATHER): Define.
20159         * x86-tune.def (X86_TUNE_USE_GATHER): New.
20161 2018-01-10  Martin Liska  <mliska@suse.cz>
20163         PR bootstrap/82831
20164         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
20165         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
20166         partitioning.
20167         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
20168         CLEANUP_NO_PARTITIONING is not set.
20170 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
20172         * doc/rtl.texi: Remove documentation of (const ...) wrappers
20173         for vectors, as a partial revert of r254296.
20174         * rtl.h (const_vec_p): Delete.
20175         (const_vec_duplicate_p): Don't test for vector CONSTs.
20176         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
20177         * expmed.c (make_tree): Likewise.
20179         Revert:
20180         * common.md (E, F): Use CONSTANT_P instead of checking for
20181         CONST_VECTOR.
20182         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
20183         checking for CONST_VECTOR.
20185 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
20187         PR middle-end/83575
20188         * predict.c (force_edge_cold): Handle in more sane way edges
20189         with no prediction.
20191 2018-01-09  Carl Love  <cel@us.ibm.com>
20193         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
20194         V4SI, V4SF types.
20195         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
20196         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
20197         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
20198         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
20199         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
20200         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
20201         * config/rs6000/rs6000-protos.h: Add extern defition for
20202         rs6000_generate_float2_double_code.
20203         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
20204         function.
20205         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
20206         (float2_v2df): Add define_expand.
20208 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
20210         PR target/83628
20211         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
20212         op_mode in the force_to_mode call.
20214 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
20216         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
20217         instead of checking each element individually.
20218         (aarch64_evpc_uzp): Likewise.
20219         (aarch64_evpc_zip): Likewise.
20220         (aarch64_evpc_ext): Likewise.
20221         (aarch64_evpc_rev): Likewise.
20222         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
20223         instead of checking each element individually.  Return true without
20224         generating rtl if
20225         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
20226         whether all selected elements come from the same input, instead of
20227         checking each element individually.  Remove calls to gen_rtx_REG,
20228         start_sequence and end_sequence and instead assert that no rtl is
20229         generated.
20231 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
20233         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
20234         order of HIGH and CONST checks.
20236 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
20238         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
20239         if the destination isn't an SSA_NAME.
20241 2018-01-09  Richard Biener  <rguenther@suse.de>
20243         PR tree-optimization/83668
20244         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
20245         move prologue...
20246         (canonicalize_loop_form): ... here, renamed from ...
20247         (canonicalize_loop_closed_ssa_form): ... this and amended to
20248         swap successor edges for loop exit blocks to make us use
20249         the RPO order we need for initial schedule generation.
20251 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
20253         PR tree-optimization/64811
20254         * match.pd: When optimizing comparisons with Inf, avoid
20255         introducing or losing exceptions from comparisons with NaN.
20257 2018-01-09  Martin Liska  <mliska@suse.cz>
20259         PR sanitizer/82517
20260         * asan.c (shadow_mem_size): Add gcc_assert.
20262 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
20264         Don't save registers in main().
20266         PR target/83738
20267         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
20268         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
20269         * config/avr/avr.c (avr_set_current_function): Don't error if
20270         naked, OS_task or OS_main are specified at the same time.
20271         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
20272         OS_main.
20273         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
20274         attribute.
20275         * common/config/avr/avr-common.c (avr_option_optimization_table):
20276         Switch on -mmain-is-OS_task for optimizing compilations.
20278 2018-01-09  Richard Biener  <rguenther@suse.de>
20280         PR tree-optimization/83572
20281         * graphite.c: Include cfganal.h.
20282         (graphite_transform_loops): Connect infinite loops to exit
20283         and remove fake edges at the end.
20285 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
20287         * ipa-inline.c (edge_badness): Revert accidental checkin.
20289 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
20291         PR ipa/80763
20292         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
20293         symbols; not inline clones.
20295 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
20297         PR target/83507
20298         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
20299         hard registers.  Formatting fixes.
20301         PR preprocessor/83722
20302         * gcc.c (try_generate_repro): Pass
20303         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
20304         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
20305         do_report_bug.
20307 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
20308             Kito Cheng  <kito.cheng@gmail.com>
20310         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
20311         (riscv_leaf_function_p): Delete.
20312         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
20314 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20316         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
20317         function.
20318         (do_ifelse): New function.
20319         (do_isel): New function.
20320         (do_sub3): New function.
20321         (do_add3): New function.
20322         (do_load_mask_compare): New function.
20323         (do_overlap_load_compare): New function.
20324         (expand_compare_loop): New function.
20325         (expand_block_compare): Call expand_compare_loop() when appropriate.
20326         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
20327         option description.
20328         (-mblock-compare-inline-loop-limit): New option.
20330 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20332         PR target/83677
20333         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
20334         Reverse order of second and third operands in first alternative.
20335         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
20336         of first and second elements in UNSPEC_VPERMR vector.
20337         (altivec_expand_vec_perm_le): Likewise.
20339 2018-01-08  Jeff Law  <law@redhat.com>
20341         PR rtl-optimizatin/81308
20342         * tree-switch-conversion.c (cfg_altered): New file scoped static.
20343         (process_switch): If group_case_labels makes a change, then set
20344         cfg_altered.
20345         (pass_convert_switch::execute): If a switch is converted, then
20346         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
20348         PR rtl-optimization/81308
20349         * recog.c (split_all_insns): Conditionally cleanup the CFG after
20350         splitting insns.
20352 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
20354         PR target/83663 - Revert r255946
20355         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
20356         generation for cases where splatting a value is not useful.
20357         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
20358         across a vec_duplicate and a paradoxical subreg forming a vector
20359         mode to a vec_concat.
20361 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20363         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
20364         -march=armv8.3-a variants.
20365         * config/arm/t-multilib: Likewise.
20366         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
20368 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20370         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
20371         to generate rtl.
20372         (cceq_ior_compare_complement): Give it a name so I can use it, and
20373         change boolean_or_operator predicate to boolean_operator so it can
20374         be used to generate a crand.
20375         (eqne): New code iterator.
20376         (bd/bd_neg): New code_attrs.
20377         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
20378         a single define_insn.
20379         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20380         decrement (bdnzt/bdnzf/bdzt/bdzf).
20381         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20382         with the new names of the branch decrement patterns, and added the
20383         names of the branch decrement conditional patterns.
20385 2018-01-08  Richard Biener  <rguenther@suse.de>
20387         PR tree-optimization/83563
20388         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20389         cache.
20391 2018-01-08  Richard Biener  <rguenther@suse.de>
20393         PR middle-end/83713
20394         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20396 2018-01-08  Richard Biener  <rguenther@suse.de>
20398         PR tree-optimization/83685
20399         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20400         references to abnormals.
20402 2018-01-08  Richard Biener  <rguenther@suse.de>
20404         PR lto/83719
20405         * dwarf2out.c (output_indirect_strings): Handle empty
20406         skeleton_debug_str_hash.
20407         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20409 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
20411         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20412         (emit_store_direct): Likewise.
20413         (arc_trampoline_adjust_address): Likewise.
20414         (arc_asm_trampoline_template): New function.
20415         (arc_initialize_trampoline): Use asm_trampoline_template.
20416         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20417         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20418         * config/arc/arc.md (flush_icache): Delete pattern.
20420 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
20422         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20423         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20424         munaligned-access.
20426 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20428         PR target/83681
20429         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20430         by not USED_FOR_TARGET.
20431         (make_pass_resolve_sw_modes): Likewise.
20433 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20435         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
20436         USED_FOR_TARGET.
20438 2018-01-08  Richard Biener  <rguenther@suse.de>
20440         PR middle-end/83580
20441         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
20443 2018-01-08  Richard Biener  <rguenther@suse.de>
20445         PR middle-end/83517
20446         * match.pd ((t * 2) / 2) -> t): Add missing :c.
20448 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
20450         PR middle-end/81897
20451         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
20452         basic blocks with a small number of successors.
20453         (convert_control_dep_chain_into_preds): Improve handling of
20454         forwarder blocks.
20455         (dump_predicates): Split apart into...
20456         (dump_pred_chain): ...here...
20457         (dump_pred_info): ...and here.
20458         (can_one_predicate_be_invalidated_p): Add debugging printfs.
20459         (can_chain_union_be_invalidated_p): Improve check for invalidation
20460         of paths.
20461         (uninit_uses_cannot_happen): Avoid unnecessary if
20462         convert_control_dep_chain_into_preds yielded nothing.
20464 2018-01-06  Martin Sebor  <msebor@redhat.com>
20466         PR tree-optimization/83640
20467         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
20468         subtracting negative offset from size.
20469         (builtin_access::overlap): Adjust offset bounds of the access to fall
20470         within the size of the object if possible.
20472 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
20474         PR rtl-optimization/83699
20475         * expmed.c (extract_bit_field_1): Restrict the vector usage of
20476         extract_bit_field_as_subreg to cases in which the extracted
20477         value is also a vector.
20479         * lra-constraints.c (process_alt_operands): Test for the equivalence
20480         substitutions when detecting a possible reload cycle.
20482 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
20484         PR debug/83480
20485         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
20486         by default if flag_selective_schedling{,2}.  Formatting fixes.
20488         PR rtl-optimization/83682
20489         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
20490         if it has non-VECTOR_MODE element mode.
20491         (vec_duplicate_p): Likewise.
20493         PR middle-end/83694
20494         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
20495         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
20497 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
20499         PR target/83604
20500         * config/i386/i386-builtin.def
20501         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
20502         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
20503         Require also OPTION_MASK_ISA_AVX512F in addition to
20504         OPTION_MASK_ISA_GFNI.
20505         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
20506         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
20507         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
20508         to OPTION_MASK_ISA_GFNI.
20509         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
20510         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
20511         OPTION_MASK_ISA_AVX512BW.
20512         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
20513         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
20514         addition to OPTION_MASK_ISA_GFNI.
20515         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
20516         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
20517         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
20518         to OPTION_MASK_ISA_GFNI.
20519         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
20520         a requirement for all ISAs rather than any of them with a few
20521         exceptions.
20522         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
20523         processing.
20524         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
20525         bitmasks to be enabled with 3 exceptions, instead of requiring any
20526         enabled ISA with lots of exceptions.
20527         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
20528         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
20529         Change avx512bw in isa attribute to avx512f.
20530         * config/i386/sgxintrin.h: Add license boilerplate.
20531         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
20532         to __AVX512F__ and __AVX512VL to __AVX512VL__.
20533         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
20534         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
20535         defined.
20536         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
20537         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
20538         temporarily sse2 rather than sse if not enabled already.
20540         PR target/83604
20541         * config/i386/sse.md (VI248_VLBW): Rename to ...
20542         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
20543         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
20544         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
20545         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
20546         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
20547         mode iterator instead of VI248_VLBW.
20549 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
20551         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
20552         (record_modified): Skip clobbers; add debug output.
20553         (param_change_prob): Use sreal frequencies.
20555 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
20557         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20558         punt for user-aligned variables.
20560 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
20562         * tree-chrec.c (chrec_contains_symbols): Return true for
20563         POLY_INT_CST.
20565 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
20567         PR target/82439
20568         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
20569         of (x|y) == x for BICS pattern.
20571 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
20573         PR tree-optimization/83605
20574         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
20575         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
20576         can throw.
20578 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20580         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
20581         * config/epiphany/rtems.h: New file.
20583 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
20584             Uros Bizjak  <ubizjak@gmail.com>
20586         PR target/83554
20587         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
20588         QIreg_operand instead of register_operand predicate.
20589         * config/i386/i386.c (ix86_rop_should_change_byte_p,
20590         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
20591         comments instead of -fmitigate[-_]rop.
20593 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20595         PR bootstrap/81926
20596         * cgraphunit.c (symbol_table::compile): Switch to text_section
20597         before calling assembly_start debug hook.
20598         * run-rtl-passes.c (run_rtl_passes): Likewise.
20599         Include output.h.
20601 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20603         * tree-vrp.c (extract_range_from_binary_expr_1): Check
20604         range_int_cst_p rather than !symbolic_range_p before calling
20605         extract_range_from_multiplicative_op_1.
20607 2018-01-04  Jeff Law  <law@redhat.com>
20609         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
20610         redundant test in assertion.
20612 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20614         * doc/rtl.texi: Document machine_mode wrapper classes.
20616 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20618         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
20619         using tree_to_uhwi.
20621 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20623         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
20624         the VEC_PERM_EXPR fold to fail.
20626 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
20628         PR debug/83585
20629         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20630         to switched_sections.
20632 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20634         PR target/83680
20635         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20636         test for d.testing.
20638 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
20640         PR target/83387
20641         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20642         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20644 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
20646         PR debug/83666
20647         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20648         is BLKmode and bitpos not zero or mode change is needed.
20650 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20652         PR target/83675
20653         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20654         TARGET_VIS2.
20656 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
20658         PR target/83628
20659         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20660         instead of MULT rtx.  Update all corresponding splitters.
20661         (*saddl_se): Ditto.
20662         (*ssub<modesuffix>): Ditto.
20663         (*ssubl_se): Ditto.
20664         (*cmp_sadd_di): Update split patterns.
20665         (*cmp_sadd_si): Ditto.
20666         (*cmp_sadd_sidi): Ditto.
20667         (*cmp_ssub_di): Ditto.
20668         (*cmp_ssub_si): Ditto.
20669         (*cmp_ssub_sidi): Ditto.
20670         * config/alpha/predicates.md (const23_operand): New predicate.
20671         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20672         Look for ASHIFT, not MULT inner operand.
20673         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20675 2018-01-04  Martin Liska  <mliska@suse.cz>
20677         PR gcov-profile/83669
20678         * gcov.c (output_intermediate_file): Add version to intermediate
20679         gcov file.
20680         * doc/gcov.texi: Document new field 'version' in intermediate
20681         file format. Fix location of '-k' option of gcov command.
20683 2018-01-04  Martin Liska  <mliska@suse.cz>
20685         PR ipa/82352
20686         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20688 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
20690         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20692 2018-01-03  Martin Sebor  <msebor@redhat.com>
20694         PR tree-optimization/83655
20695         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20696         checking calls with invalid arguments.
20698 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20700         * tree-vect-stmts.c (vect_get_store_rhs): New function.
20701         (vectorizable_mask_load_store): Delete.
20702         (vectorizable_call): Return false for masked loads and stores.
20703         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
20704         instead of gimple_assign_rhs1.
20705         (vectorizable_load): Handle IFN_MASK_LOAD.
20706         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20708 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20710         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20711         split out from..,
20712         (vectorizable_mask_load_store): ...here.
20713         (vectorizable_load): ...and here.
20715 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20717         * tree-vect-stmts.c (vect_build_all_ones_mask)
20718         (vect_build_zero_merge_argument): New functions, split out from...
20719         (vectorizable_load): ...here.
20721 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20723         * tree-vect-stmts.c (vect_check_store_rhs): New function,
20724         split out from...
20725         (vectorizable_mask_load_store): ...here.
20726         (vectorizable_store): ...and here.
20728 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20730         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20731         split out from...
20732         (vectorizable_mask_load_store): ...here.
20734 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20736         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20737         (vect_model_store_cost): Take a vec_load_store_type instead of a
20738         vect_def_type.
20739         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20740         (vect_model_store_cost): Take a vec_load_store_type instead of a
20741         vect_def_type.
20742         (vectorizable_mask_load_store): Update accordingly.
20743         (vectorizable_store): Likewise.
20744         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20746 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20748         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20749         IFN_MASK_LOAD calls here rather than...
20750         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20752 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20753             Alan Hayward  <alan.hayward@arm.com>
20754             David Sherwood  <david.sherwood@arm.com>
20756         * expmed.c (extract_bit_field_1): For vector extracts,
20757         fall back to extract_bit_field_as_subreg if vec_extract
20758         isn't available.
20760 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20761             Alan Hayward  <alan.hayward@arm.com>
20762             David Sherwood  <david.sherwood@arm.com>
20764         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20765         they are variable or constant sized.
20766         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20767         slots for constant-sized data.
20769 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20770             Alan Hayward  <alan.hayward@arm.com>
20771             David Sherwood  <david.sherwood@arm.com>
20773         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20774         handling COND_EXPRs with boolean comparisons, try to find a better
20775         basis for the mask type than the boolean itself.
20777 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20779         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20780         is calculated and how it can be overridden.
20781         * genmodes.c (max_bitsize_mode_any_mode): New variable.
20782         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20783         if defined.
20784         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20785         if nonzero.
20787 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20788             Alan Hayward  <alan.hayward@arm.com>
20789             David Sherwood  <david.sherwood@arm.com>
20791         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20792         Remove the mode argument.
20793         (aarch64_simd_valid_immediate): Remove the mode and inverse
20794         arguments.
20795         * config/aarch64/iterators.md (bitsize): New iterator.
20796         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20797         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20798         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20799         aarch64_simd_valid_immediate.
20800         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20801         (aarch64_reg_or_bic_imm): Likewise.
20802         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20803         with an insn_type enum and msl with a modifier_type enum.
20804         Replace element_width with a scalar_mode.  Change the shift
20805         to unsigned int.  Add constructors for scalar_float_mode and
20806         scalar_int_mode elements.
20807         (aarch64_vect_float_const_representable_p): Delete.
20808         (aarch64_can_const_movi_rtx_p)
20809         (aarch64_simd_scalar_immediate_valid_for_move)
20810         (aarch64_simd_make_constant): Update call to
20811         aarch64_simd_valid_immediate.
20812         (aarch64_advsimd_valid_immediate_hs): New function.
20813         (aarch64_advsimd_valid_immediate): Likewise.
20814         (aarch64_simd_valid_immediate): Remove mode and inverse
20815         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
20816         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20817         and aarch64_float_const_representable_p on the result.
20818         (aarch64_output_simd_mov_immediate): Remove mode argument.
20819         Update call to aarch64_simd_valid_immediate and use of
20820         simd_immediate_info.
20821         (aarch64_output_scalar_simd_mov_immediate): Update call
20822         accordingly.
20824 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20825             Alan Hayward  <alan.hayward@arm.com>
20826             David Sherwood  <david.sherwood@arm.com>
20828         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20829         (mode_nunits): Likewise CONST_MODE_NUNITS.
20830         * machmode.def (ADJUST_NUNITS): Document.
20831         * genmodes.c (mode_data::need_nunits_adj): New field.
20832         (blank_mode): Update accordingly.
20833         (adj_nunits): New variable.
20834         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20835         parameter.
20836         (emit_mode_size_inline): Set need_bytesize_adj for all modes
20837         listed in adj_nunits.
20838         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20839         listed in adj_nunits.  Don't emit case statements for such modes.
20840         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20841         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
20842         nothing if adj_nunits is nonnull.
20843         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20844         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20845         (emit_mode_fbit): Update use of print_maybe_const_decl.
20846         (emit_move_size): Likewise.  Treat the array as non-const
20847         if adj_nunits.
20848         (emit_mode_adjustments): Handle adj_nunits.
20850 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20852         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20853         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20854         (VECTOR_MODES): Use it.
20855         (make_vector_modes): Take the prefix as an argument.
20857 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20858             Alan Hayward  <alan.hayward@arm.com>
20859             David Sherwood  <david.sherwood@arm.com>
20861         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20862         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20863         for MODE_VECTOR_BOOL.
20864         * machmode.def (VECTOR_BOOL_MODE): Document.
20865         * genmodes.c (VECTOR_BOOL_MODE): New macro.
20866         (make_vector_bool_mode): New function.
20867         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20868         MODE_VECTOR_BOOL.
20869         * lto-streamer-in.c (lto_input_mode_table): Likewise.
20870         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20871         Likewise.
20872         * stor-layout.c (int_mode_for_mode): Likewise.
20873         * tree.c (build_vector_type_for_mode): Likewise.
20874         * varasm.c (output_constant_pool_2): Likewise.
20875         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20876         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
20877         for MODE_VECTOR_BOOL.
20878         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20879         of mode class checks.
20880         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20881         instead of a list of mode class checks.
20882         (expand_vector_scalar_condition): Likewise.
20883         (type_for_widest_vector_mode): Handle BImode as an inner mode.
20885 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20886             Alan Hayward  <alan.hayward@arm.com>
20887             David Sherwood  <david.sherwood@arm.com>
20889         * machmode.h (mode_size): Change from unsigned short to
20890         poly_uint16_pod.
20891         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20892         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20893         or if measurement_type is not polynomial.
20894         (fixed_size_mode::includes_p): Check for constant-sized modes.
20895         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20896         return a poly_uint16 rather than an unsigned short.
20897         (emit_mode_size): Change the type of mode_size from unsigned short
20898         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
20899         (emit_mode_adjustments): Cope with polynomial vector sizes.
20900         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20901         for GET_MODE_SIZE.
20902         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20903         for GET_MODE_SIZE.
20904         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20905         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20906         * caller-save.c (setup_save_areas): Likewise.
20907         (replace_reg_with_saved_mem): Likewise.
20908         * calls.c (emit_library_call_value_1): Likewise.
20909         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20910         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20911         (gen_lowpart_for_combine): Likewise.
20912         * convert.c (convert_to_integer_1): Likewise.
20913         * cse.c (equiv_constant, cse_insn): Likewise.
20914         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20915         (cselib_subst_to_values): Likewise.
20916         * dce.c (word_dce_process_block): Likewise.
20917         * df-problems.c (df_word_lr_mark_ref): Likewise.
20918         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20919         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20920         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20921         (rtl_for_decl_location): Likewise.
20922         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20923         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20924         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20925         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20926         (expand_expr_real_1): Likewise.
20927         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20928         (pad_below): Likewise.
20929         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20930         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20931         * ira.c (get_subreg_tracking_sizes): Likewise.
20932         * ira-build.c (ira_create_allocno_objects): Likewise.
20933         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20934         (ira_sort_regnos_for_alter_reg): Likewise.
20935         * ira-costs.c (record_operand_costs): Likewise.
20936         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20937         (resolve_simple_move): Likewise.
20938         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20939         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20940         (lra_constraints): Likewise.
20941         (CONST_POOL_OK_P): Reject variable-sized modes.
20942         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20943         (add_pseudo_to_slot, lra_spill): Likewise.
20944         * omp-low.c (omp_clause_aligned_alignment): Likewise.
20945         * optabs-query.c (get_best_extraction_insn): Likewise.
20946         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20947         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20948         (expand_mult_highpart, valid_multiword_target_p): Likewise.
20949         * recog.c (offsettable_address_addr_space_p): Likewise.
20950         * regcprop.c (maybe_mode_change): Likewise.
20951         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20952         * regrename.c (build_def_use): Likewise.
20953         * regstat.c (dump_reg_info): Likewise.
20954         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20955         (find_reloads, find_reloads_subreg_address): Likewise.
20956         * reload1.c (eliminate_regs_1): Likewise.
20957         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20958         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20959         (simplify_binary_operation_1, simplify_subreg): Likewise.
20960         * targhooks.c (default_function_arg_padding): Likewise.
20961         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20962         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20963         (verify_gimple_assign_ternary): Likewise.
20964         * tree-inline.c (estimate_move_cost): Likewise.
20965         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20966         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20967         (get_address_cost_ainc): Likewise.
20968         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20969         (vect_supportable_dr_alignment): Likewise.
20970         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20971         (vectorizable_reduction): Likewise.
20972         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20973         (vectorizable_operation, vectorizable_load): Likewise.
20974         * tree.c (build_same_sized_truth_vector_type): Likewise.
20975         * valtrack.c (cleanup_auto_inc_dec): Likewise.
20976         * var-tracking.c (emit_note_insn_var_location): Likewise.
20977         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
20978         (ADDR_VEC_ALIGN): Likewise.
20980 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20981             Alan Hayward  <alan.hayward@arm.com>
20982             David Sherwood  <david.sherwood@arm.com>
20984         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
20985         unsigned short.
20986         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20987         or if measurement_type is polynomial.
20988         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
20989         * combine.c (make_extraction): Likewise.
20990         * dse.c (find_shift_sequence): Likewise.
20991         * dwarf2out.c (mem_loc_descriptor): Likewise.
20992         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
20993         (extract_bit_field, extract_low_bits): Likewise.
20994         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
20995         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
20996         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
20997         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
20998         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20999         * reload.c (find_reloads): Likewise.
21000         * reload1.c (alter_reg): Likewise.
21001         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21002         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21003         * tree-if-conv.c (predicate_mem_writes): Likewise.
21004         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21005         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21006         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21007         * valtrack.c (dead_debug_insert_temp): Likewise.
21008         * varasm.c (mergeable_constant_section): Likewise.
21009         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21011 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21012             Alan Hayward  <alan.hayward@arm.com>
21013             David Sherwood  <david.sherwood@arm.com>
21015         * expr.c (expand_assignment): Cope with polynomial mode sizes
21016         when assigning to a CONCAT.
21018 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21019             Alan Hayward  <alan.hayward@arm.com>
21020             David Sherwood  <david.sherwood@arm.com>
21022         * machmode.h (mode_precision): Change from unsigned short to
21023         poly_uint16_pod.
21024         (mode_to_precision): Return a poly_uint16 rather than an unsigned
21025         short.
21026         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21027         or if measurement_type is not polynomial.
21028         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
21029         in which the mode is already known to be a scalar_int_mode.
21030         * genmodes.c (emit_mode_precision): Change the type of mode_precision
21031         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
21032         initializer.
21033         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21034         for GET_MODE_PRECISION.
21035         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21036         for GET_MODE_PRECISION.
21037         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21038         as polynomial.
21039         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21040         (expand_field_assignment, make_extraction): Likewise.
21041         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21042         (get_last_value): Likewise.
21043         * convert.c (convert_to_integer_1): Likewise.
21044         * cse.c (cse_insn): Likewise.
21045         * expr.c (expand_expr_real_1): Likewise.
21046         * lra-constraints.c (simplify_operand_subreg): Likewise.
21047         * optabs-query.c (can_atomic_load_p): Likewise.
21048         * optabs.c (expand_atomic_load): Likewise.
21049         (expand_atomic_store): Likewise.
21050         * ree.c (combine_reaching_defs): Likewise.
21051         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
21052         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
21053         * tree.h (type_has_mode_precision_p): Likewise.
21054         * ubsan.c (instrument_si_overflow): Likewise.
21056 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21057             Alan Hayward  <alan.hayward@arm.com>
21058             David Sherwood  <david.sherwood@arm.com>
21060         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
21061         polynomial numbers of units.
21062         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
21063         (valid_vector_subparts_p): New function.
21064         (build_vector_type): Remove temporary shim and take the number
21065         of units as a poly_uint64 rather than an int.
21066         (build_opaque_vector_type): Take the number of units as a
21067         poly_uint64 rather than an int.
21068         * tree.c (build_vector_from_ctor): Handle polynomial
21069         TYPE_VECTOR_SUBPARTS.
21070         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
21071         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
21072         (build_vector_from_val): If the number of units is variable,
21073         use build_vec_duplicate_cst for constant operands and
21074         VEC_DUPLICATE_EXPR otherwise.
21075         (make_vector_type): Remove temporary is_constant ().
21076         (build_vector_type, build_opaque_vector_type): Take the number of
21077         units as a poly_uint64 rather than an int.
21078         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21079         VECTOR_CST_NELTS.
21080         * cfgexpand.c (expand_debug_expr): Likewise.
21081         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
21082         (store_constructor, expand_expr_real_1): Likewise.
21083         (const_scalar_mask_from_tree): Likewise.
21084         * fold-const-call.c (fold_const_reduction): Likewise.
21085         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
21086         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
21087         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
21088         (fold_relational_const): Likewise.
21089         (native_interpret_vector): Likewise.  Change the size from an
21090         int to an unsigned int.
21091         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
21092         TYPE_VECTOR_SUBPARTS.
21093         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
21094         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
21095         duplicating a non-constant operand into a variable-length vector.
21096         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
21097         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
21098         * ipa-icf.c (sem_variable::equals): Likewise.
21099         * match.pd: Likewise.
21100         * omp-simd-clone.c (simd_clone_subparts): Likewise.
21101         * print-tree.c (print_node): Likewise.
21102         * stor-layout.c (layout_type): Likewise.
21103         * targhooks.c (default_builtin_vectorization_cost): Likewise.
21104         * tree-cfg.c (verify_gimple_comparison): Likewise.
21105         (verify_gimple_assign_binary): Likewise.
21106         (verify_gimple_assign_ternary): Likewise.
21107         (verify_gimple_assign_single): Likewise.
21108         * tree-pretty-print.c (dump_generic_node): Likewise.
21109         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21110         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
21111         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
21112         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
21113         (vect_shift_permute_load_chain): Likewise.
21114         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
21115         (expand_vector_condition, optimize_vector_constructor): Likewise.
21116         (lower_vec_perm, get_compute_type): Likewise.
21117         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21118         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
21119         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
21120         (vect_recog_mask_conversion_pattern): Likewise.
21121         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
21122         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
21123         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21124         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
21125         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
21126         (vectorizable_shift, vectorizable_operation, vectorizable_store)
21127         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
21128         (supportable_widening_operation): Likewise.
21129         (supportable_narrowing_operation): Likewise.
21130         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
21131         Likewise.
21132         * varasm.c (output_constant): Likewise.
21134 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21135             Alan Hayward  <alan.hayward@arm.com>
21136             David Sherwood  <david.sherwood@arm.com>
21138         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
21139         so that both the length == 3 and length != 3 cases set up their
21140         own permute vectors.  Add comments explaining why we know the
21141         number of elements is constant.
21142         (vect_permute_load_chain): Likewise.
21144 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21145             Alan Hayward  <alan.hayward@arm.com>
21146             David Sherwood  <david.sherwood@arm.com>
21148         * machmode.h (mode_nunits): Change from unsigned char to
21149         poly_uint16_pod.
21150         (ONLY_FIXED_SIZE_MODES): New macro.
21151         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
21152         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
21153         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
21154         New typedefs.
21155         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
21156         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
21157         or if measurement_type is not polynomial.
21158         * genmodes.c (ZERO_COEFFS): New macro.
21159         (emit_mode_nunits_inline): Make mode_nunits_inline return a
21160         poly_uint16.
21161         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
21162         Use ZERO_COEFFS when emitting initializers.
21163         * data-streamer.h (bp_pack_poly_value): New function.
21164         (bp_unpack_poly_value): Likewise.
21165         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21166         for GET_MODE_NUNITS.
21167         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21168         for GET_MODE_NUNITS.
21169         * tree.c (make_vector_type): Remove temporary shim and make
21170         the real function take the number of units as a poly_uint64
21171         rather than an int.
21172         (build_vector_type_for_mode): Handle polynomial nunits.
21173         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
21174         * emit-rtl.c (const_vec_series_p_1): Likewise.
21175         (gen_rtx_CONST_VECTOR): Likewise.
21176         * fold-const.c (test_vec_duplicate_folding): Likewise.
21177         * genrecog.c (validate_pattern): Likewise.
21178         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
21179         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21180         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
21181         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
21182         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
21183         * rtlanal.c (subreg_get_info): Likewise.
21184         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21185         (vect_grouped_load_supported): Likewise.
21186         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
21187         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
21188         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
21189         (simplify_const_unary_operation, simplify_binary_operation_1)
21190         (simplify_const_binary_operation, simplify_ternary_operation)
21191         (test_vector_ops_duplicate, test_vector_ops): Likewise.
21192         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
21193         instead of CONST_VECTOR_NUNITS.
21194         * varasm.c (output_constant_pool_2): Likewise.
21195         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
21196         explicit-encoded elements in the XVEC for variable-length vectors.
21198 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21200         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
21202 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21203             Alan Hayward  <alan.hayward@arm.com>
21204             David Sherwood  <david.sherwood@arm.com>
21206         * coretypes.h (fixed_size_mode): Declare.
21207         (fixed_size_mode_pod): New typedef.
21208         * builtins.h (target_builtins::x_apply_args_mode)
21209         (target_builtins::x_apply_result_mode): Change type to
21210         fixed_size_mode_pod.
21211         * builtins.c (apply_args_size, apply_result_size, result_vector)
21212         (expand_builtin_apply_args_1, expand_builtin_apply)
21213         (expand_builtin_return): Update accordingly.
21215 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21217         * cse.c (hash_rtx_cb): Hash only the encoded elements.
21218         * cselib.c (cselib_hash_rtx): Likewise.
21219         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
21220         CONST_VECTOR encoding.
21222 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
21223             Jeff Law  <law@redhat.com>
21225         PR target/83641
21226         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
21227         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
21228         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
21229         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
21231         PR target/83641
21232         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
21233         explicitly probe *sp in a noreturn function if there were any callee
21234         register saves or frame pointer is needed.
21236 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
21238         PR debug/83621
21239         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
21240         BLKmode for ternary, binary or unary expressions.
21242         PR debug/83645
21243         * var-tracking.c (delete_vta_debug_insn): New inline function.
21244         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
21245         insns from get_insns () to NULL instead of each bb separately.
21246         Use delete_vta_debug_insn.  No longer static.
21247         (vt_debug_insns_local, variable_tracking_main_1): Adjust
21248         delete_vta_debug_insns callers.
21249         * rtl.h (delete_vta_debug_insns): Declare.
21250         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
21251         instead of variable_tracking_main.
21253 2018-01-03  Martin Sebor  <msebor@redhat.com>
21255         PR tree-optimization/83603
21256         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
21257         arguments past the endof the argument list in functions declared
21258         without a prototype.
21259         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
21260         Avoid checking when arguments are null.
21262 2018-01-03  Martin Sebor  <msebor@redhat.com>
21264         PR c/83559
21265         * doc/extend.texi (attribute const): Fix a typo.
21266         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
21267         issuing -Wsuggest-attribute for void functions.
21269 2018-01-03  Martin Sebor  <msebor@redhat.com>
21271         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
21272         offset_int::from instead of wide_int::to_shwi.
21273         (maybe_diag_overlap): Remove assertion.
21274         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
21275         * gimple-ssa-sprintf.c (format_directive): Same.
21276         (parse_directive): Same.
21277         (sprintf_dom_walker::compute_format_length): Same.
21278         (try_substitute_return_value): Same.
21280 2018-01-03  Jeff Law  <law@redhat.com>
21282         PR middle-end/83654
21283         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
21284         non-constant residual for zero at runtime and avoid probing in
21285         that case.  Reorganize code for trailing problem to mirror handling
21286         of the residual.
21288 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21290         PR tree-optimization/83501
21291         * tree-ssa-strlen.c (get_string_cst): New.
21292         (handle_char_store): Call get_string_cst.
21294 2018-01-03  Martin Liska  <mliska@suse.cz>
21296         PR tree-optimization/83593
21297         * tree-ssa-strlen.c: Include tree-cfg.h.
21298         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
21299         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
21300         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
21301         to false.
21302         (strlen_dom_walker::before_dom_children): Call
21303         gimple_purge_dead_eh_edges. Dump tranformation with details
21304         dump flags.
21305         (strlen_dom_walker::before_dom_children): Update call by adding
21306         new argument cleanup_eh.
21307         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
21309 2018-01-03  Martin Liska  <mliska@suse.cz>
21311         PR ipa/83549
21312         * cif-code.def (VARIADIC_THUNK): New enum value.
21313         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
21314         thunks.
21316 2018-01-03  Jan Beulich  <jbeulich@suse.com>
21318         * sse.md (mov<mode>_internal): Tighten condition for when to use
21319         vmovdqu<ssescalarsize> for TI and OI modes.
21321 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
21323         Update copyright years.
21325 2018-01-03  Martin Liska  <mliska@suse.cz>
21327         PR ipa/83594
21328         * ipa-visibility.c (function_and_variable_visibility): Skip
21329         functions with noipa attribure.
21331 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
21333         * gcc.c (process_command): Update copyright notice dates.
21334         * gcov-dump.c (print_version): Ditto.
21335         * gcov.c (print_version): Ditto.
21336         * gcov-tool.c (print_version): Ditto.
21337         * gengtype.c (create_file): Ditto.
21338         * doc/cpp.texi: Bump @copying's copyright year.
21339         * doc/cppinternals.texi: Ditto.
21340         * doc/gcc.texi: Ditto.
21341         * doc/gccint.texi: Ditto.
21342         * doc/gcov.texi: Ditto.
21343         * doc/install.texi: Ditto.
21344         * doc/invoke.texi: Ditto.
21346 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21348         * vector-builder.h (vector_builder::m_full_nelts): Change from
21349         unsigned int to poly_uint64.
21350         (vector_builder::full_nelts): Update prototype accordingly.
21351         (vector_builder::new_vector): Likewise.
21352         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
21353         (vector_builder::operator ==): Likewise.
21354         (vector_builder::finalize): Likewise.
21355         * int-vector-builder.h (int_vector_builder::int_vector_builder):
21356         Take the number of elements as a poly_uint64 rather than an
21357         unsigned int.
21358         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
21359         from unsigned int to poly_uint64.
21360         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
21361         (vec_perm_indices::new_vector): Likewise.
21362         (vec_perm_indices::length): Likewise.
21363         (vec_perm_indices::nelts_per_input): Likewise.
21364         (vec_perm_indices::input_nelts): Likewise.
21365         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
21366         number of elements per input as a poly_uint64 rather than an
21367         unsigned int.  Use the original encoding for variable-length
21368         vectors, rather than clamping each individual element.
21369         For the second and subsequent elements in each pattern,
21370         clamp the step and base before clamping their sum.
21371         (vec_perm_indices::series_p): Handle polynomial element counts.
21372         (vec_perm_indices::all_in_range_p): Likewise.
21373         (vec_perm_indices_to_tree): Likewise.
21374         (vec_perm_indices_to_rtx): Likewise.
21375         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
21376         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
21377         (tree_vector_builder::new_binary_operation): Handle polynomial
21378         element counts.  Return false if we need to know the number
21379         of elements at compile time.
21380         * fold-const.c (fold_vec_perm): Punt if the number of elements
21381         isn't known at compile time.
21383 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21385         * vec-perm-indices.h (vec_perm_builder): Change element type
21386         from HOST_WIDE_INT to poly_int64.
21387         (vec_perm_indices::element_type): Update accordingly.
21388         (vec_perm_indices::clamp): Handle polynomial element_types.
21389         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21390         (vec_perm_indices::all_in_range_p): Likewise.
21391         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21392         than shwi trees.
21393         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21394         polynomial vec_perm_indices element types.
21395         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21396         * fold-const.c (fold_vec_perm): Likewise.
21397         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21398         * tree-vect-generic.c (lower_vec_perm): Likewise.
21399         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21400         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21401         element type to HOST_WIDE_INT.
21403 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21404             Alan Hayward  <alan.hayward@arm.com>
21405             David Sherwood  <david.sherwood@arm.com>
21407         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21408         rather than an int.  Use plus_constant.
21409         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21410         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21412 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21413             Alan Hayward  <alan.hayward@arm.com>
21414             David Sherwood  <david.sherwood@arm.com>
21416         * calls.c (emit_call_1, expand_call): Change struct_value_size from
21417         a HOST_WIDE_INT to a poly_int64.
21419 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21420             Alan Hayward  <alan.hayward@arm.com>
21421             David Sherwood  <david.sherwood@arm.com>
21423         * calls.c (load_register_parameters): Cope with polynomial
21424         mode sizes.  Require a constant size for BLKmode parameters
21425         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
21426         forces a parameter to be padded at the lsb end in order to
21427         fill a complete number of words, require the parameter size
21428         to be ordered wrt UNITS_PER_WORD.
21430 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21431             Alan Hayward  <alan.hayward@arm.com>
21432             David Sherwood  <david.sherwood@arm.com>
21434         * reload1.c (spill_stack_slot_width): Change element type
21435         from unsigned int to poly_uint64_pod.
21436         (alter_reg): Treat mode sizes as polynomial.
21438 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21439             Alan Hayward  <alan.hayward@arm.com>
21440             David Sherwood  <david.sherwood@arm.com>
21442         * reload.c (complex_word_subreg_p): New function.
21443         (reload_inner_reg_of_subreg, push_reload): Use it.
21445 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21446             Alan Hayward  <alan.hayward@arm.com>
21447             David Sherwood  <david.sherwood@arm.com>
21449         * lra-constraints.c (process_alt_operands): Reject matched
21450         operands whose sizes aren't ordered.
21451         (match_reload): Refer to this check here.
21453 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21454             Alan Hayward  <alan.hayward@arm.com>
21455             David Sherwood  <david.sherwood@arm.com>
21457         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
21458         that the mode size is in the set {1, 2, 4, 8, 16}.
21460 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21461             Alan Hayward  <alan.hayward@arm.com>
21462             David Sherwood  <david.sherwood@arm.com>
21464         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
21465         Use plus_constant instead of gen_rtx_PLUS.
21467 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21468             Alan Hayward  <alan.hayward@arm.com>
21469             David Sherwood  <david.sherwood@arm.com>
21471         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
21472         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
21473         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
21474         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
21475         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
21476         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
21477         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
21478         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
21479         * config/i386/i386.c (ix86_push_rounding): ...this new function.
21480         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
21481         a poly_int64.
21482         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
21483         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
21484         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
21485         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
21486         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
21487         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
21488         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
21489         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
21490         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
21491         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
21492         function.
21493         * expr.c (emit_move_resolve_push): Treat the input and result
21494         of PUSH_ROUNDING as a poly_int64.
21495         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
21496         (emit_push_insn): Likewise.
21497         * lra-eliminations.c (mark_not_eliminable): Likewise.
21498         * recog.c (push_operand): Likewise.
21499         * reload1.c (elimination_effects): Likewise.
21500         * rtlanal.c (nonzero_bits1): Likewise.
21501         * calls.c (store_one_arg): Likewise.  Require the padding to be
21502         known at compile time.
21504 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21505             Alan Hayward  <alan.hayward@arm.com>
21506             David Sherwood  <david.sherwood@arm.com>
21508         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
21509         Use plus_constant instead of gen_rtx_PLUS.
21511 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21512             Alan Hayward  <alan.hayward@arm.com>
21513             David Sherwood  <david.sherwood@arm.com>
21515         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
21516         rather than an int.
21518 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21519             Alan Hayward  <alan.hayward@arm.com>
21520             David Sherwood  <david.sherwood@arm.com>
21522         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
21523         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
21524         via stack temporaries.  Treat the mode size as polynomial too.
21526 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21527             Alan Hayward  <alan.hayward@arm.com>
21528             David Sherwood  <david.sherwood@arm.com>
21530         * expr.c (expand_expr_real_2): When handling conversions involving
21531         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
21532         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
21533         as a poly_uint64 too.
21535 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21536             Alan Hayward  <alan.hayward@arm.com>
21537             David Sherwood  <david.sherwood@arm.com>
21539         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
21541 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21542             Alan Hayward  <alan.hayward@arm.com>
21543             David Sherwood  <david.sherwood@arm.com>
21545         * combine.c (can_change_dest_mode): Handle polynomial
21546         REGMODE_NATURAL_SIZE.
21547         * expmed.c (store_bit_field_1): Likewise.
21548         * expr.c (store_constructor): Likewise.
21549         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
21550         and polynomial REGMODE_NATURAL_SIZE.
21551         (gen_lowpart_common): Likewise.
21552         * reginfo.c (record_subregs_of_mode): Likewise.
21553         * rtlanal.c (read_modify_subreg_p): Likewise.
21555 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21556             Alan Hayward  <alan.hayward@arm.com>
21557             David Sherwood  <david.sherwood@arm.com>
21559         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21560         numbers of elements.
21562 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21563             Alan Hayward  <alan.hayward@arm.com>
21564             David Sherwood  <david.sherwood@arm.com>
21566         * match.pd: Cope with polynomial numbers of vector elements.
21568 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21569             Alan Hayward  <alan.hayward@arm.com>
21570             David Sherwood  <david.sherwood@arm.com>
21572         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
21573         in a POINTER_PLUS_EXPR.
21575 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21576             Alan Hayward  <alan.hayward@arm.com>
21577             David Sherwood  <david.sherwood@arm.com>
21579         * omp-simd-clone.c (simd_clone_subparts): New function.
21580         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
21581         (ipa_simd_modify_function_body): Likewise.
21583 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21584             Alan Hayward  <alan.hayward@arm.com>
21585             David Sherwood  <david.sherwood@arm.com>
21587         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
21588         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
21589         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
21590         (expand_vector_condition, vector_element): Likewise.
21591         (subparts_gt): New function.
21592         (get_compute_type): Use subparts_gt.
21593         (count_type_subparts): Delete.
21594         (expand_vector_operations_1): Use subparts_gt instead of
21595         count_type_subparts.
21597 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21598             Alan Hayward  <alan.hayward@arm.com>
21599             David Sherwood  <david.sherwood@arm.com>
21601         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
21602         (vect_compile_time_alias): ...this new function.  Do the calculation
21603         on poly_ints rather than trees.
21604         (vect_prune_runtime_alias_test_list): Update call accordingly.
21606 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21607             Alan Hayward  <alan.hayward@arm.com>
21608             David Sherwood  <david.sherwood@arm.com>
21610         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
21611         numbers of units.
21612         (vect_schedule_slp_instance): Likewise.
21614 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21615             Alan Hayward  <alan.hayward@arm.com>
21616             David Sherwood  <david.sherwood@arm.com>
21618         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
21619         constant and extern definitions for variable-length vectors.
21620         (vect_get_constant_vectors): Note that the number of units
21621         is known to be constant.
21623 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21624             Alan Hayward  <alan.hayward@arm.com>
21625             David Sherwood  <david.sherwood@arm.com>
21627         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21628         of units as polynomial.  Choose between WIDE and NARROW based
21629         on multiple_p.
21631 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21632             Alan Hayward  <alan.hayward@arm.com>
21633             David Sherwood  <david.sherwood@arm.com>
21635         * tree-vect-stmts.c (simd_clone_subparts): New function.
21636         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
21638 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21639             Alan Hayward  <alan.hayward@arm.com>
21640             David Sherwood  <david.sherwood@arm.com>
21642         * tree-vect-stmts.c (vectorizable_call): Treat the number of
21643         vectors as polynomial.  Use build_index_vector for
21644         IFN_GOMP_SIMD_LANE.
21646 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21647             Alan Hayward  <alan.hayward@arm.com>
21648             David Sherwood  <david.sherwood@arm.com>
21650         * tree-vect-stmts.c (get_load_store_type): Treat the number of
21651         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21652         for variable-length vectors.
21653         (vectorizable_mask_load_store): Treat the number of units as
21654         polynomial, asserting that it is constant if the condition has
21655         already been enforced.
21656         (vectorizable_store, vectorizable_load): Likewise.
21658 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21659             Alan Hayward  <alan.hayward@arm.com>
21660             David Sherwood  <david.sherwood@arm.com>
21662         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21663         of units as polynomial.  Punt if we can't tell at compile time
21664         which vector contains the final result.
21666 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21667             Alan Hayward  <alan.hayward@arm.com>
21668             David Sherwood  <david.sherwood@arm.com>
21670         * tree-vect-loop.c (vectorizable_induction): Treat the number
21671         of units as polynomial.  Punt on SLP inductions.  Use an integer
21672         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
21673         cast of such a series for variable-length floating-point
21674         reductions.
21676 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21677             Alan Hayward  <alan.hayward@arm.com>
21678             David Sherwood  <david.sherwood@arm.com>
21680         * tree.h (build_index_vector): Declare.
21681         * tree.c (build_index_vector): New function.
21682         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21683         of units as polynomial, forcibly converting it to a constant if
21684         vectorizable_reduction has already enforced the condition.
21685         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
21686         to create a {1,2,3,...} vector.
21687         (vectorizable_reduction): Treat the number of units as polynomial.
21688         Choose vectype_in based on the largest scalar element size rather
21689         than the smallest number of units.  Enforce the restrictions
21690         relied on above.
21692 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21693             Alan Hayward  <alan.hayward@arm.com>
21694             David Sherwood  <david.sherwood@arm.com>
21696         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21697         number of units as polynomial.
21699 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21700             Alan Hayward  <alan.hayward@arm.com>
21701             David Sherwood  <david.sherwood@arm.com>
21703         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21704         * target.def (autovectorize_vector_sizes): Return the vector sizes
21705         by pointer, using vector_sizes rather than a bitmask.
21706         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21707         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21708         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21709         Likewise.
21710         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21711         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21712         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21713         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21714         * omp-general.c (omp_max_vf): Likewise.
21715         * omp-low.c (omp_clause_aligned_alignment): Likewise.
21716         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21717         * tree-vect-loop.c (vect_analyze_loop): Likewise.
21718         * tree-vect-slp.c (vect_slp_bb): Likewise.
21719         * doc/tm.texi: Regenerate.
21720         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21721         to a poly_uint64.
21722         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21723         the vector size as a poly_uint64 rather than an unsigned int.
21724         (current_vector_size): Change from an unsigned int to a poly_uint64.
21725         (get_vectype_for_scalar_type): Update accordingly.
21726         * tree.h (build_truth_vector_type): Take the size and number of
21727         units as a poly_uint64 rather than an unsigned int.
21728         (build_vector_type): Add a temporary overload that takes
21729         the number of units as a poly_uint64 rather than an unsigned int.
21730         * tree.c (make_vector_type): Likewise.
21731         (build_truth_vector_type): Take the number of units as a poly_uint64
21732         rather than an unsigned int.
21734 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21735             Alan Hayward  <alan.hayward@arm.com>
21736             David Sherwood  <david.sherwood@arm.com>
21738         * target.def (get_mask_mode): Take the number of units and length
21739         as poly_uint64s rather than unsigned ints.
21740         * targhooks.h (default_get_mask_mode): Update accordingly.
21741         * targhooks.c (default_get_mask_mode): Likewise.
21742         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21743         * doc/tm.texi: Regenerate.
21745 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21746             Alan Hayward  <alan.hayward@arm.com>
21747             David Sherwood  <david.sherwood@arm.com>
21749         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21750         * omp-general.c (omp_max_vf): Likewise.
21751         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21752         (expand_omp_simd): Handle polynomial safelen.
21753         * omp-low.c (omplow_simd_context): Add a default constructor.
21754         (omplow_simd_context::max_vf): Change from int to poly_uint64.
21755         (lower_rec_simd_input_clauses): Update accordingly.
21756         (lower_rec_input_clauses): Likewise.
21758 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21759             Alan Hayward  <alan.hayward@arm.com>
21760             David Sherwood  <david.sherwood@arm.com>
21762         * tree-vectorizer.h (vect_nunits_for_cost): New function.
21763         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21764         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21765         (vect_analyze_slp_cost): Likewise.
21766         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21767         (vect_model_load_cost): Likewise.
21769 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21770             Alan Hayward  <alan.hayward@arm.com>
21771             David Sherwood  <david.sherwood@arm.com>
21773         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21774         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21775         from an unsigned int * to a poly_uint64_pod *.
21776         (calculate_unrolling_factor): New function.
21777         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
21779 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21780             Alan Hayward  <alan.hayward@arm.com>
21781             David Sherwood  <david.sherwood@arm.com>
21783         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21784         from an unsigned int to a poly_uint64.
21785         (_loop_vec_info::slp_unrolling_factor): Likewise.
21786         (_loop_vec_info::vectorization_factor): Change from an int
21787         to a poly_uint64.
21788         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21789         (vect_get_num_vectors): New function.
21790         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21791         (vect_get_num_copies): Use vect_get_num_vectors.
21792         (vect_analyze_data_ref_dependences): Change max_vf from an int *
21793         to an unsigned int *.
21794         (vect_analyze_data_refs): Change min_vf from an int * to a
21795         poly_uint64 *.
21796         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21797         than an unsigned HOST_WIDE_INT.
21798         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21799         (vect_analyze_data_ref_dependence): Change max_vf from an int *
21800         to an unsigned int *.
21801         (vect_analyze_data_ref_dependences): Likewise.
21802         (vect_compute_data_ref_alignment): Handle polynomial vf.
21803         (vect_enhance_data_refs_alignment): Likewise.
21804         (vect_prune_runtime_alias_test_list): Likewise.
21805         (vect_shift_permute_load_chain): Likewise.
21806         (vect_supportable_dr_alignment): Likewise.
21807         (dependence_distance_ge_vf): Take the vectorization factor as a
21808         poly_uint64 rather than an unsigned HOST_WIDE_INT.
21809         (vect_analyze_data_refs): Change min_vf from an int * to a
21810         poly_uint64 *.
21811         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21812         vfm1 as a poly_uint64 rather than an int.  Make the same change
21813         for the returned bound_scalar.
21814         (vect_gen_vector_loop_niters): Handle polynomial vf.
21815         (vect_do_peeling): Likewise.  Update call to
21816         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21817         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21818         be constant.
21819         * tree-vect-loop.c (vect_determine_vectorization_factor)
21820         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21821         (vect_get_known_peeling_cost): Likewise.
21822         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21823         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21824         (vect_transform_loop): Likewise.  Use the lowest possible VF when
21825         updating the upper bounds of the loop.
21826         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
21827         rather than an int.
21828         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21829         polynomial unroll factors.
21830         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21831         (vect_make_slp_decision): Likewise.
21832         (vect_supported_load_permutation_p): Likewise, and polynomial
21833         vf too.
21834         (vect_analyze_slp_cost): Handle polynomial vf.
21835         (vect_slp_analyze_node_operations): Likewise.
21836         (vect_slp_analyze_bb_1): Likewise.
21837         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21838         than an unsigned HOST_WIDE_INT.
21839         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21840         (vectorizable_load): Handle polynomial vf.
21841         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21842         a poly_uint64.
21843         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21845 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21846             Alan Hayward  <alan.hayward@arm.com>
21847             David Sherwood  <david.sherwood@arm.com>
21849         * match.pd: Handle bit operations involving three constants
21850         and try to fold one pair.
21852 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21854         * tree-vect-loop-manip.c: Include gimple-fold.h.
21855         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21856         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
21857         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21858         Add a path that uses a step of VF instead of 1, but disable it
21859         for now.
21860         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21861         and niters_no_overflow parameters.  Update calls to
21862         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21863         Create a new SSA name if the latter choses to use a ste other
21864         than zero, and return it via niters_vector_mult_vf_var.
21865         * tree-vect-loop.c (vect_transform_loop): Update calls to
21866         vect_do_peeling, vect_gen_vector_loop_niters and
21867         slpeel_make_loop_iterate_ntimes.
21868         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21869         (vect_gen_vector_loop_niters): Update declarations after above changes.
21871 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
21873         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21874         128-bit round to integer instructions.
21875         (ceil<mode>2): Likewise.
21876         (btrunc<mode>2): Likewise.
21877         (round<mode>2): Likewise.
21879 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21881         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21882         unaligned VSX load/store on P8/P9.
21883         (expand_block_clear): Allow the use of unaligned VSX
21884         load/store on P8/P9.
21886 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21888         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21889         New function.
21890         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21891         swap associated with both a load and a store.
21893 2018-01-02  Andrew Waterman  <andrew@sifive.com>
21895         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21896         * config/riscv/riscv.md (clear_cache): Use it.
21898 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
21900         * web.c: Remove out-of-date comment.
21902 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21904         * expr.c (fixup_args_size_notes): Check that any existing
21905         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21906         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21907         (emit_single_push_insn): ...here.
21909 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21911         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21912         (const_vector_encoded_nelts): New function.
21913         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21914         (const_vector_int_elt, const_vector_elt): Declare.
21915         * emit-rtl.c (const_vector_int_elt_1): New function.
21916         (const_vector_elt): Likewise.
21917         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21918         of CONST_VECTOR_ELT.
21920 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21922         * expr.c: Include rtx-vector-builder.h.
21923         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21924         directly on the tree encoding.
21925         (const_vector_from_tree): Likewise.
21926         * optabs.c: Include rtx-vector-builder.h.
21927         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21928         sequence of "u" values.
21929         * vec-perm-indices.c: Include rtx-vector-builder.h.
21930         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21931         directly on the vec_perm_indices encoding.
21933 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21935         * doc/rtl.texi (const_vector): Describe new encoding scheme.
21936         * Makefile.in (OBJS): Add rtx-vector-builder.o.
21937         * rtx-vector-builder.h: New file.
21938         * rtx-vector-builder.c: Likewise.
21939         * rtl.h (rtx_def::u2): Add a const_vector field.
21940         (CONST_VECTOR_NPATTERNS): New macro.
21941         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21942         (CONST_VECTOR_DUPLICATE_P): Likewise.
21943         (CONST_VECTOR_STEPPED_P): Likewise.
21944         (CONST_VECTOR_ENCODED_ELT): Likewise.
21945         (const_vec_duplicate_p): Check for a duplicated vector encoding.
21946         (unwrap_const_vec_duplicate): Likewise.
21947         (const_vec_series_p): Check for a non-duplicated vector encoding.
21948         Say that the function only returns true for integer vectors.
21949         * emit-rtl.c: Include rtx-vector-builder.h.
21950         (gen_const_vec_duplicate_1): Delete.
21951         (gen_const_vector): Call gen_const_vec_duplicate instead of
21952         gen_const_vec_duplicate_1.
21953         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21954         (gen_const_vec_duplicate): Use rtx_vector_builder.
21955         (gen_const_vec_series): Likewise.
21956         (gen_rtx_CONST_VECTOR): Likewise.
21957         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21958         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21959         Build a new vector rather than modifying a CONST_VECTOR in-place.
21960         (handle_special_swappables): Update call accordingly.
21961         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21962         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21963         Build a new vector rather than modifying a CONST_VECTOR in-place.
21964         (handle_special_swappables): Update call accordingly.
21966 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21968         * simplify-rtx.c (simplify_const_binary_operation): Use
21969         CONST_VECTOR_ELT instead of XVECEXP.
21971 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21973         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21974         the selector elements to be different from the data elements
21975         if the selector is a VECTOR_CST.
21976         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
21977         ssizetype for the selector.
21979 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21981         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
21982         before testing each element individually.
21983         * tree-vect-generic.c (lower_vec_perm): Likewise.
21985 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21987         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
21988         * selftest-run-tests.c (selftest::run_tests): Call it.
21989         * vector-builder.h (vector_builder::operator ==): New function.
21990         (vector_builder::operator !=): Likewise.
21991         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
21992         (vec_perm_indices::all_from_input_p): New function.
21993         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21994         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
21995         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
21996         instead of reading the VECTOR_CST directly.  Detect whether both
21997         vector inputs are the same before constructing the vec_perm_indices,
21998         and update the number of inputs argument accordingly.  Use the
21999         utility functions added above.  Only construct sel2 if we need to.
22001 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22003         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22004         the broadcast of the low byte.
22005         (expand_mult_highpart): Use an explicit encoding for the permutes.
22006         * optabs-query.c (can_mult_highpart_p): Likewise.
22007         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22008         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22009         (vectorizable_bswap): Likewise.
22010         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22011         explicit encoding for the power-of-2 permutes.
22012         (vect_permute_store_chain): Likewise.
22013         (vect_grouped_load_supported): Likewise.
22014         (vect_permute_load_chain): Likewise.
22016 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22018         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22019         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22020         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22021         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22022         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22023         (vect_gen_perm_mask_any): Likewise.
22025 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22027         * int-vector-builder.h: New file.
22028         * vec-perm-indices.h: Include int-vector-builder.h.
22029         (vec_perm_indices): Redefine as an int_vector_builder.
22030         (auto_vec_perm_indices): Delete.
22031         (vec_perm_builder): Redefine as a stand-alone class.
22032         (vec_perm_indices::vec_perm_indices): New function.
22033         (vec_perm_indices::clamp): Likewise.
22034         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22035         (vec_perm_indices::new_vector): New function.
22036         (vec_perm_indices::new_expanded_vector): Update for new
22037         vec_perm_indices class.
22038         (vec_perm_indices::rotate_inputs): New function.
22039         (vec_perm_indices::all_in_range_p): Operate directly on the
22040         encoded form, without computing elided elements.
22041         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22042         encoding.  Update for new vec_perm_indices class.
22043         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
22044         the given vec_perm_builder.
22045         (expand_vec_perm_var): Update vec_perm_builder constructor.
22046         (expand_mult_highpart): Use vec_perm_builder instead of
22047         auto_vec_perm_indices.
22048         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
22049         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
22050         or double series encoding as appropriate.
22051         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
22052         vec_perm_indices instead of auto_vec_perm_indices.
22053         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22054         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22055         (vect_permute_store_chain): Likewise.
22056         (vect_grouped_load_supported): Likewise.
22057         (vect_permute_load_chain): Likewise.
22058         (vect_shift_permute_load_chain): Likewise.
22059         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22060         (vect_transform_slp_perm_load): Likewise.
22061         (vect_schedule_slp_instance): Likewise.
22062         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22063         (vectorizable_mask_load_store): Likewise.
22064         (vectorizable_bswap): Likewise.
22065         (vectorizable_store): Likewise.
22066         (vectorizable_load): Likewise.
22067         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
22068         vec_perm_indices instead of auto_vec_perm_indices.  Use
22069         tree_to_vec_perm_builder to read the vector from a tree.
22070         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
22071         vec_perm_builder instead of a vec_perm_indices.
22072         (have_whole_vector_shift): Use vec_perm_builder and
22073         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
22074         truncation to calc_vec_perm_mask_for_shift.
22075         (vect_create_epilog_for_reduction): Likewise.
22076         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
22077         from auto_vec_perm_indices to vec_perm_indices.
22078         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22079         instead of changing individual elements.
22080         (aarch64_vectorize_vec_perm_const): Use new_vector to install
22081         the vector in d.perm.
22082         * config/arm/arm.c (expand_vec_perm_d::perm): Change
22083         from auto_vec_perm_indices to vec_perm_indices.
22084         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22085         instead of changing individual elements.
22086         (arm_vectorize_vec_perm_const): Use new_vector to install
22087         the vector in d.perm.
22088         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
22089         Update vec_perm_builder constructor.
22090         (rs6000_expand_interleave): Likewise.
22091         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
22092         (rs6000_expand_interleave): Likewise.
22094 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22096         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
22097         to qimode could truncate the indices.
22098         * optabs.c (expand_vec_perm_var): Likewise.
22100 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22102         * Makefile.in (OBJS): Add vec-perm-indices.o.
22103         * vec-perm-indices.h: New file.
22104         * vec-perm-indices.c: Likewise.
22105         * target.h (vec_perm_indices): Replace with a forward class
22106         declaration.
22107         (auto_vec_perm_indices): Move to vec-perm-indices.h.
22108         * optabs.h: Include vec-perm-indices.h.
22109         (expand_vec_perm): Delete.
22110         (selector_fits_mode_p, expand_vec_perm_var): Declare.
22111         (expand_vec_perm_const): Declare.
22112         * target.def (vec_perm_const_ok): Replace with...
22113         (vec_perm_const): ...this new hook.
22114         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
22115         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
22116         * doc/tm.texi: Regenerate.
22117         * optabs.def (vec_perm_const): Delete.
22118         * doc/md.texi (vec_perm_const): Likewise.
22119         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
22120         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
22121         expand_vec_perm for constant permutation vectors.  Assert that
22122         the mode of variable permutation vectors is the integer equivalent
22123         of the mode that is being permuted.
22124         * optabs-query.h (selector_fits_mode_p): Declare.
22125         * optabs-query.c: Include vec-perm-indices.h.
22126         (selector_fits_mode_p): New function.
22127         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
22128         is defined, instead of checking whether the vec_perm_const_optab
22129         exists.  Use targetm.vectorize.vec_perm_const instead of
22130         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
22131         fit in the vector mode before using a variable permute.
22132         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
22133         vec_perm_indices instead of an rtx.
22134         (expand_vec_perm): Replace with...
22135         (expand_vec_perm_const): ...this new function.  Take the selector
22136         as a vec_perm_indices rather than an rtx.  Also take the mode of
22137         the selector.  Update call to shift_amt_for_vec_perm_mask.
22138         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
22139         Use vec_perm_indices::new_expanded_vector to expand the original
22140         selector into bytes.  Check whether the indices fit in the vector
22141         mode before using a variable permute.
22142         (expand_vec_perm_var): Make global.
22143         (expand_mult_highpart): Use expand_vec_perm_const.
22144         * fold-const.c: Includes vec-perm-indices.h.
22145         * tree-ssa-forwprop.c: Likewise.
22146         * tree-vect-data-refs.c: Likewise.
22147         * tree-vect-generic.c: Likewise.
22148         * tree-vect-loop.c: Likewise.
22149         * tree-vect-slp.c: Likewise.
22150         * tree-vect-stmts.c: Likewise.
22151         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
22152         Delete.
22153         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
22154         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
22155         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
22156         (aarch64_vectorize_vec_perm_const): ...this new function.
22157         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22158         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22159         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
22160         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
22161         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22162         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22163         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
22164         into...
22165         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
22166         check for NEON modes.
22167         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
22168         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
22169         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
22170         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
22171         into...
22172         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
22173         the old VEC_PERM_CONST conditions.
22174         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
22175         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
22176         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
22177         (ia64_vectorize_vec_perm_const_ok): Merge into...
22178         (ia64_vectorize_vec_perm_const): ...this new function.
22179         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
22180         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
22181         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
22182         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
22183         * config/mips/mips.c (mips_expand_vec_perm_const)
22184         (mips_vectorize_vec_perm_const_ok): Merge into...
22185         (mips_vectorize_vec_perm_const): ...this new function.
22186         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
22187         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
22188         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
22189         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
22190         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
22191         (rs6000_expand_vec_perm_const): Delete.
22192         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
22193         Delete.
22194         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22195         (altivec_expand_vec_perm_const_le): Take each operand individually.
22196         Operate on constant selectors rather than rtxes.
22197         (altivec_expand_vec_perm_const): Likewise.  Update call to
22198         altivec_expand_vec_perm_const_le.
22199         (rs6000_expand_vec_perm_const): Delete.
22200         (rs6000_vectorize_vec_perm_const_ok): Delete.
22201         (rs6000_vectorize_vec_perm_const): New function.
22202         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22203         an element count and rtx array.
22204         (rs6000_expand_extract_even): Update call accordingly.
22205         (rs6000_expand_interleave): Likewise.
22206         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
22207         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
22208         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
22209         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
22210         (rs6000_expand_vec_perm_const): Delete.
22211         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22212         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22213         (altivec_expand_vec_perm_const_le): Take each operand individually.
22214         Operate on constant selectors rather than rtxes.
22215         (altivec_expand_vec_perm_const): Likewise.  Update call to
22216         altivec_expand_vec_perm_const_le.
22217         (rs6000_expand_vec_perm_const): Delete.
22218         (rs6000_vectorize_vec_perm_const_ok): Delete.
22219         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
22220         reference to the SPE evmerge intructions.
22221         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22222         an element count and rtx array.
22223         (rs6000_expand_extract_even): Update call accordingly.
22224         (rs6000_expand_interleave): Likewise.
22225         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
22226         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
22227         new function.
22228         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22230 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22232         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
22233         vector mode and that that mode matches the mode of the data
22234         being permuted.
22235         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
22236         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
22237         directly using expand_vec_perm_1 when forcing selectors into
22238         registers.
22239         (expand_vec_perm_var): New function, split out from expand_vec_perm.
22241 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22243         * optabs-query.h (can_vec_perm_p): Delete.
22244         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
22245         * optabs-query.c (can_vec_perm_p): Split into...
22246         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
22247         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
22248         particular selector is valid.
22249         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22250         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22251         (vect_grouped_load_supported): Likewise.
22252         (vect_shift_permute_load_chain): Likewise.
22253         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22254         (vect_transform_slp_perm_load): Likewise.
22255         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22256         (vectorizable_bswap): Likewise.
22257         (vect_gen_perm_mask_checked): Likewise.
22258         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
22259         implementations of variable permutation vectors into account
22260         when deciding which selector to use.
22261         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
22262         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
22263         with a false third argument.
22264         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
22265         to test whether the constant selector is valid and can_vec_perm_var_p
22266         to test whether a variable selector is valid.
22268 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22270         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
22271         * optabs-query.c (can_vec_perm_p): Likewise.
22272         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
22273         instead of vec_perm_indices.
22274         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
22275         (vect_gen_perm_mask_checked): Likewise,
22276         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
22277         (vect_gen_perm_mask_checked): Likewise,
22279 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22281         * optabs-query.h (qimode_for_vec_perm): Declare.
22282         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
22283         (qimode_for_vec_perm): ...this new function.
22284         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
22286 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22288         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
22289         does not have a conditional at the top.
22291 2018-01-02  Richard Biener  <rguenther@suse.de>
22293         * ipa-inline.c (big_speedup_p): Fix expression.
22295 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
22297         PR target/81616
22298         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
22299         for generic 4->6.
22301 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
22303         PR target/81616
22304         Generic tuning.
22305         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
22306         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
22307         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
22308         cond_taken_branch_cost 3->4.
22310 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
22312         PR tree-optimization/83581
22313         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
22314         TODO_cleanup_cfg if any changes have been made.
22316         PR middle-end/83608
22317         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
22318         convert_modes if target mode has the right side, but different mode
22319         class.
22321         PR middle-end/83609
22322         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
22323         last argument when extracting from CONCAT.  If either from_real or
22324         from_imag is NULL, use expansion through memory.  If result is not
22325         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
22326         the parts directly to inner mode, if even that fails, use expansion
22327         through memory.
22329         PR middle-end/83623
22330         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
22331         check for bswap in mode rather than HImode and use that in expand_unop
22332         too.
22334 Copyright (C) 2018 Free Software Foundation, Inc.
22336 Copying and distribution of this file, with or without modification,
22337 are permitted in any medium without royalty provided the copyright
22338 notice and this notice are preserved.