Fix wrong declaration.
[official-gcc.git] / gcc / ChangeLog
blobfbd9fd6cf37be02b2904c3317e59a68a7b09afab
1 2018-07-25  Martin Liska  <mliska@suse.cz>
3         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4         return type.
6 2018-07-25  Richard Biener  <rguenther@suse.de>
8         PR debug/86654
9         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
10         special wrt context_die late.
11         (gen_subprogram_die): Re-use DIEs in local scope.
13 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
15         PR tree-optimization/86644
16         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
18 2018-07-25  Martin Liska  <mliska@suse.cz>
20         PR middle-end/86645
21         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
22         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
24 2018-07-25  Martin Liska  <mliska@suse.cz>
26         PR sanitizer/79635
27         * params.def: Explain ASan abbreviation and provide
28         a documentation link.
30 2018-07-24  Martin Sebor  <msebor@redhat.com>
32         PR tree-optimization/86622
33         PR tree-optimization/86532
34         * builtins.h (string_length): Declare.
35         * builtins.c (c_strlen): Correct handling of non-constant offsets.      
36         (check_access): Be prepared for non-constant length ranges.
37         (string_length): Make extern.
38         * expr.c (string_constant): Only handle the minor non-constant
39         array index.  Use string_constant to compute the length of
40         a generic string constant.
42 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
44         PR tree-optimization/86618
45         * tree-vect-stmts.c (vectorizable_call): Don't take the address
46         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
48 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
50         PR tree-optimization/86636
51         * json.cc (json::object::set): Fix comment.  Add assertions.
52         (json::array::append): Move here from json.h.  Add comment and an
53         assertion.
54         (json::string::string): Likewise.
55         * json.h (json::array::append): Move to json.cc.
56         (json::string::string): Likewise.
57         * optinfo-emit-json.cc
58         (optrecord_json_writer::impl_location_to_json): Assert that we
59         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
60         wrapper around it.  Expand the location once, rather than three
61         times.
62         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
63         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
64         wrappers.
65         (optrecord_json_writer::optinfo_to_json): Likewise, in four
66         places.  Fix some overlong lines.
68 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
70         * config/aarch64/aarch64-simd.md
71         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
72         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
73         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
74         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
75         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
76         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
77         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
78         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
79         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
81 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
83         PR middle-end/86627
84         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
85         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
86         and abs_d == d, do the power of two handling if profitable.
88 2018-07-24  Richard Biener  <rguenther@suse.de>
90         * match.pd: Add BIT_FIELD_REF canonicalizations.
92 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
94         PR c/86617
95         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
97 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
99         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
100         terminated STRING_CST object.
102 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
104         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
106 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
108         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
109         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
110         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
111         the elements into a register.
112         (rs6000_split_v4si_init_di_reg): Delete.
113         (rs6000_split_v4si_init): Delete.
114         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
115         (vsx_init_v4si): Rewrite as a define_expand.
117 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
119         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
120         zero_extend argument from memory): New.
122 2018-07-22  Martin Sebor  <msebor@redhat.com>
124         PR bootstrap/86621
125         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
126         diagnosing calls with unknown arguments unless -Walloca-larger-than
127         is restricted to less than PTRDIFF_MAX bytes.
129 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
131         * doc/gcov.texi (Invoking Gcov): Editorial changes.
133 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
135         * pretty-print.c (text_info::set_location): Remove redundant
136         "line_table" parameter from call to rich_location::set_range.
138 2018-07-20  Martin Sebor  <msebor@redhat.com>
140         PR middle-end/82063
141         * builtins.c (expand_builtin_alloca): Adjust.
142         * calls.c (alloc_max_size): Simplify.
143         * cgraphunit.c (cgraph_node::expand): Adjust.
144         * common.opt (larger_than_size, warn_frame_larger_than): Remove
145         variables.
146         (frame_larger_than_size): Same.
147         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
148         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
149         Initialize.
150         * doc/invoke.texi (GCC Command Options): Document option arguments.
151         Explain byte-size arguments and suffixes.
152         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
153         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
154         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
155         * doc/options.texi (UInteger): Expand.
156         (Host_Wide_Int, ByteSize): Document new properties.
157         * final.c (final_start_function_1): Include sizes in an error message.
158         * function.c (frame_offset_overflow): Same.
159         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
160         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
161         Diagnose unbounded alloca calls only for limits of less than
162         PTRDIFF_MAX.
163         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
164         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
165         for alloca(0).
166         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
167         only for limits of less than PTRDIFF_MAX.
168         * langhooks-def.h (lhd_handle_option): Change function argument
169         to HOST_WIDE_INT.
170         * langhooks.c (lhd_handle_option): Same.
171         * langhooks.h (handle_option): Same.
172         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
173         ByteSize flags.
174         (var_type, var_type_struct): Same.
175         (var_set): Handle ByteSize flag.
176         * optc-gen.awk: Add comments to output to ease debugging.  Make
177         use of HOST_WIDE_INT where appropriate.
178         * opts-gen-save.awk:  Use %lx to format unsigned long.
179         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
180         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
181         arguments.  Parse bytes-size suffixes.
182         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
183         (enum_value_to_arg): Same.
184         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
185         (handle_option): Adjust.
186         (generate_option): Change function argument to HOST_WIDE_INT.
187         (cmdline_handle_error): Adjust.
188         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
189         (set_option): Change function argument to HOST_WIDE_INT.
190         (option_enabled): Handle cl_host_wide_int.
191         (get_option_state): Handle CLVC_SIZE.
192         (control_warning_option): Same.
193         * opts.c (common_handle_option): Change function argument to
194         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
195         OPT_Wvla_larger_than_.
196         * opts.h (enum cl_var_type): Add an enumerator.
197         * stor-layout.c (layout_decl): Print a more meaningful warning.
198         * toplev.c (output_stack_usage): Adjust.
200 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
202         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
203         call to inline_expand_builtin_string_cmp.
204         (expand_builtin_strcmp): Likewise.
205         (expand_builtin_strncmp): Likewise.
206         (inline_string_cmp): Delete the last parameter, change char_type_node
207         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
208         two operands.
209         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
210         the inlining expansion on target where the type of the call has same or 
211         narrower precision than unsigned char.
213 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
215         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
216         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
217         * common.opt (fsave-optimization-record): New option.
218         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
219         * doc/invoke.texi (-fsave-optimization-record): New option.
220         * dumpfile.c: Include "optinfo-emit-json.h".
221         (struct kv_pair): Move to coretypes.h.
222         (optgroup_options): Make non-static.
223         (dump_context::end_scope): Call
224         optimization_records_maybe_pop_dump_scope.
225         * dumpfile.h (optgroup_options): New decl.
226         * json.cc: New file.
227         * json.h: New file.
228         * optinfo-emit-json.cc: New file.
229         * optinfo-emit-json.h: New file.
230         * optinfo.cc: Include "optinfo-emit-json.h".
231         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
232         (optinfo_enabled_p): Check optimization_records_enabled_p.
233         (optinfo_wants_inlining_info_p): Likewise.
234         * optinfo.h: Update comment.
235         * profile-count.c (profile_quality_as_string): New function.
236         * profile-count.h (profile_quality_as_string): New decl.
237         (profile_count::quality): New accessor.
238         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
239         and optinfo_emit_json_cc_tests.
240         * selftest.h (selftest::json_cc_tests): New decl.
241         (selftest::optinfo_emit_json_cc_tests): New decl.
242         * toplev.c: Include "optinfo-emit-json.h".
243         (compile_file): Call optimization_records_finish.
244         (do_compile): Call optimization_records_start.
245         * tree-ssa-live.c: Include optinfo.h.
246         (remove_unused_scope_block_p): Retain inlining information if
247         optinfo_wants_inlining_info_p returns true.
249 2018-07-20  Richard Biener  <rguenther@suse.de>
251         PR debug/86585
252         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
253         to cover -flto-partition=none.
255 2018-07-20  Martin Liska  <mliska@suse.cz>
257         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
258         (get_decl_source_range): Remove unused function.
260 2018-07-20  Richard Biener  <rguenther@suse.de>
262         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
263         (struct vn_phi_s): Likewise.
264         (struct vn_reference_s): Likewise.
265         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
266         for searching the slot of an entry known to be in the hash itself.
267         (vn_phi_hasher::equal): Likewise.
268         (vn_reference_hasher::equal): Likewise.
269         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
270         globals.
271         (optimistic_info, current_info): Remove, keeping only valid_info.
272         (vn_reference_lookup_1): Remove fallback lookup.
273         (vn_reference_lookup_2): Likewise.
274         (vn_nary_op_lookup_1): Likewise.
275         (vn_phi_lookup): Likewise.
276         (vn_nary_build_or_lookup_1): Make sure to not chain the built
277         hash element.
278         (vn_reference_insert): Adjust, chain the inserted hash element
279         at last_inserted_ref.
280         (vn_reference_insert_pieces): Likewise.
281         (visit_reference_op_call): Likewise.
282         (vn_nary_op_insert_into): Chain the inserted hash element at
283         last_inserted_nary.
284         (vn_nary_op_insert_pieces): Adjust.
285         (vn_nary_op_insert): Likewise.
286         (vn_nary_op_insert_stmt): Likewise.
287         (vn_phi_insert): Adjust, chain the inserted hash element at
288         last_inserted_phi.
289         (process_scc): Remove clearing and copying the optimistic
290         table.  Instead remove elements inserted during an optimistic
291         iteration from the single table we maintain.
292         (init_scc_vn): Adjust.
293         (free_scc_vn): Likewise.
294         (sccvn_dom_walker::record_cond): Likewise.
295         (sccvn_dom_walker::after_dom_children): Likewise.
297 2018-07-19  Martin Sebor  <msebor@redhat.com>
299         PR tree-optimization/84047
300         PR tree-optimization/83776
301         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
302         (check_array_bounds): Call it.
304 2018-07-19  Martin Sebor  <msebor@redhat.com>
306         * align.h (align_flags): Use member initialization.
308 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
310         * Makefile.in (OBJS): Add optinfo.o.
311         * coretypes.h (class symtab_node): New forward decl.
312         (struct cgraph_node): New forward decl.
313         (class varpool_node): New forward decl.
314         * dump-context.h: New file.
315         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
316         "tree-pass.h".
317         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
318         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
319         (set_alt_dump_file): Likewise.
320         (dump_context::~dump_context): New dtor.
321         (dump_gimple_stmt): Move implementation to...
322         (dump_context::dump_gimple_stmt): ...this new member function.
323         Add the stmt to any pending optinfo, creating one if need be.
324         (dump_gimple_stmt_loc): Move implementation to...
325         (dump_context::dump_gimple_stmt_loc): ...this new member function.
326         Start a new optinfo and add the stmt to it.
327         (dump_gimple_expr): Move implementation to...
328         (dump_context::dump_gimple_expr): ...this new member function.
329         Add the stmt to any pending optinfo, creating one if need be.
330         (dump_gimple_expr_loc): Move implementation to...
331         (dump_context::dump_gimple_expr_loc): ...this new member function.
332         Start a new optinfo and add the stmt to it.
333         (dump_generic_expr): Move implementation to...
334         (dump_context::dump_generic_expr): ...this new member function.
335         Add the tree to any pending optinfo, creating one if need be.
336         (dump_generic_expr_loc): Move implementation to...
337         (dump_context::dump_generic_expr_loc): ...this new member
338         function.  Add the tree to any pending optinfo, creating one if
339         need be.
340         (dump_printf): Move implementation to...
341         (dump_context::dump_printf_va): ...this new member function.  Add
342         the text to any pending optinfo, creating one if need be.
343         (dump_printf_loc): Move implementation to...
344         (dump_context::dump_printf_loc_va): ...this new member function.
345         Start a new optinfo and add the stmt to it.
346         (dump_dec): Move implementation to...
347         (dump_context::dump_dec): ...this new member function.  Add the
348         value to any pending optinfo, creating one if need be.
349         (dump_context::dump_symtab_node): New member function.
350         (dump_context::get_scope_depth): New member function.
351         (dump_context::begin_scope): New member function.
352         (dump_context::end_scope): New member function.
353         (dump_context::ensure_pending_optinfo): New member function.
354         (dump_context::begin_next_optinfo): New member function.
355         (dump_context::end_any_optinfo): New member function.
356         (dump_context::s_current): New global.
357         (dump_context::s_default): New global.
358         (dump_scope_depth): Delete global.
359         (dumpfile_ensure_any_optinfo_are_flushed): New function.
360         (dump_symtab_node): New function.
361         (get_dump_scope_depth): Reimplement in terms of dump_context.
362         (dump_begin_scope): Likewise.
363         (dump_end_scope): Likewise.
364         (selftest::temp_dump_context::temp_dump_context): New ctor.
365         (selftest::temp_dump_context::~temp_dump_context): New dtor.
366         (selftest::verify_item): New function.
367         (ASSERT_IS_TEXT): New macro.
368         (ASSERT_IS_TREE): New macro.
369         (ASSERT_IS_GIMPLE): New macro.
370         (selftest::test_capture_of_dump_calls): New test.
371         (selftest::dumpfile_c_tests): Call it.
372         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
373         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
374         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
375         descriptive comment.
376         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
377         (dump_node, dump_bb): Move these unrelated decls.
378         (class dump_manager): Add leading comment.
379         * optinfo.cc: New file.
380         * optinfo.h: New file.
382 2018-07-19  Michael Collison  <michael.collison@arm.com>
383             Richard Henderson <rth@redhat.com>
385         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
386         (subti): Handle op1 zero.
387         (subvti4, usub4ti4): New.
388         (*sub<GPI>3_compare1_imm): New.
389         (sub<GPI>3_carryinCV): New.
390         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
391         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
393 2018-07-19  Michael Collison  <michael.collison@arm.com>
394             Richard Henderson <rth@redhat.com>
396         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
397         (addti3): Create simpler code if low part is already known to be 0.
398         (addvti4, uaddvti4): New.
399         (*add<GPI>3_compareC_cconly_imm): New.
400         (*add<GPI>3_compareC_cconly): New.
401         (*add<GPI>3_compareC_imm): New.
402         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
403         handle constants within this pattern..
404         (*add<GPI>3_compareV_cconly_imm): New.
405         (*add<GPI>3_compareV_cconly): New.
406         (*add<GPI>3_compareV_imm): New.
407         (add<GPI>3_compareV): New.
408         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
409         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
410         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
411         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
412         with 'comparison' operator.
413         (*add<GPI>3_compareV_cconly_imm): Ditto.
414         (*add<GPI>3_compareV_cconly): Ditto.
415         (*add<GPI>3_compareV_imm): Ditto.
416         (add<GPI>3_compareV): Ditto.
417         (add<mode>3_carryinC): Ditto.
418         (*add<mode>3_carryinC_zero): Ditto.
419         (*add<mode>3_carryinC): Ditto.
420         (add<mode>3_carryinV): Ditto.
421         (*add<mode>3_carryinV_zero): Ditto.
422         (*add<mode>3_carryinV): Ditto.
424 2018-07-19  Michael Collison  <michael.collison@arm.com>
425             Richard Henderson <rth@redhat.com>
427         * config/aarch64/aarch64-modes.def (CC_V): New.
428         * config/aarch64/aarch64-protos.h
429         (aarch64_addti_scratch_regs): Declare
430         (aarch64_subvti_scratch_regs): Declare.
431         (aarch64_expand_subvti): Declare.
432         (aarch64_gen_unlikely_cbranch): Declare
433         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
434         for signed overflow using CC_Vmode.
435         (aarch64_get_condition_code_1): Handle CC_Vmode.
436         (aarch64_gen_unlikely_cbranch): New function.
437         (aarch64_addti_scratch_regs): New function.
438         (aarch64_subvti_scratch_regs): New function.
439         (aarch64_expand_subvti): New function.
441 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
443         * config/aarch64/aarch64-option-extensions.def: New entry for profile
444         extension.
445         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
446         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
447         extension.
449 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
451         PR target/83009
452         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
453         address check not strict.
455 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
457         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
458         Umq with Umn.
459         (store_pair_lanes<mode>): Likewise.
460         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
461         enum value 'ADDR_QUERY_LDP_STP_N'.
462         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
463         (aarch64_print_address_internal): Add declaration.
464         (aarch64_print_ldpstp_address): Remove.
465         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
466         (aarch64_print_operand): Change printing of 'y'.
467         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
468         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
469         'true' rather than '1'.
470         * config/aarch64/constraints.md (Uml): Likewise.
471         (Uml): Rename to Umn.
472         (Umq): Remove.
474 2018-07-19  Richard Biener  <rguenther@suse.de>
476         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
477         a trailing array.
478         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
479         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
480         (vn_reference_hasher): Likewise.
481         (struct vn_tables_s): Remove obstack and alloc-pool members.
482         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
483         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
484         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
485         (vn_reference_insert_pieces): Likewise.
486         (alloc_vn_nary_op_noinit): Adjust.
487         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
488         (vn_phi_eq): Adjust.
489         (shared_lookup_phiargs): Remove.
490         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
491         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
492         (visit_reference_op_call): Likewise.
493         (copy_nary, copy_phi, copy_reference): Remove.
494         (process_scc): Rewind the obstack when iterating.  Do not
495         copy the elements to valid_info but just move them from one
496         hashtable to the other.
497         (allocate_vn_table): Adjust.
498         (free_vn_table): Likewise.
499         (init_scc_vn): Likewise.
500         (free_scc_vn): Likewise.
502 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
504         PR target/86560
505         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
506         indirect_return as function type attribute.
507         (ix86_attribute_table): Change indirect_return to function
508         type attribute.
509         * doc/extend.texi: Update indirect_return attribute.
511 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
513         * wide-int.h (widest2_int): New.
514         * gimple-fold.c (arith_overflowed_p): Use it.
515         * tree.h (widest2_int_cst): New.
516         * tree-vrp.c (wide_int_binop_overflow): Rename from
517         vrp_int_const_binop.
518         Rewrite to work on trees.
519         (extract_range_from_multiplicative_op_1): Abstract code to...
520         (wide_int_range_min_max): ...here.
521         (wide_int_range_cross_product): ...and here.
522         (extract_range_from_binary_expr_1): Abstract overflow code to...
523         (wide_int_range_mult_wrapping): ...here.
524         * tree-vrp.h (wide_int_range_cross_product): New.
525         (wide_int_range_mult_wrapping): New.
527 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
528             Julia Koval  <julia.koval@intel.com>
530         * config/i386/x86-tune-costs.h (skylake_memcpy,
531         skylake_memset): Replace rep_prefix with unrolling for size 512.
533 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
535         PR middle-end/86544
536         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
537         in last stmt.
539 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
541         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
542         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
543         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
544         previously known as "PowerPC AltiVec Built-in Functions".  Move
545         some material to new subsubsections "PowerPC AltiVec Built-in
546         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
547         ISA 2.07".
548         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
549         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
550         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
551         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
553 2018-07-18  Richard Biener  <rguenther@suse.de>
555         PR tree-optimization/86557
556         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
557         EXACT_DIV_EXPR.
559 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
561         * config/s390/s390.c (s390_function_profiler): Generate CFI.
563 2018-07-17  Jeff Law  <law@redhat.com>
565         * config/arm/arm.c (get_label_padding): Update for recent
566         changes to label_to_alignment.
568         PR tree-optimization/86010
569         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
571         * config/mips/mips.c (vr4130_align_insns): Update for recent
572         changes to label_to_alignment.
574         * config/frv/frv.c (frv_label_align): Update for recent changes
575         to label_to_alignment.
577         * config/nios2/nios2.c (nios2_label_align): Update for recent
578         changes which dropped ALIGN_LABELS_LOG.
580 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
582         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
583         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
585 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
587         * config/arc/arc.c (arc_label_align): Use align_labels instead of
588         deprecated align_labels_log.
590 2018-07-17  Richard Biener  <rguenther@suse.de>
592         PR lto/86456
593         * dwarf2out.c (init_sections_and_labels): Always generate
594         a debug_line_str_section for early LTO debug.
595         (dwarf2out_finish): Reset debug_line_str_hash output early.
596         Bump counter for extra dwarf5 .debug_loc labels to not conflict
597         with fat LTO part.
598         (dwarf2out_early_finish): Output debug_line_str.
600 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
602         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
603         index register on z196 or later.
605 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
607         * config/s390/s390.c (s390_default_align): Set default function
608         alignment to 16.
609         (s390_override_options_after_change): Call s390_default align.
610         (s390_option_override_internal): Call s390_default_align.
611         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
613 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
615         PR middle-end/86542
616         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
617         to _looptemp_ clauses, other than the first two.
619 2018-07-17  Martin Liska  <mliska@suse.cz>
621         * opts.c: Do not enable OPT_falign_* for -Os.
623 2018-07-17  Martin Liska  <mliska@suse.cz>
625         * align.h (MAX_CODE_ALIGN): New.
626         (MAX_CODE_ALIGN_VALUE): New.
627         * common/config/i386/i386-common.c (ix86_handle_option):
628         (MAX_CODE_ALIGN): Moved to align.h.
629         * final.c (MAX_CODE_ALIGN): Likewise.
630         * opts.c (parse_and_check_align_values):
631         (MAX_CODE_ALIGN): Likewise.
632         (MAX_CODE_ALIGN_VALUE): Likewise.
634 2018-07-17  Martin Liska  <mliska@suse.cz>
636         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
637         in order to fulfil coding style.
638         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
639         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
640         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
641         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
642         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
643         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
644         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
645         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
646         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
648 2018-07-17  Martin Liska  <mliska@suse.cz>
650         * align.h: New file.
651         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
652         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
653         align_flags of label_to_alignment.
654         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
655         class.
656         * config/m68k/m68k.c: Do not use removed align_labels_value and
657         align_loops_value.
658         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
659         (LOOP_ALIGN): Likewise.
660         (LABEL_ALIGN): Likewise.
661         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
662         Remove not used macro.
663         (rs6000_loop_align): Change return type to align_flags.
664         (rs6000_loop_align_max_skip): Remove.
665         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
666         Change return type to align_flags.
667         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
668         Remove not used macro.
669         (rs6000_loop_align):  Change return type to align_flags.
670         (rs6000_loop_align_max_skip): Remove.
671         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
672         * config/rx/rx-protos.h (rx_align_for_label): Make it
673         static function.
674         * config/rx/rx.c (rx_align_for_label): Change return type
675         to align_flags.
676         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
677         macro definitions.
678         into align_flags class.
679         (LABEL_ALIGN): Likewise.
680         (LOOP_ALIGN): Likewise.
681         * config/s390/s390.c (s390_label_align): Use align_flags
682         class member.
683         (s390_asm_output_function_label): Likewise.
684         * config/sh/sh.c (sh_override_options_after_change):
685         Use align_flags class directly without macros.
686         (find_barrier): Likewise.
687         (barrier_align): Likewise.
688         (sh_loop_align): Likewise.
689         * config/spu/spu.c (spu_option_override):
690         Use align_flags_tuple::get_value instead of removed macros.
691         (spu_sched_init): Likewise.
692         * config/spu/spu.h (GTY): Likewise.
693         * config/visium/visium.c (visium_option_override):
694         Set "8" as default secondary alignment.
695         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
696         in order to guarantee secondary alignment of 8.
697         * coretypes.h: Include align.h header file.
698         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
699         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
700         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
701         * doc/tm.texi.in: Likewise.
702         * final.c (struct label_alignment): Remove not used structure.
703         (LABEL_ALIGN): Change type to align_flags.
704         (LOOP_ALIGN): Likewise.
705         (JUMP_ALIGN): Likewise.
706         (default_loop_align_max_skip): Remove.
707         (default_label_align_max_skip): Likewise.
708         (default_jump_align_max_skip): Likewise.
709         (default_label_align_after_barrier_max_skip):
710         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
711         (LABEL_TO_MAX_SKIP): Remove.
712         (label_to_alignment): Return align_flags type instead of integer.
713         (label_to_max_skip): Remove.
714         (align_fuzz): Use align_flags type.
715         (compute_alignments): Use align_flags type and use align_flags::max
716         to combine multiple alignments.
717         (grow_label_align): Grow vec instead of C array.
718         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
719         (shorten_branches):  Use align_flags type and use align_flags::max
720         to combine multiple alignments.
721         (final_scan_insn_1): Remove usage of secondary alignment that comes
722         from label alignment, but instead use proper secondary alignment
723         which is computed in grow_label_align.
724         * flags.h (struct align_flags_tuple): Move to align.h.
725         (struct align_flags): Likewise.
726         (state_align_loops): Rename to align_loops.
727         (state_align_jumps): Rename to align_jumps.
728         (state_align_labels): Rename to align_labels.
729         (state_align_functions): Rename to align_functions.
730         (align_loops_log): Remove.
731         (align_jumps_log): Remove.
732         (align_labels_log): Remove.
733         (align_functions_log): Remove.
734         (align_loops_max_skip): Remove.
735         (align_jumps_max_skip): Remove.
736         (align_labels_max_skip): Remove.
737         (align_functions_max_skip): Remove.
738         (align_loops_value): Remove.
739         (align_jumps_value): Remove.
740         (align_labels_value): Remove.
741         (align_functions_value): Remove.
742         * output.h (label_to_alignment): Change return type to align_flags.
743         (label_to_max_skip): Remove.
744         * target.def: Remove loop_align_max_skip, label_align_max_skip,
745         jump_align_max_skip macros.
746         * targhooks.h (default_loop_align_max_skip): Remove.
747         (default_label_align_max_skip): Likewise.
748         (default_jump_align_max_skip): Likewise.
749         (default_label_align_after_barrier_max_skip): Remove.
750         * toplev.c (read_log_maxskip): Use ::normalize function.
751         (parse_N_M): Remove not used argument and also call ::normalize.
752         (parse_alignment_opts): Do not pass unused arguments.
753         * varasm.c (assemble_start_function): Use directly align_functions
754         instead of removed macros.
755         * system.h: Do not poison removed macros.
757 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
759         PR middle-end/86539
760         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
761         and cond temporaries don't have reference type if iterator has
762         pointer type.  For init use &for_pre_body instead of pre_p if
763         for_pre_body is non-empty.
765 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
767         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
768         double-double modes to SFmode directly directly.
769         (trunc<mode>sf2_fprs): Delete.
771 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
773         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
774         for conversions between IFmode and the decimal floating point modes.
775         (init_float128_ieee): Use the correct names for conversions between
776         KFmode and the decimal floating point modes.
778 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
780         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
781         for the conversions between TDmode and IFmode.
782         (init_float128_ieee): Use more correct names for the conversions
783         between TDmode and KFmode.
785 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
787         PR tree-optimization/86526
788         * builtins.c (expand_builtin_memcmp): Formatting fixes.
789         (inline_expand_builtin_string_cmp): Likewise.
790         (inline_string_cmp): Likewise.  Use c_readstr instead of
791         builtin_memcpy_read_str.  Add unit_mode temporary.
793 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
795         PR middle-end/86528
796         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
797         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
799 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
801         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
802         Alphabetize prototypes of built-in functions, separating out
803         built-in functions that are listed in this section but should be
804         described elsewhere.
806 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
808         PR target/86511
809         * expmed.c (emit_store_flag): Do not emit setcc followed by a
810         conditional move when trapping comparison was split to a
811         non-trapping one (and vice versa).
813 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
815         * config/s390/s390.c (s390_function_profiler): Generate nops
816         instead of profiler call sequences.
817         * config/s390/s390.opt: Add the new option.
819 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
821         * config/s390/s390.c (s390_function_profiler): Generate
822         __mcount_loc section.
823         * config/s390/s390.opt: Add the new option.
825 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
827         * common.opt: Add the new warning.
828         * config/s390/s390.c (s390_function_profiler): Emit "brasl
829         %r0,__fentry__" when -mfentry is specified.
830         (s390_option_override_internal): Disallow -mfentry for 31-bit
831         CPUs.
832         * config/s390/s390.opt: Add the new option.
834 2018-07-16  Richard Biener  <rguenther@suse.de>
836         PR lto/86523
837         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
838         for function-local FUNCTION_DECL and RESULT_DECL immediately.
840 2018-07-16  Martin Liska  <mliska@suse.cz>
842         PR ipa/86529
843         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
844         to ::get_create.
846 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
848         * config/arc/arcHS.md: Update ARCHS scheduling rules.
850 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
852         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
853         for ARCHS4x.
854         * config/arc/arc-cpus.def (hs4x): New cpu.
855         (hs4xd): Likewise.
856         * config/arc/arc-tables.opt: Regenerate.
857         * config/arc/arc.c (arc_sched_issue_rate): New function.
858         (TARGET_SCHED_ISSUE_RATE): Define.
859         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
860         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
861         fpu_cvt.
862         (attr tune): Add ARCHS4x tune values.
863         (attr tune_dspmpy): Define.
864         (*tst): Correct instruction type.
865         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
866         * config/arc/arcHS4x.md: New file.
867         * config/arc/fpu.md: Update instruction type attributes.
868         * config/arc/t-multilib: Regenerate.
870 2018-07-16  Tom de Vries  <tdevries@suse.de>
872         PR debug/86455
873         * var-tracking.c (vt_initialize): Fix pre_dec handling.
875 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
877         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
878         early clobber.
880 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
882         PR tree-optimization/86514
883         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
884         conversion to a boolean type from a type with greater precision.
886 2018-07-16  Tom de Vries  <tdevries@suse.de>
888         * var-tracking.c (vt_initialize): Print adjusted insn slim if
889         dump_flags request TDF_SLIM.
891 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
893         * fold-const.c (int_const_binop_1): Abstract...
894         (wide_int_binop): ...wide int code here.
895         (poly_int_binop): ...poly int code here.
896         Abstract the rest of int_const_binop_1 into int_const_binop.
897         * fold-const.h (wide_int_binop): New.
898         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
899         Remove useless PLUS/MINUS_EXPR case.
900         (zero_nonzero_bits_from_vr): Move wide int code...
901         (zero_nonzero_bits_from_bounds): ...here.
902         (extract_range_from_binary_expr_1): Move mask optimization code...
903         (range_easy_mask_min_max): ...here.
904         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
905         (range_easy_mask_min_max): New.
907 2018-07-15  Jeff Law  <law@redhat.com>
909         PR target/85993
910         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
911         block.
913 2018-07-14  Jim Wilson  <jimw@sifive.com>
915         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
917 2018-07-14  Paul Koning  <ni1d@arrl.net>
919         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
921 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
923         * lto-streamer-out.c (copy_function_or_variable): Dump info about
924         copying section.
926 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
927             Steve Munroe  <munroesj52@gmail.com>
929         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
930         (_mm_andnot_si128): Likewise.
931         (_mm_or_si128): Likewise.
932         (_mm_xor_si128): Likewise.
934 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
936         PR middle-end/78809
937         * builtins.c (expand_builtin_memcmp): Inline the calls first
938         when result_eq is false.
939         (expand_builtin_strcmp): Inline the calls first.
940         (expand_builtin_strncmp): Likewise.
941         (inline_string_cmp): New routine. Expand a string compare
942         call by using a sequence of char comparison.
943         (inline_expand_builtin_string_cmp): New routine. Inline expansion
944         a call to str(n)cmp/memcmp.
945         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
946         New option.
947         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
949 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
951         * config/arm/driver-arm.c: Include arm-native.h.
952         (host_detect_local_cpu): Use auto-generated data tables.
953         (vendors, arm_cpu_table): Delete.  Move part information to ...
954         * config/arm/arm-cpus.in: ... here.
955         * config/arm/parsecpu.awk (gen_native): New function.
956         (vendor, part): New CPU fields.
957         (END): Add support for building the native CPU detection tables.
958         * config/arm/t-arm (arm-native.h): Add build rule.
959         (driver-arm.o): Add dependency on arm-native.h.
961 2018-07-13  Richard Biener  <rguenther@suse.de>
963         PR middle-end/85974
964         * match.pd (addr1 - addr2): Allow either of the operand to
965         have a conversion.
967 2018-07-13  Tom de Vries  <tdevries@suse.de>
969         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
970         in remap_ssa_name.
972 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
974         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
975         arrays instead of numbered variables.
977 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
979         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
980         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
982 2018-07-13  Richard Biener  <rguenther@suse.de>
984         PR debug/86452
985         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
986         instead of get_context_die.
988 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
989             Richard Biener  <rguenther@suse.de>
991         PR middle-end/86489
992         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
993         that the loop latch destination where phi is defined.
995 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
997         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
998         (riscv_expand_epilogue): Add assertion to check interrupt mode.
999         (riscv_set_current_function): Extract getting interrupt type to new
1000         function.
1001         (riscv_get_interrupt_type): New function.
1002         (riscv_merge_decl_attributes): New function, checking interrupt type is
1003         same.
1004         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
1006 2018-07-12  Paul Koning  <ni1d@arrl.net>
1008         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
1009         directive.
1011 2018-07-12  Paul Koning  <ni1d@arrl.net>
1013         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
1014         zero reference, add doloop_end instead.
1015         * doc/md.texi (decrement_and_branch_until_zero): Remove.
1016         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
1017         detail for doloop_end.
1019 2018-07-12  Martin Sebor  <msebor@redhat.com>
1021         PR c/86453
1022         * attribs.c (decl_attributes): Reject conflicting attributes before
1023         calling attribute handlers.
1025 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
1027         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
1028          parameter.
1029         (gcc::dump_manager::get_dump_file_name): likewise.
1030         (dump_begin): Likewise.
1031         * dumpfile.h (dump_begin): Update prototype.
1032         (gcc::dump_manager::get_dump_file_name,
1033         gcc::dump_manager::get_dump_file_name): Update prototype.
1035 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1037         * internal-fn.h (vectorizable_internal_fn_p): New function.
1038         * tree-vect-slp.c (compatible_calls_p): Likewise.
1039         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
1040         to internal functions.
1041         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
1043 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1045         * fold-const.h (inverse_conditions_p): Declare.
1046         * fold-const.c (inverse_conditions_p): New function.
1047         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
1048         that test the inverse condition of a conditional internal function.
1049         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
1050         * internal-fn.c (internal_fn_mask_index): Handle conditional
1051         internal functions.
1052         (vectorized_internal_fn_supported_p): New function.
1053         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
1054         (any_pred_load_store): Replace with...
1055         (need_to_predicate): ...this new variable.
1056         (redundant_ssa_names): New variable.
1057         (ifcvt_can_use_mask_load_store): Move initial checks to...
1058         (ifcvt_can_predicate): ...this new function.  Handle tree codes
1059         for which a conditional internal function exists.
1060         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
1061         instead of ifcvt_can_use_mask_load_store.  Update after variable
1062         name change.
1063         (predicate_load_or_store): New function, split out from
1064         predicate_mem_writes.
1065         (check_redundant_cond_expr): New function.
1066         (value_available_p): Likewise.
1067         (predicate_rhs_code): Likewise.
1068         (predicate_mem_writes): Rename to...
1069         (predicate_statements): ...this.  Use predicate_load_or_store
1070         and predicate_rhs_code.
1071         (combine_blocks, tree_if_conversion): Update after above name changes.
1072         (ifcvt_local_dce): Handle redundant_ssa_names.
1073         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
1074         general conditional functions.
1075         * tree-vect-stmts.c (vectorizable_call): Likewise.
1077 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1078             Alan Hayward  <alan.hayward@arm.com>
1079             David Sherwood  <david.sherwood@arm.com>
1081         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
1082         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
1083         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
1084         plus and minus and convert them into IFN_COND_FMA-based sequences.
1085         (convert_mult_to_fma): Handle conditional plus and minus.
1087 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1089         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
1090         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
1091         (cond_fnms_optab): New optabs.
1092         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
1093         internal functions.
1094         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
1095         * internal-fn.h (get_conditional_internal_fn): Declare.
1096         (get_unconditional_internal_fn): Likewise.
1097         * internal-fn.c (cond_ternary_direct): New macro.
1098         (expand_cond_ternary_optab_fn): Likewise.
1099         (direct_cond_ternary_optab_supported_p): Likewise.
1100         (FOR_EACH_COND_FN_PAIR): Likewise.
1101         (get_conditional_internal_fn): New function.
1102         (get_unconditional_internal_fn): Likewise.
1103         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
1104         (gimple_match_op::gimple_match_op): Add a new overload for 5
1105         operands.
1106         (gimple_match_op::set_op): Likewise.
1107         (gimple_resimplify5): Declare.
1108         * genmatch.c (decision_tree::gen): Generate simplifications for
1109         5 operands.
1110         * gimple-match-head.c (gimple_simplify): Define an overload for
1111         5 operands.  Handle calls with 5 arguments in the top-level overload.
1112         (convert_conditional_op): Handle conversions from unconditional
1113         internal functions to conditional ones.
1114         (gimple_resimplify5): New function.
1115         (build_call_internal): Pass a fifth operand.
1116         (maybe_push_res_to_seq): Likewise.
1117         (try_conditional_simplification): Try converting conditional
1118         internal functions to unconditional internal functions.
1119         Handle 3-operand unconditional forms.
1120         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
1121         Define ternary equivalents of the current rules for binary conditional
1122         internal functions.
1123         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
1124         ternary operations.
1125         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
1126         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
1127         (optab): Handle them.
1128         (SVE_COND_FP_TERNARY): New int iterator.
1129         (sve_fmla_op, sve_fmad_op): New int attributes.
1130         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
1131         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
1132         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
1134 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1136         * target.def (preferred_else_value): New target hook.
1137         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1138         * doc/tm.texi: Regenerate.
1139         * targhooks.h (default_preferred_else_value): Declare.
1140         * targhooks.c (default_preferred_else_value): New function.
1141         * internal-fn.h (conditional_internal_fn_code): Declare.
1142         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1143         (get_conditional_internal_fn): Use it.
1144         (conditional_internal_fn_code): New function.
1145         * gimple-match.h (gimple_match_cond): New struct.
1146         (gimple_match_op): Add a cond member function.
1147         (gimple_match_op::gimple_match_op): Update all forms to take a
1148         gimple_match_cond.
1149         * genmatch.c (expr::gen_transform): Use the same condition as res_op
1150         for the suboperation, but don't specify a particular else_value.
1151         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
1152         (visit_nary_op, visit_reference_op_load): Pass
1153         gimple_match_cond::UNCOND to the gimple_match_op constructor.
1154         * gimple-match-head.c: Include tree-eh.h
1155         (convert_conditional_op): New function.
1156         (maybe_resimplify_conditional_op): Likewise.
1157         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
1158         (gimple_resimplify2): Likewise.
1159         (gimple_resimplify3): Likewise.
1160         (gimple_resimplify4): Likewise.
1161         (maybe_push_res_to_seq): Return null for conditional operations.
1162         (try_conditional_simplification): New function.
1163         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
1164         constructor.
1165         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
1166         IFN_COND_* call.
1167         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
1168         function.
1169         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
1171 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
1173         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1174         DECL_FCONTEXT
1175         (hash_tree): Do not hash DECL_FCONTEXT
1176         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
1177         Do not stream DECL_FCONTEXT.
1178         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
1179         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
1181 2018-07-12  Richard Biener  <rguenther@suse.de>
1183         PR debug/86462
1184         * dwarf2out.c (gen_block_die): Only output blocks when they have
1185         at least one !DECL_IGNORED_P variable.
1187 2018-07-12  Richard Biener  <rguenther@suse.de>
1189         PR target/84829
1190         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
1191         Remove -mieee-fp handling.
1193 2018-07-12  Richard Biener  <rguenther@suse.de>
1195         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
1196         left-over from last patch.
1198 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
1200         PR tree-optimization/86492
1201         * gimple-ssa-store-merging.c
1202         (imm_store_chain_info::coalesce_immediate_stores): Call
1203         check_no_overlap even for the merge_overlapping case.  Formatting fix.
1205 2018-07-12  Richard Biener  <rguenther@suse.de>
1207         PR middle-end/86479
1208         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
1209         move possibly trapping operations into the conditional.
1211 2018-07-12  Richard Biener  <rguenther@suse.de>
1213         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
1214         (vn_lookup_simplify_result): Remove recursion limit applied
1215         here.
1216         (vn_nary_build_or_lookup_1): Adjust.
1217         (try_to_simplify): Likewise.
1218         * gimple-match-head.c (gimple_resimplify1): Instead apply one
1219         here.
1220         (gimple_resimplify2): Likewise.
1221         (gimple_resimplify3): Likewise.
1222         (gimple_resimplify4): Likewise.
1224 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
1226         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
1227         Use __mmask64 type instead of __mmask8 for __M argument.
1228         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
1229         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
1230         __U argument.
1231         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
1232         __mmask16 for __M argument.
1233         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
1234         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
1235         to __mmask16 instead of __mmask8.
1236         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
1237         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
1238         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
1239         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
1240         instead of __mmask16 for __U argument.
1241         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
1242         __mmask16 instead of __mmask8 for __U argument.
1243         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
1244         __U argument.
1245         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
1246         __mmask16.
1247         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
1248         argument.
1249         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
1250         __U argument.
1251         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
1252         __mmask16.
1253         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
1254         of __mmask16.
1255         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
1256         __U argument.
1257         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
1258         __U argument.
1259         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
1260         __U argument.
1261         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
1262         __U argument.
1263         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
1264         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
1265         return type as well as __M argument type and all casts from __mmask8
1266         to __mmask32.
1267         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
1268         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
1269         return type as well as __M argument type and all casts from __mmask8
1270         to __mmask16.
1271         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
1272         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
1273         return type as well as __M argument type and all casts from __mmask8
1274         to __mmask32.
1275         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
1276         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
1277         return type as well as __M argument type and all casts from __mmask8
1278         to __mmask16.
1279         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
1280         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
1281         __mmask16.
1283 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
1285         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
1286         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
1287         for __U argument.
1289 2018-07-11  Paul Koning  <ni1d@arrl.net>
1291         * doc/md.texi (define_subst): Document how multiple occurrences of
1292         the same argument in the replacement pattern are handled.
1294 2018-07-11  Paul Koning  <ni1d@arrl.net>
1296         * doc/extend.texi (Common Variable Attributes): Move "mode" into
1297         alphabetical order.
1298         (Common Type Attributes): Add "mode" attribute.
1300 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
1302         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
1303         stream DECL_ORIGINAL_TYPE.
1304         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
1305         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
1306         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
1307         Do not walk original type.
1308         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
1309         external decls.
1310         (write_ts_decl_non_common_tree_pointers): Do not stream
1311         DECL_ORIGINAL_TYPE
1312         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
1313         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
1315 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
1317         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
1318         thread twice from the same starting edge.
1320 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
1322         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
1323         * gimple.c (gimple_call_nonnull_result_p): ...here...
1324         (gimple_call_nonnull_arg): ...and here.
1325         * gimple.h (gimple_call_nonnull_result_p): New.
1326         (gimple_call_nonnull_arg): New.
1328 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
1330         * config/arm/arm-cpus.in: Move information from fpu field of each
1331         cpu definition to the isa field.
1332         * config/arm/parsecpu.awk (fpu): Delete match rule.
1333         (gen_comm_data): Don't add bits from the CPU's FPU entry.
1335 2018-07-11  Richard Biener  <rguenther@suse.de>
1337         PR debug/86457
1338         * dwarf2out.c (init_sections_and_labels): Use
1339         output_asm_line_debug_info consistently.
1340         (dwarf2out_early_finish): Likewise.
1341         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
1342         type units.
1344 2018-07-11  Richard Biener  <rguenther@suse.de>
1346         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
1347         Rework father_bb setting in a way to avoid propagating constants
1348         multiple times on a loop body.
1350 2018-07-10  Mark Wielaard  <mark@klomp.org>
1352         PR debug/86459
1353         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
1355 2018-07-10  Richard Biener  <rguenther@suse.de>
1357         * hash-map.h (hash_map::iterator::operator*): Return
1358         references to key and value.
1360 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
1362         PR c++/86443
1363         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
1364         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
1365         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
1366         (gimplify_omp_for): For composite loops, move outer
1367         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
1368         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
1369         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
1370         TREE_LIST for both the original class iterator and the "last" helper
1371         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
1372         loop, remember has_decl_expr from outer composite loops for the
1373         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
1375 2018-07-09  Martin Sebor  <msebor@redhat.com>
1377         PR middle-end/77357
1378         PR middle-end/86428
1379         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
1380         accessing implicitly initialized array elements.
1381         * expr.c (string_constant): Handle string initializers of
1382         character arrays within aggregates.
1383         * gimple-fold.c (fold_array_ctor_reference): Add argument.
1384         Store element offset.  As a special case, handle zero size.
1385         (fold_nonarray_ctor_reference): Same.
1386         (fold_ctor_reference): Add argument.  Store subobject offset.
1387         * gimple-fold.h (fold_ctor_reference): Add argument.
1389 2018-07-09  Paul Koning  <ni1d@arrl.net>
1391         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
1392         (pdp11_insn_cost): New function.
1393         (pdp11_md_asm_adjust): New function.
1394         (TARGET_INVALID_WITHIN_DOLOOP): Define.
1395         (pdp11_rtx_costs): Update to match machine better.
1396         (output_addr_const_pdp11): Correct format mismatch warnings.
1397         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
1398         * config/pdp11/pdp11.md: General change to add base_cost and/or
1399         length attributes for use by new pdp11_insn_cost function.
1400         (MIN_BRANCH): Correct definition.
1401         (MIN_SOB): Ditto.
1402         (doloop_end): Use standard pattern name for looping pattern.
1403         (doloop_end_nocc): New.
1404         (movsf): Add another constraint alternative.
1405         (zero_extendqihi2): Add constraint alternatives for not in place
1406         extend.
1407         (zero_extendhisi2): Remove.
1408         (shift patterns): Add CC handling variants.
1409         (bswaphi2): New.
1410         (bswapsi2): New.
1411         (rothi3): New.
1412         (define_peephole2): New peephole to recognize mov that sets CC for
1413         subsequent test.
1415 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1417         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
1418         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
1419         wi::add.
1421 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
1423         PR c/86420
1424         * real.c (real_nextafter): Return true if result is denormal.
1426 2018-07-09  Martin Liska  <mliska@suse.cz>
1428         * common.opt: Add back wrongly removed attribute.
1430 2018-07-09  Richard Biener  <rguenther@suse.de>
1432         PR debug/86413
1433         * dwarf2out.c (gen_block_die): For an early generated DIE
1434         always output high/low PC attributes.
1436 2018-07-09  Tom de Vries  <tdevries@suse.de>
1438         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
1439         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
1440         onto VAR_DECL with abstract origin.
1442 2018-07-07  Jim Wilson  <jimw@sifive.com>
1444         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
1446 2018-07-07  Tom de Vries  <tdevries@suse.de>
1448         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
1450 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
1452         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
1453         overflow_type.
1454         (combine_bound): Use wide-int overflow calculation instead of
1455         rolling our own.
1456         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
1457         overflow_type.
1458         * fold-const.c (int_const_binop_2): Same.
1459         (extract_muldiv_1): Same.
1460         (fold_div_compare): Same.
1461         (fold_abs_const): Same.
1462         * match.pd: Same.
1463         * poly-int.h (add): Same.
1464         (sub): Same.
1465         (neg): Same.
1466         (mul): Same.
1467         * predict.c (predict_iv_comparison): Same.
1468         * profile-count.c (slow_safe_scale_64bit): Same.
1469         * simplify-rtx.c (simplify_const_binary_operation): Same.
1470         * tree-chrec.c (tree_fold_binomial): Same.
1471         * tree-data-ref.c (split_constant_offset_1): Same.
1472         * tree-if-conv.c (idx_within_array_bound): Same.
1473         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
1474         * tree-ssa-phiopt.c (minmax_replacement): Same.
1475         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
1476         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
1477         * vr-values.c (vr_values::adjust_range_with_scev): Same.
1478         * wide-int.cc (wi::add_large): Same.
1479         (wi::mul_internal): Same.
1480         (wi::sub_large): Same.
1481         (wi::divmod_internal): Same.
1482         * wide-int.h: Change overflow type to overflow_type for neg, add,
1483         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
1484         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
1485         mul_internal, divmod_internal.
1486         (overflow_type): New enum.
1487         (accumulate_overflow): New.
1489 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
1491         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
1492         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
1494 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
1496         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
1497         argument is checked for zero before entering loop, avoid checking again.
1499 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
1501         * gimplify.h (generic_expr_could_trap_p): Set as global function.
1502         * gimplify.h (generic_expr_could_trap_p): Likwise.
1503         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
1505 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
1507         PR tree-optimization/86401
1508         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
1509         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
1510         (fold_bit_and_mask): ... here.  New helper function for match.pd.
1511         * fold-const.h (fold_bit_and_mask): Declare.
1512         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
1514 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
1516         PR target/86324
1517         * target.def (translate_mode_attribute): New hook.
1518         * targhooks.h (default_translate_mode_attribute): Declare.
1519         * targhooks.c (default_translate_mode_attribute): New function.
1520         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
1521         * doc/tm.texi: Regenerate.
1522         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
1523         (rs6000_translate_mode_attribute): New function.
1525 2018-07-06  Paul Koning  <ni1d@arrl.net>
1527         * doc/md.texi (define_split): Document DONE and FAIL.
1528         (define_peephole2): Ditto.
1530 2018-07-05  Jeff Law  <law@redhat.com>
1532         PR tree-optimization/86010
1533         * tree-ssa-dse.c (compute_trims): More aggressively trim at
1534         both the head and tail of mem* and str* calls.
1536 2018-07-05  Jim Wilson  <jimw@sifive.com>
1538         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
1540 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
1542         * config/aarch64/aarch64-simd.md: correct flags text for
1543         MIN_EXPR replacement.
1545 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
1547         * configure: Regenerated.
1549 2018-07-05  Carl Love  <cel@us.ibm.com>
1551         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
1552         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
1553         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
1554         VSX_BUILTIN_DOUBLEL_V4SF.
1556 2018-07-05  Martin Sebor  <msebor@redhat.com>
1558         PR c++/86400
1559         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
1560         than its domain to compute its the upper bound of a char array.
1562 2018-07-05  Nathan Sidwell  <nathan@acm.org>
1564         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
1565         * doc/cpp.texi: Update comment.
1566         * doc/tm.texi: Rebuilt.
1567         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
1568         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
1569         * doc/extend.texi (Backwards Compatibility): Clarify it is system
1570         headers affected by extern "C".
1571         * system.h: Poison NO_IMPLICIT_EXTERN_C.
1572         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
1573         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
1574         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
1575         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
1576         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
1577         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
1578         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
1579         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
1580         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
1581         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
1582         config/sparc/sp64-elf.h, config/spu/spu.h,
1583         config/stormy16/stormy16.h, config/v850/v850.h,
1584         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
1585         define NO_IMPLICIT_EXTERN_C.
1586         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
1588 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1590         PR target/84711
1591         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1592         instead of GET_MODE_SIZE when comparing Units.
1594 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1596         PR target/84711
1597         * rtlanal.c (set_noop_p): Constrain on mode change,
1598         include hard-reg-set.h
1600 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1602         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
1604 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
1606         Revert
1607         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
1609         PR sanitizer/84250
1610         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1611         libasan.
1612         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1614 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
1616         PR sanitizer/84250
1617         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1618         libasan.
1619         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1621 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
1623         PR middle-end/86380
1624         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
1626 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
1628         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
1629         neg_*_op* variables.
1631 2018-07-04  Martin Liska  <mliska@suse.cz>
1633         * tree-switch-conversion.c: Define
1634         max_ratio_for_speed and max_ratio_for_size constants.
1636 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
1637             Martin Liska  <mliska@suse.cz>
1639         PR middle-end/66240
1640         PR target/45996
1641         PR c/84100
1642         * common.opt: Rename align options with 'str_' prefix.
1643         * common/config/i386/i386-common.c (set_malign_value): New
1644         function.
1645         (ix86_handle_option): Use it to set -falign-* options/
1646         * config/aarch64/aarch64-protos.h (struct tune_params): Change
1647         type from int to string.
1648         * config/aarch64/aarch64.c: Update default values from int
1649         to string.
1650         * config/alpha/alpha.c (alpha_override_options_after_change):
1651         Likewise.
1652         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
1653         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1654         max skip conditionally.
1655         * config/i386/freebsd.h (SUBALIGN_LOG): New.
1656         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1657         max skip conditionally.
1658         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1659         max skip conditionally.
1660         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
1661         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1662         max skip conditionally.
1663         * config/i386/i386.c (struct ptt): Change type from int to
1664         string.
1665         (ix86_default_align): Set default values.
1666         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
1667         max skip conditionally.
1668         * config/i386/iamcu.h (SUBALIGN_LOG): New.
1669         (ASM_OUTPUT_MAX_SKIP_ALIGN):
1670         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
1671         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1672         max skip conditionally.
1673         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
1674         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
1675         * config/i386/x86-64.h (SUBALIGN_LOG): New.
1676         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1677         max skip conditionally.
1678         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1679         * config/ia64/ia64.c (ia64_option_override): Set default values
1680         for alignment options.
1681         * config/m68k/m68k.c: Handle new str_align_* options.
1682         * config/mips/mips.c (mips_set_compression_mode): Change
1683         type of constants.
1684         (mips_option_override): Set default values for options.
1685         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1686         Likewise.
1687         * config/rs6000/rs6000.c (rs6000_option_override_internal):
1688         Likewise.
1689         * config/rx/rx.c (rx_option_override): Likewise.
1690         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
1691         (LABEL_ALIGN): Use align_labels_log.
1692         (LOOP_ALIGN): Use align_loops_align.
1693         * config/s390/s390.c (s390_asm_output_function_label): Use new
1694         macros.
1695         * config/sh/sh.c (sh_override_options_after_change):
1696         Change type of constants.
1697         * config/spu/spu.c (spu_sched_init): Likewise.
1698         * config/sparc/sparc.c (sparc_option_override): Set default
1699         values for options.
1700         * config/visium/visium.c (visium_option_override): Likewise.
1701         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
1702         emit p2align format with last argument if it's not needed.
1703         * doc/invoke.texi: Document extended format of -falign-*.
1704         * final.c: Use align_labels alignment.
1705         * flags.h (struct target_flag_state): Change type to use
1706         align_flags.
1707         (struct align_flags_tuple): New.
1708         (struct align_flags): Likewise.
1709         (align_loops_log): Redefine macro to use new types.
1710         (align_loops_max_skip): Redefine macro to use new types.
1711         (align_jumps_log): Redefine macro to use new types.
1712         (align_jumps_max_skip): Redefine macro to use new types.
1713         (align_labels_log): Redefine macro to use new types.
1714         (align_labels_max_skip): Redefine macro to use new types.
1715         (align_functions_log): Redefine macro to use new types.
1716         (align_loops): Redefine macro to use new types.
1717         (align_jumps): Redefine macro to use new types.
1718         (align_labels): Redefine macro to use new types.
1719         (align_functions): Redefine macro to use new types.
1720         (align_functions_max_skip): Redefine macro to use new types.
1721         (align_loops_value): New macro.
1722         (align_jumps_value): New macro.
1723         (align_labels_value): New macro.
1724         (align_functions_value): New macro.
1725         * function.c (invoke_set_current_function_hook): Propagate
1726         alignment values from flags to global variables default in
1727         topleev.h.
1728         * ipa-icf.c (sem_function::equals_wpa): Use
1729         cl_optimization_option_eq instead of memcmp.
1730         * lto-streamer.h (cl_optimization_stream_out): Support streaming
1731         of string types.
1732         (cl_optimization_stream_in): Likewise.
1733         * optc-save-gen.awk: Support strings in cl_optimization.
1734         * opth-gen.awk: Likewise.
1735         * opts.c (finish_options): Remove error checking of invalid
1736         value ranges.
1737         (MAX_CODE_ALIGN): Remove.
1738         (MAX_CODE_ALIGN_VALUE): Likewise.
1739         (parse_and_check_align_values): New function.
1740         (check_alignment_argument): Likewise.
1741         (common_handle_option): Use check_alignment_argument.
1742         * opts.h (parse_and_check_align_values): Declare.
1743         * toplev.c (init_alignments): Remove.
1744         (read_log_maxskip): New.
1745         (parse_N_M): Likewise.
1746         (parse_alignment_opts): Likewise.
1747         (backend_init_target): Remove usage of init_alignments.
1748         * toplev.h (parse_alignment_opts): Declare.
1749         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
1750         argument.
1751         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
1752         * tree.c (cl_option_hasher::equal): New.
1753         * varasm.c: Use new global macros.
1755 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
1757         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
1758         Use a simpler align directive also if MAXSKIP = ALIGN-1.
1759         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1760         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1761         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1762         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1763         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
1764         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
1765         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
1766         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1767         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1768         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1769         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1771 2018-07-04  Martin Liska  <mliska@suse.cz>
1772             Jonathan Wakely  <jwakely@redhat.com>
1774         * coverage.c: Use correct type.
1775         * doc/invoke.texi: Language correction.
1777 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
1779         PR target/85620
1780         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
1781         ENDBRANCH for non-tail call which may return via indirect branch.
1782         * doc/extend.texi: Document indirect_return attribute.
1784 2018-07-03  Martin Sebor  <msebor@redhat.com>
1786         PR tree-optimization/86274
1787         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
1788         precondition.
1789         (format_floating): Correct handling of infinities and NaNs.
1791 2018-07-03  Martin Sebor  <msebor@redhat.com>
1793         * print-tree.c (print_real_cst): New function.
1794         (print_node_brief): Call it.
1795         (print_node): Ditto.
1797 2018-07-03  Jeff Law  <law@redhat.com>
1799         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
1800         into a single pattern.
1802         * config/h8300/h8300.md (ors code_iterator): New.
1803         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
1804         a single pattern and single splitter.
1805         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
1806         (iorqi3_1, xorqi3_1): Likewise.
1807         (iorqi3, xorqi3 expanders): Similarly.
1809         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
1810         (movmd_internal) into a single pattern using the P mode iterator.
1811         (movmd splitters): Similarly.
1812         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
1813         (movsd splitters): Similarly.
1815         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
1816         ADDB, ADDW and ADDL into a single ADD attribute which selects the
1817         right table based on the size of the operand.
1818         * config/h8300/h8300.md (length_table): Corresponding changes. All
1819         references to "addb", "addw" and "addl" changed to "add".
1820         (btst patterns): Merge two variants into a single pattern.
1821         (tstqi, tsthi): Likewise.
1822         (addhi3_incdec, addsi3_incdec): Likewise.
1823         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
1824         (mulhi3, mulsi3): Likewise.
1825         (udivhi3, udivsi3): Likewise.
1826         (divhi3, divsi3): Likewise.
1827         (andorqi3, andorhi3, andorsi3): Likewise.
1829 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
1831         PR target/85694
1832         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
1833         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
1835 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1837         PR tree-optimization/85694
1838         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
1839         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
1840         UNSPEC_URHADD.
1841         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
1842         (<u>avg<mode>3_ceil): New patterns.
1844 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
1846         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
1847         scan-tree-dump directive.
1848         * gcc.dg/vect/slp-perm-2.c: Likewise.
1849         * gcc.dg/vect/slp-perm-3.c: Likewise.
1850         * gcc.dg/vect/slp-perm-5.c: Likewise.
1851         * gcc.dg/vect/slp-perm-6.c: Likewise.
1852         * gcc.dg/vect/slp-perm-7.c: Likewise.
1853         * gcc.dg/vect/slp-perm-8.c: Likewise.
1855 2018-07-03  Marek Polacek  <polacek@redhat.com>
1857         PR middle-end/86202
1858         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
1860 2018-07-03  Richard Biener  <rguenther@suse.de>
1862         PR ipa/86389
1863         * tree-ssa-structalias.c (find_func_clobbers): Properly
1864         handle indirect calls.
1866 2018-07-03  Jeff Law  <law@redhat.com>
1868         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
1869         (shifts): New code iterator.
1870         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
1871         expander.  Fix HImode handling on H8/SX.
1872         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
1873         (subqi3, subhi3, subsi3 expanders): Likewise.
1874         (andqi3, andhi3, andsi3 expanders): Likewise.
1875         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
1876         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
1877         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
1878         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
1879         (zero_extendqihi2, zero_extendqisi2): Likewise.
1880         (extendqihi2, extendqisi2): Likewise.
1881         (rotlqi3, rotlhi3, rotlsi3): Likewise.
1882         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
1883         (rotlqi3_1, rotlhi3_1): Likewise.
1884         (logicalhi3_sn, logicalsi3_sn): Likewise.
1885         (logicalhi3, logicalsi3): Likewise.
1887 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1889         * tree-vect-patterns.c (vect_recog_rotate_pattern)
1890         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1891         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
1892         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
1893         type to append_pattern_def_seq instead of creating a stmt_vec_info
1894         directly.
1895         (build_mask_conversion): Likewise.  Remove vinfo argument.
1896         (vect_add_conversion_to_patterm): Likewise, renaming to...
1897         (vect_add_conversion_to_pattern): ...this.
1898         (vect_recog_mask_conversion_pattern): Update call to
1899         build_mask_conversion.  Pass the vector type to
1900         append_pattern_def_seq here too.
1901         (vect_recog_gather_scatter_pattern): Update call to
1902         vect_add_conversion_to_pattern.
1904 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1906         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
1907         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1908         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
1909         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
1910         STMT_VINFO_PATTERN_DEF_SEQ to null here.
1911         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
1912         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
1913         append_pattern_def_seq instead of new_pattern_def_seq.
1914         (vect_recog_divmod_pattern): Do both of the above.
1915         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
1916         is null.
1918 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1920         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
1921         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
1922         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
1923         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
1924         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
1925         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1926         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
1927         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1928         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1929         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
1930         parameter with a single stmt_vec_info.
1931         (vect_recog_func_ptr): Likewise.
1932         (vect_recog_gather_scatter_pattern): Likewise, folding in...
1933         (vect_try_gather_scatter_pattern): ...this.
1934         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
1935         the stmt_vec_info of the statement to be matched.  Don't clear
1936         STMT_VINFO_RELATED_STMT.
1937         (vect_pattern_recog): Update call accordingly.
1939 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1941         PR tree-optimization/85694
1942         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
1943         (uavgM3_ceil): Document new optabs.
1944         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
1945         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
1946         functions.
1947         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
1948         (savg_ceil_optab): New optabs.
1949         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
1950         (vect_vect_recog_func_ptrs): Add it.
1951         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
1952         constant directly from the associated lhs.
1954 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1956         * tree-vect-patterns.c (vect_split_statement): New function.
1957         (vect_convert_input): Use it to try to split an existing cast.
1959 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1961         * poly-int.h (print_hex): New function.
1962         * dumpfile.h (dump_dec, dump_hex): Declare.
1963         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
1964         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
1965         min_input_precision, operation_precision and operation_sign.
1966         * tree-vect-patterns.c (vect_get_range_info): New function.
1967         (vect_same_loop_or_bb_p, vect_single_imm_use)
1968         (vect_operation_fits_smaller_type): Delete.
1969         (vect_look_through_possible_promotion): Add an optional
1970         single_use_p parameter.
1971         (vect_recog_over_widening_pattern): Rewrite to use new
1972         stmt_vec_info infomration.  Handle one operation at a time.
1973         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
1974         (vect_truncatable_operation_p, vect_set_operation_type)
1975         (vect_set_min_input_precision): New functions.
1976         (vect_determine_min_output_precision_1): Likewise.
1977         (vect_determine_min_output_precision): Likewise.
1978         (vect_determine_precisions_from_range): Likewise.
1979         (vect_determine_precisions_from_users): Likewise.
1980         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
1981         (vect_vect_recog_func_ptrs): Put over_widening first.
1982         Add cast_forwprop.
1983         (vect_pattern_recog): Call vect_determine_precisions.
1985 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1987         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
1988         statements that have been replaced by further pattern statements.
1989         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
1991 2018-07-03  Richard Biener  <rguenther@suse.de>
1993         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
1994         always set *dt.  Dump vectype in vectype overload.
1995         * dumpfile.h (dump_gimple_expr): New function.
1996         (dump_gimple_expr_loc): Likewise.
1997         * dumpfile.c (dump_gimple_expr): New function.
1998         (dump_gimple_expr_loc): Likewise.
2000 2018-07-02  Jeff Law  <law@redhat.com>
2002         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
2003         the H8/300, H8/300H and H8/S variants into a single pattern.
2004         (movhi_h8300, movqi_h8300hs): Similarly.
2005         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
2006         (QHI mode iterator): New.
2008         * config/h8300/h8300.md: Remove trailing whitespace.
2010 2018-07-02  Jim Wilson  <jimw@sifive.com>
2012         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
2013         instead of emit_insn for interrupt returns.
2014         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
2015         (riscv_sret, riscv_uret): Likewise.
2017 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
2019         * pretty-print.c (selftest::test_pp_format): Move save and restore
2020         of quotes to class auto_fix_quotes, and add an instance.
2021         * selftest.c: Include "intl.h".
2022         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
2023         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
2024         * selftest.h (selftest::auto_fix_quotes): New class.
2026 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
2028         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
2029         (aarch64_sve_prepare_conditional_op): Remove.
2030         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
2031         Allow aarch64_simd_reg_or_zero as select operand; remove
2032         the aarch64_sve_prepare_conditional_op call.
2033         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
2034         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2035         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
2036         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
2037         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
2038         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
2039         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
2040         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
2041         and a splitters to match all of the *_any patterns.
2042         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
2044         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
2045         (SVE_COND_FP_BINARY_REV): Remove.
2046         (sve_int_op_rev, sve_fp_op_rev): New.
2047         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
2048         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
2049         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
2050         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
2051         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
2052         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
2053         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
2054         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
2055         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
2057         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
2058         Remove match_dup 1 from the inner unspec.
2059         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2061         * config/aarch64/aarch64.md (movprfx): New attr.
2062         (length): Default movprfx to 8.
2063         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
2064         (*madd<SVE_I>, *msub<SVE_I): Likewise.
2065         (*<su>mul<SVE_I>3_highpart): Likewise.
2066         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
2067         (*v<ASHIFT><SVE_I>3): Likewise.
2068         (*<su><MAXMIN><SVE_I>3): Likewise.
2069         (*<su><MAXMIN><SVE_F>3): Likewise.
2070         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
2071         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
2072         (*div<SVE_F>4): Likewise.
2074 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
2076         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
2077         in dump string.
2079 2018-07-02  Richard Biener  <rguenther@suse.de>
2081         PR tree-optimization/86363
2082         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
2083         memset argument refers to a non-variable address.
2085 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
2087         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
2088         {PLUS,MINUS}_EXPR code to...
2089         (adjust_symbolic_bound): ...here,
2090         (combine_bound): ...here,
2091         (set_value_range_with_overflow): ...and here.
2093 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
2095         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
2096         code...
2097         (extract_range_from_abs_expr): ...here.
2099 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
2101         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
2102         -fno-omit-frame-pointer when not optimizing.
2104 2018-07-02  Martin Liska  <mliska@suse.cz>
2106         PR ipa/86279
2107         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
2108         (propagate_nothrow): Likewise.
2110 2018-07-02  Martin Liska  <mliska@suse.cz>
2112         PR ipa/86323
2113         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
2115 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
2117         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
2118         function in r262149, changing "loc" param from source_location to
2119         const dump_location_t &.
2120         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
2121         declaration, as above.
2123 2018-07-01  Paul Koning  <ni1d@arrl.net>
2125         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2126         -munit-asm, -mgnu-asm, -mdec-asm.
2127         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
2128         (pdp11_output_labelref): New.
2129         (pdp11_output_def): New.
2130         (pdp11_output_addr_vec_elt): New.
2131         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
2132         %# and %@ format codes.
2133         (pdp11_option_override): New.
2134         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
2135         (pdp11_output_ident): New.
2136         (pdp11_asm_named_section): New.
2137         (pdp11_asm_init_sections): New.
2138         (pdp11_file_start): New.
2139         (pdp11_file_end): New.
2140         (output_ascii): Use .ascii/.asciz for -mdec-asm.
2141         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
2142         %o, like %c but octal.
2143         (pdp11_option_override): New.
2144         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
2145         -mdec-asm.
2146         (DATA_SECTION_ASM_OP): Ditto.
2147         (READONLY_DATA_SECTION_ASM_OP): New.
2148         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
2149         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
2150         (ASM_OUTPUT_LABELREF): Ditto.
2151         (ASM_OUTPUT_DEF): Ditto.
2152         (ASM_OUTPUT_EXTERNAL): New.
2153         (ASM_OUTPUT_SOURCE_FILENAME): New.
2154         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
2155         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
2156         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
2157         %# and %@ format codes.
2158         * config/pdp11/pdp11.opt (mgnu-asm): New.
2159         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
2160         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
2161         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
2163 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
2165         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
2166         dereferencing path[] beyond its length.
2167         (debug_path): New.
2168         (debug_all_paths): New.
2169         (rewire_first_differing_edge): New.
2170         (adjust_paths_after_duplication): New.
2171         (duplicate_thread_path): Call adjust_paths_after_duplication.
2172         Add new argument.
2173         (thread_through_all_blocks): Add new argument to
2174         duplicate_thread_path.
2176 2018-06-30  Jim Wilson  <jimw@sifive.com>
2178         * config/riscv/predicates.md (p2m1_shift_operand): New.
2179         (high_mask_shift_operand): New.
2180         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
2181         pattern using p2m1_shift_operand.
2182         (lshsi3_zero_extend_3+2): New combiner pattern using
2183         high_mask_shift_operand.
2185 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2187         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
2188         split out from...
2189         (vect_recog_rotate_pattern): ...here.
2190         (vect_convert_input): Try to insert casts of invariants in the
2191         preheader.
2192         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
2193         preheader to be empty.
2195 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2197         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
2198         vector type.  If given, install it in the new statement's
2199         STMT_VINFO_VECTYPE.
2200         (vect_element_precision): New function.
2201         (vect_unpromoted_value): New struct.
2202         (vect_unpromoted_value::vect_unpromoted_value): New function.
2203         (vect_unpromoted_value::set_op): Likewise.
2204         (vect_look_through_possible_promotion): Likewise.
2205         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
2206         (vect_widened_op_tree, vect_convert_input): Likewise.
2207         (vect_convert_inputs, vect_convert_output): Likewise.
2208         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
2209         to handle the optional cast of the multiplication result and
2210         vect_widened_op_tree to detect the widened multiplication itself.
2211         Do not require the input and output of promotion casts to have
2212         the same sign, but base the signedness of the operation on the
2213         input rather than the result.  If the pattern includes two
2214         promotions, check that those promotions have the same sign.
2215         Do not restrict the MULT_EXPR handling to a double-width result;
2216         handle quadruple-width results and wider.  Use vect_convert_inputs
2217         to convert the inputs to the common type.
2218         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
2219         to handle the optional cast of the ABS result.  Also allow a sign
2220         change or a sign extension between the ABS and MINUS.
2221         Use vect_widened_op_tree to detect the widened subtraction and use
2222         vect_convert_inputs to convert the inputs to the common type.
2223         (vect_handle_widen_op_by_const): Delete.
2224         (vect_recog_widen_op_pattern): New function.
2225         (vect_recog_widen_mult_pattern): Use it.
2226         (vect_recog_widen_shift_pattern): Likewise.
2227         (vect_recog_widen_sum_pattern): Use
2228         vect_look_through_possible_promotion to handle the promoted
2229         PLUS_EXPR operand.
2231 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2233         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
2234         the containing gimple_seq *.
2235         * gimple-iterator.h (gsi_for_stmt): Declare it.
2236         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
2237         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
2238         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2239         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2240         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
2241         checks.
2242         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
2243         split out from...
2244         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
2245         statement being replaced is part of an existing pattern
2246         definition sequence, inserting the new pattern statements before
2247         the original one.
2248         (vect_pattern_recog_1): Don't return a bool.  If the statement
2249         is already part of a pattern, instead apply pattern matching
2250         to the pattern definition statements.  Don't clear the
2251         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
2252         (vect_pattern_recog): Don't break after the first match;
2253         continue processing the pattern definition statements instead.
2254         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
2256 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2258         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
2259         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2260         (vect_recog_widen_sum_pattern): Use it.
2262 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2264         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2265         phi is not a pattern statement and has not been replaced by
2266         a pattern statement.
2267         * tree-vect-patterns.c (type_conversion_p): Don't check
2268         STMT_VINFO_IN_PATTERN_P.
2269         (vect_recog_vector_vector_shift_pattern): Likewise.
2270         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
2271         the pattern statement rather than the original statement; check
2272         directly for a WIDEN_MULT_EXPR here.
2273         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
2274         vect_is_simple_use to return the pattern statement rather
2275         than the original statement; use is_pattern_stmt_p to check
2276         for such a pattern statement.
2277         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
2278         to return the pattern statement rather than the original statement;
2279         don't do the same transformation here.
2280         (vect_is_simple_use): If the defining statement has been replaced
2281         by a pattern statement, return the pattern statement instead.
2282         Remove the corresponding (local) transformation from the vectype
2283         overload.
2285 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2287         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
2288         end and default to null.
2289         * tree-vect-loop.c (vect_create_epilog_for_reduction)
2290         (vectorizable_reduction): Update calls accordingly, dropping the
2291         gimple ** argument if the passed-back statement isn't needed.
2292         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
2293         (vect_recog_rotate_pattern): Likewise.
2294         (vect_recog_mask_conversion_pattern): Likewise.
2295         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2296         (vect_mask_constant_operand_p): Likewise.
2297         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
2298         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
2299         (get_group_load_store_type, get_load_store_type): Likewise.
2300         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
2301         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
2302         (vectorizable_conversion, vectorizable_assignment): Likewise.
2303         (vectorizable_shift, vectorizable_operation): Likewise.
2304         (vectorizable_store, vect_is_simple_cond): Likewise.
2305         (vectorizable_condition, vectorizable_comparison): Likewise.
2306         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
2307         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
2308         and move it to the end.  Cope with null def_stmt_outs.
2310 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2312         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2314 2018-06-29  Jeff Law  <law@redhat.com>
2316         * config/v850/v850.c (v850_legitimate_address_p): Handle large
2317         displacements for TARGET_V850E2V3 and newer.
2318         (TARGET_LRA_P): Remove.  Defaults to LRA now.
2319         * config/v850/v850.md (sign23byte_load): Remove.
2320         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
2321         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2323 2018-06-29  Martin Liska  <mliska@suse.cz>
2325         PR lto/85759
2326         * coverage.c (coverage_init): Mangle full path name.
2327         * doc/invoke.texi: Document the change.
2328         * gcov-io.c (mangle_path): New.
2329         * gcov-io.h (mangle_path): Likewise.
2330         * gcov.c (mangle_name): Use mangle_path for path mangling.
2332 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2334         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2335         if starting source register is not even.
2337 2018-06-29  Martin Liska  <mliska@suse.cz>
2339         PR tree-optimization/86263
2340         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
2341         Make edge redirection.
2343 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
2345         * dumpfile.c (dump_loc): Add indentation based on scope depth.
2346         (dump_scope_depth): New variable.
2347         (get_dump_scope_depth): New function.
2348         (dump_begin_scope): New function.
2349         (dump_end_scope): New function.
2350         * dumpfile.h (get_dump_scope_depth): New declaration.
2351         (dump_begin_scope): New declaration.
2352         (dump_end_scope): New declaration.
2353         (class auto_dump_scope): New class.
2354         (AUTO_DUMP_SCOPE): New macro.
2355         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
2356         AUTO_DUMP_SCOPE.
2358 2018-06-29  Richard Biener  <rguenther@suse.de>
2360         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
2361         compute_all_dependences succeeds.
2362         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
2363         exceed --param loop-max-datarefs-for-datadeps.
2365 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
2367         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
2369 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
2371         PR target/86348
2372         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
2373         alternative 0 in preferred_for_speed attribute.
2375 2018-06-28  Paul Koning  <ni1d@arrl.net>
2377         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
2378         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
2379         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
2380         * config/pdp11/pdp11.md: Correct "length" attribute calculation
2381         for shift insn patterns.
2383 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
2385         * cgraph.c (cgraph_node::get_body): Replace assignments to
2386         "dump_file" with calls to set_dump_file.
2387         * dumpfile.c (alt_dump_file): Make static, and group with...
2388         (alt_flags): ...this definition.
2389         (dumps_are_enabled): New variable.
2390         (refresh_dumps_are_enabled): New function.
2391         (set_dump_file): New function.
2392         (set_alt_dump_file): New function.
2393         (gcc::dump_manager::dump_start): Replace assignments to
2394         "dump_file" and "alt_dump_file" with calls to set_dump_file and
2395         set_alt_dump_file.
2396         (gcc::dump_manager::dump_finish): Likewise.
2397         * dumpfile.h (alt_dump_file): Delete decl.
2398         (dumps_are_enabled): New variable decl.
2399         (set_dump_file): New function decl.
2400         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
2401         global.
2402         * tree-nested.c (lower_nested_functions): Replace assignments to
2403         "dump_file" with calls to set_dump_file.
2405 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
2407         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
2408         goto_locus of each outgoing edge of each basic block.
2410 2018-06-28  Richard Biener  <rguenther@suse.de>
2412         * dwarf2out.c (decl_scope_table): Remove.
2413         (push_decl_scope): Likewise.
2414         (pop_decl_scope): Likewise.
2415         (gen_type_die_for_member): Do not call push/pop_decl_scope.
2416         (gen_struct_or_union_type_die): Likewise.
2417         (gen_tagged_type_die): Likewise.
2418         (dwarf2out_init): Do not initialize decl_scope_table.
2419         (dwarf2out_c_finalize): Do not free it.
2421 2018-06-28  Richard Biener  <rguenther@suse.de>
2423         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
2424         deciding whether to not re-use a DIE.
2426 2018-06-28  Richard Biener  <rguenther@suse.de>
2428         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
2429         DW_AT_abstract_origin attribute.
2431 2018-06-28  Martin Liska  <mliska@suse.cz>
2433         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2434         Use newly introduced constants.
2435         * tree-switch-conversion.h (struct jump_table_cluster):
2436         Define max_ratio_for_size and max_ratio_for_speed.
2438 2018-06-28  Martin Liska  <mliska@suse.cz>
2440         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2441         Add new checking assert to catch invalid state.
2442         (jump_table_cluster::can_be_handled): Handle single case
2443         clusters.
2444         (jump_table_cluster::is_beneficial): Bail out for such case.
2445         (bit_test_cluster::find_bit_tests):
2446         Add new checking assert to catch invalid state.
2447         (bit_test_cluster::can_be_handled): Handle single case
2448         clusters.
2449         (bit_test_cluster::is_beneficial): Bail out for such case.
2450         (switch_decision_tree::analyze_switch_statement):
2451         Fix comment.
2453 2018-06-28  Martin Liska  <mliska@suse.cz>
2455         * common.opt: Introduce -completion option.
2456         * gcc.c (driver_handle_option): Handle it.
2457         (driver::main): Print completions if completion
2458         is set.
2459         * opt-suggestions.c (option_proposer::get_completions):
2460         New function.
2461         (option_proposer::suggest_completion): Likewise.
2462         (option_proposer::find_param_completions): Likewise.
2463         (verify_autocompletions): Likewise.
2464         (test_completion_valid_options): Likewise.
2465         (test_completion_valid_params): Likewise.
2466         (in_completion_p): Likewise.
2467         (empty_completion_p): Likewise.
2468         (test_completion_partial_match): Likewise.
2469         (test_completion_garbage): Likewise.
2470         (opt_proposer_c_tests): Likewise.
2471         * opt-suggestions.h: Declare new functions.
2472         * opts.c (common_handle_option): Handle OPT__completion_.
2473         * selftest-run-tests.c (selftest::run_tests): Add
2474         opt_proposer_c_tests.
2475         * selftest.c (assert_str_startswith): New.
2476         * selftest.h (assert_str_startswith): Likewise.
2477         (opt_proposer_c_tests): New.
2478         (ASSERT_STR_STARTSWITH): Likewise.
2480 2018-06-28  Martin Liska  <mliska@suse.cz>
2482         * Makefile.in: Add opt-suggestions.o.
2483         * gcc-main.c: Include opt-suggestions.h.
2484         * gcc.c (driver::driver): Likewise.
2485         (driver::~driver): Remove m_option_suggestions.
2486         (driver::build_option_suggestions): Moved to option_proposer.
2487         (driver::suggest_option): Likewise.
2488         (driver::handle_unrecognized_options): Use option_proposer.
2489         * gcc.h (class driver): Add new memver m_option_proposer.
2490         * opt-suggestions.c: New file.
2491         * opt-suggestions.h: New file.
2493 2018-06-28  Martin Liska  <mliska@suse.cz>
2495         * vec.h (class auto_string_vec): New (moved from auto_argvec).
2496         (auto_string_vec::~auto_string_vec): Likewise.
2498 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
2500         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
2501         prevent_decl_creation_for_types fields up and add reset_location field.
2502         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
2503         statement if id->reset_location is true.
2504         (copy_edges_for_bb): Do not set goto_locus on the new edges if
2505         id->reset_location is true.
2506         (copy_phis_for_bb): Force input_location on the arguments if
2507         id->reset_location is true.
2508         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
2509         is set on the function to be inlined.
2511 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
2513         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
2515 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
2517         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
2518         registers for Pmode.
2519         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
2520         hard registers for the clobbered pseudo.
2522 2018-06-27  Paul Koning  <ni1d@arrl.net>
2524         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2525         mutually exclusive options.
2526         * config/pdp11/constraints.md (h): New constraint.
2527         (O): Update definition to match shift code generation.
2528         (D): New constraint.
2529         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
2530         (CCFP): Remove.
2531         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
2532         function.
2533         (output_jump): Change arguments.
2534         (pdp11_fixed_cc_regs): New function.
2535         (pdp11_cc_mode): Ditto.
2536         (pdp11_expand_shift): Ditto.
2537         (pdp11_assemble_shift): Ditto.
2538         (pdp11_small_shift): Ditto.
2539         (pdp11_branch_cost): Remove.
2540         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
2541         from output.
2542         (pdp11_register_move_cost): Update for CC registers.
2543         (pdp11_rtx_costs): Add case for LSHIFTRT.
2544         (pdp11_output_jump): Add CCNZ mode conditional branches.
2545         (notice_update_cc_on_set): Remove.
2546         (pdp11_cc_mode): New function.
2547         (simple_memory_operand): Correct pre/post decrement case.
2548         (no_side_effect_operand): New function.
2549         (pdp11_regno_reg_class): Add CC_REGS class.
2550         (pdp11_fixed_cc_regs): New function.
2551         (pdp11_small_shift): New function.
2552         (pdp11_expand_shift): New function to expand shift insns.
2553         (pdp11_assemble_shift): New function to output shifts.
2554         (pdp11_branch_cost): Remove.
2555         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
2556         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
2557         (WCHAR_TYPE): Ditto.
2558         (PTRDIFF_TYPE): Ditto.
2559         (ADJUST_INSN_LENGTH): New macro.
2560         (FIXED_REGISTERS): Add CC registers.
2561         (CALL_USED_REGISTERS): Ditto.
2562         (reg_class): Ditto.
2563         (REG_CLASS_NAMES): Ditto.
2564         (REG_CLASS_CONTENTS): Ditto.
2565         (SELECT_CC_MODE): Use new function.
2566         (TARGET_FLAGS_REGNUM): New macro.
2567         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
2568         (cc0_reg_rtx): Remove.
2569         (CC_STATUS_MDEP): Remove.
2570         (CC_STATUS_MDEFP_INIT): Remove.
2571         (CC_IN_FPU): Remove.
2572         (NOTICE_UPDATE_CC): Remove.
2573         (REGISTER_NAMES): Add CC registers.
2574         (BRANCH_COST): Change to constant 1.
2575         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
2576         handling.
2577         * config/pdp11/pdp11.opt (mbcopy): Remove.
2578         (mbcopy-builtin): Remove.
2579         (mbranch-cheap): Remove.
2580         (mbranch-expensive): Remove.
2581         * config/pdp11/predicates.md (expand_shift_operand): Update to
2582         match shift code generation.
2583         (ccnz_operator): New predicate.
2584         * doc/invoke.texi (PDP-11 Options): Remove deleted options
2585         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
2586         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
2587         exclusive options.
2588         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
2589         description of O constraint.
2591 2018-06-27  Jeff Law  <law@redhat.com>
2592             Austin Law  <austinklaw@gmail.com>
2594         * config/v850/v850.md (addsi3_set_flags): New pattern.
2595         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
2596         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
2597         (zero_extendhisi2_v850_set_flags): Likewise.
2598         (zero_extendqisi2_v850_set_flags): Likewise.
2599         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
2600         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
2601         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
2603         * config/v850/v850-protos.h (notice_update_cc): Remove.
2604         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
2605         (v850_print_operand): Handle 'D' and "d".
2606         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
2607         Add handling of arithmetic/logical operations compared against zero.
2608         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
2609         Do not look at v850_compare_op, instead get mode from last argument.
2610         (v850_gen_compare): Remove
2611         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
2612         after reload for prologue insns.
2613         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
2614         patterns.
2615         (construct_save_jarl): Likewise.
2616         (TARGET_FLAGS_REGNUM): Define.
2617         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
2618         (NOTICE_UPDATE_CC): Remove.
2619         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
2620         than cc0.  Conditionalize on reload_completed.
2621         (cmpsi_insn, setfcc_insn): Likewise.
2622         (tst1 splitter): Turn into define_and_split which sets the flags
2623         after reload.
2624         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
2625         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
2626         (cstoresf4, cstoredf4): Clobber the flags.
2627         (cmpsi, cmpsf, cmpdf): Remove expanders.
2628         (setf_insn): Remove pattern.
2629         (addsi3): Turn into define_and_split which clobbers the flags after
2630         reload and a suitable pattern (addsi3_clobber_flags) for use after
2631         reload.
2632         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
2633         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
2634         (ashrsi3, ashrsi3_v850e2): Likewise.
2635         (bins): Clobber the flags.
2636         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
2637         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
2638         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
2639         (call_value_internal_short, call_value_internal_long): Likewise.
2640         (callt_save_interrupt, callt_return_interrupt): Likewise.
2641         (save_interrupt, return_interrupt): Likewise.
2642         (callt_save_all_interrupt, save_all_interrupt): Likewise.
2643         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
2644         (restore_all_interrupt, _restore_all_interrupt): Likewise.
2645         (All FP comparisons): Only allow after reload has completed.
2646         (trfsr): Likewise.
2647         (divh, divhu): Tweak output template.
2648         (branch_z_normal, branch_z_invert): Remove
2649         (branch_nz_normal, branch_nz_invert): Likewise.
2650         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
2652         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
2653         * config/v850/v850.c (notice_update_cc): Remove.
2654         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
2655         (CC_NO_CARRY): Likewise.
2656         (NOTICE_UPDATE_CC): Define to nothing.
2657         * config/v850/v850.md: Remove block comment on cc0 handling
2658         Remove "cc" attribute from all patterns.  Remove cc_status handling
2659         from all patterns.  Minor formatting fixes.
2661 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2663         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
2664         (cortex-a76.cortex-a55): Likewise.
2665         * config/aarch64/aarch64-tune.md: Regenerate.
2666         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
2667         cortex-a76.cortex-a55.
2669 2018-06-27  Jeff Law  <law@redhat.com>
2671         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
2672         (MULTILIB_DIRNAMES): Similarly.
2674 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
2676         * gimple.h (gimple_return_retbnd): Delete.
2677         (gimple_return_set_retbnd): Likewise.
2678         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
2679         gimple_return_set_retbnd.
2680         * gimple-pretty-print.c (dump_gimple_return): Remove call to
2681         gimple_return_retbnd and adjust.
2682         * tree-inline.h (struct copy_body_data): Remove retbnd field.
2683         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
2684         Explicitly return NULL in a couple more cases.  Move assertion
2685         on debug statements and remove unreachable code.
2686         (reset_debug_binding): Do not test id->retbnd.
2687         (expand_call_inline): Do not set it.
2689 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2691         * configure.ac: Add --disable-gcov option.
2692         * configure: Regenerate.
2693         * Makefile.in: Honour @enable_gcov@.
2694         * doc/install.texi: Document --disable-gcov.
2696 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2698         * config/arm/arm-cpus.in (cortex-a76): New entry.
2699         (cortex-a76.cortex-a55): Likewise.
2700         * config/arm/arm-tables.opt: Regenerate.
2701         * config/arm/arm-tune.md: Likewise.
2702         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
2703         * doc/invoke.texi (ARM Options): Document cortex-a76 and
2704         cortex-a76.cortex-a55.
2706 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
2708         PR target/85769
2709         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
2711 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
2713         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
2714         comment.
2715         (EPILOGUE_USES): Likewise.
2717 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
2719         * tree-inline.c (remap_location): New function extracted from...
2720         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
2721         (copy_phis_for_bb): ...here.  Call remap_location.
2722         (copy_cfg_body): Adjust call to copy_edges_for_bb.
2724 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
2726         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
2727         unaligned vsx for 16B memset.
2729 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
2731         PR target/86285
2732         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
2733         ieee128_float_type_node to long_double_type_node unless
2734         TARGET_LONG_DOUBLE_128 is set.
2736 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
2738         * cfgloop.c (get_loop_location): Convert return type from
2739         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
2740         by implicit construction from rtx_insn *, and using
2741         dump_user_location_t::from_function_decl for the fallback case.
2742         * cfgloop.h (get_loop_location): Convert return type from
2743         location_t to dump_user_location_t.
2744         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
2745         dump_printf_loc to pass in a dump_location_t rather than a
2746         location_t, via the gimple stmt.
2747         * coverage.c (get_coverage_counts): Update calls to
2748         dump_printf_loc to pass in dump_location_t rather than a
2749         location_t.
2750         * doc/optinfo.texi (Dump types): Convert example of
2751         dump_printf_loc from taking "locus" to taking "insn".  Update
2752         description of the "_loc" calls to cover dump_location_t.
2753         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
2754         "selftest.h".
2755         (dump_user_location_t::dump_user_location_t): New constructors,
2756         from gimple *stmt and rtx_insn *.
2757         (dump_user_location_t::from_function_decl): New function.
2758         (dump_loc): Make static.
2759         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
2760         const dump_location_t &.
2761         (dump_generic_expr_loc): Delete.
2762         (dump_printf_loc): Convert param "loc" from location_t to
2763         const dump_location_t &.
2764         (selftest::test_impl_location): New function.
2765         (selftest::dumpfile_c_tests): New function.
2766         * dumpfile.h: Include "profile-count.h".
2767         (class dump_user_location_t): New class.
2768         (struct dump_impl_location_t): New struct.
2769         (class dump_location_t): New class.
2770         (dump_printf_loc): Convert 2nd param from source_location to
2771         const dump_location_t &.
2772         (dump_generic_expr_loc): Delete.
2773         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
2774         const dump_location_t &.
2775         * gimple-fold.c (fold_gimple_assign): Update call to
2776         dump_printf_loc to pass in a dump_location_t rather than a
2777         location_t, via the gimple stmt.
2778         (gimple_fold_call): Likewise.
2779         * gimple-loop-interchange.cc
2780         (loop_cand::analyze_iloop_reduction_var): Update for change to
2781         check_reduction_path.
2782         (tree_loop_interchange::interchange): Update for change to
2783         find_loop_location.
2784         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
2785         change in return-type of find_loop_location.
2786         (graphite_regenerate_ast_isl): Likewise.
2787         * graphite-optimize-isl.c (optimize_isl): Likewise.
2788         * graphite.c (graphite_transform_loops): Likewise.
2789         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
2790         pass in a dump_location_t rather than a location_t, via the
2791         gimple stmt.
2792         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2793         * ipa.c (walk_polymorphic_call_targets): Likewise.
2794         * loop-unroll.c (report_unroll): Convert "locus" param from
2795         location_t to dump_location_t.
2796         (decide_unrolling): Update for change to get_loop_location's
2797         return type.
2798         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
2799         location_t to dump_user_location_t.
2800         (grid_find_single_omp_among_assignments_1): Updates calls to
2801         dump_printf_loc to pass in a dump_location_t rather than a
2802         location_t, via the gimple stmt.
2803         (grid_parallel_clauses_gridifiable): Convert "tloc" from
2804         location_t to dump_location_t.  Updates calls to dump_printf_loc
2805         to pass in a dump_location_t rather than a location_t, via the
2806         gimple stmt.
2807         (grid_inner_loop_gridifiable_p): Likewise.
2808         (grid_dist_follows_simple_pattern): Likewise.
2809         (grid_gfor_follows_tiling_pattern): Likewise.
2810         (grid_target_follows_gridifiable_pattern): Likewise.
2811         (grid_attempt_target_gridification): Convert initialization
2812         of local "grid" from memset to zero-initialization; FIXME: does
2813         this require C++11?  Update call to dump_printf_loc to pass in a
2814         optinfo_location rather than a location_t, via the gimple stmt.
2815         * profile.c (read_profile_edge_counts): Updates call to
2816         dump_printf_loc to pass in a dump_location_t rather than a
2817         location_t
2818         (compute_branch_probabilities): Likewise.
2819         * selftest-run-tests.c (selftest::run_tests): Call
2820         dumpfile_c_tests.
2821         * selftest.h (dumpfile_c_tests): New decl.
2822         * tree-loop-distribution.c (pass_loop_distribution::execute):
2823         Update for change in return type of find_loop_location.
2824         * tree-parloops.c (parallelize_loops): Likewise.
2825         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
2826         "locus" from location_t to dump_user_location_t.
2827         (canonicalize_loop_induction_variables): Likewise.
2828         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
2829         for change in return type of find_loop_location.
2830         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
2831         to dump_printf_loc to pass in a dump_location_t rather than a
2832         location_t, via the stmt.
2833         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
2834         Likewise.
2835         * tree-vect-loop-manip.c (find_loop_location): Convert return
2836         type from source_location to dump_user_location_t.
2837         (vect_do_peeling): Update for above change.
2838         (vect_loop_versioning): Update for change in type of
2839         vect_location.
2840         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
2841         from location_t to dump_user_location_t.
2842         (vect_estimate_min_profitable_iters): Update for change in type
2843         of vect_location.
2844         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
2845         location_t to dump_location_t.
2846         (vect_slp_bb): Update for change in type of vect_location.
2847         * tree-vectorizer.c (vect_location): Convert from source_location
2848         to dump_user_location_t.
2849         (try_vectorize_loop_1): Update for change in vect_location's type.
2850         (vectorize_loops): Likewise.
2851         (increase_alignment): Likewise.
2852         * tree-vectorizer.h (vect_location): Convert from source_location
2853         to dump_user_location_t.
2854         (find_loop_location): Convert return type from source_location to
2855         dump_user_location_t.
2856         (check_reduction_path): Convert 1st param from location_t to
2857         dump_user_location_t.
2858         * value-prof.c (check_counter): Update call to dump_printf_loc to
2859         pass in a dump_user_location_t rather than a location_t; update
2860         call to error_at for change in type of "locus".
2861         (check_ic_target): Update call to dump_printf_loc to
2862         pass in a dump_user_location_t rather than a location_t, via the
2863         call_stmt.
2865 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
2867         * config/s390/s390.h (enum processor_flags): Do not use
2868         default tune parameter when -march was specified.
2870 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
2872         PR target/86314
2873         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
2874         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
2875         operands.
2877 2018-06-26  Richard Biener  <rguenther@suse.de>
2879         PR tree-optimization/86287
2880         PR bootstrap/86316
2881         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
2882         (vect_analyze_loop): Initialize n_stmts.
2884 2018-06-26  Richard Biener  <rguenther@suse.de>
2886         PR middle-end/86271
2887         * fold-const.c (fold_convertible_p): Pointer extension
2888         isn't valid.
2890 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
2892         PR debug/86064
2893         * dwarf2out.c (loc_list_has_views): Adjust comments.
2894         (dw_loc_list): Split single cross-partition range with
2895         nonzero locview.
2897 2018-06-25  Jeff Law  <law@redhat.com>
2899         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
2900         on -mbig-switch by default.
2902         * config/v850/predicates.md (const_float_1_operand): Fix match_code
2903         test.
2904         (const_float_0_operand): Remove unused predicate.
2905         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
2906         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
2907         (recipsf2): New expander.  Original pattern now called
2908         (recipsf2_insn).
2909         (recipdf2, recipdf2_insn): Similarly.
2910         (rsqrtsf2, rsqrtsf2_insn): Similarly
2911         (rsqrtdf2, rsqrtdf2_insn): Similarly
2913 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
2915         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
2916         Simplify logic for FreeBSD (twice).
2918 2018-06-25  Martin Sebor  <msebor@redhat.com>
2920         PR tree-optimization/86204
2921         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
2922         a strnlen result if it's less than the length of the string.
2924 2018-06-25  Martin Sebor  <msebor@redhat.com>
2926         PR tree-optimization/85700
2927         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
2928         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
2929         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
2931 2018-06-25  Martin Sebor  <msebor@redhat.com>
2933         * doc/extend.texi (Zero-length arrays): Update and clarify.
2935 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
2937         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
2938         added IEEE/IBM long double multilib support on PowerPC little
2939         endian Linux systems.
2940         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
2941         (MULTILIB_DEFAULTS): Likewise.
2942         * config/rs6000/rs6000.c (rs6000_option_override_internal):
2943         Likewise.
2944         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
2945         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
2946         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
2948 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
2950         PR middle-end/86311
2951         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
2952         (REORDER_45): Likewise.
2954 2018-06-25  Jeff Law  <law@redhat.com>
2956         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
2957         dividend to 32 bits.  Adjust length.
2958         (udivmodhi4): Cleanup output template.  Fix length.
2960 2018-06-25  Carl Love  <cel@us.ibm.com>
2962         * config/rs6000/vsx.md: Change word selector to prefered location.
2964 2018-06-25  Richard Biener  <rguenther@suse.de>
2966         PR tree-optimization/86304
2967         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
2968         epilogue-if-converted loops as well.
2970 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
2972         * lto-section-out.c (lto_begin_section): Do not print section
2973         name for noaddr and unnumbered dumps.
2975 2018-06-25  Richard Biener  <rguenther@suse.de>
2977         * tree-vectorizer.h (struct vec_info_shared): New structure
2978         with parts split out from struct vec_info and loop_nest from
2979         struct _loop_vec_info.
2980         (struct vec_info): Adjust accordingly.
2981         (struct _loop_vec_info): Likewise.
2982         (LOOP_VINFO_LOOP_NEST): Adjust.
2983         (LOOP_VINFO_DATAREFS): Likewise.
2984         (LOOP_VINFO_DDRS): Likewise.
2985         (struct _bb_vec_info): Likewise.
2986         (BB_VINFO_DATAREFS): Likewise.
2987         (BB_VINFO_DDRS): Likewise.
2988         (struct _stmt_vec_info): Add dr_aux member.
2989         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
2990         (DR_MISALIGNMENT_UNINITIALIZED): New.
2991         (set_dr_misalignment): Adjust.
2992         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
2993         (vect_analyze_loop): Adjust prototype.
2994         (vect_analyze_loop_form): Likewise.
2995         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2996         Compute dependences lazily.
2997         (vect_record_base_alignments): Use shared datarefs/ddrs.
2998         (vect_verify_datarefs_alignment): Likewise.
2999         (vect_analyze_data_refs_alignment): Likewise.
3000         (vect_analyze_data_ref_accesses): Likewise.
3001         (vect_analyze_data_refs): Likewise.
3002         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
3003         constructor parameter for shared part.
3004         (vect_analyze_loop_form): Pass in shared part and adjust.
3005         (vect_analyze_loop_2): Pass in storage for the number of
3006         stmts.  Move loop nest finding to the caller.  Compute
3007         datarefs lazily.
3008         (vect_analyze_loop): Pass in shared part.
3009         (vect_transform_loop): Verify shared datarefs are unchanged.
3010         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
3011         constructor parameter for shared part.
3012         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
3013         (vect_slp_bb): Verify shared datarefs are unchanged before
3014         transform.
3015         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
3016         change.
3017         (new_stmt_vec_info): Initialize DR_AUX misalignment to
3018         DR_MISALIGNMENT_UNINITIALIZED.
3019         * tree-vectorizer.c (vec_info::vec_info): Add constructor
3020         parameter for shared part.
3021         (vec_info::~vec_info): Adjust.
3022         (vec_info_shared::vec_info_shared): New.
3023         (vec_info_shared::~vec_info_shared): Likewise.
3024         (vec_info_shared::save_datarefs): Likewise.
3025         (vec_info_shared::check_datarefs): Likewise.
3026         (try_vectorize_loop_1): Construct shared part live for analyses
3027         of a single loop for multiple vector sizes.
3028         * tree-parloops.c (gather_scalar_reductions): Adjust.
3030 2018-06-25  Richard Biener  <rguenther@suse.de>
3032         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
3033         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
3034         (vect_analyze_data_refs): Remove similar code from here and
3035         simplify accordingly.
3037 2018-06-25  Richard Biener  <rguenther@suse.de>
3039         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
3040         for reverse storage order accesses rather than asserting
3041         they cannot happen here.
3043 2018-06-25  Tom de Vries  <tdevries@suse.de>
3045         PR debug/86257
3046         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
3047         Use data16 instead of .byte for insn prefix.
3049 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
3051         PR C++/86082
3052         * parser.c (make_char_string_pack): Pass this literal chars
3053         through cpp_interpret_string.
3054         (cp_parser_userdef_numeric_literal): Check the result of
3055         make_char_string_pack.
3057 2018-06-24  Maya Rashish  <coypu@sdf.org>
3059         * ginclude/stddef.h: Simplify conditions around avoiding
3060         re-definition of __size_t.
3062 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3064         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
3065         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
3067 2018-06-22  Maya Rashish  <coypu@sdf.org>
3069         * doc/invoke.texi (mno-fancy-math-387): Update for changes
3070         made to OpenBSD and NetBSD through the years.
3072 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3074         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3075         behavior of vec_pack (vector double, vector double) to match
3076         behavior of vec_float2 (vector double, vector double).
3078 2018-06-22  Olivier Hainque  <hainque@adacore.com>
3080         * gimplify.c (gimplify_function_tree): Prevent creation
3081         of a trampoline for the address of the current function
3082         passed to entry/exit instrumentation hooks.
3084 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
3086         PR target/86222
3087         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3088         correctly.
3090 2018-06-22  Martin Liska  <mliska@suse.cz>
3092         PR tree-optimization/86263
3093         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3094         Bail out if is_enabled is false.
3095         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
3096         New declaration.
3097         (jump_table_cluster::is_enabled): New function.
3099 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3101         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3102         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
3103         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
3104         (lto_input_ts_binfo_tree_pointers): Likewise.
3105         * tree-streamer-out.c (streamer_write_tree_bitfields,
3106         write_ts_binfo_tree_pointers): Likewise.
3107         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
3109 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3111         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
3113 2018-06-22  Martin Liska  <mliska@suse.cz>
3115         * symbol-summary.h (get): Make it pure and inline move
3116         functionality from ::get function.
3117         (get): Remove and inline into ::get and ::get_create.
3118         (get_create): Move code from ::get function.
3120 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3122         PR target/85994
3123         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3124         -x assembler-with-cpp.
3126 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3128         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
3129         _FILE_OFFSET_BITS=64 for C++.
3131 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
3133         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3134         conversion insn that shows up when pr85657-3.c is compiled using
3135         IEEE 128-bit long double.
3136         (neg<mode>2_internal): Use the correct mode to check whether the
3137         mode is IBM extended.
3138         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3139         multiply and divide external functions from being created more
3140         than once.
3142 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3144         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
3145         functions.
3146         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
3147         the edge can be forwarded.
3148         (cfg_layout_merge_blocks): Likewise.
3150 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3152         * except.c (finish_eh_generation): Commit edge insertions only after
3153         the EH edges have been redirected from post-landing to landing pads.
3155 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3157         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
3158         create_tmp_var_for to create the FRAME decl.
3159         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
3161 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3163         * tree-inline.c (copy_edges_for_bb): Minor tweak.
3164         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
3165         debug statement when resetting its value.
3166         (expand_call_inline): Copy the locus of the call onto the assignment
3167         of the return value, if any.  Use local variable in more cases.
3169 2018-06-21  Martin Liska  <mliska@suse.cz>
3171         * ipa-pure-const.c (propagate_nothrow): Use
3172         funct_state_summaries->get.
3173         (dump_malloc_lattice): Likewise.
3174         (propagate_malloc): Likewise.
3176 2018-06-21  Richard Biener  <rguenther@suse.de>
3178         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
3179         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
3180         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
3181         comment.
3182         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
3183         BLOCK_ABSTRACT_ORIGIN unconditionally.
3185 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
3187         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
3188         deleting it.
3189         * ipa-reference.c (ipa_reference_c_finalize): Delete
3190         ipa_ref_opt_sum_summaries and set it to NULL.
3192 2018-06-21  Tom de Vries  <tdevries@suse.de>
3194         PR tree-optimization/85859
3195         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
3196         test with comment from bb_no_side_effects_p.
3198 2018-06-21  Richard Biener  <rguenther@suse.de>
3200         PR tree-optimization/86232
3201         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
3202         max for constant niter.
3204 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3206         * config/aarch64/aarch64-simd.md
3207         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
3209 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3211         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
3212         Make opernads of the unspec commutative.
3214 2018-06-21  Richard Biener  <rguenther@suse.de>
3216         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
3217         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
3218         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
3219         (vect_analyze_data_ref_dependence): Re-order checks to deal with
3220         NULL DR_STEP.
3221         (vect_record_base_alignments): Do not record base alignment
3222         for gathers or scatters.
3223         (vect_compute_data_ref_alignment): Drop return value that is always
3224         true.  Bail out early for gathers or scatters.
3225         (vect_enhance_data_refs_alignment): Bail out early for gathers
3226         or scatters.
3227         (vect_find_same_alignment_drs): Likewise.
3228         (vect_analyze_data_refs_alignment): Remove dead code.
3229         (vect_slp_analyze_and_verify_node_alignment): Likewise.
3230         (vect_analyze_data_refs): For possible gathers or scatters do
3231         not create an alternate DR, just check their possible validity
3232         and mark them.  Adjust DECL_NONALIASED handling to not rely
3233         on DR_BASE_ADDRESS.
3234         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
3235         update inits of gathers or scatters.
3236         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
3237         Also copy gather/scatter flag to pattern vinfo.
3239 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3241         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3242         behavior of vec_packsu (vector unsigned long long, vector unsigned
3243         long long) to match behavior of vec_packs with same signature.
3245 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
3246             Thomas Schwinge <thomas@codesourcery.com>
3247             Cesar Philippidis  <cesar@codesourcery.com>
3249         * gimplify.c (gimplify_scan_omp_clauses): Add support for
3250         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3251         (gimplify_adjust_omp_clauses): Likewise.
3252         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
3253         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
3254         (gimplify_omp_target_update): Update handling of acc update and
3255         enter/exit data.
3256         * omp-low.c (install_var_field): Remove unused parameter
3257         base_pointers_restrict.
3258         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
3259         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
3260         FINALIZE}
3261         (omp_target_base_pointers_restrict_p): Delete.
3262         (scan_omp_target): Update call to scan_sharing_clauses.
3263         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
3264         FINALIZE}.
3265         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3266         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3267         (convert_local_omp_clauses): Likewise.
3268         * tree-pretty-print.c (dump_omp_clause): Likewise.
3269         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
3270         FINALIZE}.
3271         (omp_clause_code_name): Likewise.
3273 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
3275         PR debug/86194
3276         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3277         be narrowed.
3279         PR tree-optimization/86231
3280         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
3281         anti-range don't overwrite *vr0min before using it to compute *vr0max.
3283 2018-06-20  Tom de Vries  <tdevries@suse.de>
3285         PR tree-optimization/86097
3286         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
3287         iv type if signedness of iv type is not the same as that of *nit.
3289 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
3291         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
3292         EDGE_EH edges, verify they are all EDGE_EH.
3294 2018-06-20  Maya Rashish  <coypu@sdf.org>
3296         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
3298 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3300         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
3301         * config/aarch64/aarch64.c (xgene1_tunings): Add
3302         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
3303         (aarch64_mode_valid_for_sched_fusion_p):
3304         Allow 16-byte modes.
3305         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
3306         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
3307         128-bit modes.
3308         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
3309         New pattern.
3310         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
3311         * config/aarch64/iterators.md (VQ2): New mode iterator.
3313 2018-06-20  Martin Liska  <mliska@suse.cz>
3315         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3316         Change default ratio from 10 to 8.
3318 2018-06-20  Martin Liska  <mliska@suse.cz>
3320         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3321         New.
3322         (bit_test_cluster::find_bit_tests): Likewise.
3323         (switch_decision_tree::analyze_switch_statement): Find clusters.
3324         * tree-switch-conversion.h (struct jump_table_cluster): Document
3325         hierarchy.
3327 2018-06-20  Martin Liska  <mliska@suse.cz>
3329         * tree-switch-conversion.c (switch_conversion::collect):
3330         Record m_uniq property.
3331         (switch_conversion::expand): Bail out for special conditions.
3332         (group_cluster::~group_cluster): New.
3333         (group_cluster::group_cluster): Likewise.
3334         (group_cluster::dump): Likewise.
3335         (jump_table_cluster::emit): New.
3336         (switch_decision_tree::fix_phi_operands_for_edges): New.
3337         (struct case_node): Remove struct.
3338         (jump_table_cluster::can_be_handled): New.
3339         (case_values_threshold): Moved to header.
3340         (reset_out_edges_aux): Likewise.
3341         (jump_table_cluster::is_beneficial): New.
3342         (bit_test_cluster::can_be_handled): Likewise.
3343         (add_case_node): Remove.
3344         (bit_test_cluster::is_beneficial): New.
3345         (case_bit_test::cmp): New.
3346         (bit_test_cluster::emit): New.
3347         (expand_switch_as_decision_tree_p): Remove.
3348         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
3349         (fix_phi_operands_for_edge): Likewise.
3350         (switch_decision_tree::analyze_switch_statement): New.
3351         (compute_cases_per_edge): Move ...
3352         (switch_decision_tree::compute_cases_per_edge): ... here.
3353         (try_switch_expansion): Likewise.
3354         (switch_decision_tree::try_switch_expansion): Likewise.
3355         (record_phi_operand_mapping): Likewise.
3356         (switch_decision_tree::record_phi_operand_mapping): Likewise.
3357         (emit_case_decision_tree): Likewise.
3358         (switch_decision_tree::emit): Likewise.
3359         (balance_case_nodes): Likewise.
3360         (switch_decision_tree::balance_case_nodes): Likewise.
3361         (dump_case_nodes): Likewise.
3362         (switch_decision_tree::dump_case_nodes): Likewise.
3363         (emit_jump): Likewise.
3364         (switch_decision_tree::emit_jump): Likewise.
3365         (emit_cmp_and_jump_insns): Likewise.
3366         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3367         (emit_case_nodes): Likewise.
3368         (switch_decision_tree::emit_case_nodes): Likewise.
3369         (conditional_probability): Remove.
3370         * tree-switch-conversion.h (enum cluster_type): New.
3371         (PRINT_CASE): New.
3372         (struct cluster): Likewise.
3373         (cluster::cluster): Likewise.
3374         (struct simple_cluster): Likewise.
3375         (simple_cluster::simple_cluster): Likewise.
3376         (struct group_cluster): Likewise.
3377         (struct jump_table_cluster): Likewise.
3378         (struct bit_test_cluster): Likewise.
3379         (struct min_cluster_item): Likewise.
3380         (struct case_tree_node): Likewise.
3381         (case_tree_node::case_tree_node): Likewise.
3382         (jump_table_cluster::case_values_threshold): Likewise.
3383         (struct case_bit_test): Likewise.
3384         (struct switch_decision_tree): Likewise.
3385         (struct switch_conversion): Likewise.
3386         (switch_decision_tree::reset_out_edges_aux): Likewise.
3388 2018-06-20  Martin Liska  <mliska@suse.cz>
3390         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
3391         (hoist_edge_and_branch_if_true): Likewise.
3392         (expand_switch_using_bit_tests_p): Likewise.
3393         (struct case_bit_test): Likewise.
3394         (case_bit_test_cmp): Likewise.
3395         (emit_case_bit_tests): Likewise.
3396         (switch_conversion::switch_conversion): New class.
3397         (struct switch_conv_info): Remove old struct.
3398         (collect_switch_conv_info): More to ...
3399         (switch_conversion::collect): ... this.
3400         (check_range): Likewise.
3401         (switch_conversion::check_range): Likewise.
3402         (check_all_empty_except_final): Likewise.
3403         (switch_conversion::check_all_empty_except_final): Likewise.
3404         (check_final_bb): Likewise.
3405         (switch_conversion::check_final_bb): Likewise.
3406         (create_temp_arrays): Likewise.
3407         (switch_conversion::create_temp_arrays): Likewise.
3408         (free_temp_arrays): Likewise.
3409         (gather_default_values): Likewise.
3410         (switch_conversion::gather_default_values): Likewise.
3411         (build_constructors): Likewise.
3412         (switch_conversion::build_constructors): Likewise.
3413         (constructor_contains_same_values_p): Likewise.
3414         (switch_conversion::contains_same_values_p): Likewise.
3415         (array_value_type): Likewise.
3416         (switch_conversion::array_value_type): Likewise.
3417         (build_one_array): Likewise.
3418         (switch_conversion::build_one_array): Likewise.
3419         (build_arrays): Likewise.
3420         (switch_conversion::build_arrays): Likewise.
3421         (gen_def_assigns): Likewise.
3422         (switch_conversion::gen_def_assigns): Likewise.
3423         (prune_bbs): Likewise.
3424         (switch_conversion::prune_bbs): Likewise.
3425         (fix_phi_nodes): Likewise.
3426         (switch_conversion::fix_phi_nodes): Likewise.
3427         (gen_inbound_check): Likewise.
3428         (switch_conversion::gen_inbound_check): Likewise.
3429         (process_switch): Use the newly created class.
3430         (switch_conversion::expand): New.
3431         (switch_conversion::~switch_conversion): New.
3432         * tree-switch-conversion.h: New file.
3434 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3436         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
3437         tree-vect-patterns.c.
3438         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
3439         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
3440         (vect_recog_sad_pattern): Likewise.
3441         (vect_recog_widen_sum_pattern): Likewise.
3442         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
3443         (vect_recog_widen_shift_pattern): Remove the type_in argument.
3444         (vect_recog_rotate_pattern): Likewise.
3445         (vect_recog_mult_pattern): Likewise.
3446         (vect_recog_vector_vector_shift_pattern): Likewise.
3447         (vect_recog_divmod_pattern): Likewise.
3448         (vect_recog_mixed_size_cond_pattern): Likewise.
3449         (vect_recog_bool_pattern): Likewise.
3450         (vect_recog_mask_conversion_pattern): Likewise.
3451         (vect_try_gather_scatter_pattern): Likewise.
3452         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
3453         (vect_recog_over_widening_pattern): Likewise.
3454         (vect_recog_gather_scatter_pattern): Likewise.
3455         (vect_recog_func_ptr): Move from tree-vectorizer.h
3456         (vect_vect_recog_func_ptrs): Move further down the file.
3457         (vect_recog_func): Likewise.  Remove the third argument.
3458         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
3459         (vect_pattern_recog_1): Expect the pattern function to do any
3460         necessary target tests.  Also expect it to provide a vector type.
3461         Remove the type_in handling.
3463 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3465         * tree-vect-patterns.c (vect_pattern_detected): New function.
3466         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
3467         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
3468         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
3469         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
3470         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3471         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3472         (vect_recog_mask_conversion_pattern)
3473         (vect_try_gather_scatter_pattern): Likewise.
3475 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3477         * tree-vect-patterns.c (vect_get_internal_def): New function.
3478         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3479         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
3480         (search_type_for_mask_1): Use it.
3482 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3484         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3485         redundant WIDEN_SUM_EXPR handling.
3486         (vect_recog_sad_pattern): Likewise.
3488 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3490         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3491         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
3492         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
3493         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
3494         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
3496 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3498         * tree-vect-stmts.c (vectorizable_call): Make sure that we
3499         use the stmt_vec_info of the original bb statement for the
3500         new zero assignment, even if the call is part of a pattern.
3502 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3504         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
3505         that the sequence is attached to the original statement rather
3506         than the pattern statement.
3507         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
3508         PATTERN_DEF_SEQ from the original statement rather than
3509         the main pattern statement.
3510         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
3511         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
3512         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
3514 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3516         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
3517         definition statements before the early exit for statements that aren't
3518         live or relevant.
3519         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
3520         split out from...
3521         (vect_transform_loop): ...here.  Process pattern definition
3522         statements without first checking whether the main pattern
3523         statement is live or relevant.
3525 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
3527         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
3528         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
3530 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
3532         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
3533         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
3534         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
3535         (expand_block_compare): Change select_block_compare_mode call.
3536         (expand_strncmp_align_check): Use new functions, fix comment.
3537         (emit_final_str_compare_gpr): New function.
3538         (expand_strn_compare): Refactor and clean up code.
3539         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
3541 2018-06-19  Tony Reix  <tony.reix@atos.com>
3542             Damien Bergamini  <damien.bergamini@atos.com>
3543             David Edelsohn  <dje.gcc@gmail.com>
3545         * collect2.c (static_obj): New variable.
3546         (static_libs): New variable.
3547         (is_in_list): Uncomment declaration.
3548         (main): Track AIX libraries linked statically.
3549         (is_in_list): Uncomment definition.
3550         (scan_prog_file): Don't add AIX shared libraries initializer
3551         to constructor list if linking statically.
3553 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
3555         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
3556         constant.
3557         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
3559 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
3561         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
3562         blocks.
3564 2018-06-19  Martin Liska  <mliska@suse.cz>
3566         * config/i386/i386.c (ix86_can_inline_p): Do not use
3567         ipa_fn_summaries::get_create.
3568         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
3569         get.
3570         (devirtualization_time_bonus): Likewise.
3571         (ipcp_propagate_stage): Likewise.
3572         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3573         (edge_set_predicate): Likewise.
3574         (evaluate_conditions_for_known_args): Likewise.
3575         (evaluate_properties_for_edge): Likewise.
3576         (ipa_call_summary::reset): Tranform to ...
3577         (ipa_call_summary::~ipa_call_summary): ... this.
3578         (ipa_fn_summary::reset): Transform to ...
3579         (ipa_fn_summary::~ipa_fn_summary): ... this.
3580         (ipa_fn_summary_t::remove): Rename to ...
3581         (ipa_fn_summary_t::remove_callees): ... this.
3582         (ipa_fn_summary_t::duplicate): Use placement new
3583         instead of memory copy.
3584         (ipa_call_summary_t::duplicate): Likewise.
3585         (ipa_call_summary_t::remove): Remove.
3586         (dump_ipa_call_summary): Change get_create to get.
3587         (ipa_dump_fn_summary): Dump only when summary exists.
3588         (analyze_function_body): Use symbol_summary::get instead
3589         of get_create.
3590         (compute_fn_summary): Likewise.
3591         (estimate_edge_devirt_benefit): Likewise.
3592         (estimate_edge_size_and_time): Likewise.
3593         (inline_update_callee_summaries): Likewise.
3594         (remap_edge_change_prob): Likewise.
3595         (remap_edge_summaries): Likewise.
3596         (ipa_merge_fn_summary_after_inlining): Likewise.
3597         (write_ipa_call_summary): Likewise.
3598         (ipa_fn_summary_write): Likewise.
3599         (ipa_free_fn_summary): Likewise.
3600         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
3601         (struct ipa_call_summary): Likewise.
3602         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
3603         of get_create.
3604         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
3605         (estimate_size_after_inlining): Likewise.
3606         (estimate_growth): Likewise.
3607         (growth_likely_positive): Likewise.
3608         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3609         (inline_call): Likewise.
3610         * ipa-inline.c (caller_growth_limits): Likewise.
3611         (can_inline_edge_p): Likewise.
3612         (can_inline_edge_by_limits_p): Likewise.
3613         (compute_uninlined_call_time): Likewise.
3614         (compute_inlined_call_time): Likewise.
3615         (want_inline_small_function_p): Likewise.
3616         (edge_badness): Likewise.
3617         (update_caller_keys): Likewise.
3618         (update_callee_keys): Likewise.
3619         (inline_small_functions): Likewise.
3620         (inline_to_all_callers_1): Likewise.
3621         (dump_overall_stats): Likewise.
3622         (early_inline_small_functions): Likewise.
3623         (early_inliner): Likewise.
3624         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3625         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3626         * ipa-pure-const.c (malloc_candidate_p): Likewise.
3627         * ipa-split.c (execute_split_functions): Likewise.
3628         * symbol-summary.h: Likewise.
3629         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3631 2018-06-19  Richard Biener  <rguenther@suse.de>
3633         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
3634         (vectorize_loops): ... here.  Fix dbgcnt handling.
3635         (try_vectorize_loop): Wrap try_vectorize_loop_1.
3637 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
3639         PR target/86197
3640         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3641         ieee128 argument takes up only one (vector) register, not two (floating
3642         point) registers.
3644 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
3646         * gimplify.c (gimplify_init_constructor): Really never clear for an
3647         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3649 2018-06-19  Richard Biener  <rguenther@suse.de>
3651         PR tree-optimization/86179
3652         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
3653         after failed recognition.
3655 2018-06-18  Martin Sebor  <msebor@redhat.com>
3657         PR middle-end/85602
3658         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3659         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3660         Handle integer subtraction.
3661         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3662         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3664 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
3666         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
3667         param from rtx to rtx_insn *.
3668         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
3669         param.
3670         (frv_ifcvt_modify_insn): Likwise.
3671         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
3672         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
3673         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
3674         as_a <rtx_insn *> cast to local "unprotected_region" once
3675         it's been established that it's not NULL or pc_rtx.
3676         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
3677         param "sethi" from rtx to rtx_insn *.
3678         (nds32_group_float_insns): Likewise for param "insn".
3679         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
3680         param.
3681         (vax_output_int_subtract): Likewise.
3682         * config/vax/vax.c (vax_output_int_add): Likewise for param
3683         "insn".
3684         (vax_output_int_subtract): Likewise.
3685         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
3686         (emit_pattern_after): Likewise for param "after".
3687         (emit_insn_after): Likewise.
3688         (emit_jump_insn_after): Likewise.
3689         (emit_call_insn_after): Likewise.
3690         (emit_debug_insn_after): Likewise.
3691         (emit_pattern_before): Likewise for param "before".
3692         (emit_insn_before): Likewise.
3693         (emit_jump_insn_before): Likewise.
3694         * final.c (get_insn_template): Likewise for param "insn", removing
3695         a cast.
3696         * output.h (get_insn_template): Likewise for 2nd param.
3697         * rtl.h (emit_insn_before): Likewise.
3698         (emit_jump_insn_before): Likewise.
3699         (emit_debug_insn_before_noloc): Likewise.
3700         (emit_insn_after): Likewise.
3701         (emit_jump_insn_after): Likewise.
3702         (emit_call_insn_after): Likewise.
3703         (emit_debug_insn_after): Likewise.
3704         (set_insn_deleted): Likewise for param.
3706 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
3708         PR target/85358
3709         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3710         floating point modes, so that IFmode is numerically greater than
3711         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3712         to declare the ordering.  This prevents IFmode from being
3713         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3714         machine.  Include rs6000-modes.h to share the fractional values
3715         between genmodes* and the rest of the compiler.
3716         (IFmode): Likewise.
3717         (KFmode): Likewise.
3718         (TFmode): Likewise.
3719         * config/rs6000/rs6000-modes.h: New file.
3720         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3721         meaning of rs6000_long_double_size so that 126..128 selects an
3722         appropriate 128-bit floating point type.
3723         (rs6000_option_override_internal): Likewise.
3724         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3725         (TARGET_LONG_DOUBLE_128): Change the meaning of
3726         rs6000_long_double_size so that 126..128 selects an appropriate
3727         128-bit floating point type.
3728         (LONG_DOUBLE_TYPE_SIZE): Update comment.
3729         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3730         source and destination to match the standard usage.
3731         (truncifkf2): Likewise.
3732         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3733         ISA 2.07 to use an explicit clobber, instead of passing in a
3734         temporary.
3735         (copysign<mode>3_soft): Likewise.
3737 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
3739         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3740         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
3741         (vect_slp_analyze_instance_dependence): Likewise.
3742         (vect_enhance_data_refs_alignment): Likewise.
3743         (vect_analyze_data_refs_alignment): Likewise.
3744         (vect_slp_analyze_and_verify_instance_alignment
3745         (vect_analyze_data_ref_accesses): Likewise.
3746         (vect_prune_runtime_alias_test_list): Likewise.
3747         (vect_analyze_data_refs): Likewise.
3748         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
3749         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
3750         (vect_analyze_scalar_cycles_1): Likewise.
3751         (vect_get_loop_niters): Likewise.
3752         (vect_analyze_loop_form_1): Likewise.
3753         (vect_update_vf_for_slp): Likewise.
3754         (vect_analyze_loop_operations): Likewise.
3755         (vect_analyze_loop): Likewise.
3756         (vectorizable_induction): Likewise.
3757         (vect_transform_loop): Likewise.
3758         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
3759         * tree-vect-slp.c (vect_analyze_slp): Likewise.
3760         (vect_make_slp_decision): Likewise.
3761         (vect_detect_hybrid_slp): Likewise.
3762         (vect_slp_analyze_operations): Likewise.
3763         (vect_slp_bb): Likewise.
3764         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
3765         (vectorizable_bswap): Likewise.
3766         (vectorizable_call): Likewise.
3767         (vectorizable_simd_clone_call): Likewise.
3768         (vectorizable_conversion): Likewise.
3769         (vectorizable_assignment): Likewise.
3770         (vectorizable_shift): Likewise.
3771         (vectorizable_operation): Likewise.
3772         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
3774 2018-06-18  Martin Sebor  <msebor@redhat.com>
3776         PR tree-optimization/81384
3777         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
3778         * builtins.c (expand_builtin_strnlen): New function.
3779         (expand_builtin): Call it.
3780         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
3781         * builtins.def (BUILT_IN_STRNLEN): New.
3782         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
3783         Warn for bounds in excess of maximum object size.
3784         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
3785         single-value ranges.  Handle strnlen.
3786         (handle_builtin_strlen): Handle strnlen.
3787         (strlen_check_and_optimize_stmt): Same.
3788         * doc/extend.texi (Other Builtins): Document strnlen.
3790 2018-06-18  Maya Rashish  <coypu@sdf.org>
3792         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
3793         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
3794         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
3796         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
3797         here to ...
3798         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
3800 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3802         * tree.c (escaped_string::escape): Replace cast to char * by
3803         const_cast<char *> (unescaped).
3805 2018-06-18  Nick Clifton  <nickc@redhat.com>
3807         PR 84195
3808         * tree.c (escaped_string): New class.  Converts an unescaped
3809         string into its escaped equivalent.
3810         (warn_deprecated_use): Use the new class to convert the
3811         deprecation message, if present.
3812         (test_escaped_strings): New self test.
3813         (test_c_tests): Add test_escaped_strings.
3814         * doc/extend.texi (deprecated): Add a note that the
3815         deprecation message is affected by the -fmessage-length
3816         option, and that control characters will be escaped.
3817         (#pragma GCC error): Document this pragma.
3818         (#pragma GCC warning): Likewise.
3819         * doc/invoke.texi (-fmessage-length): Document this option's
3820         effect on the #warning and #error preprocessor directives and
3821         the deprecated attribute.
3823 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
3825         * tree.c (decl_value_expr_lookup): Revert latest change.
3826         (decl_value_expr_insert): Likewise.
3828 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
3830         * gimplify.c (nonlocal_vlas): Delete.
3831         (nonlocal_vla_vars): Likewise.
3832         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
3833         referenced VLAs.
3834         (gimplify_body): Do not create and destroy nonlocal_vlas.
3835         * tree-nested.c: Include diagnostic.h.
3836         (use_pointer_in_frame): Tweak.
3837         (lookup_field_for_decl): Add assertion and declare the transformation.
3838         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
3839         internal error when the reference is in a wrong context.  Do not
3840         create a debug decl by default.
3841         (note_nonlocal_block_vlas): Delete.
3842         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
3843         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
3844         create a debug decl by default.
3845         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
3846         call is in a wrong context.
3847         (fixup_vla_decls): New function.
3848         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
3849         debug variables were created.
3850         * tree.c (decl_value_expr_lookup): Add checking assertion.
3851         (decl_value_expr_insert): Likewise.
3853 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
3855         PR middle-end/82479
3856         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
3857         * tree-scalar-evolution.c (interpret_expr): Likewise.
3858         (expression_expensive_p): Likewise.
3859         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
3860         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
3861         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
3862         (ssa_defined_by_minus_one_stmt_p): New.
3864 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
3866         PR middle-end/64946
3867         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
3868         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
3869         * dojump.c (do_jump): Likewise.
3870         * expr.c (expand_expr_real_2): Check operand type's sign.
3871         * fold-const.c (const_unop): Handle ABSU_EXPR.
3872         (fold_abs_const): Likewise.
3873         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
3874         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
3875         (strip_sign_op_1): Likesise.
3876         * match.pd: Add new pattern to generate ABSU_EXPR.
3877         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
3878         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3879         * tree-eh.c (operation_could_trap_helper_p): Likewise.
3880         * tree-inline.c (estimate_operator_cost): Likewise.
3881         * tree-pretty-print.c (dump_generic_node): Likewise.
3882         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
3883         * tree.def (ABSU_EXPR): New.
3885 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
3887         PR middle-end/86095
3888         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
3889         documented as preserved for backward compatibility only.
3890         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
3892         PR rtl-optimization/86108
3893         * bb-reorder.c (create_forwarder_block): Renamed to ...
3894         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
3895         jump from new landing pad to the second part.
3896         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
3897         Adjust callers.
3899 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
3901         PR middle-end/85878
3902         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
3903         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
3904         Only call store_expr for halves if the mode is the same.
3906         PR middle-end/86123
3907         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
3908         Fix up comment formatting.
3910 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3912         * typed-splay-tree.h (typed_splay_tree::remove): New function.
3913         (typed_splay_tree::closure,
3914         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
3915         (typed_splay_tree::typed_splay_tree,
3916         typed_splay_tree::operator =): Declared private.
3917         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
3918         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
3919         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
3920         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
3921         typed_splay_tree::splay_tree_splay,
3922         typed_splay_tree::splay_tree_foreach_helper,
3923         typed_splay_tree::splay_tree_insert,
3924         typed_splay_tree::splay_tree_remove,
3925         typed_splay_tree::splay_tree_lookup,
3926         typed_splay_tree::splay_tree_predecessor,
3927         typed_splay_tree::splay_tree_successor,
3928         typed_splay_tree::splay_tree_min,
3929         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
3930         (typed_splay_tree::root, typed_splay_tree::comp,
3931         typed_splay_tree::delete_key,
3932         typed_splay_tree::delete_value): New data members.
3933         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
3934         typed_splay_tree::remove.
3936 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
3938         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
3939         -mginv and -mno-ginv to the assembler.
3940         * config/mips/mips.opt (-mcrc): New option.
3941         (-mginv): Likewise.
3942         * doc/invoke.text (-mcrc): Document.
3943         (-mginv): Likewise.
3945 2018-06-15  Nick Clifton  <nickc@redhat.com>
3947         PR 84195
3948         * tree.c (escaped_string): New class.  Converts an unescaped
3949         string into its escaped equivalent.
3950         (warn_deprecated_use): Use the new class to convert the
3951         deprecation message, if present.
3952         (test_escaped_strings): New self test.
3953         (test_c_tests): Add test_escaped_strings.
3954         * doc/extend.texi (deprecated): Add a note that the
3955         deprecation message is affected by the -fmessage-length
3956         option, and that control characters will be escaped.
3957         (#pragma GCC error): Document this pragma.
3958         (#pragma GCC warning): Likewise.
3959         * doc/invoke.texi (-fmessage-length): Document this option's
3960         effect on the #warning and #error preprocessor directives and
3961         the deprecated attribute.
3963 2018-06-15  Richard Biener  <rguenther@suse.de>
3965         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
3966         here, also noting vector size used.
3967         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
3968         size used in MSG_OPTIMIZED_LOCATIONS dump.
3969         (pass_slp_vectorize::execute): Adjust.
3971 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
3973         PR target/85968
3974         * config/arc/arc.c (arc_return_address_register): Fix
3975         if-condition.
3977 2018-06-15  Richard Biener  <rguenther@suse.de>
3979         PR middle-end/86159
3980         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
3981         leave useless conversion stripping to force_gimple_operand_gsi.
3982         (gimplify_build2): Likewise.
3983         (gimplify_build1): Likewise.
3985 2018-06-15  Richard Biener  <rguenther@suse.de>
3987         PR middle-end/86076
3988         * tree-cfg.c (move_stmt_op): unshare invariant addresses
3989         before adjusting their block.
3991 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3993         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3994         multilibs for *-*-rtems*.
3995         * config/riscv/t-rtems: New file.
3997 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
3999         PR middle-end/86122
4000         * match.pd ((A +- CST1) +- CST2): Punt if last resort
4001         unsigned_type_for returns NULL.
4003         PR target/85945
4004         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
4005         subregs of multi-word pseudos unless the float mode has word size.
4007 2018-06-14  Richard Biener  <rguenther@suse.de>
4009         PR middle-end/86139
4010         * tree-vect-generic.c (build_word_mode_vector_type): Remove
4011         duplicate and harmful type_hash_canon.
4012         * tree.c (type_hash_canon): Assert we didn't find ourselves.
4014 2018-06-14  Richard Biener  <rguenther@suse.de>
4016         PR ipa/86124
4017         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
4018         NULL cgraph_node.
4020 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4022         * config/rtems.h (STDINT_LONG32): Define.
4024 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
4025             Prachi Godbole  <prachi.godbole@imgtec.com>
4027         * config/mips/mips-cpus.def: Define P6600.
4028         * config/mips/mips-tables.opt: Regenerate.
4029         * config/mips/mips.c (mips_ucbranch_type): New enum.
4030         (mips_rtx_cost_data): Add support for P6600.
4031         (mips_issue_rate): Likewise.
4032         (mips_multipass_dfa_lookahead): Likewise.
4033         (mips_avoid_hazard): Likewise.
4034         (mips_reorg_process_insns): Likewise.
4035         (mips_classify_branch_p6600): New function.
4036         * config/mips/mips.h (TUNE_P6600): New define.
4037         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
4038         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
4039         * config/mips/mips.md: Include p6600.md.
4040         (processor): Add p6600.
4041         * config/mips/p6600.md: New file.
4042         * doc/invoke.texi: Add p6600 to supported architectures.
4044 2018-06-13  Martin Sebor  <msebor@redhat.com>
4046         PR tree-optimization/86114
4047         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
4048         of integer types.
4049         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
4051 2018-06-13  Richard Biener  <rguenther@suse.de>
4053         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
4054         Properly set vector type of the intermediate stmt.
4055         * tree-vect-stmts.c (vectorizable_operation): The destination
4056         var always has vectype_out type.
4058 2018-06-13  Jeff Law  <law@redhat.com>
4060         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
4061         integer 0 for argument to print_rtl_with_bb.
4062         (rl78_reorg): Likewise.
4064 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
4066         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
4067         from rtx to rtx_insn *.
4068         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
4069         "label".
4070         (add_sched_insns_for_speculation): Likewise for local "target",
4071         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4072         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
4073         from rtx_insn ** to rtx_code_label **.
4074         (reorg_emit_nops): Likewise.
4075         (c6x_reorg): Likewise for local "call_labels".
4076         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
4077         rtx to rtx_insn *.
4078         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
4079         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
4080         the loops over LABEL_REFS.
4081         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
4082         braf_label.
4083         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4084         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
4085         (split_branches): Strengthen local "olabel" from rtx to
4086         rtx_insn *, adding a safe_as_a cast.
4087         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
4088         to "rtx_insn *".
4089         (add_insn_after): Likewise for first two params.
4090         (add_insn_before): Likewise.
4091         (remove_insn): Likewise for param.
4092         (emit_pattern_before_noloc): Likewise for second and third params.
4093         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
4094         (emit_call_insn_before_noloc): Likewise.
4095         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
4096         to "rtx_insn *".
4097         (emit_barrier_before): Likewise.
4098         (emit_label_before): Strengthen "label" param from "rtx" to
4099         "rtx_code_label *".  Strengthen "before" param from "rtx" to
4100         "rtx_insn *".
4101         (emit_insn_after_1): Strengthen "after" param from "rtx" to
4102         "rtx_insn *".
4103         (emit_pattern_after_noloc): Likewise.
4104         (emit_insn_after_noloc): Likewise.
4105         (emit_jump_insn_after_noloc): Likewise.
4106         (emit_call_insn_after_noloc): Likewise.
4107         (emit_debug_insn_after_noloc): Likewise.
4108         (emit_barrier_after): Likewise.
4109         (emit_label_after): Likewise for both params.
4110         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
4111         "loc" param from "int" to "location_t".
4112         (emit_insn_after_setloc): Likewise.
4113         (emit_jump_insn_after_setloc): Likewise.
4114         (emit_call_insn_after_setloc): Likewise.
4115         (emit_debug_insn_after_setloc): Likewise.
4116         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
4117         "loc" param from "int" to "location_t".
4118         (emit_pattern_before): Convert NULL_RTX to NULL.
4119         (emit_insn_before_setloc): Convert "loc" param from "int" to
4120         "location_t".
4121         (emit_jump_insn_before_setloc): Likewise.
4122         (emit_call_insn_before_setloc): Likewise.
4123         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
4124         rtx_insn *.  Convert "loc" param from "int" to "location_t".
4125         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
4126         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
4127         Convert 3rd param from "int" to "location_t".
4128         (emit_barrier_before, emit_barrier_after, next_real_insn):
4129         Strengthen param from rtx to rtx_insn *.
4130         (emit_label_before): Strengthen 1st param from "rtx" to
4131         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
4132         "rtx_insn *".
4133         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
4134         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
4135         Strengthen 2nd param from "rtx" to "rtx_insn *".
4136         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4137         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4138         Likewise. Convert 3rd param from "int" to "location_t".
4139         (emit_label_after): Strengthen 1st param from "rtx" to
4140         "rtx_code_label *".
4141         (next_real_insn, remove_insn): Strengthen param from "rtx" to
4142         "rtx_insn *".
4143         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
4144         from "rtx" to "rtx_insn *".
4146 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
4148         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
4149         bodies streamed in with -Q.
4150         * dumpfile.c (dump_files): Add lto-stream-out dump file.
4151         * dumpfile.h (tree_dump_index): Add lto_stream_out.
4152         * gimple-streamer-out.c: Include gimple-pretty-print.h
4153         (output_bb): Dump stmts streamed.
4154         * lto-section-out.c: Include print-tree.h
4155         (lto_begin_section): Dump sections created.
4156         (lto_output_decl_index): Dump decl encoded.
4157         * lto-streamer-out.c: Include print-tree.h
4158         (create_output_block): Dump output block created.
4159         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
4160         (output_function): Dump function output.
4161         (output_constructor): Dump constructor streamed.
4162         (write_global_stream): Output indexes encoded.
4163         (produce_asm_for_decls): Dump streams encoded.
4164         * lto-streamer.c (streamer_dump_file): New global var.
4165         * lto-streamer.h (streamer_dump_file): Declare.
4166         * passes.c (ipa_write_summaries): Initialize streamer dump.
4167         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
4168         in.
4170 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
4172         PR target/86048
4173         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4174         offsets for register save directives.  Emit a second batch of save
4175         directives, if need be, when the function accesses prior frames.
4177 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4179         * config/arc/fpu.md (fmasf4): Force operand to register.
4180         (fnmasf4): Likewise.
4182 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4184         * config/arc/arc-protos.h (arc_pad_return): Remove.
4185         * config/arc/arc.c (machine_function): Remove force_short_suffix
4186         and size_reason.
4187         (arc_print_operand): Adjust printing of '&'.
4188         (arc_verify_short): Remove conditional printing of short suffix.
4189         (arc_final_prescan_insn): Remove reference to size_reason.
4190         (pad_return): New function.
4191         (arc_reorg): Call pad_return.
4192         (arc_pad_return): Remove.
4193         (arc_init_machine_status): Remove reference to force_short_suffix.
4194         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
4195         (attr length): When attribute iscompact is true force to 2
4196         regardless; in the case of maybe check if we want to force the
4197         instruction to have 4 bytes length.
4198         (nopv): Change it to generate 4 byte long nop as well.
4199         (blockage): New pattern.
4200         (simple_return): Remove call to arc_pad_return.
4201         (p_return_i): Likewise.
4203 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4205         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
4207 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4209         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
4210         ARC cores.
4212 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4214         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
4215         for ARC700 and ARCv2.
4217 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
4219         PR target/86076
4220         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
4221         operands[2] instead of operands[1].
4224 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
4226         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
4227         case, check whether the outer register overlaps an unallocatable
4228         register, not just whether it fits the required class.
4230 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
4232         * poly-int.h (can_div_trunc_p): Add new overload in which all values
4233         are poly_ints.
4234         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
4235         (memrefs_conflict_p): Likewise.
4236         (init_alias_analysis): Likewise.
4237         * cfgexpand.c (expand_debug_expr): Likewise.
4238         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
4239         * cse.c (fold_rtx): Likewise.
4240         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
4241         * expr.c (emit_block_move_hints): Likewise.
4242         (clear_storage_hints, push_block, emit_push_insn): Likewise.
4243         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
4244         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
4245         (emit_group_store): Likewise.
4246         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
4247         to read the PRE/POST_MODIFY increment.
4248         * calls.c (store_one_arg): Use strip_offset.
4249         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
4250         poly_int_rtx_p.
4251         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
4252         by a VEC_SELECT.
4253         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
4254         (simplify_binary_operation_1): Extend CONST_INT handling to
4255         poly_int_rtx_p.
4256         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
4257         than a HOST_WIDE_INT.
4258         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
4259         poly_int64.
4260         (adjust_mems, add_stores): Update accodingly.
4261         (vt_canonicalize_addr): Track polynomial offsets.
4262         (emit_note_insn_var_location): Likewise.
4263         (vt_add_function_parameter): Likewise.
4264         (vt_initialize): Likewise.
4266 2018-06-12  Jeff Law  <law@redhat.com>
4268         * config.gcc (alpha*-*-freebsd*): Remove.
4269         * config/alpha/freebsd.h: Remove.
4271 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
4273         PR other/69968
4274         * spellcheck-tree.c (levenshtein_distance): Rename to...
4275         (get_edit_distance): ...this, and update for underlying renaming.
4276         * spellcheck-tree.h (levenshtein_distance): Rename to...
4277         (get_edit_distance): ...this.
4278         * spellcheck.c (levenshtein_distance): Rename to...
4279         (get_edit_distance): ...this.  Convert from Levenshtein distance
4280         to Damerau-Levenshtein distance by supporting transpositions of
4281         adjacent characters.  Rename "v1" to "v_next" and "v0" to
4282         "v_one_ago".
4283         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
4284         (selftest::test_edit_distance_unit_test_oneway): ...this, and
4285         update for underlying renaming.
4286         (selftest::levenshtein_distance_unit_test): Rename to...
4287         (selftest::test_get_edit_distance_unit): ...this, and update for
4288         underlying renaming.
4289         (selftest::test_find_closest_string): Add example from PR 69968
4290         where transposition helps
4291         (selftest::test_metric_conditions): Update for renaming.
4292         (selftest::test_metric_conditions): Likewise.
4293         (selftest::spellcheck_c_tests): Likewise.
4294         * spellcheck.h (levenshtein_distance): Rename both overloads to...
4295         (get_edit_distance): ...this.
4296         (best_match::consider): Update for renaming.
4298 2018-06-12  Martin Sebor  <msebor@redhat.com>
4300         PR tree-optimization/85259
4301         * builtins.c (compute_objsize): Handle constant offsets.
4302         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
4303         true iff a warning has been issued.
4304         * gimple.h (gimple_nonartificial_location): New function.
4305         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
4306         gimple_nonartificial_location and handle -Wno-system-headers.
4307         (handle_builtin_stxncpy): Same.
4309 2018-06-12  Martin Sebor  <msebor@redhat.com>
4311         PR c/85931
4312         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
4314 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
4316         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4317         BUILTIN_VEC_XST entries for pointer to double and long long.
4319 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
4321         PR target/85990
4322         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4323         Update comments.
4324         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4325         Likewise.
4327 2018-06-12  Martin Liska  <mliska@suse.cz>
4329         * doc/options.texi: Document IntegerRange.
4331 2018-06-12  Martin Liska  <mliska@suse.cz>
4333         * config/i386/i386.opt: Make MPX-related options as Deprecated.
4334         * opt-functions.awk: Handle Deprecated flag.
4335         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
4336         and report error.
4337         (read_cmdline_option): Report warning for a deprecated option.
4338         * opts.h (struct cl_option): Add new field cl_deprecated.
4339         (CL_ERR_DEPRECATED): New.
4341 2018-06-12  Martin Liska  <mliska@suse.cz>
4343         * doc/options.texi: Document Deprecated option flag.
4345 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4347         * config/arc/arc-arch.h (arc_extras): New enum.
4348         (arc_cpu_t):Add field extra.
4349         (arc_cpu_types): Consider the extras.
4350         * config/arc/arc-cpus.def: Add extras info.
4351         * config/arc/arc-opts.h (processor_type): Consider extra field.
4352         * config/arc/arc.c (arc_override_options): Handle extra field.
4354 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4356         * config/arc/arc-arch.h: Update ARC_OPTX macro.
4357         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
4358         field.
4359         * config/arc/arc.c (arc_init): Update pic warning.
4360         (irq_range): Update irq range parsing warnings.
4361         (arc_override_options): Update various warning messages.
4362         (arc_handle_aux_attribute): Likewise.
4364 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
4366         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
4368 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4370         * doc/sourcebuild.texi: Document usage of line number 0 in verify
4371         compiler messages directives.
4373 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
4375         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
4376         * config/mips/mips-tables.opt: Regenerate.
4377         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
4378         mips64r6.
4379         * doc/invoke.texi: Document -march=i6500.
4381 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
4383         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
4384         (i6400_gpmul): Add cpu_unit.
4385         (i6400_gpdiv): Likewise.
4386         (i6400_msa_add_d): Update reservations.
4387         (i6400_msa_int_add) Likewise.
4388         (i6400_msa_short_logic3) Likewise.
4389         (i6400_msa_short_logic2) Likewise.
4390         (i6400_msa_short_logic) Likewise.
4391         (i6400_msa_move) Likewise.
4392         (i6400_msa_cmp) Likewise.
4393         (i6400_msa_short_float2) Likewise.
4394         (i6400_msa_div_d) Likewise.
4395         (i6400_msa_long_logic1) Likewise.
4396         (i6400_msa_long_logic2) Likewise.
4397         (i6400_msa_mult) Likewise.
4398         (i6400_msa_long_float2) Likewise.
4399         (i6400_msa_long_float4) Likewise.
4400         (i6400_msa_long_float5) Likewise.
4401         (i6400_msa_long_float8) Likewise.
4402         (i6400_fpu_fadd): Include frint type.
4403         (i6400_fpu_store): New define_insn_reservation.
4404         (i6400_fpu_load): Likewise.
4405         (i6400_fpu_move): Likewise.
4406         (i6400_fpu_fcmp): Likewise.
4407         (i6400_fpu_fmadd): Likewise.
4408         (i6400_int_mult): Include imul3nc type and update reservation.
4409         (i6400_int_div): Include idiv3 type and update reservation.
4410         (i6400_int_load): Update to check type not move_type.
4411         (i6400_int_store): Likewise.
4412         (i6400_int_prefetch): Set zero latency.
4414 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
4416         * gcc.c: Document new %@{...} sequence.
4417         (LINK_COMMAND_SPEC): Use it for the -L switches.
4418         (cpp_unique_options): Use it for the -I switches.
4419         (at_file_argbuf): New global variable.
4420         (in_at_file): Likewise.
4421         (alloc_args): Create at_file_argbuf.
4422         (clear_args): Truncate at_file_argbuf.
4423         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
4424         (open_at_file): New function.
4425         (close_at_file): Likewise.
4426         (create_at_file): Delete.
4427         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
4428         <'o'>: Likewise.
4429         <'@'>: New case.
4430         (validate_switches_from_spec): Deal with %@{...} sequence.
4431         (validate_switches): Likewise.
4432         (driver::finalize): Call clear_args.
4434 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
4436         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
4438 2018-06-11  Martin Sebor  <msebor@redhat.com>
4440         * doc/invoke.texi (-Wall): List -Wc++17-compat.
4441         (Wno-class-memaccess): Add @opindex.
4442         (Wno-templates, Wno-multiple-inheritance): Same.
4443         (Wno-virtual-inheritance, Wno-namespaces): Same.
4444         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
4445         (Wno-format-overflow, Wno-format-truncation): Same.
4446         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
4447         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
4448         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
4449         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
4450         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
4451         (Wno-misspelled-isr): Same.
4453 2018-06-11  Martin Sebor  <msebor@redhat.com>
4455         * PR tree-optimization/86083
4456         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
4458 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
4460         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
4462 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
4464         PR target/85755
4465         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
4466         on the correct operand.
4467         (*movdi_internal64): Ditto.
4469 2018-06-11  Martin Liska  <mliska@suse.cz>
4471         PR tree-optimization/86089
4472         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
4474 2018-06-11  Julia Koval  <julia.koval@intel.com>
4476         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
4477         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
4478         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
4480 2018-06-11  Olivier Hainque  <hainque@adacore.com>
4482         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
4483         for Ada with strict dwarf2.
4485 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
4487         PR target/85755
4488         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
4489         addresses.
4491 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
4493         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
4495 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
4497         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
4498         TARGET_ELF.
4500 2018-06-08  Martin Liska  <mliska@suse.cz>
4502         * tree-cfg.h (debug_function): Fix argument type to match
4503         implementation.
4505 2018-06-08  Martin Liska  <mliska@suse.cz>
4507         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
4508         Remove usage of MPX-related (and removed) fields.
4509         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
4511 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
4513         * cfg.c (debug): Use TDF_NONE rather than 0.
4514         * cfghooks.c (debug): Likewise.
4515         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
4516         (struct dump_option_value_info): Convert to...
4517         (struct kv_pair): ...this template type.
4518         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
4519         rather than 0.
4520         (optinfo_verbosity_options): Likewise.
4521         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
4522         OPTGROUP_NONE.
4523         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
4524         than int for "optgroup_flags" param.
4525         (dump_generic_expr_loc): Use dump_flags_t rather than int for
4526         "dump_kind" param.
4527         (dump_dec): Likewise.
4528         (dump_finish): Use TDF_NONE rather than 0.
4529         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
4530         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
4531         than 0.  Update for change to option_ptr.
4532         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
4533         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
4534         0.  Update for changes to optinfo_verbosity_options and
4535         optgroup_options.
4536         (opt_info_switch_p): Convert optgroup_flags from int to
4537         optgroup_flags_t.
4538         (dump_basic_block): Use dump_flags_t rather than int
4539         for "dump_kind" param.
4540         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
4541         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
4542         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
4543         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
4544         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
4545         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
4546         TDF_NONE): Convert from macros to...
4547         (enum dump_flag): ...this new enum.
4548         (dump_flags_t): Update to use enum.
4549         (operator|, operator&, operator~, operator|=, operator&=):
4550         Implement for dump_flags_t.
4551         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
4552         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
4553         Convert from macros to...
4554         (enum optgroup_flag): ...this new enum.
4555         (optgroup_flags_t): New typedef.
4556         (operator|, operator|=): Implement for optgroup_flags_t.
4557         (struct dump_file_info): Convert field "alt_flags" to
4558         dump_flags_t.  Convert field "optgroup_flags" to
4559         optgroup_flags_t.
4560         (dump_basic_block): Use dump_flags_t rather than int for param.
4561         (dump_generic_expr_loc): Likewise.
4562         (dump_dec): Likewise.
4563         (dump_register): Convert param "optgroup_flags" to
4564         optgroup_flags_t.
4565         (opt_info_enable_passes): Likewise.
4566         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
4567         than 0.
4568         * gimple-pretty-print.c (debug): Likewise.
4569         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
4570         (merged_store_group::apply_stores): Likewise.
4571         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
4572         * gimple.c (verify_gimple_pp): Likewise.
4573         * graphite-poly.c (print_pbb_body): Likewise.
4574         * passes.c (pass_manager::register_one_dump_file): Convert
4575         local "optgroup_flags" to optgroup_flags_t.
4576         * print-tree.c (print_node): Use TDF_NONE rather than 0.
4577         (debug): Likewise.
4578         (debug_body): Likewise.
4579         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
4580         to optgroup_flags_t.
4581         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
4582         than 0.
4583         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
4584         (convert_mult_to_fma): Likewise.
4585         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
4586         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
4587         * tree-vect-data-refs.c (dump_lower_bound): Convert param
4588         "dump_kind" to dump_flags_t.
4590 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
4592         * config/rs6000/rs6000.c (min, max): Delete.
4594 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
4596         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
4597         -mabi=spe and -mabi=no-spe.
4599 2018-06-08  Martin Liska  <mliska@suse.cz>
4601         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
4602         where we expect an existing summary.
4604 2018-06-08  Martin Liska  <mliska@suse.cz>
4606         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
4607         * ipa-inline.h (estimate_edge_growth): Likewise.
4609 2018-06-08  Martin Liska  <mliska@suse.cz>
4611         * cgraph.c (function_version_hasher::hash): Use
4612         cgraph_node::get_uid ().
4613         (function_version_hasher::equal):
4614         * cgraph.h (cgraph_node::get_uid): New method.
4615         * ipa-inline.c (update_caller_keys): Use
4616         cgraph_node::get_uid ().
4617         (update_callee_keys): Likewise.
4618         * ipa-utils.c (searchc): Likewise.
4619         (ipa_reduced_postorder): Likewise.
4620         * lto-cgraph.c (input_node): Likewise.
4621         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
4622         * symbol-summary.h (symtab_insertion): Likewise.
4623         (symtab_removal): Likewise.
4624         (symtab_duplication): Likewise.
4625         * tree-pretty-print.c (dump_function_header): Likewise.
4626         * tree-sra.c (convert_callers_for_node): Likewise.
4628 2018-06-08  Martin Liska  <mliska@suse.cz>
4630         * cgraph.c (symbol_table::create_edge): Always assign a new
4631         unique number.
4632         (symbol_table::free_edge): Do not recycle numbers.
4633         * cgraph.h (cgraph_edge::get): New method.
4634         * symbol-summary.h (symtab_removal): Use it.
4635         (symtab_duplication): Likewise.
4636         (call_summary::hashable_uid): Remove.
4638 2018-06-08  Martin Liska  <mliska@suse.cz>
4640         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
4641         (initialize_growth_caches): Remove.
4642         (free_growth_caches): Likewise.
4643         (do_estimate_edge_time): Use edge_growth_cache.
4644         (do_estimate_edge_size): Likewise.
4645         (do_estimate_edge_hints): Likewise.
4646         * ipa-inline.c (reset_edge_caches): Likewise.
4647         (recursive_inlining): Likewise.
4648         (inline_small_functions): Likewise.
4649         * ipa-inline.h (initialize_growth_caches): Remove.
4650         (estimate_edge_size): Likewise.
4651         (estimate_edge_time): Likewise.
4652         (estimate_edge_hints): Likewise.
4653         (reset_edge_growth_cache): Likewise.
4654         * symbol-summary.h (call_summary::remove): New method.
4656 2018-06-08  Martin Liska  <mliska@suse.cz>
4658         * ipa-cp.c (class edge_clone_summary): New summary.
4659         (grow_edge_clone_vectors): Remove.
4660         (ipcp_edge_duplication_hook): Remove.
4661         (class edge_clone_summary_t): New call_summary class.
4662         (ipcp_edge_removal_hook): Remove.
4663         (edge_clone_summary_t::duplicate): New function.
4664         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
4665         (create_specialized_node): Likewise.
4666         (ipcp_driver): Initialize edge_clone_summaries and do not
4667         register hooks.
4669 2018-06-08  Martin Liska  <mliska@suse.cz>
4671         * symbol-summary.h (get): New function.
4672         (call_summary::m_initialize_when_cloning): New class member.
4674 2018-06-08  Martin Liska  <mliska@suse.cz>
4676         * cgraph.c (cgraph_node::remove): Do not recycle uid.
4677         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
4678         (symbol_table::allocate_cgraph_symbol): Do not set uid.
4679         * passes.c (uid_hash_t): Record removed_nodes by their uids.
4680         (remove_cgraph_node_from_order): Use the removed_nodes set.
4681         (do_per_function_toporder): Likwise.
4682         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
4683         instead of summary_uid.
4684         (symtab_removal): Likewise.
4685         (symtab_duplication): Likewise.
4687 2018-06-08  Martin Liska  <mliska@suse.cz>
4689         * ipa-cp.c (ipcp_store_bits_results): Use
4690         ipcp_transformation_sum.
4691         (ipcp_store_vr_results): Likewise.
4692         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
4693         to ...
4694         (ipcp_transformation_initialize): ... this.
4695         (ipa_set_node_agg_value_chain):
4696         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
4697         (write_ipcp_transformation_info): Likewise.
4698         (read_ipcp_transformation_info): Likewise.
4699         (ipcp_update_bits): Likewise.
4700         (ipcp_update_vr): Likewise.
4701         (ipcp_transform_function): Likewise.
4702         * ipa-prop.h: Rename ipcp_transformation_summary to
4703         ipcp_transformation.
4704         (class ipcp_transformation_t): New function summary.
4705         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
4706         (ipa_get_agg_replacements_for_node): Likewise.
4708 2018-06-08  Martin Liska  <mliska@suse.cz>
4710         * ipa-pure-const.c (struct funct_state_d): Do it class instead
4711         of struct.
4712         (class funct_state_summary_t): New function_summary class.
4713         (has_function_state): Remove.
4714         (get_function_state): Likewise.
4715         (set_function_state): Likewise.
4716         (add_new_function): Likewise.
4717         (funct_state_summary_t::insert): New function.
4718         (duplicate_node_data): Remove.
4719         (remove_node_data): Remove.
4720         (funct_state_summary_t::duplicate): New function.
4721         (register_hooks): Create new funct_state_summaries.
4722         (pure_const_generate_summary): Use it.
4723         (pure_const_write_summary): Likewise.
4724         (pure_const_read_summary): Likewise.
4725         (propagate_pure_const): Likewise.
4726         (propagate_nothrow): Likewise.
4727         (dump_malloc_lattice): Likewise.
4728         (propagate_malloc): Likewise.
4729         (execute): Do not register hooks, just remove summary
4730         instead.
4731         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
4732         constructor.
4734 2018-06-08  Martin Liska  <mliska@suse.cz>
4736         * ipa-reference.c (remove_node_data): Remove.
4737         (duplicate_node_data): Likewise.
4738         (class ipa_ref_var_info_summary_t): New class.
4739         (class ipa_ref_opt_summary_t): Likewise.
4740         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
4741         (get_reference_optimization_summary): Use
4742         ipa_ref_opt_sum_summaries.
4743         (set_reference_vars_info): Remove.
4744         (set_reference_optimization_summary): Likewise.
4745         (ipa_init): Create summaries.
4746         (init_function_info): Use function summary.
4747         (ipa_ref_opt_summary_t::duplicate): New function.
4748         (ipa_ref_opt_summary_t::remove): New function.
4749         (get_read_write_all_from_node): Fix GNU coding style.
4750         (propagate): Use function summary.
4751         (write_node_summary_p): Fix GNU coding style.
4752         (stream_out_bitmap): Likewise.
4753         (ipa_reference_read_optimization_summary): Use function summary.
4754         (ipa_reference_c_finalize): Do not release hooks.
4756 2018-06-08  Martin Liska  <mliska@suse.cz>
4758         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
4759         (analyze_function_body): Extract multiple calls of get_create.
4760         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4761         * ipa-inline.c (recursive_inlining): Use ::get method.
4762         * ipa-inline.h (estimate_edge_growth): Likewise.
4764 2018-06-08  Martin Liska  <mliska@suse.cz>
4766         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
4767         HSA_INVALID.
4768         (hsa_function_summary::hsa_function_summary): Use the new enum
4769         value.
4770         (hsa_gpu_implementation_p): Use hsa_summaries::get.
4771         * hsa-gen.c (hsa_get_host_function): Likewise.
4772         (get_brig_function_name): Likewise.
4773         * ipa-hsa.c (process_hsa_functions): Likewise.
4774         (ipa_hsa_write_summary): Likewise.
4775         * symbol-summary.h (symtab_duplication): Use ::get function/
4776         (get): New function.
4778 2018-06-08  Martin Liska  <mliska@suse.cz>
4780         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
4781         of get.
4782         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
4783         (hsa_register_kernel): Likewise.
4784         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
4785         * hsa-gen.c (hsa_get_host_function): Likewise.
4786         (get_brig_function_name): Likewise.
4787         (generate_hsa): Likewise.
4788         (pass_gen_hsail::execute): Likewise.
4789         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
4790         (devirtualization_time_bonus): Likewise.
4791         (ipcp_propagate_stage): Likewise.
4792         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4793         (edge_set_predicate): Likewise.
4794         (evaluate_conditions_for_known_args): Likewise.
4795         (evaluate_properties_for_edge): Likewise.
4796         (ipa_fn_summary::reset): Likewise.
4797         (ipa_fn_summary_t::duplicate): Likewise.
4798         (dump_ipa_call_summary): Likewise.
4799         (ipa_dump_fn_summary): Likewise.
4800         (analyze_function_body): Likewise.
4801         (compute_fn_summary): Likewise.
4802         (estimate_edge_devirt_benefit): Likewise.
4803         (estimate_edge_size_and_time): Likewise.
4804         (estimate_calls_size_and_time): Likewise.
4805         (estimate_node_size_and_time): Likewise.
4806         (inline_update_callee_summaries): Likewise.
4807         (remap_edge_change_prob): Likewise.
4808         (remap_edge_summaries): Likewise.
4809         (ipa_merge_fn_summary_after_inlining): Likewise.
4810         (ipa_update_overall_fn_summary): Likewise.
4811         (read_ipa_call_summary): Likewise.
4812         (inline_read_section): Likewise.
4813         (write_ipa_call_summary): Likewise.
4814         (ipa_fn_summary_write): Likewise.
4815         (ipa_free_fn_summary): Likewise.
4816         * ipa-hsa.c (process_hsa_functions): Likewise.
4817         (ipa_hsa_write_summary): Likewise.
4818         (ipa_hsa_read_section): Likewise.
4819         * ipa-icf.c (sem_function::merge): Likewise.
4820         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4821         (do_estimate_edge_time): Likewise.
4822         (estimate_size_after_inlining): Likewise.
4823         (estimate_growth): Likewise.
4824         (growth_likely_positive): Likewise.
4825         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4826         (inline_call): Likewise.
4827         * ipa-inline.c (caller_growth_limits): Likewise.
4828         (can_inline_edge_p): Likewise.
4829         (can_inline_edge_by_limits_p): Likewise.
4830         (compute_uninlined_call_time): Likewise.
4831         (compute_inlined_call_time): Likewise.
4832         (want_inline_small_function_p): Likewise.
4833         (edge_badness): Likewise.
4834         (update_caller_keys): Likewise.
4835         (update_callee_keys): Likewise.
4836         (recursive_inlining): Likewise.
4837         (inline_small_functions): Likewise.
4838         (inline_to_all_callers_1): Likewise.
4839         (dump_overall_stats): Likewise.
4840         (early_inline_small_functions): Likewise.
4841         (early_inliner): Likewise.
4842         * ipa-inline.h (estimate_edge_growth): Likewise.
4843         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4844         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4845         * ipa-prop.h (IPA_NODE_REF): Likewise.
4846         (IPA_EDGE_REF): Likewise.
4847         * ipa-pure-const.c (malloc_candidate_p): Likewise.
4848         (propagate_malloc): Likewise.
4849         * ipa-split.c (execute_split_functions): Likewise.
4850         * symbol-summary.h: Rename get to get_create.
4851         (get): Likewise.
4852         (get_create): Likewise.
4853         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4855 2018-06-08  Martin Liska  <mliska@suse.cz>
4857         * symbol-summary.h (release): Move definition out of class
4858         declaration.
4859         (symtab_removal): Likewise.
4860         (symtab_duplication): Likewise.
4862 2018-06-08  Martin Liska  <mliska@suse.cz>
4864         * symbol-summary.h (function_summary): Move constructor
4865         implementation out of class declaration.
4866         (release): Likewise.
4867         (symtab_insertion): Likewise.
4868         (symtab_removal): Likewise.
4869         (symtab_duplication): Likewise.
4870         (get): Likewise.
4872 2018-06-08  Martin Liska  <mliska@suse.cz>
4874         * Makefile.in: Remove support for MPX (macros, related functions,
4875         fields in cgraph_node, ...).
4876         * builtin-types.def (BT_BND): Likewise.
4877         (BT_FN_BND_CONST_PTR): Likewise.
4878         (BT_FN_CONST_PTR_BND): Likewise.
4879         (BT_FN_VOID_PTR_BND): Likewise.
4880         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
4881         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
4882         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
4883         (expand_builtin_mempcpy_with_bounds): Likewise.
4884         (expand_builtin_memset_with_bounds): Likewise.
4885         (expand_builtin_memset_args): Likewise.
4886         (std_expand_builtin_va_start): Likewise.
4887         (expand_builtin): Likewise.
4888         (expand_builtin_with_bounds): Likewise.
4889         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
4890         (DEF_LIB_BUILTIN_CHKP): Likewise.
4891         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
4892         (DEF_CHKP_BUILTIN): Likewise.
4893         (BUILT_IN_MEMCPY): Likewise.
4894         (BUILT_IN_MEMMOVE): Likewise.
4895         (BUILT_IN_MEMPCPY): Likewise.
4896         (BUILT_IN_MEMSET): Likewise.
4897         (BUILT_IN_STPCPY): Likewise.
4898         (BUILT_IN_STRCAT): Likewise.
4899         (BUILT_IN_STRCHR): Likewise.
4900         (BUILT_IN_STRCPY): Likewise.
4901         (BUILT_IN_STRLEN): Likewise.
4902         (BUILT_IN_MEMCPY_CHK): Likewise.
4903         (BUILT_IN_MEMMOVE_CHK): Likewise.
4904         (BUILT_IN_MEMPCPY_CHK): Likewise.
4905         (BUILT_IN_MEMSET_CHK): Likewise.
4906         (BUILT_IN_STPCPY_CHK): Likewise.
4907         (BUILT_IN_STRCAT_CHK): Likewise.
4908         (BUILT_IN_STRCPY_CHK): Likewise.
4909         * calls.c (store_bounds): Likewise.
4910         (emit_call_1): Likewise.
4911         (special_function_p): Likewise.
4912         (maybe_warn_nonstring_arg): Likewise.
4913         (initialize_argument_information): Likewise.
4914         (finalize_must_preallocate): Likewise.
4915         (compute_argument_addresses): Likewise.
4916         (expand_call): Likewise.
4917         * cfgexpand.c (expand_call_stmt): Likewise.
4918         (expand_return): Likewise.
4919         (expand_gimple_stmt_1): Likewise.
4920         (pass_expand::execute): Likewise.
4921         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
4922         (cgraph_node::remove): Likewise.
4923         (cgraph_node::dump): Likewise.
4924         (cgraph_node::verify_node): Likewise.
4925         * cgraph.h (chkp_function_instrumented_p): Likewise.
4926         (symtab_node::get_alias_target): Likewise.
4927         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
4928         (cgraph_local_p): Likewise.
4929         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
4930         (cgraph_edge::rebuild_references): Likewise.
4931         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
4932         (walk_polymorphic_call_targets): Likewise.
4933         (cgraph_node::expand_thunk): Likewise.
4934         (symbol_table::output_weakrefs): Likewise.
4935         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
4936         (ix86_handle_option): Likewise.
4937         * config/i386/constraints.md: Likewise.
4938         * config/i386/i386-builtin-types.def (BND): Likewise.
4939         (VOID): Likewise.
4940         (PVOID): Likewise.
4941         (ULONG): Likewise.
4942         * config/i386/i386-builtin.def (BDESC_END): Likewise.
4943         (BDESC_FIRST): Likewise.
4944         (BDESC): Likewise.
4945         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
4946         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
4947         * config/i386/i386.c (enum reg_class): Likewise.
4948         (ix86_target_string): Likewise.
4949         (ix86_option_override_internal): Likewise.
4950         (ix86_conditional_register_usage): Likewise.
4951         (ix86_valid_target_attribute_inner_p): Likewise.
4952         (ix86_set_indirect_branch_type): Likewise.
4953         (ix86_set_current_function): Likewise.
4954         (ix86_function_arg_regno_p): Likewise.
4955         (init_cumulative_args): Likewise.
4956         (ix86_function_arg_advance): Likewise.
4957         (ix86_function_arg): Likewise.
4958         (ix86_pass_by_reference): Likewise.
4959         (ix86_function_value_regno_p): Likewise.
4960         (ix86_function_value_1): Likewise.
4961         (ix86_function_value_bounds): Likewise.
4962         (ix86_return_in_memory): Likewise.
4963         (ix86_setup_incoming_vararg_bounds): Likewise.
4964         (ix86_va_start): Likewise.
4965         (indirect_thunk_need_prefix): Likewise.
4966         (print_reg): Likewise.
4967         (ix86_print_operand): Likewise.
4968         (ix86_expand_call): Likewise.
4969         (ix86_output_function_return): Likewise.
4970         (reg_encoded_number): Likewise.
4971         (BDESC_VERIFYS): Likewise.
4972         (ix86_init_mpx_builtins): Likewise.
4973         (ix86_init_builtins): Likewise.
4974         (ix86_emit_cmove): Likewise.
4975         (ix86_emit_move_max): Likewise.
4976         (ix86_expand_builtin): Likewise.
4977         (ix86_builtin_mpx_function): Likewise.
4978         (ix86_get_arg_address_for_bt): Likewise.
4979         (ix86_load_bounds): Likewise.
4980         (ix86_store_bounds): Likewise.
4981         (ix86_load_returned_bounds): Likewise.
4982         (ix86_store_returned_bounds): Likewise.
4983         (ix86_class_likely_spilled_p): Likewise.
4984         (ix86_hard_regno_mode_ok): Likewise.
4985         (x86_order_regs_for_local_alloc): Likewise.
4986         (ix86_mitigate_rop): Likewise.
4987         (ix86_bnd_prefixed_insn_p): Likewise.
4988         (ix86_mpx_bound_mode): Likewise.
4989         (ix86_make_bounds_constant): Likewise.
4990         (ix86_initialize_bounds): Likewise.
4991         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
4992         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
4993         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
4994         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
4995         (TARGET_CHKP_BOUND_MODE): Likewise.
4996         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
4997         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
4998         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
4999         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
5000         * config/i386/i386.h (TARGET_MPX): Likewise.
5001         (TARGET_MPX_P): Likewise.
5002         (VALID_BND_REG_MODE): Likewise.
5003         (FIRST_BND_REG): Likewise.
5004         (LAST_BND_REG): Likewise.
5005         (enum reg_class): Likewise.
5006         (BND_REG_P): Likewise.
5007         (BND_REGNO_P): Likewise.
5008         (BNDmode): Likewise.
5009         (ADJUST_INSN_LENGTH): Likewise.
5010         * config/i386/i386.md: Likewise.
5011         * config/i386/i386.opt: Likewise.
5012         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
5013         (defined): Likewise.
5014         (LINK_MPX): Likewise.
5015         (MPX_SPEC): Likewise.
5016         (LIBMPX_SPEC): Likewise.
5017         (LIBMPXWRAPPERS_SPEC): Likewise.
5018         (CHKP_SPEC): Likewise.
5019         * config/i386/predicates.md: Likewise.
5020         * dbxout.c (dbxout_type): Likewise.
5021         * doc/extend.texi: Likewise.
5022         * doc/invoke.texi: Likewise.
5023         * doc/md.texi: Likewise.
5024         * doc/tm.texi: Likewise.
5025         * doc/tm.texi.in: Likewise.
5026         * dwarf2out.c (is_base_type): Likewise.
5027         (gen_formal_types_die): Likewise.
5028         (gen_subprogram_die): Likewise.
5029         (gen_type_die_with_usage): Likewise.
5030         (gen_decl_die): Likewise.
5031         (dwarf2out_late_global_decl): Likewise.
5032         * expr.c (expand_assignment): Likewise.
5033         (emit_storent_insn): Likewise.
5034         (store_expr_with_bounds): Likewise.
5035         (store_expr): Likewise.
5036         (expand_expr_real_1): Likewise.
5037         * expr.h (store_expr_with_bounds): Likewise.
5038         * function.c (use_register_for_decl): Likewise.
5039         (struct bounds_parm_data): Likewise.
5040         (assign_parms_augmented_arg_list): Likewise.
5041         (assign_parm_find_entry_rtl): Likewise.
5042         (assign_parm_is_stack_parm): Likewise.
5043         (assign_parm_load_bounds): Likewise.
5044         (assign_bounds): Likewise.
5045         (assign_parms): Likewise.
5046         (expand_function_start): Likewise.
5047         * gcc.c (CHKP_SPEC): Likewise.
5048         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
5049         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
5050         (wrestrict_dom_walker::check_call): Likewise.
5051         * gimple.c (gimple_build_call_from_tree): Likewise.
5052         * gimple.h (enum gf_mask): Likewise.
5053         (gimple_call_with_bounds_p): Likewise.
5054         (gimple_call_set_with_bounds): Likewise.
5055         * gimplify.c (gimplify_init_constructor): Likewise.
5056         * ipa-cp.c (initialize_node_lattices): Likewise.
5057         (propagate_constants_across_call): Likewise.
5058         (find_more_scalar_values_for_callers_subset): Likewise.
5059         * ipa-hsa.c (process_hsa_functions): Likewise.
5060         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
5061         * ipa-icf.c (sem_function::merge): Likewise.
5062         * ipa-inline.c (early_inliner): Likewise.
5063         * ipa-pure-const.c (warn_function_noreturn): Likewise.
5064         (warn_function_cold): Likewise.
5065         (propagate_pure_const): Likewise.
5066         * ipa-ref.h (enum GTY): Likewise.
5067         * ipa-split.c (find_retbnd): Likewise.
5068         (consider_split): Likewise.
5069         (split_function): Likewise.
5070         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5071         * ipa.c (walk_polymorphic_call_targets): Likewise.
5072         (symbol_table::remove_unreachable_nodes): Likewise.
5073         (process_references): Likewise.
5074         (cgraph_build_static_cdtor_1): Likewise.
5075         * lto-cgraph.c (lto_output_node): Likewise.
5076         (output_refs): Likewise.
5077         (compute_ltrans_boundary): Likewise.
5078         (input_overwrite_node): Likewise.
5079         (input_node): Likewise.
5080         (input_cgraph_1): Likewise.
5081         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
5082         * passes.c (pass_manager::execute_early_local_passes): Likewise.
5083         (class pass_chkp_instrumentation_passes): Likewise.
5084         (make_pass_chkp_instrumentation_passes): Likewise.
5085         * passes.def: Likewise.
5086         * rtl.h (struct GTY): Likewise.
5087         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
5088         * stor-layout.c (layout_type): Likewise.
5089         * symtab.c: Likewise.
5090         * target.def: Likewise.
5091         * targhooks.c (default_chkp_bound_type): Likewise.
5092         (default_chkp_bound_mode): Likewise.
5093         (default_builtin_chkp_function): Likewise.
5094         (default_chkp_function_value_bounds): Likewise.
5095         (default_chkp_make_bounds_constant): Likewise.
5096         (default_chkp_initialize_bounds): Likewise.
5097         * targhooks.h (default_chkp_bound_type): Likewise.
5098         (default_chkp_bound_mode): Likewise.
5099         (default_builtin_chkp_function): Likewise.
5100         (default_chkp_function_value_bounds): Likewise.
5101         (default_chkp_make_bounds_constant): Likewise.
5102         (default_chkp_initialize_bounds): Likewise.
5103         * toplev.c (compile_file): Likewise.
5104         (process_options): Likewise.
5105         * tree-core.h (DEF_BUILTIN): Likewise.
5106         (DEF_BUILTIN_CHKP): Likewise.
5107         * tree-inline.c (declare_return_variable): Likewise.
5108         (remap_gimple_stmt): Likewise.
5109         (copy_bb): Likewise.
5110         (initialize_inlined_parameters): Likewise.
5111         (expand_call_inline): Likewise.
5112         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
5113         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
5114         (make_pass_ipa_chkp_produce_thunks): Likewise.
5115         (make_pass_chkp): Likewise.
5116         (make_pass_chkp_opt): Likewise.
5117         (make_pass_chkp_instrumentation_passes): Likewise.
5118         * tree-pretty-print.c (dump_generic_node): Likewise.
5119         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
5120         * tree-ssa-dce.c (propagate_necessity): Likewise.
5121         (eliminate_unnecessary_stmts): Likewise.
5122         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
5123         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5124         * tree-ssa-sccvn.h: Likewise.
5125         * tree-ssa-strlen.c (get_string_length): Likewise.
5126         (valid_builtin_call): Likewise.
5127         (adjust_last_stmt): Likewise.
5128         (handle_builtin_strchr): Likewise.
5129         (handle_builtin_strcpy): Likewise.
5130         (handle_builtin_stxncpy): Likewise.
5131         (handle_builtin_memcpy): Likewise.
5132         (handle_builtin_strcat): Likewise.
5133         (strlen_check_and_optimize_stmt): Likewise.
5134         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
5135         * tree-streamer-in.c: Likewise.
5136         * tree-streamer.c (record_common_node): Likewise.
5137         * tree.c (tree_code_size): Likewise.
5138         (wide_int_to_tree_1): Likewise.
5139         (type_contains_placeholder_1): Likewise.
5140         (build_common_tree_nodes): Likewise.
5141         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5142         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5143         (POINTER_BOUNDS_P): Likewise.
5144         (BOUNDED_TYPE_P): Likewise.
5145         (BOUNDED_P): Likewise.
5146         (CALL_WITH_BOUNDS_P): Likewise.
5147         (pointer_bounds_type_node): Likewise.
5148         * value-prof.c (gimple_ic): Likewise.
5149         * var-tracking.c (vt_add_function_parameters): Likewise.
5150         * varasm.c (make_decl_rtl): Likewise.
5151         (assemble_start_function): Likewise.
5152         (output_constant): Likewise.
5153         (maybe_assemble_visibility): Likewise.
5154         * varpool.c (ctor_for_folding): Likewise.
5155         * chkp-builtins.def: Remove.
5156         * ipa-chkp.c: Remove.
5157         * ipa-chkp.h: Remove.
5158         * rtl-chkp.c: Remove.
5159         * rtl-chkp.h: Remove.
5160         * tree-chkp-opt.c: Remove.
5161         * tree-chkp.c: Remove.
5162         * tree-chkp.h: Remove.
5164 2018-06-07  Carl Love  <cel@us.ibm.com>
5166         * config/rs6000/vsx.md (vextract_fp_from_shorth,
5167         vextract_fp_from_shortl): Add BE support.
5169 2018-06-07  Paul Koning  <ni1d@arrl.net>
5171         * compare-elim.c (try_merge_compare): Don't merge compare if
5172         address contains a side effect.
5173         (try_eliminate_compare): Likewise.
5175 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
5177         * config.gcc: Support "tremont".
5178         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
5179         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5180         PROCESSOR_TREMONT.
5181         * config/i386/i386.c (m_TREMONT): Define.
5182         (processor_target_table): Add "tremont".
5183         (PTA_TREMONT): Define.
5184         (ix86_lea_outperforms): Add TARGET_TREMONT.
5185         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
5186         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
5187         and M_INTEL_GOLDMONT_PLUS.
5188         (fold_builtin_cpu): Add "tremont".
5189         (ix86_add_stmt_cost): Add TARGET_TREMONT.
5190         (ix86_option_override_internal): Add "tremont".
5191         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
5192         (processor_type): Add PROCESSOR_TREMONT.
5193         * config/i386/x86-tune.def: Add m_TREMONT.
5194         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
5196 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5198         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
5199         symbol defined for msp430i* devices to be lower case.
5201 2018-06-07  Richard Biener  <rguenther@suse.de>
5203         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
5204         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
5205         Properly wrap signed arithmetic if overflow wraps.
5207 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
5209         PR tree-optimization/69615
5210         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
5211         of a cast from a same precision integral SSA_NAME in a bb dominated
5212         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
5213         cast to utype if rhs2 has already a compatible type.
5215 2018-06-07  Richard Biener  <rguenther@suse.de>
5217         PR tree-optimization/85935
5218         * graphite-scop-detection.c (find_params_in_bb): Analyze
5219         condition operands with respect to the correct loop.  Assert
5220         the analysis doesn't fail.
5222 2018-06-04  Carl Love  <cel@us.ibm.com>
5224         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
5225         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
5226         as it is slightly cheaper.
5227         (first_match_or_eos_index_<mode>):
5228         Calculate index using natural element order.
5229         (first_match_index_<mode>):
5230         Calculate index using natural element order.
5231         (first_match_or_eos_index_<mode>):
5232         Calculate index using natural order.
5233         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
5234         for BE and LE modes.
5235         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
5236         P9V_BUILTIN_VCLZLSBB_V16QI.
5237         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
5238         specific.
5240 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5242         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
5243         indentation and line wrap for many prototypes.  Add missing
5244         @smallexample directives around block of prototypes for vec_xl and
5245         vec_xst.
5247 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
5249         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
5250         track if we pass or return IEEE 128-bit floating point.
5251         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
5252         C++ mangling that is compatible with GCC 8.1.
5253         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
5254         (init_cumulative_args): Note if we pass or return IEEE 128-bit
5255         floating point types.
5256         (rs6000_function_arg_advance_1): Likewise.
5257         (rs6000_mangle_type): Optionally generate mangled names that match
5258         what GCC 8.1 generated for IEEE 128-bit floating point types.
5259         (rs6000_globalize_decl_name): If we have an external function that
5260         passes or returns IEEE 128-bit types, generate a weak reference
5261         from the mangled name used in GCC 8.1 to the current mangled
5262         name.
5263         (rs6000_init_builtins): Make __ibm128 use the long double type if
5264         long double is IBM extended double.  Make __float128 use the long
5265         double type if long double is IEEE 128-bit.
5267         PR target/85657
5268         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
5269         macro for __ibm128 built-in functions.
5270         (PACK_IF): Add __ibm128 pack/unpack functions.
5271         (UNPACK_IF): Likewise.
5272         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
5273         enable long double built-in functions if long double is IEEE
5274         128-bit floating point.
5275         (rs6000_invalid_builtin): Update long double built-in function
5276         error message.
5277         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
5278         functions, adjust the built-in function to use the long double
5279         built-in function if __ibm128 and long double are the same type.
5280         * doc/extend.texi (PowerPC builtins): Update documention for
5281         __builtin_{,un}pack_longdouble.  Add documentation for
5282         __builtin_{,un}pack_ibm128.
5284 2018-06-06  Jim Wilson  <jimw@sifive.com>
5286         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
5287         (struct machine_function): New field interrupt_mode.
5288         (riscv_handle_type_attribute): New function.  Add forward declaration.
5289         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
5290         (riscv_expand_epilogue): Check interrupt_mode field.
5291         (riscv_set_current_function): Check interrupt attribute args and
5292         set interrupt_mode field.
5293         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
5294         (riscv_sret, riscv_uret): New.
5295         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
5296         new arguments to interrupt attribute.
5298 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
5300         PR target/63177
5301         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
5302         Don't handle -mcpu=power8 if -mpower9-vector is also used.
5304 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5306         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
5307         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5308         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5309         several redundant entries.
5311 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
5313         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
5314         type from "rtx" to "rtx_insn *".
5315         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
5316         for local "call_insn", removing cast.
5317         (ix86_expand_call): Likewise, introducing a "call_insn" local.
5319 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
5321         PR tree-optimization/86066
5322         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
5323         for BIT_INSERT_EXPR stores.
5325 2018-06-06  Richard Biener  <rguenther@suse.de>
5327         PR tree-optimization/86062
5328         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5329         component refs ontop
5330         of to be offsetted base.
5332 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5334         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
5335         to be static and remove check on interrupt attribute name.
5337 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5339         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5340         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
5342 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
5344         PR target/79924
5345         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
5346         second argument.
5347         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
5348         Remove second argument, change how error is called.
5349         (aarch64_layout_arg): Remove second argument from
5350         aarch64_err_no_fpadvsimd call.
5351         (aarch64_init_cumulative_args): Ditto.
5352         (aarch64_gimplify_va_arg_expr): Ditto.
5353         * config/aarch64/aarch64.md (mov<mode>): Ditto.
5355 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
5357         * config/i386/i386.md (simple_return_indirect_internal): New expander.
5358         (*simple_return_indirect_internal<mode>): Rename from
5359         simple_return_indirect_internal.  Use W mode iterator.
5360         (rstorssp): New expander.
5361         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
5362         (clrssbsy): New expander.
5363         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
5365 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5367         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
5368         __typeof__.
5369         (cmse_check_pointed_object): Likewise.
5371 2018-06-05  Martin Liska  <mliska@suse.cz>
5373         PR gcov-profile/47618
5374         * doc/invoke.texi: Document how -fprofile-dir format
5375         is extended.
5377 2018-06-05  Richard Biener  <rguenther@suse.de>
5379         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
5380         removal pretend DOM info isn't available so we do not update
5381         it and only remove edges, not dominated blocks.  Actually free
5382         DOM info in case we removed something.  Remove unreachable blocks.
5383         (mfb_keep_latches): Work with either DOM info or marked backedges.
5384         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
5385         first.  Mark backedges if DOM info isn't available.
5386         (Re-)compute DOM info after cleanup_control_flow_pre.
5388 2018-06-05  Richard Biener  <rguenther@suse.de>
5390         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
5391         (locus_discrim_hasher::hash): Adjust.
5392         (locus_discrim_hasher::equal): Likewise.
5393         (next_discriminator_for_locus): Work on line directly.
5394         (same_line_p): Pass in expanded locus1 as well.
5395         (assign_discriminators): Avoid redundant location expansions.
5397 2018-06-05  Richard Biener  <rguenther@suse.de>
5399         PR tree-optimization/86046
5400         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
5401         if required after clearing TREE_ADDRESSABLE.
5403 2018-06-05  Richard Biener  <rguenther@suse.de>
5405         PR tree-optimization/86047
5406         * tree-ssa-loop.c (for_each_index): Glob handling of all
5407         decls and constants and really handle all of them.
5409 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5411         PR target/81497
5412         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
5413         qualifier_void_pointer and qualifier_const_void_pointer.
5414         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
5415         (arm_init_builtins): Handle the above.
5416         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
5417         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
5418         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
5419         void intrinsics.
5421 2018-06-05  Martin Liska  <mliska@suse.cz>
5423         * auto-profile.c (read_autofdo_file): Do not use
5424         gcov_ctr_summary struct.
5425         (afdo_callsite_hot_enough_for_early_inline): Likewise.
5426         * coverage.c (struct counts_entry): Likewise.
5427         (read_counts_file): Read just single summary entry.
5428         (get_coverage_counts): Use gcov_summary struct.
5429         * coverage.h (get_coverage_counts): Likewise.
5430         * gcov-dump.c (dump_working_sets): Likewise.
5431         (tag_summary): Dump just single summary.
5432         * gcov-io.c (gcov_write_summary): Write just histogram
5433         summary.
5434         (gcov_read_summary): Read just single summary.
5435         (compute_working_sets): Use gcov_summary struct.
5436         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
5437         of GCOV_COUNTERS_SUMMABLE.
5438         (GCOV_COUNTERS_SUMMABLE): Remove.
5439         (GCOV_FIRST_VALUE_COUNTER): Replace with
5440         GCOV_COUNTER_V_INTERVAL.
5441         (struct gcov_ctr_summary): Remove.
5442         (struct gcov_summary): Directly use fields of former
5443         gcov_ctr_summary.
5444         (compute_working_sets): Use gcov_summary struct.
5445         * gcov.c (read_count_file): Do not use ctrs fields.
5446         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
5447         struct.
5448         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
5449         struct.
5450         * profile.c: Likewise.
5451         * profile.h: Likewise.
5453 2018-06-05  Martin Liska  <mliska@suse.cz>
5455         PR gcov-profile/84846
5456         * gcov.c (output_lines): Print working directory only
5457         in intermediate format.
5459 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
5461         * config/s390/s390-builtin-types.def: Add void function type.
5462         * config/s390/s390-builtins.def: Use the function type for the
5463         tbeginc builtin.
5465 2018-06-04  Jim Wilson  <jimw@sifive.com>
5467         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
5468         to int.
5469         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
5470         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
5471         handle EH_RETURN_DATA_REGNO registers properly.
5472         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
5473         (riscv_expand_epilogue): Update comment.  Change argument name and
5474         type.  Update code to use new name and type.  Pass new args to
5475         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
5476         EXCEPTION_RETURN.
5477         * config/riscv/riscv.md (NORMAL_RETURN): New.
5478         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
5479         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
5480         (eh_return): Call gen_eh_return_internal and emit barrier.
5481         (eh_return_internal): Call riscv_expand_epilogue.
5483 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
5485         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
5486         bit_insertion field and declare can_be_merged_into method.
5487         (merged_store_group::can_be_merged_into): New method.
5488         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
5489         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
5490         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
5492 2018-06-04  Richard Biener  <rguenther@suse.de>
5494         PR tree-optimization/85955
5495         * builtins.c (fold_builtin_sincos): Convert pointers to
5496         destination to appropriate type before dereferencing.
5498 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
5500         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
5502 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
5504         * expr.c (expand_expr_real_1): Force the operand into memory if
5505         its TYPE_MODE is BLKmode and if there is no integer mode for
5506         the number of bits being extracted.
5508 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
5510         PR target/85832
5511         PR target/86036
5512         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5513         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
5515 2018-06-04  Richard Biener  <rguenther@suse.de>
5517         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
5518         (cleanup_tree_cfg_noloop): ... single caller.  Do
5519         start_recording_case_labels later.
5521 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
5523         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
5524         to _IMMINTRIN_H_INCLUDED.
5525         * config/i386/pconfigintrin.h: Ditto.
5526         * config/i386/waitpkgintrin.h: Ditto.
5527         * config/i386/immintrin.h: Add includes for sgxintrin.h,
5528         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
5529         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
5530         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
5531         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
5532         waitpkgintrin.h and cldemoteintrin.h.
5534 2018-06-04  Richard Biener  <rguenther@suse.de>
5536         PR tree-optimization/86038
5537         * tracer.c (find_best_successor): Check probability for
5538         being initialized, bail out if not.
5540 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
5542         PR target/86003
5543         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
5544         of bits to ignore when comparing architectures.
5546 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
5548         PR tree-optimization/69615
5549         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
5550         maximum or minimum of the type, try to merge it also as if
5551         range1 is + [-, x - 1] or + [x + 1, -].
5553         PR c++/86025
5554         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
5556 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
5558         PR tree-optimization/86034
5559         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
5560         the unsigned bitfield type in a bit insertion sequence if it does not
5561         have a larger precision than the bitfield size.
5562         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
5564 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
5566         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
5568 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
5570         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
5571         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
5572         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
5573         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
5575 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
5577         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
5578         Disable -fdelete-null-pointer-checks for ELF toolchain.
5580 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5581             Kito Cheng  <kito.cheng@gmail.com>
5583         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
5584         (nds32le-*-*, nds32be-*-*): Integrate checking process.
5585         (nds32*-*-*): Add glibc and uclibc conditions.
5586         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
5587         (TARGET_EXCEPT_UNWIND_INFO): Define.
5588         * config/nds32/elf.h: New file.
5589         * config/nds32/linux.h: New file.
5590         * config/nds32/nds32-elf.opt: New file.
5591         * config/nds32/nds32-linux.opt: New file.
5592         * config/nds32/nds32-fp-as-gp.c
5593         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
5594         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
5595         TARGET_LINUX_ABI.
5596         (nds32_asm_file_end): Ditto.
5597         (nds32_print_operand): Ditto.
5598         (nds32_insert_attributes): Ditto.
5599         (nds32_init_libfuncs): New function.
5600         (TARGET_HAVE_TLS): Define.
5601         (TARGET_INIT_LIBFUNCS): Define.
5602         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
5603         spec content.
5604         (TARGET_ELF): Apply different mcmodel setting.
5605         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
5606         been migrated into elf.h and linux.h files.
5607         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
5608         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
5609         (mcmodel): The content has been migrated into nds32-elf.opt and
5610         nds32-linux.opt files.
5611         * config/nds32/t-elf: New file.
5612         * config/nds32/t-linux: New file.
5614 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5615             Shiva Chen  <shiva0217@gmail.com>
5617         * config/nds32/constants.md (unspec_volatile_element): Add
5618         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
5619         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
5620         optimization.
5621         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
5622         (make_pass_nds32_fp_as_gp): Declare.
5623         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
5624         optmization pass.
5625         (nds32_asm_function_end_prologue): Remove unused asm output.
5626         (nds32_asm_function_begin_epilogue): Remove unused asm output.
5627         (nds32_asm_file_start): Output necessary fp_as_gp information.
5628         (nds32_option_override): Adjust register usage.
5629         (nds32_expand_prologue): Consider fp_as_gp situation.
5630         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
5631         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
5632         (epilogue): Ditto.
5633         (return): Ditto.
5634         (simple_return): Ditto.
5635         (omit_fp_begin): Output special directive for fp_as_gp.
5636         (omit_fp_end): Output special directive for fp_as_gp.
5637         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
5638         mforbid-fp-as-gp): New options.
5640 2018-06-01  Mark Wielaard  <mark@klomp.org>
5642         * dwarf2out.c (dwarf2out_finish): Remove generation of
5643         DW_AT_loclists_base.
5645 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
5647         * gimple-ssa-store-merging.c: Include gimple-fold.h.
5648         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
5649         (struct merged_store_group): Add bit_insertion field.
5650         (dump_char_array): Use standard hexadecimal format.
5651         (merged_store_group::merged_store_group): Set bit_insertion to false.
5652         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
5653         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
5654         also print the mask in the dump file.
5655         (pass_store_merging::gate): Minor tweak.
5656         (imm_store_chain_info::coalesce_immediate): Fix wrong association
5657         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
5658         stores with INTEGER_CST stores.
5659         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
5660         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
5661         and use it throughout.  Generate bit insertion sequences if need be.
5662         (pass_store_merging::process_store): Remove redundant condition.
5663         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
5665 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
5667         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
5668         the 128-bit floating point types.  Fix function comment.
5670 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5672         * config/aarch64/aarch64-simd.md
5673         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
5674         mnemonics.
5675         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
5676         mnemonics.
5678 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
5680         PR tree-optimization/85989
5681         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
5682         variable.
5683         (backprop::intersect_uses): Check it when deciding whether this
5684         is a backedge reference.
5685         (backprop::process_block): Add each phi to m_visited_phis
5686         after visiting it, then clear it at the end.
5688 2018-06-01  Richard Biener  <rguenther@suse.de>
5690         * tree-vectorizer.h (vect_dr_stmt): New function.
5691         (vect_get_load_cost): Adjust.
5692         (vect_get_store_cost): Likewise.
5693         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
5694         Use vect_dr_stmt instead of DR_SMTT.
5695         (vect_record_base_alignments): Likewise.
5696         (vect_calculate_target_alignment): Likewise.
5697         (vect_compute_data_ref_alignment): Likewise and make static.
5698         (vect_update_misalignment_for_peel): Likewise.
5699         (vect_verify_datarefs_alignment): Likewise.
5700         (vector_alignment_reachable_p): Likewise.
5701         (vect_get_data_access_cost): Likewise.  Pass down
5702         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
5703         (vect_get_peeling_costs_all_drs): Likewise.
5704         (vect_peeling_hash_get_lowest_cost): Likewise.
5705         (vect_enhance_data_refs_alignment): Likewise.
5706         (vect_find_same_alignment_drs): Likewise.
5707         (vect_analyze_data_refs_alignment): Likewise.
5708         (vect_analyze_group_access_1): Likewise.
5709         (vect_analyze_group_access): Likewise.
5710         (vect_analyze_data_ref_access): Likewise.
5711         (vect_analyze_data_ref_accesses): Likewise.
5712         (vect_vfa_segment_size): Likewise.
5713         (vect_small_gap_p): Likewise.
5714         (vectorizable_with_step_bound_p): Likewise.
5715         (vect_prune_runtime_alias_test_list): Likewise.
5716         (vect_analyze_data_refs): Likewise.
5717         (vect_supportable_dr_alignment): Likewise.
5718         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5719         (vect_gen_prolog_loop_niters): Likewise.
5720         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5721         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
5722         modify DR_STMT.
5723         (vect_recog_mask_conversion_pattern): Likewise.
5724         (vect_try_gather_scatter_pattern): Likewise.
5725         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
5726         to vect_get_store_cost.
5727         (vect_get_store_cost): Get stmt_info instead of DR.
5728         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
5729         (vect_get_load_cost): Get stmt_info instead of DR.
5731 2018-06-01  Richard Biener  <rguenther@suse.de>
5733         PR middle-end/86017
5734         * gimple-fold.c (var_decl_component_p): Also allow offsetted
5735         vars wrapped in MEM_REFs.
5737 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
5739         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5740         Fix subreg tests so that we only return a choice between
5741         GENERAL_REGS and FP_REGS if the original classes included both.
5743 2018-06-01  Richard Biener  <rguenther@suse.de>
5745         PR ipa/85960
5746         * tree-ssa-structalias.c (get_function_part_constraint):
5747         Handle NULL fi->decl.
5748         (find_func_aliases_for_call): Properly handle indirect
5749         fi from direct call.
5750         (find_func_clobbers): Likewise.
5751         (ipa_pta_execute): Likewise.
5752         (create_variable_info_for): For functions that are ifunc_resolver
5753         resolve to a varinfo that contains the result of the resolver call.
5754         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
5755         aliases.
5757 2018-05-31  Michael Collison  <michael.collison@arm.com>
5759         * config/aarch64/aarch64.md:
5760         (*fix_to_zero_extenddfdi2): New pattern.
5761         * gcc.target/aarch64/fix_extend1.c: New testcase.
5763 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
5765         PR middle-end/78809
5766         PR middle-end/83026
5767         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
5768         and BUILT_IN_STRNCMP_EQ.
5769         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
5770         BUILT_IN_STRNCMP_EQ.
5771         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
5772         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5773         (gimple_fold_builtin): Likewise.
5774         * tree-ssa-strlen.c (compute_string_length): New function.
5775         (determine_min_obsize): New function.
5776         (handle_builtin_string_cmp): New function to handle calls to
5777         string compare functions.
5778         (strlen_optimize_stmt): Add handling to builtin string compare
5779         calls.
5780         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
5781         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5782         * tree.c (build_common_builtin_nodes): Add new defines of
5783         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
5785 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
5787         PR target/85984
5788         * bb-reorder.c (pass_partition_blocks::gate): Return false for
5789         functions with naked attribute.
5791 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5793         * config/i386/sse.md (avx_vec_concat<mode>):
5794         Substitute concat_tg_mode mode attribute with xtg_mode.
5795         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
5796         (concat_tg_mode): Remove mode attribute.
5798 2018-05-31  Martin Sebor  <msebor@redhat.com>
5800         PR c/82063
5801         * calls.c (alloc_max_size): Correct a logic error/typo.
5802         Treat excessive arguments as infinite.  Warn for invalid arguments.
5803         * doc/invoke.texi (-Walloc-size-larger-than): Update.
5805 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
5807         PR target/85829
5808         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
5809         and movx for Haswell.
5811 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
5812             Cesar Philippidis  <cesar@codesourcery.com>
5814         PR middle-end/85879
5815         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
5816         when emitting error on private/firstprivate reductions.
5817         * omp-low.c (lower_omp_target): Avoid reference-type processing
5818         on pointers for firstprivate clause.
5820 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5822         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
5823         (st1x2): Likewise.
5824         (st1x3): Likewise.
5825         * config/aarch64/aarch64-simd.md
5826         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
5827         (aarch64_ld1_x3_<mode>): Likewise
5828         (aarch64_st1x2<VALLDIF:mode>): Likewise
5829         (aarch64_st1_x2_<mode>): Likewise
5830         (aarch64_st1x3<VALLDIF:mode>): Likewise
5831         (aarch64_st1_x3_<mode>): Likewise
5832         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
5833         (vld1_s8_x3): Likewise.
5834         (vld1_u16_x3): Likewise.
5835         (vld1_s16_x3): Likewise.
5836         (vld1_u32_x3): Likewise.
5837         (vld1_s32_x3): Likewise.
5838         (vld1_u64_x3): Likewise.
5839         (vld1_s64_x3): Likewise.
5840         (vld1_f16_x3): Likewise.
5841         (vld1_f32_x3): Likewise.
5842         (vld1_f64_x3): Likewise.
5843         (vld1_p8_x3): Likewise.
5844         (vld1_p16_x3): Likewise.
5845         (vld1_p64_x3): Likewise.
5846         (vld1q_u8_x3): Likewise.
5847         (vld1q_s8_x3): Likewise.
5848         (vld1q_u16_x3): Likewise.
5849         (vld1q_s16_x3): Likewise.
5850         (vld1q_u32_x3): Likewise.
5851         (vld1q_s32_x3): Likewise.
5852         (vld1q_u64_x3): Likewise.
5853         (vld1q_s64_x3): Likewise.
5854         (vld1q_f16_x3): Likewise.
5855         (vld1q_f32_x3): Likewise.
5856         (vld1q_f64_x3): Likewise.
5857         (vld1q_p8_x3): Likewise.
5858         (vld1q_p16_x3): Likewise.
5859         (vld1q_p64_x3): Likewise.
5860         (vst1_s64_x2): Likewise.
5861         (vst1_u64_x2): Likewise.
5862         (vst1_f64_x2): Likewise.
5863         (vst1_s8_x2): Likewise.
5864         (vst1_p8_x2): Likewise.
5865         (vst1_s16_x2): Likewise.
5866         (vst1_p16_x2): Likewise.
5867         (vst1_s32_x2): Likewise.
5868         (vst1_u8_x2): Likewise.
5869         (vst1_u16_x2): Likewise.
5870         (vst1_u32_x2): Likewise.
5871         (vst1_f16_x2): Likewise.
5872         (vst1_f32_x2): Likewise.
5873         (vst1_p64_x2): Likewise.
5874         (vst1q_s8_x2): Likewise.
5875         (vst1q_p8_x2): Likewise.
5876         (vst1q_s16_x2): Likewise.
5877         (vst1q_p16_x2): Likewise.
5878         (vst1q_s32_x2): Likewise.
5879         (vst1q_s64_x2): Likewise.
5880         (vst1q_u8_x2): Likewise.
5881         (vst1q_u16_x2): Likewise.
5882         (vst1q_u32_x2): Likewise.
5883         (vst1q_u64_x2): Likewise.
5884         (vst1q_f16_x2): Likewise.
5885         (vst1q_f32_x2): Likewise.
5886         (vst1q_f64_x2): Likewise.
5887         (vst1q_p64_x2): Likewise.
5888         (vst1_s64_x3): Likewise.
5889         (vst1_u64_x3): Likewise.
5890         (vst1_f64_x3): Likewise.
5891         (vst1_s8_x3): Likewise.
5892         (vst1_p8_x3): Likewise.
5893         (vst1_s16_x3): Likewise.
5894         (vst1_p16_x3): Likewise.
5895         (vst1_s32_x3): Likewise.
5896         (vst1_u8_x3): Likewise.
5897         (vst1_u16_x3): Likewise.
5898         (vst1_u32_x3): Likewise.
5899         (vst1_f16_x3): Likewise.
5900         (vst1_f32_x3): Likewise.
5901         (vst1_p64_x3): Likewise.
5902         (vst1q_s8_x3): Likewise.
5903         (vst1q_p8_x3): Likewise.
5904         (vst1q_s16_x3): Likewise.
5905         (vst1q_p16_x3): Likewise.
5906         (vst1q_s32_x3): Likewise.
5907         (vst1q_s64_x3): Likewise.
5908         (vst1q_u8_x3): Likewise.
5909         (vst1q_u16_x3): Likewise.
5910         (vst1q_u32_x3): Likewise.
5911         (vst1q_u64_x3): Likewise.
5912         (vst1q_f16_x3): Likewise.
5913         (vst1q_f32_x3): Likewise.
5914         (vst1q_f64_x3): Likewise.
5915         (vst1q_p64_x3): Likewise.
5917 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5919         * config/msp430/msp430.c (msp430_output_labelref): Prepend
5920         user_label_prefix to name.
5922         * tree-core.h: Update comment about the format of NAME string
5923         passed to handler in attribute_spec.
5925         * config/msp430/msp430.md: Remove erroneous subreg expression from
5926         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
5927         zero_extend{q,h}isi2.
5929 2018-05-30  Borislav Petkov  <bp@suse.de>
5931         * doc/extend.texi: Document some architecture specific
5932         constraints and sort entries.
5934 2018-05-30  Martin Sebor  <msebor@redhat.com>
5936         PR middle-end/85369
5937         * builtins.c (expand_builtin_stpcpy_1): New function.
5938         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
5939         only if the former succeeds.
5941 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5943         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
5944         in saphira.
5946 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5948         * doc/invoke.texi (-flinker-output): Document
5950 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5952         * passes.c (ipa_write_summaries): Only modify statements if body
5953         is in memory.
5954         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
5955         incrementally linking.
5956         (ipa_passes): Likewise.
5957         * lto-cgraph.c (lto_output_node): When incrementally linking do not
5958         pass down resolution info.
5959         * common.opt (flag_incremental_link): Update info.
5960         * gcc.c (plugin specs): Turn flinker-output=* to
5961         -plugin-opt=-linker-output-known
5962         * toplev.c (compile_file): Also cut compilation when doing incremental
5963         link.
5964         * flag-types. (enum lto_partition_model): Add
5965         LTO_LINKER_OUTPUT_NOLTOREL.
5966         (invoke.texi): Add -flinker-output docs.
5967         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
5968         link same way as WPA; do not stream in dead initializers.
5970         * dwarf2out.c (dwarf2out_die_ref_for_decl,
5971         darf2out_register_external_decl): Support incremental link.
5973 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5975         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
5977 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5979         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
5980         it down to simple_object_copy_lto_debug_sections.
5981         (run_gcc): Determine incremental LTO link time and configure
5982         lto1 into non-wpa mode, disable renaming of debug sections.
5984 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5986         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5987         descriptions of various incorrectly documented functions.
5989 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5991         Revert:
5992         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5993         address check not strict.
5995 2018-05-30  Richard Biener  <rguenther@suse.de>
5997         PR tree-optimization/85964
5998         * tracer.c (better_p): Drop initialized count check, we only
5999         call the function with initialized counts now.
6000         (find_best_successor): Do find a best edge if one
6001         has uninitialized count.
6002         (find_best_predecessor): Likewise.  Do BB frequency check only
6003         if count is initialized.
6005 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
6007         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
6008         (aarch64_ldrstr_offset_compare): New.
6009         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
6010         load/store orderings.
6011         (aarch64_gen_adjusted_ldpstp): Likewise.
6013 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
6015         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6016         Check for subset of GENERAL_REGS and FP_REGS.
6017         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
6018         r=w alternative.
6020 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
6022         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
6023         and wi::to_poly_offset.  Add the current offset and then check
6024         whether the sum fits, rather than using an unchecked addition of
6025         a checked term.  Check for a shwi rather than a uhwi.
6026         * expr.c (get_bit_range): Use tree_to_poly_uint64.
6027         (store_constructor): Use poly_int_tree_p.
6028         (expand_expr_real_1): Likewise.
6029         * function.c (assign_temp): Likewise.
6030         * fold-const.c (const_binop): Use poly_int_tree_p and
6031         wi::to_poly_offset.
6032         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
6033         division.
6034         * ipa-icf-gimple.c (func_checker::compare_operand): Use
6035         to_poly_offset for MEM offsets.
6036         * ipa-icf.c (sem_variable::equals): Likewise.
6037         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
6038         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
6039         wi::to_poly_offset for BIT_FIELD_REF offsets.
6040         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
6041         wi::to_poly_offset.
6042         * var-tracking.c (emit_note_insn_var_location): Use
6043         tree_to_poly_uint64.
6045 2018-05-29  Jim Wilson  <jimw@sifive.com>
6047         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
6049 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
6051         PR target/85950
6052         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
6053         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
6054         sequence.
6055         (sse4_1_round<mode>2): Use nonimmediate_operand
6056         for operand 1 predicate.
6058 2018-05-29  Martin Sebor  <msebor@redhat.com>
6059             Richard Biener  <rguenther@suse.de>
6061         PR testsuite/85888
6062         * calls.c (get_size_range): Call determine_value_range instead
6063         of get_value_range..
6064         * tree-vrp.h (determine_value_range): Declared new function.
6065         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
6067 2018-05-29  Richard Biener  <rguenther@suse.de>
6069         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
6070         sure to use non-pattern stmts for get_earlier_stmt arguments.
6071         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
6072         called on pattern stmts.
6073         (get_later_stmt): Likewise.
6075 2018-05-29  Martin Liska  <mliska@suse.cz>
6077         PR gcov-profile/85759
6078         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
6079         env variables.
6081 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
6083         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
6084         VEC_UNPACK_*_EXPR.
6085         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
6086         VEC_PACK_*_EXPR.
6088         PR target/85918
6089         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6090         VEC_PACK_FLOAT_EXPR): New tree codes.
6091         * tree-pretty-print.c (op_code_prio): Handle
6092         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6093         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6094         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6095         * tree-inline.c (estimate_operator_cost): Likewise.
6096         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
6097         * fold-const.c (const_binop): Likewise.
6098         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
6099         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6100         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6101         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
6102         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6103         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6104         * expr.c (expand_expr_real_2): Likewise.
6105         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
6106         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
6107         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
6108         optabs.
6109         * optabs.c (expand_widen_pattern_expr): For
6110         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
6111         sign from result type rather than operand's type.
6112         (expand_binop_directly): For vec_packu_float_optab and
6113         vec_packs_float_optab allow result type to be different from operand's
6114         type.
6115         * optabs-tree.c (optab_for_tree_code): Handle
6116         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6117         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
6118         * tree-vect-generic.c (expand_vector_operations_1):  Handle
6119         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6120         VEC_PACK_FLOAT_EXPR.
6121         * tree-vect-stmts.c (supportable_widening_operation): Handle
6122         FIX_TRUNC_EXPR.
6123         (supportable_narrowing_operation): Handle FLOAT_EXPR.
6124         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
6125         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
6126         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
6127         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6128         mode attributes.
6129         (vec_pack<floatprefix>_float_<mode>): New expander.
6130         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6131         attributes.
6132         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6133         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6134         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6135         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6136         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6137         Document.
6138         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6139         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6140         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6141         VEC_PACK_FLOAT_EXPR): Document.
6143 2018-05-29  Richard Biener  <rguenther@suse.de>
6145         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
6146         member.
6147         (stmt_vec_info_vec): Make pointer.
6148         (init_stmt_vec_info_vec): Remove.
6149         (free_stmt_vec_info_vec): Likewise.
6150         (set_stmt_vec_info_vec): New function.
6151         (free_stmt_vec_infos): Likewise.
6152         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
6153         (set_vinfo_for_stmt): Likewise.
6154         (get_earlier_stmt): Likewise.
6155         (get_later_stmt): Likewise.
6156         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
6157         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
6158         (vec_info::~vec_info): Free stmt_vec_infos.
6159         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
6160         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
6161         (pass_slp_vectorize::execute): Likewise.
6162         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
6163         (free_stmt_vec_info_vec): Likewise.
6164         (set_stmt_vec_info_vec): New function.
6165         (free_stmt_vec_infos): Likewise.
6166         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
6167         the global stmt_vec_info_vec.
6168         * tree-parloops.c (gather_scalar_reductions): Use
6169         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
6170         vector.
6172 2018-05-29  Richard Biener  <rguenther@suse.de>
6174         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
6176 2018-05-29  Martin Liska  <mliska@suse.cz>
6177             David Malcolm  <dmalcolm@redhat.com>
6179         * vec.c (test_reverse): New.
6180         (vec_c_tests): Add new test.
6181         * vec.h (vl_ptr>::reverse): New function.
6183 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
6185         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
6187         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
6188         and later.
6190 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6192         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
6194 2018-05-28  Richard Biener  <rguenther@suse.de>
6196         PR tree-optimization/85933
6197         * tree-vect-data-refs.c (vect_record_base_alignments): Only
6198         look at stmts marked as vectorizable.
6200 2018-05-28  Richard Biener  <rguenther@suse.de>
6202         PR tree-optimization/85934
6203         * tree-vect-generic.c (expand_vector_operations_1): Hoist
6204         vector boolean check before scalar optimization.
6206 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
6208         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
6209         for armv5te.
6211 2018-05-28  Mark Wielaard  <mark@klomp.org>
6213         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
6214         if it is an expression containing a minus sign.
6216 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
6218         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
6220 2018-05-27  Paul Koning  <ni1d@arrl.net>
6222         * config/pdp11/pdp11.md (truncsihi2): Remove.
6224 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
6225             Chung-Ju Wu  <jasonwucj@gmail.com>
6227         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
6228         implementation.
6229         (unaligned_store_dw): Ditto.
6230         * config/nds32/nds32-memory-manipulation.c
6231         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
6232         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
6233         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
6234         (emit_setmem_word_loop): Rename to ...
6235         (emit_setmem_doubleword_loop): ... this.
6236         (nds32_gen_dup_4_byte_to_word_value): New function.
6237         (nds32_gen_dup_8_byte_to_double_word_value): New function.
6238         (nds32_expand_setmem_loop): Refine implementation.
6239         (nds32_expand_setmem_loop_v3m): Ditto.
6240         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
6241         pattern.
6243 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
6245         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
6247 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
6249         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
6250         (nds32_init_machine_status): Initialize machine->attr_naked_p and
6251         machine->attr_no_prologue_p.
6252         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
6253         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
6254         (nds32_expand_epilogue): Consider attr_naked_p.
6255         (nds32_expand_epilogue_v3pop): Likewise.
6256         (nds32_can_use_return_insn): Likewise.
6257         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
6258         attr_no_prologue_p fields.
6259         * config/nds32/nds32.opt (mret-in-naked-func): New option.
6261 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
6263         PR target/85918
6264         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
6265         attributes.
6266         * config/i386/sse.md
6267         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
6268         Rename to ...
6269         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
6270         ... this.
6271         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
6272         Rename to ...
6273         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
6274         ... this.
6275         (*<floatsuffix>floatv2div2sf2): Rename to ...
6276         (*float<floatunssuffix>v2div2sf2): ... this.
6277         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
6278         (float<floatunssuffix>v2div2sf2_mask): ... this.
6279         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
6280         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
6281         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
6282         to ...
6283         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
6284         ... this.
6285         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6286         Rename to ...
6287         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6288         ... this.
6289         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6290         Rename to ...
6291         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6292         ... this.
6293         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
6294         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
6295         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
6296         gen_ufix_truncv8dfv8si2.
6297         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
6298         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
6299         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
6300         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
6301         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
6302         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
6303         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
6304         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
6306 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
6308         PR target/85900
6309         PR target/85345
6310         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
6312 2018-05-25  Jim Wilson  <jimw@sifive.com>
6314         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
6315         * config/riscv/riscv.c (struct machine_function): Add
6316         interrupt_handler_p and attribute_checked_p fields.
6317         (riscv_attribute_table): Add interrupt.
6318         (riscv_interrupt_type_p): New.
6319         (riscv_save_reg_p): Save extra regs for interrupt handler.
6320         (riscv_use_save_libcall): Return false  for interrupt handler.
6321         (riscv_first_stack_step): Add forward declaration.
6322         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
6323         for interrupt handler with large frame.  Use it for saved reg list.
6324         (riscv_expand_prologue): Move flag_stack_usage_info support to
6325         eliminate duplication.
6326         (riscv_expand_epilogue): Generate mret for interrupt handler.
6327         (riscv_epilogue_uses): New.
6328         (riscv_can_use_return_insn): Return false for interrupt handler.
6329         (riscv_function_ok_for_sibcall): Likewise.
6330         (riscv_set_current_function): Add interrupt handler support.
6331         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
6332         * config/riscv/riscv.md (UNSPECV_MRET): New.
6333         (GP_REGNUM): New.
6334         (riscv_frflags, riscv_fsflags): Use tab after opcode.
6335         (riscv_mret): New.
6336         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
6338 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
6340         PR tree-optimization/85712
6341         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
6342         this candidate has already been replaced in-situ by a copy.
6344 2018-05-25  Jason Merrill  <jason@redhat.com>
6346         PR c++/80485 - inline function non-zero address.
6347         * symtab.c (nonzero_address): Check DECL_COMDAT.
6349 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
6351         PR target/83628
6352         * config/alpha/alpha.md (ashlsi3): New insn pattern.
6353         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
6354         extension of SImode operation.  Use const123_operand predicate.
6355         (*saddsi_1): Remove.
6356         (*saddl_se_1): Ditto.
6357         (*ssubsi_1): Ditto.
6358         (*ssubl_se_1): Ditto.
6359         * config/alpha/predicates.md (const123_operand): New predicate.
6360         * config/alpha/constraints.md (P): Use IN_RANGE.
6362 2018-05-25  Richard Biener  <rguenther@suse.de>
6364         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
6365         defaulted to true.
6366         (ref_maybe_used_by_stmt_p): Likewise.
6367         (stmt_may_clobber_ref_p): Likewise.
6368         (stmt_may_clobber_ref_p_1): Likewise.
6369         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
6370         and pass it along.
6371         (ref_maybe_used_by_stmt_p): Likewise.
6372         (stmt_may_clobber_ref_p): Likewise.
6373         (stmt_may_clobber_ref_p_1): Likewise.
6374         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
6375         the alias oracle to disambiguate DRs with stmts DR analysis
6376         couldn't handle.
6377         (vect_analyze_data_refs): Do not give up on not analyzable
6378         DRs for BB vectorization.  Remove code truncating the dataref
6379         vector.
6381 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
6383         PR target/85832
6384         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6385         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
6386         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
6388 2018-05-25  Richard Biener  <rguenther@suse.de>
6390         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
6391         function, combining stmt data ref gathering and fatal analysis
6392         parts.
6393         (vect_analyze_data_refs): Remove now redudnant code and simplify.
6394         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
6395         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
6396         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
6397         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
6399 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
6401         PR tree-optimization/85720
6402         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
6403         SCC if all partitions are builtins.
6404         (version_loop_by_alias_check): New parameter.  Generate cancelable
6405         runtime alias check if all partitions are builtins.
6406         (distribute_loop): Update call to above function.
6408 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
6410         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
6411         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
6412         (parm_default_def_partition_arg): Ditto.
6413         (set_parm_default_def_partition): Ditto.
6414         (get_parm_default_def_partitions): Ditto and make it static.
6415         (get_undefined_value_partitions): Ditto and make it static.
6416         (remove_ssa_form): Refactor call to init_var_map here.
6417         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
6418         computation for loop region.
6419         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
6420         (register_default_def): Delete.
6421         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
6422         (parm_default_def_partition_arg): Ditto.
6423         (set_parm_default_def_partition): Ditto.
6424         (get_parm_default_def_partitions): Ditto and make it static.
6425         (get_undefined_value_partitions): Ditto and make it static.
6426         (coalesce_with_default, coalesce_with_default): Update comment.
6427         (create_coalesce_list_for_region): New func factored out from
6428         create_outofssa_var_map.
6429         (populate_coalesce_list_for_outofssa): New func factored out from
6430         create_outofssa_var_map and coalesce_ssa_name.
6431         (create_outofssa_var_map): Delete.
6432         (coalesce_ssa_name): Refactor to support live range computation.
6433         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
6434         (get_parm_default_def_partitions): Delete.
6435         (get_undefined_value_partitions): Ditto.
6436         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
6437         computation for loop region.
6438         (new_tree_live_info, loe_visit_block): Ditto.
6439         (live_worklist, set_var_live_on_entry): Ditto.
6440         (calculate_live_on_exit, verify_live_on_entry): Ditto.
6441         * tree-ssa-live.h (struct _var_map): New fields.
6442         (init_var_map): Change decl.
6443         (region_contains_p): New.
6445 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
6447         * tree-ssa-live.h (live_merge_and_clear): Delete.
6449 2018-05-25  Richard Biener  <rguenther@suse.de>
6451         PR c++/85912
6452         * tree-dump.c (dequeue_and_dump): Remove access to removed
6453         operand 2 of a SWITCH_EXPR.
6455 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6457         * doc/sourcebuild.texi (vect_double_cond_arith): Include
6458         multiplication and division.
6459         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
6460         (cond_udiv@var{m}, cond_umod@var{m}): Document.
6461         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
6462         (cond_udiv_optab, cond_umod_optab): New optabs.
6463         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
6464         (IFN_COND_RDIV): New internal functions.
6465         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
6466         TRUNC_MOD_EXPR and RDIV_EXPR.
6467         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
6468         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
6469         New unspecs.
6470         (SVE_INT_BINARY): Include mult.
6471         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
6472         (optab, sve_int_op): Handle mult.
6473         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
6474         UNSPEC_COND_DIV.
6475         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
6476         for SVE_INT_BINARY_SD.
6478 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6480         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
6481         (optab, sve_int_op): Handle div and udiv.
6482         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
6483         for SVE_INT_BINARY_SD.
6484         (*<optab><mode>3): New insn for the same.
6486 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6488         * tree-vect-patterns.c: Include predict.h.
6489         (vect_recog_divmod_pattern): Restrict check for division support
6490         to when optimizing for size.
6492 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6494         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
6495         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
6496         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
6497         (gimple_match_op::set_op): Likewise.
6498         (gimple_resimplify4): Declare.
6499         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
6500         (expr::gen_transform): Likewise.
6501         (decision_tree::gen): Generate a simplification routine for 4 operands.
6502         * gimple-match-head.c (gimple_simplify): Add an overload for
6503         4 operands.  In the top-level function, handle up to 4 call
6504         arguments and call gimple_resimplify4.
6505         (gimple_resimplify4): New function.
6506         (build_call_internal): Pass a fourth operand.
6507         (maybe_push_to_seq): Likewise.
6508         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
6509         Fold VEC_COND_EXPRs of an operation and a default value into
6510         an IFN_COND_* function if possible.
6511         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
6512         New unspecs.
6513         (SVE_COND_FP_BINARY): Include them.
6514         (optab, sve_fp_op): Handle them.
6515         (SVE_INT_BINARY_REV): New code iterator.
6516         (SVE_COND_FP_BINARY_REV): New int iterator.
6517         (commutative): New int attribute.
6518         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
6519         Declare.
6520         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
6521         function.
6522         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
6523         (*cond_<optab><mode>): New patterns for reversed operands.
6525 2018-05-25  Richard Biener  <rguenther@suse.de>
6527         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
6528         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
6529         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
6530         (STMT_VINFO_GROUPED_ACCESS): Adjust.
6531         * tree-vect-data-refs.c (everywhere): Adjust users.
6532         * tree-vect-loop.c (everywhere): Likewise.
6533         * tree-vect-slp.c (everywhere): Likewise.
6534         * tree-vect-stmts.c (everywhere): Likewise.
6535         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6537 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6539         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
6540         Rename to...
6541         (gcc_cv_as_section_exclude): ... this.
6542         Try Solaris as #exclude syntax.
6543         * configure: Regenerate.
6544         * config.in: Regenerate.
6545         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
6546         SECTION_EXCLUDE.
6547         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
6548         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
6550         * varasm.c (default_elf_asm_named_section): Don't check if
6551         HAVE_GAS_SECTION_EXCLUDE is defined.
6553 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6555         * doc/md.texi: Update the documentation of the cond_* optabs
6556         to mention the new final operand.  Fix GET_MODE_NUNITS call.
6557         Describe the scalar case too.
6558         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
6559         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
6560         instead of 2.
6561         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
6562         (get_conditional_internal_fn): Update comment.
6563         * tree-vect-loop.c (vectorizable_reduction): Pass the original
6564         accumulator value as a final argument to conditional functions.
6565         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
6566         a define_expand and add an "else" operand.  Assert for now that
6567         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
6568         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
6569         (*cond_<optab><mode>): New patterns.
6570         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
6571         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
6572         (UNSPEC_COND_EOR): Delete.
6573         (optab): Remove associated mappings.
6574         (SVE_INT_BINARY): New code iterator.
6575         (sve_int_op): Remove int attribute and add "minus" to the code
6576         attribute.
6577         (SVE_COND_INT_OP): Delete.
6578         (SVE_COND_FP_OP): Rename to...
6579         (SVE_COND_FP_BINARY): ...this.
6581 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6583         * optabs.c (can_reuse_operands_p): New function.
6584         (maybe_legitimize_operands): Try to reuse the results for
6585         earlier operands.
6587 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
6589         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
6590         Add {q} suffix to insn mnemonic.
6592 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6594         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
6595         (msp430_warn_func_return): New.
6597 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
6599         * fold-const.c (tree_nonzero_bits): New function.
6600         * fold-const.h (tree_nonzero_bits): Likewise.
6601         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
6602         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
6604 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
6606         PR target/85900
6607         PR target/85345
6608         * varasm.c (assemble_alias): Check ifunc_resolver only on
6609         FUNCTION_DECL.
6611 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
6613         PR target/85903
6614         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
6615         when memory input operand is handled.
6617 2018-05-24  Luis Machado  <luis.machado@linaro.org>
6619         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
6620         global.
6621         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
6623 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
6625         * match.pd: Delay FMA folds until after vectorization.
6627 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6629         PR target/83009
6630         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6631         address check not strict.
6633 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
6635         * gimple-match.h (gimple_match_op): New class.
6636         (mprts_hook): Replace parameters with a gimple_match_op *.
6637         (maybe_build_generic_op): Likewise.
6638         (gimple_simplified_result_is_gimple_val): Replace parameters with
6639         a const gimple_match_op *.
6640         (gimple_simplify): Replace code_helper * and tree * parameters with
6641         a gimple_match_op * parameter.
6642         (gimple_resimplify1): Replace code_helper *, tree and tree *
6643         parameters with a gimple_match_op * parameter.
6644         (gimple_resimplify2): Likewise.
6645         (gimple_resimplify3): Likewise.
6646         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
6647         parameters with a gimple_match_op * parameter.
6648         * gimple-match-head.c (gimple_simplify): Change prototypes of
6649         auto-generated functions to take a gimple_match_op * instead of
6650         separate code_helper * and tree * parameters.  Make the same
6651         change in the top-level overload and update calls to the
6652         gimple_resimplify routines.  Update calls to the auto-generated
6653         functions and to maybe_push_res_to_seq in the publicly-facing
6654         operation-specific gimple_simplify overloads.
6655         (gimple_match_op::MAX_NUM_OPS): Define.
6656         (gimple_resimplify1): Replace rcode and ops with a single res_op
6657         parameter.  Update call to gimple_simplify.
6658         (gimple_resimplify2): Likewise.
6659         (gimple_resimplify3): Likewise.
6660         (mprts_hook): Replace parameters with a gimple_match_op *.
6661         (maybe_build_generic_op): Likewise.
6662         (build_call_internal): Replace type, nargs and ops with
6663         a gimple_match_op *.
6664         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
6665         with a single gimple_match_op *.  Update calls to mprts_hook,
6666         build_call_internal and gimple_simplified_result_is_gimple_val.
6667         Factor out code that is common to the tree_code and combined_fn cases.
6668         * genmatch.c (expr::gen_transform): Replace tem_code and
6669         tem_ops with a gimple_match_op called tem_op.  Update calls
6670         to the gimple_resimplify functions and maybe_push_res_to_seq.
6671         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
6672         res_ops.  Update call to the gimple_resimplify functions.
6673         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
6674         (decision_tree::gen): Make the functions take a gimple_match_op *
6675         called res_op instead of separate res_code and res_ops parameters.
6676         Update call accordingly.
6677         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
6678         and ops with a single res_op parameter.  Update calls to
6679         maybe_build_generic_op and maybe_push_res_to_seq.
6680         (fold_stmt_1): Update calls to gimple_simplify and
6681         replace_stmt_with_simplification.
6682         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
6683         and gimple_simplified_result_is_gimple_val.
6684         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
6685         gimple_simplify.
6686         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
6687         with a gimple_match_op *.
6688         (vn_nary_build_or_lookup): Likewise.  Update call to
6689         vn_nary_build_or_lookup_1.
6690         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
6691         gimple_match_op *.  Update calls to the gimple_resimplify routines
6692         and to gimple_simplified_result_is_gimple_val.
6693         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
6694         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
6695         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
6696         (visit_nary_op): Likewise.
6697         (visit_reference_op_load): Likewise.
6699 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6701         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
6702         modifier for printing the step amount.
6704 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
6706         PR target/78849
6707         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
6708         types.
6710 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
6712         * doc/sourcebuild.texi (Endianness): New subsubsection.
6714 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6716         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6717         <prefetch_dynamic_strides>: New const bool field.
6718         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6719         prefetch_dynamic_strides.
6720         (exynosm1_prefetch_tune): Likewise.
6721         (thunderxt88_prefetch_tune): Likewise.
6722         (thunderx_prefetch_tune): Likewise.
6723         (thunderx2t99_prefetch_tune): Likewise.
6724         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
6725         false.
6726         (aarch64_override_options_internal): Update to set
6727         PARAM_PREFETCH_DYNAMIC_STRIDES.
6728         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6729         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6730         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6731         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6732         prefetch-dynamic-strides setting.
6734 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6736         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6737         <minimum_stride>: New const int field.
6738         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6739         minimum_stride field defaulting to -1.
6740         (exynosm1_prefetch_tune): Likewise.
6741         (thunderxt88_prefetch_tune): Likewise.
6742         (thunderx_prefetch_tune): Likewise.
6743         (thunderx2t99_prefetch_tune): Likewise.
6744         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
6745         <default_opt_level>: Set to 3.
6746         (aarch64_override_options_internal): Update to set
6747         PARAM_PREFETCH_MINIMUM_STRIDE.
6748         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6749         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6750         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6751         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6752         stride is constant and is below the minimum stride threshold.
6754 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6756         * config/arm/arm-cpus.in (mode26): Delete.
6757         (armv4): Delete mode26 reference.
6758         * config/arm/arm.c (arm_configure_build_target): Delete use of
6759         isa_bit_mode26.
6761 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
6763         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
6764         New insn pattern.
6765         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
6766         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
6767         for non-SSE modes.
6768         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
6769         (floatunsdidf2): Ditto.
6771 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
6773         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
6774         (fixuns_trunc<mode>si2_avx512f): Ditto.
6775         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
6776         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
6777         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
6779 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
6781         PR rtl-optimization/79985
6782         * df-scan.c (df_insn_refs_collect): Remove special case for
6783         global registers and asm statements.
6785 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
6787         * extend.texi (Global Register Variables): Rewrite the bullet list.
6788         Note that the register is available for allocation. Note that access
6789         via inline asm must use constraints. Add note about async-signal
6790         handlers. Remove paragraph about automagic register selection.
6792 2018-05-23  Richard Biener  <rguenther@suse.de>
6794         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
6795         of fixed offset from memset VN.
6797 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
6799         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
6800         first_interp field.
6801         (alloc_cand_and_find_basis): Initialize first_interp field.
6802         (slsr_process_mul): Modify first_interp field.
6803         (slsr_process_add): Likewise.
6804         (slsr_process_cast): Modify first_interp field for each new
6805         interpretation.
6806         (slsr_process_copy): Likewise.
6807         (dump_candidate): Dump first_interp field.
6808         (replace_mult_candidate): Process all interpretations, not just
6809         subsequent ones.
6810         (replace_rhs_if_not_dup): Likewise.
6811         (replace_one_candidate): Likewise.
6813 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
6815         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
6816         Add new boolean.
6817         (aarch64_needs_frame_chain): New function.
6818         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
6820 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
6822         PR target/84882
6823         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
6824         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
6825         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
6826         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
6827         as true for strict-align.
6828         (aarch64_can_inline_p): Perform checks even when callee has no
6829         attributes to check for strict alignment.
6830         * doc/extend.texi (AArch64 Function Attributes): Document
6831         no-strict-align.
6832         * doc/invoke.texi: (AArch64 Options): Likewise.
6834 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
6836         PR tree-optimization/85853
6837         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
6838         the handling of the root of the node to...
6839         (vect_slp_analyze_node_operations_1): ...this new function,
6840         and run the whole thing with the child nodes' def types
6841         set according to their SLP node's def type.
6843 2018-05-23  Richard Biener  <rguenther@suse.de>
6845         PR middle-end/85874
6846         * tree-data-ref.c (create_runtime_alias_checks): Defer
6847         and ignore overflow warnings.
6849 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
6851         PR tree-optimization/85822
6852         * tree-vrp.c (is_masked_range_test): Fix handling of negative
6853         constants.
6855 2018-05-23  Richard Biener  <rguenther@suse.de>
6857         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6858         memset constants via native_interpret_expr.
6860 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
6862         PR target/85345
6863         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
6864         attribute.
6865         (cgraph_node::create_alias): Likewise.
6866         (cgraph_node::get_availability): Check ifunc_resolver instead
6867         of looking up ifunc attribute.
6868         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6869         * varasm.c (do_assemble_alias): Likewise.
6870         (assemble_alias): Likewise.
6871         (default_binds_local_p_3): Likewise.
6872         * cgraph.h (cgraph_node): Add ifunc_resolver.
6873         (cgraph_node::only_called_directly_or_aliased_p): Return false
6874         for IFUNC resolver.
6875         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
6876         attribute.
6877         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
6878         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
6879         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
6880         instead of looking up ifunc attribute.
6882 2018-05-22  Luis Machado  <luis.machado@linaro.org>
6884         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
6886 2018-05-22  Martin Sebor  <msebor@redhat.com>
6888         PR middle-end/85359
6889         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
6890         only when expasion succeeds.
6891         (expand_builtin_strcmp): Same.
6892         (expand_builtin_strncmp): Same.
6894 2018-05-22  Martin Sebor  <msebor@redhat.com>
6896         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
6898 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
6899             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6901         * config/aarch64/aarch64-ldpstp.md: Replace uses of
6902         aarch64_mem_pair_operand with memory_operand and delete operand swapping
6903         code.
6904         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6905         Add check for legitimate_address.
6906         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
6907         (aarch64_swap_ldrstr_operands): New.
6908         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
6909         Define prototype.
6911 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
6912             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6914         * config/aarch64/aarch64.md: New patterns to generate stp
6915         and ldp.
6916         (store_pair_sw, store_pair_dw): New patterns to generate stp for
6917         single words and double words.
6918         (load_pair_sw, load_pair_dw): Likewise.
6919         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
6920         Delete.
6921         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
6922         Delete.
6923         * config/aarch64/aarch64-ldpstp.md: Modify peephole
6924         for different mode ldpstp and add peephole for merged zero stores.
6925         Likewise for loads.
6926         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6927         Add size check.
6928         (aarch64_gen_store_pair): Rename calls to match new patterns.
6929         (aarch64_gen_load_pair): Rename calls to match new patterns.
6930         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
6931         (load_pair<DREG:mode><DREG2:mode>): ... This.
6932         (store_pair<mode>): Rename to...
6933         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
6934         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
6935         New mode iterators.
6936         (V_INT_EQUIV): Handle SImode.
6937         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
6938         New predicate.
6940 2018-05-22  Martin Sebor  <msebor@redhat.com>
6942         PR c/85623
6943         * calls.c (maybe_warn_nonstring_arg): Use string length to set
6944         or ajust the presumed bound on an operation to avoid unnecessary
6945         warnings.
6947 2018-05-22  Martin Sebor  <msebor@redhat.com>
6949         PR tree-optimization/85826
6950         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
6951         assuming that a DECL necesarily has a constant size.
6953 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
6955         PR middle-end/85862
6956         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
6958 2018-05-22  Richard Biener  <rguenther@suse.de>
6960         PR tree-optimization/85834
6961         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
6962         non-constant and non-zero memset arguments.
6964 2018-05-22  Martin Liska  <mliska@suse.cz>
6966         PR ipa/85607
6967         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
6969 2018-05-22  Richard Biener  <rguenther@suse.de>
6971         PR tree-optimization/85863
6972         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
6973         comparisons when vectype is specified.
6974         (vectorizable_condition): Do not specify vectype for
6975         vect_is_simple_cond when SLP vectorizing.
6977 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
6979         PR target/85657
6980         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
6981         define __ibm128 as long double.
6982         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
6983         as a distinct type when IEEE 128-bit support is enabled.
6984         (init_float128_ieee): Fix up conversions between IFmode and IEEE
6985         128-bit types to use the correct functions.
6986         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
6987         convert between 128-bit floating point types that have different
6988         modes but the same representation, instead of using gen_lowpart to
6989         makean alias.
6990         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
6991         KFmode.
6992         (IFKF_reg): New attributes to give the register constraints for
6993         IFmode and KFmode.
6994         (extend<mode>tf2_internal): New insns to mark an explicit
6995         conversion between 128-bit floating point types that have a
6996         different mode but share the same representation.
6998 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
7000         PR tree-optimization/85814
7001         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
7002         a null return from get_strinfo when unsharing the next
7003         strinfo in the chain.
7005 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7007         PR gcc/84923
7008         * varasm.c (weak_finish): Clean up weak_decls.
7010 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7012         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
7013         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
7014         UNSPEC_UADALP values.
7015         * config/aarch64/iterators.md (ABAL): New int iterator.
7016         (ABDL2): Likewise.
7017         (ADALP): Likewise.
7018         (sur): Add mappings for the above.
7019         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
7020         New define_insn.
7021         (aarch64_<sur>abal<mode>_4): Likewise.
7022         (aarch64_<sur>adalp<mode>_3): Likewise.
7023         (<sur>sadv16qi): New define_expand.
7025 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
7027         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
7028         (*movdf_internal): Ditto.
7029         (*rcpsf2_sse): Ditto.
7030         (*rsqrtsf2_sse): Ditto.
7031         (*sqrt<mode>2_sse): Ditto.
7033 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
7035         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
7036         eor3q<mode>4.
7037         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
7038         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
7039         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
7040         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
7041         vbcaxq_s64): New.
7042         * config/aarch64/arm_neon.h: Likewise.
7043         * config/aarch64/iterators.md (VQ_I): New.
7045 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
7047         * config.gcc: Add arc/t-multilib-linux to tmake_file for
7048         arc*-*-linux*.
7049         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
7050         MULTILIB_DIRNAMES
7052 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
7054         * config/nds32/constraints.md (S): New constraint.
7055         * config/nds32/nds32.md (call_internal): Use constraint S.
7056         (call_value_internal): Likewise.
7057         (sibcall_internal): Likewise.
7058         (sibcall_value_internal): Likewise.
7060 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
7061             Chung-Ju Wu  <jasonwucj@gmail.com>
7063         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
7064         into consideration.
7066 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
7067             Chung-Ju Wu  <jasonwucj@gmail.com>
7069         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
7070         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
7071         (nds32_rtx_costs_impl): Simplify.
7072         (nds32_address_cost_impl): Simplify.
7073         (nds32_init_rtx_costs): New function.
7074         (nds32_rtx_costs_speed_prefer): Likewise.
7075         (nds32_rtx_costs_size_prefer): Likewise.
7076         (nds32_address_cost_speed_prefer): Likewise.
7077         (nds32_address_cost_speed_fwprop): Likewise.
7078         (nds32_address_cost_size_prefer): Likewise.
7079         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
7080         * config/nds32/nds32.c (nds32_option_override): Use
7081         nds32_init_rtx_costs function.
7083 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
7085         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
7086         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
7087         (TARGET_PIPELINE_N8): Likewise.
7088         (TARGET_PIPELINE_N10): Likewise.
7089         (TARGET_PIPELINE_N13): Likewise.
7090         (TARGET_PIPELINE_GRAYWOLF): Likewise.
7092 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
7094         * config/nds32/nds32-fpu.md: Update copyright year.
7096 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7098         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
7100 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7102         * config/nds32/nds32.c
7103         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
7104         * config/nds32/nds32.opt (minline-asm-r15): New option.
7106 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7108         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
7109         MASK_HW_ABS.
7110         * config/nds32/nds32.md (abssi2): New pattern.
7112 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
7114         * config/i386/i386.md (rex64namesuffix): New mode attribute.
7115         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
7116         Merge insn pattern from sse_cvtsi2ss<round_name> and
7117         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
7118         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
7119         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
7120         using SWI48 mode iterator.
7121         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
7122         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
7123         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
7124         pattern from sse_cvttss2si<round_saeonly_name>
7125         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
7126         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
7127         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7128         using SWI48 mode iterator.
7129         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7130         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7131         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7132         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7133         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7134         using SWI48 mode iterator.
7135         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7136         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7137         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7138         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7139         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7140         SWI48 mode iterator.
7141         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7142         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7143         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
7144         pattern from sse_cvttsd2si<round_saeonly_name>
7145         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
7147 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7149         * config/nds32/nds32-md-auxiliary.c
7150         (nds32_valid_smw_lwm_base_p): Refine.
7151         (nds32_output_smw_single_word): Refine.
7152         (nds32_output_smw_double_word): New.
7153         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
7155 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7157         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
7158         (nds32_output_stack_pop): Refine.
7159         (nds32_expand_unaligned_load): Refine.
7160         (nds32_expand_unaligned_store): Refine.
7162 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
7163             Chung-Ju Wu  <jasonwucj@gmail.com>
7165         * config/nds32/constants.md: Add TP_REGNUM constant.
7166         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
7167         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
7168         UNSPEC_ADD32.
7169         * config/nds32/nds32-doubleword.md: Consider flag_pic.
7170         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
7171         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
7172         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
7173         and PIC code generation.
7174         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
7175         code generation.
7176         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
7177         optimization.
7178         * config/nds32/nds32.md: Support TLS and PIC.
7179         * config/nds32/nds32.c: Support TLS and PIC.
7180         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
7181         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
7182         predicate.
7184 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7186         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
7187         mode with E_ prefix.
7189 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
7190             Chung-Ju Wu  <jasonwucj@gmail.com>
7192         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
7193         * config/nds32/nds32-md-auxiliary.c
7194         (symbolic_reference_mentioned_p): New.
7195         (nds32_legitimize_ict_address): New.
7196         (nds32_expand_ict_move): New.
7197         (nds32_indirect_call_referenced_p): New.
7198         (nds32_symbol_binds_local_p): Delete.
7199         (nds32_long_call_p): Modify.
7200         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
7201         * config/nds32/nds32-protos.h
7202         (symbolic_reference_mentioned_p): Declare.
7203         (nds32_legitimize_ict_address): Declare.
7204         (nds32_expand_ict_move): Declare.
7205         (nds32_indirect_call_referenced_p): Declare.
7206         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
7207         (nds32_relax_group): Use nds32_ict_const_p as condition.
7208         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
7209         (nds32_asm_file_start): Output ict_model directive in asm code.
7210         (nds32_legitimate_address_p): Consider indirect call.
7211         (nds32_print_operand): Consider indirect call.
7212         (nds32_print_operand_address): Consider indirect call.
7213         (nds32_insert_attributes): Handle "indirect_call" attribute.
7214         (TARGET_LEGITIMATE_ADDRESS_P): Define.
7215         (TARGET_LEGITIMATE_CONSTANT_P): Define.
7216         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
7217         (TARGET_DELEGITIMIZE_ADDRESS): Define.
7218         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
7219         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
7220         (TARGET_ICT_MODEL_SMALL): Define.
7221         (TARGET_ICT_MODEL_LARGE): Define.
7222         * config/nds32/nds32.md (movsi): Consider ict model.
7223         (call, call_value): Consider ict model.
7224         (sibcall, sibcall_value): Consider ict model.
7225         * config/nds32/nds32.opt (mict-model): New option.
7226         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
7227         model.
7229 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
7230             Monk Chiang  <sh.chiang04@gmail.com>
7231             Jim Wilson <jimw@sifive.com>
7233         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
7234         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
7235         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
7236         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
7237         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
7238         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
7239         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
7240         compute save_libcall_adjustment properly.
7241         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
7242         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
7243         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
7244         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
7245         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
7246         (ABI_SPEC): Handle mabi=ilp32e.
7247         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
7248         (RVE): Add RVE mask.
7249         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
7250         <-march>: Add rv32e as an example.
7252 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
7254         PR c++/82899
7255         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
7256         (intra_create_variable_infos): Handle C++ constructors.
7258 2018-05-18  Martin Liska  <mliska@suse.cz>
7260         * passes.def: Remove a redundant pass.
7262 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7264         PR bootstrap/85838
7265         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
7267 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7269         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
7270         (ARMv4): Update.
7271         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
7272         (ARMv6m): Update.
7273         (armv2, armv2a, armv3, armv3m): Delete architectures.
7274         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
7275         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
7276         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
7277         Delete cpus.
7278         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
7279         (*mulsidi3adddi): Likewise.
7280         (mulsidi3): Likewise.
7281         (*mulsidi3_nov6): Likewise.
7282         (umulsidi3): Likewise.
7283         (umulsidi3_nov6): Likewise.
7284         (umaddsidi4): Likewise.
7285         (*umulsidi3adddi): Likewise.
7286         (smulsi3_highpart): Likewise.
7287         (*smulsi3_highpart_nov6): Likewise.
7288         (umulsi3_highpart): Likewise.
7289         (*umulsi3_highpart_nov6): Likewise.
7290         * config/arm/arm.h (arm_arch3m): Delete.
7291         * config/arm/arm.c (arm_arch3m): Delete.
7292         (arm_option_override_internal): Update armv3-related comment.
7293         (arm_configure_build_target): Delete use of isa_bit_mode32.
7294         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
7295         (arm_rtx_costs_internal): Delete check of arm_arch3m.
7296         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
7297         (mulsa3): Likewise.
7298         (mulusa3): Likewise.
7299         * config/arm/arm-protos.h (arm_arch3m): Delete.
7300         * config/arm/arm-tables.opt: Regenerate.
7301         * config/arm/arm-tune.md: Likewise.
7302         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
7303         deleted architectures.
7305 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7307         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
7308         (armv5t, armv5te): New features.
7309         (ARMv5, ARMv5e): Delete fgroups.
7310         (ARMv5t, ARMv5te): Adjust for above changes.
7311         (ARMv6m): Likewise.
7312         (armv5, armv5e): Delete arches.
7313         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
7314         arm_arch5.
7315         (*call_reg_arm): Likewise.
7316         (*call_value_reg_armv5): Likewise.
7317         (*call_value_reg_arm): Likewise.
7318         (*call_symbol): Likewise.
7319         (*call_value_symbol): Likewise.
7320         (*sibcall_insn): Likewise.
7321         (*sibcall_value_insn): Likewise.
7322         (clzsi2): Likewise.
7323         (prefetch): Likewise.
7324         (define_split and define_peephole2 dependent on arm_arch5):
7325         Likewise.
7326         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
7327         arm_arch5e.
7328         (TARGET_ARM_QBIT): Likewise.
7329         (TARGET_DSP_MULTIPLY): Likewise.
7330         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
7331         (arm_arch5, arm_arch5e): Delete.
7332         (arm_arch5t, arm_arch5te): Declare.
7333         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
7334         (arm_arch5t): Declare.
7335         (arm_option_reconfigure_globals): Update for the above.
7336         (arm_options_perform_arch_sanity_checks): Update comment, replace
7337         use of arm_arch5 with arm_arch5t.
7338         (use_return_insn): Likewise.
7339         (arm_emit_call_insn): Likewise.
7340         (output_return_instruction): Likewise.
7341         (arm_final_prescan_insn): Likewise.
7342         (arm_coproc_builtin_available): Likewise.
7343         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
7344         arm_arch5e with arm_arch5t and arm_arch5te.
7345         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
7346         (arm_arch5t, arm_arch5te): Declare.
7347         * config/arm/arm-tables.opt: Regenerate.
7348         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
7349         * config/arm/t-multilib: Likewise.
7350         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
7351         instead of arm_arch5.
7352         (*call_reg_thumb1): Likewise.
7353         (*call_value_reg_thumb1_v5): Likewise.
7354         (*call_value_reg_thumb1): Likewise.
7355         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
7356         unreachable path.
7357         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
7359 2018-05-18  Martin Liska  <mliska@suse.cz>
7361         PR gcov-profile/84846
7362         * doc/gcov.texi: Document -t option of gcov tool.
7364 2018-05-18  Martin Liska  <mliska@suse.cz>
7366         PR gcov-profile/84846
7367         * gcov.c (print_usage): Add new -t option.
7368         (process_args): Handle the option.
7369         (generate_results): Use stdout as output when requested by
7370         the option.
7372 2018-05-18  Martin Liska  <mliska@suse.cz>
7374         PR gcov-profile/84846
7375         * coverage.c (coverage_init): Write PWD to .gcno file.
7376         * doc/gcov.texi: Document how working directory is printed.
7377         * gcov-dump.c (dump_gcov_file): Print PWD.
7378         * gcov.c (output_intermediate_file): Likewise.
7379         (read_graph_file): Read PWD string.
7380         (output_lines): Print PWD.
7382 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7384         PR middle-end/85817
7385         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
7386         for retval and return false if all args to phi are zero.
7388 2018-05-18  Richard Biener  <rguenther@suse.de>
7390         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
7391         method.
7392         (evrp_dom_walker::before_dom_children): Call it.
7394 2018-05-18  Richard Biener  <rguenther@suse.de>
7396         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
7397         results when processing array refs with variable index.
7399 2018-05-18  Toon Moene  <toon@moene.org>
7401         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
7402         directly after that of -floop-interchange. Indicate that both
7403         options are enabled by default when specifying -O3.
7405 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7407         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
7408         iterator.  Delete separate integer-mode vec_set<mode> expander.
7409         (aarch64_simd_vec_setv2di): Delete.
7410         (vec_setv2di): Delete.
7411         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
7412         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
7413         the "w, r" alternative.
7415 2018-05-18  Martin Liska  <mliska@suse.cz>
7417         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
7418         * tree-pass.h (make_pass_lower_switch_O0): New function.
7419         * tree-switch-conversion.c (node_has_low_bound): Remove.
7420         (node_has_high_bound): Likewise.
7421         (node_is_bounded): Likewise.
7422         (class pass_lower_switch): Make it a template type and create
7423         two instances.
7424         (pass_lower_switch::execute): Add template argument.
7425         (make_pass_lower_switch): New function.
7426         (make_pass_lower_switch_O0): New function.
7427         (do_jump_if_equal): Remove.
7428         (emit_case_nodes): Simplify to just handle all 3 cases and leave
7429         all the hard work to tree optimization passes.
7431 2018-05-18  Martin Liska  <mliska@suse.cz>
7433         * dbgcnt.c (limit_low): Renamed from limit.
7434         (limit_high): New variable.
7435         (dbg_cnt_is_enabled): Check for upper limit.
7436         (dbg_cnt): Adjust dumping.
7437         (dbg_cnt_set_limit_by_index): Add new argument for high
7438         value.
7439         (dbg_cnt_set_limit_by_name): Likewise.
7440         (dbg_cnt_process_single_pair): Parse new format.
7441         (dbg_cnt_process_opt): Use strtok.
7442         (dbg_cnt_list_all_counters): Remove 'value' and add
7443         'limit_high'.
7444         * doc/invoke.texi: Document changes.
7446 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
7448         * doc/sourcebuild.texi (scalar_all_fma): Document.
7449         * tree.def (FMA_EXPR): Delete.
7450         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
7451         * internal-fn.c (ternary_direct): New macro.
7452         (expand_ternary_optab_fn): Likewise.
7453         (direct_ternary_optab_supported_p): Likewise.
7454         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
7455         * builtins.c (fold_builtin_fma): Delete.
7456         (fold_builtin_3): Don't call it.
7457         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
7458         * expr.c (expand_expr_real_2): Likewise.
7459         * fold-const.c (operand_equal_p): Likewise.
7460         (fold_ternary_loc): Likewise.
7461         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
7462         * gimple.c (DEFTREECODE): Likewise.
7463         * gimplify.c (gimplify_expr): Likewise.
7464         * optabs-tree.c (optab_for_tree_code): Likewise.
7465         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7466         * tree-eh.c (operation_could_trap_p): Likewise.
7467         (stmt_could_throw_1_p): Likewise.
7468         * tree-inline.c (estimate_operator_cost): Likewise.
7469         * tree-pretty-print.c (dump_generic_node): Likewise.
7470         (op_code_prio): Likewise.
7471         * tree-ssa-loop-im.c (stmt_cost): Likewise.
7472         * tree-ssa-operands.c (get_expr_operands): Likewise.
7473         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
7474         * fold-const-call.h (fold_fma): Delete.
7475         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
7476         CFN_FNMA and CFN_FNMS.
7477         (fold_fma): Delete.
7478         * genmatch.c (combined_fn): New enum.
7479         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
7480         (commutative_op): New function.
7481         (commutate): Use it.  Handle more than 2 operands.
7482         (dt_operand::gen_gimple_expr): Use commutative_op.
7483         (parser::parse_expr): Allow :c to be used with non-binary
7484         operators if the commutative operand is known.
7485         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
7486         CFN_FMS, CFN_FNMA and CFN_FNMS.
7487         (backprop::process_assign_use): Remove FMA_EXPR handling.
7488         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
7489         (gen_hsa_fma): New function.
7490         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
7491         IFN_FNMA and IFN_FNMS.
7492         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
7493         * gimple-fold.h (follow_all_ssa_edges): Declare.
7494         * gimple-fold.c (follow_all_ssa_edges): New function.
7495         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
7496         gimple_build interface and use follow_all_ssa_edges to fold the result.
7497         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
7498         instead of checking for optabs directly.
7499         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
7500         rather than FMA_EXPRs.
7501         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
7502         call to IFN_FMA instead of an FMA_EXPR.
7504 2018-05-17  Jim Wilson  <jimw@sifive.com>
7506         * expr.c (do_tablejump): When converting index to Pmode, if we have a
7507         sign extended promoted subreg, and the range does not have the sign bit
7508         set, then do a sign extend.
7510         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
7511         test, check for sign extended subreg and/or constant operands, and
7512         do a sign extend in that case.
7514 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
7516         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
7517         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
7518         Add untyped.
7519         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
7520         Change logics_shift_reg to logics_shift_imm.
7521         (thunderx2t99_fp_loadpair_basic): Delete.
7522         (thunderx2t99_fp_storepair_basic): Delete.
7523         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
7524         (thunderx2t99_asimd_polynomial): Delete.
7525         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
7526         and neon_fp_mul_d_scalar_q.
7527         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
7528         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
7529         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
7530         (thunderx2t99_asimd_lut): Add missing tbl types.
7531         (thunderx2t99_asimd_ext): Delete.
7532         (thunderx2t99_asimd_load1_1_mult): Delete.
7533         (thunderx2t99_asimd_load1_2_mult): Delete.
7534         (thunderx2t99_asimd_load1_ldp): New.
7535         (thunderx2t99_asimd_load1): New.
7536         (thunderx2t99_asimd_load2): Add missing *load2* types.
7537         (thunderx2t99_asimd_load3): New.
7538         (thunderx2t99_asimd_load4): New.
7539         (thunderx2t99_asimd_store1_1_mult): Delete.
7540         (thunderx2t99_asimd_store1_2_mult): Delete.
7541         (thunderx2t99_asimd_store2_mult): Delete.
7542         (thunderx2t99_asimd_store2_onelane): Delete.
7543         (thunderx2t99_asimd_store_stp): New.
7544         (thunderx2t99_asimd_store1): New.
7545         (thunderx2t99_asimd_store2): New.
7546         (thunderx2t99_asimd_store3): New.
7547         (thunderx2t99_asimd_store4): New.
7549 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
7551         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
7552         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
7554 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
7555             Segher Boessenkool  <segher@kernel.crashing.org>
7557         PR target/85698
7558         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
7559         operand.
7561 2018-05-17  Richard Biener  <rguenther@suse.de>
7563         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
7564         for pruning loop and prune defs feeding only already visited PHIs.
7566 2018-05-17  Richard Biener  <rguenther@suse.de>
7568         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
7570 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
7571             Richard Biener  <rguenther@suse.de>
7573         PR tree-optimization/85793
7574         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
7575         for VMAT_ELEMENTWISE.
7577 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
7579         * internal-fn.h (lookup_internal_fn): Declare
7580         * internal-fn.c (lookup_internal_fn): New function.
7581         * gimple.c (gimple_build_call_from_tree): Handle calls to
7582         internal functions.
7583         * gimple-pretty-print.c (dump_gimple_call): Print "." before
7584         internal function names.
7585         * tree-pretty-print.c (dump_generic_node): Likewise.
7586         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
7588 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
7590         * gimple-fold.h (gimple_build): Make the function forms take
7591         combined_fn rather than built_in_function.
7592         (gimple_simplify): Likewise.
7593         * gimple-match-head.c (gimple_simplify): Likewise.
7594         * gimple-fold.c (gimple_build): Likewise.
7595         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
7596         rather than gimple_build_call_internal.
7597         (get_initial_defs_for_reduction): Likewise.
7598         (vect_create_epilog_for_reduction): Likewise.
7599         (vectorizable_live_operation): Likewise.
7601 2018-05-17  Martin Liska  <mliska@suse.cz>
7603         * gimple-ssa-sprintf.c (format_directive): Do not use
7604         space in between 'G_' and '('.
7606 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
7608         PR target/85323
7609         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
7610         even if the mask is not all ones.
7612         PR target/85323
7613         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
7614         vector.
7615         (ix86_gimple_fold_builtin): Likewise.
7617         PR target/85323
7618         * config/i386/i386.c: Include tree-vector-builder.h.
7619         (ix86_vector_shift_count): New function.
7620         (ix86_fold_builtin): Fold shift builtins by scalar count.
7621         (ix86_gimple_fold_builtin): Likewise.
7623         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
7624         _mm512_setzero): New intrinsics.
7626 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
7627             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7629         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
7630         code generation for cases where splatting a value is not useful.
7631         * simplify-rtx.c (simplify_ternary_operation): Simplify
7632         vec_merge across a vec_duplicate and a paradoxical subreg forming
7633         a vector mode to a vec_concat.
7635 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
7637         * config.gcc: Support "goldmont-plus".
7638         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7639         "goldmont-plus".
7640         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7641         PROCESSOR_GOLDMONT_PLUS.
7642         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
7643         (processor_target_table): Add "goldmont-plus".
7644         (PTA_GOLDMONT_PLUS): Define.
7645         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
7646         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
7647         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
7648         (fold_builtin_cpu): Add "goldmont-plus".
7649         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
7650         (ix86_option_override_internal): Add "goldmont-plus".
7651         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
7652         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
7653         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
7654         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
7656 2018-05-17  Richard Biener  <rguenther@suse.de>
7658         PR tree-optimization/85757
7659         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
7660         remove defs that only feed that PHI from further processing.
7662 2018-05-16  Jim Wilson  <jimw@sifive.com>
7664         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
7665         asterisk to name.
7666         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
7668 2018-05-16  Mark Wielaard  <mark@klomp.org>
7670         * dwarf2out.c (count_index_strings): New function.
7671         (output_indirect_strings): Call count_index_strings and generate
7672         header for dwarf_version >= 5.
7674 2018-05-16  Mark Wielaard  <mark@klomp.org>
7676         * dwarf2out.c (dwarf_FORM): New function.
7677         (set_indirect_string): Use dwarf_FORM.
7678         (reset_indirect_string): Likewise.
7679         (size_of_die): Likewise.
7680         (value_format): Likewise.
7681         (output_die): Likewise.
7682         (add_skeleton_AT_string): Likewise.
7683         (output_macinfo_op): Likewise.
7684         (index_string): Likewise.
7685         (output_index_string_offset): Likewise.
7686         (output_index_string): Likewise.
7687         (count_index_strings): Likewise.
7689 2018-05-16  Carl Love  <cel@us.ibm.com>
7691         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7692         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
7694 2018-05-16  Martin Jambor  <mjambor@suse.cz>
7696         * ipa-prop.c (ipa_free_all_edge_args): Remove.
7697         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
7699 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
7701         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
7702         (fnma<mode>4): Likewise.
7703         (fms<mode>4): Likewise.
7704         (fnms<mode>4): Likewise.
7705         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
7706         (aarch64_fnma<mode>4): Likewise.
7707         (aarch64_fms<mode>4): Likewise.
7708         (aarch64_fnms<mode>4): Likewise.
7709         (aarch64_fnmadd<mode>4): Likewise.
7711 2018-05-16  Jason Merrill  <jason@redhat.com>
7713         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
7715 2018-05-16  Richard Biener  <rguenther@suse.de>
7717         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
7718         (dump_stmt_cost): Declare.
7719         (add_stmt_cost): Dump cost we add.
7720         (add_stmt_costs): New function.
7721         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
7722         No longer exported.
7723         (vect_analyze_stmt): Adjust prototype.
7724         (vectorizable_condition): Likewise.
7725         (vectorizable_live_operation): Likewise.
7726         (vectorizable_reduction): Likewise.
7727         (vectorizable_induction): Likewise.
7728         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
7729         cost vector to pass to vectorizable_ and record afterwards.
7730         (vect_model_reduction_cost): Take cost vector argument and adjust.
7731         (vect_model_induction_cost): Likewise.
7732         (vectorizable_reduction): Likewise.
7733         (vectorizable_induction): Likewise.
7734         (vectorizable_live_operation): Likewise.
7735         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
7736         SLP_TREE_NUMBER_OF_VEC_STMTS.
7737         (vect_analyze_slp_cost_1): Remove.
7738         (vect_analyze_slp_cost): Likewise.
7739         (vect_slp_analyze_node_operations): Take visited args and
7740         a target cost vector.  Avoid processing already visited stmt sets.
7741         (vect_slp_analyze_operations): Use a local cost vector to gather
7742         costs and register those of non-discarded instances.
7743         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
7744         (vect_schedule_slp_instance): Remove copying of
7745         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
7746         zero.
7747         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
7748         adding cost.  Record cost entry location.
7749         (vect_prologue_cost_for_slp_op): Function to compute cost of
7750         a constant or invariant generated for SLP vect in the prologue,
7751         split out from vect_analyze_slp_cost_1.
7752         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
7753         (vect_model_promotion_demotion_cost): Likewise.
7754         (vect_model_store_cost): Likewise, make static.
7755         (vect_model_load_cost): Likewise.
7756         (vectorizable_bswap): Add cost vector arg and adjust.
7757         (vectorizable_call): Likewise.
7758         (vectorizable_simd_clone_call): Likewise.
7759         (vectorizable_conversion): Likewise.
7760         (vectorizable_assignment): Likewise.
7761         (vectorizable_shift): Likewise.
7762         (vectorizable_operation): Likewise.
7763         (vectorizable_store): Likewise.
7764         (vectorizable_load): Likewise.
7765         (vectorizable_condition): Likewise.
7766         (vectorizable_comparison): Likewise.
7767         (can_vectorize_live_stmts): Likewise.
7768         (vect_analyze_stmt): Likewise.
7769         (vect_transform_stmt): Adjust calls to vectorizable_*.
7770         * tree-vectorizer.c: Include gimple-pretty-print.h.
7771         (dump_stmt_cost): New function.
7773 2018-05-16  Richard Biener  <rguenther@suse.de>
7775         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
7776         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
7777         * tree-ssa-dse.c: Include tree-ssa-loop.h.
7778         (check_name): New callback.
7779         (dse_classify_store): Track cycles via a visited bitmap of PHI
7780         defs and simplify handling of in-loop and across loop dead stores
7781         and properly fail for loop-variant refs.  Handle byte-tracking with
7782         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
7783         limiting the walk.
7785 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
7787         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
7788         (vect_get_mask_type_for_stmt): Likewise.
7789         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
7790         split out from...
7791         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
7792         to determine the statement's vector type and the vector type that
7793         should be used for calculating nunits.  Deal with cases in which
7794         the type has to be deferred.
7795         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
7796         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
7797         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
7798         (vect_determine_vf_for_stmt): New functions, split out from...
7799         (vect_determine_vectorization_factor): ...here.
7800         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
7801         (vect_get_mask_type_for_stmt): New functions, split out from
7802         vect_determine_vectorization_factor.
7804 2018-05-16  Richard Biener  <rguenther@suse.de>
7806         * tree-cfg.c (verify_gimple_assign_ternary): Properly
7807         verify the [VEC_]COND_EXPR embedded comparison.
7809 2018-05-15  Martin Sebor  <msebor@redhat.com>
7811         PR tree-optimization/85753
7812         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
7813         RECORD_TYPE in addition to ARRAY_TYPE.
7815 2018-05-15  Martin Sebor  <msebor@redhat.com>
7817         PR middle-end/85643
7818         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
7820 2018-05-15  Richard Biener  <rguenther@suse.de>
7822         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
7823         add by_clobber_p one.  Change algorithm to collect all defs
7824         representing uses we need to walk and try reducing them to
7825         a single one before failing.
7826         (dse_dom_walker::dse_optimize_stmt): Adjust.
7828 2018-05-13  Mark Wielaard  <mark@klomp.org>
7830         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
7831         (size_of_loc_descr): Likewise.
7832         (output_loc_operands): Likewise.
7833         (output_loc_operands_raw): Likewise.
7834         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
7835         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
7836         (hash_loc_operands): Likewise.
7837         (compare_loc_operands): Likewise.
7839 2018-05-14  Mark Wielaard  <mark@klomp.org>
7841         * dwarf2out.c (count_index_addrs): New function.
7842         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
7844 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7846         PR tree-optimization/83648
7847         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
7848         return value as malloc candidate.
7850 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7852         PR ipa/85734
7853         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
7854         param as true in call to suggest_attribute.
7856 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
7858         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
7859         -mreadonly-in-sdata.
7861 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7863         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
7864         New pattern.
7865         (aarch64_crypto_aesd_fused): Likewise.
7867 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
7869         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
7870         (movsi_aarch64): Likewise.
7871         (load_pairsi): Likewise.
7872         (load_pairdi): Likewise.
7873         (store_pairsi): Likewise.
7874         (store_pairdi): Likewise.
7875         (load_pairsf): Likewise.
7876         (load_pairdf): Likewise.
7877         (store_pairsf): Likewise.
7878         (store_pairdf): Likewise.
7879         (zero_extend): Likewise.
7880         (trunc): Swap alternatives.
7881         (fcvt_target): Add '?' to prefer w over r.
7883 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
7885         PR target/85756
7886         * config/i386/i386.md: Disallow non-commutative arithmetics in
7887         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
7888         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
7889         in the peephole2 before it.
7891 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
7893         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
7894         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
7895         (ix86_handle_option): Handle -mcldemote.
7896         * config.gcc: New header.
7897         * config/i386/cldemoteintrin.h: New file.
7898         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
7899         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7900         -mcldemote.
7901         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7902         OPTION_MASK_ISA_CLDEMOTE.
7903         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
7904         (ix86_valid_target_attribute_inner_p): Ditto.
7905         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
7906         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
7907         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
7908         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
7909         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
7910         (cldemote): New.
7911         * config/i386/i386.opt: Add -mcldemote.
7912         * config/i386/x86intrin.h: New header.
7913         * doc/invoke.texi: Add -mcldemote.
7915 2018-05-14  Richard Biener  <rguenther@suse.de>
7917         * doc/match-and-simplify.texi: Adjust :s documentation.
7919 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
7921         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
7922         intended memcpy size.
7923         (REORDER_45): Likewise.
7925 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
7927         * sort.cc: New file.
7928         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
7929         * vec.c (qsort_chk): Use gcc_qsort.
7930         * Makefile.in (OBJS-libcommon): Add sort.o.
7931         (build/sort.o): New target.  Use it...
7932         (BUILD_RTL): ... here, and...
7933         (build/gencfn-macros): ... here, and...
7934         (build/genmatch): ... here.
7936 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
7937             Chung-Ju Wu  <jasonwucj@gmail.com>
7939         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
7940         * config/nds32/nds32-graywolf.md: New file.
7941         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
7942         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
7943         pipeline.
7944         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
7945         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
7946         * config/nds32/nds32.md (pipeline_model): Add graywolf.
7947         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
7948         * config/nds32/pipelines.md: Include n15 settings.
7950 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
7951             Chung-Ju Wu  <jasonwucj@gmail.com>
7953         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
7954         * config/nds32/nds32-n13.md: New file.
7955         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
7956         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
7957         pipeline.
7958         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
7959         * config/nds32/nds32.md (pipeline_model): Add n13.
7960         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
7961         * config/nds32/pipelines.md: Include n13 settings.
7963 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
7964             Chung-Ju Wu  <jasonwucj@gmail.com>
7966         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
7967         * config/nds32/nds32-n10.md: New file.
7968         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
7969         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
7970         pipeline.
7971         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
7972         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
7973         * config/nds32/nds32.md (pipeline_model): Add n10.
7974         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
7975         * config/nds32/pipelines.md: Include n10 settings.
7977 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
7978             Kito Cheng  <kito.cheng@gmail.com>
7979             Chung-Ju Wu  <jasonwucj@gmail.com>
7981         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
7982         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7983         Add enum values for DSP extension instructions.
7984         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
7985         New constraints.
7986         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
7987         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
7988         New code iterators.
7989         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
7990         * config/nds32/nds32-dspext.md: New file for DSP implementation.
7991         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
7992         * config/nds32/nds32-intrinsic.md: Likewise.
7993         * config/nds32/nds32_intrinsic.h: Likewise.
7994         * config/nds32/nds32-md-auxiliary.c: Likewise.
7995         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
7996         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
7997         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
7998         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
7999         * config/nds32/nds32-protos.h: New declarations for DSP extension.
8000         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
8001         TYPE_DMAC in switch statement.
8002         * config/nds32/nds32.c: New checking and implementation for DSP
8003         extension instructions.
8004         * config/nds32/nds32.h: Likewise.
8005         * config/nds32/nds32.md: Likewise.
8006         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
8007         * config/nds32/predicates.md: Implement new predicates for DSP
8008         extension.
8010 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
8012         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
8013         Reformat alternatives and attributes so it is easier to identify
8014         which constraints/attributes go with which instruction.
8015         (mov<mode>_hardfloat32, FMOVE64): Likewise.
8016         (mov<mode>_softfloat32, FMOVE64): Likewise.
8017         (mov<mode>_hardfloat64, FMOVE64): Likewise.
8018         (mov<mode>_softfloat64, FMOVE64): Likewise.
8020 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8022         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8023         subsection.
8024         (Basic PowerPC Built-in Functions): The new name of the
8025         subsection previously known as "PowerPC Built-in Functions".
8026         (Basic PowerPC Built-in Functions Available on all Configurations):
8027         New subsubsection.
8028         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
8029         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
8030         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
8031         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
8033 2018-05-11  Martin Jambor  <mjambor@suse.cz>
8035         PR ipa/85655
8036         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
8037         single const.
8039 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
8041         PR target/85733
8042         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
8044 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
8046         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
8047         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
8048         (ix86_handle_option): Handle -mwaitpkg.
8049         * config.gcc: New header.
8050         * config/i386/cpuid.h (bit_WAITPKG): New bit.
8051         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
8052         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
8053         function type.
8054         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8055         OPTION_MASK_ISA_WAITPKG.
8056         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
8057         (ix86_option_override_internal): Add PTA_WAITPKG.
8058         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
8059         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
8060         IX86_BUILTIN_TPAUSE.
8061         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
8062         __builtin_ia32_umwait and __builtin_ia32_tpause.
8063         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
8064         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
8065         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
8066         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
8067         UNSPECV_TPAUSE): New.
8068         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
8069         * config/i386/i386.opt: Add -mwaitpkg.
8070         * config/i386/waitpkgintrin.h: New file.
8071         * config/i386/x86intrin.h: New header.
8072         * doc/invoke.texi: Add -mwaitpkg.
8074 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
8076         PR target/85606
8077         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
8078         equivalent.
8079         (cortex-m0): Use armv6s-m isa.
8080         (cortex-m0plus): Likewise.
8081         (cortex-m1): Likewise.
8082         (cortex-m0.small-multiply): Likewise.
8083         (cortex-m0plus.small-multiply): Likewise.
8084         (cortex-m1.small-multiply): Likewise.
8086 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
8087             Jakub Jelinek  <jakub@redhat.com>
8089         PR tree-optimization/85692
8090         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
8091         source permute as well.
8093 2018-05-11  Martin Liska  <mliska@suse.cz>
8095         PR sanitizer/85556
8096         * doc/extend.texi: Document LLVM style format for no_sanitize
8097         attribute.
8099 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
8101         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
8102         mode_supports_vsx_dform_quad to mode_supports_dq_form.
8103         (mode_supports_vsx_dform_quad): Likewise.
8104         (mode_supports_vmx_dform): Move these functions to be next to the
8105         other mode_supports functions.
8106         (mode_supports_dq_form): Likewise.
8107         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
8108         mode_supports_dq_form.
8109         (reg_offset_addressing_ok_p): Likewise.
8110         (offsettable_ok_by_alignment): Likewise.
8111         (rs6000_legitimate_offset_address_p): Likewise.
8112         (legitimate_lo_sum_address_p): Likewise.
8113         (rs6000_legitimize_address): Likewise.
8114         (rs6000_legitimize_reload_address): Likewise.
8115         (rs6000_secondary_reload_inner): Likewise.
8116         (rs6000_preferred_reload_class): Likewise.
8117         (rs6000_output_move_128bit): Likewise.
8119 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
8121         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
8122         Generate SImode target register for null target.
8123         <case IX86_BUILTIN_XGETBV>: Ditto.
8124         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
8125         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
8127 2018-05-10  Carl Love  <cel@us.ibm.com>
8129         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8130         dcbtt and dcbtstt if operands[2] is 0.
8132 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
8134         PR target/85693
8135         * config/i386/sse.md (usadv64qi): New expander.
8137 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
8139         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8140         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8141         -maltivec=be support.
8142         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8143         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
8144         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
8145         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
8146         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
8147         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
8148         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
8149         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
8150         altivec_vsumsws): Adjust.
8151         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
8152         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
8153         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
8154         support.
8155         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
8156         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
8157         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
8158         (altivec_lve<VI_char>x): Delete expand.
8159         (*altivec_lve<VI_char>x_internal): Rename to...
8160         (altivec_lve<VI_char>x): ... this.
8161         (altivec_lvxl_<mode>): Delete expand.
8162         (*altivec_lvxl_<mode>_internal): Rename to ...
8163         (altivec_lvxl_<mode>): ... this.
8164         (altivec_stvxl_<mode>): Delete expand.
8165         (*altivec_stvxl_<mode>_internal): Rename to ...
8166         (altivec_stvxl_<mode>): ... this.
8167         (altivec_stve<VI_char>x): Delete expand.
8168         (*altivec_stve<VI_char>x_internal): Rename to ...
8169         (altivec_stve<VI_char>x): ... this.
8170         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
8171         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
8172         reduc_plus_scal_<mode>): Adjust.
8173         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
8174         comment.
8175         (rs6000_cpu_cpp_builtins): Adjust.
8176         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
8177         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
8178         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
8179         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
8180         -maltivec=be support.
8181         (rs6000_split_vec_extract_var): Adjust.
8182         (rs6000_split_v4si_init): Adjust.
8183         (swap_selector_for_mode): Delete.
8184         (altivec_expand_lvx_be, altivec_expand_stvx_be,
8185         altivec_expand_stvex_be): Delete.
8186         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
8187         -maltivec=be support.
8188         (rs6000_gimple_fold_builtin): Ditto.
8189         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
8190         Adjust.
8191         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
8192         (TARGET_DIRECT_MOVE_64BIT): Adjust.
8193         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
8194         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
8195         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
8196         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
8197         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
8198         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
8199         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
8200         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
8201         anonymous split): Adjust.
8202         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
8203         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
8205 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
8207         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
8208         when --with-gxx-include-dir is also specified.
8209         * configure: Regenerate.
8211 2018-05-09  Jim Wilson  <jimw@sifive.com>
8213         PR target/84797
8214         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
8215         * config/riscv/t-withmultilib: New.
8216         * config/riscv/withmultilib.h: New.
8217         * doc/install.texi: Document RISC-V --with-multilib-list support.
8219 2018-05-09  Richard Biener  <rguenther@suse.de>
8221         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
8222         vector.
8223         (vect_bb_vectorization_profitable_p): Adjust.  Compute
8224         actual scalar cost using the cost vector and the add_stmt_cost
8225         machinery.
8227 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8229         PR rtl-optimization/85645
8230         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
8231         in the REG_CFA_REGISTER note for LR, don't leave it empty.
8233 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8235         PR rtl-optimization/85645
8236         * shrink-wrap.c (spread_components): Return a boolean saying if
8237         anything was changed.
8238         (try_shrink_wrapping_separate): Iterate spread_components until
8239         nothing changes anymore.
8241 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8243         PR rtl-optimization/85645
8244         * regrename.c (build_def_use): Also kill the chains that include the
8245         destination of a REG_CFA_REGISTER note.
8247 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8249         PR rtl-optimization/85645
8250         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
8251         insn that has a REG_CFA_REGISTER note.
8253 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
8255         * cfgexpand.c (expand_clobber): New function.
8256         (expand_gimple_stmt_1): Use it.
8257         * tree-vect-stmts.c (vect_clobber_variable): New function,
8258         split out from...
8259         (vectorizable_simd_clone_call): ...here.
8260         (vectorizable_store): Emit a clobber either side of an
8261         IFN_STORE_LANES sequence.
8262         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
8264 2018-05-09  Tom de Vries  <tom@codesourcery.com>
8266         PR target/85626
8267         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
8268         (define_insn "trap_if_false"): Add exit after trap.
8270 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
8272         PR rtl-optimization/85638
8273         * bb-reorder.c: Include common/common-target.h.
8274         (create_forwarder_block): New function extracted from...
8275         (fix_up_crossing_landing_pad): ...here.  Rename into...
8276         (dw2_fix_up_crossing_landing_pad): ...this.
8277         (sjlj_fix_up_crossing_landing_pad): New function.
8278         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
8279         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
8280         from both partitions and exit the loop after one iteration.
8282 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8284         Revert:
8285         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8286         subsection.
8287         (Basic PowerPC Built-in Functions): The new name of the
8288         subsection previously known as "PowerPC Built-in Functions".
8289         (Basic PowerPC Built-in Functions Available on all Configurations):
8290         New subsubsection.
8291         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8292         subsubsection.
8293         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8294         subsubsection.
8295         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8296         subsubsection.
8297         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8298         subsubsection.
8300 2018-05-08  Jim Wilson  <jimw@sifive.com>
8302         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
8303         (LD_EMUL_SUFFIX): New.
8304         (LINK_SPEC): Use it.
8306 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8308         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8309         subsection.
8310         (Basic PowerPC Built-in Functions): The new name of the
8311         subsection previously known as "PowerPC Built-in Functions".
8312         (Basic PowerPC Built-in Functions Available on all Configurations):
8313         New subsubsection.
8314         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8315         subsubsection.
8316         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8317         subsubsection.
8318         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8319         subsubsection.
8320         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8321         subsubsection.
8323 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
8325         PR target/85683
8326         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
8327         after cmpelim optimization.
8329 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
8331         * config.gcc: Support "goldmont".
8332         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
8333         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8334         PROCESSOR_GOLDMONT.
8335         * config/i386/i386.c (m_GOLDMONT): Define.
8336         (processor_target_table): Add "goldmont".
8337         (PTA_GOLDMONT): Define.
8338         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
8339         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
8340         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
8341         (fold_builtin_cpu): Add "goldmont".
8342         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
8343         (ix86_option_override_internal): Add "goldmont".
8344         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
8345         (processor_type): Add PROCESSOR_GOLDMONT.
8346         * config/i386/i386.md: Add CPU "glm".
8347         * config/i386/glm.md: New file.
8348         * config/i386/x86-tune.def: Add m_GOLDMONT.
8349         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
8351 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
8353         PR target/85572
8354         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
8355         E_V4DImode.
8356         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
8357         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
8358         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
8360         PR target/85317
8361         * config/i386/i386.c (ix86_fold_builtin): Handle
8362         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
8364         PR target/85480
8365         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
8366         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
8368 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
8370         PR target/85658
8371         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
8372         (check_arch): Likewise.
8373         (check_fpu): Return the result rather than printing it.
8374         (end arch): Fix operator precedence.
8375         (end cpu): Likewise.
8376         (END): Print the result from check_fpu.
8378 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
8379             Alan Hayward  <alan.hayward@arm.com>
8380             David Sherwood  <david.sherwood@arm.com>
8382         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
8383         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
8384         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
8385         (*fcmuo<mode>_and): New patterns.
8387 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
8389         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
8390         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
8391         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
8392         (cmp_op, sve_imm_con): New code attributes.
8393         (SVE_COND_INT_CMP, imm_con): Delete.
8394         (cmp_op): Remove above unspecs from int attribute.
8395         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
8396         to...
8397         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
8398         comparison-specific unspecs.
8399         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
8400         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
8401         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
8402         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
8403         (*vec_fcm<cmp_op><mode>): Rename to...
8404         (*fcm<cmp_op><mode>): ...this and adjust likewise.
8405         (*vec_fcmuo<mode>): Rename to...
8406         (*fcmuo<mode>): ...this and adjust likewise.
8407         (*pred_fcm<cmp_op><mode>): New pattern.
8408         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
8409         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
8410         functions.
8411         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
8412         and UNORDERED.
8413         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
8414         (aarch64_emit_sve_predicated_cond): New function.
8415         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
8416         (aarch64_emit_unspec_cond_or): Replace with...
8417         (aarch64_emit_sve_or_conds): ...this new function.  Use
8418         aarch64_emit_sve_ptrue_op for the individual comparisons and
8419         aarch64_emit_binop to OR them together.
8420         (aarch64_emit_inverted_unspec_cond): Replace with...
8421         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
8422         aarch64_emit_sve_ptrue_op for the comparison and
8423         aarch64_emit_unop to invert the result.
8424         (aarch64_expand_sve_vec_cmp_float): Update after the above
8425         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
8427 2018-05-07  Nathan Sidwell  <nathan@acm.org>
8429         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
8430         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
8431         (Backwards Compatibility): Likewise.
8433 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8435         PR bootstrap/85681
8436         Revert:
8437         2018-05-07  Luis Machado  <luis.machado@linaro.org>
8439         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8440         <prefetch_dynamic_strides>: New const bool field.
8441         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8442         prefetch_dynamic_strides.
8443         (exynosm1_prefetch_tune): Likewise.
8444         (thunderxt88_prefetch_tune): Likewise.
8445         (thunderx_prefetch_tune): Likewise.
8446         (thunderx2t99_prefetch_tune): Likewise.
8447         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8448         to false.
8449         (aarch64_override_options_internal): Update to set
8450         PARAM_PREFETCH_DYNAMIC_STRIDES.
8451         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8452         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8453         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8454         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8455         prefetch-dynamic-strides setting.
8457         2018-05-07  Luis Machado  <luis.machado@linaro.org>
8459         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8460         <minimum_stride>: New const int field.
8461         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8462         minimum_stride field.
8463         (exynosm1_prefetch_tune): Likewise.
8464         (thunderxt88_prefetch_tune): Likewise.
8465         (thunderx_prefetch_tune): Likewise.
8466         (thunderx2t99_prefetch_tune): Likewise.
8467         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8468         (aarch64_override_options_internal): Update to set
8469         PARAM_PREFETCH_MINIMUM_STRIDE.
8470         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8471         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8472         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8473         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8474         stride is constant and is below the minimum stride threshold.
8476 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8478         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
8479         to 512.
8481 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8483         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8484         <prefetch_dynamic_strides>: New const bool field.
8485         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8486         prefetch_dynamic_strides.
8487         (exynosm1_prefetch_tune): Likewise.
8488         (thunderxt88_prefetch_tune): Likewise.
8489         (thunderx_prefetch_tune): Likewise.
8490         (thunderx2t99_prefetch_tune): Likewise.
8491         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8492         to false.
8493         (aarch64_override_options_internal): Update to set
8494         PARAM_PREFETCH_DYNAMIC_STRIDES.
8495         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8496         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8497         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8498         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8499         prefetch-dynamic-strides setting.
8501 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8503         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8504         <minimum_stride>: New const int field.
8505         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8506         minimum_stride field.
8507         (exynosm1_prefetch_tune): Likewise.
8508         (thunderxt88_prefetch_tune): Likewise.
8509         (thunderx_prefetch_tune): Likewise.
8510         (thunderx2t99_prefetch_tune): Likewise.
8511         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8512         (aarch64_override_options_internal): Update to set
8513         PARAM_PREFETCH_MINIMUM_STRIDE.
8514         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8515         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8516         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8517         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8518         stride is constant and is below the minimum stride threshold.
8520 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
8522         PR c++/85659
8523         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
8524         the type is addressable.  Don't force op into register if it has
8525         BLKmode.
8527 2018-05-05  Roland McGrath  <mcgrathr@google.com>
8529         PR other/77609
8530         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
8531         any section for which we don't know a specific type it should have,
8532         regardless of name.  Previously this was done only for the exact
8533         names ".init_array", ".fini_array", and ".preinit_array".
8534         (default_elf_asm_named_section): Add comment about
8535         relationship with default_section_type_flags and SECTION_NOTYPE.
8536         (get_section): Don't consider it a type conflict if one side has
8537         SECTION_NOTYPE and the other doesn't, as long as neither has the
8538         SECTION_BSS et al used in the default_section_type_flags logic.
8540 2018-05-05  Tom de Vries  <tom@codesourcery.com>
8542         PR target/85653
8543         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
8544         (workaround_barsyncs): New function.
8545         (nvptx_reorg): Use workaround_barsyncs.
8546         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8547         (define_expand "nvptx_membar_cta"): New define_expand.
8548         (define_insn "*nvptx_membar_cta"): New insn.
8550 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
8552         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
8553         To improve optimization opportunities.
8554         * builtin-types.def: The new needed builtin types for the above.
8556 2018-05-04  Richard Biener  <rguenther@suse.de>
8558         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
8559         * gimple-ssa-store-merging.c
8560         (imm_store_chain_info::output_merged_store): Remove redundant create,
8561         release split_store vector contents on failure.
8562         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
8563         scalar stmt vector on cache hit.
8565 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
8567         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
8568         Xilinx FP support.
8569         * config.gcc (powerpc-xilinx-eabi*): Remove.
8570         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
8571         support.
8572         (fusion_addis_mem_combo_load): Ditto.
8573         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
8574         FP support.
8575         (rs6000_cpu_cpp_builtins): Ditto.
8576         * config/rs6000/rs6000-linux.c
8577         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
8578         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
8579         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
8580         support.
8581         (rs6000_setup_reg_addr_masks): Ditto.
8582         (rs6000_init_hard_regno_mode_ok): Ditto.
8583         (rs6000_option_override_internal): Ditto.
8584         (legitimate_lo_sum_address_p): Ditto.
8585         (rs6000_legitimize_address): Ditto.
8586         (rs6000_legitimize_reload_address): Ditto.
8587         (rs6000_legitimate_address_p): Ditto.
8588         (abi_v4_pass_in_fpr): Ditto.
8589         (setup_incoming_varargs): Ditto.
8590         (rs6000_gimplify_va_arg): Ditto.
8591         (rs6000_split_multireg_move): Ditto.
8592         (rs6000_savres_strategy): Ditto.
8593         (rs6000_emit_prologue_components): Ditto.
8594         (rs6000_emit_epilogue_components): Ditto.
8595         (rs6000_emit_prologue): Ditto.
8596         (rs6000_emit_epilogue): Ditto.
8597         (rs6000_elf_file_end): Ditto.
8598         (rs6000_function_value): Ditto.
8599         (rs6000_libcall_value): Ditto.
8600         * config/rs6000/rs6000.h: Ditto.
8601         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
8602         (TARGET_MINMAX): ... this.  New.
8603         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
8604         * config/rs6000/rs6000.md: Remove Xilinx FP support.
8605         (*movsi_internal1_single): Delete.
8606         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
8607         mfpu=, mxilinx-fpu): Delete.
8608         * config/rs6000/singlefp.h: Delete.
8609         * config/rs6000/sysv4.h: Remove Xilinx FP support.
8610         * config/rs6000/t-rs6000: Ditto.
8611         * config/rs6000/t-xilinx: Delete.
8612         * config/rs6000/titan.md: Adjust for fp_type removal.
8613         * config/rs6000/vsx.md: Remove Xilinx FP support.
8614         (VStype_simple): Delete.
8615         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
8616         * config/rs6000/xfpu.h: Delete.
8617         * config/rs6000/xfpu.md: Delete.
8618         * config/rs6000/xilinx.h: Delete.
8619         * config/rs6000/xilinx.opt: Delete.
8620         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
8621         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
8623 2018-05-04  Tom de Vries  <tom@codesourcery.com>
8625         PR libgomp/85639
8626         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
8627         if ignore == 0.
8629 2018-05-04  Richard Biener  <rguenther@suse.de>
8631         PR middle-end/85627
8632         * tree-complex.c (update_complex_assignment): We are always in SSA form.
8633         (expand_complex_div_wide): Likewise.
8634         (expand_complex_operations_1): Likewise.
8635         (expand_complex_libcall): Preserve EH info of the original stmt.
8636         (tree_lower_complex): Handle removed blocks.
8637         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
8638         on complex multiplication and division libcall builtins.
8640 2018-05-04  Richard Biener  <rguenther@suse.de>
8642         PR middle-end/85574
8643         * fold-const.c (negate_expr_p): Restrict negation of operand
8644         zero of a division to when we know that can happen without
8645         overflow.
8646         (fold_negate_expr_1): Likewise.
8648 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
8650         PR libstdc++/85466
8651         * real.h (real_nextafter): Declare.
8652         * real.c (real_nextafter): New function.
8653         * fold-const-call.c (fold_const_nextafter): New function.
8654         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
8655         CASE_CFN_NEXTTOWARD.
8656         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
8657         even when arg1_mode is different from arg0_mode.
8659 2018-05-03  Nathan Sidwell  <nathan@acm.org>
8661         * doc/extend.texi (Deprecated Features): Remove
8662         -ffriend-injection.
8663         (Backwards Compatibility): Likewise.
8664         * doc/invoke.texi (C++ Language Options): Likewise.
8665         (C++ Dialect Options): Likewise.
8667 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
8669         PR target/85530
8670         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
8671         _mm512_mask_mullox_epi64): New intrinsics.
8673 2018-05-03  Tom de Vries  <tom@codesourcery.com>
8675         PR testsuite/85106
8676         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8677         dump files): Add offload-tree.
8679 2018-05-03  Richard Biener  <rguenther@suse.de>
8681         PR tree-optimization/85615
8682         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
8683         to loops not nested in BBs loop father to avoid creating multi-entry
8684         loops.
8686 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8688         PR tree-optimization/70291
8689         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
8690         arguments.  Change return type to tree.  Emit libcall as a new
8691         statement rather than replacing existing one when inplace_p is true.
8692         (expand_complex_multiplication_components): New function.
8693         (expand_complex_multiplication): Expand floating-point complex
8694         multiplication using the above.
8695         (expand_complex_division): Rename inner_type parameter to type.
8696         Update expand_complex_libcall call-site.
8697         (expand_complex_operations_1): Update expand_complex_multiplication
8698         and expand_complex_division call-sites.
8700 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
8702         PR target/85582
8703         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8704         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8705         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
8706         the highest significant bit of the shift count mask is clear.  In
8707         check whether and[sq]i3 is needed verify that all significant bits
8708         of the shift count other than the highest are set.
8710 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8712         PR libgomp/82428
8713         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
8714         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
8715         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
8716         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
8717         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
8718         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
8719         __builtin_goacc_parlevel_size.
8721 2018-05-02  Richard Biener  <rguenther@suse.de>
8723         PR tree-optimization/85597
8724         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
8725         do not use split vect_get_vec_defs call but call vect_get_slp_defs
8726         directly.
8728 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8730         PR testsuite/85106
8731         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8732         dump files): Add ltrans-tree.
8734 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8736         PR testsuite/85106
8737         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8738         dump files): Add wpa-ipa.
8740 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
8742         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
8743         powerpc*-*-linux*paired* target.
8744         * config/rs6000/750cl.h: Delete.
8745         * config/rs6000/paired.h: Delete.
8746         * config/rs6000/paired.md: Delete.
8747         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
8748         float support.
8749         * config/rs6000/rs6000-builtin.def: Remove paired float support.
8750         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8751         comment.  Remove paired float support.
8752         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
8753         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8754         VECTOR_PAIRED.
8755         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
8756         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
8757         declarations.
8758         * config/rs6000/rs6000.c: Remove paired float support.
8759         (paired_expand_vector_init, paired_expand_vector_move,
8760         paired_emit_vector_compare, paired_emit_vector_cond_expr,
8761         (paired_expand_lv_builtin, paired_expand_stv_builtin,
8762         paired_expand_builtin, paired_expand_predicate_builtin,
8763         paired_init_builtins): Delete.
8764         * config/rs6000/rs6000.h: Remove paired float support.
8765         * config/rs6000/rs6000.md: Remove paired float support.
8766         (move_from_CR_ov_bit): Delete.
8767         * config/rs6000/rs6000.opt (mpaired): Delete.
8768         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
8769         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
8771 2018-05-02  Richard Biener  <rguenther@suse.de>
8773         PR middle-end/85567
8774         * gimplify.c (gimplify_save_expr): When in SSA form allow
8775         SAVE_EXPRs to compute to SSA vars.
8777 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
8779         PR target/85582
8780         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8781         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8782         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
8783         clobber operands[2], instead use a new pseudo.  Formatting fixes.
8785 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
8787         PR tree-optimization/85586
8788         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
8789         exit early for statements in the same group if the accesses are
8790         not strided.
8792 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8794         PR lto/85451
8795         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
8796         error message.
8798 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
8800         PR tree-optimization/85143
8801         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
8803 2018-05-01  Tom de Vries  <tom@codesourcery.com>
8805         PR lto/85451
8806         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
8807         not found" error message.
8809 2018-05-01  Tom de Vries  <tom@codesourcery.com>
8811         PR other/83786
8812         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
8813         * vec.c (test_ordered_remove_if): New function.
8814         (vec_c_tests): Call test_ordered_remove_if.
8815         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
8816         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
8817         * tree-vect-patterns.c (vect_pattern_recog_1): Use
8818         VEC_ORDERED_REMOVE_IF.
8820 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8822         PR tree-optimization/82665
8823         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
8824         pointer subtraction where arguments come from a memchr call.
8826 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
8828         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
8829         --push-state --as-needed and --pop-state instead of --as-needed and
8830         --no-as-needed if ld supports it.
8831         * configure: Regenerated.
8833         PR web/85578
8834         * doc/install.texi2html: Replace _002d with - and _002a with * in
8835         generated html files using sed.
8837 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8839         PR c++/85523
8840         * gcc-rich-location.c (blank_line_before_p): New function.
8841         (use_new_line): New function.
8842         (gcc_rich_location::add_fixit_insert_formatted): New function.
8843         * gcc-rich-location.h
8844         (gcc_rich_location::add_fixit_insert_formatted): New function.
8846 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8848         * selftest.c (assert_streq): Rename "expected" and "actual" to
8849         "val1" and "val2".  Extend NULL-handling to cover both inputs
8850         symmetrically, while still requiring both to be non-NULL for a pass.
8851         * selftest.h (assert_streq): Rename "expected" and "actual" to
8852         "val1" and "val2".
8853         (ASSERT_EQ): Likewise.
8854         (ASSERT_EQ_AT): Likewise.
8855         (ASSERT_KNOWN_EQ): Likewise.
8856         (ASSERT_KNOWN_EQ_AT): Likewise.
8857         (ASSERT_NE): Likewise.
8858         (ASSERT_MAYBE_NE): Likewise.
8859         (ASSERT_MAYBE_NE_AT): Likewise.
8860         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
8861         the assertion to pass.
8862         (ASSERT_STREQ_AT): Likewise.
8864 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
8866         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
8867         interaction with -pie.
8869 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8871         * selftest.h: Fix alphabetization of per-source-file selftest
8872         declarations.
8874 2018-04-30  Jason Merrill  <jason@redhat.com>
8876         PR c++/61982 - dead stores to destroyed objects.
8877         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
8878         of clobber.
8880 2018-04-30  Jason Merrill  <jason@redhat.com>
8882         * tree.c (build_clobber): New.
8883         * tree.h: Declare it.
8884         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
8886 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8888         * diagnostic-show-locus.c (layout::layout): Update for
8889         location_get_source_line returning a char_span.
8890         (struct char_span): Move to input.h.
8891         (struct correction): Update for fields in char_span becoming
8892         private.
8893         (struct source_line): Update for location_get_source_line
8894         returning a char_span.
8895         (layout::print_line): Likewise.
8896         * edit-context.c (edited_file::print_content): Likewise.
8897         (edited_file::print_diff_hunk): Likewise.
8898         (edited_file::print_run_of_changed_lines): Likewise.
8899         (edited_file::get_num_lines): Likewise.
8900         (edited_line::edited_line): Likewise.
8901         * final.c (asm_show_source): Likewise.
8902         * input.c (location_get_source_line): Convert return type
8903         from const char * to char_span, losing the final "line_len"
8904         param.
8905         (dump_location_info): Update for the above.
8906         (get_substring_ranges_for_loc): Likewise.  Use a char_span
8907         when handling the literal within the line.
8908         (test_reading_source_line): Update for location_get_source_line
8909         returning a char_span.
8910         * input.h (class char_span): Move here from
8911         diagnostic-show-locus.c, converting from a struct to a class.
8912         Make data members private.
8913         (char_span::operator bool): New.
8914         (char_span::length): New.
8915         (char_span::get_buffer): New.
8916         (char_span::operator[]): New.
8917         (char_span::subspan): Make const.
8918         (char_span::xstrdup): New.
8919         (location_get_source_line): Convert return type from const char *
8920         to char_span, losing the final "line_size" param.
8922 2018-04-30  Jan Hubicka  <jh@suse.cz>
8924         * lto-wrapper.c (ltrans_priorities): New static var.
8925         (cmp_priority): New.
8926         (run_gcc): Read priorities and if doing parallel build order
8927         the Makefile by them.
8929 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8931         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
8933 2018-04-30  Richard Biener  <rguenther@suse.de>
8935         * tree-cfg.c (verify_address): Remove base argument, add
8936         flag whether to check TREE_ADDRESSABLE and do that.
8937         (verify_expr): Remove.
8938         (verify_types_in_gimple_reference): Add pieces from verify_expr.
8939         (verify_gimple_assign_single): Likewise.
8940         (verify_gimple_switch): Likewise.
8941         (verify_expr_location_1): Dereference tp once.  Add (disabled)
8942         piece from verify_expr.
8943         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
8945 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
8947         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
8949 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
8951         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
8952         (small_data_pattern): Likewise.
8953         (arc_rewrite_small_data): Likewise.
8954         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
8955         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
8956         (get_symbol_alignment): New function.
8957         (legitimate_small_data_address_p): Likewise.
8958         (legitimate_scaled_address): Update, call
8959         legitimate_small_data_address_p.
8960         (output_sdata): New static variable.
8961         (arc_print_operand): Update how we handle small data operands.
8962         (arc_print_operand_address): Likewise.
8963         (arc_legitimate_address_p): Update, use
8964         legitimate_small_data_address_p.
8965         (arc_rewrite_small_data_p): Remove.
8966         (arc_rewrite_small_data_1): Likewise.
8967         (arc_rewrite_small_data): Likewise.
8968         (small_data_pattern): Likewise.
8969         (compact_sda_memory_operand): Update to use
8970         legitimate_small_data_address_p and get_symbol_alignment.
8971         (prepare_move_operands): Don't rewite sdata pattern.
8972         (prepare_extend_operands): Remove.
8973         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
8974         pattern.
8975         (zero_extendqisi2): Likewise.
8976         (zero_extendhisi2): Likewise.
8977         (extendqihi2): Likewise.
8978         (extendqisi2): Likewise.
8979         (extendhisi2): Likewise.
8980         (addsi3): Likewise.
8981         (subsi3): Likewise.
8982         (andsi3): Likewise.
8983         * config/arc/constraints.md (Usd): Change it to memory constraint.
8985 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
8987         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
8988         as source of std instructions.
8989         * config/arc/arc.md (movsi_insn): Update pattern predicate to
8990         allow 6-bit constants as source for store instructions.
8991         (movdi_insn): Update instruction pattern to allow 6-bit constants
8992         as source for store instructions.
8994 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
8996         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
8998 2018-04-30  Nathan Sidwell  <nathan@acm.org>
8999             Sandra Loosemore <sandra@codesourcery.com>
9001         * dumpfile.c (dump_open): Allow '-' for stdout.
9002         * doc/invoke.texi (Developer Options): Document dump filename
9003         determination early.  Document stdin/stdout selection.
9005 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
9007         Microblaze Target: PIC data text relative
9009         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
9010         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
9011         Add declaration.
9012         * config/microblaze/microblaze.h (microblaze_constant_address_p):
9013         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
9014         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
9015         New addressing mode for data-text relative position indepenedent code.
9016         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
9017         'ADDRESS_SYMBOLIC_TXT_REL'.
9018         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
9019         (microblaze_legitimate_pic_operand): Exclude function calls from
9020         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
9021         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
9022         addresses cases.
9023         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9024         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9025         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
9026         for 'address + offset'.
9027         (microblaze_expand_prologue): Add new function prologue call for
9028         'r20' assignation.
9029         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
9030         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
9031         table in case of TARGET_PIC_DATA_TEXT_REL.
9032         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
9033         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
9034         Add new macros 'UNSPEC_TEXT',
9035         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
9036         + exclude function calls from 'UNSPEC_PLT' in case of data text
9037         relative mode.
9038         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9039         new target hook for generating address diff vector tables in case of
9040         flag_pic.
9041         * doc/tm.texi : Regenerate.
9042         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
9043         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
9044         of addr diff vector generation.
9045         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9046         target hook definition.
9047         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
9048         Add default function for generate_pic_addr_diff_vec -> flag_pic.
9049         * doc/invoke.texi (Add new pic option): Add new microblaze pic
9050         option for data text relative.
9052 2018-04-30  Richard Biener  <rguenther@suse.de>
9054         * tree-chrec.h (evolution_function_is_constant_p): Remove
9055         redundant check.
9056         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
9058 2018-04-30  Richard Biener  <rguenther@suse.de>
9060         PR bootstrap/85571
9061         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
9063 2018-04-30  Richard Biener  <rguenther@suse.de>
9065         PR tree-optimization/28364
9066         PR tree-optimization/85275
9067         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
9068         copying first exit test.
9070 2018-04-28  Mark Wielaard  <mark@klomp.org>
9072         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
9073         dwarf_version >= 5.
9074         (dwarf_AT): Handle DW_AT_addr_base.
9075         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
9077 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
9079         PR target/84431
9080         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
9081         (*ashl<dwi>3_doubleword_mask_1): Ditto.
9082         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
9083         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
9085 2018-04-28  Richard Biener  <rguenther@suse.de>
9087         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
9088         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
9089         to reflect use.  Only add interesting stmts.
9091 2018-04-27  Martin Jambor  <mjambor@suse.cz>
9093         PR ipa/85549
9094         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
9095         the jump function allows for passing through aggregate values.
9097 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
9099         * input.h (in_system_header_at): Convert from macro to inline
9100         function.
9101         (from_macro_expansion_at): Likewise.
9102         (from_macro_definition_at): Likewise.
9104 2018-04-27  Jeff Law  <law@redhat.com>
9106         * config.gcc: Mark tile* targets as deprecated/obsolete.
9108 2018-04-27  Richard Biener  <rguenther@suse.de>
9110         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
9111         fix for ILP32.
9113 2018-04-27  Richard Biener  <rguenther@suse.de>
9115         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
9117 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
9119         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
9120         with Yd constraint. Set "preferred_for_speed" attribute from
9121         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
9122         with Yd constraint.
9123         (*movdi_internal): Ditto.
9124         (movti_interunit splitters): Remove
9125         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
9126         (movdi_interunit splitters): Ditto.
9127         * config/i386/constraints.md (Ye): Remove.
9128         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9130 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9132         PR target/85512
9133         * config/aarch64/constraints.md (Usg): Limit to 31.
9134         (Usj): Limit to 63.
9136 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
9138         PR tree-optimization/85529
9139         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9140         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9141         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9142         zero extension or masking of the MSB bit.
9143         (optimize_range_tests): Add FIRST_BB argument, pass it through
9144         to optimize_range_tests_var_bound.
9145         (maybe_optimize_range_tests, reassociate_bb): Adjust
9146         optimize_range_tests callers.
9148 2018-04-26  Richard Biener  <rguenther@suse.de>
9149             Jakub Jelinek  <jakub@redhat.com>
9151         * cgraph.h (symbol_table): Just declare debug method here.
9152         * symtab.c (symbol_table::debug): Define.
9154 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
9156         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
9158 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
9160         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
9161         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
9162         (*movdi_internal): Substitute Yi and Yj constraint with x
9163         and Ym and Yn constraint with y constraint.  Update "isa"
9164         attribute and set "preferred_for_speed" attribute from
9165         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
9166         (*movsi_internal): Ditto.
9167         (*movdf_internal): Ditto.
9168         (*movsf_internal): Ditto.
9169         (*zero_extendsidi2): Ditto.
9170         * config/i386/sse.md (vec_set<mode>_0): Ditto.
9171         (sse2_loadld): Ditto.
9172         (*vec_extract<ssevecmodelower>_0): Ditto.
9173         (*vec_extractv4si_0_zext_sse4): Ditto.
9174         (vec_concatv2di): Ditto.
9175         (*vec_dup<mode>): Ditto.
9176         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
9177         * config/i386/constraints.md (Yi): Remove.
9178         (Yj): Remove.
9179         (Ym): Remove.
9180         (Yn): Remove.
9182 2018-04-26  Nathan Sidwell  <nathan@acm.org>
9184         * dumpfile.c (dump_open): New.
9185         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
9186         (dump_finish): Detect stdio/stderr by value not name.
9188 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
9190         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
9192 2018-04-26  Tom de Vries  <tom@codesourcery.com>
9194         PR target/84952
9195         * config/nvptx/nvptx.c (verify_neutering_jumps)
9196         (verify_neutering_labels): New function
9197         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
9199 2018-04-26  Tom de Vries  <tom@codesourcery.com>
9201         PR target/84025
9202         * config/nvptx/nvptx.c (needs_neutering_p): New function.
9203         (nvptx_single): Use needs_neutering_p to skip over insns that do not
9204         need neutering.
9206 2018-04-26  Richard Biener <rguenther@suse.de>
9207             Tom de Vries  <tom@codesourcery.com>
9209         PR lto/85422
9210         * lto-streamer-out.c (output_function): Fixup loops if required to match
9211         discovery done in the reader.
9213 2018-04-26  Richard Biener  <rguenther@suse.de>
9215         PR tree-optimization/85116
9216         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
9217         have a loop exit from the single latch predecessor.  Remove
9218         case of header with just condition.
9219         (ch_base::copy_headers): Exclude infinite loops from any
9220         processing.
9221         (pass_ch::execute): Record exits.
9223 2018-04-26  Richard Biener  <rguenther@suse.de>
9225         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
9226         prologue cost vector and pass it to vect_get_load_cost.
9227         (vect_get_peeling_costs_all_drs): Likewise.
9228         (vect_peeling_hash_get_lowest_cost): Likewise.
9229         (vect_enhance_data_refs_alignment): Likewise.
9231 2018-04-26  Richard Biener  <rguenther@suse.de>
9233         PR middle-end/85450
9234         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
9235         checking of integer<->pointer conversions.
9236         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
9237         sign-/zero-extending pointer types.
9238         (expand_omp_for_static_chunk): Likewise.
9240 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
9241             Jean Lee  <xiaoyur347@gmail.com>
9243         * config/mips/mips.c (mips_asan_shadow_offset): New function.
9244         (TARGET_ASAN_SHADOW_OFFSET): Define.
9245         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
9246         true for -fsanitize=address.
9248 2018-04-25  Mark Wielaard  <mark@klomp.org>
9250         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
9251         shorter ones.
9253 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
9255         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
9256         than "alu", remove explicit "memory" and "imm_disp" attributes.
9257         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
9259         PR middle-end/85414
9260         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
9261         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
9262         gen_lowpart_no_emit.
9264 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
9266         PR target/85473
9267         * config/i386/i386.c (ix86_expand_builtin): Change memory
9268         operand to XI, extend p0 to Pmode.
9269         * config/i386/i386.md: Change unspec volatile and operand
9270         1 mode to XI, change operand 0 mode to P.
9272 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9274         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
9275         GET_MODE_MASK before any checking.
9276         (nds32_can_use_bset_p): Likewise.
9277         (nds32_can_use_btgl_p): Likewise.
9279 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9281         * config/nds32/nds32-doubleword.md: New define_split pattern for
9282         illegal register number.
9284 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9286         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
9288 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9290         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
9292 2018-04-25  Richard Biener  <rguenther@suse.de>
9294         * lto-streamer.h (LTO_major_version): Bump to 8.
9296 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
9298         * BASE-VER: Set to 9.0.0.
9300 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
9302         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
9303         in __abskf2 and __powikf2.
9305 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9307         PR target/85512
9308         * config/aarch64/constraints.md (Usg, Usj): New constraints.
9309         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
9310         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
9311         Use the above on operand 2.  Reindent.
9312         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
9314 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
9316         PR target/85485
9317         * common/config/i386/i386-common.c (ix86_handle_option): Don't
9318         handle OPT_mcet.
9319         * config/i386/i386.opt (mcet): Removed.
9320         * doc/install.texi: Remove -mcet documentation.
9321         * doc/invoke.texi: Likewise.
9323 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
9325         PR target/85485
9326         * doc/install.texi: Remove -mcet from bootstrap-cet.
9328 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9330         PR target/85511
9331         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
9332         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
9333         if TARGET_64BIT.
9335         PR target/85503
9336         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
9337         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
9338         containing a CONST_VECTOR.
9340 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
9342         * doc/install.texi: Update newlib dependency for nvptx.
9344 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9346         PR target/85508
9347         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
9348         instead of INTVAL when shifting x left.
9350 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
9352         PR tree-optimization/85478
9353         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
9354         vect_grouped_store_supported for single element vectors.
9356 2018-04-24  Richard Biener  <rguenther@suse.de>
9358         PR target/85491
9359         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
9360         load cost increase to the case of non-constant step.
9362 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9364         PR target/84828
9365         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
9366         destination if any_malformed_asm.
9368 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
9370         PR middle-end/85496
9371         * expr.c (store_field): In the bitfield case, if the value comes from
9372         a function call and is returned in registers by means of a PARALLEL,
9373         do not change the mode of the temporary unless BLKmode and VOIDmode.
9375 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
9377         PR rtl-optimization/85423
9378         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
9379         dependencies to debug insns when the previous insn is non-debug.
9381 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
9383         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
9384         enums into a single definition.
9385         (fls): Fix predicates and printing.
9386         (seti): Likewise.
9388 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
9390         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
9391         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
9392         and short u6 immediate.
9393         (check_if_valid_sleep_operand): Remove.
9394         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
9396 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9398         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
9399         flag_always_save_lp condition.
9400         * config/nds32/nds32.opt (malways-save-lp): New option.
9402 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
9404         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
9405         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
9406         * config/nds32/nds32.h
9407         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
9408         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
9410 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
9412         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
9413         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
9415 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
9416             Chung-Ju Wu  <jasonwucj@gmail.com>
9418         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
9419         Declare.
9420         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
9421         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
9423 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9425         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
9427 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9429         * config/nds32/nds32-protos.h (nds32_data_alignment,
9430         nds32_local_alignment): Declare.
9431         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
9432         nds32_local_alignment): New functions.
9433         (TARGET_CONSTANT_ALIGNMENT): Define.
9434         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
9436 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9438         * config/nds32/nds32.c
9439         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
9440         (TARGET_MODES_TIEABLE_P): Likewise.
9442 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9444         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
9445         level Ofast and Og.
9447 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
9448             Chung-Ju Wu  <jasonwucj@gmail.com>
9450         * config/nds32/constants.md (unspec_volatile_element): Add enum values
9451         for unaligned access.
9452         * config/nds32/nds32-intrinsic.c: Implementation of expanding
9453         unaligned access.
9454         * config/nds32/nds32-intrinsic.md: Likewise.
9455         * config/nds32/nds32_intrinsic.h: Likewise.
9456         * config/nds32/nds32.h (nds32_builtins): Likewise.
9457         * config/nds32/nds32.opt (munaligned-access): New option.
9458         * config/nds32/nds32.c (nds32_asm_file_start): Display
9459         flag_unaligned_access status.
9461 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
9463         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
9464         -mno-relax is present.
9465         * config/riscv/linux.h (LINK_SPEC): Ditto.
9467 2018-04-20  Martin Sebor  <msebor@redhat.com>
9469         PR c/85365
9470         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
9471         for null pointers.
9472         (gimple_fold_builtin_stxcpy_chk): Same.
9473         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
9475 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
9477         PR target/85456
9478         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
9479         __powikf2 when long double is IEEE 128-bit.
9481 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
9483         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
9484         step to make sure stack always aligned.
9486 2018-04-20  Carl Love  <cel@us.ibm.com>
9488         PR target/83402
9489         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
9490         size check for arg0.
9492 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9493             Tom de Vries  <tom@codesourcery.com>
9495         PR target/85445
9496         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
9497         Emit insns for calls too.
9498         (nvptx_find_par): Always look for worker-level predecessor insn.
9499         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
9500         calls.
9501         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
9502         (nvptx_process_pars): Propagate frames for calls.
9504 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
9506         PR target/85469
9507         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
9508         Removed.
9509         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
9510         (ix86_handle_option): Don't handle OPT_mibt.
9511         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
9512         __SHSTK__.
9513         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
9514         has_ibt and ibt.
9515         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
9516         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
9517         (ix86_target_macros): Define __CET__ with flag_cf_protection
9518         for -fcf-protection.
9519         * config/i386/i386.c (isa2_opts): Remove -mibt.
9520         * config/i386/i386.h (TARGET_IBT): Removed.
9521         (TARGET_IBT_P): Likewise.
9522         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
9523         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
9524         * config/i386/i386.opt (mcet): Update help message.
9525         (mshstk): Likewise.
9526         (mibt): Removed.
9527         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
9528         -mcet as an alias for -mshstk.
9530 2018-04-20  Richard Biener <rguenther@suse.de>
9532         PR middle-end/85475
9533         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
9534         complexity by forcing a single use of the multiply operand.
9536 2018-04-20  Martin Jambor  <mjambor@suse.cz>
9538         ipa/85449
9539         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
9540         recursion dependency to only apply to non-clones.
9542 2018-04-20  Martin Jambor  <mjambor@suse.cz>
9544         ipa/85447
9545         * ipa-cp.c (create_specialized_node): Check that clones of
9546         self-recursive edges exist during IPA-CP.
9548 2018-04-19  Toon Moene  <toon@moene.org>
9550         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
9551         by -O3.
9553 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
9555         PR tree-optimization/85467
9556         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
9557         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
9558         VECTOR_CST element to type.
9560 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9562         PR target/85397
9563         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
9564         * config/i386/i386.md (builtin_setjmp_setup): Removed.
9565         (builtin_longjmp): Likewise.
9566         (save_stack_nonlocal): New pattern.
9567         (restore_stack_nonlocal): Likewise.
9569 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9571         PR target/85404
9572         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9573         Replace ASM_OUTPUT_LABEL with fprintf.
9575 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9577         PR target/85417
9578         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9579         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
9580         * config/i386/i386-c.c (ix86_target_macros_internal): Also
9581         define __IBT__ and __SHSTK__ for -fcf-protection.
9582         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
9583         TARGET_IBT.
9584         (ix86_trampoline_init): Likewise.
9585         (x86_output_mi_thunk): Likewise.
9586         (ix86_notrack_prefixed_insn_p): Likewise.
9587         (ix86_option_override_internal): Don't disallow -fcf-protection.
9588         * config/i386/i386.md (rdssp<mode>): Also enable for
9589         -fcf-protection.
9590         (incssp<mode>): Likewise.
9591         (nop_endbr): Likewise.
9592         * config/i386/i386.opt (mcet): Change help message to built-in
9593         functions only.
9594         (mibt): Likewise.
9595         (mshstk): Likewise.
9596         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
9597         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
9598         enable CET built-in functions.
9600 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
9602         * common/config/i386/i386-common.c
9603         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
9604         OPTION_MASK_ISA_MOVDIRI_UNSET,
9605         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
9606         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
9607         * config.gcc (movdirintrin.h): New header.
9608         * config/i386/cpuid.h (bit_MOVDIRI,
9609         bit_MOVDIR64B): New bits.
9610         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
9611         and -mmvodir64b.
9612         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
9613         (VOID, PVOID, PCVOID)): New function types.
9614         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
9615         __builtin_ia32_directstoreu_u64,
9616         __builtin_ia32_movdir64b): New builtins.
9617         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
9618         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
9619         and -mmovdiri.
9620         (ix86_valid_target_attribute_inner_p): Ditto.
9621         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
9622         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
9623         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
9624         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
9625         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
9626         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
9627         (movdiri<mode>, movdir64b_<mode>): New.
9628         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
9629         * config/i386/immintrin.h: Include movdirintrin.h.
9630         * config/i386/movdirintrin.h: New file.
9631         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
9633 2018-04-19  Richard Biener  <rguenther@suse.de>
9635         PR middle-end/85455
9636         * cfg.c (clear_bb_flags): When loop state says we have
9637         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
9639 2018-04-19  Richard Biener  <rguenther@suse.de>
9641         PR tree-optimization/84737
9642         * tree-vect-data-refs.c (vect_copy_ref_info): New function
9643         copying restrict info.
9644         (vect_setup_realignment): Use it.
9645         * tree-vectorizer.h (vect_copy_ref_info): Declare.
9646         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
9647         the first DR to all generated stores.
9648         (vectorizable_load): Likewise for loads.
9650 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
9652         PR tree-optimization/85446
9653         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
9654         the integral and pointer types to have the same precision.
9656         * doc/install.texi: Document --disable-cet being the default and
9657         --enable-cet=auto.
9659 2018-04-18  Martin Liska  <mliska@suse.cz>
9661         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
9662         style.
9664 2018-04-18  Martin Liska  <mliska@suse.cz>
9666         Revert
9667         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
9669         PR ipa/83983
9670         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9671         arguments if they are comparable.
9673 2018-04-18  Martin Liska  <mliska@suse.cz>
9675         Revert
9676         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9678         PR lto/84805
9679         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9680         incomplete types.
9682 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
9684         PR target/85388
9685         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
9686         ENDBR after calling __morestack.
9688 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
9690         PR jit/85384
9691         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
9692         by using gcc_base_ver to generate a gcc_driver_version, and use
9693         it when generating GCC_DRIVER_NAME.
9694         * configure: Regenerate.
9696 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
9698         PR target/81084
9699         * config.gcc: Obsolete powerpc*-*-*spe*.
9701 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9703         PR debug/84637
9704         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
9705         (stabstr_D): Change type of unum from unsigned int to
9706         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
9707         type.
9709 2018-04-17  Jim Wilson  <jimw@sifive.com>
9711         PR 84856
9712         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
9713         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
9714         Set arg_pointer_offset after using pretend_args_size.
9716 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9718         PR rtl-optimization/85431
9719         * dse.c (record_store): Ignore zero width stores.
9721         PR sanitizer/85230
9722         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
9723         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
9724         __builtin_stack_restore rather than after it.
9725         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
9726         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
9727         argument instead of virtual_dynamic_stack_rtx.
9729 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9731         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
9732         New prototype.
9733         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9734         Add note to error message to explain internal mapping of overloaded
9735         built-in function name to non-overloaded built-in function name.
9736         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
9737         function.
9739 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
9741         PR target/85424
9742         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
9743         where the inputs overlap with the output.
9745 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9747         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
9748         (=v, v) alternative and explicit "memory" attribute.
9749         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
9750         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9751         attributes.
9752         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
9753         "sselog1" type instead of "sselog".
9754         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
9755         "sselog".  Remove explicit "memory" attribute.
9756         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
9757         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9758         attributes.
9759         (vec_extract_hi_v32hi): Merge all alternatives into one, use
9760         "sselog1" type instead of "sselog".  Remove explicit "memory"
9761         attribute.
9762         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
9763         use "sselog1" type instead of "sselog".  Remove explicit "memory"
9764         attribute.
9765         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
9766         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9767         attributes.
9768         (vec_extract_hi_v64qi): Merge all alternatives into one, use
9769         "sselog1" type instead of "sselog".  Remove explicit "memory"
9770         attribute.
9771         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
9772         use "sselog1" type instead of "sselog".  Remove explicit "memory"
9773         attribute.
9775         PR target/85430
9776         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
9778         PR middle-end/85414
9779         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
9780         on a SUBREG.
9782 2018-04-17  Martin Jambor  <mjambor@suse.cz>
9784         PR ipa/85421
9785         * ipa-cp.c (create_specialized_node): Call
9786         expand_all_artificial_thunks if necessary.
9788 2018-04-17  Martin Liska  <mliska@suse.cz>
9790         PR lto/85405
9791         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
9792         in message, remote space in between '_G' and '('.
9794 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9796         PR target/85281
9797         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
9798         avx512f_vmcmp<mode>3<round_saeonly_name>,
9799         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
9800         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
9801         avx512f_rndscale<mode><round_saeonly_name>,
9802         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
9803         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
9804         Use %<iptr>2 instead of %2 for -masm=intel.
9805         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
9806         avx512f_vcvttss2usi<round_saeonly_name>,
9807         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
9808         -masm=intel.
9809         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
9810         avx512f_vcvttsd2usi<round_saeonly_name>,
9811         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
9812         Use %q1 instead of %1 for -masm=intel.
9813         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
9814         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
9815         of %3 for -masm=intel.
9816         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
9817         -masm=intel.
9818         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
9819         -masm=intel.
9820         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
9821         -masm=intel.
9822         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
9823         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
9824         %g1.
9825         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
9826         -masm=intel.
9827         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
9828         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
9829         %g1 and one with %0 and %1.
9830         (avx512er_vmrcp28<mode><round_saeonly_name>,
9831         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
9832         %1 for -masm=intel.
9833         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
9834         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
9835         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
9836         of %0 and %{%4%} for -masm=intel.
9837         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
9838         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
9839         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
9840         order of %0 and %{%5%}%{z%} for -masm=intel.
9842 2018-04-17  Jan Hubicka  <jh@suse.cz>
9844         PR lto/85405
9845         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
9847 2018-04-17  Martin Liska  <mliska@suse.cz>
9849         PR ipa/85329
9850         * multiple_target.c (create_dispatcher_calls): Set apostrophes
9851         for target_clone error message.  Make default implementation
9852         clone to be a local declaration.
9853         (separate_attrs): Add new argument and check for an empty
9854         string.
9855         (expand_target_clones): Handle it.
9856         (ipa_target_clone): Make redirection just for target_clones
9857         functions.
9859 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
9860             Tom de Vries  <tom@codesourcery.com>
9862         PR middle-end/84955
9863         * omp-expand.c (expand_oacc_for): Add dummy false branch for
9864         tiled basic blocks without omp continue statements.
9866 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
9868         PR target/83660
9869         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
9870         vec_extract expression as having side effects to make sure it gets
9871         a cleanup point.
9873 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
9875         PR target/85403
9876         * config/i386/i386.c (get_builtin_code_for_version): Check
9877         error_mark_node.
9879 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
9881         PR target/84331
9882         * config.gcc: Support "skylake".
9883         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9884         PROCESSOR_SKYLAKE.
9885         * config/i386/i386.c (m_SKYLAKE): Define.
9886         (processor_target_table): Add "skylake".
9887         (ix86_option_override_internal): Add "skylake".
9888         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
9889         PROCESSOR_CANNONLAKE.
9890         (get_builtin_code_for_version): Fix priority for
9891         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
9892         PROCESSOR_SKYLAKE-AVX512.
9893         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
9894         (processor_type): Add PROCESSOR_SKYLAKE.
9896 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
9897             Jason Merrill  <jason@redhat.com>
9899         PR c++/85112
9900         * convert.c (convert_to_integer_1): Use direct recursion for
9901         enumeral types and types with a precision less than the number
9902         of bits in their mode.
9904 2018-04-16  Julia Koval  <julia.koval@intel.com>
9906         PR target/84413
9907         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
9908         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
9910 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
9912         PR target/85293
9913         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
9914         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
9915         and -mno-direct-move.
9917 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
9919         PR target/83402
9920         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
9921         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
9922         Ensure negative shifts result in {0}.
9924 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
9926         PR rtl-optimization/79916
9927         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
9928         regs (if any) to define how to gnerate SD moves when LRA is in
9929         progress.
9931 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
9933         PR rtl-optimization/85393
9934         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
9935         * except.c (expand_dw2_landing_pad_for_region): Make static.
9936         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
9937         a label and unconditional jump to old_bb, rather than
9938         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
9939         basic block.
9941         PR rtl-optimization/85376
9942         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
9943         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
9944         instead of a specific value.
9946 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
9947             Bin Cheng  <bin.cheng@arm.com>
9949         PR tree-optimization/82965
9950         PR tree-optimization/83991
9951         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
9952         by_profile_only parameter.
9953         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
9954         information if the loop was predicted to iterate too many times.
9955         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
9957 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
9959         PR lto/71991
9960         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
9961         always inline.
9963 2018-04-13  Martin Liska  <mliska@suse.cz>
9964             Jakub Jelinek  <jakub@redhat.com>
9966         PR middle-end/81657
9967         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
9968         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
9969         * builtins.c (expand_builtin_memory_copy_args): Use
9970         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
9971         handle dest_addr == pc_rtx.
9973 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
9975         PR target/85291
9976         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
9977         asked to not generate direct moves.
9978         (fix_trunc<mode>si2_stfiwx): Similar.
9979         (fix_trunc<mode>si2_internal): Similar.
9981 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
9983         PR debug/83157
9984         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
9985         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
9986         lookup if dest in some wider mode is known to be const0_rtx and
9987         if so, record permanent equivalence for it to be ZERO_EXTEND of
9988         the narrower mode destination.
9990 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
9992         * lto-streamer-out.c (output_function): Revert 259346.
9993         * omp-expand.c (expand_oacc_for): Likewise.
9995 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
9997         PR rtl-optimization/85354
9998         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
9999         * sel-sched.c (sel_global_init): ... here.
10001 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
10003         PR target/85238
10004         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
10005         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10006         mode for PE-COFF targets.
10007         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
10008         (i386_pe_asm_lto_end): Likewise.
10009         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
10010         (TARGET_ASM_LTO_END): Likewise.
10011         * config/i386/winnt.c (saved_debug_info_level): New static variable.
10012         (i386_pe_asm_lto_start): New function.
10013         (i386_pe_asm_lto_end): Likewise.
10015 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
10016             Richard Biener  <rguenther@suse.de>
10018         PR middle-end/84955
10019         * lto-streamer-out.c (output_function): Fix CFG loop state before
10020         streaming out.
10021         * omp-expand.c (expand_oacc_for): Handle calls to internal
10022         functions like regular functions.
10024 2018-04-12  Richard Biener  <rguenther@suse.de>
10026         PR lto/85371
10027         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
10028         for the early LTO debug to properly generate references to it
10029         during DIE emission.  Do not re-use that for the skeleton for
10030         split-dwarf.
10031         (dwarf2out_early_finish): Likewise.
10033 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
10035         PR target/85328
10036         * config/i386/sse.md
10037         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
10038         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
10039         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
10040         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
10041         and output is a reg, avoid creating invalid lowpart subreg, but
10042         instead split into a 512-bit move.  Don't split if not AVX512VL,
10043         input is xmm16+ reg and output is a mem.
10044         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
10045         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
10046         xmm16+ reg and output is a mem.
10048 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10050         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
10051         also for flag_dwarf2_cfi_asm.
10053 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
10055         PR rtl-optimization/85342
10056         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
10057         a bool scalar var inside of the loop instead.  Don't try to update
10058         recog_data.operand after failed apply_change_group.
10060 2018-04-12  Tom de Vries  <tom@codesourcery.com>
10062         PR target/85296
10063         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
10064         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
10065         array with flexible array member as array without given dimension.
10066         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
10067         argument for undefined param to true.
10069 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
10071         PR target/85321
10072         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10073         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
10074         from PowerPC section.
10075         * config/rs6000/sysv4.opt (mcall-): Improve help text.
10076         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
10077         help text that is too long.
10078         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
10079         help text that is too long.
10080         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
10081         help text that is too long.
10083 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
10085         * config/alpha/alpha.md (stack_probe_internal): Rename
10086         from "probe_stack".  Update all callers.
10088 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10090         PR rtl-optimization/84566
10091         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
10092         sched_macro_fuse_insns.
10094 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10096         PR target/84301
10097         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
10098         (compute_block_dependences): ... from here.
10100 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10102         PR tree-optimization/85331
10103         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
10104         from int to HOST_WIDE_INT.
10106 2018-04-11  Martin Jambor  <mjambor@suse.cz>
10108         PR ipa/84149
10109         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
10110         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
10111         not the same as the source val.
10112         (cgraph_edge_brings_value_p): New parameter.
10113         (gather_edges_for_value): Pass destination value to
10114         cgraph_edge_brings_value_p.
10115         (perhaps_add_new_callers): Likewise.
10116         (get_info_about_necessary_edges): Likewise and exclude values brought
10117         only by self-recursive edges.
10118         (create_specialized_node): Redirect only clones of self-calling edges.
10119         (+self_recursive_pass_through_p): New function.
10120         (find_more_scalar_values_for_callers_subset): Use it.
10121         (find_aggregate_values_for_callers_subset): Likewise.
10122         (known_aggs_to_agg_replacement_list): Removed.
10123         (decide_whether_version_node): Re-calculate known constants for all
10124         remaining context clones.
10126 2018-04-11  Richard Biener  <rguenther@suse.de>
10128         PR lto/85339
10129         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10130         from early DWARF output.
10131         (dwarf2out_early_finish): Output line info unconditionally into
10132         early DWARF and add reference to it.
10134 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10136         PR target/85281
10137         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10138         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10139         other than V2DFmode using iptr mode attribute.
10140         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10142 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10144         PR rtl-optimization/84659
10145         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
10147 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10149         PR debug/85302
10150         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
10151         SIZEP is NULL.
10152         (output_loc_list): Pass address of a dummy size variable even in the
10153         locview handling loop.
10154         (index_location_lists): Add comment on why skip_loc_list_entry can't
10155         call size_of_locs.
10157 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10159         PR target/85261
10160         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
10161         into register.
10163 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
10165         PR target/85321
10166         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10167         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
10168         and -mstring-compare-inline-limit.
10170 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10172         PR target/85287
10173         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
10174         for stack clash protection in a register whenever we need it to be in
10175         a register.
10177 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10179         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
10180         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
10182 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10184         PR target/85321
10185         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
10186         the help text.
10187         (mlong-double-): Ditto.
10188         * config/rs6000/sysv4.opt (msdata=): Ditto.
10189         (mtls-size=): Ditto.
10191 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10193         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10194         erroneous entries for
10195         "vector int vec_ldl (int, long int *)", and
10196         "vector unsigned int vec_ldl (int, unsigned long int *)".
10197         Add comments and entries for
10198         "vector bool char vec_ldl (int, bool char *)",
10199         "vector bool short vec_ldl (int, bool short *)",
10200         "vector bool int vec_ldl (int, bool int *)",
10201         "vector bool long long vec_ldl (int, bool long long *)",
10202         "vector pixel vec_ldl (int, pixel *)",
10203         "vector long long vec_ldl (int, long long *)",
10204         "vector unsigned long long vec_ldl (int, unsigned long long *)".
10205         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
10206         type tree bool_long_long_type_node and correct definition of
10207         bool_V2DI_type_node to make reference to this new type tree.
10208         (rs6000_mangle_type): Replace erroneous reference to
10209         bool_long_type_node with bool_long_long_type_node.
10210         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
10211         comments to emphasize sign distinctions for char and int types and
10212         replace RS6000_BTI_bool_long constant with
10213         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
10214         use of RS6000_BTI_pixel.
10215         (bool_long_type_node): Remove this macro definition.
10216         (bool_long_long_type_node): New macro definition
10218 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
10220         PR rtl-optimization/85300
10221         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
10222         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
10223         simplify_unary_operation fails.
10225 2018-04-10  Martin Liska  <mliska@suse.cz>
10227         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
10228         cgraph_edge and ipa_ref.
10230 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
10232         PR target/85177
10233         PR target/85255
10234         * config/i386/sse.md
10235         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
10236         computation of the VEC_MERGE selector from mask.
10237         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
10238         Fix decoding of the VEC_MERGE selector into mask.
10240 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
10242         PR tree-optimization/85286
10243         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
10245 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
10247         * final.c (final_1): Set insn_last_address as well as
10248         insn_current_address.
10250 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10252         PR target/85173
10253         * explow.c (emit_stack_probe): Call validize_mem on memory location
10254         before passing it to gen_probe_stack.  Create address operand and
10255         legitimize it for the probe_stack_address case.
10257 2018-04-09  Jan Hubicka  <jh@suse.cz>
10259         PR lto/85078
10260         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
10261         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
10262         * tree.c (free_lang_data_in_type): Fix handling of binfos;
10263         walk basetypes.
10264         (free_lang_data): Rebuild type inheritance graph.
10266 2018-04-09  Martin Sebor  <msebor@redhat.com>
10268         * invoke.texi (-finline-small-functions): Mention other optimization
10269         options.
10270         (-findirect-inlining, -fpartial-inlining): Same.
10271         (-finline-functions-called-once): Same.
10272         (-freorder-blocks-and-partition): Same.
10274 2018-04-09  Jan Hubicka  <jh@suse.cz>
10276         PR rtl/84058
10277         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
10278         jumps; choose last target that matches the criteria (i.e.
10279         no partition changes for non-crossing jumps).
10280         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
10281         support for redirecting crossing jumps to non-crossing.
10283 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
10285         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
10286         also for naked functions.
10288 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
10290         * config/arc/arc.md (add_shift): New pattern.
10291         (add_shift2): Likewise.
10292         (sub_shift): Likewise.
10293         (sub_shift_cmp0_noout): Likewise.
10294         (compare_si_ashiftsi): Likewise.
10295         (xbfu_cmp0_noout): New combine pattern.
10296         (xbfu_cmp0"): Likewise.
10297         (movsi_set_cc_insn): Place the predicable variant first.
10298         (commutative_binary_cmp0_noout): Remove clobber.
10299         (commutative_binary_cmp0): New pattern.
10300         (noncommutative_binary_cmp0): Likewise.
10301         (noncommutative_binary_cmp0_noout): Likewise.
10302         (noncommutative_binary_comparison_result_used): Removed.
10303         (rsub_cmp0): New pattern.
10304         (rsub_cmp0_noout): Likewise.
10305         (extzvsi): Changed, keep only meaningful variants.
10306         (SQH, SEZ): New iterators.
10307         (SQH_postfix): New mode attribute.
10308         (SEZ_prefix): New code attribute.
10309         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
10310         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
10311         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
10312         of numerical value.
10313         (noncommutative_operator): Check the availability of barrel
10314         shifter option.
10316 2018-04-09  Richard Biener  <rguenther@suse.de>
10318         PR tree-optimization/85284
10319         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
10320         Only use the niter constraining form of simple_iv when the exit
10321         is always executed.
10323 2018-04-09  Tom de Vries  <tom@codesourcery.com>
10325         PR target/84041
10326         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10327         (define_expand "*memory_barrier"): New define_expand.
10328         (define_insn "memory_barrier"): New insn.
10330 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10332         PR rtl-optimization/80463
10333         PR rtl-optimization/83972
10334         PR rtl-optimization/83480
10336         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
10337         correct producer for the insn.
10338         (tidy_control_flow): Fixup seqnos in case of debug insns.
10340 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10342         PR rtl-optimization/83913
10344         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
10345         different sched-times when merging exprs.
10347 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10349         PR rtl-optimization/83962
10351         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
10352         tidy_fallthru_edge and tidy_control_flow.
10354 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10356         PR rtl-optimization/83530
10358         * sel-sched.c (force_next_insn): New global variable.
10359         (remove_insn_for_debug): When force_next_insn is true, also leave only
10360         next insn in the ready list.
10361         (sel_sched_region): When the region wasn't scheduled, make another pass
10362         over it with force_next_insn set to 1.
10364 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
10366         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
10367         into tm_file.
10368         * config/nds32/constants.md (unspec_volatile_element): Add enum values
10369         for interrupt control.
10370         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10371         functions for interrupt control.
10372         * config/nds32/nds32-intrinsic.md: Likewise.
10373         * config/nds32/nds32_intrinsic.h: Likewise.
10374         * config/nds32/nds32.h (nds32_builtins): Likewise.
10376 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
10378         * config/nds32/nds32.c (nds32_init_machine_status,
10379         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
10380         strict_aligned_p field.
10381         (nds32_expand_to_rtl_hook): New function.
10382         (TARGET_EXPAND_TO_RTL_HOOK): Define.
10383         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
10385 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10386             Chung-Ju Wu  <jasonwucj@gmail.com>
10388         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
10389         * config/nds32/nds32-n7.md: New file.
10390         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
10391         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
10392         pipeline.
10393         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
10394         * config/nds32/nds32.md (pipeline_model): Add n7.
10395         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
10396         * config/nds32/pipelines.md: Include n7 settings.
10398 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10399             Chung-Ju Wu  <jasonwucj@gmail.com>
10401         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
10402         * config/nds32/nds32-e8.md: New file.
10403         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
10404         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
10405         pipeline.
10406         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
10407         * config/nds32/nds32.md (pipeline_model): Add e8.
10408         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
10409         * config/nds32/pipelines.md: Include e8 settings.
10411 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10412             Chung-Ju Wu  <jasonwucj@gmail.com>
10414         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
10415         * config/nds32/nds32-n8.md: New file.
10416         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
10417         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
10418         pipeline.
10419         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
10420         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
10421         * config/nds32/nds32.md (pipeline_model): Add n8.
10422         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
10423         * config/nds32/pipelines.md: Include n8 settings.
10425 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10426             Chung-Ju Wu  <jasonwucj@gmail.com>
10428         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
10429         * config/nds32/nds32-n9-2r1w.md: New file.
10430         * config/nds32/nds32-n9-3r2w.md: New file.
10431         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
10432         nds32_register_ports): New or modify for cpu n9.
10433         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
10434         pipeline.
10435         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
10436         * config/nds32/nds32-utils.c: New file.
10437         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
10438         TARGET_MUL_SLOW): Define.
10439         * config/nds32/nds32.md (pipeline_model): New attribute.
10440         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
10441         New options that support cpu n9.
10442         * config/nds32/pipelines.md: Include n9 settings.
10443         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
10445 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
10447         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
10448         information if necessary.
10449         (output_cond_branch_compare_zero): Likewise.
10450         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
10451         (nds32_target_alignment): Refine for alignment.
10452         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
10453         (FUNCTION_BOUNDARY): Modify.
10454         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
10455         align case.
10456         * config/nds32/nds32.opt (malways-align, malign-functions): New.
10458 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
10460         * config/nds32/constants.md (unspec_volatile_element): Add values for
10461         TLB operation and data prefetch.
10462         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10463         functions for TLB operation and data prefetch.
10464         * config/nds32/nds32-intrinsic.md: Likewise.
10465         * config/nds32/nds32_intrinsic.h: Likewise.
10466         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
10467         (nds32_print_operand): Likewise.
10468         * config/nds32/nds32.h (nds32_builtins): Likewise.
10470 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
10471         Andrew Pinski <pinsika@gcc.gnu.org>
10473         PR middle-end/82976
10474         * match.pd: Use constant_boolean_node of correct type instead of
10475         boolean_true_node or boolean_false_node for simplifying
10476         pointer comparisons to zero.
10478 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
10480         PR tree-optimization/80021
10481         * tree.c (verify_type_variant): Make error call in verify_variant_match
10482         translatable and remove final full stop.
10484 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10486         * config/nds32/constants.md (unspec_volatile_element): Add
10487         UNSPEC_VOLATILE_EH_RETURN.
10488         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
10489         nds32_output_stack_pop): Support dwarf exception handling process.
10490         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
10491         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
10492         exception handling process.
10493         (nds32_compute_stack_frame): Likewise.
10494         (nds32_return_addr_rtx): Likewise.
10495         (nds32_initial_elimination_offset): Likewise.
10496         (nds32_expand_prologue): Likewise.
10497         (nds32_expand_epilogue): Likewise.
10498         (nds32_dynamic_chain_address): New function.
10499         * config/nds32/nds32.h (machine_function): Add fields for dwarf
10500         exception handling.
10501         (DYNAMIC_CHAIN_ADDRESS): Define.
10502         (EH_RETURN_DATA_REGNO): Define.
10503         (EH_RETURN_STACKADJ_RTX): Define.
10504         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
10505         patterns for dwarf exception handling.
10507 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10509         * config/nds32/nds32.h: Clean up obsolete macros.
10511 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10513         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10514         Add enum values for particular instructions.
10515         * config/nds32/nds32-intrinsic.c: Implementation of expanding
10516         particular intrinsic functions.
10517         * config/nds32/nds32-intrinsic.md: Likewise.
10518         * config/nds32/nds32_intrinsic.h: Likewise.
10519         * config/nds32/nds32.h (nds32_builtins): Likewise.
10520         * config/nds32/nds32.md (type): Add pbsad and pbsada.
10521         (btst, ave): New patterns for particular instructions.
10523 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10525         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10526         Add enum values for atomic load/store and memory sync.
10527         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
10528         and memory sync.
10529         * config/nds32/nds32-intrinsic.md: Likewise.
10530         * config/nds32/nds32_intrinsic.h: Likewise.
10531         * config/nds32/nds32.h (nds32_builtins): Likewise.
10533 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
10535         PR tree-optimization/85257
10536         * fold-const.c (native_encode_vector): If not all elts could fit
10537         and off is -1, return 0 rather than offset.
10538         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
10539         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
10540         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
10541         adjust buffer in native_interpret_expr call.
10543 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10545         * config/nds32/constants.md (unspec_volatile_element): Add cache
10546         control enum values.
10547         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
10548         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
10549         * config/nds32/nds32.c (nds32_cctl_names): New.
10550         (nds32_print_operand): Handle cache control register names.
10551         * config/nds32/nds32.h (nds32_builtins): New enum values.
10552         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
10553         macros.
10554         * config/nds32/nds32.md (type): Add mmu.
10555         * config/nds32/pipelines.md (simple_insn): Add mmu.
10557 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10559         * config/nds32/nds32.md (type): Remove call.
10560         * config/nds32/pipelines.md (simple_insn): Likewise.
10562 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10564         * config/nds32/constants.md (unspec_volatile_element): Add
10565         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
10566         UNSPEC_VOLATILE_FMFCFG.
10567         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
10568         description for fmfcfg and fmfcsr.
10569         (bdesc_1arg): Add fmtcsr.
10570         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
10571         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
10572         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
10573         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
10574         unspec_fmfcfg): New patterns.
10575         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
10576         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
10577         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
10578         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
10579         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
10580         __nds32__fmfcfg): Define.
10582 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10584         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
10585         intrinsic register names.
10586         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
10587         intrinsic register enum values and macros.
10589 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10591         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
10592         for load/store addressing form.
10593         (nds32_print_operand_address): Likewise.
10595 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
10597         PR target/85196
10598         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
10599         based on LABEL_REF.  Remove useless assertion.
10600         (pic_address_needs_scratch): Fix formatting.
10601         (sparc_legitimize_pic_address): Minor tweaks.
10602         (sparc_delegitimize_address): Adjust assertion accordingly.
10603         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
10604         into symbolic_operand.
10605         (movsi_high_pic_label_ref): Likewise.
10606         (movsi_lo_sum_pic_label_ref): Likewise.
10607         (movdi_pic_label_ref): Likewise.
10608         (movdi_high_pic_label_ref): Likewise.
10609         (movdi_lo_sum_pic_label_ref): Likewise.
10611 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
10613         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
10614         custom LIB_SPEC setup.
10616 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
10617             Kito Cheng  <kito.cheng@gmail.com>
10619         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
10620         * config/riscv/freebsd.h: New.
10622 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10624         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
10625         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
10626         file.
10628 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10629             Kito Cheng  <kito.cheng@gmail.com>
10631         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
10632         nds32_output_call, nds32_symbol_binds_local_p): New functions.
10633         * config/nds32/nds32-protos.h (nds32_output_call,
10634         nds32_output_return): Declare.
10635         * config/nds32/nds32.md: Refine all the call and return patterns.
10637 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
10639         PR debug/85252
10640         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
10641         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
10643         PR rtl-optimization/84872
10644         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
10645         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
10646         EDGE_CROSSING edge.
10648 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
10650         * expr.c (copy_blkmode_to_reg): Revert 254862.
10651         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
10653 2018-04-06  Richard Biener  <rguenther@suse.de>
10655         PR middle-end/85244
10656         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
10657         after seeing a component reference with an adjacent field.  Treat
10658         refs to arrays at struct end of external decls similar to
10659         refs to unconstrained commons.
10661 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
10663         PR sanitizer/85213
10664         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
10665         look through SAVE_EXPRs with non-side-effects argument.  Adjust
10666         recursive calls.
10667         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
10668         save_p here.
10670 2018-04-06  Richard Biener  <rguenther@suse.de>
10672         PR middle-end/85180
10673         * alias.c (find_base_term): New wrapper around find_base_term
10674         unwinding CSELIB_VAL_PTR changes.
10675         (find_base_term): Do not restore CSELIB_VAL_PTR during the
10676         recursion.
10678 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10680         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
10681         instructions.
10682         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
10683         constant definitions.
10684         ("nop"): lr 0,0 -> nopr r0
10685         ("nop_lr0", "nop_lr1"): New insn definitions.
10687 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10689         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
10690         NDS32_V3PUSH_AVAILABLE_P macro.
10692 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
10693             Chung-Ju Wu  <jasonwucj@gmail.com>
10695         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
10696         (nds32*-*-*): Add float and fpu_config into supported_defaults.
10697         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
10698         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
10699         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
10700         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
10701         * config/nds32/constraints.md: New constraints and checking for hard
10702         float configuration.
10703         * config/nds32/iterators.md: New mode iterator and attribute for hard
10704         float configuration.
10705         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
10706         patterns.
10707         * config/nds32/nds32-fpu.md: New file.
10708         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
10709         deal with hard float code generation.
10710         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
10711         ARCH_V3S.
10712         (abi_type, float_reg_number): New enum type.
10713         * config/nds32/nds32-predicates.c: New predicates for hard float.
10714         * config/nds32/nds32-protos.h: Declare functions for hard float.
10715         * config/nds32/nds32.c: Implementation for hard float configuration.
10716         * config/nds32/nds32.h: Definitions for hard float configuration.
10717         * config/nds32/nds32.md: Include hard float machine description and
10718         modify patterns for hard float configuration.
10719         * config/nds32/nds32.opt: New options for hard float configuration.
10720         * config/nds32/predicates.md: New predicates for hard float
10721         configuration.
10723 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
10725         * common/config/nds32/nds32-common.c
10726         (nds32_option_optimization_table): Enable -mreleax-hint by default.
10728 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
10730         PR middle-end/85195
10731         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
10732         CONSTRUCTOR_ELT (ctor, ...)->value.
10734 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
10736         PR target/85193
10737         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
10739 2018-04-05  Tom de Vries  <tom@codesourcery.com>
10741         PR target/85204
10742         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
10743         cond jump.
10745 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
10746             Kito Cheng  <kito.cheng@gmail.com>
10748         * config/nds32/constraints.md (U33): Fine-tune checking condition.
10749         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
10750         * config/nds32/nds32.h (nds32_16bit_address_type): Add
10751         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
10753 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
10754             Kito Cheng  <kito.cheng@gmail.com>
10756         * config/nds32/constraints.md (Ufe): New memory constraint.
10757         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
10758         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
10759         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
10760         operands.
10761         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
10762         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
10764 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10766         * config/nds32/nds32.md: Use optimize_size in the condition for
10767         alu-shift instructions.
10769 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10771         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
10773 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10775         * config/nds32/nds32.md (negsi2): Refine pattern.
10777 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
10778             Chung-Ju Wu  <jasonwucj@gmail.com>
10780         * config/nds32/iterators.md (shift_rotate): New code iterator.
10781         (shift): New code attribute.
10782         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
10783         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
10784         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
10785         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
10786         bit-wise operations.
10787         (andsi3, *andsi3): Ditto.
10788         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
10789         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
10790         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
10791         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
10792         nds32_ior_operand, nds32_xor_operand): New predicates.
10794 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10796         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
10797         (addsi3, subsi3): ... this.
10799 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10801         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
10803 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10805         * config/nds32/nds32.md: Adjust indention.
10807 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
10809         * config/nds32/nds32.md (feature): New attribute.
10811 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10813         * config/nds32/nds32.md (subtype): New attribute.
10815 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10817         PR target/85203
10818         * config/arm/arm-builtins.c (arm_expand_builtin): Change
10819         expansion to perform a bitwise AND of the argument followed by a
10820         boolean negation of the result.
10822 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
10824         PR rtl-optimization/84878
10825         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
10826         the basic block.  Assert the use reference is not artificial and that
10827         it has an associated insn.
10829 2018-04-04  Michael Matz  <matz@suse.de>
10831         * builtins.c (compute_objsize): Pass correct operand
10832         to array_at_struct_end_p.
10834 2018-04-04  Richard Biener  <rguenther@suse.de>
10836         PR lto/85176
10837         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
10838         from contexts for DINFO_LEVEL_TERSE and below.
10840 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
10842         * config/nds32/nds32-doubleword.md (move_<mode>): Require
10843         resiter_operand condition.
10844         * config/nds32/nds32.md (*move<mode>): Ditto.
10846 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
10847             Monk Chiang  <sh.chiang04@gmail.com>
10849         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
10851 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10853         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
10855 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10856             Kito Cheng  <kito.cheng@gmail.com>
10858         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
10859         nds32_cond_code_str, output_cond_branch,
10860         output_cond_branch_compare_zero, nds32_expand_cbranch,
10861         nds32_expand_cstore, nds32_expand_movcc,
10862         nds32_output_cbranchsi4_equality_zero,
10863         nds32_output_cbranchsi4_equality_reg,
10864         nds32_output_cbranchsi4_equality_reg_or_const_int,
10865         nds32_output_cbranchsi4_greater_less_zero: New functions.
10866         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
10867         nds32_expand_cstore, nds32_expand_movcc,
10868         nds32_output_cbranchsi4_equality_zero,
10869         nds32_output_cbranchsi4_equality_reg,
10870         nds32_output_cbranchsi4_equality_reg_or_const_int,
10871         nds32_output_cbranchsi4_greater_less_zero): Declare.
10872         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
10873         nds32_rimm11s_operand): New predicates.
10874         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
10875         * config/nds32/nds32.md: Rewrite all the branch and conditional move
10876         patterns.
10878 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
10880         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
10881         * config/nds32/nds32.md: Ditto.
10882         * config/nds32/pipelines.md: Ditto.
10884 2018-04-04  Richard Biener  <rguenther@suse.de>
10886         PR tree-optimization/85168
10887         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
10888         propagating abnormals.
10890 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10892         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
10894 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10895             Kito Cheng  <kito.cheng@gmail.com>
10897         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
10898         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
10899         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
10900         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
10901         * config/nds32/nds32.md (sibcall_internal): New.
10902         (sibcall_register): Remove.
10903         (sibcall_immediate): Remove.
10904         (sibcall_value_internal): New.
10905         (sibcall_value_register): Remove.
10906         (sibcall_value_immediate): Remove.
10907         * config/nds32/predicates.md (nds32_general_register_operand): New.
10908         (nds32_call_address_operand): New.
10910 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
10912         PR rtl-optimization/85167
10913         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
10914         bb_defs if *split_p, instead preinitialize it to NULL.
10916         PR tree-optimization/85156
10917         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
10918         evaluating the argument multiple times.
10920 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
10922         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
10923         than vector.
10924         (_mm_cvtpd_ps): Likewise.
10925         (_mm_cvttpd_epi32): Likewise.
10926         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
10927         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
10928         vector, pixel, and bool following altivec.h include.
10930 2018-04-03  Martin Sebor  <msebor@redhat.com>
10932         * doc/extend.texi (Common Function Attributes): Clarify.
10933         (const attribute): Likewise.
10934         (pure attribute): Likewise.
10936 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
10938         PR target/85169
10939         * config/i386/i386.c (ix86_expand_vector_set): Use
10940         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
10942 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
10944         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
10945         instructions when changing rounding bits to preserve precision bits
10946         in the x87 control word.
10948 2018-04-03  Martin Liska  <mliska@suse.cz>
10950         PR tree-optimization/82491
10951         * rtl.h (strip_offset_and_add): Replace += suboffset with
10952         poly_uint64 () + suboffset.
10954 2018-03-29  Martin Liska  <mliska@suse.cz>
10955             Martin Jambor  <mjambor@suse.cz>
10957         PR ipa/84947
10958         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
10959         param_type is not an integral or pointer type.
10961 2018-04-03  Richard Biener  <rguenther@suse.de>
10963         * sese.h (recompute_all_dominators): Remove.
10965 2018-04-02  Martin Sebor  <msebor@redhat.com>
10967         * doc/invoke.texi (-Wrestrict): Fix typos.
10969 2018-04-02  Jim Wilson  <jimw@sifive.com>
10971         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
10972         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
10973         (<optab>di3, <optab>si3_extend): Likewise.
10974         (<optab>si3_mask, <optab>si3_mask_1): New.
10975         (<optab>di3_mask, <optab>di3_mask_1): New.
10976         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
10977         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
10978         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
10980 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
10982         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
10983         example.
10985 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10987         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
10988         (nds32_canonicalize_comparison): New function.
10990 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
10991             Kito Cheng  <kito.cheng@gmail.com>
10992             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
10994         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
10995         * config/nds32/constants.md (unspec_volatile_element): Add
10996         UNSPEC_VOLATILE_RELAX_GROUP.
10997         * config/nds32/nds32-relax-opt.c: New file.
10998         * config/nds32/nds32-predicates.c
10999         (nds32_symbol_load_store_p): New function.
11000         * config/nds32/nds32-protos.h
11001         (nds32_symbol_load_store_p): Declare function.
11002         (make_pass_nds32_relax_opt): Declare new rtl pass function.
11003         * config/nds32/nds32.c
11004         (nds32_register_pass): New function to register pass.
11005         (nds32_register_passes): New function to register passes.
11006         * config/nds32/nds32.md (relax_group): New pattern.
11007         * config/nds32/nds32.opt (mrelax-hint): New option.
11008         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
11010 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
11012         * config/nds32/t-nds32: Modify files dependency.
11014 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
11016         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
11017         (PROFILE_HOOK): Define its implementation.
11019 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
11021         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
11022         type and 32-bit size.
11024 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
11026         PR middle-end/85090
11027         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
11028         (V_128_256): New mode iterator.
11029         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
11030         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
11031         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
11032         of V.
11033         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
11034         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
11036 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
11038         PR target/83315
11039         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
11040         NaN inputs correctly.
11042 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
11044         PR target/80546
11045         * config/rs6000/vsx.md (??r): New mode attribute.
11046         (*vsx_mov<mode>_64bit): Use it.
11047         (*vsx_mov<mode>_32bit): Likewise.
11049 2018-03-30  Martin Sebor  <msebor@redhat.com>
11051         PR tree-optimization/84818
11052         * builtins.c (check_access): Use warning_n.
11054 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
11056         PR target/83822
11057         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
11058         condition.
11059         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
11060         condition.
11062 2018-03-30  Julia Koval  <julia.koval@intel.com>
11064         PR target/84413
11065         * x86-tune.def (movx, partial_reg_dependency): Enable for
11066         m_SKYLAKE_AVX512.
11068 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
11070         PR inline-asm/84985
11071         * lra-constraints.c (process_alt_operands): Move setting
11072         this_alternative_matches below.
11074 2018-03-29  Martin Liska  <mliska@suse.cz>
11076         PR lto/84995.
11077         * doc/invoke.texi: Document how LTO works with debug info.
11078         Describe auto-load support of binutils.  Mention 'x86-64'
11079         as valid option value of -march option.
11081 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
11083         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
11085         PR c/85094
11086         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
11087         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
11088         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
11089         checking.
11091 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
11093         PR target/84912
11094         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
11095         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
11096         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
11097         for RS6000_BTM_POWERPC64.
11098         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
11099         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
11100         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
11101         definition.
11102         (DIVDE): Use it.
11103         (DIVDEU): Likewise.
11105 2018-03-28 Carl Love  <cel@us.ibm.com>
11107         Revert
11108         2017-09-27  Carl Love  <cel@us.ibm.com>
11110         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
11111         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
11112         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
11113         fctiw instruction.
11115 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11117         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
11118         instead of __vector bool.
11119         (_mm_max_pu8): Likewise.
11120         (_mm_min_pi16): Likewise.
11122 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
11124         PR target/84912
11125         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
11126         (DIVWEUO): Likewise.
11127         (DIVDEO): Likewise.
11128         (DIVDEUO): Likewise.
11129         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11130         DIVWEUO and DIVDEUO.
11131         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11132         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11133         (div_extend): Likewise.
11134         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11135         builtin function.
11136         (__builtin_divweuo): Likewise.
11137         (__builtin_divdeo): Likewise.
11138         (__builtin_divdeuo): Likewise.
11140 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
11142         PR target/85095
11143         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
11144         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
11146         PR tree-optimization/82004
11147         * gimple-match-head.c (optimize_pow_to_exp): New function.
11148         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
11149         Don't fold to exp if optimize_pow_to_exp is false.
11151 2018-03-28  Martin Liska  <mliska@suse.cz>
11153         PR other/84819
11154         * calls.c (initialize_argument_information): Fix trailing space.
11155         * common.opt: Fix typo and provide better explanation for
11156         -fsanitize-coverage option.
11157         * config/i386/i386.opt: Fix typo.
11159 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
11160             Martin Liska  <mliska@suse.cz>
11162         PR sanitizer/85081
11163         * gimplify.c (asan_poison_variable): Don't do the check for
11164         gimplify_omp_ctxp here.
11165         (gimplify_decl_expr): Do it here.
11166         (gimplify_target_expr): Likewise.
11168 2018-03-28  Martin Liska  <mliska@suse.cz>
11170         PR target/84988
11171         * config/i386/i386.c (ix86_function_arg_advance): Do not call
11172         chkp_type_bounds_count if MPX is not enabled.
11174 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11176         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
11178 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
11180         PR target/84914
11181         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
11182         function to create the function decl for complex long double
11183         multiply and divide for -mabi=ieeelongdouble.
11184         (init_float128_ieee): Call it.
11186 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
11188         PR target/85044
11189         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
11190         -fcf-protection=branch -mibt.
11191         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
11193 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11195         PR target/81863
11196         * config/arm/arm.c (arm_valid_symbolic_address): Handle
11197         arm_word_relocations.
11199 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
11201         PR target/85056
11202         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
11203         extern array declarations.
11205 2018-03-27  Richard Biener  <rguenther@suse.de>
11207         PR middle-end/84067
11208         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
11209         explicit single_use checks.
11211 2018-03-27  Richard Biener  <rguenther@suse.de>
11213         PR tree-optimization/85082
11214         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
11215         Valueize the VUSE.
11217 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11219         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
11220         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
11221         Turn on fasynchronous-unwind-tables and funwind-tables.
11223 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
11225         PR target/85073
11226         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
11227         (*bmi_blsr_<mode>_ccz): Ditto.
11229 2018-03-26  Tom de Vries  <tom@codesourcery.com>
11231         PR tree-optimization/85063
11232         * omp-general.c (offloading_function_p): New function.  Factor out
11233         of ...
11234         * omp-offload.c (pass_omp_target_link::gate): ... here.
11235         * omp-general.h (offloading_function_p): Declare.
11236         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
11237         with attribute omp declare target for offloading functions.
11239 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
11241         PR tree-optimization/84005
11242         * tree-data-ref.h (get_base_for_alignment): Declare.
11243         * tree-data-ref.c (get_base_for_alignment_1): New function.
11244         (get_base_for_alignment): Likewise.
11245         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
11246         get_base_for_alignment to find a suitable base object, instead
11247         of always using drb->base_address.
11249 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
11251         PR inline-asm/85022
11252         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
11253         known size by default.
11255 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
11257         PR inline-asm/85030
11258         * lra-constraints.c (process_alt_operands): Don't match BLKmode
11259         and non BLKmode operands.
11261 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11263         PR target/85026
11264         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
11265         Clean up attributes.
11267 2018-03-23  Richard Biener  <rguenther@suse.de>
11269         PR debug/85020
11270         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
11271         we are going to emit early debug for LTO.
11273 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
11275         PR inline-asm/85034
11276         * function.c (match_asm_constraints_1): Don't optimize if input
11277         doesn't satisfy general_operand predicate for output's mode.
11279         PR inline-asm/85022
11280         * alias.c (write_dependence_p): Don't require for x_canonicalized
11281         non-VOIDmode if x has VOIDmode.
11283         PR sanitizer/85029
11284         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
11285         just don't try to optimize it rather than assert it never happens.
11287 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11289         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
11290         macro expansions for definition of ST_INTERNAL_<mode> and
11291         LD_INTERNAL_<mode> builtins.
11292         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
11293         Remove prototype.
11294         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
11295         function.
11296         (altivec_expand_st_builtin): Likewise.
11297         (altivec_expand_builtin): Remove calls to deleted functions.
11298         (rs6000_address_for_altivec): Delete this function.
11299         * config/rs6000/vector.md: Remove expands for
11300         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
11302 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
11304         PR target/84826
11305         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
11306         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
11307         re-computing once computed.
11308         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
11309         (arm_init_machine_status): Initialize
11310         machine->static_chain_stack_bytes.
11312 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11314         PR target/84760
11315         * doc/extend.texi: Add four new prototypes for vec_ld.
11316         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
11317         definitions for more logical presentation.
11318         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
11319         entries for V1TI variants of __builtin_altivec_ld builtin.
11320         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
11321         handling of V1TI variant of LVX icode pattern.
11322         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
11323         (rs6000_gimple_fold_builtin): Likewise.
11324         (altivec_init_builtins): Add code to define
11325         __builtin_altivec_lvx_v1ti function.
11327 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
11329         PR inline-asm/84941
11330         * function.c (match_asm_constraints_1): Don't do the optimization
11331         if input isn't a REG, SUBREG, MEM or constant.
11333 2018-03-22  Tom de Vries  <tom@codesourcery.com>
11335         PR tree-optimization/84956
11336         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
11337         bb_has_abnormal_pred.
11339 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
11341         PR sanitizer/85018
11342         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
11343         DECL_INITIAL (decl) to decl at the end.
11344         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
11345         adjust the comment.
11347 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
11349         * doc/extend.texi (__builtin_tgmath): Document when complex
11350         integer types are treated as _Complex _Float64.
11352 2018-03-21  Tom de Vries  <tom@codesourcery.com>
11354         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
11356 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
11358         PR tree-optimization/84960
11359         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
11360         if it is ENTRY block, move them into single succ of ENTRY in that case.
11362 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
11364         PR tree-optimization/84811
11365         * poly-int.h (poly_span_traits): Remove the T3 parameter and
11366         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
11367         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
11368         (known_subrange_p): Update accordingly.  Cast each value involved
11369         in the size comparison, rather than casting the result of the
11370         subtraction.
11372 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
11374         PR tree-optimization/84982
11375         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
11376         by flipping the least significant bit rather than all bits from
11377         bitpos to bitpos + bitsize - 1.
11379 2018-03-21  Nathan Sidwell  <nathan@acm.org>
11381         * doc/extend.texi (Deprecated Features): Remove mention of
11382         long-deleted deprecations.
11384 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11386         PR jit/84288
11387         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
11388         * configure: Regenerate.
11390 2018-03-21  Tom de Vries  <tom@codesourcery.com>
11392         PR tree-optimization/83126
11393         * tree-parloops.c (num_phis): New function.
11394         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
11396 2018-03-21  Nathan Sidwell  <nathan@acm.org>
11398         * doc/extend.texi (Deprecated Features): Update deprecated flags,
11399         mention anon-struct/union members and trailing attributes.
11401 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
11403         PR tree-optimization/84969
11404         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
11405         builtin memset partitions if they set different rhs values.
11407 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
11409         PR rtl-optimization/84989
11410         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
11411         VEC_DUPLICATE with scalar result mode.
11413 2018-03-21  Martin Liska  <mliska@suse.cz>
11415         PR ipa/84963
11416         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
11417         not intended return statement.
11419 2018-03-21  Martin Liska  <mliska@suse.cz>
11421         PR target/84988
11422         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
11423         (chkp_find_bound_slots_1): Limit number of iterations.
11425 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
11427         PR target/84838
11428         * Minor grammar fixes for x86 options.
11430 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
11432         PR debug/84875
11433         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
11434         holding REG_CFA_RESTORE notes, instead turn them into a USE.
11436 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
11438         PR target/83789
11439         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
11440         (altivec_lvx_<mode>_1op): Likewise.
11441         (altivec_stvx_<mode>_2op): Likewise.
11442         (altivec_stvx_<mode>_1op): Likewise.
11443         (altivec_lvx_<VM2:mode>): New define_expand.
11444         (altivec_stvx_<VM2:mode>): Likewise.
11445         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
11446         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11447         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
11448         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11449         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
11450         (rs6000_gen_lvx): Likewise.
11451         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
11452         (altivec_expand_stv_builtin): Likewise.
11453         (altivec_expand_builtin): Likewise.
11454         * config/rs6000/vector.md: Likewise.
11456 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11458         PR target/82518
11459         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
11460         BYTES_BIG_ENDIAN.
11462 2018-03-20  Richard Biener  <rguenther@suse.de>
11464         PR target/84986
11465         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
11466         sign-conversions as zero, fall back to standard scalar_stmt
11467         cost for the rest.
11469 2018-03-20  Martin Liska  <mliska@suse.cz>
11471         PR ipa/84825
11472         * predict.c (rebuild_frequencies): Handle case when we have
11473         PROFILE_ABSENT, but flag_guess_branch_prob is false.
11475 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
11477         PR target/84990
11478         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
11479         flag_section_anchors.
11480         * varasm.c (use_blocks_for_decl_p): Remove hack for
11481         dw2_force_const_mem.
11483         PR target/84845
11484         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
11485         to ...
11486         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
11487         be created, use lowpart_subreg of operands[0] rather than operands[0]
11488         itself.
11489         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
11490         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
11491         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
11492         and n constraint instead of aarch64_shift_imm_di and Usd.
11493         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
11494         (*aarch64_<optab>_reg_minus<mode>3): ... this.
11496 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
11498         PR target/82989
11499         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
11500         to favor GPR over NEON registers.
11501         (<shift>di3_neon): Likewise.
11503 2018-03-20  Tom de Vries  <tom@codesourcery.com>
11505         PR target/84952
11506         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
11507         (nvptx_process_pars): Emit bar.sync asap and alap.
11509 2018-03-20  Tom de Vries  <tom@codesourcery.com>
11511         PR target/84954
11512         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
11513         seen_label if seen_label is already set.
11515 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
11517         PR target/84945
11518         * config/i386/i386.c (fold_builtin_cpu): For features above 31
11519         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
11520         Use 1U instead of 1.  Formatting fixes.
11522         PR c/84953
11523         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
11524         instead of TREE_TYPE (s1) for the return value.
11526 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
11528         PR tree-optimization/84946
11529         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
11530         bitsize + bitsize in poly_uint64 rather than poly_int64.
11532         PR sanitizer/78651
11533         * dwarf2asm.c: Include fold-const.c.
11534         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
11535         of decl rather than decl itself.
11537         PR rtl-optimization/84643
11538         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
11540 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
11542         PR sanitizer/78651
11543         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
11544         calling assemble_variable.
11546 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
11548         PR target/81647
11549         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
11550         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
11552 2018-03-19  Jim Wilson  <jimw@sifive.com>
11554         PR bootstrap/84856
11555         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
11556         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
11557         (riscv_first_stack_step): Likewise.
11558         (riscv_option_override): Use STACK_BOUNDARY instead of
11559         MIN_STACK_BOUNDARY.
11560         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
11561         MIN_STACK_BOUNDARY.
11562         (BIGGEST_ALIGNMENT): Set to 128.
11563         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
11564         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
11565         STACK_BOUNDARY.
11567 2018-03-19  Richard Biener  <rguenther@suse.de>
11569         PR tree-optimization/84933
11570         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
11571         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
11573 2018-03-19  Richard Biener  <rguenther@suse.de>
11575         PR tree-optimization/84859
11576         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
11577         (cond_if_else_store_replacement): Perform sinking operation on
11578         single-store BBs regardless of MAX_STORES_TO_SINK setting.
11579         Generalize what a BB with a single eligible store is.
11581 2018-03-19  Richard Biener  <rguenther@suse.de>
11583         PR tree-optimization/84929
11584         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
11585         chrec_is_positive against non-chrec arg.
11587 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
11589         PR target/84711
11590         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
11592 2018-03-18  Martin Liska  <mliska@suse.cz>
11594         PR rtl-optimization/84635
11595         * regrename.c (build_def_use): Use matches_mode only when
11596         matches >= 0.
11598 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
11600         PR tree-optimization/84913
11601         * tree-vect-loop.c (vectorizable_reduction): Don't try to
11602         vectorize chains of COND_EXPRs.
11604 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11606         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
11608 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11610         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
11612 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11614         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
11616 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
11617             Kito Cheng  <kito.cheng@gmail.com>
11619         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
11620         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
11621         (nds32_adjust_reg_alloc_order): New function.
11622         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
11624 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
11626         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
11627         nds32_print_operand, nds32_print_operand_address): Use
11628         HOST_WIDE_INT_PRINT_DEC instead.
11630 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
11632         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
11634 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
11636         PR target/84902
11637         * config/i386/i386.c (initial_ix86_tune_features,
11638         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
11639         unsigned long long.
11640         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
11641         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
11642         rather than 1u << ix86_tune.  Formatting fix.
11643         (ix86_option_override_internal): Change ix86_arch_mask from
11644         unsigned int to unsigned HOST_WIDE_INT, initialize to
11645         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
11646         (ix86_function_specific_restore): Likewise.
11648 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11650         PR target/84899
11651         * postreload.c (reload_combine_recognize_pattern): Perform
11652         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
11653         truncate_int_for_mode the result for the destination's mode.
11655         PR c/84909
11656         * hsa-gen.c (mem_type_for_type): Fix comment typo.
11657         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
11658         Likewise.
11659         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11660         Likewise.
11662 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
11664         PR target/84876
11665         * lra-assigns.c (lra_split_hard_reg_for): Don't use
11666         regno_allocno_class_array and sorted_pseudos.
11667         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
11668         insns where regno is used.
11670 2018-03-16  Martin Liska  <mliska@suse.cz>
11672         PR ipa/84833
11673         * multiple_target.c (create_dispatcher_calls): Redirect
11674         reference in the symbol table.
11676 2018-03-16  Martin Liska  <mliska@suse.cz>
11678         PR ipa/84722
11679         * multiple_target.c (create_dispatcher_calls): Redirect also
11680         an alias.
11682 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11684         PR c++/79937
11685         PR c++/82410
11686         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
11687         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
11688         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
11690 2018-03-16  Julia Koval  <julia.koval@intel.com>
11692         * doc/invoke.texi (Skylake Server): Add CLWB.
11693         Cannonlake): Remove CLWB.
11695 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11697         PR tree-optimization/84841
11698         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
11699         1 << 3.
11700         (FLOAT_ONE_CONST_TYPE): Define.
11701         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
11702         (sort_by_operand_rank): Put entries with higher constant_type last
11703         rather than first to match comments.
11705 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
11707         * config/nios2/nios2.md (movsi_internal): Fix thinko in
11708         split predicate.
11710 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
11712         PR c++/79085
11713         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
11714         check and use address of target always.
11716 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
11718         PR target/84574
11719         * config/i386/i386.c (indirect_thunk_needed): Update comments.
11720         (indirect_thunk_bnd_needed): Likewise.
11721         (indirect_thunks_used): Likewise.
11722         (indirect_thunks_bnd_used): Likewise.
11723         (indirect_return_needed): New.
11724         (indirect_return_bnd_needed): Likewise.
11725         (output_indirect_thunk_function): Add a bool argument for
11726         function return.
11727         (output_indirect_thunk_function): Don't generate alias for
11728         function return thunk.
11729         (ix86_code_end): Call output_indirect_thunk_function to generate
11730         function return thunks.
11731         (ix86_output_function_return): Set indirect_return_bnd_needed
11732         and indirect_return_needed instead of indirect_thunk_bnd_needed
11733         and indirect_thunk_needed.
11735 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
11737         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
11738         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
11739         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
11741 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
11742             Paul Hua <paul.hua.gm@gmail.com>
11744         PR c/84852
11745         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
11747 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
11749         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
11750         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
11751         resp. SFmode cases.
11753 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
11755         PR target/84711
11756         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11757         instead of GET_MODE_SIZE when comparing Units.
11759 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11761         PR target/68256
11762         * varasm.c (hash_section): Return an unchangeble hash value
11763         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
11764         Return !aarch64_can_use_per_function_literal_pools_p ().
11766 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
11768         PR target/84860
11769         * optabs.c (emit_conditional_move): Pass address of cmode's copy
11770         rather than address of cmode as last argument to prepare_cmp_insn.
11772 2018-03-15  Julia Koval  <julia.koval@intel.com>
11774         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
11775         F_AVX512VNNI, F_AVX512BITALG): New.
11777 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
11779         PR target/83451
11780         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
11781         insn for floating-point loads and stores.
11783 2018-03-14  Carl Love  <cel@us.ibm.com>
11785         * config/rs6000/rs6000-c.c: Add macro definitions for
11786         ALTIVEC_BUILTIN_VEC_PERMXOR.
11787         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
11788         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
11789         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
11790         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
11791         UNSPEC_VPERMXOR.
11792         * config/doc/extend.texi: Add prototypes for vec_permxor.
11794 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
11796         PR c/84852
11797         * diagnostic-show-locus.c (class layout_point): Convert m_line
11798         from int to linenum_type.
11799         (line_span::comparator): Use linenum "compare" function when
11800         comparing line numbers.
11801         (test_line_span): New function.
11802         (layout_range::contains_point): Convert param "row" from int to
11803         linenum_type.
11804         (layout_range::intersects_line_p): Likewise.
11805         (layout::will_show_line_p): Likewise.
11806         (layout::print_source_line): Likewise.
11807         (layout::should_print_annotation_line_p): Likewise.
11808         (layout::print_annotation_line): Likewise.
11809         (layout::print_leading_fixits): Likewise.
11810         (layout::annotation_line_showed_range_p): Likewise.
11811         (struct line_corrections): Likewise for field m_row.
11812         (line_corrections::line_corrections): Likewise for param "row".
11813         (layout::print_trailing_fixits): Likewise.
11814         (layout::get_state_at_point): Likewise.
11815         (layout::get_x_bound_for_row): Likewise.
11816         (layout::print_line): Likewise.
11817         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
11818         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
11819         * input.c (selftest::test_linenum_comparisons): New function.
11820         (selftest::input_c_tests): Call it.
11821         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
11822         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
11823         * selftest.h (ASSERT_GT): New macro.
11824         (ASSERT_GT_AT): New macro.
11825         (ASSERT_LT): New macro.
11826         (ASSERT_LT_AT): New macro.
11828 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
11830         PR rtl-optimization/84780
11831         * combine.c (distribute_links): Don't make a link based on pc_rtx.
11833 2018-03-14  Martin Liska  <mliska@suse.cz>
11835         * tree.c (record_node_allocation_statistics): Use
11836         get_stats_node_kind.
11837         (get_stats_node_kind): New function extracted from
11838         record_node_allocation_statistics.
11839         (free_node): Use get_stats_node_kind.
11841 2018-03-14  Richard Biener  <rguenther@suse.de>
11843         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
11844         that the value-set of ANTIC_IN doesn't grow.
11846         Revert
11847         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11848         member.
11849         (BB_VISITED_WITH_VISITED_SUCCS): New define.
11850         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11852 2018-03-14  Julia Koval  <julia.koval@intel.com>
11854         * config.gcc (icelake-client, icelake-server): New.
11855         (icelake): Remove.
11856         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
11857         (initial_ix86_arch_features): Ditto.
11858         (PTA_SKYLAKE): Add SGX.
11859         (PTA_ICELAKE): Remove.
11860         (PTA_ICELAKE_CLIENT): New.
11861         (PTA_ICELAKE_SERVER): New.
11862         (ix86_option_override_internal): Split up icelake on icelake client and
11863         icelake server.
11864         (get_builtin_code_for_version): Ditto.
11865         (fold_builtin_cpu): Ditto.
11866         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
11867         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
11868         * config/i386/i386.h (processor_type): Ditto.
11869         * doc/invoke.texi: Ditto.
11871 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
11873         PR sanitizer/83392
11874         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
11875         INTEGER_CST offset, add it together with bitpos / 8 and
11876         sign extend based on POINTER_SIZE.
11878         PR target/84844
11879         Revert
11880         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
11882         PR target/78090
11883         * config/i386/constraints.md (Yc): New register constraint.
11884         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
11885         Use Yc constraint for alternative 2 of operand 0.  Remove
11886         preferred_for_speed attribute.
11888 2018-03-14  Richard Biener  <rguenther@suse.de>
11890         PR tree-optimization/84830
11891         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
11892         with the old one to avoid oscillations.
11894 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
11896         PR target/83712
11897         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
11898         pseudos.
11899         (assign_by_spills): Return a flag of reload assignment failure.
11900         Do not process the reload assignment failures.  Do not spill other
11901         reload pseudos if they has the same reg class.  Update n if
11902         necessary.
11903         (lra_assign): Add a return arg.  Set up from the result of
11904         assign_by_spills call.
11905         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11906         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
11907         usage_insns if it is not NULL.
11908         (spill_hard_reg_in_range): New function.
11909         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11910         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11911         function prototypes.
11912         (lra_assign): Change prototype.
11913         * lra.c (lra): Add code to deal with fails by splitting hard reg
11914         live ranges.
11916 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
11918         * config/riscv/riscv.opt (mrelax): New option.
11919         * config/riscv/riscv.c (riscv_file_start): Emit ".option
11920         "norelax" when riscv_mrelax is disabled.
11921         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
11923 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
11925         PR target/84743
11926         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
11927         reassociation for int modes.
11929 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
11931         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
11932         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
11933         for big-endian.
11934         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
11935         * config/aarch64/aarch64-sve.md
11936         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
11937         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
11938         (*extend<mode><Vwide>2): Rename to...
11939         (aarch64_sve_extend<mode><Vwide>2): ...this.
11940         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
11941         renaming the old pattern to...
11942         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
11943         unsigned packs.
11944         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
11945         define_expand, renaming the old pattern to...
11946         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
11947         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
11948         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
11949         account when deciding which SVE instruction the optab should use.
11950         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
11952 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
11954         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
11955         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
11956         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
11957         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
11958         (tlsdesc_small_<mode>): Turn a define_expand and use
11959         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
11960         (tlsdesc_small_advsimd_<mode>): ...this.
11961         (tlsdesc_small_sve_<mode>): New pattern.
11963 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
11965         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
11966         (UNSPEC_UMUL_HIGHPART): New constants.
11967         (MUL_HIGHPART): New int iteraor.
11968         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
11969         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
11970         define_expand.
11971         (*<su>mul<mode>3_highpart): New define_insn.
11973 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
11975         PR lto/84805
11976         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11977         incomplete types.
11979 2018-03-13  Martin Liska  <mliska@suse.cz>
11981         PR ipa/84658.
11982         * (sem_item_optimizer::sem_item_optimizer): Initialize new
11983         vector.
11984         (sem_item_optimizer::~sem_item_optimizer): Release it.
11985         (sem_item_optimizer::merge_classes): Register variable aliases.
11986         (sem_item_optimizer::fixup_pt_set): New function.
11987         (sem_item_optimizer::fixup_points_to_sets): Likewise.
11988         * ipa-icf.h: Declare new variables and functions.
11990 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
11992         PR middle-end/84834
11993         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
11994         integer_pow2p@2 and test integer_pow2p in condition.
11995         (A < 0 ? C : 0): Similarly for @1.
11997         PR middle-end/84831
11998         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
11999         characters starting at p contain '\0' character, don't look beyond
12000         that.
12002         PR target/84827
12003         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
12004         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
12006         PR target/84828
12007         * reg-stack.c (change_stack): Change update_end var from int to
12008         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
12009         also call set_block_for_insn on the newly added insns and rescan.
12011         PR target/84786
12012         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
12013         on the last operand.
12015         PR c++/84704
12016         * tree.c (stabilize_reference_1): Return save_expr (e) for
12017         STATEMENT_LIST even if it doesn't have side-effects.
12019 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
12021         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
12023 2018-03-12  Renlin Li  <renlin.li@arm.com>
12025         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
12026         aarch64_output_scalar_simd_mov_immediate.
12028 2018-03-12  Martin Sebor  <msebor@redhat.com>
12030         PR tree-optimization/83456
12031         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
12032         for perfectly overlapping calls to memcpy.
12033         (gimple_fold_builtin_memory_chk): Same.
12034         (gimple_fold_builtin_strcpy): Handle no-warning.
12035         (gimple_fold_builtin_stxcpy_chk): Same.
12036         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
12038 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
12040         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
12041         parameter.  Use it for SFmode.
12042         (rs6000_function_arg_advance_1): Adjust.
12043         (rs6000_function_arg): Adjust.
12044         (rs6000_gimplify_va_arg): Pass false for that new parameter.
12046 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
12048         PR rtl-optimization/84169
12049         PR rtl-optimization/84780
12050         * combine.c (can_combine_p): Check for a 2-insn combination whether
12051         the destination register is used between the two insns, too.
12053 2018-03-12  Richard Biener  <rguenther@suse.de>
12055         PR tree-optimization/84803
12056         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
12057         for refs DR analysis didn't process.
12059 2018-03-12  Richard Biener  <rguenther@suse.de>
12061         PR tree-optimization/84777
12062         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
12063         force-vectorize loops ignore whether we are optimizing for size.
12065 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
12067         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
12068         (TARGET_MD_ASM_ADJUST): Define.
12070 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
12071             Kito Cheng  <kito.cheng@gmail.com>
12072             Chung-Ju Wu  <jasonwucj@gmail.com>
12074         * config/nds32/nds32.c (nds32_compute_stack_frame,
12075         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
12076         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
12077         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
12078         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
12079         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
12080         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
12081         * config/nds32/nds32.md (prologue, epilogue): Use macro
12082         NDS32_V3PUSH_AVAILABLE_P to do checking.
12084 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
12086         PR debug/58150
12087         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
12088         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
12089         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
12090         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
12091         addition of most attributes on !orig_type_die or the attribute not
12092         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
12094 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12095             Chung-Ju Wu  <jasonwucj@gmail.com>
12097         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
12098         __NDS32_VH__ macro.
12099         * config/nds32/nds32.opt (mvh): New option.
12101 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12102             Chung-Ju Wu  <jasonwucj@gmail.com>
12104         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
12105         function.
12106         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
12107         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
12108         definition.
12110 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12111             Chung-Ju Wu  <jasonwucj@gmail.com>
12113         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
12114         function.
12115         * config/nds32/nds32-multiple.md (strlensi): New pattern.
12116         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
12118 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
12119             Kito Cheng  <kito.cheng@gmail.com>
12120             Chung-Ju Wu  <jasonwucj@gmail.com>
12122         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
12123         UNSPEC_FFMISM and UNSPEC_FLMISM.
12124         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
12125         for ffb, ffmism and flmism.
12126         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
12127         (unspec_ffmism): Ditto.
12128         (unspec_flmism): Ditto.
12129         (nds32_expand_builtin_impl): Check if string extension is available.
12130         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12131         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12133 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
12135         Reverting patch:
12136         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
12138         PR target/83712
12139         * lra-assigns.c (assign_by_spills): Return a flag of reload
12140         assignment failure.  Do not process the reload assignment
12141         failures.  Do not spill other reload pseudos if they has the same
12142         reg class.
12143         (lra_assign): Add a return arg.  Set up from the result of
12144         assign_by_spills call.
12145         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12146         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12147         usage_insns if it is not NULL.
12148         (spill_hard_reg_in_range): New function.
12149         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12150         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12151         function prototypes.
12152         (lra_assign): Change prototype.
12153         * lra.c (lra): Add code to deal with fails by splitting hard reg
12154         live ranges.
12156 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
12158         PR target/84807
12159         * config/i386/i386.opt: Replace Enforcment with Enforcement.
12161 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
12163         PR debug/84620
12164         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
12165         (dw_val_node): Add val_symbolic_view.
12166         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
12167         (symview_upper_bound): New.
12168         (new_line_info_table): Initialize symviews_since_reset.
12169         (dwarf2out_source_line): Count symviews_since_reset and set
12170         symview_upper_bound.
12171         (dw_val_equal_p): Handle symview.
12172         (add_AT_symview): New.
12173         (print_dw_val): Handle symview.
12174         (attr_checksum, attr_checksum_ordered): Likewise.
12175         (same_dw_val_p, size_of_die): Likewise.
12176         (value_format, output_die): Likewise.
12177         (add_high_low_attributes): Use add_AT_symview for entry_view.
12178         (dwarf2out_finish): Reset symview_upper_bound, clear
12179         zero_view_p.
12181 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
12183         PR target/83969
12184         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
12185         Add strict argument and use it.
12186         (rs6000_split_multireg_move): Update for new strict argument.
12187         (mem_operand_gpr): Disallow all non-offsettable addresses.
12188         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
12190 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
12192         PR target/84772
12193         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
12194         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
12195         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
12197         PR c++/84767
12198         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
12199         decl, use remap_type if we want to use the type.
12201 2018-03-09  Martin Sebor  <msebor@redhat.com>
12203         PR tree-optimization/84526
12204         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12205         Remove dead code.
12206         (builtin_access::generic_overlap): Be prepared to handle non-array
12207         base objects.
12209 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
12211         PR rtl-optimization/84682
12212         * lra-constraints.c (process_address_1): Check is_address flag
12213         for address constraints.
12214         (process_alt_operands): Likewise.
12215         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
12216         preprocess_constraints.
12217         * recog.h (preprocess_constraints): Add oploc parameter.
12218         Adjust callers.
12219         * recog.c (preprocess_constraints): Test address_operand for
12220         CT_ADDRESS constraints.
12222 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
12224         PR target/83712
12225         * lra-assigns.c (assign_by_spills): Return a flag of reload
12226         assignment failure.  Do not process the reload assignment
12227         failures.  Do not spill other reload pseudos if they has the same
12228         reg class.
12229         (lra_assign): Add a return arg.  Set up from the result of
12230         assign_by_spills call.
12231         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12232         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12233         usage_insns if it is not NULL.
12234         (spill_hard_reg_in_range): New function.
12235         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12236         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12237         function prototypes.
12238         (lra_assign): Change prototype.
12239         * lra.c (lra): Add code to deal with fails by splitting hard reg
12240         live ranges.
12242 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12244         PR target/83193
12245         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
12246         Accept complain bool parameter.  Only emit errors if it is true.
12247         (arm_parse_cpu_option_name): Likewise.
12248         (arm_target_thumb_only): Adjust callers of the above.
12249         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
12250         prototype to take a default true bool parameter.
12251         (arm_parse_arch_option_name): Likewise.
12253 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
12254             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
12256         PR jit/64089
12257         PR jit/84288
12258         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
12259         * configure: Regenerate.
12260         * configure.ac ("linker --version-script option"): New.
12261         ("linker soname option"): New.
12263 2018-03-09  Richard Biener  <rguenther@suse.de>
12265         PR tree-optimization/84775
12266         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
12267         immediate uses of predicate stmts and mark them modified.
12269         Revert
12270         PR tree-optimization/84178
12271         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12272         to caller.
12273         (version_loop_for_if_conversion): Delay update_ssa call.
12274         (tree_if_conversion): Delay update_ssa until after predicate
12275         insertion.
12277 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
12279         PR target/84763
12280         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
12281         when the function accesses prior frames.
12283 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
12285         PR debug/84456
12286         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
12287         gen_llsym, otherwise call maybe_gen_llsym.
12289         PR inline-asm/84742
12290         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
12291         has ',' character inside of it.
12293 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12295         PR target/84748
12296         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
12297         as clobbering CC_REGNUM.
12299 2018-03-08  Richard Biener  <rguenther@suse.de>
12301         PR middle-end/84552
12302         * tree-scalar-evolution.c: Include tree-into-ssa.h.
12303         (follow_copies_to_constant): Do not follow SSA names registered
12304         for update.
12306 2018-03-08  Richard Biener  <rguenther@suse.de>
12308         PR tree-optimization/84178
12309         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12310         to caller.
12311         (version_loop_for_if_conversion): Delay update_ssa call.
12312         (tree_if_conversion): Delay update_ssa until after predicate
12313         insertion.
12315 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
12317         PR tree-optimization/84178
12318         * tree-if-conv.c (release_bb_predicate): Remove the
12319         the assertion that the stmts have NULL use_ops.
12320         Discard the statements, asserting that they haven't
12321         yet been added to a BB.
12323 2018-03-08  Richard Biener  <rguenther@suse.de>
12325         PR tree-optimization/84746
12326         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
12327         (phi_translate): Pass in destination ANTIC_OUT set.
12328         (phi_translate_1): Likewise.  For a simplified result lookup
12329         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
12330         (phi_translate_set): Adjust.
12331         (do_pre_regular_insertion): Likewise.
12332         (do_pre_partial_partial_insertion): Likewise.
12334 2018-03-08  Martin Liska  <mliska@suse.cz>
12336         PR gcov-profile/84735
12337         * doc/gcov.texi: Document usage of profile files.
12338         * gcov-io.h: Document changes in the format.
12340 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
12342         PR debug/84404
12343         PR debug/84408
12344         * dwarf2out.c (struct dw_line_info_table): Update comments for
12345         view == -1.
12346         (FORCE_RESET_NEXT_VIEW): New.
12347         (FORCE_RESETTING_VIEW_P): New.
12348         (RESETTING_VIEW_P): Check for -1 too.
12349         (ZERO_VIEW_P): Likewise.
12350         (new_line_info_table): Force-reset next view.
12351         (dwarf2out_begin_function): Likewise.
12352         (dwarf2out_source_line): Simplify zero_view_p initialization.
12353         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
12354         view directly.  Omit view when omitting .loc at line 0.
12356 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
12358         PR tree-optimization/84740
12359         * tree-switch-conversion.c (process_switch): Call build_constructors
12360         only if info.phi_count is non-zero.
12362         PR tree-optimization/84739
12363         * tree-tailcall.c (find_tail_calls): Check call arguments against
12364         DECL_ARGUMENTS (current_function_decl) rather than
12365         DECL_ARGUMENTS (func) when checking for tail recursion.
12367 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
12369         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
12370         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
12371         Volker Reichelt's entry and add entries for people that perform
12372         GCC fuzzy testing and report numerous bugs.
12374 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
12376         PR target/82411
12377         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
12378         readonly data in sdata, if that is disabled.
12379         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
12380         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
12381         -mreadonly-in-sdata option.
12383 2018-03-07  Martin Sebor  <msebor@redhat.com>
12385         PR tree-optimization/84468
12386         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
12387         basic block when looking for nul assignment.
12389 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
12391         PR target/84277
12392         * except.h (output_function_exception_table): Adjust prototype.
12393         * except.c (output_function_exception_table): Remove FNNAME parameter
12394         and add SECTION parameter.  Ouput one part of the table at a time.
12395         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
12396         the first part of the exception table and emit unwind directives.
12397         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
12398         (i386_pe_seh_cold_init): Likewise.
12399         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
12400         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
12401         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
12402         (ix86_output_call_insn): Emit a nop in one more case for SEH.
12403         * config/i386/winnt.c: Include except.h.
12404         (struct seh_frame_state): Add reg_offset, after_prologue and
12405         in_cold_section fields.
12406         (i386_pe_seh_end_prologue): Set seh->after_prologue.
12407         (i386_pe_seh_cold_init): New function.
12408         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
12409         to seh->in_cold_section.
12410         (seh_emit_push): Record the offset of the push.
12411         (seh_emit_save): Record the offet of the save.
12412         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
12413         Test seh->after_prologue to disregard the epilogue.
12414         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
12415         (i386_pe_end_cold_function): New function.
12417 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
12419         PR fortran/84565
12420         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
12421         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
12423         PR c++/84704
12424         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
12425         on tmp_var.
12426         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
12427         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
12429         PR middle-end/84723
12430         * multiple_target.c: Include tree-inline.h and intl.h.
12431         (expand_target_clones): Diagnose and fail if node->definition and
12432         !tree_versionable_function_p (node->decl).
12434 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
12436         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
12437         sprint_ul.
12438         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
12439         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
12440         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
12442 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
12444         PR target/84710
12445         * combine.c (try_combine): Use reg_or_subregno instead of handling
12446         just paradoxical SUBREGs and REGs.
12448 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
12450         * config/arc/arc.c (arc_finalize_pic): Remove function.
12451         (arc_must_save_register): We use single base PIC register, remove
12452         checks to save/restore the PIC register.
12453         (arc_expand_prologue): Likewise.
12454         * config/arc/arc-protos.h (arc_set_default_type_attributes):
12455         Remove.
12456         (arc_verify_short): Likewise.
12457         (arc_attr_type): Likewise.
12458         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
12459         (walk_stores): Likewise.
12460         (arc_address_cost): Make it static.
12461         (arc_verify_short): Likewise.
12462         (branch_dest): Likewise.
12463         (arc_attr_type): Likewise.
12464         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
12465         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
12466         (arc_final_prescan_insn): Remove inserting the nops due to
12467         hardware hazards.  It is done in reorg step.
12468         (insn_length_variant_t): Remove.
12469         (insn_length_parameters_t): Likewise.
12470         (arc_insn_length_parameters): Likewise.
12471         (arc_get_insn_variants): Likewise.
12472         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
12474 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
12476         PR inline-asm/84683
12477         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
12478         assertion failure.
12480         PR tree-optimization/84687
12481         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
12482         on new_node->decl.
12483         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
12485 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12487         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
12488         Rename to ppc_speculation_barrier.
12489         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
12490         __builtin_ppc_speculation_barrier.
12492 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
12494         PR target/84700
12495         * combine.c (combine_simplify_rtx): Don't try to simplify if
12496         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
12497         are equal to x.
12499 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
12501         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
12502         to 32 bytes when compiling for POWER9.
12504 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
12506         PR target/84564
12507         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
12508         regparm >= 3 with no arg reg available also for calls with
12509         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
12511         PR target/84524
12512         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
12513         orig,vex.
12514         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
12516 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
12518         PR target/84264
12519         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
12521 2018-03-05  Richard Biener  <rguenther@suse.de>
12523         PR tree-optimization/84486
12524         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
12525         When inserting a __builtin_assume_aligned call set the LHS
12526         SSA name alignment info accordingly.
12528 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
12530         PR tree-optimization/84114
12531         * config/aarch64/aarch64.c (aarch64_reassociation_width)
12532         Avoid reassociation of FLOAT_MODE addition.
12534 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
12536         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
12537         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
12538         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
12539         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
12540         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
12541         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
12542         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
12543         and -mwbnoinvd.
12544         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
12545         __builtin_ia32_wbinvd): New builtins.
12546         (SPECIAL_ARGS2): New.
12547         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
12548         (SPECIAL_ARGS2): New.
12549         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
12550         (ix86_valid_target_attribute_inner_p): Ditto.
12551         (ix86_init_mmx_sse_builtins): Add special_args2.
12552         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
12553         TARGET_WBNOINVD_P): New.
12554         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
12555         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
12556         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
12557         * config/i386/immintrin.h (_wbinvd): New intrinsic.
12558         * config/i386/pconfigintrin.h: New file.
12559         * config/i386/wbnoinvdintrin.h: Ditto.
12560         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
12561         wbnoinvdintrin.h.
12562         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
12564 2018-03-05  Richard Biener  <rguenther@suse.de>
12566         PR tree-optimization/84670
12567         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12568         member.
12569         (BB_VISITED_WITH_VISITED_SUCCS): New define.
12570         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12571         (compute_antic_aux): Only assert the number of values in ANTIC_IN
12572         doesn't grow if all successors (recursively) were visited at least
12573         once.
12575 2018-03-05  Richard Biener  <rguenther@suse.de>
12577         PR tree-optimization/84650
12578         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
12579         if executed in the loop pipeline.
12581 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
12583         * doc/configfiles.texi (Configuration Files): Move info about
12584         conditionalizing $target-protos.h to...
12585         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
12586         differs from $target-protos.h.
12588 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
12589             Chung-Ju Wu  <jasonwucj@gmail.com>
12591         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
12592         * config/nds32/nds32-multiple.md (setmemsi): Define.
12593         * config/nds32/nds32-memory-manipulation.c
12594         (nds32_gen_dup_4_byte_to_word_value): New.
12595         (emit_setmem_word_loop): New.
12596         (emit_setmem_byte_loop): New.
12597         (nds32_expand_setmem_loop): New.
12598         (nds32_expand_setmem_loop_v3m): New.
12599         (nds32_expand_setmem_unroll): New.
12600         (nds32_expand_setmem): New.
12602 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12603             Chung-Ju Wu  <jasonwucj@gmail.com>
12605         * config/nds32/nds32-memory-manipulation.c
12606         (nds32_emit_load_store): New.
12607         (nds32_emit_post_inc_load_store): New.
12608         (nds32_emit_mem_move): New.
12609         (nds32_emit_mem_move_block): New.
12610         (nds32_expand_movmemsi_loop_unknown_size): New.
12611         (nds32_expand_movmemsi_loop_known_size): New.
12612         (nds32_expand_movmemsi_loop): New.
12613         (nds32_expand_movmemsi_unroll): New.
12614         (nds32_expand_movmemqi): Rename ...
12615         (nds32_expand_movmemsi): ... to this.
12616         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
12617         (movmemsi): ... to this.
12618         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
12619         (nds32_expand_movmemsi): ... to this.
12621 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12622             Monk Chiang  <sh.chiang04@gmail.com>
12623             Chung-Ju Wu  <jasonwucj@gmail.com>
12625         * config/nds32/nds32-protos.h
12626         (nds32_expand_load_multiple): New arguments.
12627         (nds32_expand_store_multiple): Ditto.
12628         (nds32_valid_multiple_load_store): Rename ...
12629         (nds32_valid_multiple_load_store_p): ... to this.
12630         * config/nds32/nds32-memory-manipulation.c
12631         (nds32_expand_load_multiple): Refine implementation.
12632         (nds32_expand_store_multiple): Ditto.
12633         * config/nds32/nds32-multiple.md
12634         (load_multiple): Update nds32_expand_load_multiple interface.
12635         (store_multiple): Update nds32_expand_store_multiple interface.
12636         * config/nds32/nds32-predicates.c
12637         (nds32_valid_multiple_load_store): Rename ...
12638         (nds32_valid_multiple_load_store_p): ... to this and refine
12639         implementation.
12640         * config/nds32/predicates.md
12641         (nds32_load_multiple_and_update_address_operation): New predicate.
12642         (nds32_store_multiple_and_update_address_operation): New predicate.
12644 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12645             Chung-Ju Wu  <jasonwucj@gmail.com>
12647         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
12648         (combo): New attribute.
12649         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
12651 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12653         * config/nds32/nds32.opt: Change -mcmodel= default value.
12655 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
12656             Monk Chiang  <sh.chiang04@gmail.com>
12657             Chung-Ju Wu  <jasonwucj@gmail.com>
12659         * config/nds32/constants.md (unspec_element): New enum.
12660         * config/nds32/constraints.md (Umw): New constraint.
12661         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
12662         * config/nds32/nds32-intrinsic.md: Likewise.
12663         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
12664         (nds32_valid_smw_lwm_base_p): New.
12665         (nds32_output_smw_single_word): New.
12666         (nds32_output_lmw_single_word): New.
12667         (nds32_expand_unaligned_load): New.
12668         (nds32_expand_unaligned_store): New.
12669         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
12670         (nds32_output_smw_single_word): Declare.
12671         (nds32_output_lmw_single_word): Declare.
12672         (nds32_expand_unaligned_load): Declare.
12673         (nds32_expand_unaligned_store): Declare.
12674         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
12675         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
12676         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
12677         NDS32_BUILTIN_UASTORE_DW.
12678         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
12679         predicate.
12681 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
12682             Kito Cheng  <kito.cheng@gmail.com>
12683             Chung-Ju Wu  <jasonwucj@gmail.com>
12685         * config/nds32/nds32-intrinsic.c
12686         (nds32_expand_builtin_null_ftype_reg): Delete.
12687         (nds32_expand_builtin_reg_ftype_imm): Ditto.
12688         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
12689         (nds32_read_argument): New.
12690         (nds32_legitimize_target): Ditto.
12691         (nds32_legitimize_argument): Ditto.
12692         (nds32_check_constant_argument): Ditto.
12693         (nds32_expand_unop_builtin): Ditto.
12694         (nds32_expand_unopimm_builtin): Ditto.
12695         (nds32_expand_binop_builtin): Ditto.
12696         (nds32_builtin_decl_impl): Ditto.
12697         (builtin_description): Ditto.
12698         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
12699         (nds32_init_builtins_impl): Ditto.
12700         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
12701         (nds32_builtin_decl): New.
12702         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
12703         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
12705 2018-03-02  Jeff Law  <law@redhat.com>
12707         * reorg.c (stop_search_p): Handle DEBUG_INSN.
12708         (redundant_insn, fill_simple_delay_slots): Likewise.
12709         (fill_slots_from_thread): Likewise.
12710         * resource.c (mark_referenced_resources): Likewise.
12711         (mark_set_resources, find_dead_or_set_registers): Likewise.
12713 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12715         * substring-locations.h (format_warning_va): Formatting fix for
12716         ATTRIBUTE_GCC_DIAG.
12717         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
12718         argument.
12719         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
12720         * substring-locations.c: Include intl.h.
12721         (format_warning_va): Turned into small wrapper around
12722         format_warning_n_va, renamed to ...
12723         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
12724         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
12725         use ngettext.
12726         (format_warning_at_substring_n): New function.
12727         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
12728         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
12729         format_warning_at_substring with just a shorter name instead of
12730         const function pointer.
12731         (fmtwarn_n): New function.
12732         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
12733         appropriate, get rid of all the fmtstr temporaries, move conditionals
12734         with G_() wrapped string literals directly into fmtwarn arguments,
12735         cast dir.len to (int), formatting fixes.
12737 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
12739         * doc/invoke.texi: Remove "Cilk Plus" references.
12741 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12742             Richard Biener  <rguenther@suse.de>
12744         PR ipa/84628
12745         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
12746         for error or warning attributes if CALL_FROM_THUNK_P is set.
12747         Formatting fixes.
12749 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12751         PR target/56540
12752         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
12753         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
12755         PR target/56540
12756         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
12757         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
12759         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
12760         instead of -1U in last predictors element's probability member.
12762 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12764         PR ipa/83983
12765         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12766         arguments if they are comparable.
12768 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
12770         PR tree-optimization/84634
12771         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
12772         masks and masked_loop_p with a single loop_masks, making sure it's
12773         null for bb vectorization.
12775 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
12777         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12778         (vect_analyze_data_ref_access): Use loop->safe_len rather than
12779         loop->force_vectorize to check whether there is no alias.
12781 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12783         PR target/84614
12784         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
12785         prototypes.
12786         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
12787         comments.
12788         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
12789         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
12790         instead of a loop around prev_real_insn.
12791         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
12792         prev_real_insn.
12794         PR inline-asm/84625
12795         * config/i386/i386.c (ix86_print_operand): Use conditional
12796         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
12797         zero vector.
12799 2018-03-02  Richard Biener  <rguenther@suse.de>
12801         PR tree-optimization/84427
12802         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
12803         (bitmap_set_subtract_values): Rewrite to handle multiple
12804         exprs per value.
12805         (clean): Likewise.
12806         (prune_clobbered_mems): Likewise.
12807         (phi_translate): Take edge instead of pred/phiblock.
12808         (phi_translate_1): Likewise.
12809         (phi_translate_set): Likewise.  Insert all translated
12810         exprs for a value into the set, keeping possibly multiple
12811         expressions per value.
12812         (compute_antic_aux): Adjust for phi_translate changes.
12813         When intersecting union the expressions and prune those
12814         not in the final value set, keeping possibly multiple
12815         expressions per value.  Do not use value-insertion
12816         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
12817         all expressions.  Add verification that the value-sets
12818         only shrink during iteration.
12819         (compute_partial_antic_aux): Adjust for the phi_translate changes.
12820         (do_pre_regular_insertion): Likewise.
12821         (do_pre_partial_partial_insertion): Likewise.
12823 2018-03-02  Richard Biener  <rguenther@suse.de>
12825         PR target/82005
12826         * config/darwin.c (saved_debug_info_level): New static global.
12827         (darwin_asm_lto_start): Disable debug info generation for LTO out.
12828         (darwin_asm_lto_end): Restore debug info generation settings.
12830 2018-03-01  Martin Liska  <mliska@suse.cz>
12832         PR sanitizer/82484
12833         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
12834         volatile arguments.
12836 2018-03-01  Richard Biener  <rguenther@suse.de>
12838         PR debug/84645
12839         * dwarf2out.c (gen_variable_die): Properly handle late VLA
12840         type annotation with LTO when debug was disabled at compile-time.
12842 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
12844         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
12845         XINT with INTVAL.
12846         (mips_final_postscan_insn): Likewise.
12848 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
12850         PR rtl-optimization/84528
12851         * alias.c (init_alias_target): Add commentary.
12852         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
12853         a unique base value if the frame pointer is not eliminated
12854         to the stack pointer.
12856 2018-03-01  Tom de Vries  <tom@codesourcery.com>
12858         PR rtl-optimization/83327
12859         * lra-int.h (hard_regs_spilled_into): Declare.
12860         * lra.c (hard_regs_spilled_into): Define.
12861         (init_reg_info): Init hard_regs_spilled_into.
12862         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
12863         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
12864         (process_bb_lives): Handle hard_regs_spilled_into.
12865         (lra_create_live_ranges_1): Before doing liveness propagation, clear
12866         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
12868 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
12870         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
12871         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
12872         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
12873         * config/rs6000/aix72.h: New file.
12875 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
12877         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
12878         instead of warning_at with conditional singular and plural messages
12879         where possible.
12881         PR target/52991
12882         * stor-layout.c (update_alignment_for_field): For
12883         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
12884         && !DECL_PACKED (field), do the alignment update, just use
12885         only desired_align instead of MAX (type_align, desired_align)
12886         as the alignment.
12887         (place_field): Don't do known_align < desired_align handling
12888         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
12889         is non-NULL, instead do it after rli->prev_field handling and
12890         only if not within a bitfield word.  For DECL_PACKED (field)
12891         use type_align of BITS_PER_UNIT.
12893 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
12895         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
12896         superfluous parentheses and trailing spaces.
12898 2018-02-28  Richard Biener  <rguenther@suse.de>
12900         PR tree-optimization/84584
12901         * graphite-scop-detection.c (scop_detection::add_scop): Discard
12902         SCoPs with fake exit edge.
12904 2018-02-28  Martin Liska  <mliska@suse.cz>
12906         PR testsuite/84597
12907         * timevar.c (timer::print): Fix format to properly print 100%
12908         values.
12910 2018-02-28  Richard Biener  <rguenther@suse.de>
12912         PR middle-end/84607
12913         * genmatch.c (capture_info::walk_match): Do not mark
12914         captured expressions without operands as expr_p given
12915         they act more like predicates and should be subject to
12916         "lost tail" side-effect preserving.
12918 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
12920         PR rtl-optimization/81611
12921         * auto-inc-dec.c (attempt_change): Move dead note from
12922         mem_insn if it's the next use of regno
12923         (find_address): Take address use of reg holding
12924         non-incremented value.  Add parm to limit search to the named
12925         reg only.
12926         (merge_in_block): Attempt to use a mem insn that is the next
12927         use of the original regno.
12929 2018-02-27  Martin Sebor  <msebor@redhat.com>
12931         PR c++/83871
12932         * doc/invoke.texi (-Wmissing-attributes): New option.
12933         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
12935 2018-02-27  Martin Sebor  <msebor@redhat.com>
12937         PR translation/84207
12938         * diagnostic-core.h (warning_n, error_n, inform_n): Change
12939         n argument to unsigned HOST_WIDE_INT.
12940         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
12941         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
12942         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
12943         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
12945 2018-02-27  Richard Biener  <rguenther@suse.de>
12947         PR tree-optimization/84512
12948         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
12949         Do not use the estimate returned from record_stmt_cost for
12950         the scalar iteration cost but sum properly using add_stmt_cost.
12952 2018-02-27  Richard Biener  <rguenther@suse.de>
12954         PR tree-optimization/84466
12955         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12956         Adjust last change to less strictly validate use operands.
12958 2018-02-27  Martin Liska  <mliska@suse.cz>
12960         PR gcov-profile/84548
12961         * gcov.c (process_file): Allow partial overlap and consider it
12962         also as group functions.
12963         (output_lines): Properly calculate range of lines for a group.
12965 2018-02-27  Martin Liska  <mliska@suse.cz>
12967         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
12968         'ggc' suffixes.  Change first column width.
12969         (timer::print): Fix formatting of the column.
12971 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
12973         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
12974         preserve inline entry blocks for the sake of debug inline
12975         entry point markers alone.
12976         (remove_unused_locals): Suggest in comments a better place to
12977         force the preservation of inline entry blocks that are
12978         otherwise unused, but do not preserve them.
12980 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
12982         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
12984 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
12986         PR target/84039
12987         * config/i386/constraints.md (Bs): Replace
12988         ix86_indirect_branch_register with
12989         TARGET_INDIRECT_BRANCH_REGISTER.
12990         (Bw): Likewise.
12991         * config/i386/i386.md (indirect_jump): Likewise.
12992         (tablejump): Likewise.
12993         (*sibcall_memory): Likewise.
12994         (*sibcall_value_memory): Likewise.
12995         Peepholes of indirect call and jump via memory: Likewise.
12996         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
12997         (*sibcall_value_GOT_32): Likewise.
12998         * config/i386/predicates.md (indirect_branch_operand): Likewise.
12999         (GOT_memory_operand): Likewise.
13000         (call_insn_operand): Likewise.
13001         (sibcall_insn_operand): Likewise.
13002         (GOT32_symbol_operand): Likewise.
13003         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
13005 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
13007         PR rtl-optimization/83496
13008         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
13009         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
13010         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
13011         redundant insn, if any.
13012         (relax_delay_slots): Likewise.
13013         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
13015 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
13017         PR tree-optimization/83965
13018         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
13019         that grouped statements are part of a reduction chain.  Return
13020         true if the statement is not marked as a reduction itself but
13021         is part of a group.
13022         (vect_recog_dot_prod_pattern): Don't check whether the statement
13023         is part of a group here.
13024         (vect_recog_sad_pattern): Likewise.
13025         (vect_recog_widen_sum_pattern): Likewise.
13027 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
13029         PR debug/84545
13030         * final.c (rest_of_clean_state): Also look for calls inside sequences.
13032 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
13034         PR target/84530
13035         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
13036         the bool argument.
13037         (ix86_output_indirect_function_return): New prototype.
13038         (ix86_split_simple_return_pop_internal): Likewise.
13039         * config/i386/i386.c (indirect_return_via_cx): New.
13040         (indirect_return_via_cx_bnd): Likewise.
13041         (indirect_thunk_name): Handle return va CX_REG.
13042         (output_indirect_thunk_function): Create alias for
13043         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
13044         (ix86_output_indirect_jmp): Remove the bool argument.
13045         (ix86_output_indirect_function_return): New function.
13046         (ix86_split_simple_return_pop_internal): Likewise.
13047         * config/i386/i386.md (*indirect_jump): Don't pass false
13048         to ix86_output_indirect_jmp.
13049         (*tablejump_1): Likewise.
13050         (simple_return_pop_internal): Change it to define_insn_and_split.
13051         Call ix86_split_simple_return_pop_internal to split it for
13052         -mfunction-return=.
13053         (simple_return_indirect_internal): Call
13054         ix86_output_indirect_function_return instead of
13055         ix86_output_indirect_jmp.
13057 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
13059         PR bootstrap/84405
13060         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
13061         memset and value initialization afterwards.
13063 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
13065         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
13067 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13069         PR target/84521
13070         * common/config/aarch64/aarch64-common.c
13071         (aarch_option_optimization_table[]): Switch
13072         off fomit-frame-pointer
13074 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
13075             Chung-Ju Wu  <jasonwucj@gmail.com>
13077         * config/nds32/nds32-multiple.md (load_multiple): Disallow
13078         volatile memory.
13079         (store_multiple): Ditto.
13081 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
13083         * config.gcc: Add --with-cpu support for nds32 target.
13084         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
13085         * config/nds32/nds32.opt: Add -mcpu= option.
13087 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
13089         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
13090         isel=yes): Warn for these deprecated options.
13092 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
13094         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
13095         ISA_2_5_MASKS_EMBEDDED.
13097 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
13099         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
13100         p->max as pointers rather than using iterative_hash_expr.
13102 2018-02-23  Carl Love  <cel@us.ibm.com>
13104         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
13105         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
13106         BU_P8V_OVERLOAD_2.
13107         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
13108         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
13109         P8V_BUILTIN_VEC_VUNSIGNED2.
13111 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
13113         PR target/81572
13114         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
13115         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
13116         LRA_UNKNOWN_ALT.
13117         * lra-constraints.c (curr_insn_transform): Set up
13118         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
13119         LRA_UNKNOWN_ALT.
13120         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
13121         * lra-eliminations.c (spill_pseudos): Ditto.
13122         (process_insn_for_elimination): Ditto.
13123         * lra-lives.c (reg_early_clobber_p): Use the new macros.
13124         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
13125         LRA_NON_CLOBBERED_ALT.
13127 2018-02-22  Martin Sebor  <msebor@redhat.com>
13129         PR tree-optimization/84480
13130         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13131         to maybe_diag_stxncpy_trunc.  Call it.
13132         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13133         from gimple_fold_builtin_strcpy.  Print inlining stack.
13134         (handle_builtin_stxncpy): Print inlining stack.
13135         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13137 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
13139         PR target/84176
13140         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13141         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13142         and -fcheck-pointer-bounds are used together.
13143         (indirect_thunk_prefix): New enum.
13144         (indirect_thunk_need_prefix): New function.
13145         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
13146         "_nt" instead of "_bnd" for NOTRACK prefix.
13147         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
13148         (output_indirect_thunk_function): Likewise.
13149         (): Likewise.
13150         (ix86_code_end): Update output_indirect_thunk_function calls.
13151         (ix86_output_indirect_branch_via_reg): Replace
13152         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
13153         (ix86_output_indirect_branch_via_push): Likewise.
13154         (ix86_output_function_return): Likewise.
13155         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
13156         incompatible with -fcf-protection=branch and
13157         -fcheck-pointer-bounds.
13159 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
13161         PR target/83335
13162         * config/aarch64/aarch64.c (aarch64_print_address_internal):
13163         Change gcc_assert call to output_operand_lossage.
13165 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
13167         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
13169 2018-02-22  DJ Delorie  <dj@redhat.com>
13170             Sebastian Perta  <sebastian.perta@renesas.com>
13171             Oleg Endo  <olegendo@gcc.gnu.org>
13173         * config/rx/rx.c (rx_rtx_costs): New function.
13174         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
13176 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13178         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
13180 2018-02-22  Martin Liska  <mliska@suse.cz>
13182         PR driver/83193
13183         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
13184         Add "native" as a possible value.
13186 2018-02-22  Martin Liska  <mliska@suse.cz>
13188         PR driver/83193
13189         * config/i386/i386.c (ix86_option_override_internal):
13190         Add "native" as a possible value for -march and -mtune.
13192 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
13194         PR target/84502
13195         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
13196         to all type variants.
13198         PR tree-optimization/84503
13199         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
13200         width as info->bitpos + info->bitsize - start.
13201         (merged_store_group::merge_overlapping): Simplify width computation.
13202         (check_no_overlap): New function.
13203         (imm_store_chain_info::try_coalesce_bswap): Compute expected
13204         start + width and last_order of the group, fail if check_no_overlap
13205         fails.
13206         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
13207         to group if check_no_overlap fails.
13209 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
13211         * config/rs6000/altivec.md: Delete contraint arguments to
13212         define_expand, define_split, and define_peephole2, and in
13213         define_insn_and_split if always unused.
13214         * config/rs6000/darwin.md: Ditto.
13215         * config/rs6000/dfp.md: Ditto.
13216         * config/rs6000/rs6000.md: Ditto.
13217         * config/rs6000/sync.md: Ditto.
13218         * config/rs6000/vector.md: Ditto.
13219         * config/rs6000/vsx.md: Ditto.
13221 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
13223         * config/rs6000/altivec.md: Write output control strings as braced
13224         blocks instead of double-quoted strings.
13225         * config/rs6000/darwin.md: Ditto.
13226         * config/rs6000/rs6000.md: Ditto.
13227         * config/rs6000/vector.md: Ditto.
13228         * config/rs6000/vsx.md: Ditto.
13230 2018-02-21  Jason Merrill  <jason@redhat.com>
13232         PR c++/84314 - ICE with templates and fastcall attribute.
13233         * attribs.c (build_type_attribute_qual_variant): Remove assert.
13235 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
13237         * ipa-cp.c (determine_versionability): Fix comment typos.
13239 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
13241         PR c/84229
13242         * ipa-cp.c (determine_versionability): Do not version functions caling
13243         va_arg_pack.
13245 2018-02-21  Martin Liska  <mliska@suse.cz>
13247         PR driver/83193
13248         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
13249         Add "native" as a possible value.
13250         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
13251         the macro when native cpu detection is available.
13253 2018-02-21  Martin Liska  <mliska@suse.cz>
13255         PR driver/83193
13256         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
13257         Add "native" as a possible value.
13258         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
13259         when native cpu detection is available.
13261 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
13262             Martin Sebor  <msebor@redhat.com>
13264         PR tree-optimization/84478
13265         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
13266         false.
13267         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
13268         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
13269         support which is conservatively correct, for 2 only stay conservative
13270         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
13271         argument to the 2 argument get_range_strlen, adjust 6 arg
13272         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
13273         false.
13274         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
13275         (gimple_fold_builtin_strlen): Pass true as last argument to
13276         get_range_strlen.
13278 2018-02-20  Martin Sebor  <msebor@redhat.com>
13280         PR middle-end/84095
13281         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
13282         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
13283         (builtin_memref::builtin_memref): Factor out parts into
13284         set_base_and_offset and call it.
13286 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
13288         PR middle-end/84406
13289         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
13290         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
13291         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
13292         search at the associated MODE_INT.
13294 2018-02-20  Jeff Law  <law@redhat.com>
13296         PR middle-end/82123
13297         PR tree-optimization/81592
13298         PR middle-end/79257
13299         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
13300         for range data rather than using global data.
13301         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
13302         range data rather than using global data.
13303         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
13304         pass it to children as needed.
13305         (struct directive::fmtresult): Similarly.
13306         (struct directive::set_width): Similarly.
13307         (struct directive::set_precision): Similarly.
13308         (format_integer, format_directive, parse_directive): Similarly.
13309         (format_none): Accept unnamed vr_values parameter.
13310         (format_percent, format_floating, format_character): Similarly.
13311         (format_string, format_plain): Similarly.
13312         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
13313         the EVRP range analyzer for range data rather than using global data.
13314         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
13315         gimple-ssa-evrp-analyze.h
13316         (class sprintf_dom_walker): Add after_dom_children member function.
13317         Add evrp_range_analyzer member.
13318         (sprintf_dom_walker::before_dom_children): Call into the EVRP
13319         range analyzer as needed.
13320         (sprintf_dom_walker::after_dom_children): New member function.
13321         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
13322         if not optimizing.
13323         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
13324         (evrp_range_analyzer::pop_to_marker): Likewise.
13326 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
13328         PR tree-optimization/84419
13329         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
13330         with the required type if its current type is compatible but
13331         different.
13333 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
13335         PR middle-end/82004
13336         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
13337         after vectorization.
13339 2018-02-20  Martin Liska  <mliska@suse.cz>
13341         PR driver/83193
13342         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
13343         possible values if we don't have a hint.
13345 2018-02-20  Martin Liska  <mliska@suse.cz>
13347         PR c/84310
13348         PR target/79747
13349         * final.c (shorten_branches): Build align_tab array with one
13350         more element.
13351         * opts.c (finish_options): Add alignment option limit check.
13352         (MAX_CODE_ALIGN): Likewise.
13353         (MAX_CODE_ALIGN_VALUE): Likewise.
13354         * doc/invoke.texi: Document maximum allowed option value for
13355         all -falign-* options.
13357 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
13359         PR target/84146
13360         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
13361         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
13362         * var-tracking.c (emit_note_insn_var_location): Remove all references
13363         to NOTE_INSN_CALL_ARG_LOCATION.
13364         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
13365         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
13366         Use copy_rtx_if_shared.
13367         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
13368         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
13369         (dwarf2out_var_location): Remove handling of
13370         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
13371         on call_insn.
13372         * final.c (final_scan_insn): Remove all references to
13373         NOTE_INSN_CALL_ARG_LOCATION.
13374         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
13375         before dumping final insns.
13376         * except.c (emit_note_eh_region_end): Remove all references to
13377         NOTE_INSN_CALL_ARG_LOCATION.
13378         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
13379         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
13380         * config/arc/arc.c (hwloop_optimize): Likewise.
13381         * config/arm/arm.c (create_fix_barrier): Likewise.
13382         * config/s390/s390.c (s390_chunkify_start): Likewise.
13383         * config/sh/sh.c (find_barrier): Likewise.
13384         * config/i386/i386.c (rest_of_insert_endbranch,
13385         ix86_seh_fixup_eh_fallthru): Likewise.
13386         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
13387         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
13388         * config/frv/frv.c (frv_function_prologue): Likewise.
13389         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
13390         reg note.
13391         (note_outside_basic_block_p): Remove all references to
13392         NOTE_INSN_CALL_ARG_LOCATION.
13393         * gengtype.c (adjust_field_rtx_def): Likewise.
13394         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
13395         Likewise.
13396         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
13397         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
13399         PR c++/84444
13400         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
13401         is ADDR_EXPR.
13403         PR tree-optimization/84452
13404         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
13405         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
13406         is NULL.
13408 2018-02-19  Martin Liska  <mliska@suse.cz>
13410         PR sanitizer/82183
13411         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
13413 2018-02-19  Martin Liska  <mliska@suse.cz>
13414             Richard Sandiford  <richard.sandiford@linaro.org>
13416         PR tree-optimization/82491
13417         * gimple-fold.c (get_base_constructor): Make earlier bail out
13418         to prevent ubsan.
13420 2018-02-19  Carl Love  <cel@us.ibm.com>
13422         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
13423         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
13424         BU_P8V_OVERLOAD_1.
13425         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
13426         P8V_BUILTIN_VEC_NEG.
13428 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
13430         * config/rl78/rl78.md (movdf): New define expand.
13432 2018-02-19  Martin Liska  <mliska@suse.cz>
13434         PR other/80589
13435         * doc/invoke.texi: Fix typo.
13436         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
13438 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
13440         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
13441         handle rs6000_single_float and rs6000_double_float specially for
13442         e500 family CPUs.
13444 2018-02-16  Jeff Law  <law@redhat.com>
13446         * config/rx/rx.c (add_pop_cfi_notes): New function.;
13447         (pop_regs): Use it.
13449 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
13451         PR ipa/84425
13452         * ipa-inline.c (inline_small_functions): Fix a typo.
13454 2018-02-16  Nathan Sidwell  <nathan@acm.org>
13456         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
13458 2018-02-16  Carl Love  <cel@us.ibm.com>
13460         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
13461         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
13462         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
13463         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
13464         expansion to P8V_BUILTIN_VEC_FLOAT2.
13466 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
13468         PR rtl-optimization/70023
13469         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
13470         src_regno into account.
13472 2018-02-16  Carl Love  <cel@us.ibm.com>
13474         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
13475         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
13476         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
13477         * config/rs6000/rs6000.c: Remove case statements for
13478         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
13479         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
13480         and P9V_BUILTIN_VEC_VINSERT4B.
13481         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
13482         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
13483         * config/rs6000/vsx.md:
13484         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
13485         vec_insert4b.
13487 2018-02-16  Carl Love  <cel@us.ibm.com>
13489         * config/rs6000/altivec.h: Add builtin names vec_extract4b
13490         vec_insert4b.
13491         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
13492         definitions.
13493         * config/rs6000/rs6000-c.c: Add the definitions for
13494         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
13495         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
13496         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
13497         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
13498         definition for insert4b and define insn *insert3b_internal.
13499         * doc/extend.texi: Add documentation for vec_extract4b.
13501 2018-02-16  Nathan Sidwell  <nathan@acm.org>
13503         * doc/extend.texi (Backwards Compatibility): Mention friend
13504         injection.  Note for-scope is deprecated.
13505         * doc/invoke.texi (-ffriend-injection): Deprecate.
13507 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
13509         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
13510         that moved to I2, also allow destinations that are a paradoxical
13511         subreg (instead of a normal reg).
13513 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
13515         PR target/83831
13516         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
13517         to QImode.
13519 2018-02-16  Richard Biener  <rguenther@suse.de>
13521         PR tree-optimization/84037
13522         PR tree-optimization/84016
13523         PR target/82862
13524         * config/i386/i386.c (ix86_builtin_vectorization_cost):
13525         Adjust vec_construct for the fact we need additional higher latency
13526         128bit inserts for AVX256 and AVX512 vector builds.
13527         (ix86_add_stmt_cost): Scale vector construction cost for
13528         elementwise loads.
13530 2018-02-16  Richard Biener  <rguenther@suse.de>
13532         PR tree-optimization/84417
13533         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
13534         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
13535         (non_rewritable_lvalue_p): Likewise, use poly-ints.
13537 2018-02-16  Martin Liska  <mliska@suse.cz>
13539         PR sanitizer/84307
13540         * internal-fn.def (ASAN_CHECK): Set proper flags.
13541         (ASAN_MARK): Likewise.
13543 2018-02-16  Julia Koval  <julia.koval@intel.com>
13545         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
13546         from PTA_CANNONLAKE.
13548 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
13550         PR target/84272
13551         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
13552         Use ++iter rather than iter++ for std::list iterators.
13553         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
13554         defer deleting them until all nodes in the forest are processed.  Do
13555         free even leaf nodes.  Change to_process into auto_vec.
13557         PR bootstrap/84405
13558         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
13559         * vec.h (vec_default_construct): Use memset instead of placement new
13560         if BROKEN_VALUE_INITIALIZATION is defined.
13561         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
13562         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
13563         is defined.
13565         PR rtl-optimization/83723
13566         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
13567         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
13568         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
13569         recursive calls.
13570         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
13571         callers.
13572         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
13574 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
13576         PR rtl-optimization/81443
13577         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
13578         from inner REGs to paradoxical SUBREGs.
13580 2018-02-16  Richard Biener  <rguenther@suse.de>
13582         PR tree-optimization/84399
13583         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13584         For operands we can analyze at their definition make sure we can
13585         analyze them at each use as well.
13587 2018-02-16  Richard Biener  <rguenther@suse.de>
13589         PR tree-optimization/84190
13590         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
13591         volatile accesses if the decl isn't volatile.
13593 2018-02-15  Jason Merrill  <jason@redhat.com>
13595         PR c++/84314 - ICE with templates and fastcall attribute.
13596         * attribs.c (build_type_attribute_qual_variant): Don't clobber
13597         TYPE_CANONICAL on an existing type.
13599 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
13601         PR tree-optimization/84383
13602         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
13603         dstoff nor call operand_equal_p if dstbase is NULL.
13605         PR tree-optimization/84334
13606         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
13607         also a CONSTANT_CLASS_P, punt.
13609 2018-02-14  Jim Wilson  <jimw@sifive.com>
13611         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
13612         first SMALL_OPERAND check.  New local min_second_step.  Move assert
13613         to where locals are set.  Add TARGET_RVC support.
13614         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
13616 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
13618         * doc/invoke.texi: Correct -Wformat-overflow code sample.
13620 2018-02-14  Martin Sebor  <msebor@redhat.com>
13622         PR tree-optimization/83698
13623         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
13624         arrays constrain the offset range to their bounds.
13625         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
13626         (builtin_access::overlap): Avoid setting the size of overlap if it's
13627         already been set.
13628         (maybe_diag_overlap): Also consider arrays when deciding what values
13629         of offsets to include in diagnostics.
13631 2018-02-14  Martin Sebor  <msebor@redhat.com>
13633         PR c/84108
13634         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
13635         that correspond to the kind of a declaration.
13637 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
13639         PR target/83984
13640         * config/pa/pa.md: Load address of PIC label using the linkage table
13641         if the label is nonlocal.
13643 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13645         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
13646         warning message if user requests -maltivec=be.
13647         * doc/invoke.texi: Document deprecation of -maltivec=be.
13649 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
13651         PR target/84220
13652         * config/rs6000/rs6000-c.c: Update definitions for
13653         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
13654         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
13656 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
13658         PR target/84239
13659         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
13660         add _get_ssp intrinsics. Remove argument from
13661         __builtin_ia32_rdssp[d|q].
13662         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
13663         * config/i386/i386-builtin.def: Remove argument from
13664         __builtin_ia32_rdssp[d|q].
13665         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
13666         ix86_expand_special_args_builtin for _rdssp[d|q].
13667         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
13668         Clear register before usage.
13669         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
13670         Add documentation for new _get_ssp and _inc_ssp intrinsics.
13672 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
13674         PR tree-optimization/84357
13675         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
13676         operand 1 of an ARRAY_REF too.
13678 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
13680         PR target/83831
13681         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
13682         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13683         declarations.
13684         (set_of_reg): New struct.
13685         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
13686         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
13687         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13688         functions.
13689         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
13690         Split into bitclr, bitset, bitinvert patterns if appropriate.
13691         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
13692         use rx_fuse_in_memory_bitop.
13693         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
13694         to named insn, correct maximum insn length.
13696 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
13698         PR target/79242
13699         * machmode.def: Define a complex mode for PARTIAL_INT.
13700         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
13701         MODE_PARTIAL_INT.
13702         * doc/rtl.texi: Document CSPImode.
13703         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
13704         handling.
13705         (msp430_hard_regno_nregs_with_padding): Likewise.
13707 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
13709         PR target/84279
13710         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
13712 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
13714         PR rtl-optimization/84169
13715         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
13716         we generated a parallel as new i3 and we split that to new i2 and i3
13717         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
13718         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
13719         those to i2, not i1.  Partially rewrite this scan code.
13721 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
13723         PR c/82210
13724         * stor-layout.c (place_field): For variable length fields, adjust
13725         offset_align afterwards not just based on the field's alignment,
13726         but also on the size.
13728         PR middle-end/84309
13729         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
13730         of exps and logs in the use_exp2 case.
13732 2018-02-13  Jeff Law  <law@redhat.com>
13734         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
13735         entry for "vector".
13737         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
13738         ARGS as unused.
13740 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
13742         PR debug/84342
13743         PR debug/84319
13744         * common.opt (gas-loc-support, gas-locview-support): New.
13745         (ginline-points, ginternal-reset-location-views): New.
13746         * doc/invoke.texi: Document them.  Use @itemx where intended.
13747         (gvariable-location-views): Adjust.
13748         * target.def (reset_location_view): New.
13749         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
13750         (TARGET_RESET_LOCATION_VIEW): New.
13751         * doc/tm.texi: Rebuilt.
13752         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
13753         (dwarf2out_default_as_locview_support): New.
13754         (output_asm_line_debug_info): Use option variables.
13755         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
13756         (output_loc_list): Likewise.
13757         (add_high_low_attributes): Check option variables.
13758         Don't output entry view attribute in strict mode.
13759         (gen_inlined_subroutine_die): Check option variables.
13760         (dwarf2out_inline_entry): Likewise.
13761         (init_sections_and_labels): Likewise.
13762         (dwarf2out_early_finish): Likewise.
13763         (maybe_reset_location_view): New, from...
13764         (dwarf2out_var_location): ... here.  Call it.
13765         * debug.h (dwarf2out_default_as_loc_support): Declare.
13766         (dwarf2out_default_as_locview_support): Declare.
13767         * hooks.c (hook_int_rtx_insn_0): New.
13768         * hooks.h (hook_int_rtx_insn_0): Declare.
13769         * toplev.c (process_options): Take -gas-loc-support and
13770         -gas-locview-support from dwarf2out.  Enable
13771         -gvariable-location-views by default only with locview
13772         assembler support.  Enable -ginternal-reset-location-views by
13773         default only if the target defines the corresponding hook.
13774         Enable -ginline-points by default if location views are
13775         enabled; force it disabled if statement frontiers are
13776         disabled.
13777         * tree-inline.c (expand_call_inline): Check option variables.
13778         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
13780 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
13782         PR tree-optimization/84321
13783         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
13784         handling.  Also check whether the anti-range contains any values
13785         that satisfy the mask; switch to a VR_RANGE if not.
13787 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
13789         PR sanitizer/84340
13790         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
13792 2018-02-13  Martin Jambor  <mjambor@suse.cz>
13794         PR c++/83990
13795         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
13796         of call statements, also set location of a load to a temporary.
13798 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
13800         * config/rl78/rl78.c (add_vector_labels): New function.
13801         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
13802         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
13803         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
13804         which checks that no arguments are passed.
13805         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
13806         * doc/extend.texi: Documentation for the new attribute.
13808 2018-02-13  Andreas Schwab  <schwab@suse.de>
13810         * config/riscv/linux.h (CPP_SPEC): Define.
13812 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
13814         PR target/84335
13815         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
13816         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
13817         OPTION_MASK_ISA_AES as first argument to def_builtin_const
13818         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
13819         instead of OPTION_MASK_ISA_PCLMUL as first argument to
13820         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
13821         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
13822         temporarily for AES and PCLMUL builtins.
13824         PR tree-optimization/84339
13825         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
13826         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
13827         Formatting fixes.
13829         PR middle-end/84309
13830         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
13831         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
13832         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
13833         inline function.
13834         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
13835         inline function.
13836         * omp-simd-clone.h: New file.
13837         * omp-simd-clone.c: Include omp-simd-clone.h.
13838         (expand_simd_clones): No longer static.
13839         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
13840         cgraph.h and omp-simd-clone.h.
13841         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
13842         (vect_recog_widen_shift_pattern): Formatting fix.
13843         (vect_pattern_recog_1): Don't check optab for calls.
13845         PR target/84336
13846         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
13847         operands[2] into a REG before using gen_lowpart on it.
13849 2018-02-12  Jeff Law  <law@redhat.com>
13851         PR target/83760
13852         * config/sh/sh.c (find_barrier): Consider a sibling call
13853         a barrier as well.
13855         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
13856         successfully back substituting a reg.
13858 2018-02-12  Richard Biener  <rguenther@suse.de>
13860         PR tree-optimization/84037
13861         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
13862         parameter, move visited init to caller.
13863         (vect_slp_analyze_operations): Separate cost from validity
13864         check, initialize visited once for all instances.
13865         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
13866         for all instances.
13867         * tree-vect-stmts.c (vect_model_simple_cost): Make early
13868         out an assert.
13869         (vect_model_promotion_demotion_cost): Likewise.
13870         (vectorizable_bswap): Guard cost modeling with !slp_node
13871         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
13872         SLP stmts.
13873         (vectorizable_call): Likewise.
13874         (vectorizable_conversion): Likewise.
13875         (vectorizable_assignment): Likewise.
13876         (vectorizable_shift): Likewise.
13877         (vectorizable_operation): Likewise.
13878         (vectorizable_store): Likewise.
13879         (vectorizable_load): Likewise.
13880         (vectorizable_condition): Likewise.
13881         (vectorizable_comparison): Likewise.
13883 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
13885         PR sanitizer/84307
13886         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
13887         (ASAN_MARK): Fix fnspec to account for return value, change pointer
13888         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
13890 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
13892         PR middle-end/83665
13893         * params.def (inline-min-speedup): Increase from 8 to 15.
13894         (max-inline-insns-auto): Decrease from 40 to 30.
13895         * ipa-split.c (consider_split): Add some buffer for function to
13896         be considered inlining candidate.
13897         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
13898         default values.
13900 2018-02-12  Richard Biener  <rguenther@suse.de>
13902         PR tree-optimization/84037
13903         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
13904         matched stmts if we cannot swap the non-matched ones.
13906 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
13908         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
13909         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
13910         _mm_maskz_scalef_round_ss): New intrinsics.
13911         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
13912         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
13913         __builtin_ia32_scalefss_round): Remove.
13914         (__builtin_ia32_scalefsd_mask_round,
13915         __builtin_ia32_scalefss_mask_round): New intrinsics.
13916         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
13917         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
13918         ((match_operand:VF_128 2 "<round_nimm_predicate>"
13919         "<round_constraint>")): Changed to ...
13920         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
13921         "<round_scalar_constraint>")): ... this.
13922         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
13923         %0, %1, %2<round_op3>}"): Changed to ...
13924         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
13925         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
13926         %2<round_scalar_mask_op3>}"): ... this.
13927         * config/i386/subst.md (round_scalar_nimm_predicate): New.
13929 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
13931         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
13932         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
13933         (_mm_maskz_sqrt_round_ss): New intrinsics.
13934         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
13935         (__builtin_ia32_sqrtsd_mask_round)
13936         (__builtin_ia32_sqrtss_mask_round): New builtins.
13937         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
13938         (__builtin_ia32_sqrtss_round): Remove.
13939         (__builtin_ia32_sqrtsd_mask_round)
13940         (__builtin_ia32_sqrtss_mask_round): New builtins.
13941         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
13942         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
13943         ((match_operand:VF_128 1 "vector_operand"
13944         "xBm,<round_constraint>")): Changed to ...
13945         ((match_operand:VF_128 1 "vector_operand"
13946         "xBm,<round_scalar_constraint>")): ... this.
13947         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
13948         %0, %2, %<iptr>1<round_op3>}): Changed to ...
13949         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
13950         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
13951         %<iptr>1<round_scalar_mask_op3>}): ... this.
13952         ((set_attr "prefix" "<round_prefix>")): Changed to ...
13953         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
13955 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
13957         PR target/84266
13958         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
13959         Cast vec_cmpeq result to correct type.
13960         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
13961         Cast vec_cmpgt result to correct type.
13963 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
13965         * final.c (final_scan_insn_1): Renamed from...
13966         (final_scan_insn): ... this.  New wrapper, to recover
13967         seen from the outermost call in recursive ones.
13968         * config/sparc/sparc.c (output_return): Drop seen from call.
13969         (output_sibcall): Likewise.
13970         * config/visium/visium.c (output_branch): Likewise.
13972 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
13974         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
13975         function label.
13977 2018-02-10  Alan Modra  <amodra@gmail.com>
13979         PR target/84300
13980         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
13981         Specify LR as an input.
13983 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
13985         PR sanitizer/83987
13986         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
13987         remove_member_access_dummy_vars): New functions.
13988         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
13989         lower_omp_1, execute_lower_omp): Use them.
13991         PR rtl-optimization/84308
13992         * shrink-wrap.c (spread_components): Release todo vector.
13994 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
13996         PR rtl-optimization/57193
13997         * ira-color.c (struct allocno_color_data): Add member
13998         conflict_allocno_hard_prefs.
13999         (update_conflict_allocno_hard_prefs): New.
14000         (bucket_allocno_compare_func): Add a preference based on
14001         conflict_allocno_hard_prefs.
14002         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
14003         (color_allocnos): Remove a dead code.  Initiate
14004         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
14006 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
14008         PR target/84226
14009         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
14010         constraint from =wa to wa.  Avoid a subreg on the output operand,
14011         instead use a pseudo and subreg it in a move.
14012         (p9_xxbrd_<mode>): Changed to ...
14013         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
14014         (p9_xxbrd_v2df): New expander.
14015         (p9_xxbrw_<mode>): Changed to ...
14016         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
14017         (p9_xxbrw_v4sf): New expander.
14019 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
14021         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
14023 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
14025         PR target/83926
14026         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
14027         multiply in 32-bit mode.
14028         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
14029         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
14030         mode.
14032 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
14034         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
14035         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
14036         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
14037         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
14039 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
14041         PR lto/84213
14042         * dwarf2out.c (is_trivial_indirect_ref): New function.
14043         (dwarf2out_late_global_decl): Do not generate a location
14044         attribute for variables that have a non-trivial DECL_VALUE_EXPR
14045         and that are not defined in the current unit.
14047 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
14049         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
14050         instead of a libcall for UNORDERED.
14052 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
14054         PR target/82641
14055         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
14056         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
14058 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14060         PR target/PR84295
14061         * config/s390/s390.c (s390_set_current_function): Invoke
14062         s390_indirect_branch_settings also if fndecl didn't change.
14064 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
14066         * config/rs6000/rs6000.md (blockage): Set length to zero.
14068 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
14070         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
14072 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
14074         PR sanitizer/84285
14075         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
14076         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
14077         -static-lib*san.
14079         PR debug/84252
14080         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
14081         PARALLEL incoming that failed vt_get_decl_and_offset check.
14083         PR middle-end/84237
14084         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
14085         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
14086         TREE_READONLY bit.
14087         (get_variable_section): For decls in named .bss* sections pass true as
14088         second argument to bss_initializer_p.
14090 2018-02-09  Marek Polacek  <polacek@redhat.com>
14091             Jakub Jelinek  <jakub@redhat.com>
14093         PR c++/83659
14094         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
14095         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
14096         Sync some changes from cxx_fold_indirect_ref.
14098 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
14100         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
14101         markers.
14102         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
14103         (BLOCK_INLINE_ENTRY_LABEL): New.
14104         (dwarf2out_var_location): Disregard inline entry markers.
14105         (inline_entry_data): New struct.
14106         (inline_entry_data_hasher): New hashtable type.
14107         (inline_entry_data_hasher::hash): New.
14108         (inline_entry_data_hasher::equal): New.
14109         (inline_entry_data_table): New variable.
14110         (add_high_low_attributes): Add DW_AT_entry_pc and
14111         DW_AT_GNU_entry_view attributes if a pending entry is found
14112         in inline_entry_data_table.  Add old entry_pc attribute only
14113         if debug nonbinding markers are disabled.
14114         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
14115         markers are enabled.
14116         (block_within_block_p, dwarf2out_inline_entry): New.
14117         (dwarf2out_finish): Check that no entries remained in
14118         inline_entry_data_table.
14119         * final.c (reemit_insn_block_notes): Handle inline entry notes.
14120         (final_scan_insn, notice_source_line): Likewise.
14121         (rest_of_clean_state): Skip inline entry markers.
14122         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
14123         markers.
14124         * gimple.c (gimple_build_debug_inline_entry): New.
14125         * gimple.h (enum gimple_debug_subcode): Add
14126         GIMPLE_DEBUG_INLINE_ENTRY.
14127         (gimple_build_debug_inline_entry): Declare.
14128         (gimple_debug_inline_entry_p): New.
14129         (gimple_debug_nonbind_marker_p): Adjust.
14130         * insn-notes.def (INLINE_ENTRY): New.
14131         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14132         inline entry marker notes.
14133         (print_insn): Likewise.
14134         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14135         (INSN_DEBUG_MARKER_KIND): Likewise.
14136         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14137         * tree-inline.c (expand_call_inline): Build and insert
14138         debug_inline_entry stmt.
14139         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14140         inline entry blocks early, if nonbind markers are enabled.
14141         (dump_scope_block): Dump fragment info.
14142         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14143         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
14144         (gimple_build_debug_inline_entry): New.
14145         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
14146         Enable/disable inline entry points too.
14147         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
14148         (DEBUG_INSN): Describe inline entry markers.
14150         * common.opt (gvariable-location-views): New.
14151         (gvariable-location-views=incompat5): New.
14152         * config.in: Rebuilt.
14153         * configure: Rebuilt.
14154         * configure.ac: Test assembler for view support.
14155         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
14156         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
14157         * dwarf2out.c (var_loc_view): New typedef.
14158         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
14159         (dwarf2out_locviews_in_attribute): New.
14160         (dwarf2out_locviews_in_loclist): New.
14161         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
14162         (enum dw_line_info_opcode): Add LI_adv_address.
14163         (struct dw_line_info_table): Add view.
14164         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
14165         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
14166         (zero_view_p): New variable.
14167         (ZERO_VIEW_P): New macro.
14168         (output_asm_line_debug_info): New.
14169         (struct var_loc_node): Add view.
14170         (add_AT_view_list, AT_loc_list): New.
14171         (add_var_loc_to_decl): Add view param.  Test it against last.
14172         (new_loc_list): Add view params.  Record them.
14173         (AT_loc_list_ptr): Handle loc and view lists.
14174         (view_list_to_loc_list_val_node): New.
14175         (print_dw_val): Handle dw_val_class_view_list.
14176         (size_of_die): Likewise.
14177         (value_format): Likewise.
14178         (loc_list_has_views): New.
14179         (gen_llsym): Set vl_symbol too.
14180         (maybe_gen_llsym, skip_loc_list_entry): New.
14181         (dwarf2out_maybe_output_loclist_view_pair): New.
14182         (output_loc_list): Output view list or entries too.
14183         (output_view_list_offset): New.
14184         (output_die): Handle dw_val_class_view_list.
14185         (output_dwarf_version): New.
14186         (output_compilation_unit_header): Use it.
14187         (output_skeleton_debug_sections): Likewise.
14188         (output_rnglists, output_line_info): Likewise.
14189         (output_pubnames, output_aranges): Update version comments.
14190         (output_one_line_info_table): Output view numbers in asm comments.
14191         (dw_loc_list): Determine current endview, pass it to new_loc_list.
14192         Call maybe_gen_llsym.
14193         (loc_list_from_tree_1): Adjust.
14194         (add_AT_location_description): Create view list attribute if
14195         needed, check it's absent otherwise.
14196         (convert_cfa_to_fb_loc_list): Adjust.
14197         (maybe_emit_file): Call output_asm_line_debug_info for test.
14198         (dwarf2out_var_location): Reset views as needed.  Precompute
14199         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
14200         attribute.  Set view.
14201         (new_line_info_table): Reset next view.
14202         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
14203         (dwarf2out_source_line): Likewise.  Output view resets and labels to
14204         the assembler, or select appropriate line info opcodes.
14205         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
14206         (optimize_string_length): Catch it.  Adjust.
14207         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
14208         dw_val_class_view_list, and remove it if no longer needed.
14209         (hash_loc_list): Hash view numbers.
14210         (loc_list_hasher::equal): Compare them.
14211         (optimize_location_lists): Check whether a view list symbol is
14212         needed, and whether the locview attribute is present, and
14213         whether they match.  Remove the locview attribute if no longer
14214         needed.
14215         (index_location_lists): Call skip_loc_list_entry for test.
14216         (dwarf2out_finish): Call output_asm_line_debug_info for test.
14217         Use output_dwarf_version.
14218         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
14219         (struct dw_val_node): Add val_view_list.
14220         * final.c (SEEN_NEXT_VIEW): New.
14221         (set_next_view_needed): New.
14222         (clear_next_view_needed): New.
14223         (maybe_output_next_view): New.
14224         (final_start_function): Rename to...
14225         (final_start_function_1): ... this.  Take pointer to FIRST,
14226         add SEEN parameter.  Emit param bindings in the initial view.
14227         (final_start_function): Reintroduce SEEN-less interface.
14228         (final): Rename to...
14229         (final_1): ... this.  Take SEEN parameter.  Output final pending
14230         next view at the end.
14231         (final): Reintroduce seen-less interface.
14232         (final_scan_insn): Output pending next view before switching
14233         sections or ending a block.  Mark the next view as needed when
14234         outputting variable locations.  Notify debug backend of section
14235         changes, and of location view changes.
14236         (rest_of_handle_final): Adjust.
14237         * toplev.c (process_options): Autodetect value for debug variable
14238         location views option.  Warn on incompat5 without -gdwarf-5.
14239         * doc/invoke.texi (gvariable-location-views): New.
14240         (gvariable-location-views=incompat5): New.
14241         (gno-variable-location-views): New.
14243 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
14245         PR tree-optimization/84136
14246         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
14247         that the result of find_edge is non-NULL.
14249 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
14251         PR target/83008
14252         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
14253         storing integer register in SImode.  Fix cost of 256 and 512
14254         byte aligned SSE register store.
14256 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
14258         * config/i386/i386.c (ix86_multiplication_cost): Fix
14259         multiplication cost for TARGET_AVX512DQ.
14261 2018-02-08  Marek Polacek  <polacek@redhat.com>
14263         PR tree-optimization/84238
14264         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
14265         get_range_strlen.
14267 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
14269         PR tree-optimization/84265
14270         * tree-vect-stmts.c (vectorizable_store): Don't treat
14271         VMAT_CONTIGUOUS accesses as grouped.
14272         (vectorizable_load): Likewise.
14274 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
14276         PR tree-optimization/81635
14277         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
14278         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
14279         (test_round_for_mask): New functions.
14280         (wide_int_cc_tests): Call test_round_for_mask.
14281         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
14282         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
14283         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
14284         range returned by get_range_info.
14286 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
14288         PR ipa/81360
14289         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
14290         * symtab.c: Include builtins.h
14291         (symtab_node::output_to_lto_symbol_table_p): Move here
14292         from lto-streamer-out.c:output_symbol_p.
14293         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
14294         (output_symbol_p): Move all logic to symtab.c
14295         (produce_symtab): Update.
14297 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14299         * config/s390/s390-opts.h (enum indirect_branch): Define.
14300         * config/s390/s390-protos.h (s390_return_addr_from_memory)
14301         (s390_indirect_branch_via_thunk)
14302         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
14303         (enum s390_indirect_branch_type): Define.
14304         * config/s390/s390.c (struct s390_frame_layout, struct
14305         machine_function): Remove.
14306         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
14307         (indirect_branch_table_label_no, indirect_branch_table_name):
14308         Define variables.
14309         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
14310         (enum s390_indirect_branch_option): Define.
14311         (s390_return_addr_from_memory): New function.
14312         (s390_handle_string_attribute): New function.
14313         (s390_attribute_table): Add new attribute handler.
14314         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
14315         (s390_indirect_branch_via_thunk): New function.
14316         (s390_indirect_branch_via_inline_thunk): New function.
14317         (s390_function_ok_for_sibcall): When jumping via thunk disallow
14318         sibling call optimization for non z10 compiles.
14319         (s390_emit_call): Force indirect branch target to be a single
14320         register.  Add r1 clobber for non-z10 compiles.
14321         (s390_emit_epilogue): Emit return jump via return_use expander.
14322         (s390_reorg): Handle JUMP_INSNs as execute targets.
14323         (s390_option_override_internal): Perform validity checks for the
14324         new command line options.
14325         (s390_indirect_branch_attrvalue): New function.
14326         (s390_indirect_branch_settings): New function.
14327         (s390_set_current_function): Invoke s390_indirect_branch_settings.
14328         (s390_output_indirect_thunk_function):  New function.
14329         (s390_code_end): Implement target hook.
14330         (s390_case_values_threshold): Implement target hook.
14331         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
14332         macros.
14333         * config/s390/s390.h (struct s390_frame_layout)
14334         (struct machine_function): Move here from s390.c.
14335         (TARGET_INDIRECT_BRANCH_NOBP_RET)
14336         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
14337         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
14338         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
14339         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
14340         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
14341         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
14342         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
14343         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
14344         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
14345         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
14346         (mnemonic attribute): Add values which aren't recognized
14347         automatically.
14348         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
14349         pattern for branch conversion.  Fix mnemonic attribute.
14350         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
14351         indirect branch via thunk if requested.
14352         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
14353         ("*indirect_jump"): Disable for branch conversion using out of
14354         line thunks.
14355         ("indirect_jump_via_thunk<mode>_z10")
14356         ("indirect_jump_via_thunk<mode>")
14357         ("indirect_jump_via_inlinethunk<mode>_z10")
14358         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
14359         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
14360         ("casesi_jump_via_inlinethunk<mode>_z10")
14361         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
14362         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
14363         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
14364         ("*indirect2_jump"): Disable for branch conversion.
14365         ("casesi_jump"): Turn into expander and expand patterns for branch
14366         conversion.
14367         ("return_use"): New expander.
14368         ("*return"): Emit return via thunk and rename it to ...
14369         ("*return<mode>"): ... this one.
14370         * config/s390/s390.opt: Add new options and and enum for the
14371         option values.
14373 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
14375         * lra-constraints.c (match_reload): Unconditionally use
14376         gen_lowpart_SUBREG, rather than selecting between that
14377         and equivalent gen_rtx_SUBREG code.
14379 2018-02-08  Richard Biener  <rguenther@suse.de>
14381         PR tree-optimization/84233
14382         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
14383         changed flag instead of boguously re-using phi_inserted.
14385 2018-02-08  Martin Jambor  <mjambor@suse.cz>
14387         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
14388         static local variables.
14390 2018-02-08  Richard Biener  <rguenther@suse.de>
14392         PR tree-optimization/84278
14393         * tree-vect-stmts.c (vectorizable_store): When looking for
14394         smaller vector types to perform grouped strided loads/stores
14395         make sure the mode is supported by the target.
14396         (vectorizable_load): Likewise.
14398 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
14400         * config/aarch64/aarch64.c (aarch64_components_for_bb):
14401         Increase LDP/STP opportunities by adding adjacent callee-saves.
14403 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
14405         PR rtl-optimization/84068
14406         PR rtl-optimization/83459
14407         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
14409 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
14411         PR tree-optimization/84224
14412         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
14413         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
14414         non-zero arguments.
14416 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
14418         PR target/84113
14419         * config/rs6000/altivec.md (*restore_world): Remove LR use.
14420         * config/rs6000/predicates.md (restore_world_operation): Adjust op
14421         count, remove one USE.
14423 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
14425         * doc/install.texi (Configuration): Document the
14426         --with-long-double-format={ibm,ieee} PowerPC configuration
14427         options.
14429         PR target/84154
14430         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
14431         Convert from define_expand to be define_insn_and_split.  Rework
14432         float/double/_Float128 conversions to QI/HI/SImode to work with
14433         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
14434         conversions to QI/HImode types did a store and then a load to
14435         truncate the value.  For conversions to VSX registers, don't split
14436         the insn, instead emit the code directly.  Use the code iterator
14437         any_fix to combine signed and unsigned conversions.
14438         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
14439         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
14440         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14441         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
14442         (fix_<mode>di2_hw): Likewise.
14443         (fixuns_<mode>di2_hw): Likewise.
14444         (fix_<mode>si2_hw): Likewise.
14445         (fixuns_<mode>si2_hw): Likewise.
14446         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
14447         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14448         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
14449         fix<uns>_trunc<SFDF:mode>si2_p8.
14450         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
14451         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
14452         (fix<uns>_<mode>_mem): Likewise.
14453         (fctiw<u>z_<mode>_mem): Likewise.
14454         (fix<uns>_<mode>_mem): Likewise.
14455         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
14456         the register allocator from doing a direct move to the GPRs to do
14457         a store, and instead use the ISA 3.0 store byte/half-word from
14458         vector register instruction.  For IEEE 128-bit floating point,
14459         also optimize stores of 32-bit ints.
14460         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
14462 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
14464         * genextract.c (push_pathstr_operand): New function to support
14465         [a-zA-Z].
14466         (walk_rtx): Call push_pathstr_operand.
14467         (print_path): Support [a-zA-Z].
14469 2018-02-07  Richard Biener  <rguenther@suse.de>
14471         PR tree-optimization/84037
14472         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
14473         (cse_and_gimplify_to_preheader): Declare.
14474         (vect_get_place_in_interleaving_chain): Likewise.
14475         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14476         ivexpr_map.
14477         (_loop_vec_info::~_loop_vec_info): Delete it.
14478         (cse_and_gimplify_to_preheader): New function.
14479         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
14480         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
14481         (vectorizable_load): Likewise.  For grouped stores always base
14482         the IV on the first element.
14483         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
14484         condition before gimplifying.
14486 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
14488         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
14489         *DIV_EXPR and *MOD_EXPR.
14491 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
14493         PR target/84248
14494         * config/i386/i386.c (ix86_option_override_internal): Mask out
14495         the CF_SET bit when checking -fcf-protection.
14497 2018-02-07  Tom de Vries  <tom@codesourcery.com>
14499         PR libgomp/84217
14500         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
14501         enough.
14503 2018-02-07  Richard Biener  <rguenther@suse.de>
14505         PR tree-optimization/84204
14506         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
14507         this place.
14509         PR tree-optimization/84205
14510         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
14511         special-case isl_ast_op_zdiv_r.
14513         PR tree-optimization/84223
14514         * graphite-scop-detection.c (gather_bbs::before_dom_children):
14515         Only add conditions from within the region.
14516         (gather_bbs::after_dom_children): Adjust.
14518 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
14520         PR target/84209
14521         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
14522         * config/avr/avr.md: Only post-reload split REG-REG moves if
14523         either register is GENERAL_REG_P.
14525 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
14527         PR tree-optimization/84235
14528         * tree-ssa-scopedtables.c
14529         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
14530         if the subtraction is performed in floating point type where NaNs are
14531         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
14532         build 1.  Formatting fix.
14534 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
14536         PR target/84146
14537         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
14538         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
14539         and skip it regardless of bb boundaries.  Use CALL_P macro,
14540         don't test INSN_P (insn) together with CALL_P or JUMP_P check
14541         unnecessarily, formatting fix.
14543 2018-02-06  Michael Collison  <michael.collison@arm.com>
14545         * config/arm/thumb2.md:
14546         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
14547         (*thumb_mov_notscc): Ditto.
14549 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
14551         PR target/84154
14552         * config/rs6000/rs6000.md (su code attribute): Use "u" for
14553         unsigned_fix, not "s".
14555 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14557         * configure.ac (gcc_fn_eh_frame_ro): New function.
14558         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
14559         correct .eh_frame permissions.
14560         * configure: Regenerate.
14562 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
14564         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
14565         irrelevant options.
14567 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14569         * config/rs6000/rs6000.c (rs6000_option_override_internal):
14570         Display warning message for -mno-speculate-indirect-jumps.
14572 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
14574         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
14575         Undocumented.
14576         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
14578 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
14580         PR tree-optimization/84225
14581         * tree-eh.c (find_trapping_overflow): Only call
14582         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
14584 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14586         PR target/84145
14587         * config/i386/i386.c: Reimplement the check of possible options
14588         -mibt/-mshstk conbination. Change error messages.
14589         * doc/invoke.texi: Fix a typo: remove extra '='.
14591 2018-02-06  Marek Polacek  <polacek@redhat.com>
14593         PR tree-optimization/84228
14594         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
14596 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
14598         PR target/82641
14599         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
14600         emitted arch directives.
14601         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
14602         __ARM_FEATURE_COPROC before changing architectures.
14604 2018-02-06  Richard Biener  <rguenther@suse.de>
14606         * config/i386/i386.c (print_reg): Fix typo.
14607         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
14609 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
14611         * configure: Regenerate.
14613 2018-02-05  Martin Sebor  <msebor@redhat.com>
14615         PR tree-optimization/83369
14616         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
14617         inlining context.
14619 2018-02-05  Martin Liska  <mliska@suse.cz>
14621         * doc/invoke.texi: Cherry-pick upstream r323995.
14623 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
14625         * ira.c (ira_init_register_move_cost): Adjust comment.
14627 2018-02-05  Martin Liska  <mliska@suse.cz>
14629         PR gcov-profile/84137
14630         * doc/gcov.texi: Fix typo in documentation.
14632 2018-02-05  Martin Liska  <mliska@suse.cz>
14634         PR gcov-profile/83879
14635         * doc/gcov.texi: Document necessity of --dynamic-list-data when
14636         using dlopen functionality.
14638 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
14640         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
14641         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
14642         _mm_maskz_range_ss, _mm_mask_range_round_ss,
14643         _mm_maskz_range_round_ss): New intrinsics.
14644         (__builtin_ia32_rangesd128_round)
14645         (__builtin_ia32_rangess128_round): Remove.
14646         (__builtin_ia32_rangesd128_mask_round,
14647         __builtin_ia32_rangess128_mask_round): New builtins.
14648         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
14649         __builtin_ia32_rangess128_round): Remove.
14650         (__builtin_ia32_rangesd128_mask_round,
14651         __builtin_ia32_rangess128_mask_round): New builtins.
14652         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
14653         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
14654         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
14655         "<round_saeonly_constraint>")): Changed to ...
14656         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
14657         "<round_saeonly_scalar_constraint>")): ... this.
14658         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
14659         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
14660         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
14661         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
14662         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
14664 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
14666         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
14667         options.
14668         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
14669         Remove all values except native, 8540 and 8548.
14671 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
14673         * config/i386/i386.c (ix86_output_function_return): Pass
14674         INVALID_REGNUM, instead of -1, as invalid register number to
14675         indirect_thunk_name and output_indirect_thunk.
14677 2018-02-02  Julia Koval  <julia.koval@intel.com>
14679         * config.gcc: Add -march=icelake.
14680         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
14681         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
14682         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
14683         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
14684         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
14685         (processor_target_table): Add icelake.
14686         (ix86_option_override_internal): Handle new PTAs.
14687         (get_builtin_code_for_version): Handle icelake.
14688         (M_INTEL_COREI7_ICELAKE): New.
14689         (fold_builtin_cpu): Handle icelake.
14690         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
14691         * doc/invoke.texi: Add -march=icelake.
14693 2018-02-02  Julia Koval  <julia.koval@intel.com>
14695         * config/i386/i386.c (ix86_option_override_internal): Change flags type
14696         to wide_int_bitmask.
14697         * wide-int-bitmask.h: New.
14699 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14701         PR target/84066
14702         * config/i386/i386.md: Replace Pmode with word_mode in
14703         builtin_setjmp_setup and builtin_longjmp to support x32.
14705 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
14707         PR target/56010
14708         PR target/83743
14709         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
14710         #include "opts.h".
14711         (rs6000_supported_cpu_names): New static variable.
14712         (linux_cpu_translation_table): Likewise.
14713         (elf_platform) <cpu>: Define new static variable and use it.
14714         Translate kernel AT_PLATFORM name to canonical name if needed.
14715         Error if platform name is unknown.
14717 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
14719         PR target/84089
14720         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
14722 2018-02-01  Jeff Law  <law@redhat.com>
14724         PR target/84128
14725         * config/i386/i386.c (release_scratch_register_on_entry): Add new
14726         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
14727         the scratch if RELEASE_VIA_POP is false.
14728         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
14729         If we have to save a temporary register, decrement SIZE appropriately.
14730         Pass new arguments to release_scratch_register_on_entry.
14731         (ix86_adjust_stack_and_probe): Likewise.
14732         (ix86_emit_probe_stack_range): Pass new arguments to
14733         release_scratch_register_on_entry.
14735 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
14737         PR rtl-optimization/84157
14738         * combine.c (change_zero_ext): Use REG_P predicate in
14739         front of HARD_REGISTER_P predicate.
14741 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
14743         * config/avr/avr.c (avr_option_override): Move disabling of
14744         -fdelete-null-pointer-checks to...
14745         * common/config/avr/avr-common.c (avr_option_optimization_table):
14746         ...here.
14748 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14750         PR tree-optimization/81635
14751         * tree-data-ref.c (split_constant_offset_1): For types that
14752         wrap on overflow, try to use range info to prove that wrapping
14753         cannot occur.
14755 2018-02-01  Renlin Li  <renlin.li@arm.com>
14757         PR target/83370
14758         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
14759         TAILCALL_ADDR_REGS.
14760         (aarch64_register_move_cost): Likewise.
14761         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
14762         TAILCALL_ADDR_REGS.
14763         (REG_CLASS_NAMES): Likewise.
14764         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
14765         TAILCALL_ADDR_REGS. Remove IP registers.
14766         * config/aarch64/aarch64.md (Ucs): Update register constraint.
14768 2018-02-01  Richard Biener  <rguenther@suse.de>
14770         * domwalk.h (dom_walker::dom_walker): Add additional constructor
14771         for specifying RPO order and allow NULL for that.
14772         * domwalk.c (dom_walker::dom_walker): Likewise.
14773         (dom_walker::walk): Handle NULL RPO order.
14774         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
14775         in RPO order.
14776         (rewrite_update_dom_walker): Likewise.
14777         (mark_def_dom_walker): Likewise.
14779 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14781         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
14782         (aarch64_maybe_expand_sve_subreg_move): Declare.
14783         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
14784         * config/aarch64/predicates.md (aarch64_any_register_operand): New
14785         predicate.
14786         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
14787         that are semantically a reverse operation.
14788         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
14789         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
14790         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
14791         functions.
14792         (aarch64_can_change_mode_class): For big-endian, forbid changes
14793         between two SVE modes if they have different element sizes.
14795 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14797         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
14798         the TImode handling for big-endian targets.
14800 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14802         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
14803         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
14804         not just bytes.
14805         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
14806         Remove BSWAP handing for big-endian targets and use the form of
14807         LD1RQ appropariate for the mode.
14809 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14811         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
14812         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
14813         duplicated element.
14815 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14817         PR tearget/83845
14818         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
14819         check for operands that need to go through aarch64_sve_reload_be.
14821 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
14823         PR tree-optimization/81661
14824         PR tree-optimization/84117
14825         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
14826         * tree-eh.c: Include gimplify.h.
14827         (find_trapping_overflow, replace_trapping_overflow,
14828         rewrite_to_non_trapping_overflow): New functions.
14829         * tree-vect-loop.c: Include tree-eh.h.
14830         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
14831         * tree-data-ref.c: Include tree-eh.h.
14832         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
14834 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
14836         PR rtl-optimization/84123
14837         * combine.c (change_zero_ext): Check if hard register satisfies
14838         can_change_dest_mode before calling gen_lowpart_SUBREG.
14840 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
14842         PR target/82444
14843         * ira.c (ira_init_register_move_cost): Remove assert.
14845 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
14847         PR rtl-optimization/84071
14848         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
14849         * doc/tm.texi: Regenerate.
14851 2018-01-31  Richard Biener  <rguenther@suse.de>
14853         PR tree-optimization/84132
14854         * tree-data-ref.c (analyze_miv_subscript): Properly
14855         check whether evolution_function_is_affine_multivariate_p
14856         before calling gcd_of_steps_may_divide_p.
14858 2018-01-31  Julia Koval  <julia.koval@intel.com>
14860         PR target/83618
14861         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
14862         * config/i386/i386.md (rdpid_rex64) New.
14863         (rdpid): Make 32bit only.
14865 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
14867         PR lto/84105
14868         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
14869         an IDENTIFIER_NODE for FUNCTION_TYPE's.
14871 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
14873         Revert
14874         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14876         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14878 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
14880         PR rtl-optimization/84071
14881         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
14882         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
14884 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
14886         * config/arc/arc.c (arc_handle_aux_attribute): New function.
14887         (arc_attribute_table): Add 'aux' attribute.
14888         (arc_in_small_data_p): Consider aux like variables.
14889         (arc_is_aux_reg_p): New function.
14890         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
14891         (arc_get_aux_arg): New function.
14892         (prepare_move_operands): Handle aux-register access.
14893         (arc_handle_aux_attribute): New function.
14894         * doc/extend.texi (ARC Variable attributes): Add subsection.
14896 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
14898         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
14899         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
14900         (arc_attribute_table): Add 'uncached' attribute.
14901         (arc_print_operand): Print '.di' flag for uncached memory
14902         accesses.
14903         (arc_in_small_data_p): Do not consider for small data the uncached
14904         types.
14905         (arc_is_uncached_mem_p): New function.
14906         * config/arc/predicates.md (compact_store_memory_operand): Check
14907         for uncached memory accesses.
14908         (nonvol_nonimm_operand): Likewise.
14909         * doc/extend.texi (ARC Type Attribute): New subsection.
14911 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
14913         PR c/84100
14914         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
14915         falign-loops=): Add Optimization flag.
14917 2018-01-30  Jeff Law  <law@redhat.com>
14919         PR target/84064
14920         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
14921         INT_REGISTERS_SAVED.  Check it prior to calling
14922         get_scratch_register_on_entry.
14923         (ix86_adjust_stack_and_probe): Similarly.
14924         (ix86_emit_probe_stack_range): Similarly.
14925         (ix86_expand_prologue): Corresponding changes.
14927 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14929         PR target/40411
14930         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
14931         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
14933 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
14935         PR target/84112
14936         * lra-constraints.c (curr_insn_transform): Process AND in the
14937         address.
14939 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
14941         PR rtl-optimization/83986
14942         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
14943         dependence against last_pending_memory_flush in addition to
14944         pending_jump_insns.
14946 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
14948         PR tree-optimization/81611
14949         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
14950         copies.
14952 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14954         PR target/83758
14955         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
14956         a reg rtx.
14958 2018-01-30  Richard Biener  <rguenther@suse.de>
14959             Jakub Jelinek  <jakub@redhat.com>
14961         PR tree-optimization/84111
14962         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
14963         inner loops added during recursion, as they don't have up-to-date
14964         SSA form.
14966 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
14968         PR ipa/81360
14969         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
14970         (can_inline_edge_by_limits_p): ... here.
14971         (can_early_inline_edge_p, check_callers,
14972         update_caller_keys, update_callee_keys, recursive_inlining,
14973         add_new_edges_to_heap, speculation_useful_p,
14974         inline_small_functions,
14975         inline_small_functions, flatten_function,
14976         inline_to_all_callers_1): Update.
14978 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
14980         * profile-count.c (profile_count::combine_with_ipa_count): Handle
14981         zeros correctly.
14983 2018-01-30  Richard Biener  <rguenther@suse.de>
14985         PR tree-optimization/83008
14986         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
14987         invariant and constant vector uses in stmts when they need
14988         more than one stmt.
14990 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14992         PR bootstrap/84017
14993         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
14994         * configure: Regenerate.
14996 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
14998         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
14999         pattern.
15000         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
15001         Use gen_rtx_REG rather than gen_lowpart.
15003 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
15005         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
15006         rather than 0 when creating partial subregs.
15008 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
15010         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
15011         of usage.
15013 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
15015         PR target/81550
15016         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
15017         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
15018         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
15019         flags.  This restores the settings used before the 2017-07-24.
15020         Turning off pre increment/decrement/modify allows IVOPTS to
15021         optimize DF/SF loops where the index is an int.
15023 2018-01-29  Richard Biener  <rguenther@suse.de>
15024             Kelvin Nilsen  <kelvin@gcc.gnu.org>
15026         PR bootstrap/80867
15027         * tree-vect-stmts.c (vectorizable_call): Don't call
15028         targetm.vectorize_builtin_md_vectorized_function if callee is
15029         NULL.
15031 2018-01-22  Carl Love  <cel@us.ibm.com>
15033         * doc/extend.tex: Fix typo in second arg in
15034         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
15036 2018-01-29  Richard Biener  <rguenther@suse.de>
15038         PR tree-optimization/84086
15039         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
15040         (flush_ssaname_freelist): When SSA names were released reset
15041         the SCEV hash table.
15043 2018-01-29  Richard Biener  <rguenther@suse.de>
15045         PR tree-optimization/84057
15046         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
15047         removed paths when removing edges.
15049 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
15051         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
15052         -mfunction-return=@var{choice}.
15054 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15056         PR diagnostic/84034
15057         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
15058         Handle CR like TAB.
15059         (layout::print_source_line): Likewise.
15060         (test_get_line_width_without_trailing_whitespace): Add test cases.
15062 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
15064         PR middle-end/84040
15065         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
15066         debug insns.
15068 2018-01-26  Jim Wilson  <jimw@sifive.com>
15070         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
15072         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
15073         specified.
15075 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15077         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
15078         and CMP + SUB-immediate -> SUBS.
15080 2018-01-26  Martin Sebor  <msebor@redhat.com>
15082         PR tree-optimization/83896
15083         * tree-ssa-strlen.c (get_string_len): Rename...
15084         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
15085         Avoid assuming length is constant.
15086         (handle_char_store): Use HOST_WIDE_INT for string length.
15088 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
15090         PR target/81763
15091         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
15092         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
15094 2018-01-26  Richard Biener  <rguenther@suse.de>
15096         PR rtl-optimization/84003
15097         * dse.c (record_store): Only record redundant stores when
15098         the earlier store aliases at least all accesses the later one does.
15100 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
15102         PR rtl-optimization/83985
15103         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
15104         REG_CFA_RESTORE insns.
15105         (delete_unmarked_insns): Don't ignore separate shrink wrapping
15106         REG_CFA_RESTORE insns here.
15108         PR c/83989
15109         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
15110         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
15112 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15114         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
15115         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
15116         (arc_init): Likewise.
15117         (arc_override_options): Likewise.
15118         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
15119         value.
15120         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
15121         support.
15122         * config/arc/arc.h (TARGET_DBNZ): Define.
15123         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
15124         properly set the tune attribute.
15125         (dbnz): Use TARGET_DBNZ guard.
15126         * config/arc/arc.opt (mtune): Add core3 option.
15128 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15130         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15131         recognize new pic like addresses.
15132         (arc_delegitimize_address): Clean up.
15134 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15136         * config/arc/arc-arches.def: Option mrf16 valid for all
15137         architectures.
15138         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15139         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15140         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15141         * config/arc/arc-tables.opt: Regenerate.
15142         * config/arc/arc.c (arc_conditional_register_usage): Handle
15143         reduced register file case.
15144         (arc_file_start): Set must have build attributes.
15145         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
15146         mrf16 option value.
15147         * config/arc/arc.opt (mrf16): Add new option.
15148         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
15149         * config/arc/genmultilib.awk: Handle new mrf16 option.
15150         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
15151         * config/arc/t-multilib: Regenerate.
15152         * doc/invoke.texi (ARC Options): Document mrf16 option.
15154 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15156         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
15157         * config/arc/arc.c (arc_handle_secure_attribute): New function.
15158         (arc_attribute_table): Add 'secure_call' attribute.
15159         (arc_print_operand): Print secure call operand.
15160         (arc_function_ok_for_sibcall): Don't optimize tail calls when
15161         secure.
15162         (arc_is_secure_call_p): New function.  * config/arc/arc.md
15163         (call_i): Add support for sjli instruction.
15164         (call_value_i): Likewise.
15165         * config/arc/constraints.md (Csc): New constraint.
15167 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15168             John Eric Martin  <John.Martin@emmicro-us.com>
15170         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
15171         * config/arc/arc.c (_arc_jli_section): New struct.
15172         (arc_jli_section): New type.
15173         (rc_jli_sections): New static variable.
15174         (arc_handle_jli_attribute): New function.
15175         (arc_attribute_table): Add jli_always and jli_fixed attribute.
15176         (arc_file_end): New function.
15177         (TARGET_ASM_FILE_END): Define.
15178         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
15179         (arc_add_jli_section): New function.
15180         (jli_call_scan): Likewise.
15181         (arc_reorg): Call jli_call_scan.
15182         (arc_output_addsi): Remove 'S' from printing asm operand.
15183         (arc_is_jli_call_p): New function.
15184         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
15185         operand.
15186         (movhi_insn): Likewise.
15187         (movsi_insn): Likewise.
15188         (movsi_set_cc_insn): Likewise.
15189         (loadqi_update): Likewise.
15190         (load_zeroextendqisi_update): Likewise.
15191         (load_signextendqisi_update): Likewise.
15192         (loadhi_update): Likewise.
15193         (load_zeroextendhisi_update): Likewise.
15194         (load_signextendhisi_update): Likewise.
15195         (loadsi_update): Likewise.
15196         (loadsf_update): Likewise.
15197         (movsicc_insn): Likewise.
15198         (bset_insn): Likewise.
15199         (bxor_insn): Likewise.
15200         (bclr_insn): Likewise.
15201         (bmsk_insn): Likewise.
15202         (bicsi3_insn): Likewise.
15203         (cmpsi_cc_c_insn): Likewise.
15204         (movsi_ne): Likewise.
15205         (movsi_cond_exec): Likewise.
15206         (clrsbsi2): Likewise.
15207         (norm_f): Likewise.
15208         (normw): Likewise.
15209         (swap): Likewise.
15210         (divaw): Likewise.
15211         (flag): Likewise.
15212         (sr): Likewise.
15213         (kflag): Likewise.
15214         (ffs): Likewise.
15215         (ffs_f): Likewise.
15216         (fls): Likewise.
15217         (call_i): Remove 'S' asm letter, add jli instruction.
15218         (call_value_i): Likewise.
15219         * config/arc/arc.op (mjli-always): New option.
15220         * config/arc/constraints.md (Cji): New constraint.
15221         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
15222         operand.
15223         (subsf3_fpx): Likewise.
15224         (mulsf3_fpx): Likewise.
15225         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
15226         asm operand.
15227         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
15228         function attrbutes.
15229         * doc/invoke.texi (ARC): Document mjli-always option.
15231 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
15233         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
15234         avoid addition with 0 and use incw and decw where possible.
15236 2018-01-26  Richard Biener  <rguenther@suse.de>
15238         PR tree-optimization/81082
15239         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
15240         association if it requires casting to unsigned.
15241         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
15242         from fold_plusminus_mult_expr to catch important cases late when
15243         range info is available.
15245 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15247         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
15248         * configure.ac (hidden_linkonce): New test.
15249         * configure: Regenerate.
15250         * config.in: Regenerate.
15252 2018-01-26  Julia Koval  <julia.koval@intel.com>
15254         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
15255         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
15256         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
15257         _mm_mask_bitshuffle_epi64_mask): Fix type.
15258         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
15259         USI_FTYPE_V4DI_V4DI_USI): Remove.
15260         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
15261         __builtin_ia32_vpshufbitqmb256_mask,
15262         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
15263         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
15264         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
15266 2018-01-26  Alan Modra  <amodra@gmail.com>
15268         PR target/84033
15269         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
15270         UNSPEC_VBPERMQ.  Sort other unspecs.
15272 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
15274         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
15276 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
15278         PR middle-end/83055
15279         * predict.c (drop_profile): Do not push/pop cfun; update also
15280         node->count.
15281         (handle_missing_profiles): Fix logic looking for zero profiles.
15283 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
15285         PR middle-end/83977
15286         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
15287         on functions with #pragma omp declare simd or functions with simd
15288         attribute.
15289         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
15290         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
15291         Remove trailing \n from warning_at calls.
15293 2018-01-25  Tom de Vries  <tom@codesourcery.com>
15295         PR target/84028
15296         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15297         for neutered workers.
15299 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
15301         PR target/68467
15302         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
15303         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
15305 2018-01-24  Jeff Law  <law@redhat.com>
15307         PR target/83994
15308         * i386.c (get_probe_interval): Move to earlier point.
15309         (ix86_compute_frame_layout): If -fstack-clash-protection and
15310         the frame is larger than the probe interval, then use pushes
15311         to save registers rather than reg->mem moves.
15312         (ix86_expand_prologue): Remove conditional for int_registers_saved
15313         assertion.
15315 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
15317         PR target/84014
15318         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
15319         min/max for never referenced object.
15321 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
15323         PR middle-end/83977
15324         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
15325         here.
15326         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
15327         attributes from DECL_ATTRIBUTES (decl) without affecting
15328         DECL_ATTRIBUTES (current_function_decl).
15329         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
15330         functions with non-NULL DECL_ABSTRACT_ORIGIN.
15332 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
15334         PR tree-optimization/83979
15335         * fold-const.c (fold_comparison): Use constant_boolean_node
15336         instead of boolean_{true,false}_node.
15338 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
15340         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
15341         with zero counts.
15343 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15345         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15346         Simplify the clause that sets the length attribute.
15347         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15348         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
15349         clause that sets the length attribute.
15350         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15352 2018-01-24  Tom de Vries  <tom@codesourcery.com>
15354         PR target/83589
15355         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
15356         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
15357         Add strict parameter.
15358         (prevent_branch_around_nothing): Insert dummy insn between branch to
15359         label and label with no ptx insn inbetween.
15360         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
15362 2018-01-24  Tom de Vries  <tom@codesourcery.com>
15364         PR target/81352
15365         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15366         for neutered threads in warp.
15367         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
15369 2018-01-24  Richard Biener  <rguenther@suse.de>
15371         PR tree-optimization/83176
15372         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
15373         operands.
15375 2018-01-24  Richard Biener  <rguenther@suse.de>
15377         PR tree-optimization/82819
15378         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
15379         code generating pluses that are no-ops in the target precision.
15381 2018-01-24  Richard Biener  <rguenther@suse.de>
15383         PR middle-end/84000
15384         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
15386 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
15388         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
15389         to merge probabilities.
15390         * predict.c (probably_never_executed): Also mark as cold functions
15391         with global 0 profile and guessed local profile.
15392         * profile-count.c (profile_probability::combine_with_count): New
15393         member function.
15394         * profile-count.h (profile_probability::operator*,
15395         profile_probability::operator*=, profile_probability::operator/,
15396         profile_probability::operator/=): Reduce precision to adjusted
15397         and set value to guessed on contradictory divisions.
15398         (profile_probability::combine_with_freq): Remove.
15399         (profile_probability::combine_wiht_count): Declare.
15400         (profile_count::force_nonzero):: Set to adjusted.
15401         (profile_count::probability_in):: Set quality to adjusted.
15402         * tree-ssa-tail-merge.c (replace_block_by): Use
15403         combine_with_count.
15405 2018-01-23  Andrew Waterman  <andrew@sifive.com>
15406             Jim Wilson  <jimw@sifive.com>
15408         * config/riscv/riscv.c (riscv_stack_boundary): New.
15409         (riscv_option_override): Set riscv_stack_boundary.  Handle
15410         riscv_preferred_stack_boundary_arg.
15411         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
15412         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
15413         (STACK_BOUNDARY): Set to riscv_stack_boundary.
15414         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
15415         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
15416         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
15418 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
15420         PR target/83905
15421         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
15422         of struct ix86_frame.
15423         (ix86_expand_epilogue): Likewise.  Add a local variable for
15424         the reg_save_offset field in struct ix86_frame.
15426 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
15428         PR tree-optimization/82604
15429         * tree-loop-distribution.c (enum partition_kind): New enum item
15430         PKIND_PARTIAL_MEMSET.
15431         (partition_builtin_p): Support above new enum item.
15432         (generate_code_for_partition): Ditto.
15433         (compute_access_range): Differentiate cases that equality can be
15434         proven at all loops, the innermost loops or no loops.
15435         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
15436         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
15437         (finalize_partitions, distribute_loop): Don't fuse partition of
15438         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
15439         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
15440         parloop is enabled.
15442 2018-01-23  Martin Liska  <mliska@suse.cz>
15444         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
15445         order to ignore the predictor.
15446         (PRED_POLYMORPHIC_CALL): Likewise.
15447         (PRED_RECURSIVE_CALL): Likewise.
15449 2018-01-23  Martin Liska  <mliska@suse.cz>
15451         * tree-profile.c (tree_profiling): Print function header to
15452         aware reader which function we are working on.
15453         * value-prof.c (gimple_find_values_to_profile): Do not print
15454         not interesting value histograms.
15456 2018-01-23  Martin Liska  <mliska@suse.cz>
15458         * profile-count.h (enum profile_quality): Add
15459         profile_uninitialized as the first value. Do not number values
15460         as they are zero based.
15461         (profile_count::verify): Update sanity check.
15462         (profile_probability::verify): Likewise.
15464 2018-01-23  Nathan Sidwell  <nathan@acm.org>
15466         * doc/invoke.texi (ffor-scope): Deprecate.
15468 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
15470         PR tree-optimization/83510
15471         * domwalk.c (set_all_edges_as_executable): New function.
15472         (dom_walker::dom_walker): Convert bool param
15473         "skip_unreachable_blocks" to enum reachability.  Move setup of
15474         edge flags to set_all_edges_as_executable and only do it when
15475         reachability is REACHABLE_BLOCKS.
15476         * domwalk.h (enum dom_walker::reachability): New enum.
15477         (dom_walker::dom_walker): Convert bool param
15478         "skip_unreachable_blocks" to enum reachability.
15479         (set_all_edges_as_executable): New decl.
15480         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
15481         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
15482         "reachability".
15483         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
15484         but converting true to REACHABLE_BLOCKS.
15485         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
15486         * tree-vrp.c
15487         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
15488         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
15489         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
15490         REACHABLE_BLOCKS.
15491         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
15492         if check_all_array_refs will be called.
15494 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
15496         * tree.c (selftest::test_location_wrappers): Add more test
15497         coverage.
15499 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
15501         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
15502         (selftest::test_bit_in_range): Likewise.
15504 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
15506         PR testsuite/83888
15507         * doc/sourcebuild.texi (vect_float): Say that the selector
15508         only describes the situation when -funsafe-math-optimizations is on.
15509         (vect_float_strict): Document.
15511 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
15513         PR tree-optimization/83965
15514         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15515         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
15516         instead of checking only for a reduction.
15517         (vect_recog_widen_sum_pattern): Likewise.
15519 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
15521         * predict.c (probably_never_executed): Only use precise profile info.
15522         (compute_function_frequency): Skip after inlining hack since we now
15523         have quality checking.
15525 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
15527         * profile-count.h (profile_probability::very_unlikely,
15528         profile_probability::unlikely, profile_probability::even): Set
15529         precision to guessed.
15531 2018-01-23  Richard Biener  <rguenther@suse.de>
15533         PR tree-optimization/83963
15534         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
15535         Properly terminate dominator walk when crossing the exit edge not
15536         when visiting its source block.
15538 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
15540         PR c++/83918
15541         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
15542         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
15544 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
15546         PR tree-optimization/83957
15547         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
15548         semicolon after for body surrounded by braces.
15550         PR tree-optimization/83081
15551         * profile-count.h (profile_probability::split): New method.
15552         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
15553         Use profile_probability::split.
15554         (do_compare_rtx_and_jump): Fix adjustment of probabilities
15555         when splitting a single conditional jump into 2.
15557 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
15559         PR tree-optimization/69452
15560         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
15561         decl.
15563 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15565         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
15566         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
15567         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
15569 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15571         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
15572         declaration.
15573         * config/rl78/rl78.md (movdi): New define_expand.
15574         * config/rl78/rl78.c (rl78_split_movdi): New function.
15576 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
15578         PR target/83862
15579         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
15580         no longer used.
15581         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
15582         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
15583         128-bit to produce an UNSPEC move to get the double word with the
15584         signbit and then a shift directly to do signbit.
15585         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
15586         implementation with a new version that just does either a direct
15587         move or a regular move.  Move memory interface to separate insns.
15588         Move insns so they are next to the expander.
15589         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
15590         with signbit move.  Split big and little endian case.
15591         (signbit<mode>2_dm_mem_le): Likewise.
15592         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
15593         (signbit<mode>2_dm2): Likewise.
15595 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15597         * config/rl78/rl78.md (anddi3): New define_expand.
15599 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15601         * config/rl78/rl78.md (umindi3): New define_expand.
15603 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15605         * config/rl78/rl78.md (smindi3): New define_expand.
15607 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15609         * config/rl78/rl78.md (smaxdi3): New define_expand.
15611 2018-01-22  Carl Love  <cel@us.ibm.com>
15613         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
15614         LVX_V1TI): Add macro expansion.
15615         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
15616         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
15617         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
15618         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
15619         Change check to determine if the instruction is a byte reversing
15620         entry.  Fix typo in comment.
15621         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
15622         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
15623         Add def_builtin calls for new builtins.
15624         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
15625         Add define_insn expansion.
15627 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15629         * config/rl78/rl78.md (umaxdi3): New define_expand.
15631 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15633         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
15634         for non-QImode registers.
15636 2018-01-22  Richard Biener  <rguenther@suse.de>
15638         PR tree-optimization/83963
15639         * graphite-scop-detection.c (scop_detection::get_sese): Delay
15640         including the loop exit block.
15641         (scop_detection::merge_sese): Likewise.
15642         (scop_detection::add_scop): Do it here instead.
15644 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15646         * doc/sourcebuild.texi (arm_softfloat): Document.
15648 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
15650         PR gcc/77734
15651         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
15652         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
15653         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
15655 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15656             David Edelsohn  <dje.gcc@gmail.com>
15658         PR target/83946
15659         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15660         Change "crset eq" to "crset 2".
15661         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15662         (*call_indirect_aix<mode>_nospec): Likewise.
15663         (*call_value_indirect_aix<mode>_nospec): Likewise.
15664         (*call_indirect_elfv2<mode>_nospec): Likewise.
15665         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
15666         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
15667         change assembly output from . to $.
15668         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15669         (indirect_jump<mode>_nospec): Change assembly output from . to $.
15670         (*tablejump<mode>_internal1_nospec): Likewise.
15672 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
15674         PR target/80870
15675         * config/sh/sh_optimize_sett_clrt.cc:
15676         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
15678 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
15680         PR tree-optimization/83940
15681         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
15682         offset_dt to vect_constant_def rather than vect_unknown_def_type.
15683         (vect_check_load_store_mask): Add a mask_dt_out parameter and
15684         use it to pass back the definition type.
15685         (vect_check_store_rhs): Likewise rhs_dt_out.
15686         (vect_build_gather_load_calls): Add a mask_dt argument and use
15687         it instead of a call to vect_is_simple_use.
15688         (vectorizable_store): Update calls to vect_check_load_store_mask
15689         and vect_check_store_rhs.  Use the dt returned by the latter instead
15690         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
15691         instead of calls to vect_is_simple_use.  Pass the scalar rather
15692         than the vector operand to vect_is_simple_use when handling
15693         second and subsequent copies of an rhs value.
15694         (vectorizable_load): Update calls to vect_check_load_store_mask
15695         and vect_build_gather_load_calls.  Use the cached mask_dt and
15696         gs_info.offset_dt instead of calls to vect_is_simple_use.
15698 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
15700         PR middle-end/83945
15701         * tree-emutls.c: Include gimplify.h.
15702         (lower_emutls_2): New function.
15703         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
15704         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
15705         it before further processing.
15707         PR target/83930
15708         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
15709         UINTVAL (trueop1) instead of INTVAL (op1).
15711 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
15713         PR debug/81570
15714         PR debug/83728
15715         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
15716         INCOMING_FRAME_SP_OFFSET if not defined.
15717         (scan_trace): Add ENTRY argument.  If true and
15718         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
15719         emit a note to adjust the CFA offset.
15720         (create_cfi_notes): Adjust scan_trace callers.
15721         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
15722         INCOMING_FRAME_SP_OFFSET in the CIE.
15723         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
15724         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
15725         Likewise.
15726         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
15727         * doc/tm.texi: Regenerated.
15729 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15731         PR rtl-optimization/83147
15732         * lra-constraints.c (remove_inheritance_pseudos): Use
15733         lra_substitute_pseudo_within_insn.
15735 2018-01-19  Tom de Vries  <tom@codesourcery.com>
15736             Cesar Philippidis  <cesar@codesourcery.com>
15738         PR target/83920
15739         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
15741 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
15743         PR target/83790
15744         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
15745         spaces for function labels.
15747 2018-01-19  Martin Liska  <mliska@suse.cz>
15749         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
15750         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
15751         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
15752         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
15753         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
15754         (PRED_CONST_RETURN): Change from 69 to 65.
15755         (PRED_NULL_RETURN): Change from 91 to 71.
15756         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
15757         (PRED_LOOP_GUARD): Change from 66 to 73.
15759 2018-01-19  Martin Liska  <mliska@suse.cz>
15761         * predict.c (predict_insn_def): Add new assert.
15762         (struct branch_predictor): Change type to signed integer.
15763         (test_prediction_value_range): Amend test to cover
15764         PROB_UNINITIALIZED.
15765         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
15766         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
15767         (PRED_LOOP_ITERATIONS_MAX): Likewise.
15768         (PRED_LOOP_IV_COMPARE): Likewise.
15769         * predict.h (PROB_UNINITIALIZED): Define new constant.
15771 2018-01-19  Martin Liska  <mliska@suse.cz>
15773         * predict.c (dump_prediction): Add new format for
15774         analyze_brprob.py script which is enabled with -details
15775         suboption.
15776         * profile-count.h (precise_p): New function.
15778 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
15780         PR tree-optimization/83922
15781         * tree-vect-loop.c (vect_verify_full_masking): Return false if
15782         there are no statements that need masking.
15783         (vect_active_double_reduction_p): New function.
15784         (vect_analyze_loop_operations): Use it when handling phis that
15785         are not in the loop header.
15787 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
15789         PR tree-optimization/83914
15790         * tree-vect-loop.c (vectorizable_induction): Don't convert
15791         init_expr or apply the peeling adjustment for inductions
15792         that are nested within the vectorized loop.
15794 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15796         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
15797         instead of NEG.
15799 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
15801         PR sanitizer/81715
15802         PR testsuite/83882
15803         * function.h (gimplify_parameters): Add gimple_seq * argument.
15804         * function.c: Include gimple.h and options.h.
15805         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
15806         for the added local temporaries if needed.
15807         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
15808         if there are any parameter cleanups, wrap whole body into a
15809         try/finally with the cleanups.
15811 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
15813         PR target/82964
15814         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
15815         Use GET_MODE_CLASS for scalar floating point.
15817 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
15819         PR ipa/82256
15820         patch by PaX Team
15821         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
15822         Fix call of call_cgraph_insertion_hooks.
15824 2018-01-18  Martin Sebor  <msebor@redhat.com>
15826         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
15828 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
15830         PR ipa/83619
15831         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
15832         frequencies.
15834 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
15836         PR other/70268
15837         * common.opt: (-ffile-prefix-map): New option.
15838         * opts.c (common_handle_option): Defer it.
15839         * opts-global.c (handle_common_deferred_options): Handle it.
15840         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
15841         * file-prefix-map.h: New file.
15842         (remap_debug_filename, add_debug_prefix_map): ...here.
15843         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
15844         * final.c (debug_prefix_map, add_debug_prefix_map
15845         remap_debug_filename): Move to...
15846         * file-prefix-map.c: New file.
15847         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
15848         generalize, get rid of alloca(), use strrchr() instead of strchr().
15849         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
15850         Implement in terms of add_prefix_map().
15851         (remap_macro_filename, remap_debug_filename): Implement in term of
15852         remap_filename().
15853         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
15854         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
15855         * dbxout.c: Include file-prefix-map.h.
15856         * varasm.c: Likewise.
15857         * vmsdbgout.c: Likewise.
15858         * xcoffout.c: Likewise.
15859         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
15860         * doc/cppopts.texi (-fmacro-prefix-map): Document.
15861         * doc/invoke.texi (-ffile-prefix-map): Document.
15862         (-fdebug-prefix-map): Update description.
15864 2018-01-18  Martin Liska  <mliska@suse.cz>
15866         * config/i386/i386.c (indirect_thunk_name): Document that also
15867         lfence is emitted.
15868         (output_indirect_thunk): Document why both instructions
15869         (pause and lfence) are generated.
15871 2018-01-18  Richard Biener  <rguenther@suse.de>
15873         PR tree-optimization/83887
15874         * graphite-scop-detection.c
15875         (scop_detection::get_nearest_dom_with_single_entry): Remove.
15876         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
15877         (scop_detection::merge_sese): Re-implement with a flood-fill
15878         algorithm that properly finds a SESE region if it exists.
15880 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
15882         PR c/61240
15883         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
15884         pointer_diff optimizations use view_convert instead of convert.
15886 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15888         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15889         Generate different code for -mno-speculate-indirect-jumps.
15890         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15891         (*call_indirect_aix<mode>): Disable for
15892         -mno-speculate-indirect-jumps.
15893         (*call_indirect_aix<mode>_nospec): New define_insn.
15894         (*call_value_indirect_aix<mode>): Disable for
15895         -mno-speculate-indirect-jumps.
15896         (*call_value_indirect_aix<mode>_nospec): New define_insn.
15897         (*sibcall_nonlocal_sysv<mode>): Generate different code for
15898         -mno-speculate-indirect-jumps.
15899         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15901 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
15903         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
15904         long double type, set the flags for noting the default long double
15905         type, even if we don't pass or return a long double type.
15907 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
15909         PR ipa/83051
15910         * ipa-inline.c (flatten_function): Do not overwrite final inlining
15911         failure.
15913 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
15915         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
15916         support for merge[hl].
15917         (fold_mergehl_helper): New helper function.
15918         (tree-vector-builder.h): New #include for tree_vector_builder usage.
15919         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
15920         (altivec_vmrglw_direct): Add xxmrglw insn.
15922 2018-01-17  Andrew Waterman  <andrew@sifive.com>
15924         * config/riscv/riscv.c (riscv_conditional_register_usage): If
15925         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
15927 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
15929         PR lto/83121
15930         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
15931         call the lto_location_cache before reading the
15932         DECL_SOURCE_LOCATION of the types.
15934 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
15935             Richard Sandiford  <richard.sandiford@linaro.org>
15937         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
15938         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
15939         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
15940         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
15941         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
15942         Add declaration.
15943         * config/aarch64/constraints.md (aarch64_movti_operand):
15944         Limit immediates.
15945         * config/aarch64/predicates.md (Uti): Add new constraint.
15947 2018-01-17 Carl Love  <cel@us.ibm.com>
15949         * config/rs6000/vsx.md (define_expand xl_len_r,
15950         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
15951         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
15952         lxvll.
15953         (define_expand, define_insn): Move the shift left from  the
15954         define_insn to the define_expand for lxvl and stxvl instructions.
15955         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
15956         and XL_LEN_R definitions to PURE.
15958 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
15960         * config/i386/i386.c (indirect_thunk_name): Declare regno
15961         as unsigned int.  Compare regno with INVALID_REGNUM.
15962         (output_indirect_thunk): Ditto.
15963         (output_indirect_thunk_function): Ditto.
15964         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
15965         in the call to output_indirect_thunk_function.
15967 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
15969         PR middle-end/83884
15970         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
15971         rather than the size of inner_type to determine the stack slot size
15972         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
15974 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
15976         PR target/83546
15977         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
15978         to PTA_SILVERMONT.
15980 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
15982         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
15983         endian Linux systems to optionally enable multilibs for selecting
15984         the long double type if the user configured an explicit type.
15985         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
15986         have no long double multilibs if not defined.
15987         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
15988         warn if the user used -mabi={ieee,ibm}longdouble and we built
15989         multilibs for long double.
15990         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
15991         appropriate multilib option.
15992         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
15993         multilib options.
15994         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
15995         for building long double multilibs.
15996         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
15998 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
16000         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
16001         copies.
16003         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
16004         64 bits.
16005         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
16006         128 bits.
16008         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
16009         variables.
16011         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
16012         return value.
16014 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
16016         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
16017         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
16019 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16021         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
16022         different rtl trees depending on TARGET_64BIT.
16023         (rs6000_gen_lvx): Likewise.
16025 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
16027         * config/visium/visium.md (nop): Tweak comment.
16028         (hazard_nop): Likewise.
16030 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16032         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
16033         -mspeculate-indirect-jumps.
16034         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
16035         for -mno-speculate-indirect-jumps.
16036         (*call_indirect_elfv2<mode>_nospec): New define_insn.
16037         (*call_value_indirect_elfv2<mode>): Disable for
16038         -mno-speculate-indirect-jumps.
16039         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
16040         (indirect_jump): Emit different RTL for
16041         -mno-speculate-indirect-jumps.
16042         (*indirect_jump<mode>): Disable for
16043         -mno-speculate-indirect-jumps.
16044         (*indirect_jump<mode>_nospec): New define_insn.
16045         (tablejump): Emit different RTL for
16046         -mno-speculate-indirect-jumps.
16047         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
16048         (tablejumpsi_nospec): New define_expand.
16049         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
16050         (tablejumpdi_nospec): New define_expand.
16051         (*tablejump<mode>_internal1): Disable for
16052         -mno-speculate-indirect-jumps.
16053         (*tablejump<mode>_internal1_nospec): New define_insn.
16054         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
16055         option.
16057 2018-01-16  Artyom Skrobov tyomitch@gmail.com
16059         * caller-save.c (insert_save): Drop unnecessary parameter.  All
16060         callers updated.
16062 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16063             Richard Biener  <rguenth@suse.de>
16065         PR libgomp/83590
16066         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
16067         return early, inline manually is_gimple_sizepos.  Make sure if we
16068         call gimplify_expr we don't end up with a gimple constant.
16069         * tree.c (variably_modified_type_p): Don't return true for
16070         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
16071         * gimplify.h (is_gimple_sizepos): Remove.
16073 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16075         PR tree-optimization/83857
16076         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
16077         vectorizable_live_operation for pure SLP statements.
16078         (vectorizable_live_operation): Handle PHIs.
16080 2018-01-16  Richard Biener  <rguenther@suse.de>
16082         PR tree-optimization/83867
16083         * tree-vect-stmts.c (vect_transform_stmt): Precompute
16084         nested_in_vect_loop_p since the scalar stmt may get invalidated.
16086 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16088         PR c/83844
16089         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
16090         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
16091         If off is not INTEGER_CST, issue a may not be aligned warning
16092         rather than isn't aligned.  Use isn%'t rather than isn't.
16093         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
16094         into MULT_EXPR.
16095         <case MULT_EXPR>: Improve the case when bottom and one of the
16096         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
16097         operand, in that case check if the other operand is multiple of
16098         bottom divided by the INTEGER_CST operand.
16100 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16102         PR target/83858
16103         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
16104         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
16105         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
16106         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
16107         * config/pa/pa.c (pa_function_arg_advance): Likewise.
16108         (pa_function_arg, pa_arg_partial_bytes): Likewise.
16109         (pa_function_arg_size): New function.
16111 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16113         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
16114         in a separate statement.
16116 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16118         PR tree-optimization/83847
16119         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
16120         group gathers and scatters.
16122 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16124         PR rtl-optimization/86620
16125         * params.def (max-sched-ready-insns): Bump minimum value to 1.
16127         PR rtl-optimization/83213
16128         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16129         to last if both are JUMP_INSNs.
16131         PR tree-optimization/83843
16132         * gimple-ssa-store-merging.c
16133         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16134         store_immediate_info for bswap/nop orig_stores.
16136 2018-01-15  Andrew Waterman  <andrew@sifive.com>
16138         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16139         !TARGET_MUL.
16140         <UDIV>: Increase cost if !TARGET_DIV.
16142 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
16144         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
16145         (define_attr "cr_logical_3op"): New.
16146         (cceq_ior_compare): Adjust.
16147         (cceq_ior_compare_complement): Adjust.
16148         (*cceq_rev_compare): Adjust.
16149         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
16150         (is_cracked_insn): Adjust.
16151         (insn_must_be_first_in_group): Adjust.
16152         * config/rs6000/40x.md: Adjust.
16153         * config/rs6000/440.md: Adjust.
16154         * config/rs6000/476.md: Adjust.
16155         * config/rs6000/601.md: Adjust.
16156         * config/rs6000/603.md: Adjust.
16157         * config/rs6000/6xx.md: Adjust.
16158         * config/rs6000/7450.md: Adjust.
16159         * config/rs6000/7xx.md: Adjust.
16160         * config/rs6000/8540.md: Adjust.
16161         * config/rs6000/cell.md: Adjust.
16162         * config/rs6000/e300c2c3.md: Adjust.
16163         * config/rs6000/e500mc.md: Adjust.
16164         * config/rs6000/e500mc64.md: Adjust.
16165         * config/rs6000/e5500.md: Adjust.
16166         * config/rs6000/e6500.md: Adjust.
16167         * config/rs6000/mpc.md: Adjust.
16168         * config/rs6000/power4.md: Adjust.
16169         * config/rs6000/power5.md: Adjust.
16170         * config/rs6000/power6.md: Adjust.
16171         * config/rs6000/power7.md: Adjust.
16172         * config/rs6000/power8.md: Adjust.
16173         * config/rs6000/power9.md: Adjust.
16174         * config/rs6000/rs64.md: Adjust.
16175         * config/rs6000/titan.md: Adjust.
16177 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16179         * config/i386/predicates.md (indirect_branch_operand): Rewrite
16180         ix86_indirect_branch_register logic.
16182 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16184         * config/i386/constraints.md (Bs): Update
16185         ix86_indirect_branch_register check.  Don't check
16186         ix86_indirect_branch_register with GOT_memory_operand.
16187         (Bw): Likewise.
16188         * config/i386/predicates.md (GOT_memory_operand): Don't check
16189         ix86_indirect_branch_register here.
16190         (GOT32_symbol_operand): Likewise.
16192 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16194         * config/i386/predicates.md (constant_call_address_operand):
16195         Rewrite ix86_indirect_branch_register logic.
16196         (sibcall_insn_operand): Likewise.
16198 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16200         * config/i386/constraints.md (Bs): Replace
16201         ix86_indirect_branch_thunk_register with
16202         ix86_indirect_branch_register.
16203         (Bw): Likewise.
16204         * config/i386/i386.md (indirect_jump): Likewise.
16205         (tablejump): Likewise.
16206         (*sibcall_memory): Likewise.
16207         (*sibcall_value_memory): Likewise.
16208         Peepholes of indirect call and jump via memory: Likewise.
16209         * config/i386/i386.opt: Likewise.
16210         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16211         (GOT_memory_operand): Likewise.
16212         (call_insn_operand): Likewise.
16213         (sibcall_insn_operand): Likewise.
16214         (GOT32_symbol_operand): Likewise.
16216 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
16218         PR middle-end/83837
16219         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
16220         type rather than type addr's type points to.
16221         (expand_omp_atomic_mutex): Likewise.
16222         (expand_omp_atomic): Likewise.
16224 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16226         PR target/83839
16227         * config/i386/i386.c (output_indirect_thunk_function): Use
16228         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
16229         for  __x86_return_thunk.
16231 2018-01-15  Richard Biener  <rguenther@suse.de>
16233         PR middle-end/83850
16234         * expmed.c (extract_bit_field_1): Fix typo.
16236 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16238         PR target/83687
16239         * config/arm/iterators.md (VF): New mode iterator.
16240         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
16241         Remove integer-related logic from pattern.
16242         (neon_vabd<mode>_3): Likewise.
16244 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
16246         PR middle-end/82694
16247         * common.opt (fstrict-overflow): No longer an alias.
16248         (fwrapv-pointer): New option.
16249         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
16250         also for pointer types based on flag_wrapv_pointer.
16251         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
16252         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
16253         opts->x_flag_wrapv got set.
16254         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
16255         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
16256         POINTER_TYPE_OVERFLOW_UNDEFINED.
16257         * match.pd: Likewise in address comparison pattern.
16258         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
16260 2018-01-15  Richard Biener  <rguenther@suse.de>
16262         PR lto/83804
16263         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
16264         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
16265         Reset type names to their identifier if their TYPE_DECL doesn't
16266         have linkage (and thus is used for ODR and devirt).
16267         (save_debug_info_for_decl): Remove.
16268         (save_debug_info_for_type): Likewise.
16269         (add_tree_to_fld_list): Adjust.
16270         * tree-pretty-print.c (dump_generic_node): Make dumping of
16271         type names more robust.
16273 2018-01-15  Richard Biener  <rguenther@suse.de>
16275         * BASE-VER: Bump to 8.0.1.
16277 2018-01-14  Martin Sebor  <msebor@redhat.com>
16279         PR other/83508
16280         * builtins.c (check_access): Avoid warning when the no-warning bit
16281         is set.
16283 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
16285         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
16286         * ira-color (allocno_hard_regs_compare): Likewise.
16288 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
16290         PR target/83013
16291         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
16292         Use .pushsection/.popsection.
16294 2018-01-14  Martin Sebor  <msebor@redhat.com>
16296         PR c++/81327
16297         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
16299 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
16301         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
16302         entry from extra_headers.
16303         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
16304         extra_headers, make the list bitwise identical to the i?86-*-* one.
16306 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16308         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
16309         -mcmodel=large with -mindirect-branch=thunk,
16310         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
16311         -mfunction-return=thunk-extern.
16312         * doc/invoke.texi: Document -mcmodel=large is incompatible with
16313         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
16314         -mfunction-return=thunk and -mfunction-return=thunk-extern.
16316 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16318         * config/i386/i386.c (print_reg): Print the name of the full
16319         integer register without '%'.
16320         (ix86_print_operand): Handle 'V'.
16321         * doc/extend.texi: Document 'V' modifier.
16323 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16325         * config/i386/constraints.md (Bs): Disallow memory operand for
16326         -mindirect-branch-register.
16327         (Bw): Likewise.
16328         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16329         (GOT_memory_operand): Likewise.
16330         (call_insn_operand): Likewise.
16331         (sibcall_insn_operand): Likewise.
16332         (GOT32_symbol_operand): Likewise.
16333         * config/i386/i386.md (indirect_jump): Call convert_memory_address
16334         for -mindirect-branch-register.
16335         (tablejump): Likewise.
16336         (*sibcall_memory): Likewise.
16337         (*sibcall_value_memory): Likewise.
16338         Disallow peepholes of indirect call and jump via memory for
16339         -mindirect-branch-register.
16340         (*call_pop): Replace m with Bw.
16341         (*call_value_pop): Likewise.
16342         (*sibcall_pop_memory): Replace m with Bs.
16343         * config/i386/i386.opt (mindirect-branch-register): New option.
16344         * doc/invoke.texi: Document -mindirect-branch-register option.
16346 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16348         * config/i386/i386-protos.h (ix86_output_function_return): New.
16349         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
16350         set function_return_type.
16351         (indirect_thunk_name): Add ret_p to indicate thunk for function
16352         return.
16353         (output_indirect_thunk_function): Pass false to
16354         indirect_thunk_name.
16355         (ix86_output_indirect_branch_via_reg): Likewise.
16356         (ix86_output_indirect_branch_via_push): Likewise.
16357         (output_indirect_thunk_function): Create alias for function
16358         return thunk if regno < 0.
16359         (ix86_output_function_return): New function.
16360         (ix86_handle_fndecl_attribute): Handle function_return.
16361         (ix86_attribute_table): Add function_return.
16362         * config/i386/i386.h (machine_function): Add
16363         function_return_type.
16364         * config/i386/i386.md (simple_return_internal): Use
16365         ix86_output_function_return.
16366         (simple_return_internal_long): Likewise.
16367         * config/i386/i386.opt (mfunction-return=): New option.
16368         (indirect_branch): Mention -mfunction-return=.
16369         * doc/extend.texi: Document function_return function attribute.
16370         * doc/invoke.texi: Document -mfunction-return= option.
16372 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16374         * config/i386/i386-opts.h (indirect_branch): New.
16375         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
16376         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
16377         with local indirect jump when converting indirect call and jump.
16378         (ix86_set_indirect_branch_type): New.
16379         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
16380         (indirectlabelno): New.
16381         (indirect_thunk_needed): Likewise.
16382         (indirect_thunk_bnd_needed): Likewise.
16383         (indirect_thunks_used): Likewise.
16384         (indirect_thunks_bnd_used): Likewise.
16385         (INDIRECT_LABEL): Likewise.
16386         (indirect_thunk_name): Likewise.
16387         (output_indirect_thunk): Likewise.
16388         (output_indirect_thunk_function): Likewise.
16389         (ix86_output_indirect_branch_via_reg): Likewise.
16390         (ix86_output_indirect_branch_via_push): Likewise.
16391         (ix86_output_indirect_branch): Likewise.
16392         (ix86_output_indirect_jmp): Likewise.
16393         (ix86_code_end): Call output_indirect_thunk_function if needed.
16394         (ix86_output_call_insn): Call ix86_output_indirect_branch if
16395         needed.
16396         (ix86_handle_fndecl_attribute): Handle indirect_branch.
16397         (ix86_attribute_table): Add indirect_branch.
16398         * config/i386/i386.h (machine_function): Add indirect_branch_type
16399         and has_local_indirect_jump.
16400         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
16401         to true.
16402         (tablejump): Likewise.
16403         (*indirect_jump): Use ix86_output_indirect_jmp.
16404         (*tablejump_1): Likewise.
16405         (simple_return_indirect_internal): Likewise.
16406         * config/i386/i386.opt (mindirect-branch=): New option.
16407         (indirect_branch): New.
16408         (keep): Likewise.
16409         (thunk): Likewise.
16410         (thunk-inline): Likewise.
16411         (thunk-extern): Likewise.
16412         * doc/extend.texi: Document indirect_branch function attribute.
16413         * doc/invoke.texi: Document -mindirect-branch= option.
16415 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
16417         PR ipa/83051
16418         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
16420 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
16422         * ipa-inline.c (want_inline_small_function_p): Return false if
16423         inlining has already failed with CIF_FINAL_ERROR.
16424         (update_caller_keys): Call want_inline_small_function_p before
16425         can_inline_edge_p.
16426         (update_callee_keys): Likewise.
16428 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16430         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
16431         New function.
16432         (rs6000_quadword_masked_address_p): Likewise.
16433         (quad_aligned_load_p): Likewise.
16434         (quad_aligned_store_p): Likewise.
16435         (const_load_sequence_p): Add comment to describe the outer-most loop.
16436         (mimic_memory_attributes_and_flags): New function.
16437         (rs6000_gen_stvx): Likewise.
16438         (replace_swapped_aligned_store): Likewise.
16439         (rs6000_gen_lvx): Likewise.
16440         (replace_swapped_aligned_load): Likewise.
16441         (replace_swapped_load_constant): Capitalize argument name in
16442         comment describing this function.
16443         (rs6000_analyze_swaps): Add a third pass to search for vector loads
16444         and stores that access quad-word aligned addresses and replace
16445         with stvx or lvx instructions when appropriate.
16446         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
16447         New function prototype.
16448         (rs6000_quadword_masked_address_p): Likewise.
16449         (rs6000_gen_lvx): Likewise.
16450         (rs6000_gen_stvx): Likewise.
16451         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
16452         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
16453         when memory address is aligned.
16454         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
16455         this split to select lvx instruction when memory address is aligned.
16456         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
16457         instruction when memory address is aligned.
16458         (*vsx_le_perm_load_v16qi): Likewise.
16459         (four unnamed splitters): Modify to select the stvx instruction
16460         when memory is aligned.
16462 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
16464         * predict.c (determine_unlikely_bbs): Handle correctly BBs
16465         which appears in the queue multiple times.
16467 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16468             Alan Hayward  <alan.hayward@arm.com>
16469             David Sherwood  <david.sherwood@arm.com>
16471         * tree-vectorizer.h (vec_lower_bound): New structure.
16472         (_loop_vec_info): Add check_nonzero and lower_bounds.
16473         (LOOP_VINFO_CHECK_NONZERO): New macro.
16474         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
16475         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
16476         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
16477         fields.  Make seg_len the distance travelled, not including the
16478         access size.
16479         (dr_direction_indicator): Declare.
16480         (dr_zero_step_indicator): Likewise.
16481         (dr_known_forward_stride_p): Likewise.
16482         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
16483         tree-ssanames.h.
16484         (runtime_alias_check_p): Allow runtime alias checks with
16485         variable strides.
16486         (operator ==): Compare access_size and align.
16487         (prune_runtime_alias_test_list): Rework for new distinction between
16488         the access_size and seg_len.
16489         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
16490         segment lengths.
16491         (get_segment_min_max): New function.
16492         (create_intersect_range_checks): Use it.
16493         (dr_step_indicator): New function.
16494         (dr_direction_indicator): Likewise.
16495         (dr_zero_step_indicator): Likewise.
16496         (dr_known_forward_stride_p): Likewise.
16497         * tree-loop-distribution.c (data_ref_segment_size): Return
16498         DR_STEP * (niters - 1).
16499         (compute_alias_check_pairs): Update call to the dr_with_seg_len
16500         constructor.
16501         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
16502         (vect_preserves_scalar_order_p): New function, split out from...
16503         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
16504         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
16505         (vect_vfa_access_size): New function.
16506         (vect_vfa_align): Likewise.
16507         (vect_compile_time_alias): Take access_size_a and access_b arguments.
16508         (dump_lower_bound): New function.
16509         (vect_check_lower_bound): Likewise.
16510         (vect_small_gap_p): Likewise.
16511         (vectorizable_with_step_bound_p): Likewise.
16512         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
16513         depencies if the vectorization factor is 1.  Convert the checks
16514         for nonzero steps into checks on the bounds of DR_STEP.  Try using
16515         a bunds check for variable steps if the minimum required step is
16516         relatively small. Update calls to the dr_with_seg_len
16517         constructor and to vect_compile_time_alias.
16518         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
16519         function.
16520         (vect_loop_versioning): Call it.
16521         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
16522         when retrying.
16523         (vect_estimate_min_profitable_iters): Account for any bounds checks.
16525 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16526             Alan Hayward  <alan.hayward@arm.com>
16527             David Sherwood  <david.sherwood@arm.com>
16529         * doc/sourcebuild.texi (vect_scatter_store): Document.
16530         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
16531         optabs.
16532         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
16533         Document.
16534         * genopinit.c (main): Add supports_vec_scatter_store and
16535         supports_vec_scatter_store_cached to target_optabs.
16536         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
16537         IFN_MASK_SCATTER_STORE.
16538         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
16539         functions.
16540         * internal-fn.h (internal_store_fn_p): Declare.
16541         (internal_fn_stored_value_index): Likewise.
16542         * internal-fn.c (scatter_store_direct): New macro.
16543         (expand_scatter_store_optab_fn): New function.
16544         (direct_scatter_store_optab_supported_p): New macro.
16545         (internal_store_fn_p): New function.
16546         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
16547         IFN_MASK_SCATTER_STORE.
16548         (internal_fn_mask_index): Likewise.
16549         (internal_fn_stored_value_index): New function.
16550         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
16551         for scatter stores.
16552         * optabs-query.h (supports_vec_scatter_store_p): Declare.
16553         * optabs-query.c (supports_vec_scatter_store_p): New function.
16554         * tree-vectorizer.h (vect_get_store_rhs): Declare.
16555         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
16556         true for scatter stores.
16557         (vect_gather_scatter_fn_p): Handle scatter stores too.
16558         (vect_check_gather_scatter): Consider using scatter stores if
16559         supports_vec_scatter_store_p.
16560         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
16561         scatter stores too.
16562         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16563         internal_fn_stored_value_index.
16564         (check_load_store_masking): Handle scatter stores too.
16565         (vect_get_store_rhs): Make public.
16566         (vectorizable_call): Use internal_store_fn_p.
16567         (vectorizable_store): Handle scatter store internal functions.
16568         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
16569         when deciding whether the end of the group has been reached.
16570         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
16571         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
16572         (mask_scatter_store<mode>): New insns.
16574 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16575             Alan Hayward  <alan.hayward@arm.com>
16576             David Sherwood  <david.sherwood@arm.com>
16578         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
16579         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
16580         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
16581         function.
16582         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
16583         Use vect_truncate_gather_scatter_offset if we can't treat the
16584         operation as a normal gather load or scatter store.
16585         (get_group_load_store_type): Take the gather_scatter_info
16586         as argument.  Try using a gather load or scatter store for
16587         single-element groups.
16588         (get_load_store_type): Update calls to get_group_load_store_type
16589         and vect_use_strided_gather_scatters_p.
16591 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16592             Alan Hayward  <alan.hayward@arm.com>
16593             David Sherwood  <david.sherwood@arm.com>
16595         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
16596         optional tree argument.
16597         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
16598         null target hooks.
16599         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
16600         but continue to use the current value as a fallback.
16601         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
16602         to compare the updates.
16603         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
16604         (get_load_store_type): Use it when handling a strided access.
16605         (vect_get_strided_load_store_ops): New function.
16606         (vect_get_data_ptr_increment): Likewise.
16607         (vectorizable_load): Handle strided gather loads.  Always pass
16608         a step to vect_create_data_ref_ptr and bump_vector_ptr.
16610 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16611             Alan Hayward  <alan.hayward@arm.com>
16612             David Sherwood  <david.sherwood@arm.com>
16614         * doc/md.texi (gather_load@var{m}): Document.
16615         (mask_gather_load@var{m}): Likewise.
16616         * genopinit.c (main): Add supports_vec_gather_load and
16617         supports_vec_gather_load_cached to target_optabs.
16618         * optabs-tree.c (init_tree_optimization_optabs): Use
16619         ggc_cleared_alloc to allocate target_optabs.
16620         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
16621         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
16622         functions.
16623         * internal-fn.h (internal_load_fn_p): Declare.
16624         (internal_gather_scatter_fn_p): Likewise.
16625         (internal_fn_mask_index): Likewise.
16626         (internal_gather_scatter_fn_supported_p): Likewise.
16627         * internal-fn.c (gather_load_direct): New macro.
16628         (expand_gather_load_optab_fn): New function.
16629         (direct_gather_load_optab_supported_p): New macro.
16630         (direct_internal_fn_optab): New function.
16631         (internal_load_fn_p): Likewise.
16632         (internal_gather_scatter_fn_p): Likewise.
16633         (internal_fn_mask_index): Likewise.
16634         (internal_gather_scatter_fn_supported_p): Likewise.
16635         * optabs-query.c (supports_at_least_one_mode_p): New function.
16636         (supports_vec_gather_load_p): Likewise.
16637         * optabs-query.h (supports_vec_gather_load_p): Declare.
16638         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
16639         and memory_type field.
16640         (NUM_PATTERNS): Bump to 15.
16641         * tree-vect-data-refs.c: Include internal-fn.h.
16642         (vect_gather_scatter_fn_p): New function.
16643         (vect_describe_gather_scatter_call): Likewise.
16644         (vect_check_gather_scatter): Try using internal functions for
16645         gather loads.  Recognize existing calls to a gather load function.
16646         (vect_analyze_data_refs): Consider using gather loads if
16647         supports_vec_gather_load_p.
16648         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
16649         (vect_get_gather_scatter_offset_type): Likewise.
16650         (vect_convert_mask_for_vectype): Likewise.
16651         (vect_add_conversion_to_patterm): Likewise.
16652         (vect_try_gather_scatter_pattern): Likewise.
16653         (vect_recog_gather_scatter_pattern): New pattern recognizer.
16654         (vect_vect_recog_func_ptrs): Add it.
16655         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16656         internal_fn_mask_index and internal_gather_scatter_fn_p.
16657         (check_load_store_masking): Take the gather_scatter_info as an
16658         argument and handle gather loads.
16659         (vect_get_gather_scatter_ops): New function.
16660         (vectorizable_call): Check internal_load_fn_p.
16661         (vectorizable_load): Likewise.  Handle gather load internal
16662         functions.
16663         (vectorizable_store): Update call to check_load_store_masking.
16664         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
16665         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
16666         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
16667         (aarch64_gather_scale_operand_d): New predicates.
16668         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
16669         (mask_gather_load<mode>): New insns.
16671 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16672             Alan Hayward  <alan.hayward@arm.com>
16673             David Sherwood  <david.sherwood@arm.com>
16675         * optabs.def (fold_left_plus_optab): New optab.
16676         * doc/md.texi (fold_left_plus_@var{m}): Document.
16677         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
16678         * internal-fn.c (fold_left_direct): Define.
16679         (expand_fold_left_optab_fn): Likewise.
16680         (direct_fold_left_optab_supported_p): Likewise.
16681         * fold-const-call.c (fold_const_fold_left): New function.
16682         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
16683         * tree-parloops.c (valid_reduction_p): New function.
16684         (gather_scalar_reductions): Use it.
16685         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
16686         (vect_finish_replace_stmt): Declare.
16687         * tree-vect-loop.c (fold_left_reduction_fn): New function.
16688         (needs_fold_left_reduction_p): New function, split out from...
16689         (vect_is_simple_reduction): ...here.  Accept reductions that
16690         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
16691         (vect_force_simple_reduction): Also store the reduction type in
16692         the assignment's STMT_VINFO_REDUC_TYPE.
16693         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
16694         (merge_with_identity): New function.
16695         (vect_expand_fold_left): Likewise.
16696         (vectorize_fold_left_reduction): Likewise.
16697         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
16698         scalar phi in place for it.  Check for target support and reject
16699         cases that would reassociate the operation.  Defer the transform
16700         phase to vectorize_fold_left_reduction.
16701         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
16702         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
16703         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
16705 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16707         * tree-if-conv.c (predicate_mem_writes): Remove redundant
16708         call to ifc_temp_var.
16710 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16711             Alan Hayward  <alan.hayward@arm.com>
16712             David Sherwood  <david.sherwood@arm.com>
16714         * target.def (legitimize_address_displacement): Take the original
16715         offset as a poly_int.
16716         * targhooks.h (default_legitimize_address_displacement): Update
16717         accordingly.
16718         * targhooks.c (default_legitimize_address_displacement): Likewise.
16719         * doc/tm.texi: Regenerate.
16720         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
16721         as an argument, moving assert of ad->disp == ad->disp_term to...
16722         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
16723         Try calling targetm.legitimize_address_displacement before expanding
16724         the address rather than afterwards, and adjust for the new interface.
16725         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
16726         Match the new hook interface.  Handle SVE addresses.
16727         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
16728         new hook interface.
16730 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16732         * Makefile.in (OBJS): Add early-remat.o.
16733         * target.def (select_early_remat_modes): New hook.
16734         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
16735         * doc/tm.texi: Regenerate.
16736         * targhooks.h (default_select_early_remat_modes): Declare.
16737         * targhooks.c (default_select_early_remat_modes): New function.
16738         * timevar.def (TV_EARLY_REMAT): New timevar.
16739         * passes.def (pass_early_remat): New pass.
16740         * tree-pass.h (make_pass_early_remat): Declare.
16741         * early-remat.c: New file.
16742         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
16743         function.
16744         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
16746 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16747             Alan Hayward  <alan.hayward@arm.com>
16748             David Sherwood  <david.sherwood@arm.com>
16750         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
16751         vfm1 with a bound_epilog parameter.
16752         (vect_do_peeling): Update calls accordingly, and move the prologue
16753         call earlier in the function.  Treat the base bound_epilog as 0 for
16754         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
16755         this base when peeling for gaps.
16756         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
16757         with fully-masked loops.
16758         (vect_estimate_min_profitable_iters): Handle the single peeled
16759         iteration in that case.
16761 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16762             Alan Hayward  <alan.hayward@arm.com>
16763             David Sherwood  <david.sherwood@arm.com>
16765         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
16766         single-element interleaving even if the size is not a power of 2.
16767         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
16768         accesses for single-element interleaving if the group size is
16769         not a power of 2.
16771 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16772             Alan Hayward  <alan.hayward@arm.com>
16773             David Sherwood  <david.sherwood@arm.com>
16775         * doc/md.texi (fold_extract_last_@var{m}): Document.
16776         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
16777         * optabs.def (fold_extract_last_optab): New optab.
16778         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
16779         * internal-fn.c (fold_extract_direct): New macro.
16780         (expand_fold_extract_optab_fn): Likewise.
16781         (direct_fold_extract_optab_supported_p): Likewise.
16782         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
16783         * tree-vect-loop.c (vect_model_reduction_cost): Handle
16784         EXTRACT_LAST_REDUCTION.
16785         (get_initial_def_for_reduction): Do not create an initial vector
16786         for EXTRACT_LAST_REDUCTION reductions.
16787         (vectorizable_reduction): Leave the scalar phi in place for
16788         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
16789         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
16790         epilogue code for EXTRACT_LAST_REDUCTION and defer the
16791         transform phase to vectorizable_condition.
16792         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
16793         split out from...
16794         (vect_finish_stmt_generation): ...here.
16795         (vect_finish_replace_stmt): New function.
16796         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
16797         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
16798         pattern.
16799         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
16801 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16802             Alan Hayward  <alan.hayward@arm.com>
16803             David Sherwood  <david.sherwood@arm.com>
16805         * doc/md.texi (extract_last_@var{m}): Document.
16806         * optabs.def (extract_last_optab): New optab.
16807         * internal-fn.def (EXTRACT_LAST): New internal function.
16808         * internal-fn.c (cond_unary_direct): New macro.
16809         (expand_cond_unary_optab_fn): Likewise.
16810         (direct_cond_unary_optab_supported_p): Likewise.
16811         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
16812         loops using EXTRACT_LAST.
16813         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
16814         (extract_last_<mode>): ...this optab.
16815         (vec_extract<mode><Vel>): Update accordingly.
16817 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16818             Alan Hayward  <alan.hayward@arm.com>
16819             David Sherwood  <david.sherwood@arm.com>
16821         * target.def (empty_mask_is_expensive): New hook.
16822         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
16823         * doc/tm.texi: Regenerate.
16824         * targhooks.h (default_empty_mask_is_expensive): Declare.
16825         * targhooks.c (default_empty_mask_is_expensive): New function.
16826         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
16827         if the target says that empty masks are expensive.
16828         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
16829         New function.
16830         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
16832 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16833             Alan Hayward  <alan.hayward@arm.com>
16834             David Sherwood  <david.sherwood@arm.com>
16836         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
16837         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
16838         (vect_use_loop_mask_for_alignment_p): New function.
16839         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
16840         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
16841         niters_skip argument.  Make sure that the first niters_skip elements
16842         of the first iteration are inactive.
16843         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
16844         Update call to vect_set_loop_masks_directly.
16845         (get_misalign_in_elems): New function, split out from...
16846         (vect_gen_prolog_loop_niters): ...here.
16847         (vect_update_init_of_dr): Take a code argument that specifies whether
16848         the adjustment should be added or subtracted.
16849         (vect_update_init_of_drs): Likewise.
16850         (vect_prepare_for_masked_peels): New function.
16851         (vect_do_peeling): Skip prologue peeling if we're using a mask
16852         instead.  Update call to vect_update_inits_of_drs.
16853         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16854         mask_skip_niters.
16855         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
16856         alignment.  Do not include the number of peeled iterations in
16857         the minimum threshold in that case.
16858         (vectorizable_induction): Adjust the start value down by
16859         LOOP_VINFO_MASK_SKIP_NITERS iterations.
16860         (vect_transform_loop): Call vect_prepare_for_masked_peels.
16861         Take the number of skipped iterations into account when calculating
16862         the loop bounds.
16863         * tree-vect-stmts.c (vect_gen_while_not): New function.
16865 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16866             Alan Hayward  <alan.hayward@arm.com>
16867             David Sherwood  <david.sherwood@arm.com>
16869         * doc/sourcebuild.texi (vect_fully_masked): Document.
16870         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
16871         default value to 0.
16872         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
16873         split out from...
16874         (vect_analyze_loop_2): ...here. Don't check the vectorization
16875         factor against the number of loop iterations if the loop is
16876         fully-masked.
16878 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16879             Alan Hayward  <alan.hayward@arm.com>
16880             David Sherwood  <david.sherwood@arm.com>
16882         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
16883         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
16884         (dump_groups): Update accordingly.
16885         (iv_use::mem_type): New member variable.
16886         (address_p): New function.
16887         (record_use): Add a mem_type argument and initialize the new
16888         mem_type field.
16889         (record_group_use): Add a mem_type argument.  Use address_p.
16890         Remove obsolete null checks of base_object.  Update call to record_use.
16891         (find_interesting_uses_op): Update call to record_group_use.
16892         (find_interesting_uses_cond): Likewise.
16893         (find_interesting_uses_address): Likewise.
16894         (get_mem_type_for_internal_fn): New function.
16895         (find_address_like_use): Likewise.
16896         (find_interesting_uses_stmt): Try find_address_like_use before
16897         calling find_interesting_uses_op.
16898         (addr_offset_valid_p): Use the iv mem_type field as the type
16899         of the addressed memory.
16900         (add_autoinc_candidates): Likewise.
16901         (get_address_cost): Likewise.
16902         (split_small_address_groups_p): Use address_p.
16903         (split_address_groups): Likewise.
16904         (add_iv_candidate_for_use): Likewise.
16905         (autoinc_possible_for_pair): Likewise.
16906         (rewrite_groups): Likewise.
16907         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
16908         (determine_group_iv_cost): Update after split of USE_ADDRESS.
16909         (get_alias_ptr_type_for_ptr_address): New function.
16910         (rewrite_use_address): Rewrite address uses in calls that were
16911         identified by find_address_like_use.
16913 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16914             Alan Hayward  <alan.hayward@arm.com>
16915             David Sherwood  <david.sherwood@arm.com>
16917         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
16918         TARGET_MEM_REFs.
16919         * gimple-expr.h (is_gimple_addressable: Likewise.
16920         * gimple-expr.c (is_gimple_address): Likewise.
16921         * internal-fn.c (expand_call_mem_ref): New function.
16922         (expand_mask_load_optab_fn): Use it.
16923         (expand_mask_store_optab_fn): Likewise.
16925 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16926             Alan Hayward  <alan.hayward@arm.com>
16927             David Sherwood  <david.sherwood@arm.com>
16929         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
16930         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
16931         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
16932         (cond_umax@var{mode}): Document.
16933         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
16934         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
16935         (cond_umin_optab, cond_umax_optab): New optabs.
16936         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
16937         (COND_IOR, COND_XOR): New internal functions.
16938         * internal-fn.h (get_conditional_internal_fn): Declare.
16939         * internal-fn.c (cond_binary_direct): New macro.
16940         (expand_cond_binary_optab_fn): Likewise.
16941         (direct_cond_binary_optab_supported_p): Likewise.
16942         (get_conditional_internal_fn): New function.
16943         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
16944         Cope with reduction statements that are vectorized as calls rather
16945         than assignments.
16946         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
16947         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
16948         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
16949         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16950         (UNSPEC_COND_EOR): New unspecs.
16951         (optab): Add mappings for them.
16952         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
16953         (sve_int_op, sve_fp_op): New int attributes.
16955 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16956             Alan Hayward  <alan.hayward@arm.com>
16957             David Sherwood  <david.sherwood@arm.com>
16959         * optabs.def (while_ult_optab): New optab.
16960         * doc/md.texi (while_ult@var{m}@var{n}): Document.
16961         * internal-fn.def (WHILE_ULT): New internal function.
16962         * internal-fn.h (direct_internal_fn_supported_p): New override
16963         that takes two types as argument.
16964         * internal-fn.c (while_direct): New macro.
16965         (expand_while_optab_fn): New function.
16966         (convert_optab_supported_p): Likewise.
16967         (direct_while_optab_supported_p): New macro.
16968         * wide-int.h (wi::udiv_ceil): New function.
16969         * tree-vectorizer.h (rgroup_masks): New structure.
16970         (vec_loop_masks): New typedef.
16971         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
16972         and fully_masked_p.
16973         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
16974         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
16975         (vect_max_vf): New function.
16976         (slpeel_make_loop_iterate_ntimes): Delete.
16977         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
16978         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
16979         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
16980         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
16981         internal-fn.h, stor-layout.h and optabs-query.h.
16982         (vect_set_loop_mask): New function.
16983         (add_preheader_seq): Likewise.
16984         (add_header_seq): Likewise.
16985         (interleave_supported_p): Likewise.
16986         (vect_maybe_permute_loop_masks): Likewise.
16987         (vect_set_loop_masks_directly): Likewise.
16988         (vect_set_loop_condition_masked): Likewise.
16989         (vect_set_loop_condition_unmasked): New function, split out from
16990         slpeel_make_loop_iterate_ntimes.
16991         (slpeel_make_loop_iterate_ntimes): Rename to..
16992         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
16993         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
16994         (vect_do_peeling): Update call accordingly.
16995         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
16996         loops.
16997         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16998         mask_compare_type, can_fully_mask_p and fully_masked_p.
16999         (release_vec_loop_masks): New function.
17000         (_loop_vec_info): Use it to free the loop masks.
17001         (can_produce_all_loop_masks_p): New function.
17002         (vect_get_max_nscalars_per_iter): Likewise.
17003         (vect_verify_full_masking): Likewise.
17004         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
17005         retries, and free the mask rgroups before retrying.  Check loop-wide
17006         reasons for disallowing fully-masked loops.  Make the final decision
17007         about whether use a fully-masked loop or not.
17008         (vect_estimate_min_profitable_iters): Do not assume that peeling
17009         for the number of iterations will be needed for fully-masked loops.
17010         (vectorizable_reduction): Disable fully-masked loops.
17011         (vectorizable_live_operation): Likewise.
17012         (vect_halve_mask_nunits): New function.
17013         (vect_double_mask_nunits): Likewise.
17014         (vect_record_loop_mask): Likewise.
17015         (vect_get_loop_mask): Likewise.
17016         (vect_transform_loop): Handle the case in which the final loop
17017         iteration might handle a partial vector.  Call vect_set_loop_condition
17018         instead of slpeel_make_loop_iterate_ntimes.
17019         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
17020         (check_load_store_masking): New function.
17021         (prepare_load_store_mask): Likewise.
17022         (vectorizable_store): Handle fully-masked loops.
17023         (vectorizable_load): Likewise.
17024         (supportable_widening_operation): Use vect_halve_mask_nunits for
17025         booleans.
17026         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
17027         (vect_gen_while): New function.
17028         * config/aarch64/aarch64.md (umax<mode>3): New expander.
17029         (aarch64_uqdec<mode>): New insn.
17031 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17032             Alan Hayward  <alan.hayward@arm.com>
17033             David Sherwood  <david.sherwood@arm.com>
17035         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
17036         (reduc_xor_scal_optab): New optabs.
17037         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
17038         (reduc_xor_scal_@var{m}): Document.
17039         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
17040         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
17041         internal functions.
17042         * fold-const-call.c (fold_const_call): Handle them.
17043         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
17044         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
17045         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
17046         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
17047         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
17048         (UNSPEC_XORV): New unspecs.
17049         (optab): Add entries for them.
17050         (BITWISEV): New int iterator.
17051         (bit_reduc_op): New int attributes.
17053 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17054             Alan Hayward  <alan.hayward@arm.com>
17055             David Sherwood  <david.sherwood@arm.com>
17057         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
17058         * internal-fn.def (VEC_SHL_INSERT): New internal function.
17059         * optabs.def (vec_shl_insert_optab): New optab.
17060         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
17061         (duplicate_and_interleave): Likewise.
17062         * tree-vect-loop.c: Include internal-fn.h.
17063         (neutral_op_for_slp_reduction): New function, split out from
17064         get_initial_defs_for_reduction.
17065         (get_initial_def_for_reduction): Handle option 2 for variable-length
17066         vectors by loading the neutral value into a vector and then shifting
17067         the initial value into element 0.
17068         (get_initial_defs_for_reduction): Replace the code argument with
17069         the neutral value calculated by neutral_op_for_slp_reduction.
17070         Use gimple_build_vector for constant-length vectors.
17071         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
17072         but the first group_size elements have a neutral value.
17073         Use duplicate_and_interleave otherwise.
17074         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
17075         Update call to get_initial_defs_for_reduction.  Handle SLP
17076         reductions for variable-length vectors by creating one vector
17077         result for each scalar result, with the elements associated
17078         with other scalar results stubbed out with the neutral value.
17079         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
17080         Require IFN_VEC_SHL_INSERT for double reductions on
17081         variable-length vectors, or SLP reductions that have
17082         a neutral value.  Require can_duplicate_and_interleave_p
17083         support for variable-length unchained SLP reductions if there
17084         is no neutral value, such as for MIN/MAX reductions.  Also require
17085         the number of vector elements to be a multiple of the number of
17086         SLP statements when doing variable-length unchained SLP reductions.
17087         Update call to vect_create_epilog_for_reduction.
17088         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
17089         and remove initial values.
17090         (duplicate_and_interleave): Make public.
17091         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
17092         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
17094 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17095             Alan Hayward  <alan.hayward@arm.com>
17096             David Sherwood  <david.sherwood@arm.com>
17098         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
17099         (can_duplicate_and_interleave_p): New function.
17100         (vect_get_and_check_slp_defs): Take the vector of statements
17101         rather than just the current one.  Remove excess parentheses.
17102         Restriction rejectinon of vect_constant_def and vect_external_def
17103         for variable-length vectors to boolean types, or types for which
17104         can_duplicate_and_interleave_p is false.
17105         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
17106         (duplicate_and_interleave): New function.
17107         (vect_get_constant_vectors): Use gimple_build_vector for
17108         constant-length vectors and suitable variable-length constant
17109         vectors.  Use duplicate_and_interleave for other variable-length
17110         vectors.  Don't defer the update when inserting new statements.
17112 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17113             Alan Hayward  <alan.hayward@arm.com>
17114             David Sherwood  <david.sherwood@arm.com>
17116         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
17117         min_profitable_iters doesn't go negative.
17119 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17120             Alan Hayward  <alan.hayward@arm.com>
17121             David Sherwood  <david.sherwood@arm.com>
17123         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
17124         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
17125         * optabs.def (vec_mask_load_lanes_optab): New optab.
17126         (vec_mask_store_lanes_optab): Likewise.
17127         * internal-fn.def (MASK_LOAD_LANES): New internal function.
17128         (MASK_STORE_LANES): Likewise.
17129         * internal-fn.c (mask_load_lanes_direct): New macro.
17130         (mask_store_lanes_direct): Likewise.
17131         (expand_mask_load_optab_fn): Handle masked operations.
17132         (expand_mask_load_lanes_optab_fn): New macro.
17133         (expand_mask_store_optab_fn): Handle masked operations.
17134         (expand_mask_store_lanes_optab_fn): New macro.
17135         (direct_mask_load_lanes_optab_supported_p): Likewise.
17136         (direct_mask_store_lanes_optab_supported_p): Likewise.
17137         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17138         parameter.
17139         (vect_load_lanes_supported): Likewise.
17140         * tree-vect-data-refs.c (strip_conversion): New function.
17141         (can_group_stmts_p): Likewise.
17142         (vect_analyze_data_ref_accesses): Use it instead of checking
17143         for a pair of assignments.
17144         (vect_store_lanes_supported): Take a masked_p parameter.
17145         (vect_load_lanes_supported): Likewise.
17146         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
17147         vect_store_lanes_supported and vect_load_lanes_supported.
17148         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17149         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
17150         parameter.  Don't allow gaps for masked accesses.
17151         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
17152         and vect_load_lanes_supported.
17153         (get_load_store_type): Take a masked_p parameter and update
17154         call to get_group_load_store_type.
17155         (vectorizable_store): Update call to get_load_store_type.
17156         Handle IFN_MASK_STORE_LANES.
17157         (vectorizable_load): Update call to get_load_store_type.
17158         Handle IFN_MASK_LOAD_LANES.
17160 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17161             Alan Hayward  <alan.hayward@arm.com>
17162             David Sherwood  <david.sherwood@arm.com>
17164         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
17165         modes for SVE.
17166         * config/aarch64/aarch64-protos.h
17167         (aarch64_sve_struct_memory_operand_p): Declare.
17168         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
17169         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
17170         (VPRED, vpred): Handle SVE structure modes.
17171         * config/aarch64/constraints.md (Utx): New constraint.
17172         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
17173         (aarch64_sve_struct_nonimmediate_operand): New predicates.
17174         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
17175         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
17176         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
17177         structure modes.  Split into pieces after RA.
17178         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
17179         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
17180         New patterns.
17181         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
17182         SVE structure modes.
17183         (aarch64_classify_address): Likewise.
17184         (sizetochar): Move earlier in file.
17185         (aarch64_print_operand): Handle SVE register lists.
17186         (aarch64_array_mode): New function.
17187         (aarch64_sve_struct_memory_operand_p): Likewise.
17188         (TARGET_ARRAY_MODE): Redefine.
17190 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17191             Alan Hayward  <alan.hayward@arm.com>
17192             David Sherwood  <david.sherwood@arm.com>
17194         * target.def (array_mode): New target hook.
17195         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
17196         * doc/tm.texi: Regenerate.
17197         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
17198         * hooks.c (hook_optmode_mode_uhwi_none): New function.
17199         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
17200         targetm.array_mode.
17201         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
17202         type sizes.
17204 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17205             Alan Hayward  <alan.hayward@arm.com>
17206             David Sherwood  <david.sherwood@arm.com>
17208         * fold-const.c (fold_binary_loc): Check the argument types
17209         rather than the result type when testing for a vector operation.
17211 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17213         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
17214         * doc/tm.texi: Regenerate.
17216 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17217             Alan Hayward  <alan.hayward@arm.com>
17218             David Sherwood  <david.sherwood@arm.com>
17220         * doc/invoke.texi (-msve-vector-bits=): Document new option.
17221         (sve): Document new AArch64 extension.
17222         * doc/md.texi (w): Extend the description of the AArch64
17223         constraint to include SVE vectors.
17224         (Upl, Upa): Document new AArch64 predicate constraints.
17225         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
17226         enum.
17227         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
17228         (msve-vector-bits=): New option.
17229         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
17230         SVE when these are disabled.
17231         (sve): New extension.
17232         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
17233         modes.  Adjust their number of units based on aarch64_sve_vg.
17234         (MAX_BITSIZE_MODE_ANY_MODE): Define.
17235         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
17236         aarch64_addr_query_type.
17237         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
17238         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
17239         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
17240         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
17241         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
17242         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
17243         (aarch64_simd_imm_zero_p): Delete.
17244         (aarch64_check_zero_based_sve_index_immediate): Declare.
17245         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17246         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17247         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17248         (aarch64_sve_float_mul_immediate_p): Likewise.
17249         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17250         rather than an rtx.
17251         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
17252         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
17253         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
17254         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
17255         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
17256         (aarch64_regmode_natural_size): Likewise.
17257         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
17258         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
17259         left one place.
17260         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
17261         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
17262         for VG and the SVE predicate registers.
17263         (V_ALIASES): Add a "z"-prefixed alias.
17264         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
17265         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
17266         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
17267         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
17268         (REG_CLASS_NAMES): Add entries for them.
17269         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
17270         and the predicate registers.
17271         (aarch64_sve_vg): Declare.
17272         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
17273         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
17274         (REGMODE_NATURAL_SIZE): Define.
17275         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
17276         SVE macros.
17277         * config/aarch64/aarch64.c: Include cfgrtl.h.
17278         (simd_immediate_info): Add a constructor for series vectors,
17279         and an associated step field.
17280         (aarch64_sve_vg): New variable.
17281         (aarch64_dbx_register_number): Handle VG and the predicate registers.
17282         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
17283         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
17284         (VEC_ANY_DATA, VEC_STRUCT): New constants.
17285         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
17286         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
17287         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
17288         (aarch64_get_mask_mode): New functions.
17289         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
17290         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
17291         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
17292         predicate modes and predicate registers.  Explicitly restrict
17293         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
17294         to store a vector mode if it is recognized by
17295         aarch64_classify_vector_mode.
17296         (aarch64_regmode_natural_size): New function.
17297         (aarch64_hard_regno_caller_save_mode): Return the original mode
17298         for predicates.
17299         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
17300         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
17301         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
17302         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
17303         functions.
17304         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
17305         does not overlap dest if the function is frame-related.  Handle
17306         SVE constants.
17307         (aarch64_split_add_offset): New function.
17308         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
17309         them aarch64_add_offset.
17310         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
17311         and update call to aarch64_sub_sp.
17312         (aarch64_add_cfa_expression): New function.
17313         (aarch64_expand_prologue): Pass extra temporary registers to the
17314         functions above.  Handle the case in which we need to emit new
17315         DW_CFA_expressions for registers that were originally saved
17316         relative to the stack pointer, but now have to be expressed
17317         relative to the frame pointer.
17318         (aarch64_output_mi_thunk): Pass extra temporary registers to the
17319         functions above.
17320         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
17321         IP0 and IP1 values for SVE frames.
17322         (aarch64_expand_vec_series): New function.
17323         (aarch64_expand_sve_widened_duplicate): Likewise.
17324         (aarch64_expand_sve_const_vector): Likewise.
17325         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
17326         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
17327         into the register, rather than emitting a SET directly.
17328         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
17329         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
17330         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
17331         (offset_9bit_signed_scaled_p): New functions.
17332         (aarch64_replicate_bitmask_imm): New function.
17333         (aarch64_bitmask_imm): Use it.
17334         (aarch64_cannot_force_const_mem): Reject expressions involving
17335         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
17336         (aarch64_classify_index): Handle SVE indices, by requiring
17337         a plain register index with a scale that matches the element size.
17338         (aarch64_classify_address): Handle SVE addresses.  Assert that
17339         the mode of the address is VOIDmode or an integer mode.
17340         Update call to aarch64_classify_symbol.
17341         (aarch64_classify_symbolic_expression): Update call to
17342         aarch64_classify_symbol.
17343         (aarch64_const_vec_all_in_range_p): New function.
17344         (aarch64_print_vector_float_operand): Likewise.
17345         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
17346         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
17347         and the FP immediates 1.0 and 0.5.
17348         (aarch64_print_address_internal): Handle SVE addresses.
17349         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
17350         (aarch64_regno_regclass): Handle predicate registers.
17351         (aarch64_secondary_reload): Handle big-endian reloads of SVE
17352         data modes.
17353         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
17354         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
17355         (aarch64_convert_sve_vector_bits): New function.
17356         (aarch64_override_options): Use it to handle -msve-vector-bits=.
17357         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17358         rather than an rtx.
17359         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
17360         Handle SVE vector and predicate modes.  Accept VL-based constants
17361         that need only one temporary register, and VL offsets that require
17362         no temporary registers.
17363         (aarch64_conditional_register_usage): Mark the predicate registers
17364         as fixed if SVE isn't available.
17365         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
17366         Return true for SVE vector and predicate modes.
17367         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
17368         rather than an unsigned int.  Handle SVE modes.
17369         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
17370         SVE modes.
17371         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
17372         if SVE is enabled.
17373         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17374         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17375         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17376         (aarch64_sve_float_mul_immediate_p): New functions.
17377         (aarch64_sve_valid_immediate): New function.
17378         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
17379         Explicitly reject structure modes.  Check for INDEX constants.
17380         Handle PTRUE and PFALSE constants.
17381         (aarch64_check_zero_based_sve_index_immediate): New function.
17382         (aarch64_simd_imm_zero_p): Delete.
17383         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
17384         vector modes.  Accept constants in the range of CNT[BHWD].
17385         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
17386         ask for an Advanced SIMD mode.
17387         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
17388         (aarch64_simd_vector_alignment): Handle SVE predicates.
17389         (aarch64_vectorize_preferred_vector_alignment): New function.
17390         (aarch64_simd_vector_alignment_reachable): Use it instead of
17391         the vector size.
17392         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
17393         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
17394         functions.
17395         (MAX_VECT_LEN): Delete.
17396         (expand_vec_perm_d): Add a vec_flags field.
17397         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
17398         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
17399         (aarch64_evpc_ext): Don't apply a big-endian lane correction
17400         for SVE modes.
17401         (aarch64_evpc_rev): Rename to...
17402         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
17403         (aarch64_evpc_rev_global): New function.
17404         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
17405         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
17406         MAX_VECT_LEN.
17407         (aarch64_evpc_sve_tbl): New function.
17408         (aarch64_expand_vec_perm_const_1): Update after rename of
17409         aarch64_evpc_rev.  Handle SVE permutes too, trying
17410         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
17411         than aarch64_evpc_tbl.
17412         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
17413         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
17414         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
17415         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
17416         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
17417         (aarch64_expand_sve_vcond): New functions.
17418         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
17419         of aarch64_vector_mode_p.
17420         (aarch64_dwarf_poly_indeterminate_value): New function.
17421         (aarch64_compute_pressure_classes): Likewise.
17422         (aarch64_can_change_mode_class): Likewise.
17423         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
17424         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
17425         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
17426         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
17427         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
17428         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
17429         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
17430         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
17431         constraints.
17432         (Dn, Dl, Dr): Accept const as well as const_vector.
17433         (Dz): Likewise.  Compare against CONST0_RTX.
17434         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
17435         of "vector" where appropriate.
17436         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
17437         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
17438         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
17439         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
17440         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
17441         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
17442         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
17443         (v_int_equiv): Extend to SVE modes.
17444         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
17445         mode attributes.
17446         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
17447         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
17448         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
17449         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
17450         (SVE_COND_FP_CMP): New int iterators.
17451         (perm_hilo): Handle the new unpack unspecs.
17452         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
17453         attributes.
17454         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
17455         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
17456         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
17457         (aarch64_equality_operator, aarch64_constant_vector_operand)
17458         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
17459         (aarch64_sve_nonimmediate_operand): Likewise.
17460         (aarch64_sve_general_operand): Likewise.
17461         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
17462         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
17463         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
17464         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
17465         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
17466         (aarch64_sve_float_arith_immediate): Likewise.
17467         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
17468         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
17469         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
17470         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
17471         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
17472         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
17473         (aarch64_sve_float_arith_operand): Likewise.
17474         (aarch64_sve_float_arith_with_sub_operand): Likewise.
17475         (aarch64_sve_float_mul_operand): Likewise.
17476         (aarch64_sve_vec_perm_operand): Likewise.
17477         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
17478         (aarch64_mov_operand): Accept const_poly_int and const_vector.
17479         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
17480         as well as const_vector.
17481         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
17482         in file.  Use CONST0_RTX and CONSTM1_RTX.
17483         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
17484         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
17485         Use aarch64_simd_imm_zero.
17486         * config/aarch64/aarch64-sve.md: New file.
17487         * config/aarch64/aarch64.md: Include it.
17488         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
17489         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
17490         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
17491         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
17492         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
17493         (sve): New attribute.
17494         (enabled): Disable instructions with the sve attribute unless
17495         TARGET_SVE.
17496         (movqi, movhi): Pass CONST_POLY_INT operaneds through
17497         aarch64_expand_mov_immediate.
17498         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
17499         CNT[BHSD] immediates.
17500         (movti): Split CONST_POLY_INT moves into two halves.
17501         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
17502         Split additions that need a temporary here if the destination
17503         is the stack pointer.
17504         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
17505         (*add<mode>3_poly_1): New instruction.
17506         (set_clobber_cc): New expander.
17508 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17510         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
17511         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
17512         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
17513         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
17514         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
17515         Change innermode from fixed_mode_size to machine_mode.
17516         (simplify_subreg): Update call accordingly.  Handle a constant-sized
17517         subreg of a variable-length CONST_VECTOR.
17519 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17520             Alan Hayward  <alan.hayward@arm.com>
17521             David Sherwood  <david.sherwood@arm.com>
17523         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
17524         (add_offset_to_base): New function, split out from...
17525         (create_mem_ref): ...here.  When handling a scale other than 1,
17526         check first whether the address is valid without the offset.
17527         Add it into the base if so, leaving the index and scale as-is.
17529 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
17531         PR c++/83778
17532         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
17533         fold_for_warn before checking if arg2 is INTEGER_CST.
17535 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
17537         * config/rs6000/predicates.md (load_multiple_operation): Delete.
17538         (store_multiple_operation): Delete.
17539         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
17540         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
17541         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
17542         guarded by TARGET_STRING.
17543         (rs6000_output_load_multiple): Delete.
17544         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
17545         OPTION_MASK_STRING / TARGET_STRING handling.
17546         (print_operand) <'N', 'O'>: Add comment that these are unused now.
17547         (const rs6000_opt_masks) <"string">: Change mask to 0.
17548         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
17549         (MASK_STRING): Delete.
17550         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
17551         parts.  Simplify.
17552         (load_multiple): Delete.
17553         (*ldmsi8): Delete.
17554         (*ldmsi7): Delete.
17555         (*ldmsi6): Delete.
17556         (*ldmsi5): Delete.
17557         (*ldmsi4): Delete.
17558         (*ldmsi3): Delete.
17559         (store_multiple): Delete.
17560         (*stmsi8): Delete.
17561         (*stmsi7): Delete.
17562         (*stmsi6): Delete.
17563         (*stmsi5): Delete.
17564         (*stmsi4): Delete.
17565         (*stmsi3): Delete.
17566         (movmemsi_8reg): Delete.
17567         (corresponding unnamed define_insn): Delete.
17568         (movmemsi_6reg): Delete.
17569         (corresponding unnamed define_insn): Delete.
17570         (movmemsi_4reg): Delete.
17571         (corresponding unnamed define_insn): Delete.
17572         (movmemsi_2reg): Delete.
17573         (corresponding unnamed define_insn): Delete.
17574         (movmemsi_1reg): Delete.
17575         (corresponding unnamed define_insn): Delete.
17576         * config/rs6000/rs6000.opt (mno-string): New.
17577         (mstring): Replace by deprecation warning stub.
17578         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
17580 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
17582         * regrename.c (regrename_do_replace): If replacing the same
17583         reg multiple times, try to reuse last created gen_raw_REG.
17585         PR debug/81155
17586         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
17587         main to workaround a bug in GDB.
17589 2018-01-12  Tom de Vries  <tom@codesourcery.com>
17591         PR target/83737
17592         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
17594 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
17596         PR rtl-optimization/80481
17597         * ira-color.c (get_cap_member): New function.
17598         (allocnos_conflict_by_live_ranges_p): Use it.
17599         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
17600         (setup_slot_coalesced_allocno_live_ranges): Ditto.
17602 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
17604         PR target/83628
17605         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
17606         (*saddl_se_1): Ditto.
17607         (*ssubsi_1): Ditto.
17608         (*ssubl_se_1): Ditto.
17610 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17612         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
17613         rather than wi::to_widest for DR_INITs.
17614         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
17615         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
17616         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
17617         INTEGER_CSTs.
17618         (vect_analyze_group_access_1): Note that here.
17620 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17622         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
17623         polynomial type sizes.
17625 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17627         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
17628         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
17629         (gimple_add_tmp_var): Likewise.
17631 2018-01-12  Martin Liska  <mliska@suse.cz>
17633         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
17634         (gimple_alloc_sizes): Likewise.
17635         (dump_gimple_statistics): Use PRIu64 in printf format.
17636         * gimple.h: Change uint64_t to int.
17638 2018-01-12  Martin Liska  <mliska@suse.cz>
17640         * tree-core.h: Use uint64_t instead of int.
17641         * tree.c (tree_node_counts): Likewise.
17642         (tree_node_sizes): Likewise.
17643         (dump_tree_statistics): Use PRIu64 in printf format.
17645 2018-01-12  Martin Liska  <mliska@suse.cz>
17647         * Makefile.in: As qsort_chk is implemented in vec.c, add
17648         vec.o to linkage of gencfn-macros.
17649         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
17650         passing the info to record_node_allocation_statistics.
17651         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
17652         and pass the info.
17653         * ggc-common.c (struct ggc_usage): Add operator== and use
17654         it in operator< and compare function.
17655         * mem-stats.h (struct mem_usage): Likewise.
17656         * vec.c (struct vec_usage): Remove operator< and compare
17657         function. Can be simply inherited.
17659 2018-01-12  Martin Jambor  <mjambor@suse.cz>
17661         PR target/81616
17662         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
17663         * tree-ssa-math-opts.c: Include domwalk.h.
17664         (convert_mult_to_fma_1): New function.
17665         (fma_transformation_info): New type.
17666         (fma_deferring_state): Likewise.
17667         (cancel_fma_deferring): New function.
17668         (result_of_phi): Likewise.
17669         (last_fma_candidate_feeds_initial_phi): Likewise.
17670         (convert_mult_to_fma): Added deferring logic, split actual
17671         transformation to convert_mult_to_fma_1.
17672         (math_opts_dom_walker): New type.
17673         (math_opts_dom_walker::after_dom_children): New method, body moved
17674         here from pass_optimize_widening_mul::execute, added deferring logic
17675         bits.
17676         (pass_optimize_widening_mul::execute): Moved most of code to
17677         math_opts_dom_walker::after_dom_children.
17678         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
17679         * config/i386/i386.c (ix86_option_override_internal): Added
17680         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
17682 2018-01-12  Richard Biener  <rguenther@suse.de>
17684         PR debug/83157
17685         * dwarf2out.c (gen_variable_die): Do not reset old_die for
17686         inline instance vars.
17688 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
17690         PR target/81819
17691         * config/rx/rx.c (rx_is_restricted_memory_address):
17692         Handle SUBREG case.
17694 2018-01-12  Richard Biener  <rguenther@suse.de>
17696         PR tree-optimization/80846
17697         * target.def (split_reduction): New target hook.
17698         * targhooks.c (default_split_reduction): New function.
17699         * targhooks.h (default_split_reduction): Declare.
17700         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
17701         target requests first reduce vectors by combining low and high
17702         parts.
17703         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
17704         (get_vectype_for_scalar_type_and_size): Export.
17705         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
17706         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
17707         * doc/tm.texi: Regenerate.
17708         * config/i386/i386.c (ix86_split_reduction): Implement
17709         TARGET_VECTORIZE_SPLIT_REDUCTION.
17711 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17713         PR target/83368
17714         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
17715         in PIC mode except for TARGET_VXWORKS_RTP.
17716         * config/sparc/sparc.c: Include cfgrtl.h.
17717         (TARGET_INIT_PIC_REG): Define.
17718         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
17719         (sparc_pic_register_p): New predicate.
17720         (sparc_legitimate_address_p): Use it.
17721         (sparc_legitimize_pic_address): Likewise.
17722         (sparc_delegitimize_address): Likewise.
17723         (sparc_mode_dependent_address_p): Likewise.
17724         (gen_load_pcrel_sym): Remove 4th parameter.
17725         (load_got_register): Adjust call to above.  Remove obsolete stuff.
17726         (sparc_expand_prologue): Do not call load_got_register here.
17727         (sparc_flat_expand_prologue): Likewise.
17728         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
17729         (sparc_use_pseudo_pic_reg): New function.
17730         (sparc_init_pic_reg): Likewise.
17731         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17732         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
17734 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
17736         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
17737         Add item for branch_cost.
17739 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17741         PR rtl-optimization/83565
17742         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
17743         not extend the result to a larger mode for rotate operations.
17744         (num_sign_bit_copies1): Likewise.
17746 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17748         PR target/40411
17749         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
17750         -symbolic.
17751         Use values-Xc.o for -pedantic.
17752         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
17754 2018-01-12  Martin Liska  <mliska@suse.cz>
17756         PR ipa/83054
17757         * ipa-devirt.c (final_warning_record::grow_type_warnings):
17758         New function.
17759         (possible_polymorphic_call_targets): Use it.
17760         (ipa_devirt): Likewise.
17762 2018-01-12  Martin Liska  <mliska@suse.cz>
17764         * profile-count.h (enum profile_quality): Use 0 as invalid
17765         enum value of profile_quality.
17767 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
17769         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
17770         -mext-string options.
17772 2018-01-12  Richard Biener  <rguenther@suse.de>
17774         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
17775         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
17776         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
17777         Likewise.
17778         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
17780 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
17782         * configure.ac (--with-long-double-format): Add support for the
17783         configuration option to change the default long double format on
17784         PowerPC systems.
17785         * config.gcc (powerpc*-linux*-*): Likewise.
17786         * configure: Regenerate.
17787         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
17788         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
17789         used without modification.
17791 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17793         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
17794         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
17795         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
17796         MISC_BUILTIN_SPEC_BARRIER.
17797         (rs6000_init_builtins): Likewise.
17798         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
17799         enum value.
17800         (speculation_barrier): New define_insn.
17801         * doc/extend.texi: Document __builtin_speculation_barrier.
17803 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
17805         PR target/83203
17806         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
17807         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
17808         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
17809         iterators.
17810         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
17811         integral modes instead of "ss" and "sd".
17812         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
17813         vectors with 32-bit and 64-bit elements.
17814         (vecdupssescalarmodesuffix): New mode attribute.
17815         (vec_dup<mode>): Use it.
17817 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
17819         PR target/83330
17820         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
17821         frame if argument is passed on stack.
17823 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
17825         PR target/82682
17826         * ree.c (combine_reaching_defs): Optimize also
17827         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
17828         reg2=any_extend(exp); reg1=reg2;, formatting fix.
17830 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
17832         PR middle-end/83189
17833         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
17835 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
17837         PR middle-end/83718
17838         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
17839         after they are computed.
17841 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
17843         PR tree-optimization/83695
17844         * gimple-loop-linterchange.cc
17845         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
17846         reset cached scev information after interchange.
17847         (pass_linterchange::execute): Remove call to scev_reset_htab.
17849 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17851         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
17852         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
17853         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
17854         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
17855         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
17856         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
17857         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
17858         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
17859         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
17860         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
17861         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
17862         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
17863         (V_lane_reg): Likewise.
17864         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
17865         New define_expand.
17866         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
17867         (vfmal_lane_low<mode>_intrinsic,
17868         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
17869         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
17870         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
17871         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
17872         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
17873         vfmsl_lane_high<mode>_intrinsic): New define_insns.
17875 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17877         * config/arm/arm-cpus.in (fp16fml): New feature.
17878         (ALL_SIMD): Add fp16fml.
17879         (armv8.2-a): Add fp16fml as an option.
17880         (armv8.3-a): Likewise.
17881         (armv8.4-a): Add fp16fml as part of fp16.
17882         * config/arm/arm.h (TARGET_FP16FML): Define.
17883         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
17884         when appropriate.
17885         * config/arm/arm-modes.def (V2HF): Define.
17886         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
17887         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
17888         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
17889         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
17890         vfmsl_low, vfmsl_high): New set of builtins.
17891         * config/arm/iterators.md (PLUSMINUS): New code iterator.
17892         (vfml_op): New code attribute.
17893         (VFMLHALVES): New int iterator.
17894         (VFML, VFMLSEL): New mode attributes.
17895         (V_reg): Define mapping for V2HF.
17896         (V_hi, V_lo): New mode attributes.
17897         (VF_constraint): Likewise.
17898         (vfml_half, vfml_half_selector): New int attributes.
17899         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
17900         define_expand.
17901         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
17902         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
17903         New define_insn.
17904         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
17905         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
17906         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
17907         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
17908         documentation.
17909         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
17910         Document new effective target and option set.
17912 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17914         * config/arm/arm-cpus.in (armv8_4): New feature.
17915         (ARMv8_4a): New fgroup.
17916         (armv8.4-a): New arch.
17917         * config/arm/arm-tables.opt: Regenerate.
17918         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
17919         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
17920         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
17921         Add matching rules for -march=armv8.4-a and extensions.
17922         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
17924 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
17926         PR target/81821
17927         * config/rx/rx.md (BW): New mode attribute.
17928         (sync_lock_test_and_setsi): Add mode suffix to insn output.
17930 2018-01-11  Richard Biener  <rguenther@suse.de>
17932         PR tree-optimization/83435
17933         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
17934         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
17935         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
17937 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17938             Alan Hayward  <alan.hayward@arm.com>
17939             David Sherwood  <david.sherwood@arm.com>
17941         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
17942         field.
17943         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
17944         (aarch64_print_address_internal): Use it to check for a zero offset.
17946 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17947             Alan Hayward  <alan.hayward@arm.com>
17948             David Sherwood  <david.sherwood@arm.com>
17950         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
17951         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
17952         Return a poly_int64 rather than a HOST_WIDE_INT.
17953         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
17954         rather than a HOST_WIDE_INT.
17955         * config/aarch64/aarch64.h (aarch64_frame): Protect with
17956         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
17957         hard_fp_offset, frame_size, initial_adjust, callee_offset and
17958         final_offset from HOST_WIDE_INT to poly_int64.
17959         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
17960         to_constant when getting the number of units in an Advanced SIMD
17961         mode.
17962         (aarch64_builtin_vectorized_function): Check for a constant number
17963         of units.
17964         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
17965         GET_MODE_SIZE.
17966         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
17967         attribute instead of GET_MODE_NUNITS.
17968         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
17969         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
17970         GET_MODE_SIZE for fixed-size registers.
17971         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
17972         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
17973         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
17974         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
17975         (aarch64_print_operand, aarch64_print_address_internal)
17976         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
17977         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
17978         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
17979         Handle polynomial GET_MODE_SIZE.
17980         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
17981         wider than SImode without modification.
17982         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
17983         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
17984         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
17985         passing and returning SVE modes.
17986         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
17987         rather than GEN_INT.
17988         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
17989         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
17990         (aarch64_allocate_and_probe_stack_space): Likewise.
17991         (aarch64_layout_frame): Cope with polynomial offsets.
17992         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
17993         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
17994         polynomial offsets.
17995         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
17996         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
17997         poly_int64 rather than a HOST_WIDE_INT.
17998         (aarch64_get_separate_components, aarch64_process_components)
17999         (aarch64_expand_prologue, aarch64_expand_epilogue)
18000         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
18001         (aarch64_anchor_offset): New function, split out from...
18002         (aarch64_legitimize_address): ...here.
18003         (aarch64_builtin_vectorization_cost): Handle polynomial
18004         TYPE_VECTOR_SUBPARTS.
18005         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
18006         GET_MODE_NUNITS.
18007         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
18008         number of elements from the PARALLEL rather than the mode.
18009         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
18010         rather than GET_MODE_BITSIZE.
18011         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
18012         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
18013         (aarch64_expand_vec_perm_const_1): Handle polynomial
18014         d->perm.length () and d->perm elements.
18015         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
18016         Apply to_constant to d->perm elements.
18017         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
18018         polynomial CONST_VECTOR_NUNITS.
18019         (aarch64_move_pointer): Take amount as a poly_int64 rather
18020         than an int.
18021         (aarch64_progress_pointer): Avoid temporary variable.
18022         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
18023         the mode attribute instead of GET_MODE.
18025 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18026             Alan Hayward  <alan.hayward@arm.com>
18027             David Sherwood  <david.sherwood@arm.com>
18029         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
18030         x exists before using it.
18031         (aarch64_add_constant_internal): Rename to...
18032         (aarch64_add_offset_1): ...this.  Replace regnum with separate
18033         src and dest rtxes.  Handle the case in which they're different,
18034         including when the offset is zero.  Replace scratchreg with an rtx.
18035         Use 2 additions if there is no spare register into which we can
18036         move a 16-bit constant.
18037         (aarch64_add_constant): Delete.
18038         (aarch64_add_offset): Replace reg with separate src and dest
18039         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
18040         Use aarch64_add_offset_1.
18041         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
18042         an rtx rather than an int.  Take the delta as a poly_int64
18043         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
18044         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
18045         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
18046         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
18047         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
18048         and aarch64_add_sp.
18049         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
18050         aarch64_add_constant.
18052 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18054         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
18055         Use scalar_float_mode.
18057 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18059         * config/aarch64/aarch64-simd.md
18060         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
18061         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
18062         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
18063         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
18064         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
18065         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
18066         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
18067         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
18068         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
18069         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
18071 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18073         PR target/83514
18074         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
18075         targ_options->x_arm_arch_string is non NULL.
18077 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
18079         * config/aarch64/aarch64.h
18080         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
18082 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
18084         PR target/82096
18085         * expmed.c (emit_store_flag_force): Swap if const op0
18086         and change VOIDmode to mode of op0.
18088 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18090         PR rtl-optimization/83761
18091         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
18092         than bytes to mode_for_size.
18094 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18096         PR middle-end/83189
18097         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
18098         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
18099         profile.
18101 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18103         PR middle-end/83575
18104         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
18105         when in layout mode.
18106         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
18107         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
18108         partition fixup.
18110 2018-01-10  Michael Collison  <michael.collison@arm.com>
18112         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
18113         * config/aarch64/aarch64-option-extension.def: Add
18114         AARCH64_OPT_EXTENSION of 'fp16fml'.
18115         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18116         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
18117         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
18118         * config/aarch64/constraints.md (Ui7): New constraint.
18119         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
18120         (VFMLA_SEL_W): Ditto.
18121         (f16quad): Ditto.
18122         (f16mac1): Ditto.
18123         (VFMLA16_LOW): New int iterator.
18124         (VFMLA16_HIGH): Ditto.
18125         (UNSPEC_FMLAL): New unspec.
18126         (UNSPEC_FMLSL): Ditto.
18127         (UNSPEC_FMLAL2): Ditto.
18128         (UNSPEC_FMLSL2): Ditto.
18129         (f16mac): New code attribute.
18130         * config/aarch64/aarch64-simd-builtins.def
18131         (aarch64_fmlal_lowv2sf): Ditto.
18132         (aarch64_fmlsl_lowv2sf): Ditto.
18133         (aarch64_fmlalq_lowv4sf): Ditto.
18134         (aarch64_fmlslq_lowv4sf): Ditto.
18135         (aarch64_fmlal_highv2sf): Ditto.
18136         (aarch64_fmlsl_highv2sf): Ditto.
18137         (aarch64_fmlalq_highv4sf): Ditto.
18138         (aarch64_fmlslq_highv4sf): Ditto.
18139         (aarch64_fmlal_lane_lowv2sf): Ditto.
18140         (aarch64_fmlsl_lane_lowv2sf): Ditto.
18141         (aarch64_fmlal_laneq_lowv2sf): Ditto.
18142         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18143         (aarch64_fmlalq_lane_lowv4sf): Ditto.
18144         (aarch64_fmlsl_lane_lowv4sf): Ditto.
18145         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
18146         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
18147         (aarch64_fmlal_lane_highv2sf): Ditto.
18148         (aarch64_fmlsl_lane_highv2sf): Ditto.
18149         (aarch64_fmlal_laneq_highv2sf): Ditto.
18150         (aarch64_fmlsl_laneq_highv2sf): Ditto.
18151         (aarch64_fmlalq_lane_highv4sf): Ditto.
18152         (aarch64_fmlsl_lane_highv4sf): Ditto.
18153         (aarch64_fmlalq_laneq_highv4sf): Ditto.
18154         (aarch64_fmlsl_laneq_highv4sf): Ditto.
18155         * config/aarch64/aarch64-simd.md:
18156         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
18157         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18158         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
18159         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18160         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
18161         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
18162         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
18163         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
18164         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
18165         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
18166         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
18167         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
18168         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
18169         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
18170         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
18171         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
18172         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
18173         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
18174         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
18175         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
18176         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
18177         (vfmlsl_low_u32): Ditto.
18178         (vfmlalq_low_u32): Ditto.
18179         (vfmlslq_low_u32): Ditto.
18180         (vfmlal_high_u32): Ditto.
18181         (vfmlsl_high_u32): Ditto.
18182         (vfmlalq_high_u32): Ditto.
18183         (vfmlslq_high_u32): Ditto.
18184         (vfmlal_lane_low_u32): Ditto.
18185         (vfmlsl_lane_low_u32): Ditto.
18186         (vfmlal_laneq_low_u32): Ditto.
18187         (vfmlsl_laneq_low_u32): Ditto.
18188         (vfmlalq_lane_low_u32): Ditto.
18189         (vfmlslq_lane_low_u32): Ditto.
18190         (vfmlalq_laneq_low_u32): Ditto.
18191         (vfmlslq_laneq_low_u32): Ditto.
18192         (vfmlal_lane_high_u32): Ditto.
18193         (vfmlsl_lane_high_u32): Ditto.
18194         (vfmlal_laneq_high_u32): Ditto.
18195         (vfmlsl_laneq_high_u32): Ditto.
18196         (vfmlalq_lane_high_u32): Ditto.
18197         (vfmlslq_lane_high_u32): Ditto.
18198         (vfmlalq_laneq_high_u32): Ditto.
18199         (vfmlslq_laneq_high_u32): Ditto.
18200         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
18201         (AARCH64_FL_FOR_ARCH8_4): New.
18202         (AARCH64_ISA_F16FML): New ISA flag.
18203         (TARGET_F16FML): New feature flag for fp16fml.
18204         (doc/invoke.texi): Document new fp16fml option.
18206 2018-01-10  Michael Collison  <michael.collison@arm.com>
18208         * config/aarch64/aarch64-builtins.c:
18209         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
18210         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18211         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
18212         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
18213         (AARCH64_ISA_SHA3): New ISA flag.
18214         (TARGET_SHA3): New feature flag for sha3.
18215         * config/aarch64/iterators.md (sha512_op): New int attribute.
18216         (CRYPTO_SHA512): New int iterator.
18217         (UNSPEC_SHA512H): New unspec.
18218         (UNSPEC_SHA512H2): Ditto.
18219         (UNSPEC_SHA512SU0): Ditto.
18220         (UNSPEC_SHA512SU1): Ditto.
18221         * config/aarch64/aarch64-simd-builtins.def
18222         (aarch64_crypto_sha512hqv2di): New builtin.
18223         (aarch64_crypto_sha512h2qv2di): Ditto.
18224         (aarch64_crypto_sha512su0qv2di): Ditto.
18225         (aarch64_crypto_sha512su1qv2di): Ditto.
18226         (aarch64_eor3qv8hi): Ditto.
18227         (aarch64_rax1qv2di): Ditto.
18228         (aarch64_xarqv2di): Ditto.
18229         (aarch64_bcaxqv8hi): Ditto.
18230         * config/aarch64/aarch64-simd.md:
18231         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
18232         (aarch64_crypto_sha512su0qv2di): Ditto.
18233         (aarch64_crypto_sha512su1qv2di): Ditto.
18234         (aarch64_eor3qv8hi): Ditto.
18235         (aarch64_rax1qv2di): Ditto.
18236         (aarch64_xarqv2di): Ditto.
18237         (aarch64_bcaxqv8hi): Ditto.
18238         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
18239         (vsha512h2q_u64): Ditto.
18240         (vsha512su0q_u64): Ditto.
18241         (vsha512su1q_u64): Ditto.
18242         (veor3q_u16): Ditto.
18243         (vrax1q_u64): Ditto.
18244         (vxarq_u64): Ditto.
18245         (vbcaxq_u16): Ditto.
18246         * config/arm/types.md (crypto_sha512): New type attribute.
18247         (crypto_sha3): Ditto.
18248         (doc/invoke.texi): Document new sha3 option.
18250 2018-01-10  Michael Collison  <michael.collison@arm.com>
18252         * config/aarch64/aarch64-builtins.c:
18253         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
18254         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18255         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
18256         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
18257         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
18258         (AARCH64_ISA_SM4): New ISA flag.
18259         (TARGET_SM4): New feature flag for sm4.
18260         * config/aarch64/aarch64-simd-builtins.def
18261         (aarch64_sm3ss1qv4si): Ditto.
18262         (aarch64_sm3tt1aq4si): Ditto.
18263         (aarch64_sm3tt1bq4si): Ditto.
18264         (aarch64_sm3tt2aq4si): Ditto.
18265         (aarch64_sm3tt2bq4si): Ditto.
18266         (aarch64_sm3partw1qv4si): Ditto.
18267         (aarch64_sm3partw2qv4si): Ditto.
18268         (aarch64_sm4eqv4si): Ditto.
18269         (aarch64_sm4ekeyqv4si): Ditto.
18270         * config/aarch64/aarch64-simd.md:
18271         (aarch64_sm3ss1qv4si): Ditto.
18272         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
18273         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
18274         (aarch64_sm4eqv4si): Ditto.
18275         (aarch64_sm4ekeyqv4si): Ditto.
18276         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
18277         (sm3part_op): Ditto.
18278         (CRYPTO_SM3TT): Ditto.
18279         (CRYPTO_SM3PART): Ditto.
18280         (UNSPEC_SM3SS1): New unspec.
18281         (UNSPEC_SM3TT1A): Ditto.
18282         (UNSPEC_SM3TT1B): Ditto.
18283         (UNSPEC_SM3TT2A): Ditto.
18284         (UNSPEC_SM3TT2B): Ditto.
18285         (UNSPEC_SM3PARTW1): Ditto.
18286         (UNSPEC_SM3PARTW2): Ditto.
18287         (UNSPEC_SM4E): Ditto.
18288         (UNSPEC_SM4EKEY): Ditto.
18289         * config/aarch64/constraints.md (Ui2): New constraint.
18290         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
18291         * config/arm/types.md (crypto_sm3): New type attribute.
18292         (crypto_sm4): Ditto.
18293         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
18294         (vsm3tt1aq_u32): Ditto.
18295         (vsm3tt1bq_u32): Ditto.
18296         (vsm3tt2aq_u32): Ditto.
18297         (vsm3tt2bq_u32): Ditto.
18298         (vsm3partw1q_u32): Ditto.
18299         (vsm3partw2q_u32): Ditto.
18300         (vsm4eq_u32): Ditto.
18301         (vsm4ekeyq_u32): Ditto.
18302         (doc/invoke.texi): Document new sm4 option.
18304 2018-01-10  Michael Collison  <michael.collison@arm.com>
18306         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
18307         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
18308         (AARCH64_FL_FOR_ARCH8_4): New.
18309         (AARCH64_FL_V8_4): New flag.
18310         (doc/invoke.texi): Document new armv8.4-a option.
18312 2018-01-10  Michael Collison  <michael.collison@arm.com>
18314         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18315         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
18316         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
18317         * config/aarch64/aarch64-option-extension.def: Add
18318         AARCH64_OPT_EXTENSION of 'sha2'.
18319         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
18320         (crypto): Disable sha2 and aes if crypto disabled.
18321         (crypto): Enable aes and sha2 if enabled.
18322         (simd): Disable sha2 and aes if simd disabled.
18323         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
18324         New flags.
18325         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
18326         (TARGET_SHA2): New feature flag for sha2.
18327         (TARGET_AES): New feature flag for aes.
18328         * config/aarch64/aarch64-simd.md:
18329         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
18330         conditional on TARGET_AES.
18331         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
18332         (aarch64_crypto_sha1hsi): Make pattern conditional
18333         on TARGET_SHA2.
18334         (aarch64_crypto_sha1hv4si): Ditto.
18335         (aarch64_be_crypto_sha1hv4si): Ditto.
18336         (aarch64_crypto_sha1su1v4si): Ditto.
18337         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
18338         (aarch64_crypto_sha1su0v4si): Ditto.
18339         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
18340         (aarch64_crypto_sha256su0v4si): Ditto.
18341         (aarch64_crypto_sha256su1v4si): Ditto.
18342         (doc/invoke.texi): Document new aes and sha2 options.
18344 2018-01-10  Martin Sebor  <msebor@redhat.com>
18346         PR tree-optimization/83781
18347         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
18348         as string arrays.
18350 2018-01-11  Martin Sebor  <msebor@gmail.com>
18351             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18353         PR tree-optimization/83501
18354         PR tree-optimization/81703
18356         * tree-ssa-strlen.c (get_string_cst): Rename...
18357         (get_string_len): ...to this.  Handle global constants.
18358         (handle_char_store): Adjust.
18360 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
18361             Jim Wilson  <jimw@sifive.com>
18363         * config/riscv/riscv-protos.h (riscv_output_return): New.
18364         * config/riscv/riscv.c (struct machine_function): New naked_p field.
18365         (riscv_attribute_table, riscv_output_return),
18366         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
18367         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
18368         (riscv_compute_frame_info): Only compute frame->mask if not a naked
18369         function.
18370         (riscv_expand_prologue): Add early return for naked function.
18371         (riscv_expand_epilogue): Likewise.
18372         (riscv_function_ok_for_sibcall): Return false for naked function.
18373         (riscv_set_current_function): New.
18374         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
18375         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
18376         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
18377         * doc/extend.texi (RISC-V Function Attributes): New.
18379 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
18381         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
18382         check for 128-bit long double before checking TCmode.
18383         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
18384         128-bit long doubles before checking TFmode or TCmode.
18385         (FLOAT128_IBM_P): Likewise.
18387 2018-01-10  Martin Sebor  <msebor@redhat.com>
18389         PR tree-optimization/83671
18390         * builtins.c (c_strlen): Unconditionally return zero for the empty
18391         string.
18392         Use -Warray-bounds for warnings.
18393         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
18394         for non-constant array indices with COMPONENT_REF, arrays of
18395         arrays, and pointers to arrays.
18396         (gimple_fold_builtin_strlen): Determine and set length range for
18397         non-constant character arrays.
18399 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
18401         PR middle-end/81897
18402         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
18403         empty blocks.
18405 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
18407         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
18409 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
18411         PR target/83399
18412         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
18413         VECTOR_MEM_ALTIVEC_OR_VSX_P.
18414         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
18415         indexed_or_indirect_operand predicate.
18416         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
18417         (*vsx_le_perm_load_v8hi): Likewise.
18418         (*vsx_le_perm_load_v16qi): Likewise.
18419         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
18420         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
18421         (*vsx_le_perm_store_v8hi): Likewise.
18422         (*vsx_le_perm_store_v16qi): Likewise.
18423         (eight unnamed splitters): Likewise.
18425 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
18427         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
18428         * config/rs6000/emmintrin.h: Likewise.
18429         * config/rs6000/mmintrin.h: Likewise.
18430         * config/rs6000/xmmintrin.h: Likewise.
18432 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
18434         PR c++/43486
18435         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
18436         "public_flag".
18437         * tree.c (tree_nop_conversion): Return true for location wrapper
18438         nodes.
18439         (maybe_wrap_with_location): New function.
18440         (selftest::check_strip_nops): New function.
18441         (selftest::test_location_wrappers): New function.
18442         (selftest::tree_c_tests): Call it.
18443         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
18444         (maybe_wrap_with_location): New decl.
18445         (EXPR_LOCATION_WRAPPER_P): New macro.
18446         (location_wrapper_p): New inline function.
18447         (tree_strip_any_location_wrapper): New inline function.
18449 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
18451         PR target/83735
18452         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
18453         stack_realign_offset for the largest alignment of stack slot
18454         actually used.
18455         (ix86_find_max_used_stack_alignment): New function.
18456         (ix86_finalize_stack_frame_flags): Use it.  Set
18457         max_used_stack_alignment if we don't realign stack.
18458         * config/i386/i386.h (machine_function): Add
18459         max_used_stack_alignment.
18461 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
18463         * config/arm/arm.opt (-mbranch-cost): New option.
18464         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
18465         account.
18467 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
18469         PR target/83629
18470         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
18471         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
18473 2018-01-10  Richard Biener  <rguenther@suse.de>
18475         PR debug/83765
18476         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
18477         early out so it also covers the case where we have a non-NULL
18478         origin.
18480 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
18482         PR tree-optimization/83753
18483         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
18484         for non-strided grouped accesses if the number of elements is 1.
18486 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18488         PR target/81616
18489         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
18490         * i386.h (TARGET_USE_GATHER): Define.
18491         * x86-tune.def (X86_TUNE_USE_GATHER): New.
18493 2018-01-10  Martin Liska  <mliska@suse.cz>
18495         PR bootstrap/82831
18496         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
18497         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
18498         partitioning.
18499         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
18500         CLEANUP_NO_PARTITIONING is not set.
18502 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
18504         * doc/rtl.texi: Remove documentation of (const ...) wrappers
18505         for vectors, as a partial revert of r254296.
18506         * rtl.h (const_vec_p): Delete.
18507         (const_vec_duplicate_p): Don't test for vector CONSTs.
18508         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
18509         * expmed.c (make_tree): Likewise.
18511         Revert:
18512         * common.md (E, F): Use CONSTANT_P instead of checking for
18513         CONST_VECTOR.
18514         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
18515         checking for CONST_VECTOR.
18517 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18519         PR middle-end/83575
18520         * predict.c (force_edge_cold): Handle in more sane way edges
18521         with no prediction.
18523 2018-01-09  Carl Love  <cel@us.ibm.com>
18525         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
18526         V4SI, V4SF types.
18527         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
18528         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
18529         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
18530         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
18531         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
18532         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
18533         * config/rs6000/rs6000-protos.h: Add extern defition for
18534         rs6000_generate_float2_double_code.
18535         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
18536         function.
18537         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
18538         (float2_v2df): Add define_expand.
18540 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
18542         PR target/83628
18543         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
18544         op_mode in the force_to_mode call.
18546 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
18548         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
18549         instead of checking each element individually.
18550         (aarch64_evpc_uzp): Likewise.
18551         (aarch64_evpc_zip): Likewise.
18552         (aarch64_evpc_ext): Likewise.
18553         (aarch64_evpc_rev): Likewise.
18554         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
18555         instead of checking each element individually.  Return true without
18556         generating rtl if
18557         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
18558         whether all selected elements come from the same input, instead of
18559         checking each element individually.  Remove calls to gen_rtx_REG,
18560         start_sequence and end_sequence and instead assert that no rtl is
18561         generated.
18563 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
18565         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
18566         order of HIGH and CONST checks.
18568 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
18570         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
18571         if the destination isn't an SSA_NAME.
18573 2018-01-09  Richard Biener  <rguenther@suse.de>
18575         PR tree-optimization/83668
18576         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
18577         move prologue...
18578         (canonicalize_loop_form): ... here, renamed from ...
18579         (canonicalize_loop_closed_ssa_form): ... this and amended to
18580         swap successor edges for loop exit blocks to make us use
18581         the RPO order we need for initial schedule generation.
18583 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
18585         PR tree-optimization/64811
18586         * match.pd: When optimizing comparisons with Inf, avoid
18587         introducing or losing exceptions from comparisons with NaN.
18589 2018-01-09  Martin Liska  <mliska@suse.cz>
18591         PR sanitizer/82517
18592         * asan.c (shadow_mem_size): Add gcc_assert.
18594 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
18596         Don't save registers in main().
18598         PR target/83738
18599         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
18600         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
18601         * config/avr/avr.c (avr_set_current_function): Don't error if
18602         naked, OS_task or OS_main are specified at the same time.
18603         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
18604         OS_main.
18605         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
18606         attribute.
18607         * common/config/avr/avr-common.c (avr_option_optimization_table):
18608         Switch on -mmain-is-OS_task for optimizing compilations.
18610 2018-01-09  Richard Biener  <rguenther@suse.de>
18612         PR tree-optimization/83572
18613         * graphite.c: Include cfganal.h.
18614         (graphite_transform_loops): Connect infinite loops to exit
18615         and remove fake edges at the end.
18617 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18619         * ipa-inline.c (edge_badness): Revert accidental checkin.
18621 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18623         PR ipa/80763
18624         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
18625         symbols; not inline clones.
18627 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
18629         PR target/83507
18630         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
18631         hard registers.  Formatting fixes.
18633         PR preprocessor/83722
18634         * gcc.c (try_generate_repro): Pass
18635         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
18636         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
18637         do_report_bug.
18639 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
18640             Kito Cheng  <kito.cheng@gmail.com>
18642         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
18643         (riscv_leaf_function_p): Delete.
18644         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
18646 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18648         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
18649         function.
18650         (do_ifelse): New function.
18651         (do_isel): New function.
18652         (do_sub3): New function.
18653         (do_add3): New function.
18654         (do_load_mask_compare): New function.
18655         (do_overlap_load_compare): New function.
18656         (expand_compare_loop): New function.
18657         (expand_block_compare): Call expand_compare_loop() when appropriate.
18658         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
18659         option description.
18660         (-mblock-compare-inline-loop-limit): New option.
18662 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18664         PR target/83677
18665         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
18666         Reverse order of second and third operands in first alternative.
18667         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
18668         of first and second elements in UNSPEC_VPERMR vector.
18669         (altivec_expand_vec_perm_le): Likewise.
18671 2018-01-08  Jeff Law  <law@redhat.com>
18673         PR rtl-optimizatin/81308
18674         * tree-switch-conversion.c (cfg_altered): New file scoped static.
18675         (process_switch): If group_case_labels makes a change, then set
18676         cfg_altered.
18677         (pass_convert_switch::execute): If a switch is converted, then
18678         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
18680         PR rtl-optimization/81308
18681         * recog.c (split_all_insns): Conditionally cleanup the CFG after
18682         splitting insns.
18684 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
18686         PR target/83663 - Revert r255946
18687         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
18688         generation for cases where splatting a value is not useful.
18689         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
18690         across a vec_duplicate and a paradoxical subreg forming a vector
18691         mode to a vec_concat.
18693 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18695         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
18696         -march=armv8.3-a variants.
18697         * config/arm/t-multilib: Likewise.
18698         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
18700 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18702         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
18703         to generate rtl.
18704         (cceq_ior_compare_complement): Give it a name so I can use it, and
18705         change boolean_or_operator predicate to boolean_operator so it can
18706         be used to generate a crand.
18707         (eqne): New code iterator.
18708         (bd/bd_neg): New code_attrs.
18709         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
18710         a single define_insn.
18711         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
18712         decrement (bdnzt/bdnzf/bdzt/bdzf).
18713         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
18714         with the new names of the branch decrement patterns, and added the
18715         names of the branch decrement conditional patterns.
18717 2018-01-08  Richard Biener  <rguenther@suse.de>
18719         PR tree-optimization/83563
18720         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
18721         cache.
18723 2018-01-08  Richard Biener  <rguenther@suse.de>
18725         PR middle-end/83713
18726         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
18728 2018-01-08  Richard Biener  <rguenther@suse.de>
18730         PR tree-optimization/83685
18731         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
18732         references to abnormals.
18734 2018-01-08  Richard Biener  <rguenther@suse.de>
18736         PR lto/83719
18737         * dwarf2out.c (output_indirect_strings): Handle empty
18738         skeleton_debug_str_hash.
18739         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
18741 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
18743         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
18744         (emit_store_direct): Likewise.
18745         (arc_trampoline_adjust_address): Likewise.
18746         (arc_asm_trampoline_template): New function.
18747         (arc_initialize_trampoline): Use asm_trampoline_template.
18748         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
18749         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
18750         * config/arc/arc.md (flush_icache): Delete pattern.
18752 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
18754         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
18755         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
18756         munaligned-access.
18758 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18760         PR target/83681
18761         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
18762         by not USED_FOR_TARGET.
18763         (make_pass_resolve_sw_modes): Likewise.
18765 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18767         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
18768         USED_FOR_TARGET.
18770 2018-01-08  Richard Biener  <rguenther@suse.de>
18772         PR middle-end/83580
18773         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
18775 2018-01-08  Richard Biener  <rguenther@suse.de>
18777         PR middle-end/83517
18778         * match.pd ((t * 2) / 2) -> t): Add missing :c.
18780 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
18782         PR middle-end/81897
18783         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
18784         basic blocks with a small number of successors.
18785         (convert_control_dep_chain_into_preds): Improve handling of
18786         forwarder blocks.
18787         (dump_predicates): Split apart into...
18788         (dump_pred_chain): ...here...
18789         (dump_pred_info): ...and here.
18790         (can_one_predicate_be_invalidated_p): Add debugging printfs.
18791         (can_chain_union_be_invalidated_p): Improve check for invalidation
18792         of paths.
18793         (uninit_uses_cannot_happen): Avoid unnecessary if
18794         convert_control_dep_chain_into_preds yielded nothing.
18796 2018-01-06  Martin Sebor  <msebor@redhat.com>
18798         PR tree-optimization/83640
18799         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
18800         subtracting negative offset from size.
18801         (builtin_access::overlap): Adjust offset bounds of the access to fall
18802         within the size of the object if possible.
18804 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
18806         PR rtl-optimization/83699
18807         * expmed.c (extract_bit_field_1): Restrict the vector usage of
18808         extract_bit_field_as_subreg to cases in which the extracted
18809         value is also a vector.
18811         * lra-constraints.c (process_alt_operands): Test for the equivalence
18812         substitutions when detecting a possible reload cycle.
18814 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
18816         PR debug/83480
18817         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
18818         by default if flag_selective_schedling{,2}.  Formatting fixes.
18820         PR rtl-optimization/83682
18821         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
18822         if it has non-VECTOR_MODE element mode.
18823         (vec_duplicate_p): Likewise.
18825         PR middle-end/83694
18826         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
18827         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
18829 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
18831         PR target/83604
18832         * config/i386/i386-builtin.def
18833         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
18834         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
18835         Require also OPTION_MASK_ISA_AVX512F in addition to
18836         OPTION_MASK_ISA_GFNI.
18837         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
18838         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
18839         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
18840         to OPTION_MASK_ISA_GFNI.
18841         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
18842         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
18843         OPTION_MASK_ISA_AVX512BW.
18844         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
18845         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
18846         addition to OPTION_MASK_ISA_GFNI.
18847         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
18848         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
18849         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
18850         to OPTION_MASK_ISA_GFNI.
18851         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
18852         a requirement for all ISAs rather than any of them with a few
18853         exceptions.
18854         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
18855         processing.
18856         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
18857         bitmasks to be enabled with 3 exceptions, instead of requiring any
18858         enabled ISA with lots of exceptions.
18859         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
18860         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
18861         Change avx512bw in isa attribute to avx512f.
18862         * config/i386/sgxintrin.h: Add license boilerplate.
18863         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
18864         to __AVX512F__ and __AVX512VL to __AVX512VL__.
18865         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
18866         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
18867         defined.
18868         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
18869         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
18870         temporarily sse2 rather than sse if not enabled already.
18872         PR target/83604
18873         * config/i386/sse.md (VI248_VLBW): Rename to ...
18874         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
18875         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
18876         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
18877         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
18878         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
18879         mode iterator instead of VI248_VLBW.
18881 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
18883         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
18884         (record_modified): Skip clobbers; add debug output.
18885         (param_change_prob): Use sreal frequencies.
18887 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
18889         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
18890         punt for user-aligned variables.
18892 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
18894         * tree-chrec.c (chrec_contains_symbols): Return true for
18895         POLY_INT_CST.
18897 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
18899         PR target/82439
18900         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
18901         of (x|y) == x for BICS pattern.
18903 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
18905         PR tree-optimization/83605
18906         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
18907         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
18908         can throw.
18910 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18912         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
18913         * config/epiphany/rtems.h: New file.
18915 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18916             Uros Bizjak  <ubizjak@gmail.com>
18918         PR target/83554
18919         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
18920         QIreg_operand instead of register_operand predicate.
18921         * config/i386/i386.c (ix86_rop_should_change_byte_p,
18922         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
18923         comments instead of -fmitigate[-_]rop.
18925 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18927         PR bootstrap/81926
18928         * cgraphunit.c (symbol_table::compile): Switch to text_section
18929         before calling assembly_start debug hook.
18930         * run-rtl-passes.c (run_rtl_passes): Likewise.
18931         Include output.h.
18933 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18935         * tree-vrp.c (extract_range_from_binary_expr_1): Check
18936         range_int_cst_p rather than !symbolic_range_p before calling
18937         extract_range_from_multiplicative_op_1.
18939 2018-01-04  Jeff Law  <law@redhat.com>
18941         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
18942         redundant test in assertion.
18944 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18946         * doc/rtl.texi: Document machine_mode wrapper classes.
18948 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18950         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
18951         using tree_to_uhwi.
18953 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18955         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
18956         the VEC_PERM_EXPR fold to fail.
18958 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18960         PR debug/83585
18961         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
18962         to switched_sections.
18964 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18966         PR target/83680
18967         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
18968         test for d.testing.
18970 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
18972         PR target/83387
18973         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
18974         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
18976 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18978         PR debug/83666
18979         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
18980         is BLKmode and bitpos not zero or mode change is needed.
18982 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18984         PR target/83675
18985         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
18986         TARGET_VIS2.
18988 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
18990         PR target/83628
18991         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
18992         instead of MULT rtx.  Update all corresponding splitters.
18993         (*saddl_se): Ditto.
18994         (*ssub<modesuffix>): Ditto.
18995         (*ssubl_se): Ditto.
18996         (*cmp_sadd_di): Update split patterns.
18997         (*cmp_sadd_si): Ditto.
18998         (*cmp_sadd_sidi): Ditto.
18999         (*cmp_ssub_di): Ditto.
19000         (*cmp_ssub_si): Ditto.
19001         (*cmp_ssub_sidi): Ditto.
19002         * config/alpha/predicates.md (const23_operand): New predicate.
19003         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
19004         Look for ASHIFT, not MULT inner operand.
19005         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
19007 2018-01-04  Martin Liska  <mliska@suse.cz>
19009         PR gcov-profile/83669
19010         * gcov.c (output_intermediate_file): Add version to intermediate
19011         gcov file.
19012         * doc/gcov.texi: Document new field 'version' in intermediate
19013         file format. Fix location of '-k' option of gcov command.
19015 2018-01-04  Martin Liska  <mliska@suse.cz>
19017         PR ipa/82352
19018         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
19020 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19022         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
19024 2018-01-03  Martin Sebor  <msebor@redhat.com>
19026         PR tree-optimization/83655
19027         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
19028         checking calls with invalid arguments.
19030 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19032         * tree-vect-stmts.c (vect_get_store_rhs): New function.
19033         (vectorizable_mask_load_store): Delete.
19034         (vectorizable_call): Return false for masked loads and stores.
19035         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
19036         instead of gimple_assign_rhs1.
19037         (vectorizable_load): Handle IFN_MASK_LOAD.
19038         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
19040 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19042         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
19043         split out from..,
19044         (vectorizable_mask_load_store): ...here.
19045         (vectorizable_load): ...and here.
19047 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19049         * tree-vect-stmts.c (vect_build_all_ones_mask)
19050         (vect_build_zero_merge_argument): New functions, split out from...
19051         (vectorizable_load): ...here.
19053 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19055         * tree-vect-stmts.c (vect_check_store_rhs): New function,
19056         split out from...
19057         (vectorizable_mask_load_store): ...here.
19058         (vectorizable_store): ...and here.
19060 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19062         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
19063         split out from...
19064         (vectorizable_mask_load_store): ...here.
19066 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19068         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
19069         (vect_model_store_cost): Take a vec_load_store_type instead of a
19070         vect_def_type.
19071         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
19072         (vect_model_store_cost): Take a vec_load_store_type instead of a
19073         vect_def_type.
19074         (vectorizable_mask_load_store): Update accordingly.
19075         (vectorizable_store): Likewise.
19076         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
19078 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19080         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
19081         IFN_MASK_LOAD calls here rather than...
19082         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
19084 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19085             Alan Hayward  <alan.hayward@arm.com>
19086             David Sherwood  <david.sherwood@arm.com>
19088         * expmed.c (extract_bit_field_1): For vector extracts,
19089         fall back to extract_bit_field_as_subreg if vec_extract
19090         isn't available.
19092 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19093             Alan Hayward  <alan.hayward@arm.com>
19094             David Sherwood  <david.sherwood@arm.com>
19096         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
19097         they are variable or constant sized.
19098         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
19099         slots for constant-sized data.
19101 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19102             Alan Hayward  <alan.hayward@arm.com>
19103             David Sherwood  <david.sherwood@arm.com>
19105         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
19106         handling COND_EXPRs with boolean comparisons, try to find a better
19107         basis for the mask type than the boolean itself.
19109 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19111         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
19112         is calculated and how it can be overridden.
19113         * genmodes.c (max_bitsize_mode_any_mode): New variable.
19114         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
19115         if defined.
19116         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
19117         if nonzero.
19119 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19120             Alan Hayward  <alan.hayward@arm.com>
19121             David Sherwood  <david.sherwood@arm.com>
19123         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
19124         Remove the mode argument.
19125         (aarch64_simd_valid_immediate): Remove the mode and inverse
19126         arguments.
19127         * config/aarch64/iterators.md (bitsize): New iterator.
19128         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19129         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19130         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19131         aarch64_simd_valid_immediate.
19132         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19133         (aarch64_reg_or_bic_imm): Likewise.
19134         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19135         with an insn_type enum and msl with a modifier_type enum.
19136         Replace element_width with a scalar_mode.  Change the shift
19137         to unsigned int.  Add constructors for scalar_float_mode and
19138         scalar_int_mode elements.
19139         (aarch64_vect_float_const_representable_p): Delete.
19140         (aarch64_can_const_movi_rtx_p)
19141         (aarch64_simd_scalar_immediate_valid_for_move)
19142         (aarch64_simd_make_constant): Update call to
19143         aarch64_simd_valid_immediate.
19144         (aarch64_advsimd_valid_immediate_hs): New function.
19145         (aarch64_advsimd_valid_immediate): Likewise.
19146         (aarch64_simd_valid_immediate): Remove mode and inverse
19147         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
19148         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
19149         and aarch64_float_const_representable_p on the result.
19150         (aarch64_output_simd_mov_immediate): Remove mode argument.
19151         Update call to aarch64_simd_valid_immediate and use of
19152         simd_immediate_info.
19153         (aarch64_output_scalar_simd_mov_immediate): Update call
19154         accordingly.
19156 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19157             Alan Hayward  <alan.hayward@arm.com>
19158             David Sherwood  <david.sherwood@arm.com>
19160         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
19161         (mode_nunits): Likewise CONST_MODE_NUNITS.
19162         * machmode.def (ADJUST_NUNITS): Document.
19163         * genmodes.c (mode_data::need_nunits_adj): New field.
19164         (blank_mode): Update accordingly.
19165         (adj_nunits): New variable.
19166         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
19167         parameter.
19168         (emit_mode_size_inline): Set need_bytesize_adj for all modes
19169         listed in adj_nunits.
19170         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
19171         listed in adj_nunits.  Don't emit case statements for such modes.
19172         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
19173         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
19174         nothing if adj_nunits is nonnull.
19175         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
19176         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
19177         (emit_mode_fbit): Update use of print_maybe_const_decl.
19178         (emit_move_size): Likewise.  Treat the array as non-const
19179         if adj_nunits.
19180         (emit_mode_adjustments): Handle adj_nunits.
19182 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19184         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
19185         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
19186         (VECTOR_MODES): Use it.
19187         (make_vector_modes): Take the prefix as an argument.
19189 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19190             Alan Hayward  <alan.hayward@arm.com>
19191             David Sherwood  <david.sherwood@arm.com>
19193         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
19194         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
19195         for MODE_VECTOR_BOOL.
19196         * machmode.def (VECTOR_BOOL_MODE): Document.
19197         * genmodes.c (VECTOR_BOOL_MODE): New macro.
19198         (make_vector_bool_mode): New function.
19199         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
19200         MODE_VECTOR_BOOL.
19201         * lto-streamer-in.c (lto_input_mode_table): Likewise.
19202         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
19203         Likewise.
19204         * stor-layout.c (int_mode_for_mode): Likewise.
19205         * tree.c (build_vector_type_for_mode): Likewise.
19206         * varasm.c (output_constant_pool_2): Likewise.
19207         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
19208         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
19209         for MODE_VECTOR_BOOL.
19210         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
19211         of mode class checks.
19212         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
19213         instead of a list of mode class checks.
19214         (expand_vector_scalar_condition): Likewise.
19215         (type_for_widest_vector_mode): Handle BImode as an inner mode.
19217 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19218             Alan Hayward  <alan.hayward@arm.com>
19219             David Sherwood  <david.sherwood@arm.com>
19221         * machmode.h (mode_size): Change from unsigned short to
19222         poly_uint16_pod.
19223         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
19224         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19225         or if measurement_type is not polynomial.
19226         (fixed_size_mode::includes_p): Check for constant-sized modes.
19227         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
19228         return a poly_uint16 rather than an unsigned short.
19229         (emit_mode_size): Change the type of mode_size from unsigned short
19230         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
19231         (emit_mode_adjustments): Cope with polynomial vector sizes.
19232         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19233         for GET_MODE_SIZE.
19234         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19235         for GET_MODE_SIZE.
19236         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
19237         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
19238         * caller-save.c (setup_save_areas): Likewise.
19239         (replace_reg_with_saved_mem): Likewise.
19240         * calls.c (emit_library_call_value_1): Likewise.
19241         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
19242         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
19243         (gen_lowpart_for_combine): Likewise.
19244         * convert.c (convert_to_integer_1): Likewise.
19245         * cse.c (equiv_constant, cse_insn): Likewise.
19246         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
19247         (cselib_subst_to_values): Likewise.
19248         * dce.c (word_dce_process_block): Likewise.
19249         * df-problems.c (df_word_lr_mark_ref): Likewise.
19250         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
19251         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
19252         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
19253         (rtl_for_decl_location): Likewise.
19254         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
19255         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
19256         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
19257         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
19258         (expand_expr_real_1): Likewise.
19259         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
19260         (pad_below): Likewise.
19261         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19262         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
19263         * ira.c (get_subreg_tracking_sizes): Likewise.
19264         * ira-build.c (ira_create_allocno_objects): Likewise.
19265         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
19266         (ira_sort_regnos_for_alter_reg): Likewise.
19267         * ira-costs.c (record_operand_costs): Likewise.
19268         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
19269         (resolve_simple_move): Likewise.
19270         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
19271         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
19272         (lra_constraints): Likewise.
19273         (CONST_POOL_OK_P): Reject variable-sized modes.
19274         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
19275         (add_pseudo_to_slot, lra_spill): Likewise.
19276         * omp-low.c (omp_clause_aligned_alignment): Likewise.
19277         * optabs-query.c (get_best_extraction_insn): Likewise.
19278         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19279         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
19280         (expand_mult_highpart, valid_multiword_target_p): Likewise.
19281         * recog.c (offsettable_address_addr_space_p): Likewise.
19282         * regcprop.c (maybe_mode_change): Likewise.
19283         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
19284         * regrename.c (build_def_use): Likewise.
19285         * regstat.c (dump_reg_info): Likewise.
19286         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
19287         (find_reloads, find_reloads_subreg_address): Likewise.
19288         * reload1.c (eliminate_regs_1): Likewise.
19289         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
19290         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
19291         (simplify_binary_operation_1, simplify_subreg): Likewise.
19292         * targhooks.c (default_function_arg_padding): Likewise.
19293         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
19294         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
19295         (verify_gimple_assign_ternary): Likewise.
19296         * tree-inline.c (estimate_move_cost): Likewise.
19297         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19298         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
19299         (get_address_cost_ainc): Likewise.
19300         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
19301         (vect_supportable_dr_alignment): Likewise.
19302         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19303         (vectorizable_reduction): Likewise.
19304         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
19305         (vectorizable_operation, vectorizable_load): Likewise.
19306         * tree.c (build_same_sized_truth_vector_type): Likewise.
19307         * valtrack.c (cleanup_auto_inc_dec): Likewise.
19308         * var-tracking.c (emit_note_insn_var_location): Likewise.
19309         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
19310         (ADDR_VEC_ALIGN): Likewise.
19312 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19313             Alan Hayward  <alan.hayward@arm.com>
19314             David Sherwood  <david.sherwood@arm.com>
19316         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
19317         unsigned short.
19318         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19319         or if measurement_type is polynomial.
19320         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
19321         * combine.c (make_extraction): Likewise.
19322         * dse.c (find_shift_sequence): Likewise.
19323         * dwarf2out.c (mem_loc_descriptor): Likewise.
19324         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
19325         (extract_bit_field, extract_low_bits): Likewise.
19326         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
19327         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
19328         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
19329         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
19330         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19331         * reload.c (find_reloads): Likewise.
19332         * reload1.c (alter_reg): Likewise.
19333         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
19334         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
19335         * tree-if-conv.c (predicate_mem_writes): Likewise.
19336         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
19337         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
19338         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19339         * valtrack.c (dead_debug_insert_temp): Likewise.
19340         * varasm.c (mergeable_constant_section): Likewise.
19341         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
19343 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19344             Alan Hayward  <alan.hayward@arm.com>
19345             David Sherwood  <david.sherwood@arm.com>
19347         * expr.c (expand_assignment): Cope with polynomial mode sizes
19348         when assigning to a CONCAT.
19350 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19351             Alan Hayward  <alan.hayward@arm.com>
19352             David Sherwood  <david.sherwood@arm.com>
19354         * machmode.h (mode_precision): Change from unsigned short to
19355         poly_uint16_pod.
19356         (mode_to_precision): Return a poly_uint16 rather than an unsigned
19357         short.
19358         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
19359         or if measurement_type is not polynomial.
19360         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
19361         in which the mode is already known to be a scalar_int_mode.
19362         * genmodes.c (emit_mode_precision): Change the type of mode_precision
19363         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
19364         initializer.
19365         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19366         for GET_MODE_PRECISION.
19367         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19368         for GET_MODE_PRECISION.
19369         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
19370         as polynomial.
19371         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
19372         (expand_field_assignment, make_extraction): Likewise.
19373         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
19374         (get_last_value): Likewise.
19375         * convert.c (convert_to_integer_1): Likewise.
19376         * cse.c (cse_insn): Likewise.
19377         * expr.c (expand_expr_real_1): Likewise.
19378         * lra-constraints.c (simplify_operand_subreg): Likewise.
19379         * optabs-query.c (can_atomic_load_p): Likewise.
19380         * optabs.c (expand_atomic_load): Likewise.
19381         (expand_atomic_store): Likewise.
19382         * ree.c (combine_reaching_defs): Likewise.
19383         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
19384         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
19385         * tree.h (type_has_mode_precision_p): Likewise.
19386         * ubsan.c (instrument_si_overflow): Likewise.
19388 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19389             Alan Hayward  <alan.hayward@arm.com>
19390             David Sherwood  <david.sherwood@arm.com>
19392         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
19393         polynomial numbers of units.
19394         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
19395         (valid_vector_subparts_p): New function.
19396         (build_vector_type): Remove temporary shim and take the number
19397         of units as a poly_uint64 rather than an int.
19398         (build_opaque_vector_type): Take the number of units as a
19399         poly_uint64 rather than an int.
19400         * tree.c (build_vector_from_ctor): Handle polynomial
19401         TYPE_VECTOR_SUBPARTS.
19402         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
19403         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
19404         (build_vector_from_val): If the number of units is variable,
19405         use build_vec_duplicate_cst for constant operands and
19406         VEC_DUPLICATE_EXPR otherwise.
19407         (make_vector_type): Remove temporary is_constant ().
19408         (build_vector_type, build_opaque_vector_type): Take the number of
19409         units as a poly_uint64 rather than an int.
19410         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
19411         VECTOR_CST_NELTS.
19412         * cfgexpand.c (expand_debug_expr): Likewise.
19413         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
19414         (store_constructor, expand_expr_real_1): Likewise.
19415         (const_scalar_mask_from_tree): Likewise.
19416         * fold-const-call.c (fold_const_reduction): Likewise.
19417         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
19418         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
19419         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
19420         (fold_relational_const): Likewise.
19421         (native_interpret_vector): Likewise.  Change the size from an
19422         int to an unsigned int.
19423         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
19424         TYPE_VECTOR_SUBPARTS.
19425         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
19426         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
19427         duplicating a non-constant operand into a variable-length vector.
19428         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
19429         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
19430         * ipa-icf.c (sem_variable::equals): Likewise.
19431         * match.pd: Likewise.
19432         * omp-simd-clone.c (simd_clone_subparts): Likewise.
19433         * print-tree.c (print_node): Likewise.
19434         * stor-layout.c (layout_type): Likewise.
19435         * targhooks.c (default_builtin_vectorization_cost): Likewise.
19436         * tree-cfg.c (verify_gimple_comparison): Likewise.
19437         (verify_gimple_assign_binary): Likewise.
19438         (verify_gimple_assign_ternary): Likewise.
19439         (verify_gimple_assign_single): Likewise.
19440         * tree-pretty-print.c (dump_generic_node): Likewise.
19441         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19442         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
19443         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
19444         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
19445         (vect_shift_permute_load_chain): Likewise.
19446         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
19447         (expand_vector_condition, optimize_vector_constructor): Likewise.
19448         (lower_vec_perm, get_compute_type): Likewise.
19449         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19450         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
19451         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
19452         (vect_recog_mask_conversion_pattern): Likewise.
19453         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
19454         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
19455         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19456         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
19457         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
19458         (vectorizable_shift, vectorizable_operation, vectorizable_store)
19459         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
19460         (supportable_widening_operation): Likewise.
19461         (supportable_narrowing_operation): Likewise.
19462         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
19463         Likewise.
19464         * varasm.c (output_constant): Likewise.
19466 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19467             Alan Hayward  <alan.hayward@arm.com>
19468             David Sherwood  <david.sherwood@arm.com>
19470         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
19471         so that both the length == 3 and length != 3 cases set up their
19472         own permute vectors.  Add comments explaining why we know the
19473         number of elements is constant.
19474         (vect_permute_load_chain): Likewise.
19476 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19477             Alan Hayward  <alan.hayward@arm.com>
19478             David Sherwood  <david.sherwood@arm.com>
19480         * machmode.h (mode_nunits): Change from unsigned char to
19481         poly_uint16_pod.
19482         (ONLY_FIXED_SIZE_MODES): New macro.
19483         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
19484         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
19485         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
19486         New typedefs.
19487         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
19488         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
19489         or if measurement_type is not polynomial.
19490         * genmodes.c (ZERO_COEFFS): New macro.
19491         (emit_mode_nunits_inline): Make mode_nunits_inline return a
19492         poly_uint16.
19493         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
19494         Use ZERO_COEFFS when emitting initializers.
19495         * data-streamer.h (bp_pack_poly_value): New function.
19496         (bp_unpack_poly_value): Likewise.
19497         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19498         for GET_MODE_NUNITS.
19499         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19500         for GET_MODE_NUNITS.
19501         * tree.c (make_vector_type): Remove temporary shim and make
19502         the real function take the number of units as a poly_uint64
19503         rather than an int.
19504         (build_vector_type_for_mode): Handle polynomial nunits.
19505         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
19506         * emit-rtl.c (const_vec_series_p_1): Likewise.
19507         (gen_rtx_CONST_VECTOR): Likewise.
19508         * fold-const.c (test_vec_duplicate_folding): Likewise.
19509         * genrecog.c (validate_pattern): Likewise.
19510         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
19511         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19512         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
19513         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
19514         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
19515         * rtlanal.c (subreg_get_info): Likewise.
19516         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19517         (vect_grouped_load_supported): Likewise.
19518         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
19519         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
19520         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
19521         (simplify_const_unary_operation, simplify_binary_operation_1)
19522         (simplify_const_binary_operation, simplify_ternary_operation)
19523         (test_vector_ops_duplicate, test_vector_ops): Likewise.
19524         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
19525         instead of CONST_VECTOR_NUNITS.
19526         * varasm.c (output_constant_pool_2): Likewise.
19527         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
19528         explicit-encoded elements in the XVEC for variable-length vectors.
19530 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19532         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
19534 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19535             Alan Hayward  <alan.hayward@arm.com>
19536             David Sherwood  <david.sherwood@arm.com>
19538         * coretypes.h (fixed_size_mode): Declare.
19539         (fixed_size_mode_pod): New typedef.
19540         * builtins.h (target_builtins::x_apply_args_mode)
19541         (target_builtins::x_apply_result_mode): Change type to
19542         fixed_size_mode_pod.
19543         * builtins.c (apply_args_size, apply_result_size, result_vector)
19544         (expand_builtin_apply_args_1, expand_builtin_apply)
19545         (expand_builtin_return): Update accordingly.
19547 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19549         * cse.c (hash_rtx_cb): Hash only the encoded elements.
19550         * cselib.c (cselib_hash_rtx): Likewise.
19551         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
19552         CONST_VECTOR encoding.
19554 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19555             Jeff Law  <law@redhat.com>
19557         PR target/83641
19558         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
19559         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
19560         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
19561         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
19563         PR target/83641
19564         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
19565         explicitly probe *sp in a noreturn function if there were any callee
19566         register saves or frame pointer is needed.
19568 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19570         PR debug/83621
19571         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
19572         BLKmode for ternary, binary or unary expressions.
19574         PR debug/83645
19575         * var-tracking.c (delete_vta_debug_insn): New inline function.
19576         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
19577         insns from get_insns () to NULL instead of each bb separately.
19578         Use delete_vta_debug_insn.  No longer static.
19579         (vt_debug_insns_local, variable_tracking_main_1): Adjust
19580         delete_vta_debug_insns callers.
19581         * rtl.h (delete_vta_debug_insns): Declare.
19582         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
19583         instead of variable_tracking_main.
19585 2018-01-03  Martin Sebor  <msebor@redhat.com>
19587         PR tree-optimization/83603
19588         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
19589         arguments past the endof the argument list in functions declared
19590         without a prototype.
19591         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
19592         Avoid checking when arguments are null.
19594 2018-01-03  Martin Sebor  <msebor@redhat.com>
19596         PR c/83559
19597         * doc/extend.texi (attribute const): Fix a typo.
19598         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
19599         issuing -Wsuggest-attribute for void functions.
19601 2018-01-03  Martin Sebor  <msebor@redhat.com>
19603         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
19604         offset_int::from instead of wide_int::to_shwi.
19605         (maybe_diag_overlap): Remove assertion.
19606         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
19607         * gimple-ssa-sprintf.c (format_directive): Same.
19608         (parse_directive): Same.
19609         (sprintf_dom_walker::compute_format_length): Same.
19610         (try_substitute_return_value): Same.
19612 2018-01-03  Jeff Law  <law@redhat.com>
19614         PR middle-end/83654
19615         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
19616         non-constant residual for zero at runtime and avoid probing in
19617         that case.  Reorganize code for trailing problem to mirror handling
19618         of the residual.
19620 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19622         PR tree-optimization/83501
19623         * tree-ssa-strlen.c (get_string_cst): New.
19624         (handle_char_store): Call get_string_cst.
19626 2018-01-03  Martin Liska  <mliska@suse.cz>
19628         PR tree-optimization/83593
19629         * tree-ssa-strlen.c: Include tree-cfg.h.
19630         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
19631         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
19632         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
19633         to false.
19634         (strlen_dom_walker::before_dom_children): Call
19635         gimple_purge_dead_eh_edges. Dump tranformation with details
19636         dump flags.
19637         (strlen_dom_walker::before_dom_children): Update call by adding
19638         new argument cleanup_eh.
19639         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
19641 2018-01-03  Martin Liska  <mliska@suse.cz>
19643         PR ipa/83549
19644         * cif-code.def (VARIADIC_THUNK): New enum value.
19645         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
19646         thunks.
19648 2018-01-03  Jan Beulich  <jbeulich@suse.com>
19650         * sse.md (mov<mode>_internal): Tighten condition for when to use
19651         vmovdqu<ssescalarsize> for TI and OI modes.
19653 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19655         Update copyright years.
19657 2018-01-03  Martin Liska  <mliska@suse.cz>
19659         PR ipa/83594
19660         * ipa-visibility.c (function_and_variable_visibility): Skip
19661         functions with noipa attribure.
19663 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19665         * gcc.c (process_command): Update copyright notice dates.
19666         * gcov-dump.c (print_version): Ditto.
19667         * gcov.c (print_version): Ditto.
19668         * gcov-tool.c (print_version): Ditto.
19669         * gengtype.c (create_file): Ditto.
19670         * doc/cpp.texi: Bump @copying's copyright year.
19671         * doc/cppinternals.texi: Ditto.
19672         * doc/gcc.texi: Ditto.
19673         * doc/gccint.texi: Ditto.
19674         * doc/gcov.texi: Ditto.
19675         * doc/install.texi: Ditto.
19676         * doc/invoke.texi: Ditto.
19678 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19680         * vector-builder.h (vector_builder::m_full_nelts): Change from
19681         unsigned int to poly_uint64.
19682         (vector_builder::full_nelts): Update prototype accordingly.
19683         (vector_builder::new_vector): Likewise.
19684         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
19685         (vector_builder::operator ==): Likewise.
19686         (vector_builder::finalize): Likewise.
19687         * int-vector-builder.h (int_vector_builder::int_vector_builder):
19688         Take the number of elements as a poly_uint64 rather than an
19689         unsigned int.
19690         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
19691         from unsigned int to poly_uint64.
19692         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
19693         (vec_perm_indices::new_vector): Likewise.
19694         (vec_perm_indices::length): Likewise.
19695         (vec_perm_indices::nelts_per_input): Likewise.
19696         (vec_perm_indices::input_nelts): Likewise.
19697         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
19698         number of elements per input as a poly_uint64 rather than an
19699         unsigned int.  Use the original encoding for variable-length
19700         vectors, rather than clamping each individual element.
19701         For the second and subsequent elements in each pattern,
19702         clamp the step and base before clamping their sum.
19703         (vec_perm_indices::series_p): Handle polynomial element counts.
19704         (vec_perm_indices::all_in_range_p): Likewise.
19705         (vec_perm_indices_to_tree): Likewise.
19706         (vec_perm_indices_to_rtx): Likewise.
19707         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
19708         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
19709         (tree_vector_builder::new_binary_operation): Handle polynomial
19710         element counts.  Return false if we need to know the number
19711         of elements at compile time.
19712         * fold-const.c (fold_vec_perm): Punt if the number of elements
19713         isn't known at compile time.
19715 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19717         * vec-perm-indices.h (vec_perm_builder): Change element type
19718         from HOST_WIDE_INT to poly_int64.
19719         (vec_perm_indices::element_type): Update accordingly.
19720         (vec_perm_indices::clamp): Handle polynomial element_types.
19721         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19722         (vec_perm_indices::all_in_range_p): Likewise.
19723         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
19724         than shwi trees.
19725         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
19726         polynomial vec_perm_indices element types.
19727         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
19728         * fold-const.c (fold_vec_perm): Likewise.
19729         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
19730         * tree-vect-generic.c (lower_vec_perm): Likewise.
19731         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19732         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
19733         element type to HOST_WIDE_INT.
19735 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19736             Alan Hayward  <alan.hayward@arm.com>
19737             David Sherwood  <david.sherwood@arm.com>
19739         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
19740         rather than an int.  Use plus_constant.
19741         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
19742         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
19744 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19745             Alan Hayward  <alan.hayward@arm.com>
19746             David Sherwood  <david.sherwood@arm.com>
19748         * calls.c (emit_call_1, expand_call): Change struct_value_size from
19749         a HOST_WIDE_INT to a poly_int64.
19751 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19752             Alan Hayward  <alan.hayward@arm.com>
19753             David Sherwood  <david.sherwood@arm.com>
19755         * calls.c (load_register_parameters): Cope with polynomial
19756         mode sizes.  Require a constant size for BLKmode parameters
19757         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
19758         forces a parameter to be padded at the lsb end in order to
19759         fill a complete number of words, require the parameter size
19760         to be ordered wrt UNITS_PER_WORD.
19762 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19763             Alan Hayward  <alan.hayward@arm.com>
19764             David Sherwood  <david.sherwood@arm.com>
19766         * reload1.c (spill_stack_slot_width): Change element type
19767         from unsigned int to poly_uint64_pod.
19768         (alter_reg): Treat mode sizes as polynomial.
19770 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19771             Alan Hayward  <alan.hayward@arm.com>
19772             David Sherwood  <david.sherwood@arm.com>
19774         * reload.c (complex_word_subreg_p): New function.
19775         (reload_inner_reg_of_subreg, push_reload): Use it.
19777 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19778             Alan Hayward  <alan.hayward@arm.com>
19779             David Sherwood  <david.sherwood@arm.com>
19781         * lra-constraints.c (process_alt_operands): Reject matched
19782         operands whose sizes aren't ordered.
19783         (match_reload): Refer to this check here.
19785 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19786             Alan Hayward  <alan.hayward@arm.com>
19787             David Sherwood  <david.sherwood@arm.com>
19789         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
19790         that the mode size is in the set {1, 2, 4, 8, 16}.
19792 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19793             Alan Hayward  <alan.hayward@arm.com>
19794             David Sherwood  <david.sherwood@arm.com>
19796         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
19797         Use plus_constant instead of gen_rtx_PLUS.
19799 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19800             Alan Hayward  <alan.hayward@arm.com>
19801             David Sherwood  <david.sherwood@arm.com>
19803         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
19804         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
19805         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
19806         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
19807         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
19808         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
19809         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
19810         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
19811         * config/i386/i386.c (ix86_push_rounding): ...this new function.
19812         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
19813         a poly_int64.
19814         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
19815         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
19816         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
19817         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
19818         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
19819         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
19820         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
19821         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
19822         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
19823         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
19824         function.
19825         * expr.c (emit_move_resolve_push): Treat the input and result
19826         of PUSH_ROUNDING as a poly_int64.
19827         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
19828         (emit_push_insn): Likewise.
19829         * lra-eliminations.c (mark_not_eliminable): Likewise.
19830         * recog.c (push_operand): Likewise.
19831         * reload1.c (elimination_effects): Likewise.
19832         * rtlanal.c (nonzero_bits1): Likewise.
19833         * calls.c (store_one_arg): Likewise.  Require the padding to be
19834         known at compile time.
19836 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19837             Alan Hayward  <alan.hayward@arm.com>
19838             David Sherwood  <david.sherwood@arm.com>
19840         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
19841         Use plus_constant instead of gen_rtx_PLUS.
19843 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19844             Alan Hayward  <alan.hayward@arm.com>
19845             David Sherwood  <david.sherwood@arm.com>
19847         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
19848         rather than an int.
19850 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19851             Alan Hayward  <alan.hayward@arm.com>
19852             David Sherwood  <david.sherwood@arm.com>
19854         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
19855         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
19856         via stack temporaries.  Treat the mode size as polynomial too.
19858 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19859             Alan Hayward  <alan.hayward@arm.com>
19860             David Sherwood  <david.sherwood@arm.com>
19862         * expr.c (expand_expr_real_2): When handling conversions involving
19863         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
19864         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
19865         as a poly_uint64 too.
19867 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19868             Alan Hayward  <alan.hayward@arm.com>
19869             David Sherwood  <david.sherwood@arm.com>
19871         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
19873 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19874             Alan Hayward  <alan.hayward@arm.com>
19875             David Sherwood  <david.sherwood@arm.com>
19877         * combine.c (can_change_dest_mode): Handle polynomial
19878         REGMODE_NATURAL_SIZE.
19879         * expmed.c (store_bit_field_1): Likewise.
19880         * expr.c (store_constructor): Likewise.
19881         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
19882         and polynomial REGMODE_NATURAL_SIZE.
19883         (gen_lowpart_common): Likewise.
19884         * reginfo.c (record_subregs_of_mode): Likewise.
19885         * rtlanal.c (read_modify_subreg_p): Likewise.
19887 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19888             Alan Hayward  <alan.hayward@arm.com>
19889             David Sherwood  <david.sherwood@arm.com>
19891         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
19892         numbers of elements.
19894 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19895             Alan Hayward  <alan.hayward@arm.com>
19896             David Sherwood  <david.sherwood@arm.com>
19898         * match.pd: Cope with polynomial numbers of vector elements.
19900 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19901             Alan Hayward  <alan.hayward@arm.com>
19902             David Sherwood  <david.sherwood@arm.com>
19904         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
19905         in a POINTER_PLUS_EXPR.
19907 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19908             Alan Hayward  <alan.hayward@arm.com>
19909             David Sherwood  <david.sherwood@arm.com>
19911         * omp-simd-clone.c (simd_clone_subparts): New function.
19912         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
19913         (ipa_simd_modify_function_body): Likewise.
19915 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19916             Alan Hayward  <alan.hayward@arm.com>
19917             David Sherwood  <david.sherwood@arm.com>
19919         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
19920         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
19921         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
19922         (expand_vector_condition, vector_element): Likewise.
19923         (subparts_gt): New function.
19924         (get_compute_type): Use subparts_gt.
19925         (count_type_subparts): Delete.
19926         (expand_vector_operations_1): Use subparts_gt instead of
19927         count_type_subparts.
19929 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19930             Alan Hayward  <alan.hayward@arm.com>
19931             David Sherwood  <david.sherwood@arm.com>
19933         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
19934         (vect_compile_time_alias): ...this new function.  Do the calculation
19935         on poly_ints rather than trees.
19936         (vect_prune_runtime_alias_test_list): Update call accordingly.
19938 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19939             Alan Hayward  <alan.hayward@arm.com>
19940             David Sherwood  <david.sherwood@arm.com>
19942         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
19943         numbers of units.
19944         (vect_schedule_slp_instance): Likewise.
19946 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19947             Alan Hayward  <alan.hayward@arm.com>
19948             David Sherwood  <david.sherwood@arm.com>
19950         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
19951         constant and extern definitions for variable-length vectors.
19952         (vect_get_constant_vectors): Note that the number of units
19953         is known to be constant.
19955 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19956             Alan Hayward  <alan.hayward@arm.com>
19957             David Sherwood  <david.sherwood@arm.com>
19959         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
19960         of units as polynomial.  Choose between WIDE and NARROW based
19961         on multiple_p.
19963 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19964             Alan Hayward  <alan.hayward@arm.com>
19965             David Sherwood  <david.sherwood@arm.com>
19967         * tree-vect-stmts.c (simd_clone_subparts): New function.
19968         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
19970 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19971             Alan Hayward  <alan.hayward@arm.com>
19972             David Sherwood  <david.sherwood@arm.com>
19974         * tree-vect-stmts.c (vectorizable_call): Treat the number of
19975         vectors as polynomial.  Use build_index_vector for
19976         IFN_GOMP_SIMD_LANE.
19978 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19979             Alan Hayward  <alan.hayward@arm.com>
19980             David Sherwood  <david.sherwood@arm.com>
19982         * tree-vect-stmts.c (get_load_store_type): Treat the number of
19983         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
19984         for variable-length vectors.
19985         (vectorizable_mask_load_store): Treat the number of units as
19986         polynomial, asserting that it is constant if the condition has
19987         already been enforced.
19988         (vectorizable_store, vectorizable_load): Likewise.
19990 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19991             Alan Hayward  <alan.hayward@arm.com>
19992             David Sherwood  <david.sherwood@arm.com>
19994         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
19995         of units as polynomial.  Punt if we can't tell at compile time
19996         which vector contains the final result.
19998 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19999             Alan Hayward  <alan.hayward@arm.com>
20000             David Sherwood  <david.sherwood@arm.com>
20002         * tree-vect-loop.c (vectorizable_induction): Treat the number
20003         of units as polynomial.  Punt on SLP inductions.  Use an integer
20004         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
20005         cast of such a series for variable-length floating-point
20006         reductions.
20008 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20009             Alan Hayward  <alan.hayward@arm.com>
20010             David Sherwood  <david.sherwood@arm.com>
20012         * tree.h (build_index_vector): Declare.
20013         * tree.c (build_index_vector): New function.
20014         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
20015         of units as polynomial, forcibly converting it to a constant if
20016         vectorizable_reduction has already enforced the condition.
20017         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
20018         to create a {1,2,3,...} vector.
20019         (vectorizable_reduction): Treat the number of units as polynomial.
20020         Choose vectype_in based on the largest scalar element size rather
20021         than the smallest number of units.  Enforce the restrictions
20022         relied on above.
20024 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20025             Alan Hayward  <alan.hayward@arm.com>
20026             David Sherwood  <david.sherwood@arm.com>
20028         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
20029         number of units as polynomial.
20031 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20032             Alan Hayward  <alan.hayward@arm.com>
20033             David Sherwood  <david.sherwood@arm.com>
20035         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
20036         * target.def (autovectorize_vector_sizes): Return the vector sizes
20037         by pointer, using vector_sizes rather than a bitmask.
20038         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
20039         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
20040         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
20041         Likewise.
20042         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
20043         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
20044         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
20045         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
20046         * omp-general.c (omp_max_vf): Likewise.
20047         * omp-low.c (omp_clause_aligned_alignment): Likewise.
20048         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
20049         * tree-vect-loop.c (vect_analyze_loop): Likewise.
20050         * tree-vect-slp.c (vect_slp_bb): Likewise.
20051         * doc/tm.texi: Regenerate.
20052         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
20053         to a poly_uint64.
20054         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
20055         the vector size as a poly_uint64 rather than an unsigned int.
20056         (current_vector_size): Change from an unsigned int to a poly_uint64.
20057         (get_vectype_for_scalar_type): Update accordingly.
20058         * tree.h (build_truth_vector_type): Take the size and number of
20059         units as a poly_uint64 rather than an unsigned int.
20060         (build_vector_type): Add a temporary overload that takes
20061         the number of units as a poly_uint64 rather than an unsigned int.
20062         * tree.c (make_vector_type): Likewise.
20063         (build_truth_vector_type): Take the number of units as a poly_uint64
20064         rather than an unsigned int.
20066 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20067             Alan Hayward  <alan.hayward@arm.com>
20068             David Sherwood  <david.sherwood@arm.com>
20070         * target.def (get_mask_mode): Take the number of units and length
20071         as poly_uint64s rather than unsigned ints.
20072         * targhooks.h (default_get_mask_mode): Update accordingly.
20073         * targhooks.c (default_get_mask_mode): Likewise.
20074         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
20075         * doc/tm.texi: Regenerate.
20077 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20078             Alan Hayward  <alan.hayward@arm.com>
20079             David Sherwood  <david.sherwood@arm.com>
20081         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
20082         * omp-general.c (omp_max_vf): Likewise.
20083         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
20084         (expand_omp_simd): Handle polynomial safelen.
20085         * omp-low.c (omplow_simd_context): Add a default constructor.
20086         (omplow_simd_context::max_vf): Change from int to poly_uint64.
20087         (lower_rec_simd_input_clauses): Update accordingly.
20088         (lower_rec_input_clauses): Likewise.
20090 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20091             Alan Hayward  <alan.hayward@arm.com>
20092             David Sherwood  <david.sherwood@arm.com>
20094         * tree-vectorizer.h (vect_nunits_for_cost): New function.
20095         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
20096         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
20097         (vect_analyze_slp_cost): Likewise.
20098         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
20099         (vect_model_load_cost): Likewise.
20101 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20102             Alan Hayward  <alan.hayward@arm.com>
20103             David Sherwood  <david.sherwood@arm.com>
20105         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
20106         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
20107         from an unsigned int * to a poly_uint64_pod *.
20108         (calculate_unrolling_factor): New function.
20109         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
20111 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20112             Alan Hayward  <alan.hayward@arm.com>
20113             David Sherwood  <david.sherwood@arm.com>
20115         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
20116         from an unsigned int to a poly_uint64.
20117         (_loop_vec_info::slp_unrolling_factor): Likewise.
20118         (_loop_vec_info::vectorization_factor): Change from an int
20119         to a poly_uint64.
20120         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
20121         (vect_get_num_vectors): New function.
20122         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
20123         (vect_get_num_copies): Use vect_get_num_vectors.
20124         (vect_analyze_data_ref_dependences): Change max_vf from an int *
20125         to an unsigned int *.
20126         (vect_analyze_data_refs): Change min_vf from an int * to a
20127         poly_uint64 *.
20128         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20129         than an unsigned HOST_WIDE_INT.
20130         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20131         (vect_analyze_data_ref_dependence): Change max_vf from an int *
20132         to an unsigned int *.
20133         (vect_analyze_data_ref_dependences): Likewise.
20134         (vect_compute_data_ref_alignment): Handle polynomial vf.
20135         (vect_enhance_data_refs_alignment): Likewise.
20136         (vect_prune_runtime_alias_test_list): Likewise.
20137         (vect_shift_permute_load_chain): Likewise.
20138         (vect_supportable_dr_alignment): Likewise.
20139         (dependence_distance_ge_vf): Take the vectorization factor as a
20140         poly_uint64 rather than an unsigned HOST_WIDE_INT.
20141         (vect_analyze_data_refs): Change min_vf from an int * to a
20142         poly_uint64 *.
20143         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
20144         vfm1 as a poly_uint64 rather than an int.  Make the same change
20145         for the returned bound_scalar.
20146         (vect_gen_vector_loop_niters): Handle polynomial vf.
20147         (vect_do_peeling): Likewise.  Update call to
20148         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
20149         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
20150         be constant.
20151         * tree-vect-loop.c (vect_determine_vectorization_factor)
20152         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
20153         (vect_get_known_peeling_cost): Likewise.
20154         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
20155         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
20156         (vect_transform_loop): Likewise.  Use the lowest possible VF when
20157         updating the upper bounds of the loop.
20158         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
20159         rather than an int.
20160         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
20161         polynomial unroll factors.
20162         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
20163         (vect_make_slp_decision): Likewise.
20164         (vect_supported_load_permutation_p): Likewise, and polynomial
20165         vf too.
20166         (vect_analyze_slp_cost): Handle polynomial vf.
20167         (vect_slp_analyze_node_operations): Likewise.
20168         (vect_slp_analyze_bb_1): Likewise.
20169         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20170         than an unsigned HOST_WIDE_INT.
20171         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
20172         (vectorizable_load): Handle polynomial vf.
20173         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
20174         a poly_uint64.
20175         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
20177 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20178             Alan Hayward  <alan.hayward@arm.com>
20179             David Sherwood  <david.sherwood@arm.com>
20181         * match.pd: Handle bit operations involving three constants
20182         and try to fold one pair.
20184 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20186         * tree-vect-loop-manip.c: Include gimple-fold.h.
20187         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
20188         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
20189         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
20190         Add a path that uses a step of VF instead of 1, but disable it
20191         for now.
20192         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
20193         and niters_no_overflow parameters.  Update calls to
20194         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
20195         Create a new SSA name if the latter choses to use a ste other
20196         than zero, and return it via niters_vector_mult_vf_var.
20197         * tree-vect-loop.c (vect_transform_loop): Update calls to
20198         vect_do_peeling, vect_gen_vector_loop_niters and
20199         slpeel_make_loop_iterate_ntimes.
20200         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
20201         (vect_gen_vector_loop_niters): Update declarations after above changes.
20203 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
20205         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
20206         128-bit round to integer instructions.
20207         (ceil<mode>2): Likewise.
20208         (btrunc<mode>2): Likewise.
20209         (round<mode>2): Likewise.
20211 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20213         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
20214         unaligned VSX load/store on P8/P9.
20215         (expand_block_clear): Allow the use of unaligned VSX
20216         load/store on P8/P9.
20218 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20220         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
20221         New function.
20222         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
20223         swap associated with both a load and a store.
20225 2018-01-02  Andrew Waterman  <andrew@sifive.com>
20227         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
20228         * config/riscv/riscv.md (clear_cache): Use it.
20230 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
20232         * web.c: Remove out-of-date comment.
20234 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20236         * expr.c (fixup_args_size_notes): Check that any existing
20237         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
20238         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
20239         (emit_single_push_insn): ...here.
20241 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20243         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
20244         (const_vector_encoded_nelts): New function.
20245         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
20246         (const_vector_int_elt, const_vector_elt): Declare.
20247         * emit-rtl.c (const_vector_int_elt_1): New function.
20248         (const_vector_elt): Likewise.
20249         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
20250         of CONST_VECTOR_ELT.
20252 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20254         * expr.c: Include rtx-vector-builder.h.
20255         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
20256         directly on the tree encoding.
20257         (const_vector_from_tree): Likewise.
20258         * optabs.c: Include rtx-vector-builder.h.
20259         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
20260         sequence of "u" values.
20261         * vec-perm-indices.c: Include rtx-vector-builder.h.
20262         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
20263         directly on the vec_perm_indices encoding.
20265 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20267         * doc/rtl.texi (const_vector): Describe new encoding scheme.
20268         * Makefile.in (OBJS): Add rtx-vector-builder.o.
20269         * rtx-vector-builder.h: New file.
20270         * rtx-vector-builder.c: Likewise.
20271         * rtl.h (rtx_def::u2): Add a const_vector field.
20272         (CONST_VECTOR_NPATTERNS): New macro.
20273         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
20274         (CONST_VECTOR_DUPLICATE_P): Likewise.
20275         (CONST_VECTOR_STEPPED_P): Likewise.
20276         (CONST_VECTOR_ENCODED_ELT): Likewise.
20277         (const_vec_duplicate_p): Check for a duplicated vector encoding.
20278         (unwrap_const_vec_duplicate): Likewise.
20279         (const_vec_series_p): Check for a non-duplicated vector encoding.
20280         Say that the function only returns true for integer vectors.
20281         * emit-rtl.c: Include rtx-vector-builder.h.
20282         (gen_const_vec_duplicate_1): Delete.
20283         (gen_const_vector): Call gen_const_vec_duplicate instead of
20284         gen_const_vec_duplicate_1.
20285         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
20286         (gen_const_vec_duplicate): Use rtx_vector_builder.
20287         (gen_const_vec_series): Likewise.
20288         (gen_rtx_CONST_VECTOR): Likewise.
20289         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
20290         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20291         Build a new vector rather than modifying a CONST_VECTOR in-place.
20292         (handle_special_swappables): Update call accordingly.
20293         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
20294         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20295         Build a new vector rather than modifying a CONST_VECTOR in-place.
20296         (handle_special_swappables): Update call accordingly.
20298 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20300         * simplify-rtx.c (simplify_const_binary_operation): Use
20301         CONST_VECTOR_ELT instead of XVECEXP.
20303 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20305         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
20306         the selector elements to be different from the data elements
20307         if the selector is a VECTOR_CST.
20308         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
20309         ssizetype for the selector.
20311 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20313         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
20314         before testing each element individually.
20315         * tree-vect-generic.c (lower_vec_perm): Likewise.
20317 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20319         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
20320         * selftest-run-tests.c (selftest::run_tests): Call it.
20321         * vector-builder.h (vector_builder::operator ==): New function.
20322         (vector_builder::operator !=): Likewise.
20323         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
20324         (vec_perm_indices::all_from_input_p): New function.
20325         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20326         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
20327         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
20328         instead of reading the VECTOR_CST directly.  Detect whether both
20329         vector inputs are the same before constructing the vec_perm_indices,
20330         and update the number of inputs argument accordingly.  Use the
20331         utility functions added above.  Only construct sel2 if we need to.
20333 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20335         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
20336         the broadcast of the low byte.
20337         (expand_mult_highpart): Use an explicit encoding for the permutes.
20338         * optabs-query.c (can_mult_highpart_p): Likewise.
20339         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20340         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20341         (vectorizable_bswap): Likewise.
20342         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
20343         explicit encoding for the power-of-2 permutes.
20344         (vect_permute_store_chain): Likewise.
20345         (vect_grouped_load_supported): Likewise.
20346         (vect_permute_load_chain): Likewise.
20348 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20350         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
20351         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
20352         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
20353         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20354         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
20355         (vect_gen_perm_mask_any): Likewise.
20357 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20359         * int-vector-builder.h: New file.
20360         * vec-perm-indices.h: Include int-vector-builder.h.
20361         (vec_perm_indices): Redefine as an int_vector_builder.
20362         (auto_vec_perm_indices): Delete.
20363         (vec_perm_builder): Redefine as a stand-alone class.
20364         (vec_perm_indices::vec_perm_indices): New function.
20365         (vec_perm_indices::clamp): Likewise.
20366         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
20367         (vec_perm_indices::new_vector): New function.
20368         (vec_perm_indices::new_expanded_vector): Update for new
20369         vec_perm_indices class.
20370         (vec_perm_indices::rotate_inputs): New function.
20371         (vec_perm_indices::all_in_range_p): Operate directly on the
20372         encoded form, without computing elided elements.
20373         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
20374         encoding.  Update for new vec_perm_indices class.
20375         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
20376         the given vec_perm_builder.
20377         (expand_vec_perm_var): Update vec_perm_builder constructor.
20378         (expand_mult_highpart): Use vec_perm_builder instead of
20379         auto_vec_perm_indices.
20380         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
20381         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
20382         or double series encoding as appropriate.
20383         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
20384         vec_perm_indices instead of auto_vec_perm_indices.
20385         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20386         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20387         (vect_permute_store_chain): Likewise.
20388         (vect_grouped_load_supported): Likewise.
20389         (vect_permute_load_chain): Likewise.
20390         (vect_shift_permute_load_chain): Likewise.
20391         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20392         (vect_transform_slp_perm_load): Likewise.
20393         (vect_schedule_slp_instance): Likewise.
20394         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20395         (vectorizable_mask_load_store): Likewise.
20396         (vectorizable_bswap): Likewise.
20397         (vectorizable_store): Likewise.
20398         (vectorizable_load): Likewise.
20399         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
20400         vec_perm_indices instead of auto_vec_perm_indices.  Use
20401         tree_to_vec_perm_builder to read the vector from a tree.
20402         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
20403         vec_perm_builder instead of a vec_perm_indices.
20404         (have_whole_vector_shift): Use vec_perm_builder and
20405         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
20406         truncation to calc_vec_perm_mask_for_shift.
20407         (vect_create_epilog_for_reduction): Likewise.
20408         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
20409         from auto_vec_perm_indices to vec_perm_indices.
20410         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20411         instead of changing individual elements.
20412         (aarch64_vectorize_vec_perm_const): Use new_vector to install
20413         the vector in d.perm.
20414         * config/arm/arm.c (expand_vec_perm_d::perm): Change
20415         from auto_vec_perm_indices to vec_perm_indices.
20416         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20417         instead of changing individual elements.
20418         (arm_vectorize_vec_perm_const): Use new_vector to install
20419         the vector in d.perm.
20420         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
20421         Update vec_perm_builder constructor.
20422         (rs6000_expand_interleave): Likewise.
20423         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
20424         (rs6000_expand_interleave): Likewise.
20426 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20428         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
20429         to qimode could truncate the indices.
20430         * optabs.c (expand_vec_perm_var): Likewise.
20432 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20434         * Makefile.in (OBJS): Add vec-perm-indices.o.
20435         * vec-perm-indices.h: New file.
20436         * vec-perm-indices.c: Likewise.
20437         * target.h (vec_perm_indices): Replace with a forward class
20438         declaration.
20439         (auto_vec_perm_indices): Move to vec-perm-indices.h.
20440         * optabs.h: Include vec-perm-indices.h.
20441         (expand_vec_perm): Delete.
20442         (selector_fits_mode_p, expand_vec_perm_var): Declare.
20443         (expand_vec_perm_const): Declare.
20444         * target.def (vec_perm_const_ok): Replace with...
20445         (vec_perm_const): ...this new hook.
20446         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
20447         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
20448         * doc/tm.texi: Regenerate.
20449         * optabs.def (vec_perm_const): Delete.
20450         * doc/md.texi (vec_perm_const): Likewise.
20451         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
20452         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
20453         expand_vec_perm for constant permutation vectors.  Assert that
20454         the mode of variable permutation vectors is the integer equivalent
20455         of the mode that is being permuted.
20456         * optabs-query.h (selector_fits_mode_p): Declare.
20457         * optabs-query.c: Include vec-perm-indices.h.
20458         (selector_fits_mode_p): New function.
20459         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
20460         is defined, instead of checking whether the vec_perm_const_optab
20461         exists.  Use targetm.vectorize.vec_perm_const instead of
20462         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
20463         fit in the vector mode before using a variable permute.
20464         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
20465         vec_perm_indices instead of an rtx.
20466         (expand_vec_perm): Replace with...
20467         (expand_vec_perm_const): ...this new function.  Take the selector
20468         as a vec_perm_indices rather than an rtx.  Also take the mode of
20469         the selector.  Update call to shift_amt_for_vec_perm_mask.
20470         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
20471         Use vec_perm_indices::new_expanded_vector to expand the original
20472         selector into bytes.  Check whether the indices fit in the vector
20473         mode before using a variable permute.
20474         (expand_vec_perm_var): Make global.
20475         (expand_mult_highpart): Use expand_vec_perm_const.
20476         * fold-const.c: Includes vec-perm-indices.h.
20477         * tree-ssa-forwprop.c: Likewise.
20478         * tree-vect-data-refs.c: Likewise.
20479         * tree-vect-generic.c: Likewise.
20480         * tree-vect-loop.c: Likewise.
20481         * tree-vect-slp.c: Likewise.
20482         * tree-vect-stmts.c: Likewise.
20483         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
20484         Delete.
20485         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
20486         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
20487         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
20488         (aarch64_vectorize_vec_perm_const): ...this new function.
20489         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20490         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20491         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
20492         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
20493         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20494         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20495         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
20496         into...
20497         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
20498         check for NEON modes.
20499         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
20500         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
20501         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
20502         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
20503         into...
20504         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
20505         the old VEC_PERM_CONST conditions.
20506         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
20507         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
20508         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
20509         (ia64_vectorize_vec_perm_const_ok): Merge into...
20510         (ia64_vectorize_vec_perm_const): ...this new function.
20511         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
20512         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
20513         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
20514         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
20515         * config/mips/mips.c (mips_expand_vec_perm_const)
20516         (mips_vectorize_vec_perm_const_ok): Merge into...
20517         (mips_vectorize_vec_perm_const): ...this new function.
20518         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
20519         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
20520         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
20521         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
20522         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
20523         (rs6000_expand_vec_perm_const): Delete.
20524         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
20525         Delete.
20526         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20527         (altivec_expand_vec_perm_const_le): Take each operand individually.
20528         Operate on constant selectors rather than rtxes.
20529         (altivec_expand_vec_perm_const): Likewise.  Update call to
20530         altivec_expand_vec_perm_const_le.
20531         (rs6000_expand_vec_perm_const): Delete.
20532         (rs6000_vectorize_vec_perm_const_ok): Delete.
20533         (rs6000_vectorize_vec_perm_const): New function.
20534         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20535         an element count and rtx array.
20536         (rs6000_expand_extract_even): Update call accordingly.
20537         (rs6000_expand_interleave): Likewise.
20538         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
20539         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
20540         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
20541         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
20542         (rs6000_expand_vec_perm_const): Delete.
20543         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20544         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20545         (altivec_expand_vec_perm_const_le): Take each operand individually.
20546         Operate on constant selectors rather than rtxes.
20547         (altivec_expand_vec_perm_const): Likewise.  Update call to
20548         altivec_expand_vec_perm_const_le.
20549         (rs6000_expand_vec_perm_const): Delete.
20550         (rs6000_vectorize_vec_perm_const_ok): Delete.
20551         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
20552         reference to the SPE evmerge intructions.
20553         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20554         an element count and rtx array.
20555         (rs6000_expand_extract_even): Update call accordingly.
20556         (rs6000_expand_interleave): Likewise.
20557         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
20558         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
20559         new function.
20560         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20562 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20564         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
20565         vector mode and that that mode matches the mode of the data
20566         being permuted.
20567         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
20568         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
20569         directly using expand_vec_perm_1 when forcing selectors into
20570         registers.
20571         (expand_vec_perm_var): New function, split out from expand_vec_perm.
20573 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20575         * optabs-query.h (can_vec_perm_p): Delete.
20576         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
20577         * optabs-query.c (can_vec_perm_p): Split into...
20578         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
20579         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
20580         particular selector is valid.
20581         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20582         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20583         (vect_grouped_load_supported): Likewise.
20584         (vect_shift_permute_load_chain): Likewise.
20585         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20586         (vect_transform_slp_perm_load): Likewise.
20587         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20588         (vectorizable_bswap): Likewise.
20589         (vect_gen_perm_mask_checked): Likewise.
20590         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
20591         implementations of variable permutation vectors into account
20592         when deciding which selector to use.
20593         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
20594         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
20595         with a false third argument.
20596         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
20597         to test whether the constant selector is valid and can_vec_perm_var_p
20598         to test whether a variable selector is valid.
20600 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20602         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
20603         * optabs-query.c (can_vec_perm_p): Likewise.
20604         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
20605         instead of vec_perm_indices.
20606         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
20607         (vect_gen_perm_mask_checked): Likewise,
20608         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
20609         (vect_gen_perm_mask_checked): Likewise,
20611 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20613         * optabs-query.h (qimode_for_vec_perm): Declare.
20614         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
20615         (qimode_for_vec_perm): ...this new function.
20616         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
20618 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20620         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
20621         does not have a conditional at the top.
20623 2018-01-02  Richard Biener  <rguenther@suse.de>
20625         * ipa-inline.c (big_speedup_p): Fix expression.
20627 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
20629         PR target/81616
20630         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
20631         for generic 4->6.
20633 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
20635         PR target/81616
20636         Generic tuning.
20637         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
20638         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
20639         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
20640         cond_taken_branch_cost 3->4.
20642 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
20644         PR tree-optimization/83581
20645         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
20646         TODO_cleanup_cfg if any changes have been made.
20648         PR middle-end/83608
20649         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
20650         convert_modes if target mode has the right side, but different mode
20651         class.
20653         PR middle-end/83609
20654         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
20655         last argument when extracting from CONCAT.  If either from_real or
20656         from_imag is NULL, use expansion through memory.  If result is not
20657         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
20658         the parts directly to inner mode, if even that fails, use expansion
20659         through memory.
20661         PR middle-end/83623
20662         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
20663         check for bswap in mode rather than HImode and use that in expand_unop
20664         too.
20666 Copyright (C) 2018 Free Software Foundation, Inc.
20668 Copying and distribution of this file, with or without modification,
20669 are permitted in any medium without royalty provided the copyright
20670 notice and this notice are preserved.